-
Notifications
You must be signed in to change notification settings - Fork 37
Fixes to Transition Systems #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…sitionSystem (compiles but untested)
|
@makaimann you mentioned that you were running the HWMCC benchmarks on the cluster. Did the run finish? |
…ds used on functional transition system
|
I just realized that the unroller needs to be updated so that it works with |
|
Here are the latest results! No discrepancies with master, the two errors in master are now timeouts, and we only lose 3 benchmarks for |
CMakeLists.txt
Outdated
|
|
||
| if (WITH_CVC4) | ||
| if (NOT EXISTS "${PROJECT_SOURCE_DIR}/deps/smt-switch/local/lib/libsmt-switch-cvc4.${SHARED_LIBRARY_EXT}") | ||
| message(FATAL_ERROR "Missing smt-switch mathsat library -- try running ./contrib/setup-smt-switch.sh --with-cvc4") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: mathsat -> cvc4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch! Fixed with f038c80
core/ts.cpp
Outdated
| throw CosaException("Unknown state variable"); | ||
| } | ||
|
|
||
| if (!no_next(val)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-format
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Formatted with 1308d79
core/ts.cpp
Outdated
|
|
||
| // protected methods | ||
|
|
||
| bool TransitionSystem::only_curr(const Term & term) const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we can create a common function contains(const Term & term, TermVec vec).
only_curr(term t) := contains(t, states_)
no_next(term t) := contains(t, states_ + inputs_)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea! Implemented with b78fe5a
|
Because the change in b78fe5a is somewhat non-trivial, I'm going to rerun the benchmarks to ensure I didn't introduce any bugs. I'll post the results asap. |
|
updates on the new experiment run... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job :)
Based on earlier discussion, this PR swaps the inheritance relationship between
RelationalTransitionSystemandFunctionalTransitionSystem. Furthermore, it dropsRelationaland just calls it a generalTransitionSystem. Furthermore, it enforces that INIT/INVAR/PROP use only state variables. It adds aconstrain_inputsfunction which will add a constraint to TRANS only over current states and inputs. There's also a convenience function that picks betweenadd_invarandconstrain_inputs, based on whether the constraint contains inputs.Because there will sometimes be inputs in the property, the
btor2_encoderwill make a witness for the bad state if necessary. I'm not sure if it makes sense to do this here, or later. But, this was the easiest place to add it now. Note that this can add lots of states to the system: e.g. if the BTOR2 file has lots of bad states that have inputs in them, there's one witness for each of those, even if we're only checking one property. I'm open to other solutions if people have suggestions. In the future, maybe we should copy the transition systems for each property and modify it per property. This also make sense for COI @lonsing .Note, I'm currently running it on the HWMCC19 benchmarks to check for any potential bugs I introduced.