Skip to content

Explicit modifier for invariants #3800

@wadoon

Description

@wadoon

For now, we could simply deactivate these invariants. For the test cases there are not needed. But as a showcase for automatically generating JML they are quite sufficient.

But you also want to use these invariants outside of the scope of this record.

I would still prefer class axioms, which should become Taclets.

Also better, the introduction of named (static) invariants, which are then not automatically added, and the extension of \static_invariant_for(obj, name) to put them on the sequent.

My final suggestion would be:

//@ public explicit static invariant_free taut1: 1+1==2;

The explicit modifier (present in C++) marks that the invariant is not implicitly added to $inv (only possible with free inv), and need to grasp explicitly.

I would also say, we should a warning or synonym on axiom (and treat thi as an invariant_free).

Originally posted by @wadoon in #3758 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions