Effect4

R8: Runs and faces as named connections: equal to the reference inside a profile, refused outside itreq:R8

Requirement R8: Runs and faces as named connectionsabout:req:R8

This page explains requirement R8 in Effect4. It covers what the requirement asks for execution faces and profiles, why named connections matter, and how the property is checked.

What the requirement asksabout:req:R8:what-it-asks

Requirement R8 demands that every face and backend operates as a named connection bounded by explicit profile data (docs/core/system-map.md §8, decisions row 79):

  • Profile bounds: inside its declared profile, a face's observation equals the reference observation up to an identity bijection.
  • Located refusal: outside its profile, the face refuses execution, including intermediate values that exceed supported bounds.
  • Profile as data: target capabilities and numerical ranges are defined as first-order profile data rather than ad-hoc heuristics.
  • Invertible target syntax: printing and reading target code form partial isomorphisms on readable domains.

A face must never silently compute unvetted answers outside its certified profile.

Why it mattersabout:req:R8:why-it-matters

Effect4 presents multiple faces: application interfaces, printed TypeScript modules, and native OCaml engines lowered through LCNF.

Different target runtimes enforce different scalar limits, memory layouts, and feature subsets.

An explicit profile makes each face state the boundary it supports, so a difference between platforms is a refusal and not a silent divergence.

How it is checkedabout:req:R8:how-it-is-checked

The requirement is checked by proving face simulations and print-read isomorphisms over declared profiles:

  • Invertible syntax round-tripping is stated by read_print and read_exact in src/Effect4/Laws/Codegen/ReadPrint.lean.
  • Meaning agreement on the Straight fragment is stated by run_eq_meaning (src/Effect4/Laws/Program/Agreement/Segment.lean).
  • Loop step agreement on the Looped fragment is stated by loopAgreement_of_straight (src/Effect4/Laws/Program/LoopAgreement.lean).
  • Reference simulation at the empty row table is stated by run_eq_ref (src/Effect4/Laws/Program/RuntimeR.lean).

The plan on this page gives each theorem's status and the goals it rests on.

R8 by concept: each concept its nodes are placed at, by tag or by module. An arrow goes where a node's proof reaches a node of another concept.
The figure in words
NodeStatusRests onNearest nodes
read_printproved—readTerm_printTerm
read_exactproved——
run_eq_meaningproved—at_append
loopAgreementproved—at_append
run_eq_refproved—at_append
mask_rows_table_premisesproved—read_exact, read_print
printTyped_eq_printproved—printTypedAt_none
printTypedAt_noneproved—hom_eq_cata_eff
eraseJoinArgs_printTypedproved—eraseJoinArgs_printTypedSitesAt, eraseJoinArgs_printTypedAt
eraseJoinArgs_printTypedAtproved—readTerm_printTerm
eraseJoinArgs_printTypedSitesAtproved—envAt_append, annotate_eq_table, at_child, readTerm_printTerm, envAt_child
readTyped_exactproved—read_exact
readTyped_printTypedproved—eraseJoinArgs_printTyped, read_print
readTyped_printTypedAtproved—eraseJoinArgs_printTypedAt, read_print
readModule_printModule_defsproved—replaceAt_spec
funded_replaysproved—journal_replays, tape_replays
tape_replaysproved——
unsuspended_runsproved—run_agrees
shown_views_openedproved—tapeFrom_position_replays
readTerm_printTermproved——
at_appendproved——
hom_eq_cata_effproved——
envAt_appendproved——
annotate_eq_tableproved—check_eq, table_eq_tableAt
at_childproved—at_append
envAt_childproved—envAt_append
replaceAt_specproved——
journal_replaysproved——
run_agreesproved—run_eq_meaning
tapeFrom_position_replaysproved—tape_replays
check_eqproved—tableAt_eq_cons, tableAt_none, checkStmt_step_binds, effTy_of_check, termTy_of_term?
table_eq_tableAtproved——
tableAt_eq_consproved—tableEntryAt_nil, childAddresses_map_tableEntryAt, addresses_eq_cons
tableAt_noneproved——
checkStmt_step_bindsproved——
effTy_of_checkproved—check_sound, check_complete
termTy_of_term?proved——
tableEntryAt_nilproved——
childAddresses_map_tableEntryAtproved——
addresses_eq_consproved—foldMapAt_stmt_paths_cons, foldMapAt_layers_paths_cons, foldMapAt_effs_paths_cons, foldMapAt_layer_paths_cons, foldMapAt_action_paths_cons, foldMapAt_stmts_paths_cons, foldMapAt_eff_paths_cons
check_soundproved——
check_completeproved——
foldMapAt_stmt_paths_consproved—foldMapAt_stmt_paths_shift
foldMapAt_layers_paths_consproved—foldMapAt_layers_paths_shift
foldMapAt_effs_paths_consproved—foldMapAt_effs_paths_shift
foldMapAt_layer_paths_consproved—foldMapAt_layer_paths_shift
foldMapAt_action_paths_consproved—foldMapAt_action_paths_shift
foldMapAt_stmts_paths_consproved—foldMapAt_stmts_paths_shift
foldMapAt_eff_paths_consproved—foldMapAt_eff_paths_shift
foldMapAt_stmt_paths_shiftproved—foldMapAt_stmt_hom, foldMapAt_stmt_base
foldMapAt_layers_paths_shiftproved—foldMapAt_layers_hom, foldMapAt_layers_base
foldMapAt_effs_paths_shiftproved—foldMapAt_effs_hom, foldMapAt_effs_base
foldMapAt_layer_paths_shiftproved—foldMapAt_layer_hom, foldMapAt_layer_base
foldMapAt_action_paths_shiftproved—foldMapAt_action_hom, foldMapAt_action_base
foldMapAt_stmts_paths_shiftproved—foldMapAt_stmts_hom, foldMapAt_stmts_base
foldMapAt_eff_paths_shiftproved—foldMapAt_eff_hom, foldMapAt_eff_base
foldMapAt_stmt_homproved——
foldMapAt_stmt_baseproved——
foldMapAt_layers_homproved——
foldMapAt_layers_baseproved——
foldMapAt_effs_homproved——
foldMapAt_effs_baseproved——
foldMapAt_layer_homproved——
foldMapAt_layer_baseproved——
foldMapAt_action_homproved——
foldMapAt_action_baseproved——
foldMapAt_stmts_homproved——
foldMapAt_stmts_baseproved——
foldMapAt_eff_homproved——
foldMapAt_eff_baseproved——