Skip to content

Commit 2d4ddae

Browse files
authored
Type versions (#662)
## Changes * Expands `SetReplaceType` to now accept up to two arguments: `SetReplaceType[name, version]`. * It is now used not only in type graphs but everywhere: `SetReplaceObjectType` returns it, `Multihistory` types use it, etc. * `objectType` can return types wrapped in `SetReplaceType` or not. However, types will be wrapped automatically once they reach any user-facing functions or other declarations such as `declareTypeTranslation` (in other words, `SetReplaceType[name]` can be used interchangeably with `name`). * There are custom boxes for `SetReplaceType`: <img width="204" alt="image" src="https://user-images.githubusercontent.com/1479325/126881425-682b4fdc-c477-4715-a488-a339dfe30268.png"> * `SetReplaceTypeConvert` can accept types without versions, e.g., `SetReplaceTypeConvert[WolframModelEvolutionObject] @ object`. In this case, the latest known type is used. ## Comments * It is a bit awkward (although somewhat unrelated to this PR) that multihistory types use the same symbols as corresponding systems. One would think it would make more sense to use types like `MultisetSubstitutionMultihistory`, etc. However, if we do that, `Multihistory` will look weird because the word 'multihistory' will be repeated twice: in the `Head` and in the top raw of the object details: <img width="363" alt="image" src="https://user-images.githubusercontent.com/1479325/125516165-a7346320-a2be-422a-9a39-74e99a3806a0.png"> We can alternatively move that name to the 'Head' part <img width="359" alt="image" src="https://user-images.githubusercontent.com/1479325/125516437-809ded5a-0068-410a-8035-2b592c906bea.png"> but I think we want to keep the head in boxes consistent with the real head. If we then do in fact use different heads for different multihistories, it will make them harder to implement, since one will have to implement `objectType`, usage, etc. for each one. So, given all that, I'm keeping the type names the same. * [Done] Should we add any extra styling to the boxes so that it does not look exactly like the original type name, especially if no version is specified? <img width="856" alt="image" src="https://user-images.githubusercontent.com/1479325/125516814-5d1663a4-e133-43b9-b78d-4ce1488b38ad.png"> ## Examples * Types now have the new formatting everywhere: <img width="524" alt="image" src="https://user-images.githubusercontent.com/1479325/125516928-61795c05-10aa-48e5-ba89-a728797f2757.png"> * Even in `$SetReplaceTypeGraph`: ```wl In[] := $SetReplaceTypeGraph ``` <img width="734" alt="image" src="https://user-images.githubusercontent.com/1479325/125516996-68875f5e-1dd4-48b7-b9da-7362cb837c3a.png"> * And conversions can be done without specifying a version: <img width="759" alt="image" src="https://user-images.githubusercontent.com/1479325/125517131-d43c079e-50e4-42d7-b7f8-e966d83f704f.png"> * Although specifying the version explicitly is still allowed: <img width="586" alt="image" src="https://user-images.githubusercontent.com/1479325/125517270-f9f8fda1-cb23-4c30-8d8c-6e5837618d81.png">
1 parent 6802e3a commit 2d4ddae

35 files changed

+176
-77
lines changed

Documentation/Generators/GenerateMultihistory.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ In[] := multihistory = GenerateMultihistory[
1212
MultisetSubstitutionSystem[{a_, b_} :> {a + b}], MaxDestroyerEvents -> 3, MaxEvents -> 10] @ {1, 2, 3, 4}
1313
```
1414

15-
<img src="/Documentation/Images/MultisetMultihistory.png" width="472.2">
15+
<img src="/Documentation/Images/MultisetMultihistory.png" width="426.6">
1616

1717
```wl
1818
In[] := #["ExpressionsEventsGraph", VertexLabels -> Placed[Automatic, After]] & @
19-
SetReplaceTypeConvert[{WolframModelEvolutionObject, 2}] @ multihistory
19+
SetReplaceTypeConvert[WolframModelEvolutionObject] @ multihistory
2020
```
2121

2222
<img src="/Documentation/Images/GenerateMultihistoryExample.png" width="478.2">

Documentation/Generators/GenerateSingleHistory.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ In[] := multihistory = GenerateSingleHistory[
1111
MultisetSubstitutionSystem[{a_, b_} :> {a + b, a - b, a * b}], MaxEvents -> 10] @ {1, 2}
1212
```
1313

14-
<img src="/Documentation/Images/MultisetMultihistory.png" width="472.2">
14+
<img src="/Documentation/Images/MultisetMultihistory.png" width="426.6">
1515

1616
```wl
1717
In[] := #["ExpressionsEventsGraph", VertexLabels -> Placed[Automatic, After]] & @
18-
SetReplaceTypeConvert[{WolframModelEvolutionObject, 2}] @ multihistory
18+
SetReplaceTypeConvert[WolframModelEvolutionObject] @ multihistory
1919
```
2020

2121
<img src="/Documentation/Images/GenerateSingleHistoryExample.png" width="478.2">

Documentation/Generators/MaxDestroyerEvents.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ setting `MaxDestroyerEvents` to one.
66

77
```wl
88
In[] := #["ExpressionsEventsGraph", VertexLabels -> Placed[Automatic, After]] & @
9-
SetReplaceTypeConvert[{WolframModelEvolutionObject, 2}] @
9+
SetReplaceTypeConvert[WolframModelEvolutionObject] @
1010
GenerateMultihistory[MultisetSubstitutionSystem[{a_, b_} :> {a + b}], MaxDestroyerEvents -> 1] @ {1, 2, 3}
1111
```
1212

@@ -17,7 +17,7 @@ full multihistory object subject to other selection and stopping parameters:
1717

1818
```wl
1919
In[] := #["ExpressionsEventsGraph", VertexLabels -> Placed[Automatic, After]] & @
20-
SetReplaceTypeConvert[{WolframModelEvolutionObject, 2}] @
20+
SetReplaceTypeConvert[WolframModelEvolutionObject] @
2121
GenerateMultihistory[
2222
MultisetSubstitutionSystem[{a_, b_} :> {a + b}], MaxDestroyerEvents -> Infinity, MaxGeneration -> 1] @ {1, 2, 3}
2323
```
@@ -28,7 +28,7 @@ If set to a finite number, it will generate a partial multihistory:
2828

2929
```wl
3030
In[] := #["ExpressionsEventsGraph", VertexLabels -> Placed[Automatic, After]] & @
31-
SetReplaceTypeConvert[{WolframModelEvolutionObject, 2}] @
31+
SetReplaceTypeConvert[WolframModelEvolutionObject] @
3232
GenerateMultihistory[MultisetSubstitutionSystem[{a_, b_} :> {a + b}], MaxDestroyerEvents -> 5] @ {1, 2, 3}
3333
```
3434

Documentation/Generators/MaxEvents.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
```wl
77
In[] := #["ExpressionsEventsGraph"] & @
8-
SetReplaceTypeConvert[{WolframModelEvolutionObject, 2}] @
8+
SetReplaceTypeConvert[WolframModelEvolutionObject] @
99
GenerateMultihistory[MultisetSubstitutionSystem[{a_, b_} /; a < b :> {a + b}], MaxEvents -> 9] @ {1, 2, 3, 4}
1010
```
1111

Documentation/Generators/MaxGeneration.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ generations. In the following example, the tokens and events are labeled with th
1414
In[] := #["ExpressionsEventsGraph",
1515
VertexLabels -> Placed["Name", After, Replace[{{"Expression", n_} :> #["ExpressionGenerations"][[n]],
1616
{"Event", n_} :> #["EventGenerations"][[n]]}]]] & @
17-
SetReplaceTypeConvert[{WolframModelEvolutionObject, 2}] @
17+
SetReplaceTypeConvert[WolframModelEvolutionObject] @
1818
GenerateMultihistory[MultisetSubstitutionSystem[{a__} /; Total[{a}] == 5 :> {Total[{a}] - 1, Total[{a}] + 1}],
1919
MaxEvents -> 3] @ {1, 2, 3}
2020
```
@@ -25,7 +25,7 @@ Restricting the number of generations to one will prevent the last two events fr
2525
another event is created instead:
2626

2727
```wl
28-
In[] := #["ExpressionsEventsGraph"] & @ SetReplaceTypeConvert[{WolframModelEvolutionObject, 2}] @
28+
In[] := #["ExpressionsEventsGraph"] & @ SetReplaceTypeConvert[WolframModelEvolutionObject] @
2929
GenerateMultihistory[MultisetSubstitutionSystem[{a__} /; Total[{a}] == 5 :> {Total[{a}] - 1, Total[{a}] + 1}],
3030
MaxGeneration -> 1, MaxEvents -> 3] @ {1, 2, 3}
3131
```

Documentation/Generators/MinEventInputs.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Compare, for example, `MinEventInputs -> 0` (default):
77

88
```wl
99
In[] := #["ExpressionsEventsGraph", VertexLabels -> Placed[Automatic, After]] & @
10-
SetReplaceTypeConvert[{WolframModelEvolutionObject, 2}] @
10+
SetReplaceTypeConvert[WolframModelEvolutionObject] @
1111
GenerateMultihistory[
1212
MultisetSubstitutionSystem[{a___} :> {Total[{a}]}], MinEventInputs -> 0, MaxEvents -> 10] @ {1, 2, 3}
1313
```
@@ -18,7 +18,7 @@ and `MinEventInputs -> 2`:
1818

1919
```wl
2020
In[] := #["ExpressionsEventsGraph", VertexLabels -> Placed[Automatic, After]] & @
21-
SetReplaceTypeConvert[{WolframModelEvolutionObject, 2}] @
21+
SetReplaceTypeConvert[WolframModelEvolutionObject] @
2222
GenerateMultihistory[
2323
MultisetSubstitutionSystem[{a___} :> {Total[{a}]}], MinEventInputs -> 2, MaxEvents -> 10] @ {1, 2, 3}
2424
```

Documentation/Generators/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ For example, [`GenerateSingleHistory`](GenerateSingleHistory.md) corresponds to
2222

2323
```wl
2424
In[] := #["ExpressionsEventsGraph", VertexLabels -> Placed[Automatic, After]] & @
25-
SetReplaceTypeConvert[{WolframModelEvolutionObject, 2}] @
25+
SetReplaceTypeConvert[WolframModelEvolutionObject] @
2626
GenerateSingleHistory[MultisetSubstitutionSystem[{a_, b_} /; a < b :> {a + b}]] @ {1, 2, 3, 4}
2727
```
2828

@@ -33,7 +33,7 @@ We can also use a more general [`GenerateMultihistory`](GenerateMultihistory.md)
3333

3434
```wl
3535
In[] := #["ExpressionsEventsGraph", VertexLabels -> Placed[Automatic, After]] & @
36-
SetReplaceTypeConvert[{WolframModelEvolutionObject, 2}] @
36+
SetReplaceTypeConvert[WolframModelEvolutionObject] @
3737
GenerateMultihistory[
3838
MultisetSubstitutionSystem[{a_, b_} /; a < b :> {a + b}], MaxDestroyerEvents -> 2] @ {1, 2, 3, 4}
3939
```
-4.39 KB
Loading
18 KB
Loading
-1.71 KB
Loading
Loading
Loading
-1.64 KB
Loading
Loading
Loading

Documentation/Systems/AtomicStateSystem.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ left that can match these states, and the arbitrary code on the right that creat
55

66
```wl
77
In[] := #["ExpressionsEventsGraph", VertexLabels -> Placed[Automatic, After]] & @
8-
SetReplaceTypeConvert[{WolframModelEvolutionObject, 2}] @
8+
SetReplaceTypeConvert[WolframModelEvolutionObject] @
99
GenerateMultihistory[AtomicStateSystem[{n_ :> n + 1, n_ :> n - 1}], MaxGeneration -> 4][0]
1010
```
1111

Documentation/Systems/MultisetSubstitutionSystem.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ For example, to make a system that adds pairs of numbers:
1818

1919
```wl
2020
In[] := #["ExpressionsEventsGraph", VertexLabels -> Placed[Automatic, After]] & @
21-
SetReplaceTypeConvert[{WolframModelEvolutionObject, 2}] @
21+
SetReplaceTypeConvert[WolframModelEvolutionObject] @
2222
GenerateSingleHistory[MultisetSubstitutionSystem[{a_, b_} /; a < b :> {a + b}]] @ {1, 2, 3, 4}
2323
```
2424

@@ -32,7 +32,7 @@ generates a list. For example:
3232

3333
```wl
3434
In[] := #["ExpressionsEventsGraph", VertexLabels -> Placed[Automatic, After]] & @
35-
SetReplaceTypeConvert[{WolframModelEvolutionObject, 2}] @
35+
SetReplaceTypeConvert[WolframModelEvolutionObject] @
3636
GenerateMultihistory[
3737
MultisetSubstitutionSystem[{a__} /; OrderedQ[{a}] && PrimeQ[Plus[a]] :> First /@ FactorInteger[Plus[a]]],
3838
MinEventInputs -> 2, MaxEventInputs -> 4] @ {1, 2, 3, 4}

Documentation/TypeSystem/$SetReplaceTypeGraph.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@
88
In[] := $SetReplaceTypeGraph
99
```
1010

11-
<img src="/Documentation/Images/$SetReplaceTypeGraph.png" width="816.6">
11+
<img src="/Documentation/Images/$SetReplaceTypeGraph.png" width="787.8">
1212

1313
It is a [`Graph`](https://reference.wolfram.com/language/ref/Graph.html) representation of a directed hypergraph with
1414
types and properties as vertices and implementations of translations and properties as edges.
1515

16-
All vertices have the form `kind[name]`, where `kind` can be either [`SetReplaceType`](SetReplaceType.md),
17-
[`SetReplaceProperty`](SetReplaceProperty.md) or [`SetReplaceMethodImplementation`](SetReplaceMethodImplementation.md),
18-
and `name` is either a type specification or a symbol.
16+
Vertex heads are either [`SetReplaceType`](SetReplaceType.md), [`SetReplaceProperty`](SetReplaceProperty.md) or
17+
[`SetReplaceMethodImplementation`](SetReplaceMethodImplementation.md).

Documentation/TypeSystem/$SetReplaceTypes.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44

55
```wl
66
In[] := $SetReplaceTypes
7-
Out[] = {{AtomicStateSystem, 0}, {MultisetSubstitutionSystem, 0}, {WolframModelEvolutionObject, 2}}
87
```
8+
9+
<img src="/Documentation/Images/$SetReplaceTypes.png" width="791.4">

Documentation/TypeSystem/SetReplaceObjectQ.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
**`SetReplaceObjectQ`** yields [`True`](https://reference.wolfram.com/language/ref/True.html) for *SetReplace* objects
44
and [`False`](https://reference.wolfram.com/language/ref/False.html) otherwise:
55

6-
<img src="/Documentation/Images/SetReplaceObjectQOfMultihistory.png" width="645.6">
6+
<img src="/Documentation/Images/SetReplaceObjectQOfMultihistory.png" width="595.2">
77

88
```wl
99
Out[] = True

Documentation/TypeSystem/SetReplaceObjectType.md

+1-5
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,4 @@
33
**`SetReplaceObjectType`** yields [the type](/Documentation/Types/README.md) of an object. Note that the type
44
specification usually contains its version:
55

6-
<img src="/Documentation/Images/SetReplaceObjectTypeOfMultihistory.png" width="673.2">
7-
8-
```wl
9-
Out[] = {MultisetSubstitutionSystem, 0}
10-
```
6+
<img src="/Documentation/Images/SetReplaceObjectTypeOfMultihistory.png" width="628.2">
+7-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# SetReplaceType
22

3-
**`SetReplaceType`** represents a *SetReplace* [type](/Documentation/Types/README.md). It has the type specification as
4-
its single argument.
3+
**`SetReplaceType`** represents a *SetReplace* [type](/Documentation/Types/README.md). It has the format
54

6-
It is used in vertex names of [`$SetReplaceTypeGraph`]($SetReplaceTypeGraph.md).
5+
```wl
6+
SetReplaceType[name, version]
7+
```
8+
9+
It is used in vertex names of [`$SetReplaceTypeGraph`]($SetReplaceTypeGraph.md) and is returned by functions such as
10+
[`SetReplaceObjectType`](SetReplaceObjectType.md).

Documentation/TypeSystem/SetReplaceTypeConvert.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@
77
SetReplaceTypeConvert[newType][object]
88
```
99

10-
For example, one can convert an [`AtomicStateSystem` multihistory](/Documentation/Types/AtomicStateSystem0.md) to a
10+
For example, one can convert an
11+
[`AtomicStateSystem` multihistory](/Documentation/Types/Multihistory/AtomicStateSystem0.md) to a
1112
[`MultisetSubstitutionSystem` multihistory](/Documentation/Types/Multihistory/MultisetSubstitutionSystem0.md):
1213

13-
<img src="/Documentation/Images/AtomicStateToMultisetMultihistory.png" width="562.2">
14+
<img src="/Documentation/Images/AtomicStateToMultisetMultihistory.png" width="517.8">
15+
16+
To convert to a specific version of a type, one can use the full type specification:
17+
18+
<img src="/Documentation/Images/AtomicStateToMultisetMultihistoryVersioned.png" width="693.0">
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
# {AtomicStateSystem, 0}
1+
# AtomicStateSystem Multihistory
22

3-
**`{AtomicStateSystem, 0}`** is a [`Multihistory`](README.md) type currently returned by
3+
[**`AtomicStateSystem`**](/Documentation/Systems/AtomicStateSystem.md) [`Multihistory`](README.md) object is returned by
44
[generators](/Documentation/Generators/README.md) of the
55
[`AtomicStateSystem`](/Documentation/Systems/AtomicStateSystem.md):
66

77
```wl
88
In[] := GenerateMultihistory[AtomicStateSystem[a_ :> a + 1], MaxEvents -> 10][0]
99
```
1010

11-
<img src="/Documentation/Images/AtomicStateMultihistory.png" width="424.2">
11+
<img src="/Documentation/Images/AtomicStateMultihistory.png" width="378.6">
1212

1313
Internally, [`AtomicStateSystem`](/Documentation/Systems/AtomicStateSystem.md) is implemented by running a special case
14-
of the [`MultisetSubstitutionSystem`](/Documentation/Systems/MultisetSubstitutionSystem.md). `{AtomicStateSystem, 0}`
15-
contains a corresponding [`{MultisetSubstitutionSystem, 0}`](MultisetSubstitutionSystem0.md) and can be converted to it.
14+
of the [`MultisetSubstitutionSystem`](/Documentation/Systems/MultisetSubstitutionSystem.md). The object contains a
15+
[`MultisetSubstitutionSystem` multihistory](MultisetSubstitutionSystem0.md) and can be converted to it.

Documentation/Types/Multihistory/MultisetSubstitutionSystem0.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
# {MultisetSubstitutionSystem, 0}
1+
# MultisetSubstitutionSystem Multihistory
22

3-
**`{MultisetSubstitutionSystem, 0}`** is a [`Multihistory`](README.md) type currently returned by
4-
[generators](/Documentation/Generators/README.md) of the
3+
[**`MultisetSubstitutionSystem`**](/Documentation/Systems/MultisetSubstitutionSystem.md) [`Multihistory`](README.md)
4+
object is returned by [generators](/Documentation/Generators/README.md) of the
55
[`MultisetSubstitutionSystem`](/Documentation/Systems/MultisetSubstitutionSystem.md):
66

77
```wl
88
In[] := GenerateMultihistory[MultisetSubstitutionSystem[{a_, b_} :> {a + b}], MaxEvents -> 10] @ {1, 2, 3}
99
```
1010

11-
<img src="/Documentation/Images/MultisetMultihistory.png" width="472.2">
11+
<img src="/Documentation/Images/MultisetMultihistory.png" width="426.6">
1212

1313
It is implemented as an [`Association`](https://reference.wolfram.com/language/guide/Associations.html) of
1414
[data structures](https://reference.wolfram.com/language/ref/DataStructure.html) containing information about the rules,
+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Multihistory
22

3-
**`Multihistory`** is a head used for [types](README.md) representing an evaluation history of a
3+
**`Multihistory`** is a head used for [types](/Documentation/Types/README.md) representing an evaluation history of a
44
[computational system](/Documentation/Systems/README.md).
55

66
For example, for a [`MultisetSubstitutionSystem`](/Documentation/Systems/MultisetSubstitutionSystem.md),
@@ -9,10 +9,10 @@ For example, for a [`MultisetSubstitutionSystem`](/Documentation/Systems/Multise
99
In[] := GenerateMultihistory[MultisetSubstitutionSystem[{a_, b_} :> {a + b}], MaxEvents -> 10] @ {1, 2, 3}
1010
```
1111

12-
<img src="/Documentation/Images/MultisetMultihistory.png" width="472.2">
12+
<img src="/Documentation/Images/MultisetMultihistory.png" width="426.6">
1313

1414
You will be able to use [`properties`](/Documentation/Properties/README.md) to extract information about multihistories,
1515
but we have not implemented any properties yet.
1616

17-
* [`{AtomicStateSystem, 0}`](AtomicStateSystem0.md)
18-
* [`{MultisetSubstitutionSystem, 0}`](MultisetSubstitutionSystem0.md)
17+
* [`AtomicStateSystem`](AtomicStateSystem0.md)
18+
* [`MultisetSubstitutionSystem`](MultisetSubstitutionSystem0.md)

Documentation/Types/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ generation of data (such as the data about the evaluation of a
55
[nondeterministic system](/Documentation/Systems/README.md)) and computation of
66
[properties](/Documentation/Properties/README.md) from that data.
77

8-
The usual form for the type spec is `{system, version}`, e.g., `{MultisetSubstitutionSystem, 0}`.
8+
Multihistory types are named after systems that produce them, e.g., `SetReplaceType[MultisetSubstitutionSystem, 0]`.
99

1010
* [`Multihistory`](Multihistory/README.md) &mdash; a generic kind of types for computational systems:
11-
* [`{AtomicStateSystem, 0}`](AtomicStateSystem0.md)
12-
* [`{MultisetSubstitutionSystem, 0}`](Multihistory/MultisetSubstitutionSystem0.md)
11+
* [`AtomicStateSystem`](Multihistory/AtomicStateSystem0.md)
12+
* [`MultisetSubstitutionSystem`](Multihistory/MultisetSubstitutionSystem0.md)

Kernel/A0$style.m

+35
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
PackageScope["$typeGraphLayout"]
2323
PackageScope["$typeGraphBackground"]
2424
PackageScope["$evolutionObjectIcon"]
25+
PackageScope["$setReplaceTypeDisplayFunction"]
26+
PackageScope["$setReplaceTypeDisplayFunctionVersioned"]
2527
PackageScope["$destroyedEdgeStyle"]
2628
PackageScope["$createdEdgeStyle"]
2729
PackageScope["$destroyedAndCreatedEdgeStyle"]
@@ -102,6 +104,10 @@
102104
"Background" -> $typeGraphBackground
103105
|>,
104106
"EvolutionObject" -> <|"Icon" -> $evolutionObjectIcon|>,
107+
"SetReplaceType" -> <|
108+
"DisplayFunction" -> $setReplaceTypeDisplayFunction,
109+
"DisplayFunctionVersioned" -> $setReplaceTypeDisplayFunctionVersioned
110+
|>,
105111
"SpatialGraph" -> <|
106112
"DestroyedEdgeStyle" -> $destroyedEdgeStyle,
107113
"CreatedEdgeStyle" -> $createdEdgeStyle,
@@ -247,6 +253,35 @@
247253
(* Evolution object *)
248254
$evolutionObjectIcon -> $graphIcon,
249255

256+
(* SetReplaceType *)
257+
$setReplaceTypeDisplayFunction -> (FrameBox[
258+
PanelBox[
259+
GridBox[
260+
{{StyleBox[#1, FontSize -> 13, FontColor -> RGBColor[0.034, 0.3, 0.42], FontWeight -> "SemiBold"]}},
261+
BaselinePosition -> {1, 1}],
262+
Background -> RGBColor[0.9517, 0.965, 0.971],
263+
BaselinePosition -> Baseline,
264+
FrameMargins -> {{3, 3}, {1.5, 1.5}}],
265+
FrameMargins -> None,
266+
FrameStyle -> RGBColor[0.65, 0.65, 0.65],
267+
BaselinePosition -> Baseline,
268+
RoundingRadius -> 4] &),
269+
270+
$setReplaceTypeDisplayFunctionVersioned -> (FrameBox[
271+
PanelBox[
272+
GridBox[{{
273+
StyleBox[#1, FontSize -> 13, FontColor -> RGBColor[0.034, 0.3, 0.42], FontWeight -> "SemiBold"],
274+
StyleBox[#2, FontColor -> RGBColor[0.517, 0.65, 0.71], FontSize -> 13, FontWeight -> "Plain"]}},
275+
GridBoxSpacings -> {"Columns" -> {{0.3}}, "Rows" -> {{0}}},
276+
BaselinePosition -> {1, 1}],
277+
Background -> RGBColor[0.9517, 0.965, 0.971],
278+
BaselinePosition -> Baseline,
279+
FrameMargins -> {{3, 3}, {1.5, 1.5}}],
280+
FrameMargins -> None,
281+
FrameStyle -> RGBColor[0.65, 0.65, 0.65],
282+
BaselinePosition -> Baseline,
283+
RoundingRadius -> 4] &),
284+
250285
(* Hypergraph diffs *)
251286
$destroyedEdgeStyle -> Directive[Hue[0.08, 0, 0.42], AbsoluteDashing[{1, 2}]],
252287
$createdEdgeStyle -> Directive[Hue[0.02, 0.94, 0.83], Thick],

0 commit comments

Comments
 (0)