aboutsummaryrefslogtreecommitdiffstats
path: root/subprojects/frontend/src/index.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'subprojects/frontend/src/index.tsx')
-rw-r--r--subprojects/frontend/src/index.tsx100
1 files changed, 1 insertions, 99 deletions
diff --git a/subprojects/frontend/src/index.tsx b/subprojects/frontend/src/index.tsx
index 60debd6b..3fd25e5c 100644
--- a/subprojects/frontend/src/index.tsx
+++ b/subprojects/frontend/src/index.tsx
@@ -15,104 +15,6 @@ import RootStore from './RootStore';
15// https://github.com/mui/material-ui/issues/32727#issuecomment-1659945548 15// https://github.com/mui/material-ui/issues/32727#issuecomment-1659945548
16(window as unknown as { fixViteIssue: unknown }).fixViteIssue = styled; 16(window as unknown as { fixViteIssue: unknown }).fixViteIssue = styled;
17 17
18const initialValue = `% Metamodel
19
20abstract class CompositeElement {
21 contains Region[] regions
22}
23
24class Region {
25 contains Vertex[] vertices opposite region
26}
27
28abstract class Vertex {
29 container Region region opposite vertices
30 contains Transition[] outgoingTransition opposite source
31 Transition[] incomingTransition opposite target
32}
33
34class Transition {
35 container Vertex source opposite outgoingTransition
36 Vertex[1] target opposite incomingTransition
37}
38
39abstract class Pseudostate extends Vertex.
40
41abstract class RegularState extends Vertex.
42
43class Entry extends Pseudostate.
44
45class Exit extends Pseudostate.
46
47class Choice extends Pseudostate.
48
49class FinalState extends RegularState.
50
51class State extends RegularState, CompositeElement.
52
53class Statechart extends CompositeElement.
54
55% Constraints
56
57%% Entry
58
59pred entryInRegion(Region r, Entry e) <->
60 vertices(r, e).
61
62error noEntryInRegion(Region r) <->
63 !entryInRegion(r, _).
64
65error multipleEntryInRegion(Region r) <->
66 entryInRegion(r, e1),
67 entryInRegion(r, e2),
68 e1 != e2.
69
70error incomingToEntry(Transition t, Entry e) <->
71 target(t, e).
72
73error noOutgoingTransitionFromEntry(Entry e) <->
74 !source(_, e).
75
76error multipleTransitionFromEntry(Entry e, Transition t1, Transition t2) <->
77 outgoingTransition(e, t1),
78 outgoingTransition(e, t2),
79 t1 != t2.
80
81%% Exit
82
83error outgoingFromExit(Transition t, Exit e) <->
84 source(t, e).
85
86%% Final
87
88error outgoingFromFinal(Transition t, FinalState e) <->
89 source(t, e).
90
91%% State vs Region
92
93pred stateInRegion(Region r, State s) <->
94 vertices(r, s).
95
96error noStateInRegion(Region r) <->
97 !stateInRegion(r, _).
98
99%% Choice
100
101error choiceHasNoOutgoing(Choice c) <->
102 !source(_, c).
103
104error choiceHasNoIncoming(Choice c) <->
105 !target(_, c).
106
107% Instance model
108
109Statechart(sct).
110
111% Scope
112
113scope node = 20..30, Region = 2..*, Choice = 1..*, Statechart += 0.
114`;
115
116configure({ 18configure({
117 enforceActions: 'always', 19 enforceActions: 'always',
118}); 20});
@@ -121,7 +23,7 @@ let HotRootStore = RootStore;
121let HotApp = App; 23let HotApp = App;
122 24
123function createStore(): RootStore { 25function createStore(): RootStore {
124 return new HotRootStore(initialValue); 26 return new HotRootStore();
125} 27}
126 28
127let rootStore = createStore(); 29let rootStore = createStore();