Conversation
… inline uw-resolve through wam_go forced several runtime bugs: - switch_on_structure cases now emit Functor/Label (not ConstCase Val) - empty *List unifies with interned [] (GetConstant of nil) - compareTerms orders compounds so ISO sort/2 keeps distinct pairs - freezeTerm copies findall templates out of Clone() Bindings - call/1 is a classified builtin with an opaque cut floor - go_compile_predicate_to_wam opts into inline_bagof_setof(true) Each of the first four has a dedicated probe; call/1 and bagof are covered by the cut-semantics suite. Co-authored-by: johns243a <johns243a@gmail.com>
SWI-oracled prefer_wam(true) driver matching the JS suite's probe sources. Go has no emit_mode; lowering-refusal tests are N/A. Probes that cannot compile must refuse loudly (none currently). Co-authored-by: johns243a <johns243a@gmail.com>
JSON shim is term IO only. build.sh regenerates the Go WAM project from resolver.pl; generated sources are committed. Corpus and seeded differential drivers compare against SWI; scale probe times resolve_layered on the 5k catalog. Co-authored-by: johns243a <johns243a@gmail.com>
A2 remains structural (not hit). A3 residual remains for unclassified builtins; call/1 is now classified. Cut suite is prefer_wam(true) only. Co-authored-by: johns243a <johns243a@gmail.com>
Call pushes B0 and Y-registers; Execute rebases B0 without pushing (LCO). Proceed pops both. !/0 truncates to PendingB0, not the caller's EnvFrame.CutB0, so a no-Allocate neck-cut cannot steal caller alternatives. Choice points restore the full Y-save and cut_stack snapshots so a first-success Proceed does not extra-pop on retry. Also accept 4-arg begin_aggregate (bagof/setof witness register) so EndAggregate is not skipped. Co-authored-by: johns243a <johns243a@gmail.com>
Commit the generated state.go/runtime.go after the §9 cut-barrier change. Fill uw-resolve README and WAM_GO_STATUS with corpus 39/39, differential 2400/0, cut 35/35, and the honest B3 residual (matching_deps/4 fails past ~1463 depends). Co-authored-by: johns243a <johns243a@gmail.com>
s243a
marked this pull request as ready for review
September 3, 2026 02:56
Driver-minted output Unbounds use Idx 10000+i. After ~9000 PutVariable cells, NextVarId walked into that window and Bindings[10002] aliased resolve_layered's Selection, so sort/2 unified a real Acc with [] on the 5k catalog. Co-authored-by: johns243a <johns243a@gmail.com>
Regenerate the committed Go WAM runtime so allocVarId jumps over Idx 10000-10999 (matching the template), cut the varid probe after write_wam_go_project, and replace the matching_deps residual with measured B3 numbers: Go load 0.060s / resolve 4.604s, same 10-package selection as SWI. Co-authored-by: johns243a <johns243a@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Compile the frozen P0.5 package resolver through wam_go with the same bar as wam_javascript: SWI-oracled corpus, seeded differential, and a 35-probe cut-semantics suite.
Runtime fixes (symptom → cause → fix → probe)
unknown field Valonswitch_on_structure→ ConstCase{Val,Label}used for structs → emit{Functor, Label}→tests/test_wam_go_switch_on_structure.plresolve_pending([], Acc, Acc)never matched → empty*List≠ interned[]→valueEquals+listFromItems→tests/test_wam_go_empty_list_constant.plsortkept oneName-Verpair → compounds compared equal → recursivecompareTerms→tests/test_wam_go_sort_compounds.plremoval_orphans*→[]→ shallow findall copy →freezeTerm→tests/test_wam_go_findall_freeze.plcall/1missing label → notis_builtin_pred→BuiltinCall+ opaque cut floor → cut p09/p10call bagof/3→inline_bagof_setof(true)→ cut p14/p15Lstayed__R200→ 4-argbegin_aggregatedropped as TODO → accept 4th witness-reg arg → cut p14/p151notok→ Y-save extra-pop on retry;!/0used callerEnvFrame.CutB0→ §9 Call/Execute/Proceed + CP snapshots;!/0usesPendingB0→ cut 35/35resolve_layeredunified Acc with[]→allocVarIdclimbed through driver Idx10000+iand aliasedBindings[10002]withSelection→ skip 10000–10999; shim usesvm.allocVarId()→tests/test_wam_go_varid_collision.plAcceptance
run_corpus_go.shrun_differential_go.shtests/test_wam_go_cut_semantics.pltests/test_wam_go_*.plCONFORMANCE_TARGETS=javascriptB1–B3 (this VM: SWI 9.0.4, Go 1.22.2)
go build(clean): 0.168s (not in B1).resolve_layered(seed0xc0ffee01): Go load 0.060s / resolve 4.604s, 10-package selection matching SWI (p1-v(1,0,0),p10,p12,p2,p3,p30,p4,p5,p6,p7). SWI same catalog: load 0.428s / resolve 0.008s.Residuals
X101≡Y1unchanged. Call Y-save is a partial mitigation.call/1is classified.call/1extra solutions first-solution for nested user goals.vm.allocVarId().cljs/orrust/(concurrent rounds).