Interaction
State invariants hold initially and after every legal action. Guards determine which controls are enabled, and postconditions constrain what an action can change.
Weft / Frontend language
Write what a user can do and what each recipient can learn. Weft checks both, then checks the WebAssembly it ships.
Your choice
Editing
In review
Sealed
Flip the bit, review it, then seal. The two shares appear here in your browser. XOR them to recover your choice.
The language
The ballot’s review state drives the button and guards the transition. A separate channel rule says exactly when each recipient may receive a share.
Remove the review guard and the channel rule still applies. The build fails with a counterexample.
Inspect this page’s Weft ↗channel north on seal only when reviewed and not sealedactionseal"Seal ballot"when reviewed and not sealedsplitchoice to north, southsetreviewed = 0setsealed = 1ensuresfinal_choice = choice == old(choice)end
Verification
State invariants hold initially and after every legal action. Guards determine which controls are enabled, and postconditions constrain what an action can change.
Each recipient’s modeled observations include the value of a message and whether one arrived. A protection rule can also cover recipients who combine their observations.
An independent decoder reads the emitted WASM. The verifier checks that each exported function returns the same state, view, and messages as the source.
The proofs cover the component model. The browser, DOM adapter, entropy source, and transport are trusted. Timing and visual layout are outside the confidentiality proof.
Learn to prove UI behavior and information flow →Toolchain
The C11 toolchain uses Z3 and Wasmtime. The Apple Silicon archive includes the compiler and its native dependencies.
From the extracted directory
bin/weft build examples/ballot.weft
bin/weft check examples/ballot.weft
bin/weft serve examples/ballot.weftRead the quick start ↗