Skip to content

Explicit modifier for invariants #3800

Closed

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)

Activity

  1. locked and limited conversation to collaborators on Apr 8, 2026
  2. converted this issue into a discussion #3801 on Apr 8, 2026
  3. added
    RFC"Request for comments" is the appeal for making and expressing your opinion on a topic.
    on Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    RFC"Request for comments" is the appeal for making and expressing your opinion on a topic.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions