Skip to content

Commit

Permalink
xcfa refactor merge
Browse files Browse the repository at this point in the history
  • Loading branch information
csanadtelbisz committed Oct 21, 2023
1 parent 6f34fe0 commit 6d33a5a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ class XcfaAasporCoiLts(
simpleXcfaLts = coiLTS
}

override fun getTransitionOf(action: XcfaAction): XcfaEdge =
super.getTransitionOf(action.transFuncVersion ?: action)
override fun getEdgeOf(action: XcfaAction): XcfaEdge =
super.getEdgeOf(action.transFuncVersion ?: action)

override fun isBackwardAction(action: XcfaAction): Boolean =
backwardTransitions.any { it.source == action.edge.source && it.target == action.edge.target }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ open class XcfaSporLts(protected val xcfa: XCFA) : LTS<XcfaState<*>, XcfaAction>
/**
* Backward transitions in the transition system (a transition of a loop).
*/
private val backwardTransitions: MutableSet<XcfaEdge> = mutableSetOf()
protected val backwardTransitions: MutableSet<XcfaEdge> = mutableSetOf()

init {
collectBackwardTransitions()
Expand Down Expand Up @@ -312,7 +312,7 @@ open class XcfaSporLts(protected val xcfa: XCFA) : LTS<XcfaState<*>, XcfaAction>
* @param action the action whose edge is to be returned
* @return the edge of the action
*/
protected fun getEdgeOf(action: XcfaAction) = action.edge
protected open fun getEdgeOf(action: XcfaAction) = action.edge

/**
* Returns the outgoing edges of the target of the given edge.
Expand All @@ -338,7 +338,7 @@ open class XcfaSporLts(protected val xcfa: XCFA) : LTS<XcfaState<*>, XcfaAction>
* @param action the action to be classified as backward action or non-backward action
* @return true, if the action is a backward action
*/
protected fun isBackwardAction(action: XcfaAction): Boolean = backwardTransitions.contains(getEdgeOf(action))
protected open fun isBackwardAction(action: XcfaAction): Boolean = backwardTransitions.contains(getEdgeOf(action))

/**
* Collects backward edges of the given XCFA.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ class XcfaCli(private val args: Array<String>) {
val gsonForOutput = getGson()
val logger = ConsoleLogger(logLevel)
val explicitProperty: ErrorDetection = getExplicitProperty()
registerAllSolverManagers(solverHome, logger)

// propagating input variables
LbePass.level = lbeLevel
Expand Down Expand Up @@ -207,6 +206,7 @@ class XcfaCli(private val args: Array<String>) {
// verification
stopwatch.reset().start()
logger.write(Logger.Level.INFO, "Starting verification of ${xcfa.name} using $backend")
registerAllSolverManagers(solverHome, logger)
val config = parseConfigFromCli()
if (strategy != Strategy.PORTFOLIO && printConfigFile != null) {
printConfigFile!!.writeText(gsonForOutput.toJson(config))
Expand Down

0 comments on commit 6d33a5a

Please sign in to comment.