-
Notifications
You must be signed in to change notification settings - Fork 47
Use SMTInterpol as a Maven dependency #712
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
base: dev
Are you sure you want to change the base?
Conversation
Previously, Ultimate had a slightly changed version of WrapperScript from SMTInterpol, where getFunctionSymbol (4593dc5) and getInterpolants (b26e8fa) were already implemented. To comply with the Maven dependency, these methods have to be implemented in the implementations of WrapperScript instead. Alternatively, these methods could be also implemented in SMTInterpol as previously done in Ultimate.
Even though this class is present in SMTInterpol, it is only used by Ultimate and it was modified to fix a bug (see ddd1310 and 6d19ff8). Therefore, it was copied to Library-SmtLibUtils and SMTSolverBridge (it has to be duplicated, as there is no matching common import of those and they cannot imported by each other because of cyclic dependenices). But the long term solution should be to fix ConstantTermNormalizer in SMTInterpol, i.e., ultimate-pa/smtinterpol#150 should be revisited and merged.
|
In the past, we did not do this because
Point 1 might be ok given the retention of Maven versions. I am in favor of not merging this PR and keeping our SMTInterpol dependencies manual. I get that we like to rely on standardized tools and hence, want to get rid of some crummy scripts that are necessary for some tasks. But the right^TM way of doing that would mean forking SMTInterpol and maintaining that fork, complete with our own releases for it. This would still complicate point 6, although there are ways to deal with that (which probably also involve a script if you don't want to pollute some public release repository or set up and maintain a private one). |
I see, if we want to deviate from the official SMTInterpol, we cannot just use the Maven build.
Yes, they Maven dependencies also contain the source files. This behviour seems also good to me, as you can view the sources and even set breakpoints there, but you cannot modify the sources. |
|
We had two cases that I can remember where students implemented things for us in SMTInterpol and we did experiments with that, but those cases were of course together with the SMTInterpol people. Nevertheless, it would have been complicated to run experiments if we would have needed to go through Maven to integrate. If you like, we can have a meeting and talk about what would be needed for a fork and what we could do to support this scenario. And, of course, perhaps @maul-esel or @Heizmann also have additional pointers. |
So, I did already run Jenkins and even without those two commits (only with the fix for the unmerged PR), all tests seem to pass.
I think, I have an idea:
This way, we can be more flexible to change SMTInterpol to our needs, without the need to duplicate the code in the Ultimate repo. But again: This is not really urgent, I just wanted to try if using SMTInterpol as a dependency does work 😉 |
|
That is probably the best way, yes. |
* Currently there is an issue that the MANIFEST.MF built by ant does not work, therefore I packaged a working manifest manually. * When this succeeds, the build of SMTInterpol should be done in our P2 repo and stored there.
We may still want to go back to our custom SMTInterpol build, but for now I reverted it to avoid failing builds.
I recently found that there is a package of SMTInterpol on Maven (with even a more recent version than in Ultimate), therefore I tried to use it in Ultimate, where we currently have a copy of the source code instead.
(This PR is not really urgent though)
Pros:
Ultimate_E4.32_Java21.target(requires a new version on Maven of course) instead of running a shell script that does some complicated git commands 😉Cons:
SMTInterpol) and necessary datastructures / utilities etc. (Library-SMTLIB). For example, even if a plugin just needs classes likeScriptorTerm, the same package (wrapped.de.uni-freiburg.informatik.ultimate.smtinterpol) has to be included, as if the actual solver is used.Regarding the second pro: There are actually a few changes that I found in Ultimate's version of SMTInterpol that are not present in the original code:
INonSolverScriptandDebugMessagewere only created in Ultimate's version of SMTInterpol, therefore I moved them toLibrary-SmtLibUtilsinstead (75f5f80).ConstantTermNormalizer(which is only used in Ultimate) to fix a bug. There is even a PR for SMTInterpol (Move ConstantTermNormalizer smtinterpol#150). As a workaround (to run the tests successfully), I copied the files to Ultimate (640085e), but instead the PR should be merged (@Heizmann)16acc54(is actually integrated) and c9b6d9b made minor changes. Is this crucial @Heizmann?