Replace CProver_Assert with Assert Statment; Adds Property Class#1002
Replace CProver_Assert with Assert Statment; Adds Property Class#1002jaisnan merged 28 commits intomodel-checking:mainfrom
Conversation
src/kani-compiler/src/codegen_cprover_gotoc/codegen/intrinsic.rs
Outdated
Show resolved
Hide resolved
src/kani-compiler/src/codegen_cprover_gotoc/codegen/intrinsic.rs
Outdated
Show resolved
Hide resolved
src/kani-compiler/src/codegen_cprover_gotoc/codegen/intrinsic.rs
Outdated
Show resolved
Hide resolved
src/kani-compiler/src/codegen_cprover_gotoc/codegen/statement.rs
Outdated
Show resolved
Hide resolved
| Stmt::assert(expect_true.clone(), &assert_msg, loc.clone()), | ||
| Stmt::assert_statement( | ||
| expect_true.clone(), | ||
| "sanity_check", |
There was a problem hiding this comment.
Is this meant to be hard-coded?
There was a problem hiding this comment.
I couldn't come up with a better solution tbh. Open to suggestions about how to address property_class values in cprover_bindings. Maybe I can use the PropertyClass Enum values from codegen here?
There was a problem hiding this comment.
No worries... I think we discussed that before, didn't we? Sorry
There was a problem hiding this comment.
We agreed to separate the enum from cprover_bindings and place it in codegen, but beyond that i dont think we discussed about calling the enum from codegen again in cprover_bindings. I can do that but i feel like it would remove the seperation of logic, which is why i just hardcoded the string.
open to any suggestions regarding this.
| AssertFalse, | ||
| Assume, | ||
| DefaultAssertion, | ||
| CustomProperty(String), |
There was a problem hiding this comment.
Should this be InternedString
There was a problem hiding this comment.
i think so, will change it to use that.
There was a problem hiding this comment.
Forgot to update this but we don't use InternedString on the codegen side of things so I just left it as String for now.
…nto Jaisnan-Issue-907
…isnan-Issue-907
…nto Jaisnan-Issue-907
…nto Jaisnan-Issue-907
zhassan-aws
left a comment
There was a problem hiding this comment.
A couple of minor comments, but overall looks good!
We probably need to classify some of the checks using their own property class, e.g. non-null virtual function, unreachable code, etc., but we can do that in later PRs.
…el-checking#1002) * Replace cprover_Asserts * Add Tests for Property Classes
* Replace cprover_Asserts * Add Tests for Property Classes
Description of changes:
CProver_assertfunction calls with Assert Statements.assert_falsefunction body with newassert_statementResolved issues:
Resolves #907
Call-outs:
This change potentially has far reaching consequences for the UI and could have some unintended consequences. Existing tests don't quite cover it.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.