Repository navigation
Running Programs
Curlee’s execution model is:
-
curlee check(static pipeline + verification) -
curlee run(only if check passes)
Bundle workflow (v1):
-
curlee bundle build ... <entry.curlee> <out.bundle>produces a proof-carrying bundle artifact. -
curlee bundle verify <out.bundle>validates integrity. -
curlee run --bundle <out.bundle> <entry.curlee>executes bundled bytecode deterministically.
Curlee’s VM is designed to be deterministic (see Glossary): given the same bytecode and inputs, it produces the same results.
Execution is resource-bounded via a fuel budget (see Glossary). When fuel is exhausted, the VM halts deterministically.
By default, the CLI uses a fixed deterministic fuel budget (10000) when running bytecode.
You can override it:
curlee run --fuel <n> <file.curlee>
If fuel is exhausted, curlee run fails with a runtime error message that includes out of fuel.
Runtime failures include an error message and (when available) a source span (see Glossary) derived from opcode span mapping.
Curlee supports structured diagnostic output for incident tooling:
curlee <lex|parse|check|run> --diag-format <text|json> ...
When --diag-format json is selected, each diagnostic is emitted as a single JSON object with stable fields:
-
kind(alwaysdiagnostic) -
severity(error,warning,note) messagefile-
span(nullor{ "start": <byte>, "end": <byte> }) -
notes(array of{ "message", "span" })
This format is intended for log aggregation and deterministic post-processing.
Curlee supports deterministic runtime profiling telemetry for run paths:
curlee run --profile ...curlee run --profile-format <text|json> ...
Profile payload fields:
stepsfuel_limitfuel_usedfuel_remainingok
Notes:
- Profile output is bounded and deterministic (no wall-clock timing fields).
- Profiling output is emitted for both success and runtime-failure outcomes.
- In text mode, profile records are emitted as
curlee profile: ...lines. - In JSON mode, profile records are emitted as a single
{"kind":"profile", ...}object.
Python interop is not part of the Curlee v1 surface.
- Source usage of
python_ffi.*is rejected at compile/check time with a deterministic diagnostic. - There is no supported
curlee runpath for Python execution in v1. - Bundle/runtime enforcement also rejects:
- bundle manifests that declare
python.ffi/python.sandbox, - bundle bytecode containing the
PythonCallopcode.
- bundle manifests that declare
Design notes and post-v1 direction remain documented in Python Interop (Future).
- Verification is separate from execution: a program that cannot be proven within the supported fragment is rejected.
- Capabilities (see Glossary) are part of the long-term model; see Stdlib and Capabilities.
- Versioning/deprecation guarantees for CLI/runtime behavior are defined in Release Checklist and Versioning.