diff options
Diffstat (limited to 'subprojects/frontend/src/index.tsx')
-rw-r--r-- | subprojects/frontend/src/index.tsx | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/subprojects/frontend/src/index.tsx b/subprojects/frontend/src/index.tsx index 0165d7c1..a40f1762 100644 --- a/subprojects/frontend/src/index.tsx +++ b/subprojects/frontend/src/index.tsx | |||
@@ -10,29 +10,29 @@ const initialValue = `class Family { | |||
10 | } | 10 | } |
11 | 11 | ||
12 | class Person { | 12 | class Person { |
13 | refers Person[] children opposite parent | 13 | Person[] children opposite parent |
14 | refers Person[0..1] parent opposite children | 14 | Person[0..1] parent opposite children |
15 | int age | 15 | int age |
16 | refers TaxStatus taxStatus | 16 | TaxStatus taxStatus |
17 | } | 17 | } |
18 | 18 | ||
19 | enum TaxStatus { | 19 | enum TaxStatus { |
20 | child, student, adult, retired | 20 | CHILD, STUDENT, ADULT, RETIRED |
21 | } | 21 | } |
22 | 22 | ||
23 | % A child cannot have any dependents. | 23 | % A child cannot have any dependents. |
24 | pred invalidTaxStatus(Person p) <-> | 24 | pred invalidTaxStatus(Person p) <-> |
25 | taxStatus(p, child), | 25 | taxStatus(p, CHILD), |
26 | children(p, _q) | 26 | children(p, _q) |
27 | ; | 27 | ; |
28 | parent(p, q), | 28 | parent(p, q), |
29 | age(q) < age(p) | 29 | age(q) < age(p) |
30 | ; | 30 | ; |
31 | taxStatus(p, retired), | 31 | taxStatus(p, RETIRED), |
32 | parent(p, q), | 32 | parent(p, q), |
33 | !taxStatus(q, retired). | 33 | !taxStatus(q, RETIRED). |
34 | 34 | ||
35 | individual family. | 35 | indiv family. |
36 | Family(family). | 36 | Family(family). |
37 | members(family, anne). | 37 | members(family, anne). |
38 | members(family, bob). | 38 | members(family, bob). |
@@ -40,9 +40,9 @@ members(family, ciri). | |||
40 | children(anne, ciri). | 40 | children(anne, ciri). |
41 | ?children(bob, ciri). | 41 | ?children(bob, ciri). |
42 | default children(ciri, *): false. | 42 | default children(ciri, *): false. |
43 | taxStatus(anne, adult). | 43 | taxStatus(anne, ADULT). |
44 | age(bob) in 21..35. | 44 | age(bob): 21..35. |
45 | age(ciri) = 10. | 45 | age(ciri): 10. |
46 | 46 | ||
47 | scope Family = 1, Person += 5..10. | 47 | scope Family = 1, Person += 5..10. |
48 | `; | 48 | `; |