Skip to content

Conversation

@dominikmaeckel
Copy link
Member

No description provided.

@dominikmaeckel dominikmaeckel added this to the v2.1 milestone Dec 10, 2025
@dominikmaeckel dominikmaeckel self-assigned this Dec 10, 2025
Copilot AI review requested due to automatic review settings December 10, 2025 08:18
@dominikmaeckel dominikmaeckel added code-quality Everything regarding the quality of the code clean-up Something is out of date and should be removed labels Dec 10, 2025
@dominikmaeckel dominikmaeckel linked an issue Dec 10, 2025 that may be closed by this pull request
@dominikmaeckel dominikmaeckel marked this pull request as draft December 10, 2025 08:19
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request unifies the iteration interface for TSC (Timed Scenario Constraint) and TSCInstance by making TSCInstance implement Iterable<TSCInstanceNode>. The changes enable consistent iteration patterns across both TSC and TSCInstance objects, replacing the previous traverse() method with the standard iterator interface.

Key Changes

  • Made TSCInstance implement Iterable<TSCInstanceNode> with a new TSCInstanceIterator class
  • Updated generateAllInstances() to return List<TSCInstance> instead of List<TSCInstanceNode>
  • Simplified metric code by replacing traverse() calls with filter() on iterable TSCInstance objects

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
TSCNode.kt Updated generateAllInstances() return type signature
TSCBoundedNode.kt Updated implementation to wrap nodes in TSCInstance and extract rootNode for edges
TSCInstanceIterator.kt New iterator class for depth-first traversal of TSCInstance nodes
TSCInstance.kt Made class implement Iterable<TSCInstanceNode> with iterator and toString methods
TSC.kt Updated buffer types to store TSCInstance instead of TSCInstanceNode
MissedPredicatesPerTSCMetric.kt Replaced traverse() with filter() on iterable TSCInstance
MissedPredicateCombinationsPerTSCMetric.kt Replaced traverse() with filter() on iterable TSCInstance
ValidTSCInstancesPerTSCMetric.kt Updated equality check to use full TSCInstance comparison
MissedTSCInstancesPerTSCMetric.kt Simplified implementation using list-based tracking instead of map-based flags
InvalidTSCInstancesPerTSCMetric.kt Updated equality check to use full TSCInstance comparison

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

dominikmaeckel and others added 4 commits December 10, 2025 12:44
@dominikmaeckel dominikmaeckel marked this pull request as ready for review December 10, 2025 11:48
@dominikmaeckel dominikmaeckel enabled auto-merge (squash) December 10, 2025 13:05
@dominikmaeckel dominikmaeckel merged commit db0b5ff into main Dec 10, 2025
25 checks passed
@dominikmaeckel dominikmaeckel deleted the 272-add-iterator-for-tscinstance branch December 10, 2025 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clean-up Something is out of date and should be removed code-quality Everything regarding the quality of the code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Iterator for TSCInstance.

3 participants