Skip to content

Retire the Stately backend#949

Merged
ankushdesai merged 1 commit into
masterfrom
claude/retire-stately-backend
May 24, 2026
Merged

Retire the Stately backend#949
ankushdesai merged 1 commit into
masterfrom
claude/retire-stately-backend

Conversation

@ankushdesai

Copy link
Copy Markdown
Member

Summary

Retires the Stately backend (state-diagram export), which is no longer maintained. This is the first step in simplifying the multi-backend codebase.

Deletes Src/PCompiler/CompilerCore/Backend/Stately/ (StatelyCodeGenerator.cs, CompilationContext.cs) and unwires every reference:

  • CompilerOutput: drop the Stately enum value.
  • TargetLanguage: drop the Stately backend registration and its using.
  • PCompilerOptions: drop the stately --mode case, remove it from the allowed-values list, and update the help text.
  • ParsePProjectFile: drop the stately project Target case and remove Stately from the expected-target error message.

Scope / safety

  • grep -ri stately across Src, Tst, Tutorial, .github returns nothing after the change.
  • No tutorials, unit tests, or CI jobs referenced Stately, so nothing else needs updating.
  • The other backends (PChecker, PEx, PObserve, PVerifier) are untouched.

Verified locally (.NET 8 SDK)

  • dotnet build of PCommandLine (pulls in CompilerCore + CheckerCore): 0 errors (only the unrelated pre-existing TransformASTPass.cs:796 CS0162 warning).
  • dotnet build of UnitTests: 0 errors.

Note: this is a user-visible removal — p compile --mode stately and <Target>Stately</Target> in .pproj files will now error. That's intended.


Generated by Claude Code

Removes the Stately (state-diagram export) code generator, which is no
longer maintained. Deletes Src/PCompiler/CompilerCore/Backend/Stately/
and unwires it everywhere it was referenced:

- CompilerOutput: drop the Stately enum value.
- TargetLanguage: drop the Stately backend registration and using.
- PCompilerOptions: drop the 'stately' --mode case, the allowed value,
  and the help-text mention.
- ParsePProjectFile: drop the 'stately' project Target case and remove
  Stately from the expected-target error message.

No tutorials, tests, or CI jobs referenced Stately. Build and unit
tests pass.
Copilot AI review requested due to automatic review settings May 24, 2026 22:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Retires the unmaintained Stately backend by removing its implementation and unwiring it from the compiler’s backend registration and CLI/project-file target parsing.

Changes:

  • Removed the Stately backend implementation and its registration in TargetLanguage.
  • Removed CompilerOutput.Stately and eliminated CLI / .pproj parsing support for stately.
  • Updated user-facing help/error strings to no longer mention Stately.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
Src/PCompiler/PCommandLine/Parser/ParsePProjectFile.cs Removes stately target parsing and updates the invalid-target error message.
Src/PCompiler/PCommandLine/Options/PCompilerOptions.cs Removes stately from --mode help text and allowed values; removes stately switch case.
Src/PCompiler/CompilerCore/CompilerOutput.cs Removes Stately from the CompilerOutput enum.
Src/PCompiler/CompilerCore/Backend/TargetLanguage.cs Removes Stately backend using and registration.
Src/PCompiler/CompilerCore/Backend/Stately/StatelyCodeGenerator.cs Deletes the Stately code generator implementation.
Src/PCompiler/CompilerCore/Backend/Stately/CompilationContext.cs Deletes Stately compilation context.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

default:
throw new CommandlineParsingError(
$"Expected PChecker, PObserve, Stately, PVerifier, or Symbolic as target, received {projectXml.Element("Target")?.Value}");
$"Expected PChecker, PObserve, PVerifier, or Symbolic as target, received {projectXml.Element("Target")?.Value}");
var modes = Parser.AddArgument("mode", "md", "Compilation mode to use. Can be bugfinding, pex, pobserve, or stately. If this option is not passed, bugfinding mode is used as default");
modes.AllowedValues = new List<string>() { "bugfinding", "pex", "pobserve", "stately", "verification", "coverage" };
var modes = Parser.AddArgument("mode", "md", "Compilation mode to use. Can be bugfinding, pex, or pobserve. If this option is not passed, bugfinding mode is used as default");
modes.AllowedValues = new List<string>() { "bugfinding", "pex", "pobserve", "verification", "coverage" };
@ankushdesai ankushdesai merged commit 199e805 into master May 24, 2026
9 of 11 checks passed
@ankushdesai ankushdesai deleted the claude/retire-stately-backend branch May 24, 2026 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants