Skip to content
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

Portfolio update #321

Merged
merged 22 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/benchexec-test/theta.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<!DOCTYPE benchmark PUBLIC "+//IDN sosy-lab.org//DTD BenchExec benchmark 1.9//EN" "https://www.sosy-lab.org/benchexec/benchmark-2.3.dtd">
<benchmark tool="theta" timelimit="20 s" hardtimelimit="30 s">
<benchmark tool="theta" timelimit="40 s" hardtimelimit="60 s">

<resultfiles>**/witness.*</resultfiles>

Expand Down
8 changes: 8 additions & 0 deletions .github/actions/create-release/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ runs:
with:
name: Theta_SV-COMP
path: upload/
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v3.0.2
with:
name: EmergenTheta_SV-COMP
path: upload/
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v3.0.2
with:
name: Thorn_SV-COMP
path: upload/
- run: for i in $(find jar -name "*-all.jar"); do mv -v $i upload/$(basename ${i%-${{steps.value.outputs.version}}-all.jar}.jar); done
shell: bash
- name: Release
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux-build-test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, ubuntu-22.04]
os: [ubuntu-latest]
needs: build
runs-on: ${{ matrix.os }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ buildscript {

allprojects {
group = "hu.bme.mit.theta"
version = "6.8.1"
version = "6.8.2"

apply(from = rootDir.resolve("gradle/shared-with-buildSrc/mirrors.gradle.kts"))
}
Expand Down
8 changes: 4 additions & 4 deletions subprojects/common/grammar/src/main/antlr/CommonTokens.g4
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,6 @@ MINUS
: '-'
;

MUL : '*'
;

DIV : 'div'
;

Expand Down Expand Up @@ -406,7 +403,10 @@ SIGN: PLUS | MINUS
DOT : '.'
;

ID : (LETTER | UNDERSCORE) (LETTER | UNDERSCORE | '$' | DIGIT | COLON)*
ID : (LETTER | UNDERSCORE) (LETTER | UNDERSCORE | '$' | '*' | DIGIT | COLON)*
;

MUL : '*'
;

UNDERSCORE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ class ExprTest {
fun data(): Collection<Array<Any>> {
val x = Var("x", Int())
val p = Param("p", Int())
val casret = Var("thr1::casret*", Int())

val bvLit1 = Bv(BooleanArray(4) { it % 2 == 0 })
val bvLit2 = Bv(BooleanArray(4) { it % 2 == 1 })
Expand Down Expand Up @@ -286,6 +287,11 @@ class ExprTest {
emptyMap<Symbol, Decl<*>>(),
),
arrayOf(Dereference(Int(0), Int(1), Int()), "(deref 0 1 Int)", emptyMap<Symbol, Decl<*>>()),
arrayOf(
Dereference(casret.ref, Int(0), Int()),
"(deref thr1::casret* 0 Int)",
mapOf(Pair(NamedSymbol("thr1::casret*"), casret)),
),
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ fun <K, V> Map<K, V>.reverseMapping() = this.entries.associate { it.value to it.
fun Valuation.changeVars(varLut: Map<out Decl<*>, VarDecl<*>>): Valuation {
val builder = ImmutableValuation.builder()
for (decl in this.decls) {
builder.put(decl.changeVars(varLut), this.eval(decl).get())
if (decl in varLut) {
builder.put(decl.changeVars(varLut), this.eval(decl).get())
}
}
return builder.build()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,13 @@ import hu.bme.mit.theta.solver.SolverStatus
import hu.bme.mit.theta.xcfa.*
import hu.bme.mit.theta.xcfa.analysis.XcfaPrec
import hu.bme.mit.theta.xcfa.model.*
import hu.bme.mit.theta.xcfa.passes.AssumeFalseRemovalPass
import hu.bme.mit.theta.xcfa.passes.AtomicReadsOneWritePass
import hu.bme.mit.theta.xcfa.passes.MutexToVarPass
import kotlin.time.measureTime

private val Expr<*>.vars
get() = ExprUtils.getVars(this)

class XcfaOcChecker(
xcfa: XCFA,
private val xcfa: XCFA,
decisionProcedure: OcDecisionProcedureType,
private val logger: Logger,
conflictInput: String?,
Expand All @@ -68,10 +65,6 @@ class XcfaOcChecker(
private val autoConflictConfig: AutoConflictFinderConfig,
) : SafetyChecker<EmptyProof, Cex, XcfaPrec<UnitPrec>> {

private val xcfa: XCFA =
xcfa.optimizeFurther(
listOf(AssumeFalseRemovalPass(), MutexToVarPass(), AtomicReadsOneWritePass())
)
private var indexing = VarIndexingFactory.indexing(0)
private val localVars = mutableMapOf<VarDecl<*>, MutableMap<Int, VarDecl<*>>>()
private val memoryDecl = Decls.Var("__oc_checker_memory_declaration__", Int())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ private fun backend(
}
.let { result ->
when {
result.isSafe && LoopUnrollPass.FORCE_UNROLL_USED -> {
result.isSafe && xcfa.unsafeUnrollUsed -> {
// cannot report safe if force unroll was used
logger.write(RESULT, "Incomplete loop unroll used: safe result is unreliable.\n")
if (config.outputConfig.acceptUnreliableSafe)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import hu.bme.mit.theta.xcfa.analysis.*
import hu.bme.mit.theta.xcfa.analysis.por.XcfaDporLts
import hu.bme.mit.theta.xcfa.cli.params.*
import hu.bme.mit.theta.xcfa.cli.utils.getSolver
import hu.bme.mit.theta.xcfa.dereferences
import hu.bme.mit.theta.xcfa.model.XCFA

fun getCegarChecker(
Expand All @@ -53,6 +54,12 @@ fun getCegarChecker(
XcfaPrec<*>,
> {
val cegarConfig = config.backendConfig.specConfig as CegarConfig
if (
config.inputConfig.property == ErrorDetection.DATA_RACE &&
xcfa.procedures.any { it.edges.any { it.label.dereferences.isNotEmpty() } }
) {
throw RuntimeException("DATA_RACE cannot be checked when pointers exist in the file.")
}
val abstractionSolverFactory: SolverFactory =
getSolver(
cegarConfig.abstractorConfig.abstractionSolver,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,22 @@ fun getPortfolioChecker(
"STABLE",
"CEGAR",
"COMPLEX",
"COMPLEX25" -> complexPortfolio25(xcfa, mcm, parseContext, config, logger, uniqueLogger)

"COMPLEX24" -> complexPortfolio24(xcfa, mcm, parseContext, config, logger, uniqueLogger)

"COMPLEX23" -> complexPortfolio23(xcfa, mcm, parseContext, config, logger, uniqueLogger)

"EMERGENT",
"BOUNDED" -> boundedPortfolio(xcfa, mcm, parseContext, config, logger, uniqueLogger)
"BOUNDED",
"BOUNDED25" -> boundedPortfolio25(xcfa, mcm, parseContext, config, logger, uniqueLogger)

"BOUNDED24" -> boundedPortfolio24(xcfa, mcm, parseContext, config, logger, uniqueLogger)

"TESTING",
"CHC",
"HORN" -> hornPortfolio(xcfa, mcm, parseContext, config, logger, uniqueLogger)
"HORN",
"HORN25" -> hornPortfolio25(xcfa, mcm, parseContext, config, logger, uniqueLogger)

else -> {
if (File(portfolioName).exists()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import hu.bme.mit.theta.xcfa.passes.LbePass
import hu.bme.mit.theta.xcfa.passes.LoopUnrollPass
import java.nio.file.Paths

fun boundedPortfolio(
fun boundedPortfolio24(
xcfa: XCFA,
mcm: MCM,
parseContext: ParseContext,
Expand Down
Loading
Loading