We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
contains
import <adt/derives.vpr> adt List[T] { Nil() Cons(value: T, tail: List[T]) } derives { contains } method client() { var x: List[Int] := Cons(42, Cons(33, Nil())) assert contains(42, x) // passes, as expected assert !contains(0, x) // fails }
I think the axioms generated for contains are strong enough to prove which values are in the given ADT, but they do not say which values are not.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I think the axioms generated for
contains
are strong enough to prove which values are in the given ADT, but they do not say which values are not.The text was updated successfully, but these errors were encountered: