From 6c56d77c58abb8e993b6f04932e1d5458a1653cf Mon Sep 17 00:00:00 2001 From: mondokm Date: Thu, 7 Nov 2024 16:00:53 +0100 Subject: [PATCH] Remove edge and loc vars from defaultvalues --- .../hu/bme/mit/theta/xcfa/analysis/XcfaToMonolithicExpr.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subprojects/xcfa/xcfa-analysis/src/main/java/hu/bme/mit/theta/xcfa/analysis/XcfaToMonolithicExpr.kt b/subprojects/xcfa/xcfa-analysis/src/main/java/hu/bme/mit/theta/xcfa/analysis/XcfaToMonolithicExpr.kt index 4911eb780b..8af9d3ade3 100644 --- a/subprojects/xcfa/xcfa-analysis/src/main/java/hu/bme/mit/theta/xcfa/analysis/XcfaToMonolithicExpr.kt +++ b/subprojects/xcfa/xcfa-analysis/src/main/java/hu/bme/mit/theta/xcfa/analysis/XcfaToMonolithicExpr.kt @@ -108,7 +108,7 @@ fun XCFA.toMonolithicExpr(parseContext: ParseContext, initValues: Boolean = fals val defaultValues = if (initValues) - StmtUtils.getVars(trans) + StmtUtils.getVars(trans).filter { !it.equals(locVar) and !it.equals(edgeVar) } .map { when (it.type) { is IntType -> Eq(it.ref, int(0)) @@ -139,7 +139,7 @@ fun XCFA.toMonolithicExpr(parseContext: ParseContext, initValues: Boolean = fals transExpr = And(transUnfold.exprs), propExpr = Neq(locVar.ref, int(locMap[proc.errorLoc.get()]!!)), transOffsetIndex = transUnfold.indexing, - vars = (StmtUtils.getVars(trans) + listOf(locVar)).toList(), + vars = StmtUtils.getVars(trans).filter { !it.equals(locVar) and !it.equals(edgeVar) }.toList() + edgeVar + locVar, valToState = { valToState(it) }, biValToAction = { val1, val2 -> valToAction(val1, val2) }, ctrlVars = listOf(locVar, edgeVar),