Repository navigation
Allow user to specify CBMC's solver #2088
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
38d0292
1d3738c
f8720c2
e426f79
73cdf49
da917fb
a2635c7
d86882c
11af24b
95cb615
342f16d
cd8ecbb
8b9992f
0dde227
640500b
51d98d0
f5e34b7
fb9bab7
f5e3e5a
e05bd9b
7210132
947da6d
3b0915f
077d94e
da808d5
841134c
74cc438
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| // Copyright Kani Contributors | ||
| // SPDX-License-Identifier: Apache-2.0 OR MIT | ||
|
|
||
| use serde::{Deserialize, Serialize}; | ||
| use strum_macros::{AsRefStr, EnumString, EnumVariantNames}; | ||
|
|
||
| /// An enum for CBMC solver options. All variants are handled by Kani, except for | ||
| /// the `Custom` one, which it passes as is to CBMC's `--external-sat-solver` | ||
| /// option. | ||
| #[derive( | ||
| Debug, | ||
| Clone, | ||
| AsRefStr, | ||
| EnumString, | ||
| EnumVariantNames, | ||
| PartialEq, | ||
| Eq, | ||
| Serialize, | ||
| Deserialize | ||
| )] | ||
| #[strum(serialize_all = "snake_case")] | ||
| pub enum CbmcSolver { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's the reason for this to be
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since the solver is currently specific for CBMC, and we're not yet clear on future plans, and whether this solver will apply to other engines as well, I added CBMC to its name.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tend to agree with @adpaco-aws here, but this is an implementation detail that is internal to our code, so we can easily rename this later. |
||
| /// The kissat solver that is included in the Kani bundle | ||
| Kissat, | ||
|
|
||
| /// MiniSAT (CBMC's default solver) | ||
| Minisat, | ||
|
|
||
| /// A custom solver variant whose argument gets passed to | ||
| /// `--external-sat-solver`. The specified binary must exist in path. | ||
| #[strum(disabled, serialize = "custom=<SAT_SOLVER_BINARY>")] | ||
| Custom(String), | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you make this message more specific to the
customoption?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This message is not specific to
custom. It is emitted when the argument received is neither aMetaItemKind::WordorMetaItemKind::NameValue.