Closed maxitg closed 3 years ago
An ordered list of tokens is not sufficient for describing a match in a MultisetSubstitutionSystem. For example, the following misses the match corresponding to {a -> Sequence[1, 2], b -> 3}:
MultisetSubstitutionSystem
{a -> Sequence[1, 2], b -> 3}
In[] := #["ExpressionsEventsGraph", VertexLabels -> Automatic] &@ SetReplaceTypeConvert[{WolframModelEvolutionObject, 2}]@ GenerateMultihistory[ MultisetSubstitutionSystem[{a__, b__} /; OrderedQ[{a, b}] :> {{a}, {b}}], {"MaxGeneration" -> 1, "MinEventInputs" -> 3, "MaxEventInputs" -> 3}, None, {"InputCount", "SortedInputTokenIndices", "InputTokenIndices", "RuleIndex"}, {}][{1, 2, 3}]
The system should generate two matches.
In[] := SystemInformation["Small"] Out[] = {"Kernel" -> {"SystemID" -> "MacOSX-x86-64", "ReleaseID" -> "12.2.0.0 (7198639, 202012124634)", "CreationDate" -> DateObject[{2020, 12, 12, 15, 32, 16}, "Instant", "Gregorian", -5.]}, "FrontEnd" -> {"OperatingSystem" -> "MacOSX", "ReleaseID" -> "12.2.0.0 (7198639, 202012121918)", "CreationDate" -> DateObject[{2020, 12, 12, 15, 31, 58}, "Instant", "Gregorian", -5.]}}
In[] := $SetReplaceGitSHA
0bbd86717b3e76cf86f91812a6ada000e13d58e7
This requires some rethinking of the multihistory data structure.
The problem
An ordered list of tokens is not sufficient for describing a match in a
MultisetSubstitutionSystem
. For example, the following misses the match corresponding to{a -> Sequence[1, 2], b -> 3}
:Expected behavior
The system should generate two matches.
Version
0bbd86717b3e76cf86f91812a6ada000e13d58e7
Additional context
This requires some rethinking of the multihistory data structure.