Add live CEK stepper island — interactive stepping debugger
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m0s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m0s
A defisland that lets users type an SX expression, step through CEK evaluation one transition at a time, and see C/E/K registers update live. Demonstrates that cek-step is pure data->data. - cek.sx geography: add ~geography/cek/demo-stepper island with source input, step/run/reset buttons, state display, step history - platform_js.py: register CEK stepping primitives (make-cek-state, cek-step, cek-terminal?, cek-value, make-env, sx-serialize) so island code can access them Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1508,6 +1508,21 @@ CEK_FIXUPS_JS = '''
|
||||
while (!cekTerminal_p(state)) { state = cekStep(state); }
|
||||
return cekValue(state);
|
||||
};
|
||||
|
||||
// CEK stepping primitives — for debugger islands
|
||||
PRIMITIVES["make-cek-state"] = makeCekState;
|
||||
PRIMITIVES["cek-step"] = cekStep;
|
||||
PRIMITIVES["cek-terminal?"] = cekTerminal_p;
|
||||
PRIMITIVES["cek-value"] = cekValue;
|
||||
PRIMITIVES["make-env"] = function() { return merge(PRIMITIVES); };
|
||||
PRIMITIVES["sx-serialize"] = sxSerialize;
|
||||
PRIMITIVES["lambda-name"] = lambdaName;
|
||||
PRIMITIVES["callable?"] = isCallable;
|
||||
PRIMITIVES["is-html-tag?"] = function(name) { return HTML_TAGS.indexOf(name) >= 0; };
|
||||
PRIMITIVES["make-symbol"] = function(name) { return new Symbol(name); };
|
||||
PRIMITIVES["keyword-name"] = keywordName;
|
||||
PRIMITIVES["type-of"] = typeOf;
|
||||
PRIMITIVES["symbol-name"] = symbolName;
|
||||
'''
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user