Skip to content

Commit

Permalink
More meaningful error message for smtlib error
Browse files Browse the repository at this point in the history
  • Loading branch information
leventeBajczi committed Jan 7, 2024
1 parent be2e4e8 commit 4dcde47
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/actions/benchexec-test/theta.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<option name="--disable-arg-generation"/>
<option name="--backend">PORTFOLIO</option>
<option name="--portfolio">COMPLEX</option>
<option name="--loglevel">RESULT</option>
<option name="--loglevel">INFO</option>

<rundefinition name="SV-COMP24_unreach-call">
<tasks name="ReachSafety-Arrays">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,8 @@ public final SolverFactory getSolverFactory(final Path home, final String versio

final var installDir = home.resolve(version);
if (!Files.exists(installDir)) {
throw new SmtLibSolverInstallerException("The version is not installed");
throw new SmtLibSolverInstallerException("The version <" + version
+ "> is not installed in <" + home + ">");
}

try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,13 @@ data class InputConfig(

@Parameter(names = ["--property-value"], description = "Property")
var property: ErrorDetection = ErrorDetection.ERROR_LOCATION
) : Config
) : Config {

override fun toString(): String {
return "InputConfig(inputFile=${input}, catFile=${catFile}, parseCtx=${parseCtx}, " +
"xcfaWCtx=${xcfaWCtx?.let { "present" } ?: "missing"}, propertyFile=${propertyFile}, property=${property}"
}
}

interface SpecFrontendConfig : Config
data class FrontendConfig<T : SpecFrontendConfig>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ fun registerAllSolverManagers(home: String, logger: Logger) {
SolverManager.closeAll()
// register solver managers
SolverManager.registerSolverManager(Z3SolverManager.create())
logger.write(Logger.Level.INFO, "Registered Z3 SolverManager")
if (OsHelper.getOs() == OsHelper.OperatingSystem.LINUX) {
val homePath = Path.of(home)
val smtLibSolverManager: SmtLibSolverManager = SmtLibSolverManager.create(homePath, logger)
SolverManager.registerSolverManager(smtLibSolverManager)
logger.write(Logger.Level.INFO, "Registered SMT-LIB SolverManager")
}
}

0 comments on commit 4dcde47

Please sign in to comment.