Conversation
Brings docs/proposals/PACKAGE_MANAGER_LOGIC_PROPOSAL.md from the exploratory-docs branch as the frozen-base resolver's design brief. Co-authored-by: johns243a <johns243a@gmail.com>
packages/2-style projections interned the first catalog as a ground fact; drop get_value/get_variable from the intern-once allowlist. Lowering a predicate that uses member/2 (or a callee that does) kept only the first witness; leave those on the interpreter. !/0 wiped state.cps entirely, so a lowered helper with a neck cut (satisfies/2) stole the caller's member alternatives. Cut now respects the Call-frame barrier. Probes: projection_not_ground_fact_memo, t4_does_not_steal_search_cps, neck_cut_does_not_steal_caller_cps. Co-authored-by: johns243a <johns243a@gmail.com>
Spec (resolver.pl) and contract corpus (test_resolver.pl) cover classic resolve, layered resolve without touching the base, explain_blocked ceilings, layer_closure manifests, and removal_orphans. Catalog is data; SWI is the oracle. wamjs/ compiles the spec through wam_javascript mixed emit. The shim does term↔JSON only. Seeded differential (≥2000 catalogs) gates selection, explanation set, and orphan set against SWI. Co-authored-by: johns243a <johns243a@gmail.com>
SWI json_write_dict sorts dict keys; the shim inserted name/needs/base_has. Corpus and differential now stable-stringify so blocked/3 terms compare. Co-authored-by: johns243a <johns243a@gmail.com>
s243a
marked this pull request as ready for review
September 2, 2026 02:23
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.
Incubates uw-resolve P0 under
examples/pkg_resolver/: a Prolog package resolver that understands a frozen immutable base (Puppy/Woof-CE style). Stock apt cannot reason about that boundary. One set of relations, four queries; SWI is the oracle; the same spec compiles throughwam_javascript(emit_mode(mixed)).Model
Catalog is data (no assert/retract):
Versions
v(Major, Minor, Patch)lexicographic. Constraints:any,eq(V),gte(V),lt(V),range(Lo, Hi)(Lo inclusive, Hi exclusive). No Debian epoch/tilde in P0.Determinism:
resolve*commit to the first search solution (prefer base-satisfied, else highest version). Selections/manifests sorted.explain_blockedenumerates;removal_orphansreturns one sorted list.Queries
resolve/3— classic closure; may upgrade a base packageresolve_layered/3— satisfiable without touching the base;explain_blockednames the held ceilinglayer_closure/3— non-base dependency closure, deps before dependentsremoval_orphans/3— PPM-style trim; base packages are never orphanswam_javascript fixes this program forced
packages/2interned the first catalog as the answer. Dropget_value/get_variablefrom the intern-once allowlist. Probe:projection_not_ground_fact_memo.member/2must stay interpreted — lowered Call is first-solution. Probe:t4_does_not_steal_search_cps.!/0wiped all choice points — a lowered helper with a neck cut (satisfies/2) stole the caller'smember/2alternatives, so version backtracking andexplain_blockedfailed. Neck cut now respects the Call-frame barrier. Probe:neck_cut_does_not_steal_caller_cps.No edits to
wam_target.pl,wam_text_parser.pl, harness/registry/matrix/glue, orexamples/cli_args/. Frozenexamples/cli_args/wamjs/js/was not regenerated.Acceptance
swipl -q -g test_resolver -t halt examples/pkg_resolver/test_resolver.pl→ 22/22bash examples/pkg_resolver/wamjs/run_corpus_wamjs.sh→ 23/23 matched SWIbash examples/pkg_resolver/run_differential.sh→ 2200 cases, 0 divergences, 0 crashes. timing: swi 1.014s wamjs 6.711stests/test_wam_javascript_lowered.pl(incl. 3 new probes)tests/test_wam_javascript_builtins.pltests/test_wam_javascript_fact_sources.plCONFORMANCE_TARGETS=javascriptontests/test_wam_cross_target_conformance.pl(no javascript adapter registered; opt-in no-op as on the lane tip)UW_PROFILE=1onbacktrack_conflict_deeper: 38 backtracks, maxCP 7, ~14 ms including profiler. Differential is ~3 ms/case on the mixed build; search stays interpreted (resolve_pending,candidates_high_first,pick) while list walks (matching_versions,matching_deps,satisfies) lower.Deferred
Debian epoch/tilde, Provides/virtual packages, GP-LMDB catalog backend (P2),
pkg-style CLI viaexamples/cli_args.