-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new IcfgBuilder #690
base: dev
Are you sure you want to change the base?
Add new IcfgBuilder #690
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your work! I did not have a detailed look yet, but here are already some more general comments.
trunk/examples/settings/automizer/ForwardPredicates_IcfgBuilder.epf
Outdated
Show resolved
Hide resolved
...informatik/ultimate/plugins/generator/icfgbuilder/preferences/IcfgPreferenceInitializer.java
Show resolved
Hide resolved
...c/de/uni_freiburg/informatik/ultimate/plugins/generator/icfgbuilder/WeakestPrecondition.java
Show resolved
Hide resolved
trunk/examples/settings/automizer/ForwardPredicates_IcfgBuilder.epf
Outdated
Show resolved
Hide resolved
...e/uni_freiburg/informatik/ultimate/plugins/generator/rcfgbuilder/cfg/LargeBlockEncoding.java
Outdated
Show resolved
Hide resolved
105740d
to
d00bf86
Compare
I just synced the |
...er/src/de/uni_freiburg/informatik/ultimate/plugins/generator/icfgbuilder/cfg/CfgBuilder.java
Outdated
Show resolved
Hide resolved
...er/src/de/uni_freiburg/informatik/ultimate/plugins/generator/icfgbuilder/cfg/CfgBuilder.java
Outdated
Show resolved
Hide resolved
firstStatement = | ||
new ReturnStatement(mBoogieDeclarations.getProcImplementation().get(procName).getLocation()); | ||
} else { | ||
firstStatement = body.getBlock()[0]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the RCFGBuilder
firstStatement
is always set to body.getBlock()[0]
, why is this different here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the RCFGBuilder
body.getBlock()
could never be empty, because the BoogiePreprocessor
would insert a return statement in that case. With the setting that disables the UnstructureCode
class from the BoogiePreprocessor
body.getBlock()
can now be empty.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But does this belong to the CfgBuilder
? Wouldn't it be better to move it into its own Preprocessor that always runs independant of UnstructureCode
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or do we even need this statement here? Is it possible to create a location without a statement?
...er/src/de/uni_freiburg/informatik/ultimate/plugins/generator/icfgbuilder/cfg/CfgBuilder.java
Show resolved
Hide resolved
5470c7c
to
7499e73
Compare
Some info (not enough time to think about your post): The new IcfgBuilder alredy makes sure that labels get their own IcfgLocation. |
bc983fe
to
a20ad9d
Compare
a20ad9d
to
d19095a
Compare
d19095a
to
b0202f8
Compare
Otherwise the StepInfo is reset, since mutable sets are used.
Do not copy annotations directly from original statements to edges but only to auxiliary statements. (Because annotations are copied from all statements to edges anyway.)
Unify code for prepending statements
Use assumption that mapping returns singleton except for calls.
The setting "Only consider context switches at boundaries of atomic blocks" (aka the nodatarace-LBE) is only meant to affect concurrent programs. It performs a kind of large-block encoding (LBE) that is usually not desirable for sequential programs.
IcfgBuilder is already the default anyway.
…rver The new IcfgBuilder does not use UnstructureCode anymore. To avoid reimplementation there, this was moved to the new oberserver ReplaceArrayAssignments.
This does not seem as useful as in the RCFGBuilder, as most of such assume true statements where introduced in UnstructureCode, but it does not harm to keep it.
d1e40c5
to
9107825
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look good so far. The branch has already been correctly adapted to our Java 21 and Eclipse migration and can therefore be merged without any issues.
However, there are still a few small things that need to be improved. For example, in the comments and the license agreement in the headers of ICFG source code files, the word RCFGBuilder should be replaced consistently with ICFGBuilder.
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-21"/> | ||
<classpathentry exported="true" kind="con" path="org.eclipse.pde.core.requiredPlugins"/> | ||
<classpathentry kind="src" path="src"/> | ||
<classpathentry combineaccessrules="false" kind="src" path="/BoogiePrinter"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this access rule necessary? Does a utility need to be accessed internally here?
If so, then the API and implementation of the required software component should be restructured to avoid such hacks and instead access public interfaces cleanly via the MANIFEST.MF
.
@@ -0,0 +1,23 @@ | |||
Copyright (C) @{daterange} @{author:r} | |||
|
|||
This file is part of the ULTIMATE RCFGBuilder plug-in. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't the objective be called ICFGBuilder instead of RCFGBuilder in the whole license template file?
// mLogger.info(getClass().getSimpleName()); | ||
// printHondas(cfg, mLogger::info); | ||
// printCFG(cfg, mLogger::info); | ||
// mLogger.info("######## END "+getClass().getSimpleName()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove unused debugging code or implement it correctly when debug mode is enabled.
Commits for switching from RCFGBuilder to IcfgBuilder are missing in this branch. But Frank convinced me to already start a pull request.