Skip to content

Commit 199e805

Browse files
ankushdesaiclaude
andauthored
Retire the Stately backend (#949)
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. Co-authored-by: Claude <noreply@anthropic.com>
1 parent f94e9ab commit 199e805

6 files changed

Lines changed: 3 additions & 235 deletions

File tree

Src/PCompiler/CompilerCore/Backend/Stately/CompilationContext.cs

Lines changed: 0 additions & 11 deletions
This file was deleted.

Src/PCompiler/CompilerCore/Backend/Stately/StatelyCodeGenerator.cs

Lines changed: 0 additions & 212 deletions
This file was deleted.

Src/PCompiler/CompilerCore/Backend/TargetLanguage.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
using Plang.Compiler.Backend.CSharp;
33
using Plang.Compiler.Backend.Java;
44
using Plang.Compiler.Backend.PEx;
5-
using Plang.Compiler.Backend.Stately;
65
using Plang.Compiler.Backend.PVerifier;
76

87
namespace Plang.Compiler.Backend
@@ -16,7 +15,6 @@ static TargetLanguage()
1615
{
1716
RegisterCodeGenerator(CompilerOutput.PChecker, new PCheckerCodeGenerator());
1817
RegisterCodeGenerator(CompilerOutput.PObserve, new PObserveCodeGenerator());
19-
RegisterCodeGenerator(CompilerOutput.Stately, new StatelyCodeGenerator());
2018
RegisterCodeGenerator(CompilerOutput.PVerifier, new PVerifierCodeGenerator());
2119
RegisterCodeGenerator(CompilerOutput.PEx, new PExCodeGenerator());
2220
}

Src/PCompiler/CompilerCore/CompilerOutput.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ public enum CompilerOutput
44
{
55
PChecker,
66
PObserve,
7-
Stately,
87
PEx,
98
PVerifier
109
}

Src/PCompiler/PCommandLine/Options/PCompilerOptions.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ internal PCompilerOptions()
3838
pfilesGroup.AddArgument("projname", "pn", "Project name for the compiled output");
3939
pfilesGroup.AddArgument("outdir", "o", "Dump output to directory (absolute or relative path)");
4040

41-
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");
42-
modes.AllowedValues = new List<string>() { "bugfinding", "pex", "pobserve", "stately", "verification", "coverage" };
41+
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");
42+
modes.AllowedValues = new List<string>() { "bugfinding", "pex", "pobserve", "verification", "coverage" };
4343

4444
Parser.AddArgument("pobserve-package", "po", "PObserve package name").IsHidden = true;
4545

@@ -159,9 +159,6 @@ private static void UpdateConfigurationWithParsedArgument(CompilerConfiguration
159159
case "pobserve":
160160
compilerConfiguration.OutputLanguages.Add(CompilerOutput.PObserve);
161161
break;
162-
case "stately":
163-
compilerConfiguration.OutputLanguages.Add(CompilerOutput.Stately);
164-
break;
165162
default:
166163
throw new Exception($"Unexpected mode: '{option.Value}'");
167164
}

Src/PCompiler/PCommandLine/Parser/ParsePProjectFile.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,15 +231,12 @@ private IList<CompilerOutput> GetTargetLanguages(FileInfo fullPathName)
231231
case "pobserve":
232232
outputLanguages.Add(CompilerOutput.PObserve);
233233
break;
234-
case "stately":
235-
outputLanguages.Add(CompilerOutput.Stately);
236-
break;
237234
case "pverifier":
238235
outputLanguages.Add(CompilerOutput.PVerifier);
239236
break;
240237
default:
241238
throw new CommandlineParsingError(
242-
$"Expected PChecker, PObserve, Stately, PVerifier, or Symbolic as target, received {projectXml.Element("Target")?.Value}");
239+
$"Expected PChecker, PObserve, PVerifier, or Symbolic as target, received {projectXml.Element("Target")?.Value}");
243240
}
244241
}
245242
}

0 commit comments

Comments
 (0)