1- # atom
1+ # Atom
22a0 = Atom (() -> true ; N= 0 )
33a1 = Atom (x -> x > 1 )
44a2 = Atom ((x, y) -> x > y; N= 2 )
@@ -9,7 +9,7 @@ a2 = Atom((x, y) -> x > y; N=2)
99@test ! evaluate (a2, 4 , 5 ) && ! a2 (4 , 5 )
1010@test evaluate (a2, 6 , 5 ) && a2 (6 , 5 )
1111
12- # negation
12+ # Negation
1313n0 = Negation (a0)
1414n1 = Negation (a1)
1515n2 = Negation (a2)
@@ -20,7 +20,7 @@ n2 = Negation(a2)
2020@test evaluate (n2, 4 , 5 ) && n2 (4 , 5 )
2121@test ! evaluate (n2, 6 , 5 ) && ! n2 (6 , 5 )
2222
23- # conjunction
23+ # Conjunction
2424c0 = Conjunction ([(n0, Int[]), (a0, Int[])]; N= 0 )
2525c0_3 = Conjunction ([(a0, Int[]), (a0, Int[]), (a0, Int[])]; N= 0 )
2626c1 = Conjunction ([(a0, Int[]), (a1, Int[1 ])]; N= 1 )
@@ -40,7 +40,7 @@ c2_3 = Conjunction([(a0, Int[]), (a1, Int[2]), (a2, Int[2, 1])]; N=2)
4040@test Conjunction ([(a0, Int[]), (a0, Int[]), (a0, Int[])]) isa Conjunction{Val{0 }}
4141@test Conjunction ([(a0, Int[]), (a1, Int[2 ]), (a2, Int[2 , 1 ])]) isa Conjunction{Val{2 }}
4242
43- # disjunction
43+ # Disjunction
4444d0 = Disjunction ([(n0, Int[]), (a0, Int[])]; N= 0 )
4545d0_3 = Disjunction ([(n0, Int[]), (n0, Int[]), (n0, Int[])]; N= 0 )
4646d1 = Disjunction ([(c0, Int[]), (a1, Int[1 ])]; N= 1 )
@@ -56,18 +56,27 @@ d2_3 = Disjunction([(a0, Int[]), (a1, Int[2]), (a2, Int[2, 1])]; N=2)
5656@test evaluate (d2, 4 , 5 ) && d2 (4 , 5 )
5757@test evaluate (d2_3, 4 , 5 ) && d2_3 (4 , 5 )
5858
59+ # CurryAtom
60+ ca0a = CurryAtom (2 , a1; N= 0 )
61+ @test evaluate (ca0a)
62+ ca0b = CurryAtom (0 , a1; N= 0 )
63+ @test ! evaluate (ca0b)
64+ @test ca0a == ca0a && ca0a != ca0b
65+ ca1 = CurryAtom (3 , a2; N= 1 )
66+ @test evaluate (ca1, 2 ) && ! evaluate (ca1, 4 )
67+
5968# default constructor
6069@test Disjunction ([(a0, Int[]), (a0, Int[]), (a0, Int[])]) isa Disjunction{Val{0 }}
6170@test Disjunction ([(a0, Int[]), (a1, Int[2 ]), (a2, Int[2 , 1 ])]) isa Disjunction{Val{2 }}
6271
63- # unary conjunction
72+ # unary Conjunction
6473cu = Conjunction ([n1, a1])
6574cu_3 = Conjunction ([c1, a1, d1])
6675
6776@test ! evaluate (cu, 5 ) && ! cu (5 )
6877@test evaluate (cu_3, 5 ) && cu_3 (5 )
6978
70- # unary disjunction
79+ # unary Disjunction
7180du = Disjunction ([n1, a1])
7281du_1 = Disjunction ([n1])
7382
0 commit comments