aboutsummaryrefslogtreecommitdiffstats
path: root/docs
Commit message (Collapse)AuthorAgeFilesLines
* Add stack copies to Pure moduleseunhhu2026-09-251-1/+4
| | | | | | | | | PICK copies the value n below the top, with its type and owner; SLIDE drops n values under the top. A toolchain can compute a function's arguments once and read each as often as the inlined body needs, instead of repeating the argument's code. The format stays v5: no producer has shipped modules without them.
* Add conditional joins and table views to Pure moduleseunhhu2026-09-251-12/+22
| | | | | | | | | | | | | | | | Module format v5 lets a value cross a join: the verifier records the stack each branch brings to its target and requires every path to agree on height, types and owners, with at most 8 such joins ahead. Branches are now allowed in views, so a view can be a conditional expression. A table view has one row per item of a list. Its columns are number or text views evaluated for one row at a time and may read that row (ROW). Hosts compute only the cells they show through pure_app_rows, pure_app_cell and pure_app_cell_text. Column names are scoped to their table. The view limit rises to 64, columns included. pure-run prints a table view as an array of row objects.
* Add records, lists and indices to Pure moduleseunhhu2026-09-251-16/+45
| | | | | | | | | | | | Module format v4 declares record types and adds list states (items of a record) and index states (a position in one list). The verifier types record operands field by field and rejects an index used on another list. Indices follow their item across inserts and removes. List changes are logged per event and undone when the event fails. Replacing a module keeps a list by name and moves its fields by name when the record changed. pure-run prints lists as arrays and a failed view as null.
* Record the module size after raising the input limiteunhhu2026-09-251-1/+1
|
* Allow 32 inputs per moduleeunhhu2026-09-251-1/+1
| | | | | | | A text editor needs more keys than the workbench-era limit of 8: typing, four arrows, Backspace, Delete, Home, End and a mark already make 10. Event numbers stay 1 + 2i and 2 + 2i; the module grows by the input name tables.
* Add text states and cursors to Pure moduleseunhhu2026-09-251-17/+46
| | | | | | | | | | | | | | | | | | | | | | Module format v3 adds text states, cursors, UTF-8 constants, text inputs and text views. A text state is a runtime-owned draft without a store, so a large text edits as an extent tree. Cursors are byte positions the runtime keeps on character boundaries: insertion pushes cursors at or after the point, removal gathers cursors inside the range, and a failed event returns every text draft and cursor to where it was. The verifier types a cursor by the text it belongs to and rejects editing one text with another's cursor. Operations cover constants, concatenation, shortest round-trip number text, character, line and byte counts, character and column-keeping line moves, insert, remove, line views, whole-text replacement and UTF-8 checked conversion from bytes. Replies of edited documents or texts are copied before they are finished. pure-run gains text input and text output. test-module covers typing Korean and emoji, moves that stop at the ends, line moves, views, rollback, invalid UTF-8 and replacement, text-specific verifier rules, and 20,000 damaged text modules whose cursors always stay on character boundaries under ASan/UBSan.
* Add typed messages and keyed documents to Pure moduleseunhhu2026-09-251-40/+59
| | | | | | | | | | | | | | | | | | | | Module format v2 adds byte values, message inputs with u32 and bytes-tail fields, one keyed byte collection, replies and require. The verifier checks every operand's type and the context each operation may run in, and allows branches and joins only at an empty stack, so typed values never merge. A message event opens its key's working version through a PureData host, conflicts early on a stale base revision, runs its handlers, and commits only if they succeed; a failed event leaves documents and states unchanged. Replies lend payload or document extents, and a document reply is copied before commit. pure_tree_data implements the host on tree store drafts, and pure-edit-module offers the document CLI contract of pure-edit from a module. test-module adds document semantics on an in-memory host (not found, create, conflict before bounds, limits, short payloads, busy commits, stable replies, require, state rollback), typed verifier rules, and 20,000 damaged message modules run safely under ASan/UBSan.
* Define Pure module format v1 with a static verifiereunhhu2026-09-251-0/+72
| | | | | | | | | | | | | | | Pure now owns the format its toolchains target, as the JVM owns class files. A v1 module carries f64 states, key inputs, atomic event handlers and pure views. pure_module_load checks sizes, names, keys, operands, forward-only branches, reachability and stack heights at every join before anything runs, so execution needs no stack checks and each event is bounded by its handler length. PureApp runs events on a pending copy and replaces modules keeping states by name, without allocation. Semantics match the workbench engine, including IEEE minimum/maximum on signed zeros. test-module covers behaviour, atomic faults, 26 rejection checks and 20,000 damaged modules under ASan/UBSan; pure-run is a JSON test host.
* Make the local Pi the verification deviceeunhhu2026-09-251-2/+3
| | | | | | | The recorded Raspberry Pi 5 (Linux AArch64, 16 KiB pages, ext4) replaces Apple Silicon macOS as the device whose results decide completion. The macOS CI job stays as an optional portability check; no macOS support is claimed.
* Let the runtime own working versions as draftseunhhu2026-09-252-5/+102
| | | | | | | | | | | | | | | | | | state.h gives any app a runtime-owned working version of a stored value on the tree store. A draft shares unchanged extents with the stored version, edits in memory by path copying, lends ordered extents without copying, and commits only its new nodes when the key is still at its base revision. A failed commit changes neither the draft nor the store; a draft whose file was replaced by compaction copies its stored extents on commit. Unreachable arena nodes are reclaimed once they outweigh max(reachable, 32 KiB). Typing into the middle of a 1 MiB document and saving each character peaked at about 1,660 KiB RSS with a draft against about 4,480 KiB for an app copy compared with storage on save; saves were only 1-2 ms faster. This corrects 073, which had attributed the TUI's remaining 8 ms to that comparison. Drafts are not yet charged to the runtime budget or visible to .pure definitions.
* Add selected single-file persistent tree storeeunhhu2026-09-251-0/+126
| | | | | | | | | | | | | | | | store-tree.c keeps every document in one append-only file as a persistent B-tree of byte extents, with the key catalog in the same structure. A splice writes only the changed leaf and path; unchanged extents are shared between versions, readers take no lock, and two alternating head slots publish a commit after its nodes are durable. Compaction rewrites reachable nodes. On the recorded ext4 host a durable 1-byte middle insert into a 1 MiB document took 8.58 ms against 78.51 ms for the default store, and the real TUI's Ctrl+S after typing took 16.60 ms against 84.59 ms. check-tree runs the store's crash/oracle tests and the unchanged runtime, splice, async and real-PTY editor checks on it. It stays opt-in: linked code is 12.7 KB larger and contiguous multi-leaf reads copy.
* Verify paged document app under 4 KiB AArch64 kerneleunhhu2026-09-242-0/+33
|
* Admit aligned OS pages in selected paged storeeunhhu2026-09-241-0/+36
|
* Establish native micro runtime checkpointeunhhu2026-09-2481-0/+7091