Class DOTParsers
- java.lang.Object
-
- net.automatalib.serialization.dot.DOTParsers
-
public final class DOTParsers extends Object
An aggregation of factory methods for obtaining DOT parsers for several types of automata / graphs.
-
-
Field Summary
Fields Modifier and Type Field Description static Function<Map<String,String>,@Nullable String>
DEFAULT_EDGE_PARSER
static Function<Map<String,String>,Boolean>
DEFAULT_FSA_NODE_PARSER
Node property parser that returnstrue
if a node's "shape
" attribute is specified and equals "doublecircle
".static Function<Map<String,String>,Pair<@Nullable String,@Nullable String>>
DEFAULT_MEALY_EDGE_PARSER
Edge input parser that expects an edge's "label
" attribute to be of the form<input>/<property>
.static Function<Map<String,String>,@Nullable String>
DEFAULT_MOORE_NODE_PARSER
Node property parser that expects a node's "label
" attribute to be of the form<id>/<property>
.static Function<Map<String,String>,MutableModalEdgeProperty>
DEFAULT_MTS_EDGE_PARSER
Edge input parser that parses an edge'smodality
attribute and constructs a correspondingMutableModalEdgeProperty
.static Function<Map<String,String>,@Nullable String>
DEFAULT_NODE_PARSER
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DOTInputModelDeserializer<Integer,@Nullable String,CompactDFA<@Nullable String>>
dfa()
Default parser forDFA
s serialized by AutomataLib.static <I> DOTInputModelDeserializer<Integer,I,CompactDFA<I>>
dfa(Function<Map<String,String>,Boolean> nodeParser, Function<Map<String,String>,I> edgeParser)
Parser forDFA
s with custom node and edge attributes.static <S,I,A extends MutableFSA<S,I>>
DOTInputModelDeserializer<S,I,A>fsa(AutomatonCreator<A,I> creator, Function<Map<String,String>,Boolean> nodeParser, Function<Map<String,String>,I> edgeParser)
Parser forFiniteStateAcceptor
s with a custom automaton instance and custom node and edge attributes.static <S,I,A extends MutableFSA<S,I>>
DOTInputModelDeserializer<S,I,A>fsa(AutomatonCreator<A,I> creator, Function<Map<String,String>,Boolean> nodeParser, Function<Map<String,String>,I> edgeParser, Collection<String> initialNodeIds)
Parser forFiniteStateAcceptor
s with a custom automaton instance, custom node and edge attributes and custom labels for the initial nodes.static <S,I,A extends MutableFSA<S,I>>
DOTInputModelDeserializer<S,I,A>fsa(AutomatonCreator<A,I> creator, Function<Map<String,String>,Boolean> nodeParser, Function<Map<String,String>,I> edgeParser, Collection<String> initialNodeIds, boolean fakeInitialNodeIds)
Parser forFiniteStateAcceptor
s with a custom automaton instance, custom node and edge attributes, custom labels for initial nodes and a flag whether the initial nodes are artificial.static ModelDeserializer<CompactGraph<@Nullable String,@Nullable String>>
graph()
Default parser for (directed)Graph
s serialized by AutomataLib.static <NP,EP>
ModelDeserializer<CompactGraph<NP,EP>>graph(Function<Map<String,String>,NP> nodeParser, Function<Map<String,String>,EP> edgeParser)
Parser for (directed)Graph
s with custom node and edge attributes.static <NP,EP,G extends MutableGraph<?,?,NP,EP>>
ModelDeserializer<G>graph(Supplier<G> creator, Function<Map<String,String>,NP> nodeParser, Function<Map<String,String>,EP> edgeParser)
Parser for (directed)Graph
s with a custom graph instance and custom node and edge attributes.static DOTInputModelDeserializer<Integer,@Nullable String,CompactMealy<@Nullable String,@Nullable String>>
mealy()
Default parser forMealyMachine
s serialized by AutomataLib.static <I,O>
DOTInputModelDeserializer<Integer,I,CompactMealy<I,O>>mealy(Function<Map<String,String>,Pair<I,O>> edgeParser)
Parser forMealyMachine
s with custom edge attributes.static <S,I,O,A extends MutableMealyMachine<S,I,?,O>>
DOTInputModelDeserializer<S,I,A>mealy(AutomatonCreator<A,I> creator, Function<Map<String,String>,Pair<I,O>> edgeParser)
Parser forMealyMachine
s with a custom automaton instance and custom edge attributes.static <S,I,O,A extends MutableMealyMachine<S,I,?,O>>
DOTInputModelDeserializer<S,I,A>mealy(AutomatonCreator<A,I> creator, Function<Map<String,String>,Pair<I,O>> edgeParser, String initialNodeId)
Parser forMealyMachine
s with a custom automaton instance, custom edge attributes and a custom label for the initial node.static <S,I,O,A extends MutableMealyMachine<S,I,?,O>>
DOTInputModelDeserializer<S,I,A>mealy(AutomatonCreator<A,I> creator, Function<Map<String,String>,Pair<I,O>> edgeParser, String initialNodeId, boolean fakeInitialNodeId)
Parser forMealyMachine
s with a custom automaton instance, custom edge attributes and a custom label for the initial node and a flag whether the initial nodes are artificial.static DOTInputModelDeserializer<Integer,@Nullable String,CompactMoore<@Nullable String,@Nullable String>>
moore()
Default parser forMooreMachine
s serialized by AutomataLib.static <I,O>
DOTInputModelDeserializer<Integer,I,CompactMoore<I,O>>moore(Function<Map<String,String>,O> nodeParser, Function<Map<String,String>,I> edgeParser)
Parser forMooreMachine
s with custom node and edge attributes.static <S,I,O,A extends MutableMooreMachine<S,I,?,O>>
DOTInputModelDeserializer<S,I,A>moore(AutomatonCreator<A,I> creator, Function<Map<String,String>,O> nodeParser, Function<Map<String,String>,I> edgeParser)
Parser forMooreMachine
s with a custom automaton instance and custom node and edge attributes.static <S,I,O,A extends MutableMooreMachine<S,I,?,O>>
DOTInputModelDeserializer<S,I,A>moore(AutomatonCreator<A,I> creator, Function<Map<String,String>,O> nodeParser, Function<Map<String,String>,I> edgeParser, String initialNodeId)
Parser forMooreMachine
s with a custom automaton instance, custom node and edge attributes and a custom label for the initial node.static <S,I,O,A extends MutableMooreMachine<S,I,?,O>>
DOTInputModelDeserializer<S,I,A>moore(AutomatonCreator<A,I> creator, Function<Map<String,String>,O> nodeParser, Function<Map<String,String>,I> edgeParser, String initialNodeId, boolean fakeInitialNodeId)
Parser forMooreMachine
s with a custom automaton instance, custom node and edge attributes, a custom label for the initial node and a flag whether the initial node is artificial.static DOTInputModelDeserializer<Integer,@Nullable String,CompactMTS<@Nullable String>>
mts()
Default parser forModalTransitionSystem
s serialized by AutomataLib.static <S,I,TP extends MutableModalEdgeProperty,M extends MutableModalTransitionSystem<S,I,?,TP>>
DOTInputModelDeserializer<S,I,M>mts(AutomatonCreator<M,I> creator, Function<Map<String,String>,I> inputParser, Function<Map<String,String>,TP> propertyParser)
Parser forModalTransitionSystem
s with a custom MTS instance, custom input type and edge attributes parsers.static <S,I,TP extends MutableModalEdgeProperty,M extends MutableModalTransitionSystem<S,I,?,TP>>
DOTInputModelDeserializer<S,I,M>mts(AutomatonCreator<M,I> creator, Function<Map<String,String>,I> inputParser, Function<Map<String,String>,TP> propertyParser, Collection<String> initialNodeIds)
Parser forModalTransitionSystem
s with a custom MTS instance, custom input type and edge attributes parsers and custom initial state labels.static DOTInputModelDeserializer<Integer,@Nullable String,CompactNFA<@Nullable String>>
nfa()
Default parser forNFA
s serialized by AutomataLib.static <I> DOTInputModelDeserializer<Integer,I,CompactNFA<I>>
nfa(Function<Map<String,String>,Boolean> nodeParser, Function<Map<String,String>,I> edgeParser)
Parser forNFA
s with custom node and edge attributes.
-
-
-
Field Detail
-
DEFAULT_NODE_PARSER
public static final Function<Map<String,String>,@Nullable String> DEFAULT_NODE_PARSER
-
DEFAULT_FSA_NODE_PARSER
public static final Function<Map<String,String>,Boolean> DEFAULT_FSA_NODE_PARSER
Node property parser that returnstrue
if a node's "shape
" attribute is specified and equals "doublecircle
". Returnsfalse
otherwise.
-
DEFAULT_MOORE_NODE_PARSER
public static final Function<Map<String,String>,@Nullable String> DEFAULT_MOORE_NODE_PARSER
Node property parser that expects a node's "label
" attribute to be of the form<id>/<property>
. Returns the string representation of<property>
as-is. Returnsnull
if the attribute does not exist or does not match the expected format.
-
DEFAULT_EDGE_PARSER
public static final Function<Map<String,String>,@Nullable String> DEFAULT_EDGE_PARSER
-
DEFAULT_MEALY_EDGE_PARSER
public static final Function<Map<String,String>,Pair<@Nullable String,@Nullable String>> DEFAULT_MEALY_EDGE_PARSER
-
DEFAULT_MTS_EDGE_PARSER
public static final Function<Map<String,String>,MutableModalEdgeProperty> DEFAULT_MTS_EDGE_PARSER
Edge input parser that parses an edge'smodality
attribute and constructs a correspondingMutableModalEdgeProperty
. Throws anIllegalArgumentException
if the attribute is missing or doesn't match its expectedformat
.
-
-
Method Detail
-
dfa
public static DOTInputModelDeserializer<Integer,@Nullable String,CompactDFA<@Nullable String>> dfa()
Default parser forDFA
s serialized by AutomataLib.Invokes
dfa(Function, Function)
withDEFAULT_FSA_NODE_PARSER
asnodeParser
andDEFAULT_EDGE_PARSER
asedgeParser
.- Returns:
- a
DOTInputModelDeserializer
forCompactDFA
s.
-
dfa
public static <I> DOTInputModelDeserializer<Integer,I,CompactDFA<I>> dfa(Function<Map<String,String>,Boolean> nodeParser, Function<Map<String,String>,I> edgeParser)
Parser forDFA
s with custom node and edge attributes.Invokes
fsa(AutomatonCreator, Function, Function)
withCompactDFA.Creator
ascreator
.- Type Parameters:
I
- the input symbol type- Parameters:
nodeParser
- a node parser that decides for a property map of a node whether it is accepting or notedgeParser
- an edge parser that extracts from a property map of an edge the input symbol- Returns:
- a
DOTInputModelDeserializer
forCompactDFA
s.
-
nfa
public static DOTInputModelDeserializer<Integer,@Nullable String,CompactNFA<@Nullable String>> nfa()
Default parser forNFA
s serialized by AutomataLib.Invokes
nfa(Function, Function)
withDEFAULT_FSA_NODE_PARSER
asnodeParser
andDEFAULT_EDGE_PARSER
asedgeParser
.- Returns:
- a
DOTInputModelDeserializer
forCompactNFA
s.
-
nfa
public static <I> DOTInputModelDeserializer<Integer,I,CompactNFA<I>> nfa(Function<Map<String,String>,Boolean> nodeParser, Function<Map<String,String>,I> edgeParser)
Parser forNFA
s with custom node and edge attributes.Invokes
fsa(AutomatonCreator, Function, Function)
withCompactNFA.Creator
ascreator
.- Type Parameters:
I
- the input symbol type- Parameters:
nodeParser
- a node parser that decides for a property map of a node whether it is accepting or notedgeParser
- an edge parser that extracts from a property map of an edge the input symbol- Returns:
- a
DOTInputModelDeserializer
forCompactNFA
s.
-
fsa
public static <S,I,A extends MutableFSA<S,I>> DOTInputModelDeserializer<S,I,A> fsa(AutomatonCreator<A,I> creator, Function<Map<String,String>,Boolean> nodeParser, Function<Map<String,String>,I> edgeParser)
Parser forFiniteStateAcceptor
s with a custom automaton instance and custom node and edge attributes.Invokes
fsa(AutomatonCreator, Function, Function, Collection)
with AutomataLib's default initial state label "__start0
" asinitialNodeLabels
.- Type Parameters:
S
- the state type of the returned automatonI
- the input symbol typeA
- the type of the returned automaton- Parameters:
creator
- a creator that is used to instantiate the returned automatonnodeParser
- a node parser that decides for a property map of a node whether it is accepting or notedgeParser
- an edge parser that extracts from a property map of an edge the input symbol- Returns:
- a
DOTInputModelDeserializer
forA
s.
-
fsa
public static <S,I,A extends MutableFSA<S,I>> DOTInputModelDeserializer<S,I,A> fsa(AutomatonCreator<A,I> creator, Function<Map<String,String>,Boolean> nodeParser, Function<Map<String,String>,I> edgeParser, Collection<String> initialNodeIds)
Parser forFiniteStateAcceptor
s with a custom automaton instance, custom node and edge attributes and custom labels for the initial nodes.Invokes
fsa(AutomatonCreator, Function, Function, Collection, boolean)
withtrue
asfakeInitialNodeLabels
.- Type Parameters:
S
- the state type of the returned automatonI
- the input symbol typeA
- the type of the returned automaton- Parameters:
creator
- a creator that is used to instantiate the returned automatonnodeParser
- a node parser that decides for a property map of a node whether it is accepting or notedgeParser
- an edge parser that extracts from a property map of an edge the input symbolinitialNodeIds
- the ids of the initial nodes- Returns:
- a
DOTInputModelDeserializer
forA
s.
-
fsa
public static <S,I,A extends MutableFSA<S,I>> DOTInputModelDeserializer<S,I,A> fsa(AutomatonCreator<A,I> creator, Function<Map<String,String>,Boolean> nodeParser, Function<Map<String,String>,I> edgeParser, Collection<String> initialNodeIds, boolean fakeInitialNodeIds)
Parser forFiniteStateAcceptor
s with a custom automaton instance, custom node and edge attributes, custom labels for initial nodes and a flag whether the initial nodes are artificial.- Type Parameters:
S
- the state type of the returned automatonI
- the input symbol typeA
- the type of the returned automaton- Parameters:
creator
- a creator that is used to instantiate the returned automatonnodeParser
- a node parser that decides for a property map of a node whether it is accepting or notedgeParser
- an edge parser that extracts from a property map of an edge the input symbolinitialNodeIds
- the ids of the initial nodesfakeInitialNodeIds
- a flag indicating whether theinitialNodeIds
are artificial or not. Iftrue
, the nodes matching theinitialNodeIds
will not be added to the automaton. Instead, their direct successors will be initial states instead. This may be useful for instances where there are artificial nodes used to display in incoming arrow for the actual initial states. Iffalse
, the nodes matching theinitialNodeIds
will be used as initial nodes.- Returns:
- a
DOTInputModelDeserializer
forA
s.
-
mealy
public static DOTInputModelDeserializer<Integer,@Nullable String,CompactMealy<@Nullable String,@Nullable String>> mealy()
Default parser forMealyMachine
s serialized by AutomataLib.Invokes
mealy(Function)
withDEFAULT_MEALY_EDGE_PARSER
asedgeParser
.- Returns:
- a
DOTInputModelDeserializer
forCompactMealy
s.
-
mealy
public static <I,O> DOTInputModelDeserializer<Integer,I,CompactMealy<I,O>> mealy(Function<Map<String,String>,Pair<I,O>> edgeParser)
Parser forMealyMachine
s with custom edge attributes.Invokes
mealy(AutomatonCreator, Function)
withCompactMealy.Creator
ascreator
.- Type Parameters:
I
- the input symbol typeO
- the output symbol type- Parameters:
edgeParser
- an edge parser that extracts from a property map of an edge the input symbol and transition property- Returns:
- a
DOTInputModelDeserializer
forCompactMealy
s.
-
mealy
public static <S,I,O,A extends MutableMealyMachine<S,I,?,O>> DOTInputModelDeserializer<S,I,A> mealy(AutomatonCreator<A,I> creator, Function<Map<String,String>,Pair<I,O>> edgeParser)
Parser forMealyMachine
s with a custom automaton instance and custom edge attributes.Invokes
mealy(AutomatonCreator, Function, String)
with AutomataLib's default initial state label "__start0
" asinitialNodeLabel
.- Type Parameters:
S
- the state type of the returned automatonI
- the input symbol typeO
- the output symbol typeA
- the type of the returned automaton- Parameters:
creator
- a creator that is used to instantiate the returned automatonedgeParser
- an edge parser that extracts from a property map of an edge the input symbol and transition property- Returns:
- a
DOTInputModelDeserializer
forA
s.
-
mealy
public static <S,I,O,A extends MutableMealyMachine<S,I,?,O>> DOTInputModelDeserializer<S,I,A> mealy(AutomatonCreator<A,I> creator, Function<Map<String,String>,Pair<I,O>> edgeParser, String initialNodeId)
Parser forMealyMachine
s with a custom automaton instance, custom edge attributes and a custom label for the initial node.Invokes
fsa(AutomatonCreator, Function, Function, Collection, boolean)
withtrue
asfakeInitialNodeLabels
.- Type Parameters:
S
- the state type of the returned automatonI
- the input symbol typeO
- the output symbol typeA
- the type of the returned automaton- Parameters:
creator
- a creator that is used to instantiate the returned automatonedgeParser
- an edge parser that extracts from a property map of an edge the input symbol and transition propertyinitialNodeId
- the id of the initial node- Returns:
- a
DOTInputModelDeserializer
forA
s.
-
mealy
public static <S,I,O,A extends MutableMealyMachine<S,I,?,O>> DOTInputModelDeserializer<S,I,A> mealy(AutomatonCreator<A,I> creator, Function<Map<String,String>,Pair<I,O>> edgeParser, String initialNodeId, boolean fakeInitialNodeId)
Parser forMealyMachine
s with a custom automaton instance, custom edge attributes and a custom label for the initial node and a flag whether the initial nodes are artificial.- Type Parameters:
S
- the state type of the returned automatonI
- the input symbol typeO
- the output symbol typeA
- the type of the returned automaton- Parameters:
creator
- a creator that is used to instantiate the returned automatonedgeParser
- an edge parser that extracts from a property map of an edge the input symbol and transition propertyinitialNodeId
- the id of the initial nodefakeInitialNodeId
- a flag indicating whether theinitialNodeId
are artificial or not. Iftrue
, the nodes matching theinitialNodeId
will not be added to the automaton. Instead, their direct successors will be initial states instead. This may be useful for instances where there are artificial nodes used to display in incoming arrow for the actual initial states. Iffalse
, the nodes matching theinitialNodeId
will be used as initial nodes.- Returns:
- a
DOTInputModelDeserializer
forA
s.
-
moore
public static DOTInputModelDeserializer<Integer,@Nullable String,CompactMoore<@Nullable String,@Nullable String>> moore()
Default parser forMooreMachine
s serialized by AutomataLib.Invokes
moore(Function, Function)
withDEFAULT_MOORE_NODE_PARSER
asnodeParser
andDEFAULT_EDGE_PARSER
asedgeParser
.- Returns:
- a
DOTInputModelDeserializer
forCompactMoore
s.
-
moore
public static <I,O> DOTInputModelDeserializer<Integer,I,CompactMoore<I,O>> moore(Function<Map<String,String>,O> nodeParser, Function<Map<String,String>,I> edgeParser)
Parser forMooreMachine
s with custom node and edge attributes.Invokes
moore(AutomatonCreator, Function, Function)
withCompactMoore.Creator
ascreator
.- Type Parameters:
I
- the input symbol typeO
- the output symbol type- Parameters:
nodeParser
- a node parser that extracts from a property map of a node the state propertyedgeParser
- an edge parser that extracts from a property map of an edge the input symbol- Returns:
- a
DOTInputModelDeserializer
forCompactMoore
s.
-
moore
public static <S,I,O,A extends MutableMooreMachine<S,I,?,O>> DOTInputModelDeserializer<S,I,A> moore(AutomatonCreator<A,I> creator, Function<Map<String,String>,O> nodeParser, Function<Map<String,String>,I> edgeParser)
Parser forMooreMachine
s with a custom automaton instance and custom node and edge attributes.Invokes
moore(AutomatonCreator, Function, Function, String)
with AutomataLib's default initial state label "__start0
" asinitialNodeLabel
.- Type Parameters:
S
- the state type of the returned automatonI
- the input symbol typeO
- the output symbol typeA
- the type of the returned automaton- Parameters:
creator
- a creator that is used to instantiate the returned automatonnodeParser
- a node parser that extracts from a property map of a node the state propertyedgeParser
- an edge parser that extracts from a property map of an edge the input symbol- Returns:
- a
DOTInputModelDeserializer
forA
s.
-
moore
public static <S,I,O,A extends MutableMooreMachine<S,I,?,O>> DOTInputModelDeserializer<S,I,A> moore(AutomatonCreator<A,I> creator, Function<Map<String,String>,O> nodeParser, Function<Map<String,String>,I> edgeParser, String initialNodeId)
Parser forMooreMachine
s with a custom automaton instance, custom node and edge attributes and a custom label for the initial node.Invokes
moore(AutomatonCreator, Function, Function, String, boolean)
withtrue
asfakeInitialNodeLabel
.- Type Parameters:
S
- the state type of the returned automatonI
- the input symbol typeO
- the output symbol typeA
- the type of the returned automaton- Parameters:
creator
- a creator that is used to instantiate the returned automatonnodeParser
- a node parser that extracts from a property map of a node the state propertyedgeParser
- an edge parser that extracts from a property map of an edge the input symbolinitialNodeId
- the id of the initial node- Returns:
- a
DOTInputModelDeserializer
forA
s.
-
moore
public static <S,I,O,A extends MutableMooreMachine<S,I,?,O>> DOTInputModelDeserializer<S,I,A> moore(AutomatonCreator<A,I> creator, Function<Map<String,String>,O> nodeParser, Function<Map<String,String>,I> edgeParser, String initialNodeId, boolean fakeInitialNodeId)
Parser forMooreMachine
s with a custom automaton instance, custom node and edge attributes, a custom label for the initial node and a flag whether the initial node is artificial.- Type Parameters:
S
- the state type of the returned automatonI
- the input symbol typeO
- the output symbol typeA
- the type of the returned automaton- Parameters:
creator
- a creator that is used to instantiate the returned automatonnodeParser
- a node parser that extracts from a property map of a node the state propertyedgeParser
- an edge parser that extracts from a property map of an edge the input symbolinitialNodeId
- the id of the initial nodefakeInitialNodeId
- a flag indicating whether theinitialNodeId
are artificial or not. Iftrue
, the nodes matching theinitialNodeId
will not be added to the automaton. Instead, their direct successors will be initial states instead. This may be useful for instances where there are artificial nodes used to display in incoming arrow for the actual initial states. Iffalse
, the nodes matching theinitialNodeId
will be used as initial nodes.- Returns:
- a
DOTInputModelDeserializer
forA
s.
-
graph
public static ModelDeserializer<CompactGraph<@Nullable String,@Nullable String>> graph()
Default parser for (directed)Graph
s serialized by AutomataLib.Invokes
graph(Function, Function)
withDEFAULT_NODE_PARSER
asnodeParser
andDEFAULT_EDGE_PARSER
asedgeParser
.- Returns:
- a DOT
ModelDeserializer
forCompactGraph
s.
-
graph
public static <NP,EP> ModelDeserializer<CompactGraph<NP,EP>> graph(Function<Map<String,String>,NP> nodeParser, Function<Map<String,String>,EP> edgeParser)
Parser for (directed)Graph
s with custom node and edge attributes.Invokes
graph(Supplier, Function, Function)
withCompactGraph()
ascreator
.- Type Parameters:
NP
- the node property typeEP
- the edge property type- Parameters:
nodeParser
- a node parser that extracts from a property map of a node the node propertyedgeParser
- an edge parser that extracts from a property map of an edge the edge property- Returns:
- a DOT
ModelDeserializer
forCompactGraph
s.
-
graph
public static <NP,EP,G extends MutableGraph<?,?,NP,EP>> ModelDeserializer<G> graph(Supplier<G> creator, Function<Map<String,String>,NP> nodeParser, Function<Map<String,String>,EP> edgeParser)
Parser for (directed)Graph
s with a custom graph instance and custom node and edge attributes.- Type Parameters:
NP
- the node property typeEP
- the edge property typeG
- the graph type- Parameters:
creator
- a creator that is used to instantiate the returned graphnodeParser
- a node parser that extracts from a property map of a node the node propertyedgeParser
- an edge parser that extracts from a property map of an edge the edge property- Returns:
- a DOT
ModelDeserializer
forG
s.
-
mts
public static DOTInputModelDeserializer<Integer,@Nullable String,CompactMTS<@Nullable String>> mts()
Default parser forModalTransitionSystem
s serialized by AutomataLib.Invokes
mts(AutomatonCreator, Function, Function)
withCompactMTS(Alphabet)
ascreator
,DEFAULT_EDGE_PARSER
asinputParser
andDEFAULT_EDGE_PARSER
aspropertyParser
.- Returns:
- a
DOTInputModelDeserializer
forCompactMTS
s.
-
mts
public static <S,I,TP extends MutableModalEdgeProperty,M extends MutableModalTransitionSystem<S,I,?,TP>> DOTInputModelDeserializer<S,I,M> mts(AutomatonCreator<M,I> creator, Function<Map<String,String>,I> inputParser, Function<Map<String,String>,TP> propertyParser)
Parser forModalTransitionSystem
s with a custom MTS instance, custom input type and edge attributes parsers.Invokes
mts(AutomatonCreator, Function, Function, Collection)
with AutomataLib's default initial state label "__start0
" asinitialNodeLabel
.- Type Parameters:
S
- the state type of the returned MTSI
- the input symbol typeTP
- the modal transition propertyM
- the type of the returned MTS- Parameters:
creator
- a creator that is used to instantiate the returned graphinputParser
- an edge parser that extracts from a property map of an edge the input symbolpropertyParser
- an edge parser that extracts from a property map of an edge the modal transition property- Returns:
- a DOT
ModelDeserializer
forM
s.
-
mts
public static <S,I,TP extends MutableModalEdgeProperty,M extends MutableModalTransitionSystem<S,I,?,TP>> DOTInputModelDeserializer<S,I,M> mts(AutomatonCreator<M,I> creator, Function<Map<String,String>,I> inputParser, Function<Map<String,String>,TP> propertyParser, Collection<String> initialNodeIds)
Parser forModalTransitionSystem
s with a custom MTS instance, custom input type and edge attributes parsers and custom initial state labels.- Type Parameters:
S
- the state type of the returned MTSI
- the input symbol typeTP
- the modal transition propertyM
- the type of the returned MTS- Parameters:
creator
- a creator that is used to instantiate the returned graphinputParser
- an edge parser that extracts from a property map of an edge the input symbolpropertyParser
- an edge parser that extracts from a property map of an edge the modal transition propertyinitialNodeIds
- the ids of the initial nodes- Returns:
- a DOT
ModelDeserializer
forM
s.
-
-