Comments (4)
Prusti no longer crashes, and the output is now the following:
error: [Prusti: unsupported feature] the encoding of this reference copy has not been implemented
--> tmp/program.rs:34:16
|
34 | set.remove(&3);
| ^^
error: [Prusti internal error] generating fold-unfold Viper statements failed (FailedToObtain(Pred(Local(_2: Ref(__TYPARAM__$T$__), Position { line: 18, column: 15, id: 168 }), read)))
--> tmp/program.rs:19:5
|
19 | / pub fn insert(&mut self, value: T) {
20 | | self.set.insert(value);
21 | | }
| |_____^
error: [Prusti: verification error] postcondition might not hold.
--> tmp/program.rs:23:15
|
23 | #[ensures(!self.contains(&value))]
| ^^^^^^^^^^^^^^^^^^^^^^
|
note: the error originates here
--> tmp/program.rs:24:5
|
24 | / pub fn remove(&mut self, value: &T) -> bool {
25 | | self.set.remove(value)
26 | | }
| |_____^
The "Prusti internal error" is still a bug.
from prusti-dev.
The contract of insert
is problematic: we would like to express #[ensures(self.contains(&old(value)))]
, but since value
is of a generic type then old(value)
raises an internal error. This should be fixed by #187.
from prusti-dev.
Related to #418
from prusti-dev.
Things work here except for the constants like &3
. The workaround is to put the constant into a variable, then reference that variable.
from prusti-dev.
Related Issues (20)
- Prusti panics on `slices in loops not yet implemented`
- Prusti Assistant Server fails to load on Apple Silicon m2 HOT 1
- How to install cargo-prusti into cargo? HOT 1
- Errors with extern_spec on SliceIndex trait
- Bug when accessing fields of elements of Vector / HashMap
- Imposing pre-condition when implementing traits? HOT 1
- Verifier won't detect trait functions for a usize wrapper type are pure
- Properties of HashMap wrapper structs specified in predicate fails to get verified
- Incorrect help message for `cargo-prusti`
- Prusti panics when executed from / or /data/
- Upgrade test suite to ui_test HOT 1
- Prusti proves `false` in `tests/verify_overflow/pass/extern-spec/linked-list.rs` HOT 2
- Insufficient access permission HOT 1
- Unsound verification when cloning vector elements
- unsoundness when verifying reference-typed fields with quantifiers
- External specification for std::cmp::Ord crashing Prusti HOT 1
- Stack overflow for mutually recursive specifications
- Issues with verifying the result is None HOT 4
- Compiler shows `non_snake_case` warnings for internal `prusti_extern_spec_...` functions HOT 1
- (Documentation of) Closures HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prusti-dev.