Skip to content

feat: add violation details to DFD converter output#383

Open
dalu-wins wants to merge 11 commits into
DataFlowAnalysis:mainfrom
dalu-wins:feature/violation-summary
Open

feat: add violation details to DFD converter output#383
dalu-wins wants to merge 11 commits into
DataFlowAnalysis:mainfrom
dalu-wins:feature/violation-summary

Conversation

@dalu-wins
Copy link
Copy Markdown

@dalu-wins dalu-wins commented Mar 9, 2026

Overview

This PR extends the DFD to web editor converter to include violation data, enabling the xDECAF web editor frontend to display violation summaries.

Changes

WebEditorDfd.java

  • Added violations field to the record
  • Added withViolations() copy-with method for immutable updates

Violation.java (new)

  • New record representing a constraint violation in the web editor format
  • Contains the constraint, transpose flow graph, violated vertices, and inducing vertices as string lists

ViolationTuple.java (new)

  • Record pairing an AnalysisConstraint with its DSLResult
  • Used to carry violation data through the conversion pipeline

DFD2WebConverter.java

  • Extracted violation analysis into a separate analyzeViolations() method
  • Added createViolations() method that converts ViolationTuple objects into Violation web editor objects
  • Identifies inducing vertices — where the violating characteristic was first introduced — using DataCharacteristicsSelector

DataCharacteristicsSelector.java

  • Extracted core matching logic into reusable matchesDataCharacteristics() method
  • Added isAddedToCharacteristics() method to detect where a characteristic is newly introduced at a vertex

Build Infrastructure

  • Added Tycho/Maven pom.xml files to enable headless builds without the Eclipse IDE
  • Modified category.xml to only include locally built features
  • Updated target platform to fetch datadictionary and dataflowdiagram from the nightly update site

Notes

This PR is related to a corresponding PR in the xDECAF OnlineEditor repository which consumes these violation details in the standalone WebSocket backend and frontend. For instructions how to build, so it can be deployed on a headless server, see the other PR.

@Nicolas-Boltz
Copy link
Copy Markdown
Member

Nicolas-Boltz commented Mar 10, 2026

This PR represents a code review and is not meant to be merged directly like this.
In combination with DataFlowAnalysis/OnlineEditor#90

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.

2 participants