Comments (4)
Bitbucket user Korbinian Breu commented on 2014-01-18 13:46
I just created a pull request that solves this issue - however, there may be more work to do, because apparently scopes are not built to be nested?
The following gives no error:
#!scala
method k(S:Seq[Ref]) {
while(true) {
var bla:Int
}
assume bla == 5
}
from silver.
@alexanderjsummers commented on 2014-01-20 13:11
Thanks for the fix - that's great!
We don't really have block scopes in SIL; the program that you wrote above is treated analogously to
#!scala
method k(S:Seq[Ref]) {
var bla:Int
while(true) {
}
assume bla == 5
}
In particular, if one "declares" a local variable with the same name in the two branches of an if-conditional (or in nested blocks), then an error is expected. This is a bit confusing, but we didn't want scopes built-in, and forcing all declarations to be at the start of the method body can be a bit annoying if the method gets large...
from silver.
@alexanderjsummers commented on 2014-01-22 13:16
Fixed in commit c206a59
from silver.
@alexanderjsummers on 2014-01-22 13:16:
- changed
state
fromnew
toresolved
from silver.
Related Issues (20)
- Avoid linear scans in Program.find* methods HOT 3
- Slow pretty-printer and consistency checks
- Asserting quantified permission not supported in Carbon HOT 2
- Support for special Z3 relations HOT 1
- Can ensure false as the post-condition of a function HOT 2
- Incorrect field assignments crash Viper
- The semantics of permission introspection in the body of unfolding expressions is unclear
- Trigger inference infers invalid triggers HOT 4
- Silicon not using variables assigned through let statements
- Decreases in method giving error: Verification aborted exceptionally HOT 4
- Empty ADT causes "unsoundness" HOT 1
- Parser and pretty-printer do not preserve scopes HOT 1
- Wildcard permission can be interpreted as greater than one HOT 2
- Termination Plugin: Generates ill-formed Viper code for input with let expressions HOT 2
- Resources can be used on left of implication in assumes
- Missing hashCode definitions
- Crash parsing predicate access with no arguments in `assume` HOT 1
- No non-pure check for predicate access arguments
- Is it intentional that adt exclusivity is not enforced? HOT 1
- Generic domain function application needs trivial type variable map with uninsightful error message
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 silver.