More constraints for Sys #133
edwintorok
started this conversation in
Show and tell
Replies: 1 comment 2 replies
-
I would suggest introducing a predicate This would allow the user to choose between:
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I've attempted to define constraints for a few more values in the Sys module. Should these all go into the base Gospel stdlib, or would the constraints be better in cameleer with just the declarations in Gospel? (I can raise a PR with what I have so far if it is useful)
Currently values like
max_array_length
aren't constrained (neither in the base Gospel or Cameleer implementation), which means that usingcvc4-ce
to generate counter examples quite often picks a very low number for this that might falsify a formula, that could never happen in practice if you look at what the lowest value is on a 32-bit build.This is what I've come up with so far:
word_size
is defined as an axiom that can be either 32-bit or 64-bit, and then based on that the ranges of further constants are restricted (usingensures
as the docs say for constants doesn't work unfortunately, the counterexampl e generator completely ignores it and generates counterexamples that would fail the constraints - albeit probably a cameleer bug - but using axiom works:Beta Was this translation helpful? Give feedback.
All reactions