ivy icon indicating copy to clipboard operation
ivy copied to clipboard

strange behavior with structs as member of parameterized object

Open nano-o opened this issue 4 years ago • 1 comments

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 avatar Jul 19 '21 21:07 nano-o

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

nano-o avatar Jun 01 '22 22:06 nano-o