From 489672dfac7efc78fc239ba7c2dfc82f1c5fbeab Mon Sep 17 00:00:00 2001 From: Cliff Click Date: Sat, 24 Oct 2026 15:41:48 -0700 Subject: Finish chapter numbering, retire combined chapter 24, and update documentation --- docs/2026_REBASE/README.md | 6 +++--- docs/2026_REBASE/deck.js | 4 ++-- docs/2026_REBASE/slides.js | 2 +- docs/2026_REBASE/stdlib.js | 2 +- docs/2026_REBASE/tools/snapshot-library.py | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) (limited to 'docs/2026_REBASE') diff --git a/docs/2026_REBASE/README.md b/docs/2026_REBASE/README.md index 4c3b5114..95bd1dea 100644 --- a/docs/2026_REBASE/README.md +++ b/docs/2026_REBASE/README.md @@ -104,7 +104,7 @@ before the session so compilation does not consume stage time: make -C chapter08 build CTAGS= make -C chapter17b build CTAGS= make -C chapter18 build CTAGS= - make -C chapter25 build CTAGS= + make -C chapter28b build CTAGS= The deck's **Copy viewer command** button gives one of these commands: @@ -112,7 +112,7 @@ The deck's **Copy viewer command** button gives one of these commands: make -C chapter08 view make -C chapter17b view make -C chapter18 view - make -C chapter25 view + make -C chapter28b view The Chapter 24 SCCP slide deliberately launches **Chapter 25's viewer** for this talk, using the same example with a separately compiled standard library. @@ -231,7 +231,7 @@ fixed-point theory works” and “It’s a rich lattice, so we get rich results Regenerate with Chapter 24 built and Graphviz installed: ```sh -java -ea --class-path chapter24/build/classes/main docs/2026_REBASE/tools/RichLattice.java +java -ea --class-path chapter24b/build/classes/main docs/2026_REBASE/tools/RichLattice.java dot -Tsvg docs/2026_REBASE/assets/rich-lattice.gv -o docs/2026_REBASE/assets/rich-lattice.svg ``` diff --git a/docs/2026_REBASE/deck.js b/docs/2026_REBASE/deck.js index 06a4e9d5..3250e7ae 100644 --- a/docs/2026_REBASE/deck.js +++ b/docs/2026_REBASE/deck.js @@ -47,8 +47,8 @@ window.REBASE = { }, { "id": "sccp", - "chapter": "chapter24", - "viewerChapter": "chapter25", + "chapter": "chapter24b", + "viewerChapter": "chapter28b", "title": "Prove a loop-carried constant", "code": "int x = 1;\nfor( int i = 0; i < arg; i++ )\n x = 2 - x;\nreturn x;\n", "result": "Return value is always 1", diff --git a/docs/2026_REBASE/slides.js b/docs/2026_REBASE/slides.js index 9ed9729e..a3a8aef6 100644 --- a/docs/2026_REBASE/slides.js +++ b/docs/2026_REBASE/slides.js @@ -186,7 +186,7 @@ ])+'
ValueInitialFixed point
Loop Phi⊤1
2 − Phi⊤1

After SCCP, the program is fully typed.
SCCP is the type analysis pass.

', notes:notes('Optimism earns its keep',[ 'Use the source as a concrete loop, but the equations are SSA pseudocode. The pessimistic fixed point cannot discover x=1 through the cycle.', - 'For this talk, Copy viewer command launches make -C chapter25 view. Chapter 25 demonstrates the same SCCP example using its separately compiled standard library, avoiding Chapter 24’s thousands of library capture frames. The slide topic and lattice remain Chapter 24.', + 'For this talk, Copy viewer command launches make -C chapter28b view. Chapter 25 demonstrates the same SCCP example using its separately compiled standard library, avoiding Chapter 24’s thousands of library capture frames. The slide topic and lattice remain Chapter 24.', 'Use Rich lattice for the big picture, then return to Example. The entry value sharpens the Phi to 1; the backedge evaluates to 1 and confirms it. Explain the direction of monotonicity, not just “assume it works.”', 'Control propagation makes the solve conditional. Chapter 24 also discovers interprocedural call-graph edges; Chapter 18’s local linking was only the beginning.' ],'

Target time: 28:00. Continue to the closing slide, or use Overview → Chapter 25 if two minutes remain and replace the closing discussion.

') diff --git a/docs/2026_REBASE/stdlib.js b/docs/2026_REBASE/stdlib.js index 22c92fe4..baf3af78 100644 --- a/docs/2026_REBASE/stdlib.js +++ b/docs/2026_REBASE/stdlib.js @@ -1,6 +1,6 @@ /* Generated by tools/snapshot-library.py; local source snapshot. */ window.REBASE.library = { - "origin": "chapter25/src/main/smp", + "origin": "chapter28b/src/main/smp", "files": { "sys.smp": "\n// top-level default standard library import\n\nval adt = adt; // Abstract Data Types\nval ary = ary; // Array utilities\nval aryi64 = aryi64; // Variable sized array of i64\nval aryu8 = aryu8; // Variable sized array of u8\nval char = char; // Character utilities\nval io = io; // IO library\nval libc = libc; // libc FFI bindings\nval scan = scan; // A simple string parser\n", "sys/adt/bitset.smp": "\n// A set of non-negative integers, represented one bit per value.\nstruct bitset {\n i64[] !_bits;\n\n new bitset = { ->\n _bits = new i64[1];\n };\n\n // Return 0 for missing, non-zero for true\n val get = { int bit ->\n if( (bit >> 6) >= _bits# ) return false;\n i64 mask = 1 << (bit & 63);\n return (_bits[bit >> 6] & mask);\n };\n\n val _grow = { int bit ->\n int x = bit >> 6;\n int len = _bits#;\n if( x < len ) return self;\n while( x >= len ) len *= 2;\n var bits = new i64[len];\n for( int i=0; i<_bits#; i++ )\n bits[i] = _bits[i];\n _bits = bits;\n return self;\n };\n\n // Set\n val set = { int bit ->\n i64 mask = 1 << (bit & 63);\n _grow(bit)._bits[bit >> 6] |= mask;\n return self;\n };\n\n // Test and set\n val tset = { int bit ->\n int idx = bit >> 6;\n i64 mask = 1 << (bit & 63);\n if( _grow(bit)._bits[idx] & mask )\n return true; // Already set\n _bits[idx] |= mask;\n return false; // Was false (and now set)\n };\n\n val clr = { int bit ->\n if( (bit >> 6) >= _bits# ) return self;\n i64 mask = 1 << (bit & 63);\n _bits[bit >> 6] &= (mask ^ -1);\n return self;\n };\n\n val clear = { ->\n for( int i=0; i<_bits#; i++ ) _bits[i] = 0;\n return self;\n };\n};\n", diff --git a/docs/2026_REBASE/tools/snapshot-library.py b/docs/2026_REBASE/tools/snapshot-library.py index dee09d2f..1a4b8732 100644 --- a/docs/2026_REBASE/tools/snapshot-library.py +++ b/docs/2026_REBASE/tools/snapshot-library.py @@ -4,10 +4,10 @@ import json deck = Path(__file__).resolve().parents[1] repo = deck.parents[1] -source = repo / "chapter25/src/main/smp" +source = repo / "chapter28b/src/main/smp" paths = [source / "sys.smp", *sorted((source / "sys").rglob("*.smp"))] files = {path.relative_to(source).as_posix(): path.read_text(encoding="utf-8") for path in paths} -bundle = {"origin": "chapter25/src/main/smp", "files": files, +bundle = {"origin": "chapter28b/src/main/smp", "files": files, "methods": (deck / "demos/methods.smp").read_text(encoding="utf-8")} (deck / "stdlib.js").write_text( "/* Generated by tools/snapshot-library.py; local source snapshot. */\n" -- cgit v1.2.3