Skip to content

cpp: Model BDE single-element concurrent queue operations - #22584

Open
kumarak wants to merge 1 commit into
github:mainfrom
trail-of-forks:bde-bdlcc-models
Open

kumarak wants to merge 1 commit into
github:mainfrom
trail-of-forks:bde-bdlcc-models

Conversation

@kumarak

@kumarak kumarak commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

This change models contained-value flow through single-element operations on bdlcc::Deque and bdlcc::BoundedQueue, including push/pop, force/try variants, reference and move inputs, output-parameter pops, and Deque return-value pops.

The models preserve scalar, pointer, and aggregate payloads. Range and bulk overloads remain available for body analysis.

Tests cover payload propagation, return-value pops, status results, preservation of existing outputs on failure, and range-overload body analysis. The models capture possible payload flow without modeling queue order or operation success.

Copilot AI balanced review requested due to automatic review settings September 15, 2026 22:08
@kumarak
kumarak requested a review from a team as a code owner September 15, 2026 22:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The Deque tryPushFront overloads are omitted from both the models and tests.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds C++ data-flow models for single-element BDE concurrent queue operations.

Changes:

  • Models payload flow through bdlcc::Deque and BoundedQueue.
  • Adds scalar, pointer, aggregate, move, status, and range-overload tests.
  • Adds a change note and validation expectations.
File summaries
File Description
cpp/ql/lib/ext/bdlcc.model.yml Defines queue flow summaries.
cpp/ql/lib/change-notes/2026-09-14-bdlcc-models.md Documents the new models.
cpp/ql/test/library-tests/dataflow/bdlcc/queues.h Provides test API declarations.
cpp/ql/test/library-tests/dataflow/bdlcc/test.cpp Tests single-element payload flow.
cpp/ql/test/library-tests/dataflow/bdlcc/ranges.cpp Verifies range-body analysis remains active.
cpp/ql/test/library-tests/dataflow/bdlcc/flow.ql Configures the flow test.
cpp/ql/test/library-tests/dataflow/bdlcc/flow.expected Stores the expected test output.
cpp/ql/test/library-tests/dataflow/external-models/validatemodels.expected Updates model-validation expectations.
Review details
  • Files reviewed: 8/8 changed files
  • Comments generated: 1
  • Review effort level: Balanced (auto)

Note

Copilot is running an experiment and ran this review at Balanced.


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +16 to +17
- ["BloombergLP::bdlcc", "Deque<T>", False, "tryPushBack", "(const T &)", "", "Argument[*@0]", "Argument[-1].Element[@]", "value", "manual"]
- ["BloombergLP::bdlcc", "Deque<T>", False, "tryPushBack", "(T &&)", "", "Argument[*@0]", "Argument[-1].Element[@]", "value", "manual"]
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.

2 participants