Skip to content

fix: preserve tuple index labels in lookups#213

Open
pesap wants to merge 1 commit intomainfrom
fix/numeric-index-normalization
Open

fix: preserve tuple index labels in lookups#213
pesap wants to merge 1 commit intomainfrom
fix/numeric-index-normalization

Conversation

@pesap
Copy link
Copy Markdown
Collaborator

@pesap pesap commented Apr 30, 2026

Summary

  • stop coercing bound index identifiers from string to number during compile-time index resolution
  • preserve tuple-domain labels like 1.0 so variable instance lookup keys stay consistent
  • add regression test for nodal-style tuple indices with numeric-like labels

Why

Numeric-like tuple labels were being normalized (1.0 -> 1) in expression lookup, which broke variable instance resolution and caused constraints not to materialize.

Validation

  • cargo fmt
  • cargo test -p arco-kdl --test compile_suite lowering_preserves_numeric_tuple_index_labels_in_expression_lookups
  • cargo test -p arco-kdl --test compile_suite lowering_example_nodal_allocation_preserves_sparse_tuple_membership
  • cargo run -- run ~/work/nodal-allocation/nodal_arco/input_debug.kdl

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant