wikifn-fstar

Wikifunctions compositions, checked by F*

3,893 real Wikifunctions compositions, mechanically translated into F*, checked by F*, extracted to OCaml, compiled to JavaScript, and runnable in a browser. 800 of them pass every Wikifunctions tester this project can read.

Try the engine in your browser

What works now

Functions in the corpus4,970
Closing over the current primitives2,450 (1,076 without recursion, 1,374 with)
Translated into F* and verified3,893
Compiled into F* functions of their own1,370
Runnable today1,546
Passing every readable Wikifunctions tester800
Passing at least one tester1,078
Rendered back to canonical Wikifunctions compositionsall 3,893, identical on round trip

What it is not

Runnable demos

The homepage does not run the extracted JavaScript or tree browser. Use the separate demo pages for interactive browser artifacts and composition graph browsing.

Next grounding frontier

These numbers were wrong and are now measured. This table used to say what each primitive “blocks”, taken from the closure analysis’s ranking. That ranking counts a function once for every leaf blocking it, and those sets overlap almost entirely — so four different primitives each appeared to block about 1,400 of the same functions. The honest question is what grounding one actually unlocks, measured by adding it and re-running make closure. That number is thirty times smaller and it reorders the list.

Plain name Wikifunctions ID Unlocks Used to claim
String from Type Z22764 +49 blocks 1,455
To lowercase, to uppercase Z10047, Z10018 +41 — done blocks 1,301
Quote, reify, unquote, quoted reference Z99, Z805, Z899, Z29267 +39 blocks 1,392
Fetch persistent object Z828 +8 blocks 1,446
Typed list Z881 +2 blocks 1,368
K combinator Z10249 0 blocks 1,263

The last row is the point. Z10249 looked like the seventh most important thing to do and grounding it would change nothing at all, because everything it gates is gated by something else as well.

Done since this list was last written: errors as values (Z5, Z851, Z850, Z853), case conversion, Z803 value by key, Z16829 type of object, Z13052 and Z29294 object equality and equivalence, the codepoint conversions, reverse and append, and natural division.

Local setup

git clone https://github.com/danbri/wikifn-fstar.git
cd wikifn-fstar
make setup-fstar
make doctor

Demos, setup notes, debugging notes, cache notes, primitive notes, and extraction notes are included in the repo.