Skip to content

Make concat_int_array operate on sequence tuples#162

Open
coord-e wants to merge 1 commit into
claude/seq-named-fieldsfrom
claude/seq-concat-tuple
Open

Make concat_int_array operate on sequence tuples#162
coord-e wants to merge 1 commit into
claude/seq-named-fieldsfrom
claude/seq-concat-tuple

Conversation

@coord-e

@coord-e coord-e commented Jul 1, 2026

Copy link
Copy Markdown
Owner

Summary

PR 2 of 4 restructuring #153. Stacked on top of #161.

ArrayConcatTerm now carries the two sequences as whole (array, length) tuples (seq1 / seq2) rather than four destructured array/length terms, and the SMT concat_int_array definition takes two tuple parameters and projects their fields internally instead of accepting the array and length as separate parameters. The select peephole projects the tuple fields accordingly.

Details

  • The (array, length) tuple datatype is now always declared for every int-array element sort a concat_int_array definition is emitted for, so the definition type-checks even when no sequence value of that element sort otherwise appears in the system.

Validation

  • cargo build, cargo fmt --all -- --check, cargo clippy -- -D warnings
  • cargo test — Spacer-backed tests pass (unchanged from PR 1).
  • The rewritten define-fun-rec was dumped via THRUST_OUTPUT_DIR and checked directly with z3: it parses and, on a ground instance, evaluates the concatenation exactly as before. (PCSat-backed tests require the CoAR Docker image and were not run here.)

Stack

  1. named fields (Give the Seq model named array and length fields #161)
  2. this PRconcat_int_array takes sequence tuples
  3. offset field
  4. subsequence + split_first/split_last(_mut)

🤖 Generated with Claude Code

https://claude.ai/code/session_01GzapTuen2mKHkkN3B7d8qi


Generated by Claude Code

`ArrayConcatTerm` now carries the two sequences as whole `(array, length)`
tuples (`seq1`/`seq2`) rather than four destructured array/length terms,
and the SMT `concat_int_array` definition takes two tuple parameters and
projects their fields internally instead of accepting the array and length
as separate parameters. The select peephole projects the tuple fields
accordingly.

The `(array, length)` tuple datatype is now always declared for every
int-array element sort a `concat_int_array` definition is emitted for, so
the definition type-checks even when no sequence value of that element sort
otherwise appears in the system.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GzapTuen2mKHkkN3B7d8qi
@coord-e coord-e force-pushed the claude/seq-concat-tuple branch from 8b1d9a7 to e14038b Compare July 2, 2026 01:22
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.

2 participants