Skip to content
This repository was archived by the owner on Jan 27, 2021. It is now read-only.
This repository was archived by the owner on Jan 27, 2021. It is now read-only.

Invariants from other isolates are only assumed before actions, not after #92

@jtassarotti

Description

@jtassarotti

The invariant in isolate safety2 in the following example fails:

#lang ivy1.7

relation p
relation r

object actions = {
 after init {
   p := false;
 }
 
 action toggle1 = {
   p := true;
 }
 
 export toggle1
}

isolate myaxiom = {
 axiom r
}

isolate safety1 = {
 invariant p -> r
} with actions, myaxiom

isolate safety2 = {
 invariant p -> r
} with actions, safety1

More generally, I expected if isolate A has invariant Q and isolate B has invariant T, then when we use with A on B, the check for B would try to prove that for each action from state s to s', Q(s) /\ T(s) /\ Q(s') -> T(s'), but instead it seems to check Q(s) /\ T(s) -> T(s'). (#19 seemed related but was about initialization.)

If I understand correctly, the way the invariants from A are incorporated is by essentially adding them as assume statements at the beginning of each action -- perhaps they could also soundly be added as assume statements at the end?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions