MultiwaySystem[WolframModel[{{XXXXX}}],init,7]
State evolution API
State evolution API
StateEvolutionFunction : Given a state, get a list of all new states
StateEvolutionFunction : Given a state, get a list of all new states
For strings:
Flatten[StringReplaceList[state,rules]]
In[]:=
Flatten[StringReplaceList[{"AAABBB"},{"AB""BA","BA""AB"}]]
Out[]=
{AABABB}
For Wolfram models / aka hypergraph replacements:
WolframModelMultiwayStep[rule,state]
StateEquivalenceFunction: Given two states, are they equivalent
StateEquivalenceFunction: Given two states, are they equivalent
StateUnionFunction: Given a list of states, what is their union, taking account of equivalence
StateUnionFunction: Given a list of states, what is their union, taking account of equivalence
For strings:
Union
For hypergraphs:
Union[XXXX,SameTestIsomorphicHypergraphQ]
Events APIs
Events APIs
For strings, events are specified by:
MultiwaySystem[{"A""AA"},{"AAA"},2,"TracedStatesList"]
An event is specified as: {stringprefix,rule,stringsuffix}
But the following might be better: {rule, {prefix,suffix}}
For hypergraph:
{instantiated rule, rest of hypergraph}
[ for this case, the labels of the instantiation actually define everything ]
StateEventFunction : For a given state, find all events from that state
StateEventFunction : For a given state, find all events from that state
Design
Design
<|"StateEvolutionFunction"XXX,"StateEquivalenceFunction"XXXX,"StateEventFunction"XXXXX|>
In[]:=
Catenate[{{{a,b},{x,y}},{{c,d}}}]
Out[]=
{{a,b},{x,y},{c,d}}