Comments (4)
Thanks for the report.
Can you explain to me why you think the expected result of "unknown" is correct? The ground truth is that the file is either SAT (fails verification) or UNSAT (passes verification), unknown is simply what the SMT solver reports when it can't figure out the actual answer.
I don't know why the SMT solver can find a solution in the second case but not in the first, I'll look into it, but note that if an "assert false" is unreachable, it will pass verification.
from uclid.
Thank you for the answer. Whenever assert false;
statement could be reached in a path, uclid
seems to generate an unknown (==UNDEF)
result.
In the above examples, the point before call simple_test();
(line 1706) is always reachable. Thus, if simple_test()
procedure is not malfunctioning, the point after call simple_test();
should be also reachable (line 1708), which is assert false;
. I thought that [expected results]
are generated, because assert false
is reached as expected.
In contrast, while the same procedure is called and all the assumptions are the same, the assert false
in line 1708 is not reached in the [unexpected results]
.
I am not sure why assert false
is unreachable in the second case (unexpected results).
from uclid.
I think you have misunderstood the UNDEF/unknown results. All that means is that the SMT problem is too hard for the SMT solver to solve so we don't know whether your assert false is reachable or not. The correct result cannot ever be "undef" because the correct result is never "we don't know".
To summarise, for an assert false, if UCLID reports:
- verification failed (sat) - the assertion is definitely reachable
- verification passed (unsat) - the assertion is definitely unreachable
- undef (unknown) - the problem is too hard for the SMT solver. We don't know the answer.
We do not know if the line before simple_test is reachable either, because an assert false in that position is reported as UNDEF.
Take a look at the SMT files. The reason the files generated by your first branch are unknown is because there are a lot of difficult quantifiers. This is a much simplified version of part of one of your queries and an SMT solver reports unknown:
(set-logic ALL)
(declare-fun f (Int) Int)
(assert (forall ((v1 Int) (v2 Int))
(or (not (= (f v1)(f v2)))
(= v1 v2))
))
(check-sat)
The reason the second file can be verified, is the final two assertions are trivial to solve:
(assert (not (and (= havoc_172_proof_op tap_proof_op_enter) (not havoc_95_done))))
(assert (and (= havoc_172_proof_op tap_proof_op_enter) (not havoc_95_done)))
Without going into your proofs in detail, I'm not sure where these conflicting assertions have come from. I am happy to take a look if you can provide a more minimal input
from uclid.
Thank you for the detailed answer. I seem to have misunderstood the UNDEF/unknown results.
I've made another example, but removed it because there was a logic error in that example.
from uclid.
Related Issues (20)
- Assumption on array causes malfunctioning checks HOT 5
- The `bmc` command currently ignores `assert` statements. HOT 1
- error splitting commands HOT 1
- TODO: printing of enums in synth functions
- Record Rewriter's Bugs
- RewriteRecordSelect conflicts with printing individual fields in counterexamples HOT 5
- Simple liveness checks incorrectly passing HOT 1
- Counterexample doesn't make sense HOT 3
- ADT TODOs
- Type Checking with ADTs
- Unsimplified SynonymType in DataType HOT 1
- `generateDatatype` does not generate inner types for ADTs
- Can an ADT reuse same field names for different constructors? HOT 1
- ADT is facing some canonicalization issue during module instantiation
- Bug in RewritePolymorphicSelect HOT 1
- Tester application without argument causes crash
- ADT Type Confusion
- SMTLIB declaration dependencies ignored
- Bit-vector arithmetic questions 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 uclid.