Skip to content

v0.5.2

Choose a tag to compare

@anonx3247 anonx3247 released this 28 Nov 07:40
6a6ece1

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 behind STRATA_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, let annotations and function values in contracts (#670).
  • verify builds its inputs only from what the selection reaches (#667). --smt and --obligations show 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

  • build refuses a program that doesn't check, with --no-verify too (#675). --ignore-check-errors builds anyway.
  • Three data-loss fixes (#626): an undecodable module is no longer treated as empty, view → edit keeps proofs, and renaming a trait method renames only that trait's.
  • strata new MODULE "DOC" (#625, #641).
  • diff and tour compare definitions node by node; --lines for the line view (#630).
  • check counts and names every open hole, merge conflicts included (#668).
  • strata lint --claims flags comments that state facts about the code (#622).
  • edit on 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-encoding and content-length (#623).
  • unique and escape analysis: method calls' mut arguments, 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.