Repository navigation
Build each class's state machine once per checker - #414
Open
CatarinaGamboa wants to merge 1 commit into
Open
CatarinaGamboa wants to merge 1 commit into
CatarinaGamboa wants to merge 1 commit into
Conversation
The state machine only depends on specifications, which are all known before a checker starts, so it is built on the first state error in a class and reused for the next ones. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Stacked on #413.
Description
Building a state machine takes about 25 SMT checks for a small class, and each check creates its own Z3 context. The machine only depends on specifications, which are all registered in the first pass, so
TypeCheckernow builds it on the first state error and reuses it for every later error in the same checker. Finding the receiver's current states still runs at each error.Other options considered:
@StateSet: correct programs would pay the SMT cost too. Only worth it once something needs machines without an error, e.g. the fsm diagram.Context:Contextwould depend onstate_machine, which depends oncontext(a package cycle). The other way is a static cache that tracks when specifications change. Neither seemed worth it for the extra hits across classes.Cost
Extra time of
TestExampleson the 269 cases that exist onmain(summed per case, one run each;maintakes 80.3 s):Type of change
Checklist
mvn testpasses locally🤖 Generated with Claude Code