Repository navigation
Add an API call to list available solvers for the current platform - #720
daniel-raffler wants to merge 26 commits into
Conversation
…, or dependencies are missing Set the property `javasmt.test.ignore-link-errors` to `false` to let the test fail. By default, tests are skipped when dependencies are missing
…ndencies in the tests
Several of the solvers require a newer version of libc and will fail to load with the current gitlab runner. We should revert this commit once the gitlab runner has been updated to a more recent version of Ubuntu
This is working as expected! What is the use-case of Does |
The other use-case is projects like CPAchecker that re-use our
Yes, we check if the solver is available for the OS/CPU architecture before trying to run the test Maybe it would be clearer to split up the flag? That is, have one flag so that we can ignore link errors in protected boolean ignoreLinkErrors() {
return true;
} |
Then, according to the use-case you described, this is not a boolean, but a list of ignored solvers (potentially by OS/CPU infrastructure) i would say.
I don't see why this would be useful. Before continuing with this, please find a concrete use-case outside of JavaSMT! I.e. a project like CPAchecker that uses JavaSMT and needs this! |
I added the flag because of this linked issue, specifically the comment here, which includes a possible use-case. To me the part about getting a list of supported solvers for the current platform with Should I simply remove the flag for now? |
|
I think it is crucial that this question is addressed: #692 (comment) (and because it is a conceptual question the discussion seems better placed in the issue). |
…eSolvers" to customize the list of available solvers
…nning on the jdk24 image
We can't use the new configuration option here as OptiMathSat is not a separate solver backend, but part of MathSat
…vailable for windows
…ded due to missing binaries
Hello,
this PR extends the JavaSMT API with a new call
Solvers.available()to list all solvers that are supported on the current OS and CPU architecture. The call works similarly to the existingSolvers.values()and can be used to iterate over all available solvers during testing. UnlikeSolvers.values()it skips over solvers that are not available on the platform, which helps to avoid failed tests due to missing libraries, when in reality the solver just isn't available for the testing platformThe PR also adds a new
antoption"ignoreLinkErrors"to decide if tests should fail if solver binaries are not installed, or when there are linking issues due to missing system libraries. By default allSolverBasedTestsare skipped if the solver binary can't be found, and only tests inSolverContextFactoryTestwill fail as a warning about the configuration issue. Setting the new option"ignoreLinkErrors"totruecauses the tests inSolverContextFactoryTestto also be skipped for the solver, while setting it tofalsemakes all tests fail if there are missing binaries or linking issuesAn example for how to use the
"ignoreLinkErrors"can be found in the updatedgitlab-ci.yml: Several of our solvers need a more recent version oflibcthan is available on the gitlab runner, and we're now setting"ignoreLinkErrors"totrueto skip tests that would otherwise fail when these solver can't be loaded