Prove the semver and solver kernel instead of testing it
Move number parsing, version ordering and constraints, version sorting and solver literals into src/kernel, with contracts checked by moon prove under overflow-checked integers. Replace the semver behaviour tests with those proofs, keep tests for string parsing, and run the proofs in CI. Version numbers are now 64-bit: the old parser silently wrapped at 2^31. Drop pick_tag, which only tests called. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2d815bbb75
commit
83e694c6c4
16 files changed
+874
-330
No files matched your search
@@ -14,6 +14,10 @@ build-musl:
|
||||
test:
|
||||
moon test --target native
|
||||
|
||||
# Prove src/kernel with overflow-checked integers (needs z3, cvc5 or alt-ergo).
|
||||
prove:
|
||||
MOON_PROVE_PRELUDE_OVERRIDE="${MOON_HOME:-$HOME/.moon}/lib/prelude_proof_machine_int" moon prove src/kernel
|
||||
|
||||
# Install Orbit to ~/.local/bin and set up its package PATH for Bash.
|
||||
install: build
|
||||
install -Dm755 _build/native/release/build/main/main.exe "$HOME/.local/bin/orbit"
|
||||
|
||||
Reference in new issue
Block a user