Skip to content

Commit

Permalink
Added better logging of subproperty
Browse files Browse the repository at this point in the history
  • Loading branch information
leventeBajczi committed Nov 13, 2024
1 parent 02fb1b9 commit b7946ff
Showing 1 changed file with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ import hu.bme.mit.theta.analysis.utils.TraceVisualizer
import hu.bme.mit.theta.c2xcfa.CMetaData
import hu.bme.mit.theta.cat.dsl.CatDslManager
import hu.bme.mit.theta.common.logging.Logger
import hu.bme.mit.theta.common.logging.Logger.Level.INFO
import hu.bme.mit.theta.common.logging.Logger.Level.RESULT
import hu.bme.mit.theta.common.logging.Logger.Level.*
import hu.bme.mit.theta.common.visualization.Graph
import hu.bme.mit.theta.common.visualization.writer.GraphvizWriter
import hu.bme.mit.theta.common.visualization.writer.WebDebuggerLogger
Expand Down Expand Up @@ -268,7 +267,17 @@ private fun backend(
?.locs
?.firstOrNull()
?.name
println(namedState)
val subproperty =
when (namedState) {
"__THETA_bad_free" -> "valid-free"
"__THETA_bad_deref" -> "valid-deref"
"__THETA_lost" -> "valid-memtrack"
else ->
throw RuntimeException(
"Something went wrong; could not determine subproperty! Named location: $namedState"
)
}
logger.write(MAINSTEP, "(Subproperty %s)\n", subproperty)
result
}

Expand Down

0 comments on commit b7946ff

Please sign in to comment.