Skip to content

Commit d0c5c43

Browse files
committed
Update logic example to use annotations
The logic example had not been updated to the new annotation syntax, and was still relying on the old "name and rank" hard-coded annotations. Has been updated now. No other example seems to use annotations though.
1 parent 7f8dfd9 commit d0c5c43

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

examples/logic/Logic.wyrl

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,22 @@ define Bool as True | False
2020

2121
term Not(BExpr)
2222

23-
reduce Not(Bool b)
24-
name "Not(Bool)":
23+
@name("Not(Bool)")
24+
reduce Not(Bool b):
2525
=> False, if b == True
2626
=> True
2727

28-
reduce Not(Not(* x))
29-
name "Not(Not)":
28+
@name("Not(Not)")
29+
reduce Not(Not(* x)):
3030
=> x
3131

32-
reduce Not(And{BExpr... xs})
33-
name "Not(And)":
32+
@name("Not(And)")
33+
reduce Not(And{BExpr... xs}):
3434
=> let ys = { Not(x) | x in xs }
3535
in Or(ys)
3636

37-
reduce Not(Or{BExpr... xs})
38-
name "Not(Or)":
37+
@name("Not(Or)")
38+
reduce Not(Or{BExpr... xs}):
3939
=> let ys = { Not(x) | x in xs }
4040
in And(ys)
4141

@@ -45,26 +45,26 @@ name "Not(Or)":
4545

4646
term And{BExpr...}
4747

48-
reduce And{BExpr x}
49-
name "And{x}":
48+
@name("And{x}")
49+
reduce And{BExpr x}:
5050
=> x
5151

52-
reduce And{Bool b, BExpr... xs}
53-
name "And{Bool,...}":
52+
@name("And{Bool,...}")
53+
reduce And{Bool b, BExpr... xs}:
5454
=> False, if b == False
5555
=> True, if |xs| == 0
5656
=> And (xs)
5757

58-
reduce And{And{BExpr... xs}, BExpr... ys}
59-
name "And{And,...}":
58+
@name("And{And,...}")
59+
reduce And{And{BExpr... xs}, BExpr... ys}:
6060
=> And (xs ++ ys)
6161

62-
reduce And{Not(BExpr x), BExpr y, BExpr... ys}
63-
name "And{Not,...}":
62+
@name("And{Not,...}")
63+
reduce And{Not(BExpr x), BExpr y, BExpr... ys}:
6464
=> False, if x == y
6565

66-
reduce And{Or{BExpr... xs}, BExpr... ys}
67-
name "And{Or,...}":
66+
@name("And{Or,...}")
67+
reduce And{Or{BExpr... xs}, BExpr... ys}:
6868
=> let ys = { And(x ++ ys) | x in xs }
6969
in Or(ys)
7070

@@ -74,22 +74,22 @@ name "And{Or,...}":
7474

7575
term Or{BExpr...}
7676

77-
reduce Or{BExpr x}
78-
name "Or{x}":
77+
@name("Or{x}")
78+
reduce Or{BExpr x}:
7979
=> x
8080

81-
reduce Or{Bool b, BExpr... xs}
82-
name "Or{Bool,...}":
81+
@name("Or{Bool,...}")
82+
reduce Or{Bool b, BExpr... xs}:
8383
=> True, if b == True
8484
=> False, if |xs| == 0
8585
=> Or (xs)
8686

87-
reduce Or{Not(BExpr x), BExpr y, BExpr... ys}
88-
name "Or{Not,...}":
87+
@name("Or{Not,...}")
88+
reduce Or{Not(BExpr x), BExpr y, BExpr... ys}:
8989
=> True, if x == y
9090

91-
reduce Or{Or{BExpr... xs}, BExpr... ys}
92-
name "Or{Or,...}":
91+
@name("Or{Or,...}")
92+
reduce Or{Or{BExpr... xs}, BExpr... ys}:
9393
=> Or (xs ++ ys)
9494

9595
// ====================================================================

0 commit comments

Comments
 (0)