-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add prusti_refute! macro * Add macro to generate getters/setters for fields via JNI * Resolve fmt-check and clippy errors, simplify naming, small refactoring * Add test for field! macro * Update field! macro to not ask for signature (WIP) * Update field! macro to search all the class hierarchy for the field to determine its signature * Rename variables, add comments, delete leftover commented code * Follow update in master branch * current code, just a snapshot of my working dir * fix bug with env/ast_utils with_local_frame - calling wrong function * add * Remove unecessary changes * additional temporary code removal * Add "refute.failed:refutation.true" into error_manager * Remove unnecessary code, fmt-all * cargo lock update * add frotend support also for carbon * add assert.failed:assertion.false-PanicCause::Refute entry to the error manager * Add field access via Scala methods, use SilFrontend wrapper and remove unecessary dispatch * Remove empty line - fmt-all error * add tests for prusti_refute! * update docs (user guide) - add mention to refute * Add disclaimer about soundness, formatting * remove unecessary case in the error manager * typo - remove blank line --------- Co-authored-by: Simon Hrabec <[email protected]> Co-authored-by: Jonáš Fiala <[email protected]>
- Loading branch information
1 parent
8b07095
commit c1d3447
Showing
26 changed files
with
393 additions
and
14 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
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
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
File renamed without changes.
30 changes: 30 additions & 0 deletions
30
prusti-tests/tests/verify_overflow/fail/assert_assume_refute/prusti_refute.rs
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,30 @@ | ||
#![allow(unused)] | ||
|
||
use prusti_contracts::*; | ||
|
||
fn refute1() { | ||
prusti_refute!(false); | ||
} | ||
|
||
fn failing_refute() { | ||
prusti_refute!(true); //~ ERROR | ||
} | ||
|
||
fn unreachable_branch_sign(val: i32) -> i32 { | ||
if val <= 0 { | ||
-1 | ||
} else if val >= 0 { | ||
1 | ||
} else { | ||
prusti_refute!(false); //~ ERROR | ||
0 | ||
} | ||
} | ||
|
||
#[requires(val < 0 && val > 0)] | ||
fn no_valid_input(val: i32) -> i32 { | ||
prusti_refute!(false); //~ ERROR | ||
42 | ||
} | ||
|
||
fn main() {} |
File renamed without changes.
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
Oops, something went wrong.