-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
519 - use SmtSolverError for all Smt-related errors in booster (#525)
As in the legacy backend, the SMT errors are caught at the top level in a handler. An `SMTError` is thrown generally when there is a problem with solver operations. Undecided predicates during rewriting and simplifications are reported back to the client as `SMTSolverError` (code 5) and include the predicates in play in the `data` field. Other errors are reported as runtime errors. As in the legacy backend, we lose all rewriting/simplification work done prior to the SMT error. Fixes #519 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced enhanced error handling for SMT operations, including specific error messages and responses. - Added a new `SetTimeout` feature to control solver operation timeout settings. - **Bug Fixes** - Improved SMT error handling with the addition of `handleSmtError` function, ensuring more robust and informative error responses. - **Refactor** - Updated various modules to improve error handling logic and to support new timeout control feature. - **Tests** - Added a new test case to validate the handling of unknown states in SMT model generation. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
- Loading branch information
Showing
10 changed files
with
168 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# coderabbit configuration, see https://coderabbit.ai/integrations/coderabbit-overrides.v2.json | ||
|
||
language: en # default | ||
early_access: false # default | ||
chat: | ||
auto_reply: false # default true | ||
|
||
reviews: | ||
request_changes_workflow: false # default | ||
high_level_summary: true # default | ||
poem: false # default true | ||
review_status: false # default true | ||
collapse_walkthrough: false # default | ||
path_filters: [] # file patterns (glob patterns) to exclude in a review | ||
path_instructions: [] # adds some phrases (like "make sure to document things" for file patterns. ??? | ||
auto_review: | ||
enabled: true # default | ||
ignore_title_keywords: [] # ignore PRs that have any of those words in the title | ||
labels: ["rabbit-review"] # restrict automated reviews to PRs with one of these labels | ||
drafts: false # default | ||
base_branches: [] # target branches (other than default) for which to review PRs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"jsonrpc":"2.0","id":1,"result":{"satisfiable":"Unknown"}} |
67 changes: 67 additions & 0 deletions
67
test/rpc-integration/test-get-model/state-smt-unknown.get-model
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
{ | ||
"format": "KORE", | ||
"version": 1, | ||
"term": { | ||
"tag": "Equals", | ||
"argSort": { | ||
"tag": "SortApp", | ||
"name": "SortBool", | ||
"args": [] | ||
}, | ||
"sort": { | ||
"tag": "SortApp", | ||
"name": "SortBool", | ||
"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": "X", | ||
"sort": { | ||
"tag": "SortApp", | ||
"name": "SortInt", | ||
"args": [] | ||
} | ||
}, | ||
{ | ||
"tag": "App", | ||
"name": "Lbl'UndsXor-'Int'Unds'", | ||
"sorts": [], | ||
"args": [ | ||
{ | ||
"tag": "EVar", | ||
"name": "X", | ||
"sort": { | ||
"tag": "SortApp", | ||
"name": "SortInt", | ||
"args": [] | ||
} | ||
}, | ||
{ | ||
"tag": "DV", | ||
"sort": { | ||
"tag": "SortApp", | ||
"name": "SortInt", | ||
"args": [] | ||
}, | ||
"value": "256" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters