Skip to content

Support custom EtsStmt in CFG DSL#347

Merged
Lipen merged 1 commit into
neofrom
lipen/cfg-dsl-custom-stmt
Aug 20, 2025
Merged

Support custom EtsStmt in CFG DSL#347
Lipen merged 1 commit into
neofrom
lipen/cfg-dsl-custom-stmt

Conversation

@Lipen
Copy link
Copy Markdown
Member

@Lipen Lipen commented Aug 18, 2025

No description provided.

@Lipen Lipen requested a review from CaelmBleidd August 18, 2025 16:10
@github-actions
Copy link
Copy Markdown
Contributor

Test Results

  217 files  ±0    217 suites  ±0   16m 8s ⏱️ +16s
  729 tests ±0    717 ✅ ±0  12 💤 ±0  0 ❌ ±0 
1 997 runs  ±0  1 947 ✅ ±0  50 💤 ±0  0 ❌ ±0 

Results for commit 212d7c8. ± Comparison against base commit 0a50288.

@Lipen Lipen requested a review from Copilot August 19, 2025 10:19
Copy link
Copy Markdown

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 PR adds support for custom EtsStmt statements in the CFG (Control Flow Graph) DSL by introducing a new CustomEts node type and its corresponding block and statement representations. This allows users to define custom ETS statements directly in the DSL that are converted to native EtsStmt objects during compilation.

Key changes:

  • Introduces new CustomEts, BlockCustomEts, and CustomEtsStmt classes to represent custom statements
  • Adds support for custom statements throughout the DSL pipeline (Program → BlockCfg → LinearizedCfg)
  • Updates visualization methods to handle the new custom statement types

Reviewed Changes

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

Show a summary per file
File Description
Node.kt Adds CustomEts node class with toEts function parameter
BlockStmt.kt Adds BlockCustomEts block statement representation
Stmt.kt Adds CustomEtsStmt linearized statement representation
ProgramBuilder.kt Adds customStmt method to program builder interface and implementations
BlockCfg.kt Maps CustomEts nodes to BlockCustomEts statements
LinearizedCfg.kt Converts BlockCustomEts to CustomEtsStmt and fixes return statement validation
BlockCfgBuilder.kt Handles BlockCustomEts statements in ETS compilation
ToDot.kt Adds placeholder labels for custom statements in DOT visualization
Program.kt Adds custom statement handling in string representation
DSL.kt Provides example usage of the new custom statement feature

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread jacodb-ets/src/main/kotlin/org/jacodb/ets/dsl/LinearizedCfg.kt
Comment thread jacodb-ets/src/main/kotlin/org/jacodb/ets/dsl/ToDot.kt
Comment thread jacodb-ets/src/main/kotlin/org/jacodb/ets/dsl/ToDot.kt
Comment thread jacodb-ets/src/main/kotlin/org/jacodb/ets/dsl/ToDot.kt
Comment thread jacodb-ets/src/main/kotlin/org/jacodb/ets/dsl/Program.kt
@Lipen Lipen merged commit 179cec5 into neo Aug 20, 2025
10 checks passed
@Lipen Lipen deleted the lipen/cfg-dsl-custom-stmt branch August 20, 2025 14:28
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