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 — Derive Developer Facing States by rcosta358 · Pull Request #220 · liquid-java/liquidjava

Conversation

@rcosta358

@rcosta358 rcosta358 commented May 13, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

Description

This PR improves error messages by deriving developer-facing states from internal state equalities.
When an error contains an internal equality like state1(new) == state1(old) plus a known developer state for old, the diagnostic now displays the corresponding developer state for new and omits the internal equality once it has served that purpose.

This is for error messages only and does not change SMT verification behavior.

Example

Before

startCompression(param⁷¹) &&
state1(param⁷¹) == state1(param⁶⁹) &&
startTiling(param⁶⁹) &&
startCompression(param⁶⁹)

After

startCompression(param⁷¹) &&
startTiling(param⁶⁹) &&
startCompression(param⁶⁹) &&
startTiling(param⁷¹)

Related Issue

Closes #206.

Type of change

  • Bug fix
  • New feature
  • Documentation update
  • Code refactoring

Checklist

  • Added/updated tests under liquidjava-example/src/main/java/testSuite/ (Correct* / Error*)
  • mvn test passes locally
  • Updated docs/README if behavior or API changed

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@rcosta358
Derive States
883c9ae
@rcosta358
rcosta358 requested a review from CatarinaGamboa May 13, 2026 10:22
@rcosta358 rcosta358 self-assigned this May 13, 2026
@rcosta358 rcosta358 added the error messages Related to error messages label May 13, 2026
@alcides

alcides commented May 13, 2026

Copy link
Copy Markdown
Collaborator

Exactly how do state1 and startTiling relate? It seems startTiling(x) is equals to state1(x) == SOME_CONSTANT_FOR_StartTiling. Is that the case?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@CatarinaGamboa

CatarinaGamboa commented May 13, 2026

Copy link
Copy Markdown
Collaborator

Exactly how do state1 and startTiling relate? It seems startTiling(x) is equals to state1(x) == SOME_CONSTANT_FOR_StartTiling. Is that the case?

Internally, the states are encoded as an uninterpreted function with integer values

@StateSet("startTiling, explicitTiling, setTiling")
// internally, create state1( _ )
//                                == 0 : startTiling
//                                == 1 : explicitTiling
//                                == 2 : setTiling

Then this is very helpful when the state does not change in a function invocation we add to the context something like

state1(x1) == state1(x2)

but this means nothing to the user, so we want to show this using the developer facing states. So we need to apply the equality resolution before we do the state changes from state1( _ ) == 0 : startTiling
Does that make sense?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@alcides

alcides commented May 13, 2026

Copy link
Copy Markdown
Collaborator

Yes, it does!

I think my concern is whether knowing that the state of x1 and x2 must be the same is important to understand the error message (instead of x1 being in state A and x2 also need to be in state A), since the error would persist even if it was state B.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@CatarinaGamboa

CatarinaGamboa commented May 13, 2026

Copy link
Copy Markdown
Collaborator

I think we can maybe just simplify when both sides are instances of the same variable.
Also, we should probably allow the click expand for these cases as well

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@CatarinaGamboa

CatarinaGamboa commented May 14, 2026

Copy link
Copy Markdown
Collaborator

@rcosta358 when running the cli with the ImageWriteParam case I still get the previous error, can you check it?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rcosta358

rcosta358 commented May 14, 2026

Copy link
Copy Markdown
Collaborator Author

We need to merge main first

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rcosta358
Merge branch 'main' into derive-states
387e19b
CatarinaGamboa
CatarinaGamboa requested changes May 14, 2026
View reviewed changes

@CatarinaGamboa CatarinaGamboa left a comment

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need some tests to see if this is working

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

rcosta358 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@rcosta358
rcosta358 marked this pull request as draft May 29, 2026 17:13
@rcosta358 rcosta358 added simplification Related to the simplification of expressions and removed error messages Related to error messages labels May 29, 2026
@rcosta358
rcosta358 force-pushed the derive-states branch from ed490d3 to 387e19b Compare June 9, 2026 13:07
@rcosta358
rcosta358 force-pushed the main branch from 215f1d4 to d91f256 Compare July 27, 2026 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@CatarinaGamboa CatarinaGamboa CatarinaGamboa requested changes

Requested changes must be addressed to merge this pull request.

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@rcosta358 rcosta358

Labels

simplification Related to the simplification of expressions

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

State Names Displayed with Internal Identifiers

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@rcosta358 @alcides @CatarinaGamboa
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.