MultiwaySystem[WolframModel[{{XXXXX}}],init,7]

State evolution API

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

StateUnionFunction: Given a list of states, what is their union, taking account of equivalence

For strings:
Union
For hypergraphs:
Union[XXXX,SameTestIsomorphicHypergraphQ]

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

Design

<|"StateEvolutionFunction"XXX,"StateEquivalenceFunction"XXXX,"StateEventFunction"XXXXX|>
In[]:=
Catenate[{{{a,b},{x,y}},{{c,d}}}]
Out[]=
{{a,b},{x,y},{c,d}}
OSZAR »