Package owl.automaton.acceptance
Class OmegaAcceptanceCast
- java.lang.Object
-
- owl.automaton.acceptance.OmegaAcceptanceCast
-
public final class OmegaAcceptanceCast extends Object
This class provides functionality to cast an automaton to an automaton with a more generic acceptance condition. This operation yields a on-the-fly generated view on the backing automaton. It is assumed that the backing automaton is not modified anymore after the cast.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <A extends OmegaAcceptance,B extends OmegaAcceptance>
Bcast(A acceptance, Class<B> acceptanceClass)
static <S,A extends OmegaAcceptance,B extends OmegaAcceptance>
Automaton<S,B>cast(Automaton<S,A> automaton, Class<B> acceptanceClass)
Cast the given automaton to the given acceptance condition if possible.static <S> Automaton<S,?>
castHeuristically(Automaton<S,?> automaton)
Find heuristically the weakest acceptance condition for the given automaton and cast it to it.static boolean
isInstanceOf(Class<? extends OmegaAcceptance> clazz1, Class<? extends OmegaAcceptance> clazz2)
-
-
-
Method Detail
-
cast
public static <S,A extends OmegaAcceptance,B extends OmegaAcceptance> Automaton<S,B> cast(Automaton<S,A> automaton, Class<B> acceptanceClass)
Cast the given automaton to the given acceptance condition if possible. A conversion is considered possible if (trivial) rewriting of the acceptance condition is done and no changes to state space are necessary, e.g. a Büchi condition can be translated to a Rabin condition, but a Rabin condition (even only with a single pair) cannot be cast to parity acceptance condition.- Type Parameters:
S
- The state type.A
- The current acceptance type.B
- The desired acceptance type.- Parameters:
automaton
- The automaton. It is assumed that after calling this method the automaton is not modified anymore.acceptanceClass
- The desired acceptance condition.- Returns:
- A view on the given automaton with the necessary changes.
-
castHeuristically
public static <S> Automaton<S,?> castHeuristically(Automaton<S,?> automaton)
Find heuristically the weakest acceptance condition for the given automaton and cast it to it. Only simple syntactic checks on the boolean expression of the acceptance conditions are performed. For advanced (and complete) techniques use the typeness implementations.- Type Parameters:
S
- The state type.- Parameters:
automaton
- The automaton. It is assumed that after calling this method the automaton is not modified anymore.- Returns:
- A view on the given automaton with the necessary changes.
-
cast
public static <A extends OmegaAcceptance,B extends OmegaAcceptance> B cast(A acceptance, Class<B> acceptanceClass)
-
isInstanceOf
public static boolean isInstanceOf(Class<? extends OmegaAcceptance> clazz1, Class<? extends OmegaAcceptance> clazz2)
-
-