Skip to content

Commit 0bd85a6

Browse files
init commit
0 parents  commit 0bd85a6

372 files changed

Lines changed: 18551 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

examples/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## nonlin_mult_2.smt2.log
2+
The log shows how we handle the instance in Example 1.
3+
The "Information" section prints the statistics and the CHC system.

examples/nonlin_mult_2.smt2.log

Lines changed: 267 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,267 @@
1+
13:20:06 - line:175 - Chronosymbolic - by Ray Luo
2+
13:20:06 - line:176 - Date: 2023-06-29
3+
13:20:06 - line:177 - ========Information========
4+
13:20:06 - line:102 - Rule number: 3
5+
13:20:06 - line:103 - Relation number: 2
6+
13:20:06 - line:104 - Horn Relations:
7+
[fail(), inv(inv_0_n, inv_1_n, inv_2_n, inv_3_n, inv_4_n, )]
8+
13:20:06 - line:132 - Mod Features:
9+
OrderedSet()
10+
13:20:06 - line:136 - Var number: 5
11+
13:20:06 - line:138 - Horn Rules:
12+
Index: 1
13+
Rule: [Not(a <= 0), b >= a, c1 == 0, e1 == 0, d1 == 0] -> inv(a, b, c1, d1, e1)
14+
Index: 2
15+
Rule: [c2 == 1 + c1, d2 == d1 + a, e2 == e1 + b, inv(a, b, c1, d1, e1)] -> inv(a, b, c2, d2, e2)
16+
Index: 3
17+
Rule: [Not(e1 >= a*c1), inv(a, b, c1, d1, e1)] -> fail
18+
19+
20+
[fail] -> False
21+
13:20:06 - line:23 - Facts: [[Not(a <= 0), b >= a, c1 == 0, e1 == 0, d1 == 0] -> inv(a, b, c1, d1, e1)]
22+
Num: 1
23+
13:20:06 - line:24 - Fact rels: []
24+
Num: 0
25+
13:20:06 - line:25 - Query rels: [fail]
26+
Num: 1
27+
13:20:06 - line:26 - Queries: [[fail] -> False, [Not(e1 >= a*c1), inv(a, b, c1, d1, e1)] -> fail]
28+
Num: 2
29+
13:20:06 - line:1259 - Episode No.1
30+
13:20:06 - line:69 - ============== Init Phase ==============
31+
13:20:06 - line:102 - Find SAFE zones from Facts
32+
13:20:06 - line:104 - Init SAFE zone for inv: And(Var_1 >= Var_0,
33+
Var_0 >= 1,
34+
Var_2 == 0,
35+
Var_4 == 0,
36+
Var_3 == 0)
37+
13:20:06 - line:144 - Find UNSAFE zones from Queries
38+
13:20:06 - line:146 - Init UNSAFE zone for inv: Not(Var_4 >= Var_0*Var_2)
39+
13:20:06 - line:241 - Forward Iteration 1
40+
13:20:06 - line:337 - Relation update count: 1
41+
13:20:06 - line:241 - Forward Iteration 2
42+
13:20:06 - line:337 - Relation update count: 1
43+
13:20:06 - line:241 - Forward Iteration 3
44+
13:20:06 - line:304 -
45+
Stop expansion at Rule 2,
46+
is_quantifier: False,
47+
len(body_and): 776, len(nzone): 1022
48+
13:20:06 - line:335 - Relation update count: 0
49+
13:20:06 - line:340 - After expansion, update SAFE zone for inv
50+
13:20:06 - line:351 - Backward Iteration 1
51+
13:20:06 - line:449 - Relation update count: 1
52+
13:20:06 - line:351 - Backward Iteration 2
53+
13:20:06 - line:449 - Relation update count: 1
54+
13:20:06 - line:351 - Backward Iteration 3
55+
13:20:06 - line:449 - Relation update count: 1
56+
13:20:06 - line:452 - After expansion, updated UNSAFE zone for inv
57+
13:20:06 - line:459 - Sample dps for inv
58+
13:20:06 - line:972 - SVM Calls: 0, Total SVM time: 0.0002701282501220703
59+
13:20:06 - line:597 - New Candidate for fail:
60+
False
61+
13:20:06 - line:597 - New Candidate for inv:
62+
False
63+
13:20:06 - line:208 - ============== Init Phase Ended, Time: 0.08259844779968262 ==============
64+
13:20:06 - line:637 - ========== Constraint Solving of Horn Clauses ===========
65+
13:20:06 - line:641 - Work list size: 3
66+
13:20:06 - line:643 - VERIFY Horn Rule Index 1
67+
13:20:06 - line:689 - This rule is a FACT, skipped
68+
13:20:06 - line:641 - Work list size: 2
69+
13:20:06 - line:643 - VERIFY Horn Rule Index 2
70+
13:20:06 - line:736 - Rule Index 2 Verification Round 1
71+
13:20:06 - line:1206 - SAT, CEX: inv(1, 1, 2, 2, 2, ); -> inv(1, 1, 3, 3, 3, )
72+
13:20:06 - line:37 - Add positive DP [1, 1, 3, 3, 3] for relation inv
73+
13:20:06 - line:804 - Got Pos DP inv(a, b, c2, d2, e2): [1, 1, 3, 3, 3] from forward implication
74+
13:20:06 - line:972 - SVM Calls: 0, Total SVM time: 0.0003254413604736328
75+
13:20:06 - line:37 - Add positive DP [1, 1, 4, 4, 4] for relation inv
76+
13:20:06 - line:37 - Add positive DP [1, 1, 5, 5, 5] for relation inv
77+
13:20:06 - line:135 - Sampled positive states in this round:
78+
13:20:06 - line:137 - Rel: inv, DP: [And(a == 1, b == 1, c2 == 3, d2 == 3, e2 == 3), And(a == 1, b == 1, c2 == 4, d2 == 4, e2 == 4), And(a == 1, b == 1, c2 == 5, d2 == 5, e2 == 5)]
79+
13:20:06 - line:546 - New Candidate for PRED_1:
80+
True (dataset all True)
81+
13:20:06 - line:888 - For IMPLICATION rules this round,
82+
13:20:06 - line:889 - Updated positive datasets for 1 relations
83+
13:20:06 - line:890 - Updated negative datasets for 0 relations
84+
13:20:06 - line:736 - Rule Index 2 Verification Round 2
85+
13:20:06 - line:193 - Add (tentative: False) negative DP [3, -3, -8, 3, -3] for relation inv
86+
13:20:06 - line:838 - Got Neg DP inv: [3, -3, -8, 3, -3] from backward implication
87+
13:20:06 - line:907 - SVM cmd: utils/libsvm/svm-invgen -c 1 -t 5 -a 0 -v 5 -p 3 -n 1 -g 0 -f PRED_1 tmp/FromCmd.svm.data 2>&1
88+
13:20:06 - line:915 - SVM out buffer: Call SVM For Invariant Learning.
89+
Using LINEAR kernel...
90+
91+
92+
13:20:06 - line:927 - SVM data output:
93+
['true']
94+
13:20:06 - line:972 - SVM Calls: 1, Total SVM time: 0.003610849380493164
95+
13:20:06 - line:193 - Add (tentative: False) negative DP [3, -3, -9, 0, 0] for relation inv
96+
13:20:06 - line:347 - Sampled negative states in this round:
97+
13:20:06 - line:349 - Rel: inv, DP: [And(Var_0 == 3,
98+
Var_1 == -3,
99+
Var_2 == -8,
100+
Var_3 == 3,
101+
Var_4 == -3), And(a == 3, b == -3, c1 == -9, d1 == 0, e1 == 0)]
102+
13:20:06 - line:569 - C5 cmd: utils/C50/c5.0.dt_entropy -I 1 -m 1 -f tmp/FromCmd 2>&1
103+
13:20:06 - line:593 - positive dataset:
104+
Rel: inv, dps: OrderedSet([(1, 1, 3, 3, 3), (1, 1, 4, 4, 4), (1, 1, 5, 5, 5)])
105+
size: 3
106+
13:20:06 - line:594 - negative dataset:
107+
Rel: inv, dps: OrderedSet([(3, -3, -8, 3, -3), (3, -3, -9, 0, 0)])
108+
negative tentative dataset:
109+
size: 2, tentative_size: 0
110+
13:20:06 - line:596 - DT Calls: 1, Total DT time: 0.005838871002197266
111+
13:20:06 - line:888 - For IMPLICATION rules this round,
112+
13:20:06 - line:889 - Updated positive datasets for 0 relations
113+
13:20:06 - line:890 - Updated negative datasets for 1 relations
114+
13:20:06 - line:736 - Rule Index 2 Verification Round 3
115+
13:20:06 - line:193 - Add (tentative: False) negative DP [-1, -2, 5, -5, -2] for relation inv
116+
13:20:06 - line:838 - Got Neg DP inv: [-1, -2, 5, -5, -2] from backward implication
117+
13:20:06 - line:907 - SVM cmd: utils/libsvm/svm-invgen -c 1 -t 5 -a 0 -v 5 -p 3 -n 3 -g 0 -f PRED_1 tmp/FromCmd.svm.data 2>&1
118+
13:20:06 - line:915 - SVM out buffer: Call SVM For Invariant Learning.
119+
Using LINEAR kernel...
120+
121+
122+
13:20:06 - line:927 - SVM data output:
123+
['true']
124+
13:20:06 - line:972 - SVM Calls: 2, Total SVM time: 0.0060617923736572266
125+
13:20:06 - line:193 - Add (tentative: False) negative DP [-1, -2, 4, -4, 0] for relation inv
126+
13:20:06 - line:347 - Sampled negative states in this round:
127+
13:20:06 - line:349 - Rel: inv, DP: [And(Var_0 == -1,
128+
Var_1 == -2,
129+
Var_2 == 5,
130+
Var_3 == -5,
131+
Var_4 == -2), And(a == -1, b == -2, c1 == 4, d1 == -4, e1 == 0)]
132+
13:20:06 - line:569 - C5 cmd: utils/C50/c5.0.dt_entropy -I 1 -m 1 -f tmp/FromCmd 2>&1
133+
13:20:06 - line:593 - positive dataset:
134+
Rel: inv, dps: OrderedSet([(1, 1, 3, 3, 3), (1, 1, 4, 4, 4), (1, 1, 5, 5, 5)])
135+
size: 3
136+
13:20:06 - line:594 - negative dataset:
137+
Rel: inv, dps: OrderedSet([(3, -3, -8, 3, -3), (3, -3, -9, 0, 0), (-1, -2, 5, -5, -2), (-1, -2, 4, -4, 0)])
138+
negative tentative dataset:
139+
size: 4, tentative_size: 0
140+
13:20:06 - line:596 - DT Calls: 2, Total DT time: 0.010164260864257812
141+
13:20:06 - line:888 - For IMPLICATION rules this round,
142+
13:20:06 - line:889 - Updated positive datasets for 0 relations
143+
13:20:06 - line:890 - Updated negative datasets for 1 relations
144+
13:20:06 - line:736 - Rule Index 2 Verification Round 4
145+
13:20:06 - line:193 - Add (tentative: False) negative DP [7, 3, -3, -8, -8] for relation inv
146+
13:20:06 - line:838 - Got Neg DP inv: [7, 3, -3, -8, -8] from backward implication
147+
13:20:06 - line:907 - SVM cmd: utils/libsvm/svm-invgen -c 1 -t 5 -a 0 -v 5 -p 3 -n 5 -g 0 -f PRED_1 tmp/FromCmd.svm.data 2>&1
148+
13:20:06 - line:915 - SVM out buffer: Call SVM For Invariant Learning.
149+
Using LINEAR kernel...
150+
151+
152+
13:20:06 - line:927 - SVM data output:
153+
['true']
154+
13:20:06 - line:972 - SVM Calls: 3, Total SVM time: 0.008613824844360352
155+
13:20:06 - line:193 - Add (tentative: False) negative DP [7, 3, -4, -15, -11] for relation inv
156+
13:20:06 - line:347 - Sampled negative states in this round:
157+
13:20:06 - line:349 - Rel: inv, DP: [And(Var_0 == 7,
158+
Var_1 == 3,
159+
Var_2 == -3,
160+
Var_3 == -8,
161+
Var_4 == -8), And(a == 7, b == 3, c1 == -4, d1 == -15, e1 == -11)]
162+
13:20:06 - line:569 - C5 cmd: utils/C50/c5.0.dt_entropy -I 1 -m 1 -f tmp/FromCmd 2>&1
163+
13:20:06 - line:593 - positive dataset:
164+
Rel: inv, dps: OrderedSet([(1, 1, 3, 3, 3), (1, 1, 4, 4, 4), (1, 1, 5, 5, 5)])
165+
size: 3
166+
13:20:06 - line:594 - negative dataset:
167+
Rel: inv, dps: OrderedSet([(3, -3, -8, 3, -3), (3, -3, -9, 0, 0), (-1, -2, 5, -5, -2), (-1, -2, 4, -4, 0), (7, 3, -3, -8, -8), (7, 3, -4, -15, -11)])
168+
negative tentative dataset:
169+
size: 6, tentative_size: 0
170+
13:20:06 - line:596 - DT Calls: 3, Total DT time: 0.014484167098999023
171+
13:20:06 - line:888 - For IMPLICATION rules this round,
172+
13:20:06 - line:889 - Updated positive datasets for 0 relations
173+
13:20:06 - line:890 - Updated negative datasets for 1 relations
174+
13:20:06 - line:736 - Rule Index 2 Verification Round 5
175+
13:20:06 - line:193 - Add (tentative: False) negative DP [5, 4, 0, -2, 3] for relation inv
176+
13:20:06 - line:838 - Got Neg DP inv: [5, 4, 0, -2, 3] from backward implication
177+
13:20:06 - line:907 - SVM cmd: utils/libsvm/svm-invgen -c 1 -t 5 -a 0 -v 5 -p 3 -n 7 -g 0 -f PRED_1 tmp/FromCmd.svm.data 2>&1
178+
13:20:06 - line:915 - SVM out buffer: Call SVM For Invariant Learning.
179+
Using LINEAR kernel...
180+
181+
182+
13:20:06 - line:927 - SVM data output:
183+
['true']
184+
13:20:06 - line:972 - SVM Calls: 4, Total SVM time: 0.011057138442993164
185+
13:20:06 - line:193 - Add (tentative: False) negative DP [5, 4, -1, -7, -1] for relation inv
186+
13:20:06 - line:347 - Sampled negative states in this round:
187+
13:20:06 - line:349 - Rel: inv, DP: [And(Var_0 == 5,
188+
Var_1 == 4,
189+
Var_2 == 0,
190+
Var_3 == -2,
191+
Var_4 == 3), And(a == 5, b == 4, c1 == -1, d1 == -7, e1 == -1)]
192+
13:20:06 - line:569 - C5 cmd: utils/C50/c5.0.dt_entropy -I 1 -m 1 -f tmp/FromCmd 2>&1
193+
13:20:06 - line:593 - positive dataset:
194+
Rel: inv, dps: OrderedSet([(1, 1, 3, 3, 3), (1, 1, 4, 4, 4), (1, 1, 5, 5, 5)])
195+
size: 3
196+
13:20:06 - line:594 - negative dataset:
197+
Rel: inv, dps: OrderedSet([(3, -3, -8, 3, -3), (3, -3, -9, 0, 0), (-1, -2, 5, -5, -2), (-1, -2, 4, -4, 0), (7, 3, -3, -8, -8), (7, 3, -4, -15, -11), (5, 4, 0, -2, 3), (5, 4, -1, -7, -1)])
198+
negative tentative dataset:
199+
size: 8, tentative_size: 0
200+
13:20:06 - line:596 - DT Calls: 4, Total DT time: 0.01905083656311035
201+
13:20:06 - line:888 - For IMPLICATION rules this round,
202+
13:20:06 - line:889 - Updated positive datasets for 0 relations
203+
13:20:06 - line:890 - Updated negative datasets for 1 relations
204+
13:20:06 - line:736 - Rule Index 2 Verification Round 6
205+
13:20:06 - line:881 - UNSAT, This rule is PASSED
206+
13:20:06 - line:641 - Work list size: 2
207+
13:20:06 - line:643 - VERIFY Horn Rule Index 3
208+
13:20:06 - line:727 - This rule is a Query, skipped
209+
13:20:06 - line:641 - Work list size: 1
210+
13:20:06 - line:643 - VERIFY Horn Rule Index 3
211+
13:20:06 - line:727 - This rule is a Query, skipped
212+
13:20:06 - line:905 - ==================================
213+
13:20:06 - line:1259 - Episode No.2
214+
13:20:06 - line:637 - ========== Constraint Solving of Horn Clauses ===========
215+
13:20:06 - line:641 - Work list size: 3
216+
13:20:06 - line:643 - VERIFY Horn Rule Index 1
217+
13:20:06 - line:689 - This rule is a FACT, skipped
218+
13:20:06 - line:641 - Work list size: 2
219+
13:20:06 - line:643 - VERIFY Horn Rule Index 2
220+
13:20:06 - line:736 - Rule Index 2 Verification Round 1
221+
13:20:06 - line:881 - UNSAT, This rule is PASSED
222+
13:20:06 - line:641 - Work list size: 1
223+
13:20:06 - line:643 - VERIFY Horn Rule Index 3
224+
13:20:06 - line:727 - This rule is a Query, skipped
225+
13:20:06 - line:905 - ==================================
226+
13:20:06 - line:1285 - ************** Finished in 0.646906852722168 (secs) in 2 epochs **************
227+
13:20:06 - line:1288 - Total SVM Calls: 4, DT Calls: 4, Z3 Calls: 25
228+
13:20:06 - line:1289 - Total SVM Time: 0.011057138442993164, DT Time: 0.01905083656311035, Z3 Time: 0.3920609951019287
229+
13:20:06 - line:1290 - Others: 0.22473788261413574, Init Phase Time: 0.08259844779968262, Simplifier Solver Time: 0.002895832061767578
230+
13:20:06 - line:1297 - ************** Auxiliary Info **************
231+
13:20:06 - line:1300 - max_len_exp_fwd: 776
232+
13:20:06 - line:1300 - max_len_exp_bwd: 215
233+
13:20:06 - line:1300 - len_exp_zone_fwd: [(79, 196), (392, 606), (776, 1022)]
234+
13:20:06 - line:1300 - len_exp_zone_bwd: [(48, 106), (144, 181), (215, 256)]
235+
13:20:06 - line:1300 - Total Iter: 7
236+
13:20:06 - line:1300 - QE Time: 0.0028340816497802734
237+
13:20:06 - line:1305 - ************** Program is correct **************
238+
13:20:06 - line:1308 -
239+
Relation: fail,
240+
Candidate: False
241+
13:20:06 - line:1308 -
242+
Relation: inv,
243+
Candidate: Or(And(Var_1 >= Var_0,
244+
Var_0 >= 1,
245+
Var_2 == 0,
246+
Var_4 == 0,
247+
Var_3 == 0),
248+
And(Var_0 >= 1,
249+
Var_2 == 1,
250+
Var_3 == Var_0,
251+
Var_4 == Var_1,
252+
Var_1 >= Var_0),
253+
And(Var_1 >= Var_0,
254+
Var_0 >= 1,
255+
Var_2 == 1,
256+
Var_4 + -1*Var_1 == 0,
257+
Var_3 + -1*Var_0 == 0),
258+
And(Var_0 >= 1,
259+
Var_2 == 2,
260+
Var_3 + -2*Var_0 == 0,
261+
Var_4 + -2*Var_1 == 0,
262+
Var_1 >= Var_0),
263+
And(Not(Or(Not(Var_4 >= Var_0*Var_2),
264+
Not(Var_4 + 3*Var_1 >= Var_0*(3 + Var_2)),
265+
Not(Var_4 + 2*Var_1 >= Var_0*(2 + Var_2)),
266+
Not(Var_4 + Var_1 >= Var_0*(1 + Var_2)))),
267+
Var_0 + -1*Var_1 <= 0))

tests/multiple_pred/abdu_05.smt2

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
(declare-rel inv1 (Int Int Int))
2+
(declare-rel inv (Int Int Int))
3+
(declare-var x Int)
4+
(declare-var x1 Int)
5+
(declare-var y Int)
6+
(declare-var y1 Int)
7+
(declare-var len Int)
8+
(declare-var len1 Int)
9+
10+
(declare-rel fail ())
11+
12+
(rule (=> (and (= x 0) (= y 0) (>= len 0)) (inv1 x y len)))
13+
14+
(rule (=> (and (inv1 x y len) (= len1 (+ len 1))) (inv1 x y len1)))
15+
16+
(rule (=> (and (inv1 x y len) (= len1 (+ len 80))) (inv x y len1)))
17+
18+
(rule (=>
19+
(and
20+
(inv x y len)
21+
(< x len)
22+
(= x1 (+ x 1))
23+
(= y1 (+ y 2))
24+
)
25+
(inv x1 y1 len)
26+
)
27+
)
28+
29+
30+
(rule (=> (and (inv x y len) (= x len) (not (= (+ x y) (* 3 len)))) fail))
31+
32+
33+
(query fail :print-certificate true)
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
(declare-rel itp1 (Int Int Int))
2+
(declare-rel itp2 (Int Int Int))
3+
4+
(declare-var x1 Int)
5+
(declare-var y1 Int)
6+
(declare-var z1 Int)
7+
(declare-var x2 Int)
8+
(declare-var y2 Int)
9+
(declare-var z2 Int)
10+
11+
(declare-rel fail ())
12+
13+
(rule (=> (and (= x1 0) (= y1 0) (= z1 0)) (itp1 x1 y1 z1)))
14+
15+
(rule (=>
16+
(and
17+
(itp1 x1 y1 z1)
18+
(= x2 (+ x1 1))
19+
(= y2 (+ y1 1))
20+
(= z2 (- z1 2))
21+
)
22+
(itp1 x2 y2 z2)
23+
)
24+
)
25+
26+
(rule (=> (itp1 x1 y1 z1) (itp2 x1 y1 z1)))
27+
28+
(rule (=>
29+
(and
30+
(itp2 x1 y1 z1)
31+
(= x2 (- x1 1))
32+
(= y2 (- y1 3))
33+
(= z2 (+ z1 2))
34+
)
35+
(itp2 x2 y2 z2)
36+
)
37+
)
38+
39+
(rule (=> (and (itp2 x1 y1 z1) (not (=> (<= x1 0) (and (>= z1 0) (<= y1 0))))) fail))
40+
41+
(query fail :print-certificate true)
42+
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
(declare-rel itp1 (Int Int))
2+
(declare-rel itp2 (Int Int))
3+
4+
(declare-var x1 Int)
5+
(declare-var y1 Int)
6+
(declare-var x2 Int)
7+
(declare-var y2 Int)
8+
9+
(declare-rel fail ())
10+
11+
(rule (=> (and (= x1 0) (= y1 0)) (itp1 x1 y1)))
12+
13+
(rule (=>
14+
(and
15+
(itp1 x1 y1)
16+
(= x2 (+ x1 1))
17+
(= y2 (+ y1 1))
18+
)
19+
(itp1 x2 y2)
20+
)
21+
)
22+
23+
(rule (=> (itp1 x1 y1) (itp2 x1 y1)))
24+
25+
(rule (=>
26+
(and
27+
(itp2 x1 y1)
28+
(= x2 (- x1 1))
29+
(= y2 (- y1 1))
30+
)
31+
(itp2 x2 y2)
32+
)
33+
)
34+
35+
36+
(rule (=> (and (itp2 x1 y1 ) (not (=> (<= x1 0) (<= y1 0)))) fail))
37+
38+
39+
(query fail :print-certificate true)
40+

0 commit comments

Comments
 (0)