Repository navigation
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.