Skip to content
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

Consistency errors with triggers #815

Closed
JLedelay opened this issue Oct 13, 2022 · 0 comments
Closed

Consistency errors with triggers #815

JLedelay opened this issue Oct 13, 2022 · 0 comments
Labels
A-Bug R Rewriting problem

Comments

@JLedelay
Copy link

The following input:

class C {
    final Object[] arr;

    /*@
        inline resource common() =
            arr != null ** 
            Perm(arr[*], 1\2) **
            (\forall int i = 0 .. arr.length; 
                (\forall int j = 0 .. arr.length; i != j ==>
                    arr[i] != arr[j]));
    @*/

    //@ requires common();
    void m() {

    }
}

Gives the following output:

[INFO] Starting verification
[WARN] The binder '(\forall int i; true; (i\memberof{0 .. this.arr.length}) ==> (\forall int j; true; (j\memberof{0 .. this.arr.length}) && i != j ==> this.arr[i] != this.arr[j]))' contains no triggers
The silver AST delivered to viper is not valid:
 - Consistency error: Variable i is not mentioned in one or more triggers. (Test.java-13-18;unique_id=302)
 - Consistency error: Variable i is not mentioned in one or more triggers. (Test.java-13-18;unique_id=390)

Note that no triggers were specified in the source file. If any triggers are added, these errors don't go away.

@pieter-bos pieter-bos added A-Bug R Rewriting problem labels Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Bug R Rewriting problem
Projects
None yet
Development

No branches or pull requests

2 participants