Skip to content

[AUTOMATED] Model bounded C++ constructor initialization effects - #5

Merged
mahaloz merged 40 commits into
Noelo-Lab:mainfrom
sjkim1127:codex/cpp-constructor-effects
Nov 9, 2026
Merged

mahaloz merged 40 commits into
Noelo-Lab:mainfrom
sjkim1127:codex/cpp-constructor-effects

Conversation

@sjkim1127

@sjkim1127 sjkim1127 commented Oct 27, 2026 •

Copy link
Copy Markdown

[AUTOMATED]

Constructor member initializers can execute calls and assign fields before the constructor body, but Joern 4.0.150 omits those effects in the focused reference control. Add an opt-in, CFG-only profile that models a bounded set of complete explicit scalar member initializers in declaration order.

This PR is independently based on main. The optional source type-name context has been split into #12. The default remains unchanged. Unsupported bases, virtual members, omitted or unknown initialization, references, non-scalar fields, unproven conversions and data-flow requests cause the profile to abstain. It does not model unwinding, hidden vptr work, or full object lifetime semantics.

Pointer members accept nullptr, but pointer values from variables or calls, including valid copies, abstain because the available binding types lose pointee cv qualifiers. String literals are excluded. This bounded rule is not a complete C++ conversion checker.

Validation of the split tree:

  • Rust all targets: 209 passed; fmt and clippy passed.
  • Python: 154 run, 16 skipped. Focused constructor regression: 5 passed.
  • Clang C++17 controls from the prior follow-up covered four invalid and four valid literal/pointer conversions; a valid pointer copy is additionally tested as an intentional abstention.
  • The earlier combined candidate had a Clang C++11 runtime control and a Joern 4.0.150 comparison for initializer evaluation order. Prior default-profile corpus captures and release hashes predate this split and have not been repeated on this head; see docs/eval/cpp_constructor_independent.md.

The intentionally different opt-in behavior is documented in docs/divergences.md. Real-project semantic coverage and broader default parity remain open. No DecBench pin or score changed.

Integration: #12 and this PR independently edit the same API and parser entry points. A local merge-tree check reports conflicts in five files; after either lands, rebase and revalidate the other.

@sjkim1127
sjkim1127 marked this pull request as ready for review October 28, 2026 08:55
@sjkim1127 sjkim1127 changed the title [AUTOMATED] Add opt-in C++ context and scalar initialization [AUTOMATED] Model bounded C++ constructor initialization effects Oct 29, 2026
mahaloz and others added 13 commits November 9, 2026 16:07
Keep the GNU case-range operator in the generated table, and the C++ pack-size spelling in the lexical bridge, so the operator port does not change either.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0179iMKNTKZkNX6ZRBmB96eA
Every other restorable divergence has a joern_* option that original-reference comparisons request. Add joern_cpp_control_flow for the C++ evaluation-order fixes, starting with noexcept operands.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0179iMKNTKZkNX6ZRBmB96eA
Keep the lowering this change replaced, so original-reference comparisons can still request it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0179iMKNTKZkNX6ZRBmB96eA
Copilot AI balanced review requested due to automatic review settings November 9, 2026 16:57
@mahaloz
mahaloz merged commit 85f55df into Noelo-Lab:main Nov 9, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

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.

3 participants