GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Soundness: a to that sets another object's state drops the receiver's frame (x.observe(y) forgets x's state) · Issue #504 · liquid-java/liquidjava

Soundness: a to that sets another object's state drops the receiver's frame (x.observe(y) forgets x's state) #504

New issue
Copy link
New issue
Copy link
Open
Open
Soundness: a to that sets another object's state drops the receiver's frame (x.observe(y) forgets x's state)#504
Copy link
Labels
bugSomething isn't workingSomething isn't working

Description

@CatarinaGamboa
CatarinaGamboa
opened on Nov 9, 2026
Issue body actions

Problem (soundness). getMissingStates keeps a state set of this unchanged only if to does not mention that set. A state counts as a mention whatever object it is applied to, so a method that changes another object's state forgets the receiver's state.

import liquidjava.specification.*;

@StateSet({"closed", "opened"})
public class FrameOther {
    @StateRefinement(to = "closed(this)")
    public FrameOther() {}

    @StateRefinement(from = "opened(this)", to = "closed(this)")
    public void close() {}

    @StateRefinement(to = "opened(other)")
    public void observe(FrameOther other) {}

    public static void main(String[] args) {
        FrameOther x = new FrameOther();
        FrameOther y = new FrameOther();
        x.observe(y);
        x.close(); // fine only if x is still closed is NOT required; close needs opened(x)
    }
}

This passes verification, but x is still closed when x.close() (from opened) is called. observe's to is opened(other). Because opened appears in it, state1(this) == state1(old(this)) is not added, so x's set is unconstrained after the call.

Fix. A set counts as mentioned only when to constrains it on the post-state receiver, this. That is a state or the set function applied to this, and not to old(this) or another object.

Found while designing #502.

Activity

  1. CatarinaGamboa
    added
    bugSomething isn't workingSomething isn't working
    on Nov 9, 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

    bugSomething isn't workingSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.