Skip to content

Commit

Permalink
Don't check initial constraints when "assume-state-defined"
Browse files Browse the repository at this point in the history
  • Loading branch information
geo2a committed Aug 21, 2024
1 parent 5862b70 commit 0c92b66
Show file tree
Hide file tree
Showing 8 changed files with 453 additions and 2 deletions.
7 changes: 6 additions & 1 deletion booster/library/Booster/JsonRpc.hs
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ respond stateVar request =
[ req.logSuccessfulRewrites
, req.logFailedRewrites
]
checkConstraintsConsistent =
case req.assumeStateDefined of
Nothing -> ApplyEquations.CheckConstraintsConsistent
Just False -> ApplyEquations.CheckConstraintsConsistent
Just True -> ApplyEquations.NoCheckConstraintsConsistent
-- apply the given substitution before doing anything else
let substPat =
Pattern
Expand All @@ -154,7 +159,7 @@ respond stateVar request =
mLlvmLibrary
solver
mempty
ApplyEquations.CheckConstraintsConsistent
checkConstraintsConsistent
substPat

case evaluatedInitialPattern of
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "assume-state-defined": true }
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "assume-state-defined": true }
Original file line number Diff line number Diff line change
@@ -0,0 +1,221 @@
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"reason": "stuck",
"depth": 0,
"state": {
"term": {
"format": "KORE",
"version": 1,
"term": {
"tag": "And",
"sort": {
"tag": "SortApp",
"name": "SortGeneratedTopCell",
"args": []
},
"patterns": [
{
"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": "d"
}
]
},
{
"tag": "App",
"name": "dotk",
"sorts": [],
"args": []
}
]
}
]
},
{
"tag": "App",
"name": "Lbl'-LT-'int'-GT-'",
"sorts": [],
"args": [
{
"tag": "EVar",
"name": "N",
"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"
}
]
}
]
},
{
"tag": "And",
"sort": {
"tag": "SortApp",
"name": "SortGeneratedTopCell",
"args": []
},
"patterns": [
{
"tag": "Equals",
"argSort": {
"tag": "SortApp",
"name": "SortBool",
"args": []
},
"sort": {
"tag": "SortApp",
"name": "SortGeneratedTopCell",
"args": []
},
"first": {
"tag": "DV",
"sort": {
"tag": "SortApp",
"name": "SortBool",
"args": []
},
"value": "true"
},
"second": {
"tag": "App",
"name": "Lbl'UndsEqlsEqls'Int'Unds'",
"sorts": [],
"args": [
{
"tag": "EVar",
"name": "N",
"sort": {
"tag": "SortApp",
"name": "SortInt",
"args": []
}
},
{
"tag": "DV",
"sort": {
"tag": "SortApp",
"name": "SortInt",
"args": []
},
"value": "0"
}
]
}
},
{
"tag": "Equals",
"argSort": {
"tag": "SortApp",
"name": "SortBool",
"args": []
},
"sort": {
"tag": "SortApp",
"name": "SortGeneratedTopCell",
"args": []
},
"first": {
"tag": "DV",
"sort": {
"tag": "SortApp",
"name": "SortBool",
"args": []
},
"value": "true"
},
"second": {
"tag": "App",
"name": "LblnotBool'Unds'",
"sorts": [],
"args": [
{
"tag": "App",
"name": "Lbl'UndsEqlsEqls'Int'Unds'",
"sorts": [],
"args": [
{
"tag": "EVar",
"name": "N",
"sort": {
"tag": "SortApp",
"name": "SortInt",
"args": []
}
},
{
"tag": "DV",
"sort": {
"tag": "SortApp",
"name": "SortInt",
"args": []
},
"value": "0"
}
]
}
]
}
}
]
}
]
}
}
}
}
}
Loading

0 comments on commit 0c92b66

Please sign in to comment.