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

strange behavior with structs as member of parameterized object #24

Open
nano-o opened this issue Jul 19, 2021 · 1 comment
Open

strange behavior with structs as member of parameterized object #24

nano-o opened this issue Jul 19, 2021 · 1 comment

Comments

@nano-o
Copy link

nano-o commented Jul 19, 2021

Hello, Ivy find a counter-example to the following invariant, which seems strange to me:

#lang ivy1.7

type pair_t = struct {
    x : bool,
    y : bool
}

type index

object obj(i:index) = {
    individual p:pair_t
    after init {
        p.x := false;
        p.y := false;
    }
    export action act1 = {
        require p.x = false;
        p.y := true;
    }
    export action act2 = {
        require p.y = false;
        p.x := true;
    }
    invariant ~(p.x & p.y)
}
@nano-o
Copy link
Author

nano-o commented Jun 1, 2022

Using isolate obj instead of object obj seems to fix the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant