Repository navigation
Releases
v0.5.8
Since v0.5.7:
orandexceptreplace??and!!(#795).- Packed arrays with views, generic externs, BLAS for products (#784).
- Constructors the types decide are left out by
viewand put back byedit(R1–R4, #780). - verify keys each method, default method and law of a trait on its own (#790).
- A recursive function is no longer reported refuted when it isn't (#803).
v0.5.7
Install: curl -fsSL https://strata-lang.dev/install.sh | sh (macOS arm64).
A fix release for v0.5.6. Upgrade if you use std.web or verify's cache.
Security
- std.web: another module could build an
ElementorAttributedirectly and render<script>,onclickor ajavascript:URL. This came from v0.5.6, whereNodebecamepub.rendernow checks tag, attribute and event names again, with the tests ofTagName,AttrNameandEventName. A bad element or attribute renders as nothing, and a URL attribute goes throughsafe_url(#788).
Verification
- Extern functions: they are now keyed by their declaration. Before, a TypeScript or Rust
m.inccould take a verdict cached for a Pythonm.incin another package, and an editedexterndeclaration kept its old verdict (#791). - Checks with no key: a check
verifycan't key is never cached (#791). - std generics:
buildreads std's proof rows split by implementation, asverifywrites them. In v0.5.6, std generics kept their runtime checks, which made sorted collections take linear time per change (#791). strata cache clean --obsolete: it no longer deletes std's library proofs or the tour's cache (#791).
Also
v0.5.6
Install: curl -fsSL https://strata-lang.dev/install.sh | sh (macOS arm64).
A bug-fixing release, plus §7 and §9 of SPEC.md from the lab.
Breaking changes
- Conversions return
Result[_, OutOfRange]instead of failing (#777). std's 116 conversion sites are moved. panic(message)is an obligationverifymust prove unreachable (#777). Shifts and rotations are total.- std.http's
servetakes aClock.serve_limitedalso takesServerLimits: by default 256 connections, 30 s to read a request and 30 s to send a response (#757). - A
pubdefinition may name onlypubtypes (#782), and a module shadowing one of core's names gets a warning. Warnings come only from the package's own code (#786). - In a contract, the result is
it.resultis an error (#756). - Nesting deeper than 1000 levels is a parse error, not a stack overflow (#779).
- A root type named like a module is an error (#779).
- Derived copies end in 8 hex digits instead of a running number (#769).
Verification
- Fixed proofs of false facts:
- two traits with the same short name were mixed up;
- a structural bound was read as a closed record;
- code points past U+1FFFF were modelled as themselves;
- a function value given to a builtin wasn't checked against its parameters;
- a function value that can be given itself was shown to terminate (#747, #774).
- Compile-time values are keyed by their decoded code, and scratch files by SHA-256 (#747).
- Now proven where they were unknown:
verify --terminationonmarkdown.*takes 2 s, not 95 s (#772).
Checker and front end
- Contracts are type-checked in the function's scope, and trait contracts and provided bodies too (#756). So
ensures n == "x"on anIntis an error. - One type-table builder replaces nine (#756).
- Union coverage tells
Option[Int]andOption[Float]apart, and integer patterns work past 2^62 (#756). - Core's names are matched by full path in handlers, faults, error labels, std.ffi and capabilities (#748, #776).
- A spawn inside a written
maplambda in ascopeis refused; comprehensions that spawn still run (#776). - Use before import is an error (#761).
- Columns count characters after strings, doc lines keep their indentation, and
comptimeis folded in contracts (#761). viewof deep code takes memory linear in its size: 70 MB at 300 levels, against 2 GB (#779).
Codegen, runtime and std
- Fixed crashes:
- Fixed leaks: trait default methods without written types, and
strata_host_run's arguments (#757, #776). - §9 concurrency (#771):
- resources carry a duty to close;
selectsend arms bind aResult;- adds
Replyand std.actor; - task stacks;
- six listener leaks fixed.
- std.toml skips a byte-order mark (#757).
Tools
verifychecks every selector given (#769).--helpworks on every command, andinit --helpno longer makes a package (#769).- The skill text is built from
strata help(#769). - The merge driver keeps the bytes of definitions it doesn't change (#769).
docs/stdis regenerated (#769).- A fault while the runtime holds a lock ends the process instead of hanging (#769).
- Editors know
blockingandnoalloc(#769).
Known
std.web.Htmlcan be built around its name checks again:std.web.Nodebecamepubin #782 (BUGS.md, std). A fix needs a way for apubtype to keep its contents private.- The runtime is macOS arm64 only.
v0.5.5
Install: curl -fsSL https://strata-lang.dev/install.sh | sh (macOS arm64).
This release changes the stored format. An extern c function can be marked blocking, stored as a new function flag. Files with blocking can't be read by 0.5.4 or older. The format version stays 1. std marks its SQLite, Python, Rust and TypeScript worker calls blocking, so 0.5.4 can't read those std modules.
Green tasks
Tasks are coroutines on a few pinned carrier threads instead of one OS thread each (#725, from #709 and #714).
- Memory per idle task is 17 KB, down from 64 KB, and 100,000 idle tasks run. Before, about 4,090 could run.
- The std.http server with 1,000 connections serves 49.1k requests a second, against 15.3k. p50 latency is 0.45 ms against 4.6 ms, and peak memory is 29 MB against 151 MB.
- It reached 58,500 open connections at 47.3k requests a second. The system's file limit stopped it there.
- I/O parks the task on kqueue, and tasks get time slices.
- There is no global lock: each channel, each carrier and each run has its own.
- A deadlock report says what each task waits on.
- In a test, the order tasks run in comes from a seed, so it can be replayed.
sendgivesResult[(), NoReceiver], an error once no receiver is left.blockingmarks anextern cfunction that may wait. A task's call to it runs on a helper thread while the task is parked.
Left: the runtime is macOS arm64 only, so Linux needs epoll, and x86-64 isn't done. blocking takes at most 8 integer and 8 float arguments. Cancelling a blocking call is an idea, not built.
Verification
- Proofs rest only on what is shown (#719):
- A recursive function is unfolded only when it's shown to end.
- A lemma resting on
terminatesis reported as assumed. - A function with an unproven
ensuresisn't treated as one that can't fail. - Argument refinements are checked with the call's arguments.
- A function value stored in a refined record field is checked where it's stored.
- Crashes and blowups fixed (#712):
- A nine-arm match over
std.agent.Chunkwent past 6 GB; it now takes 113 MB. - Repeated scalar merges went past 5 GB; they now take 111 MB.
verifyon code reading thread-local storage aborted.
- A nine-arm match over
- Proven checks in std's generic functions are left out of the programs that use them (#718). A program inserting into a
SortedSetwent from 150 s to 0.1 s. Contracts written over several lines are matched to their proofs. verifydecodes each module file once when building its cache keys. A cached run on compiler/ went from 12.3 s to 8.9 s. Termination's loop searches run together (#724).
Type checker
- Every definition is keyed by its full path (#720):
- Traits, methods and bounds from two modules with the same short name are told apart.
- A bound's type arguments are compared.
- Capabilities with their own methods are checked.
- Errors use full names.
- A
forpattern that may not match is refused. Coverage is checked past 12 levels (#716).
Front end and desugaring (#716)
- An
extern python/rust/tsdeclaration is stored as declared. Before, a hand-written function shaped like a wrapper was taken as assumed byverify. - Named results respect shadowing. A refined record updated field by field stays one step.
- A comprehension over an iterator where a
Listis wanted is converted. - Printing is no longer exponential in nesting depth: 30 levels went from 27 s to 0.04 s.
Code generation and runtime (#713, #722, #723)
==uses a type's ownEqinside lists, tuples, options and dicts.- Refinements inside a generic type's arguments are checked at run time.
- A list of a union's member is converted to a list of the union.
- A
Stringfromextern cthat isn't UTF-8 is a fault. std.sqlite reports such text as an error. float_from_bitsgives no infinities. Timed waits use the monotonic clock. Arena tags no longer wrap.- A program's own record named
Taskis no longer treated as a task handle. Before, it crashed and madeverifyhang.
std (#718, #721)
- JSON numbers follow RFC 8259.
normalizekeeps non-ASCII text.- The ORM:
- keeps non-ASCII literals in
CHECKs; - applies
!only to its operand; - handles NULL in
not(); - refuses
Realkeys.
- keeps non-ASCII literals in
- A dependency's
[native]C code is linked. - Derived Python, TypeScript and tool wrappers check
requires. --no-xturns astd.cliflag off.Body.read_line, the Unicode property predicates, andmatches()with a literal pattern are fast. A literal pattern's DFA is built while compiling.
Tools (#717)
- The shipped std library is used only while std's sources match it.
tools/seed-check.shbuilds compiler/ with the latest release.sync:- fails when git's merge fails;
- writes its renames through the journal.
renamereaches patterns in:=andforand refuses keywords.movetakes a type's impls and derives along.- Two dependencies with the same name are refused, and parallel git fetches no longer race.
- Unknown long options are refused.
- Commit trailers come from the git setting
strata.trailer.
Known issues
See BUGS.md. Among them:
- Whole-std
verify --require provenstill passes 300 s: fuzzing doesn't count work inside built-ins. - A program's own one-parameter
Task[T],Sender[T]orReceiver[T]is refused for now. Recognising the built-ins by their core path is in progress. cli-smt_proves_nested_quantifierskeeps "needs a lemma" under the per-instance encoding.
v0.5.4
Install: curl -fsSL https://strata-lang.dev/install.sh | sh (macOS arm64).
The stored format is unchanged from 0.5.3. This release is the second wave of BUGS.md fixes: 70 entries closed (302 → 232).
Data loss and safety
- Each change's module files and its log entry are written through a journal, so a crash leaves both or neither. Commits take only what changed. Exit codes report failures (#701).
- Crossed task handles are freed. Host text (paths, arguments, environment, input) is checked for UTF-8 and NUL.
read_allreturns aResultinstead of a truncated string (#700). - std: http, web, json, sqlite, orm, process and agent fixes. Repeated headers,
HEAD, path decoding, client targets,javascript:and<script>in html, JSON depth, CRLF, large integers, sqlite foreign keys and TEXT, and exit codes (#697).
Verification
- The verify cache is keyed by the encoding settings. A trait method called through a generic bound (
[T: Div]) is no longer proven past the impl'srequires.ensures it == eno longer replaces the body.ForPatarms, loop havoc throughmut, termination through fields, andbuildandverifyagreeing on what is proven (#699).
Type checker
- Bounds are checked on every trait. Pending obligations on generic and compound types are kept. Coverage holds past guards and nesting depth. Contracts are typed, and variance is inferred per type. Union fields,
mutthrough std calls, andspawninside lambdas are fixed (#704).
Code generation and runtime
- Unions with members of the same head, call results stored into unions, big-integer ranges, float and big-integer keys,
!conversion,Ok(()),_arms,Type.method, andSortedDictequality (#702). - Channel fixes, per-thread free lists, code points on bad UTF-8, floats shown and parsed without the locale, and float
%(#700).
Front end
"\r", round-trip fixes, refutable:=refused, definitions given twice, and comment placement in linear time (#703).
Tools
std.process.run_bytesgives a program's output as bytes.historyandrevertread git blobs through it (#705).- Cases fixed on main: merge-file renames, literal checks, verify's new verdicts (#707). Two cases still fail under load or on main (BUGS.md, "Test cases failing on main").
Known issues
See BUGS.md: 232 open entries.
v0.5.3
Install: curl -fsSL https://strata-lang.dev/install.sh | sh (macOS arm64).
The stored format is unchanged from 0.5.2. This release fixes data loss in the tools, memory safety in the runtime, and places where verify or the type checker said "yes" without showing it.
Tools: data loss
abortchecks every saved file before it writes, keepspending.jsonwhen a file can't be put back, and treats a malformedpending.jsonas an error everywhere. Before, apending.jsonwith no file list madeabortdeletemain.strata(#685).- A change whose log entry can't be written is undone:
edit,rename,move,fixanddoneput the files back and exit non-zero (#685). upgradefinds std and core throughSTRATA_HOMEand encodes every file before replacing any.packno longer writes over module files or package folders (#685).rename,move,fix,fix --file,revert,resolveand--file PKG/mod.strata editcheck the result first and write all their files or none.resolvetakes several files at once, so two conflicted files in one package can be resolved (#688).holeifymatches by full name: a change toshop.getno longer turns a localgetorstd.list.getinto a hole (#688).
Runtime: memory safety
- String functions stay inside the string on bytes that aren't valid UTF-8 (#686).
- A task handle sent out of its scope can be awaited after the scope ends.
joinis serialised (#686). extern cstring arguments are freed only after the result is read (#686).read_filereports a read error as anFsErrorinstead of returning a cut-off string (#686).Int.divandInt.remrequire a nonzero divisor, andhash_slotandstack_leaveare proven total (#686).
Verification
- No default yes (#690):
- Two different function values are different values.
- A lambda passed for a refined result is checked against it.
- Termination uses only the facts known before the recursive call.
- A cached proof doesn't skip the lemma termination check.
- Assumed clauses match on their whole text.
- Two sites with the same text no longer share a verdict.
- The cache keys on what the file holds, not on its header.
a.div(b)checks the implementation'srequires.
- Per-instance facts about list elements: proofs that #677 lost are won back, including facts about one range used at a list position and
allfacts whose element fact is anany(#691, #694, #695). - A structural record's refined fields are assumed and checked. Sums over lists are bounded. Generic types' methods and capability functions with assumed contracts pass
--require proven(#689).
Type checker
- Coverage is checked for sum matches on locals, fields and nested patterns. Patterns with a wrong literal type or an unknown field are errors (#692).
- Impl method signatures are compared with the trait's (#692).
- The checker now reports these (#692):
- closure and
extern ccalls with the wrong arity; - wrong
mutmarkers on method arguments; - calls of deleted functions;
- patterns naming removed variants.
- closure and
Code generation
a + bon lists extendsa's buffer when no other list uses those slots, so growing a list by concatenation is linear (#693).
Known issues
- See BUGS.md. Among them:
cli-smt_proves_nested_quantifiersstill fails under the per-instance encoding;- verify's cache doesn't key on
STRATA_QUANTIFIERS; - a division through a generic
[T: Div]call is still proven; - a crash between writing module files and the log entry can leave them apart.
v0.5.2
Install: curl -fsSL https://strata-lang.dev/install.sh | sh (macOS arm64).
The stored format is unchanged from 0.5.1. This release is the lab's phase 0: soundness fixes, data-loss fixes, and answers that say "no" or "unknown" where they used to say "yes".
Verification
- Facts about every element of a list are stated at each element the code reads, with no
forall(#677). If an obligation stays open because of one, the verdict says "needs a lemma" instead of guessing. The old encoding is behindSTRATA_QUANTIFIERS=forall. - Termination answers "unknown" for unknown iterators, fuel that ran out, own-method calls and recursion through function values (#627). #646 wins back the verdicts that can be shown.
- Verify's cache keys include impl methods, own methods, refinement predicates, bounds (#629), and the bodies a proof unfolds (#663). Before, a changed body could leave its callers "proven (cached)".
- Proven checks are removed per site, not by check name (#633).
- More obligations: partial operations inside a function's own contract (#656), refinements nested in types,
letannotations and function values in contracts (#670). verifybuilds its inputs only from what the selection reaches (#667).--smtand--obligationsshow the checks it makes (#637).- Datatypes z3 rejected before are accepted (#650, #660, #636).
Type checker
- Type comparisons answer no or unknown, never a default yes (#628, #632, #652). Scoped narrowing, typed matches, generic aliases and tuple arity are checked (#645). Unions with type-parameter members are fixed (#671).
- Private records are closed and private functions hidden outside their module (#649).
Tools
buildrefuses a program that doesn't check, with--no-verifytoo (#675).--ignore-check-errorsbuilds anyway.- Three data-loss fixes (#626): an undecodable module is no longer treated as empty,
view→editkeeps proofs, and renaming a trait method renames only that trait's. strata new MODULE "DOC"(#625, #641).diffandtourcompare definitions node by node;--linesfor the line view (#630).checkcounts and names every open hole, merge conflicts included (#668).strata lint --claimsflags comments that state facts about the code (#622).editon a package folder checks only what it can affect (#657).
Runtime and std
- Two use-after-frees fixed: an arena across the last task's end, and a channel a task dropped unclosed (#621).
- A task frees its captures when it ends (#664): the std.http server's peak memory went from 3.99 GB to 80 MB in a 2000-request test.
- std.http survives failed accepts and handler panics, and refuses requests with both
transfer-encodingandcontent-length(#623). uniqueand escape analysis: method calls'mutarguments, impl methods, and memory verdicts won back (#635, #647, #654, #662, #669).
Known issues
- See BUGS.md: 27 entries were added by #676 for things found and not yet fixed.
v0.5.1
Install: curl -fsSL https://strata-lang.dev/install.sh | sh (macOS arm64).
A new stored format. Every .strata file is re-encoded. A strata older than 0.5.1 can't read these files, and 0.5.1 doesn't read older ones: view old code as text with the strata that wrote it (strata view --proofs), then store it with this one (strata edit).
The stored format
- Stable ids (#559): every definition and variant has a 32-bit id, kept across edits, renames and moves; references in the stored tree are ids, indexes into each file's id table.
strata diffandstrata merge-filepair definitions by id, so a rename on one side is followed by the other side's new uses. Files are about 7% smaller. - The stored tree is the core language (#562): handlers (
x!,x?,except,or,!!,??), ranges, indexing, slices, element assignments, comprehensions,Dict/Setliterals andloopare stored as the core forms they stand for and shown back as written. Field defaults andT { ..r, f: x }are stored as written and lowered when read, so a field a record gains is filled in. A spread is stored written out. - Operators are trait methods (#558):
a + bis stored asAdd.add(a, b). A type gets an operator by implementingAdd,Sub,Mul,Div,Rem,Neg,EqorOrd(core.ops), also across two types (impl Mul[Int, Money] for Money). The compiled code for built-in types is unchanged.
Fixed on the way
std.agentdidn't round-trip: each store added astd.agent.to a mixed union's member types.merge-filemerges a definition node by node again when its sides were stored apart.tools/roundtrip.sh(parse(print(t)) == t) holds on all 146 files of the repository.- Sugar calls the built-ins by names no program can take (
$core:atforxs[i], with #617's hygienic desugaring): a local or a function may be namedat,range,map….
Known issues
- Diagnostics print a checked expression's built-in calls as calls (
range(0, 3),slice(xs, 0, i)), not as the sugar written. - An assertion's message shows a record update lowered (
Point { y: 3, x: p.x }).
v0.5.0
Install: curl -fsSL https://strata-lang.dev/install.sh | sh (macOS arm64).
Language and std
Real(#575): exact rationals, the type of decimal literals (0.1 + 0.2 == 0.3); JSON and TOML numbers areReal.- Structural records (#570):
{ id: OrderId, .. }as a parameter's type or a bound. - JSX-like pages (#577): markup in Strata code, stored as
std.webcalls. - std.net, HTTP/1.1 with TLS, std.agent (#574): TCP, HTTP clients and servers, HTTPS clients, streamed bodies; an LLM agent loop with tools.
extern rustandextern ts(#576); wasm32 target andderive TypeScript(#601).- Tasks get copies, no atomic counts (#564); narrowing from what a function
ensuresof its result's variant (#567).
Tools
strata run --live(#572): edits that check and verify are swapped into a running program.- Tree diff and three-way merge (#569): node by node, conflicts as holes;
strata history/strata revert(#590). checkkeeps verdicts per definition (#578); a failededitwrites nothing,edit --as-givenwrites it anyway (#592).
Verification
- verify never runs code that reaches an extern (#602) or gives a real capability (#597); faster batches (#598, #599, #604, #606, #610); a type holding a
Realis refined by its other parts (#612). std is proven exceptstd.orm.Schema.createandstd.orm.Key.load.
Memory
- Statement regions were tried and removed (#568, #596); memory profiles of five programs (#594); fixes in codegen (#609, #611, #614).
Known issues
build-jit-tests:strata test examples/tasksno longer prints the warning for aResultthrown away inmemory.queue_after.- A rare "dup of a freed object" in check mode (
STRATA_MEMORY=check) understrata runwith tasks (seen inbuild-supervised,build-io-cancel).
All merged pull requests since v0.4.0
- #615 strata --version: 0.5.0
- #574 std.net, HTTP/1.1 with TLS and streamed bodies, and std.agent (streaming, derive AsTool)
- #601 wasm32 target and derive TypeScript: Strata called from TypeScript through WebAssembly
- #576 extern rust and extern ts: Rust through a cargo-built library, TypeScript through a Node worker, values as JSON
- #612 verify: a type holding a Real is refined only by its other parts
- #614 codegen: an element store is in place with a variable named
atin scope - #611 codegen: a record a closure or task captures is not on the stack (the build-tasks freed-object flake)
- #575 Real: exact rationals, the type of decimal literals
- #610 smt: a list's known all named once as a predicate of the position
- #570 Structural records: { id: OrderId, .. } as a parameter's type or a bound
- #609 codegen, unique: a mut variable read by another argument keeps its own slot
- #606 verify: VerifyOptions + verify_options parse the flags; verify_program runs the pipeline in named phases
- #605 site: Vercel deploys only by hand
- #577 JSX-like pages: markup in Strata code, stored as std.web calls
- #594 Memory profile of five programs: curves and live objects at the peak
- #603 IDEAS: bugs the lab fleet found and left unfixed
- #604 smt: assumed validity facts on demand
- #564 Tasks get copies, no atomic counts
- #572 strata run --live: live edits of a running program, when they check and verify
- #602 verify never runs code that reaches an extern
- #578 check: keep verdicts per definition; uniqueness analysis incremental and parallel
- #600 Fast string search: contains/index_of/split/replace through memchr (P3)
- #569 Diff and three-way merge on trees: node by node, conflicts as holes
- #567 check: what a function ensures of its result's variant narrows its calls
- #585 roots: values given back as they are stay counted under --regions
- #599 verify: the batch builder works on facts by id (P5)
- #598 verify: build each batch once (answers_all and sort_mixes reuse the worker's text)
- #597 verify never gives a real capability (fuzzing, replays)
- #596 Remove regions (phase 2a); record the results of scoped allocation
- #593 verify --timings: per-definition table; the serial batch rebuilds timed (speed P0)
- #592 edit: --rm looks in its module first; a failed edit writes nothing
- #590 strata history NAME and strata revert NAME [COMMIT]
- #588 Turn off the generated state graphs; fix cli-modules_contracts_and_files
- #587 verify: a query that ran out of time isn't cached as 'gave up'
- #584 smt: mut lists come back valid; helper calls in proofs equal their bodies; tasks without intro lemmas
- #586 verify: a pooled Z3 process starts again after a script sets a global parameter
- #583 smt: the same value is one term; tasks proofs inline again
- #582 tasks-proofs-8: every definition of examples/tasks proven
- #580 CLAUDE.md: full bootstrap only for codegen, runtime, core and releases
- #579 examples/tasks: claim, record, release, expire and run_worker proven (replaces #566)
- #568 Statement regions (--regions), phase 2a of scoped allocation
- #565 check: a mut argument fixes a type argument (codegen's _ instances)
- #563 codegen: dict equality in an instance with unknown type arguments
- #556 graph: answers cached per function, questions asked in parallel
- #554 smt: smaller tasks queries (calls compared by names, long terms through a let)
- #553 Site: front page compares Rust and Strata on one ledger and one order system; FAQ
Strata v0.4.0
Install: curl -fsSL https://strata-lang.dev/install.sh | sh (macOS arm64).
Written proofs
lemma,assert … by,calc(#540): a lemma is a function that exists only for verification;verifyproves it once, in its own small query, and a call gives itsensuresas one fact. A recursive lemma is a proof by induction.assert e by lemma(…)/assert e by { steps }provesefrom the steps alone, then adds it as one fact;calcchains prove one step per query.std.lemmasstarts with six proven frame lemmas over dicts.- Proofs hidden by default (#540):
strata viewand the editors hide loop invariants,decreases,assert … by,calcand lemmas behind a marker (// ⋯ 2 invariants);--proofsshows them.strata editfrom the default view puts hidden proofs back in their place (and says when a place is gone);strata diffreports proof changes apart from code changes. - Spec functions (#551): functions used only in contracts and proofs are one symbol in a function's own query (equal arguments give equal results) and are seen through inside lemma and
assert … byproofs, so queries stay small. - examples/tasks (#551):
enqueueis proven (157 checks) with a loop invariant, a frame and 25 proven lemmas, and all three laws are proven,no_double_claimincluded.claim,record,release,expireandrun_workerare still partly fuzzed: their remaining checks need written proofs likeenqueue's. The whole package verifies in about 50 s cold.
Verification speed and soundness
contracts.*verifies in 9 s instead of over 300 s (#538): a function's own call inside a lambda goes by its contract instead of being unfolded at every element.- #551 prover fixes: congruence for contract-only calls,
set(xs.map(f))exact, the same map/push/list literal is one value, batch answers the solver gave up on asked again alone, proof queries hold only their path's conditions.
Memory and speed of compiled programs
- Static uniqueness (#521):
compiler/uniqueproves which in-place updates find their value held once, and the compiled code leaves those run-time tests out (234 of 347 such sites in the compiler proven; -15% instructions on update-heavy code). - Small values in registers (#522): a function returning a tuple, record or sum of up to 4 words returns it in registers, and callers keep it on the stack — no heap object. 30M calls returning a tuple: 30M allocations → 1, 10.7G → 6.5G instructions.
strata checkof the compiler: 10.5% fewer heap objects, 5% fewer cycles. - Memory fixes found by per-site counters (#523): strings grow in place in small blocks, constant list literals are one shared block,
forover a non-mutlist borrows it,xs = xs[..n]drops the tail in place, temporary iterators move into the loop, accumulated sets passed asmut.strata checkof the compiler: -8% instructions. - Smaller executables (#537, #539): executables are linked with
-dead_strip: hello world 1.64 MB → 55 KB; the compiler, which hosts the JIT, keeps its runtime symbols. - A stage-2 miscompilation from small values (a stack-kept call result's fields freed twice) is fixed (#542).
- Scoped allocation from roots: design and measurement (#545):
compiler/rootsassigns each allocation a home scope; measured on the compiler, regions would hold 49.5% of objects and remove 42.5% of releases (no generated-code change yet).
Tools
strata diffin seconds (#544): versions compared by hash, only what changed written out: one commit of the compiler 39 s / 1.6 GB → 3.2 s / 300 MB.strata tour(#546): a pull request's tour (Markdown with structural diffs embedded) read in the terminal. Tours show each page's structural diffs (#550).strata viewin reading order (#547): imports, then types, then functions, each caller above what it uses; only the rendering changes.- Site: About page and tour slides on contracts over behaviour (#548).
- A test case viewing the wrong copy of core fixed (#541).
Known
- examples/tasks:
claim,record,release,expireandrun_workerare not fully proven yet (a full proof ofclaimexists but its queries exceed the memory limit; smaller per-element facts are the next step). strata diff --graphover examples/tasks against an older version exceeds 300 s.