feat(runtimes): add first-class TLA+/TLC runtime support#1223
Draft
Copilot wants to merge 3 commits into
Draft
Conversation
Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add TLA+ / TLC runtime support to ado-aw
feat(runtimes): add first-class TLA+/TLC runtime support
Jun 26, 2026
Collaborator
|
@copilot we should be using JavaToolInstall from the compiler IR. Hook it up to the TLA frontmatter. |
…tion
Replace the manual bash curl/tar JRE download from Eclipse Temurin (Adoptium)
with the JavaToolInstaller@0 ADO task from the compiler IR (pre-installed mode),
mirroring the pattern used by node/python/dotnet runtimes.
- TlaExtension.declarations() now emits two prepare steps:
1. Step::Task(JavaToolInstaller@0, PreInstalled) — selects the pre-installed
JDK matching runtimes.tla.jdk and sets JAVA_HOME
2. Step::Bash — downloads tla2tools.jar and creates tlc/pluscal/sany shims
that delegate to `java` from PATH (set by the preceding task)
- Removes the `java` network host (no Adoptium download needed)
- Adds $(JAVA_HOME) to AWF mounts and $(JAVA_HOME)/bin to AWF path prepends
so `java` is accessible inside the AWF chroot
- Replaces TLA_JAVA_HOME pipeline variable with standard JAVA_HOME
- Renames generate_tla_install -> generate_tla_tools_install
- Updates docs and prompt snippets accordingly
Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>
Contributor
Author
Done in the latest commit.
The manual Adoptium curl/tar download is removed. Since |
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.
Adds
runtimes: tla:— a first-class TLA+/TLC runtime mirroring the existinglean,python,node, anddotnetruntimes. Closes the gap for agentic workflows that want to run formal model checking (TLC is the counterpart to Lean: it discovers liveness/safety violations exhaustively rather than proving a fixed design).What
runtimes: tla:doesJavaToolInstaller@0(pre-installed mode) — selects the JDK matchingruntimes.tla.jdkand setsJAVA_HOMEtla2tools.jarfrom TLA+ GitHub releases →$HOME/.tla/tlc(tlc2.TLC),pluscal(pcal.trans),sany(tla2sany.SANY) in$HOME/.tla/bin/— shims delegate tojavafrom PATH$HOME/.tlaand$(JAVA_HOME)read-only into the AWF sandbox$HOME/.tla/binand$(JAVA_HOME)/bininside the AWF chrootjava,tlc,pluscal,sanyTLA_JARpipeline variable;JAVA_HOMEis set byJavaToolInstaller@0Changes
src/runtimes/tla/— new module:TlaRuntimeConfig/TlaOptionsconfig types,generate_tla_tools_install()bash script builder (tla2tools.jar + shims only),TlaExtensionimplementingCompilerExtensionwith two prepare steps:Step::Task(JavaToolInstaller@0)+Step::Bashsrc/runtimes/mod.rs—pub mod tlasrc/compile/types.rs—tlafield inRuntimesConfigsrc/compile/extensions/mod.rs—Tla(TlaExtension)variant, re-export,collect_extensionswiringsrc/compile/common.rs+standalone.rs—tla: Nonein existing testRuntimesConfigstruct literalsdocs/runtimes.md— full TLA+ section: field reference, shim table, env vars, example model-checking workflowprompts/create-ado-agentic-workflow.md—tla:snippet; updated runtime notesTest plan
cargo test— all 2292 tests pass. TLA+ unit tests cover: default JDK task step (JavaToolInstaller@0versionSpec"21"), pinned versions, latest jar URL, injection rejection forversion:andjdk:, and the bash-disabled warning.