From 04ccbfc8f949fecd28e508401eb8e3087d47ca2e Mon Sep 17 00:00:00 2001 From: Max Piskunov Date: Sun, 26 Jan 2025 22:30:58 -0800 Subject: [PATCH 1/2] Add alt text to all Yellowstone documentation pages --- Documentation/Generators/GenerateMultihistory.md | 8 ++++++-- .../Generators/GenerateSingleHistory.md | 14 ++++++++++++-- Documentation/Generators/MaxDestroyerEvents.md | 12 +++++++++--- Documentation/Generators/MaxEvents.md | 4 +++- Documentation/Generators/MaxGeneration.md | 8 ++++++-- Documentation/Generators/MinEventInputs.md | 8 ++++++-- Documentation/Generators/README.md | 14 ++++++++++++-- Documentation/Systems/AtomicStateSystem.md | 4 +++- .../Systems/MultisetSubstitutionSystem.md | 11 +++++++++-- Documentation/TypeSystem/$SetReplaceTypeGraph.md | 7 ++++++- Documentation/TypeSystem/$SetReplaceTypes.md | 6 +++++- Documentation/TypeSystem/SetReplaceObjectQ.md | 4 +++- Documentation/TypeSystem/SetReplaceObjectType.md | 7 ++++++- .../TypeSystem/SetReplaceTypeConvert.md | 16 ++++++++++++++-- .../Types/Multihistory/AtomicStateSystem0.md | 4 +++- .../Multihistory/MultisetSubstitutionSystem0.md | 4 +++- Documentation/Types/Multihistory/README.md | 4 +++- 17 files changed, 109 insertions(+), 26 deletions(-) diff --git a/Documentation/Generators/GenerateMultihistory.md b/Documentation/Generators/GenerateMultihistory.md index 095f5138..79b950ec 100644 --- a/Documentation/Generators/GenerateMultihistory.md +++ b/Documentation/Generators/GenerateMultihistory.md @@ -12,11 +12,15 @@ In[] := multihistory = GenerateMultihistory[ MultisetSubstitutionSystem[{a_, b_} :> {a + b}], MaxDestroyerEvents -> 3, MaxEvents -> 10] @ {1, 2, 3, 4} ``` - +Out[] = Multihistory[... MultisetSubstitutionSystem v0 ...] ```wl In[] := #["ExpressionsEventsGraph", VertexLabels -> Placed[Automatic, After]] & @ SetReplaceTypeConvert[WolframModelEvolutionObject] @ multihistory ``` - +Out[] = ... {1, 2} -> {3 (* token 5 *)}, {2, 1} -> {3 (* token 6 *)}, {1, 3 (* init *)} -> {4}, <<7>> ... diff --git a/Documentation/Generators/GenerateSingleHistory.md b/Documentation/Generators/GenerateSingleHistory.md index 56267c89..c76579d2 100644 --- a/Documentation/Generators/GenerateSingleHistory.md +++ b/Documentation/Generators/GenerateSingleHistory.md @@ -11,14 +11,24 @@ In[] := multihistory = GenerateSingleHistory[ MultisetSubstitutionSystem[{a_, b_} :> {a + b, a - b, a * b}], MaxEvents -> 10] @ {1, 2} ``` - +Out[] = Multihistory[... MultisetSubstitutionSystem v0 ...] ```wl In[] := #["ExpressionsEventsGraph", VertexLabels -> Placed[Automatic, After]] & @ SetReplaceTypeConvert[WolframModelEvolutionObject] @ multihistory ``` - +Out[] = ...
+       token-event graph where all tokens have out degrees less or equal than 1:
+       {1, 2 (* init *)} -> {3, -1, 2 (* gen 1 *)},
+       {3, -1} -> {2 (* gen 2 *), 4 (* gen 2 *), -3},
+       {2 (* gen 1 *), 2 (* gen 2 *)} -> {4 (* gen 3 sum *), 0, 4 (* gen 3 product *)},
+       <<7>>
+     ... Note that there is a distinction between single-history and single-path systems. Single-path systems are defined as ones where there is only one event possible from every state. A Turing machine would be an example of a single-path system. diff --git a/Documentation/Generators/MaxDestroyerEvents.md b/Documentation/Generators/MaxDestroyerEvents.md index 1e9b7e7c..fdf6d28c 100644 --- a/Documentation/Generators/MaxDestroyerEvents.md +++ b/Documentation/Generators/MaxDestroyerEvents.md @@ -10,7 +10,9 @@ In[] := #["ExpressionsEventsGraph", VertexLabels -> Placed[Automatic, After]] & GenerateMultihistory[MultisetSubstitutionSystem[{a_, b_} :> {a + b}], MaxDestroyerEvents -> 1] @ {1, 2, 3} ``` - +Out[] = ... {1, 2} -> {3 (* gen 1 *)}, {3 (* init *), 3 (* gen 1 *)} -> 6 ... If unset (which defaults to [`Infinity`](https://reference.wolfram.com/language/ref/Infinity.html)), it will generate a full multihistory object subject to other selection and stopping parameters: @@ -22,7 +24,9 @@ In[] := #["ExpressionsEventsGraph", VertexLabels -> Placed[Automatic, After]] & MultisetSubstitutionSystem[{a_, b_} :> {a + b}], MaxDestroyerEvents -> Infinity, MaxGeneration -> 1] @ {1, 2, 3} ``` - +Out[] = ... {1, 2} -> {3 (* 1 + 2 *)}, {2, 1} -> {3 (* 2 + 1 *)}, {1, 3 (* init *)} -> {4}, <<3>> ... If set to a finite number, it will generate a partial multihistory: @@ -32,6 +36,8 @@ In[] := #["ExpressionsEventsGraph", VertexLabels -> Placed[Automatic, After]] & GenerateMultihistory[MultisetSubstitutionSystem[{a_, b_} :> {a + b}], MaxDestroyerEvents -> 5] @ {1, 2, 3} ``` - +Out[] = ... token-event graph containing tokens with out degrees up to 5 ... Note that results generally depend on the event order in this case, similar to single histories. diff --git a/Documentation/Generators/MaxEvents.md b/Documentation/Generators/MaxEvents.md index de319417..12f4e39f 100644 --- a/Documentation/Generators/MaxEvents.md +++ b/Documentation/Generators/MaxEvents.md @@ -9,6 +9,8 @@ In[] := #["ExpressionsEventsGraph"] & @ GenerateMultihistory[MultisetSubstitutionSystem[{a_, b_} /; a < b :> {a + b}], MaxEvents -> 9] @ {1, 2, 3, 4} ``` - +Out[] = ... token-event graph with 9 events ... Compare to [`MaxGeneration`](MaxGeneration.md), which controls the depth of the evaluation instead. diff --git a/Documentation/Generators/MaxGeneration.md b/Documentation/Generators/MaxGeneration.md index 0f98f09e..11f073aa 100644 --- a/Documentation/Generators/MaxGeneration.md +++ b/Documentation/Generators/MaxGeneration.md @@ -19,7 +19,9 @@ In[] := #["ExpressionsEventsGraph", MaxEvents -> 3] @ {1, 2, 3} ``` - +Out[] = ... token-event graph with 9 tokens arranged in 3 layers, and 3 events in 2 layers in between ... Restricting the number of generations to one will prevent the last two events from occurring. Note, however, that another event is created instead: @@ -30,7 +32,9 @@ In[] := #["ExpressionsEventsGraph"] & @ SetReplaceTypeConvert[WolframModelEvolut MaxGeneration -> 1, MaxEvents -> 3] @ {1, 2, 3} ``` - +Out[] = ... token-event graph with 2 layers of tokens and a single layer of events ... `MaxGeneration` is an event selection parameter, not a stopping condition. That is, the evolution of the system won't stop if a match (tentative event) with a generation greater than the constraint is encountered. Instead, it will ignore diff --git a/Documentation/Generators/MinEventInputs.md b/Documentation/Generators/MinEventInputs.md index 3df2a702..72bde82d 100644 --- a/Documentation/Generators/MinEventInputs.md +++ b/Documentation/Generators/MinEventInputs.md @@ -12,7 +12,9 @@ In[] := #["ExpressionsEventsGraph", VertexLabels -> Placed[Automatic, After]] & MultisetSubstitutionSystem[{a___} :> {Total[{a}]}], MinEventInputs -> 0, MaxEvents -> 10] @ {1, 2, 3} ``` - +Out[] = ... {} -> {0}, {1 (* init *)} -> {1 (* gen 1 *)}, {2 (* init *)} -> {2 (* gen 1 *)}, <<7>> ... and `MinEventInputs -> 2`: @@ -23,4 +25,6 @@ In[] := #["ExpressionsEventsGraph", VertexLabels -> Placed[Automatic, After]] & MultisetSubstitutionSystem[{a___} :> {Total[{a}]}], MinEventInputs -> 2, MaxEvents -> 10] @ {1, 2, 3} ``` - +Out[] = ... {1, 2} -> {3 (* 1 + 2 *)}, {2, 1} -> {3 (* 2 + 1 *)}, {1, 3 (* init *)} -> {4}, <<7>> ... diff --git a/Documentation/Generators/README.md b/Documentation/Generators/README.md index fda37823..201fe277 100644 --- a/Documentation/Generators/README.md +++ b/Documentation/Generators/README.md @@ -26,7 +26,9 @@ In[] := #["ExpressionsEventsGraph", VertexLabels -> Placed[Automatic, After]] & GenerateSingleHistory[MultisetSubstitutionSystem[{a_, b_} /; a < b :> {a + b}]] @ {1, 2, 3, 4} ``` - +Out[] = ... {1, 2} -> {3 (* gen 1 *)}, {3 (* init *), 4} -> {7}, {3 (* gen 1 *), 7} -> {10} ... We can also use a more general [`GenerateMultihistory`](GenerateMultihistory.md) and specify [`MaxDestroyerEvents`](MaxDestroyerEvents.md) manually. @@ -38,7 +40,15 @@ In[] := #["ExpressionsEventsGraph", VertexLabels -> Placed[Automatic, After]] & MultisetSubstitutionSystem[{a_, b_} /; a < b :> {a + b}], MaxDestroyerEvents -> 2] @ {1, 2, 3, 4} ``` - +Out[] = ...
+       {1, 2} -> {3 (* gen 1 *)},
+       {1, 3 (* init *)} -> {4 (* gen 1 *)},
+       {2, 3 (* init *)} -> {5},
+       {3 (* gen 1 *), 4 (* init *)} -> {7},
+       {4 (* init *), 5} -> {9}
+     ... The same generators support multiple systems. In addition to [`MultisetSubstitutionSystem`](/Documentation/Systems/MultisetSubstitutionSystem.md), other examples include diff --git a/Documentation/Systems/AtomicStateSystem.md b/Documentation/Systems/AtomicStateSystem.md index c6a17132..86101118 100644 --- a/Documentation/Systems/AtomicStateSystem.md +++ b/Documentation/Systems/AtomicStateSystem.md @@ -9,7 +9,9 @@ In[] := #["ExpressionsEventsGraph", VertexLabels -> Placed[Automatic, After]] & GenerateMultihistory[AtomicStateSystem[{n_ :> n + 1, n_ :> n - 1}], MaxGeneration -> 4][0] ``` - +Out[] = ... 0 -> Rule 1 -> 1, 0 -> Rule 2 -> -1, 1 -> Rule 1 -> 2, <<26>>, -3 -> Rule 2 -> -4 ... Note that spacelike separation is not possible in the `AtomicStateSystem`. As a result, branching due to overlaps of different subsets of input tokens cannot occur. And, since events cannot produce branchlike-separated outputs and there diff --git a/Documentation/Systems/MultisetSubstitutionSystem.md b/Documentation/Systems/MultisetSubstitutionSystem.md index 4bc0d889..6ca6a2d7 100644 --- a/Documentation/Systems/MultisetSubstitutionSystem.md +++ b/Documentation/Systems/MultisetSubstitutionSystem.md @@ -22,7 +22,9 @@ In[] := #["ExpressionsEventsGraph", VertexLabels -> Placed[Automatic, After]] & GenerateSingleHistory[MultisetSubstitutionSystem[{a_, b_} /; a < b :> {a + b}]] @ {1, 2, 3, 4} ``` - +Out[] = ... {1, 2} -> {3 (* gen 1 *)}, {3 (* init *), 4} -> {7}, {3 (* gen 1 *), 7} -> {10} ... Arbitrary Wolfram Language patterns are supported including [conditions](https://reference.wolfram.com/language/ref/Condition.html) such as `{a_ /; a > 0, b_}` and @@ -38,7 +40,12 @@ In[] := #["ExpressionsEventsGraph", VertexLabels -> Placed[Automatic, After]] & MinEventInputs -> 2, MaxEventInputs -> 4] @ {1, 2, 3, 4} ``` - +Out[] = ...
+       generation 1: {1, 2} -> {3}, {1, 4} -> {5}, {2, 3} -> {5}, {3, 4} -> {7}, {1, 2, 4} -> {7},
+       generation 2: {2, 5} -> {7}, {3 (* gen 1 *), 4} -> {7}
+     ... Note, however, that the system cannot recognize if the code on the right-hand side is nondeterministic, so only the first output will be used for each assignment of pattern variables. diff --git a/Documentation/TypeSystem/$SetReplaceTypeGraph.md b/Documentation/TypeSystem/$SetReplaceTypeGraph.md index 7ea6c86c..b5e4a580 100644 --- a/Documentation/TypeSystem/$SetReplaceTypeGraph.md +++ b/Documentation/TypeSystem/$SetReplaceTypeGraph.md @@ -8,7 +8,12 @@ In[] := $SetReplaceTypeGraph ``` - +Out[] = ...
+       AtomicStateSystem v0 -> MultisetSubstitutionSystem v0,
+       MultisetSubstitutionSystem v0 -> WolframModelEvolutionObject v2
+     ... It is a [`Graph`](https://reference.wolfram.com/language/ref/Graph.html) representation of a directed hypergraph with types and properties as vertices and implementations of translations and properties as edges. diff --git a/Documentation/TypeSystem/$SetReplaceTypes.md b/Documentation/TypeSystem/$SetReplaceTypes.md index dbb53cf4..7abaded0 100644 --- a/Documentation/TypeSystem/$SetReplaceTypes.md +++ b/Documentation/TypeSystem/$SetReplaceTypes.md @@ -6,4 +6,8 @@ In[] := $SetReplaceTypes ``` - +Out[] = {
+       [... AtomicStateSystem v0 ...], [... MultisetSubstitutionSystem v0 ...], [... WolframModelEvolutionObject v2 ...]
+     } diff --git a/Documentation/TypeSystem/SetReplaceObjectQ.md b/Documentation/TypeSystem/SetReplaceObjectQ.md index 5ee491c9..7e7e82e3 100644 --- a/Documentation/TypeSystem/SetReplaceObjectQ.md +++ b/Documentation/TypeSystem/SetReplaceObjectQ.md @@ -3,7 +3,9 @@ **`SetReplaceObjectQ`** yields [`True`](https://reference.wolfram.com/language/ref/True.html) for *SetReplace* objects and [`False`](https://reference.wolfram.com/language/ref/False.html) otherwise: - +In[] := SetReplaceObjectQ @ Multihistory[... MultisetSubstitutionSystem v0 ...] ```wl Out[] = True diff --git a/Documentation/TypeSystem/SetReplaceObjectType.md b/Documentation/TypeSystem/SetReplaceObjectType.md index 458ed16f..59b5b5ad 100644 --- a/Documentation/TypeSystem/SetReplaceObjectType.md +++ b/Documentation/TypeSystem/SetReplaceObjectType.md @@ -3,4 +3,9 @@ **`SetReplaceObjectType`** yields [the type](/Documentation/Types/README.md) of an object. Note that the type specification usually contains its version: - +
+       In[] := SetReplaceObjectType @ Multihistory[... MultisetSubstitutionSystem v0 ...]
+       Out[] = [... MultisetSubstitutionSystem v0 ...]
+     diff --git a/Documentation/TypeSystem/SetReplaceTypeConvert.md b/Documentation/TypeSystem/SetReplaceTypeConvert.md index acfe2033..a81100f1 100644 --- a/Documentation/TypeSystem/SetReplaceTypeConvert.md +++ b/Documentation/TypeSystem/SetReplaceTypeConvert.md @@ -11,8 +11,20 @@ For example, one can convert an [`AtomicStateSystem` multihistory](/Documentation/Types/Multihistory/AtomicStateSystem0.md) to a [`MultisetSubstitutionSystem` multihistory](/Documentation/Types/Multihistory/MultisetSubstitutionSystem0.md): - +
+       In[] := SetReplaceTypeConvert[MultisetSubstitutionSystem] @ Multihistory[... AtomicStateSystem v0 ...]
+       Out[] = Multihistory[... MultisetSubstitutionSystem v0 ...]
+     To convert to a specific version of a type, one can use the full type specification: - +
+       In[] := SetReplaceTypeConvert[
+         SetReplaceType[MultisetSubstitutionSystem, 0]
+       ] @ Multihistory[... AtomicStateSystem v0 ...]
+       Out[] = Multihistory[... MultisetSubstitutionSystem v0 ...]
+     diff --git a/Documentation/Types/Multihistory/AtomicStateSystem0.md b/Documentation/Types/Multihistory/AtomicStateSystem0.md index 3a42eb16..9adc75ae 100644 --- a/Documentation/Types/Multihistory/AtomicStateSystem0.md +++ b/Documentation/Types/Multihistory/AtomicStateSystem0.md @@ -8,7 +8,9 @@ In[] := GenerateMultihistory[AtomicStateSystem[a_ :> a + 1], MaxEvents -> 10][0] ``` - +Out[] = Multihistory[... AtomicStateSystem v0 ...] Internally, [`AtomicStateSystem`](/Documentation/Systems/AtomicStateSystem.md) is implemented by running a special case of the [`MultisetSubstitutionSystem`](/Documentation/Systems/MultisetSubstitutionSystem.md). The object contains a diff --git a/Documentation/Types/Multihistory/MultisetSubstitutionSystem0.md b/Documentation/Types/Multihistory/MultisetSubstitutionSystem0.md index e1cc0778..fdcb1321 100644 --- a/Documentation/Types/Multihistory/MultisetSubstitutionSystem0.md +++ b/Documentation/Types/Multihistory/MultisetSubstitutionSystem0.md @@ -8,7 +8,9 @@ object is returned by [generators](/Documentation/Generators/README.md) of the In[] := GenerateMultihistory[MultisetSubstitutionSystem[{a_, b_} :> {a + b}], MaxEvents -> 10] @ {1, 2, 3} ``` - +Out[] = Multihistory[... MultisetSubstitutionSystem v0 ...] It is implemented as an [`Association`](https://reference.wolfram.com/language/guide/Associations.html) of [data structures](https://reference.wolfram.com/language/ref/DataStructure.html) containing information about the rules, diff --git a/Documentation/Types/Multihistory/README.md b/Documentation/Types/Multihistory/README.md index 0402f7a1..038fb979 100644 --- a/Documentation/Types/Multihistory/README.md +++ b/Documentation/Types/Multihistory/README.md @@ -9,7 +9,9 @@ For example, for a [`MultisetSubstitutionSystem`](/Documentation/Systems/Multise In[] := GenerateMultihistory[MultisetSubstitutionSystem[{a_, b_} :> {a + b}], MaxEvents -> 10] @ {1, 2, 3} ``` - +Out[] = Multihistory[... MultisetSubstitutionSystem v0 ...] You will be able to use [`properties`](/Documentation/Properties/README.md) to extract information about multihistories, but we have not implemented any properties yet. From 87a92210f27ee7957b64f479e694711e84da8f06 Mon Sep 17 00:00:00 2001 From: Max Piskunov Date: Sat, 8 Feb 2025 19:48:22 -0800 Subject: [PATCH 2/2] Add explicit heads --- Documentation/Generators/GenerateMultihistory.md | 4 +++- Documentation/Generators/GenerateSingleHistory.md | 4 ++-- Documentation/Generators/MaxDestroyerEvents.md | 6 +++--- Documentation/Generators/MaxEvents.md | 2 +- Documentation/Generators/MaxGeneration.md | 6 ++++-- Documentation/Generators/MinEventInputs.md | 6 ++++-- Documentation/Generators/README.md | 6 +++--- Documentation/Systems/AtomicStateSystem.md | 2 +- Documentation/Systems/MultisetSubstitutionSystem.md | 6 +++--- Documentation/TypeSystem/$SetReplaceTypeGraph.md | 4 ++-- Documentation/TypeSystem/$SetReplaceTypes.md | 4 +++- Documentation/TypeSystem/SetReplaceObjectType.md | 2 +- 12 files changed, 30 insertions(+), 22 deletions(-) diff --git a/Documentation/Generators/GenerateMultihistory.md b/Documentation/Generators/GenerateMultihistory.md index 79b950ec..b36bec2e 100644 --- a/Documentation/Generators/GenerateMultihistory.md +++ b/Documentation/Generators/GenerateMultihistory.md @@ -23,4 +23,6 @@ In[] := #["ExpressionsEventsGraph", VertexLabels -> Placed[Automatic, After]] & Out[] = ... {1, 2} -> {3 (* token 5 *)}, {2, 1} -> {3 (* token 6 *)}, {1, 3 (* init *)} -> {4}, <<7>> ... + alt="Out[] = Graph[... + {1, 2} -> {3 (* token 5 *)}, {2, 1} -> {3 (* token 6 *)}, {1, 3 (* init *)} -> {4}, <<7>> + ...]"> diff --git a/Documentation/Generators/GenerateSingleHistory.md b/Documentation/Generators/GenerateSingleHistory.md index c76579d2..264f1f22 100644 --- a/Documentation/Generators/GenerateSingleHistory.md +++ b/Documentation/Generators/GenerateSingleHistory.md @@ -22,13 +22,13 @@ In[] := #["ExpressionsEventsGraph", VertexLabels -> Placed[Automatic, After]] & Out[] = ...
+     alt= {3, -1, 2 (* gen 1 *)}, {3, -1} -> {2 (* gen 2 *), 4 (* gen 2 *), -3}, {2 (* gen 1 *), 2 (* gen 2 *)} -> {4 (* gen 3 sum *), 0, 4 (* gen 3 product *)}, <<7>> - ..."> + ...]"> Note that there is a distinction between single-history and single-path systems. Single-path systems are defined as ones where there is only one event possible from every state. A Turing machine would be an example of a single-path system. diff --git a/Documentation/Generators/MaxDestroyerEvents.md b/Documentation/Generators/MaxDestroyerEvents.md index fdf6d28c..4f5e2325 100644 --- a/Documentation/Generators/MaxDestroyerEvents.md +++ b/Documentation/Generators/MaxDestroyerEvents.md @@ -12,7 +12,7 @@ In[] := #["ExpressionsEventsGraph", VertexLabels -> Placed[Automatic, After]] & Out[] = ... {1, 2} -> {3 (* gen 1 *)}, {3 (* init *), 3 (* gen 1 *)} -> 6 ... + alt="Out[] = Graph[... {1, 2} -> {3 (* gen 1 *)}, {3 (* init *), 3 (* gen 1 *)} -> 6 ...]"> If unset (which defaults to [`Infinity`](https://reference.wolfram.com/language/ref/Infinity.html)), it will generate a full multihistory object subject to other selection and stopping parameters: @@ -26,7 +26,7 @@ In[] := #["ExpressionsEventsGraph", VertexLabels -> Placed[Automatic, After]] & Out[] = ... {1, 2} -> {3 (* 1 + 2 *)}, {2, 1} -> {3 (* 2 + 1 *)}, {1, 3 (* init *)} -> {4}, <<3>> ... + alt="Out[] = Graph[... {1, 2} -> {3 (* 1 + 2 *)}, {2, 1} -> {3 (* 2 + 1 *)}, {1, 3 (* init *)} -> {4}, <<3>> ...]"> If set to a finite number, it will generate a partial multihistory: @@ -38,6 +38,6 @@ In[] := #["ExpressionsEventsGraph", VertexLabels -> Placed[Automatic, After]] & Out[] = ... token-event graph containing tokens with out degrees up to 5 ... + alt="Out[] = Graph[... token-event graph containing tokens with out degrees up to 5 ...]"> Note that results generally depend on the event order in this case, similar to single histories. diff --git a/Documentation/Generators/MaxEvents.md b/Documentation/Generators/MaxEvents.md index 12f4e39f..5550029f 100644 --- a/Documentation/Generators/MaxEvents.md +++ b/Documentation/Generators/MaxEvents.md @@ -11,6 +11,6 @@ In[] := #["ExpressionsEventsGraph"] & @ Out[] = ... token-event graph with 9 events ... + alt="Out[] = Graph[... token-event graph with 9 events ...]"> Compare to [`MaxGeneration`](MaxGeneration.md), which controls the depth of the evaluation instead. diff --git a/Documentation/Generators/MaxGeneration.md b/Documentation/Generators/MaxGeneration.md index 11f073aa..5e16baca 100644 --- a/Documentation/Generators/MaxGeneration.md +++ b/Documentation/Generators/MaxGeneration.md @@ -21,7 +21,9 @@ In[] := #["ExpressionsEventsGraph", Out[] = ... token-event graph with 9 tokens arranged in 3 layers, and 3 events in 2 layers in between ... + alt="Out[] = Graph[... + token-event graph with 9 tokens arranged in 3 layers, and 3 events in 2 layers in between + ...]"> Restricting the number of generations to one will prevent the last two events from occurring. Note, however, that another event is created instead: @@ -34,7 +36,7 @@ In[] := #["ExpressionsEventsGraph"] & @ SetReplaceTypeConvert[WolframModelEvolut Out[] = ... token-event graph with 2 layers of tokens and a single layer of events ... + alt="Out[] = Graph[... token-event graph with 2 layers of tokens and a single layer of events ...]"> `MaxGeneration` is an event selection parameter, not a stopping condition. That is, the evolution of the system won't stop if a match (tentative event) with a generation greater than the constraint is encountered. Instead, it will ignore diff --git a/Documentation/Generators/MinEventInputs.md b/Documentation/Generators/MinEventInputs.md index 72bde82d..7f49aaf3 100644 --- a/Documentation/Generators/MinEventInputs.md +++ b/Documentation/Generators/MinEventInputs.md @@ -14,7 +14,9 @@ In[] := #["ExpressionsEventsGraph", VertexLabels -> Placed[Automatic, After]] & Out[] = ... {} -> {0}, {1 (* init *)} -> {1 (* gen 1 *)}, {2 (* init *)} -> {2 (* gen 1 *)}, <<7>> ... + alt="Out[] = Graph[... + {} -> {0}, {1 (* init *)} -> {1 (* gen 1 *)}, {2 (* init *)} -> {2 (* gen 1 *)}, <<7>> + ...]"> and `MinEventInputs -> 2`: @@ -27,4 +29,4 @@ In[] := #["ExpressionsEventsGraph", VertexLabels -> Placed[Automatic, After]] & Out[] = ... {1, 2} -> {3 (* 1 + 2 *)}, {2, 1} -> {3 (* 2 + 1 *)}, {1, 3 (* init *)} -> {4}, <<7>> ... + alt="Out[] = Graph[... {1, 2} -> {3 (* 1 + 2 *)}, {2, 1} -> {3 (* 2 + 1 *)}, {1, 3 (* init *)} -> {4}, <<7>> ...]"> diff --git a/Documentation/Generators/README.md b/Documentation/Generators/README.md index 201fe277..8357c384 100644 --- a/Documentation/Generators/README.md +++ b/Documentation/Generators/README.md @@ -28,7 +28,7 @@ In[] := #["ExpressionsEventsGraph", VertexLabels -> Placed[Automatic, After]] & Out[] = ... {1, 2} -> {3 (* gen 1 *)}, {3 (* init *), 4} -> {7}, {3 (* gen 1 *), 7} -> {10} ... + alt="Out[] = Graph[... {1, 2} -> {3 (* gen 1 *)}, {3 (* init *), 4} -> {7}, {3 (* gen 1 *), 7} -> {10} ...]"> We can also use a more general [`GenerateMultihistory`](GenerateMultihistory.md) and specify [`MaxDestroyerEvents`](MaxDestroyerEvents.md) manually. @@ -42,13 +42,13 @@ In[] := #["ExpressionsEventsGraph", VertexLabels -> Placed[Automatic, After]] & Out[] = ...
+     alt= {3 (* gen 1 *)}, {1, 3 (* init *)} -> {4 (* gen 1 *)}, {2, 3 (* init *)} -> {5}, {3 (* gen 1 *), 4 (* init *)} -> {7}, {4 (* init *), 5} -> {9} - ..."> + ...]"> The same generators support multiple systems. In addition to [`MultisetSubstitutionSystem`](/Documentation/Systems/MultisetSubstitutionSystem.md), other examples include diff --git a/Documentation/Systems/AtomicStateSystem.md b/Documentation/Systems/AtomicStateSystem.md index 86101118..5bcbd1a2 100644 --- a/Documentation/Systems/AtomicStateSystem.md +++ b/Documentation/Systems/AtomicStateSystem.md @@ -11,7 +11,7 @@ In[] := #["ExpressionsEventsGraph", VertexLabels -> Placed[Automatic, After]] & Out[] = ... 0 -> Rule 1 -> 1, 0 -> Rule 2 -> -1, 1 -> Rule 1 -> 2, <<26>>, -3 -> Rule 2 -> -4 ... + alt="Out[] = Graph[... 0 -> Rule 1 -> 1, 0 -> Rule 2 -> -1, 1 -> Rule 1 -> 2, <<26>>, -3 -> Rule 2 -> -4 ...]"> Note that spacelike separation is not possible in the `AtomicStateSystem`. As a result, branching due to overlaps of different subsets of input tokens cannot occur. And, since events cannot produce branchlike-separated outputs and there diff --git a/Documentation/Systems/MultisetSubstitutionSystem.md b/Documentation/Systems/MultisetSubstitutionSystem.md index 6ca6a2d7..18860ee3 100644 --- a/Documentation/Systems/MultisetSubstitutionSystem.md +++ b/Documentation/Systems/MultisetSubstitutionSystem.md @@ -24,7 +24,7 @@ In[] := #["ExpressionsEventsGraph", VertexLabels -> Placed[Automatic, After]] & Out[] = ... {1, 2} -> {3 (* gen 1 *)}, {3 (* init *), 4} -> {7}, {3 (* gen 1 *), 7} -> {10} ... + alt="Out[] = Graph[... {1, 2} -> {3 (* gen 1 *)}, {3 (* init *), 4} -> {7}, {3 (* gen 1 *), 7} -> {10} ...]"> Arbitrary Wolfram Language patterns are supported including [conditions](https://reference.wolfram.com/language/ref/Condition.html) such as `{a_ /; a > 0, b_}` and @@ -42,10 +42,10 @@ In[] := #["ExpressionsEventsGraph", VertexLabels -> Placed[Automatic, After]] & Out[] = ...
+     alt= {3}, {1, 4} -> {5}, {2, 3} -> {5}, {3, 4} -> {7}, {1, 2, 4} -> {7}, generation 2: {2, 5} -> {7}, {3 (* gen 1 *), 4} -> {7} - ..."> + ...]"> Note, however, that the system cannot recognize if the code on the right-hand side is nondeterministic, so only the first output will be used for each assignment of pattern variables. diff --git a/Documentation/TypeSystem/$SetReplaceTypeGraph.md b/Documentation/TypeSystem/$SetReplaceTypeGraph.md index b5e4a580..9ccc95c7 100644 --- a/Documentation/TypeSystem/$SetReplaceTypeGraph.md +++ b/Documentation/TypeSystem/$SetReplaceTypeGraph.md @@ -10,10 +10,10 @@ In[] := $SetReplaceTypeGraph Out[] = ...
+     alt= MultisetSubstitutionSystem v0, MultisetSubstitutionSystem v0 -> WolframModelEvolutionObject v2 - ..."> + ...]"> It is a [`Graph`](https://reference.wolfram.com/language/ref/Graph.html) representation of a directed hypergraph with types and properties as vertices and implementations of translations and properties as edges. diff --git a/Documentation/TypeSystem/$SetReplaceTypes.md b/Documentation/TypeSystem/$SetReplaceTypes.md index 7abaded0..b95237fd 100644 --- a/Documentation/TypeSystem/$SetReplaceTypes.md +++ b/Documentation/TypeSystem/$SetReplaceTypes.md @@ -9,5 +9,7 @@ In[] := $SetReplaceTypes Out[] = {
-       [... AtomicStateSystem v0 ...], [... MultisetSubstitutionSystem v0 ...], [... WolframModelEvolutionObject v2 ...]
+       SetReplaceType[... AtomicStateSystem v0 ...],
+       SetReplaceType[... MultisetSubstitutionSystem v0 ...],
+       SetReplaceType[... WolframModelEvolutionObject v2 ...]
      } diff --git a/Documentation/TypeSystem/SetReplaceObjectType.md b/Documentation/TypeSystem/SetReplaceObjectType.md index 59b5b5ad..d88506d8 100644 --- a/Documentation/TypeSystem/SetReplaceObjectType.md +++ b/Documentation/TypeSystem/SetReplaceObjectType.md @@ -7,5 +7,5 @@ specification usually contains its version: width="628.2" alt=" In[] := SetReplaceObjectType @ Multihistory[... MultisetSubstitutionSystem v0 ...] - Out[] = [... MultisetSubstitutionSystem v0 ...] + Out[] = SetReplaceType[... MultisetSubstitutionSystem v0 ...] ">