Skip to content

Commit a5d8ae7

Browse files
committed
Add integration test with non-linear constraint
1 parent f0a8d83 commit a5d8ae7

File tree

4 files changed

+110
-0
lines changed

4 files changed

+110
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
module TEST
2+
imports INT
3+
imports BOOL
4+
5+
syntax State ::= "init" [token]
6+
| "target" [token]
7+
8+
configuration <k> $PGM:State ~> .K </k>
9+
<x-int> 0:Int </x-int>
10+
<y-int> 0:Int </y-int>
11+
12+
rule [transition]: <k> init => target ... </k>
13+
<x-int> X </x-int>
14+
<y-int> Y </y-int>
15+
requires X <Int (X *Int Y +Int Y) /Int (Y /Int X)
16+
17+
endmodule
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This test is useful for debugging the SMT solver retry logic. To force the solver to return unknown and retry, run the server with a very short SMT timeout, e.g. `booster-dev --smt-timeout 1`.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{"jsonrpc":"2.0","id":1,"result":{"reason":"aborted","depth":0,"state":{"term":{"format":"KORE","version":1,"term":{"tag":"App","name":"Lbl'-LT-'generatedTop'-GT-'","sorts":[],"args":[{"tag":"App","name":"Lbl'-LT-'k'-GT-'","sorts":[],"args":[{"tag":"App","name":"kseq","sorts":[],"args":[{"tag":"App","name":"inj","sorts":[{"tag":"SortApp","name":"SortState","args":[]},{"tag":"SortApp","name":"SortKItem","args":[]}],"args":[{"tag":"DV","sort":{"tag":"SortApp","name":"SortState","args":[]},"value":"init"}]},{"tag":"App","name":"dotk","sorts":[],"args":[]}]}]},{"tag":"App","name":"Lbl'-LT-'x-int'-GT-'","sorts":[],"args":[{"tag":"EVar","name":"VarX","sort":{"tag":"SortApp","name":"SortInt","args":[]}}]},{"tag":"App","name":"Lbl'-LT-'y-int'-GT-'","sorts":[],"args":[{"tag":"EVar","name":"VarY","sort":{"tag":"SortApp","name":"SortInt","args":[]}}]},{"tag":"App","name":"Lbl'-LT-'generatedCounter'-GT-'","sorts":[],"args":[{"tag":"DV","sort":{"tag":"SortApp","name":"SortInt","args":[]},"value":"0"}]}]}}}}}
2+
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
{
2+
"format": "KORE",
3+
"version": 1,
4+
"term": {
5+
"tag": "App",
6+
"name": "Lbl'-LT-'generatedTop'-GT-'",
7+
"sorts": [],
8+
"args": [
9+
{
10+
"tag": "App",
11+
"name": "Lbl'-LT-'k'-GT-'",
12+
"sorts": [],
13+
"args": [
14+
{
15+
"tag": "App",
16+
"name": "kseq",
17+
"sorts": [],
18+
"args": [
19+
{
20+
"tag": "App",
21+
"name": "inj",
22+
"sorts": [
23+
{
24+
"tag": "SortApp",
25+
"name": "SortState",
26+
"args": []
27+
},
28+
{
29+
"tag": "SortApp",
30+
"name": "SortKItem",
31+
"args": []
32+
}
33+
],
34+
"args": [
35+
{
36+
"tag": "DV",
37+
"sort": {
38+
"tag": "SortApp",
39+
"name": "SortState",
40+
"args": []
41+
},
42+
"value": "init"
43+
}
44+
]
45+
},
46+
{
47+
"tag": "App",
48+
"name": "dotk",
49+
"sorts": [],
50+
"args": []
51+
}
52+
]
53+
}
54+
]
55+
},
56+
{
57+
"tag": "App",
58+
"name": "Lbl'-LT-'x-int'-GT-'",
59+
"sorts": [],
60+
"args": [
61+
{"tag":"EVar","name":"VarX","sort":{"tag":"SortApp","name":"SortInt","args":[]}}
62+
]
63+
},
64+
{
65+
"tag": "App",
66+
"name": "Lbl'-LT-'y-int'-GT-'",
67+
"sorts": [],
68+
"args": [
69+
{"tag":"EVar","name":"VarY","sort":{"tag":"SortApp","name":"SortInt","args":[]}}
70+
]
71+
},
72+
{
73+
"tag": "App",
74+
"name": "Lbl'-LT-'generatedCounter'-GT-'",
75+
"sorts": [],
76+
"args": [
77+
{
78+
"tag": "DV",
79+
"sort": {
80+
"tag": "SortApp",
81+
"name": "SortInt",
82+
"args": []
83+
},
84+
"value": "0"
85+
}
86+
]
87+
}
88+
]
89+
}
90+
}

0 commit comments

Comments
 (0)