Skip to content

feat(wam-cpp): add cycle-safe is_list/1 - #4269

Open
s243a wants to merge 1 commit into
mainfrom
codex/wam-cpp-is-list
Open

s243a wants to merge 1 commit into
mainfrom
codex/wam-cpp-is-list

Conversation

@s243a

@s243a s243a commented Sep 16, 2026

Copy link
Copy Markdown
Owner

What changed

Adds the C++ WAM is_list/1 builtin to the extracted runtime template. It accepts [] and finite proper [|]/2 spines, rejects open/improper/non-list/unbound values, and rejects cyclic spines with a pointer-identity Floyd walk. Success advances the program counter; failure preserves normal WAM backtracking behavior.

Adds generator and focused C++ regression coverage for proper, improper, open, cyclic, non-list, unbound, continuation, and CLI argument cases.

Validation

  • swipl --on-error=halt -q -g run_tests -t halt tests/test_wam_cpp_is_list.pl
  • swipl --on-error=halt -q -g "run_tests(wam_cpp_generator:cpp_e2e_builtin_is_list)" -t halt tests/test_wam_cpp_generator.pl
  • swipl --on-error=halt -q -g run_tests -t halt tests/test_wam_cpp_generator.pl (408/408)
  • Grok 4.6 source review: merge recommendation; no blocking correctness findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant