Skip to content

Use IcfgBuilder instead of RCFGBuilder as default#770

Open
schuessf wants to merge 7 commits into
devfrom
wip/fs/use-icfgbuilder
Open

Use IcfgBuilder instead of RCFGBuilder as default#770
schuessf wants to merge 7 commits into
devfrom
wip/fs/use-icfgbuilder

Conversation

@schuessf
Copy link
Copy Markdown
Contributor

@schuessf schuessf commented Jan 27, 2026

Currently, Ultimate still offers two ways to build control-flow graphs:

  • RCFGBuilder: the legacy implementation, which only works for programs without while/if and therefore requires UnstructureCode
  • IcfgBuilder: the newer implementation, which supports arbitrary programs and fixed existing bugs

Maintaining both implementations is undesirable because any change requires keeping multiple (partly duplicated) files in sync. For SV-COMP 2026 we already used IcfgBuilder and observed almost identical results as with RCFGBuilder. However, this was achieved via changes in the settings and toolchains as the quickest solution. This PR applies the switch properly and removes RCFGBuilder entirely. Therefore, the following changes were performed:

  • Switch all settings and toolchains that previously used RCFGBuilder to IcfgBuilder (incl. those used for regression tests)
  • Remove the RCFGBuilder plugin and move required files into IcfgBuilder
  • Disable UnstructureCode by default (globally, not just via settings)

@@ -1,18 +1,15 @@
[L3] int a = 5;
[L4] int x = 0;
VAL [a=5, x=0]
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@Heizmann IcfgBuilder seems to behave slightly different than RCFGBuilder on these states in the error path. Is this expected?

VAL [a=0, c=0, d=0, e=0, f=2]
[L23] COND FALSE !(d>0)
VAL [a=0, c=0, e=0, f=2]
[L29] COND TRUE f>0
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@Heizmann IcfgBuilder seems to behave slightly different than RCFGBuilder on these states in the error path. Is this expected?

@schuessf schuessf force-pushed the wip/fs/use-icfgbuilder branch from 2b9b84a to df77478 Compare May 27, 2026 15:22
@schuessf schuessf changed the title Always use IcfgBuilder and remove RCFGBuilder Use IcfgBuilder instead of RCFGBuilder as default May 27, 2026
@schuessf
Copy link
Copy Markdown
Contributor Author

schuessf commented May 27, 2026

After some discussion with @Heizmann we agreed to the following:

  • We use IcfgBuilder as default in all tollchains (instead of RCFGBuilder)
  • IcfgBuilder does not depend anymore on RCFGBuilder, i.e., all commonly used classes are moved to IcfgBuilder
  • But we keep RCFGBuilder for now as a reference, but because of the previous point just a handfull of classes are left that can be easily removed in the future

Therefore, I just adapted the PR to reflect these changes.

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.

1 participant