Commit d9062f39 authored by Christian Müller's avatar Christian Müller

add transition system parsing

parent 8e7f3d1f
package de.tum.niwo package de.tum.niwo
import scalax.collection.Graph import scalax.collection.Graph
import scalax.collection.GraphPredef._
import scalax.collection.GraphEdge._
import scalax.collection.edge.LDiEdge import scalax.collection.edge.LDiEdge
import scalax.collection.edge.Implicits._ import scalax.collection.edge.Implicits._
import blocks._ import blocks._
import de.tum.niwo.foltl.{FOLTL, Properties} import de.tum.niwo.foltl.Properties
import de.tum.niwo.foltl.FOLTL._ import de.tum.niwo.foltl.FOLTL._
import de.tum.niwo.foltl.FormulaFunctions._
import com.typesafe.scalalogging._ import com.typesafe.scalalogging._
import scalax.collection.edge.LBase.LEdgeImplicits
import scalax.collection.io.dot._ import scalax.collection.io.dot._
import implicits._ import implicits._
import Implicits._ import Implicits._
import de.tum.niwo.toz3.InvProperties import de.tum.niwo.toz3.InvProperties
import scalax.collection.GraphTraversal.{BreadthFirst, DepthFirst} import scalax.collection.GraphTraversal.BreadthFirst
object Encoding extends LazyLogging { object Encoding extends LazyLogging {
...@@ -26,19 +22,22 @@ object Encoding extends LazyLogging { ...@@ -26,19 +22,22 @@ object Encoding extends LazyLogging {
def nodeVar(n: Any) = Fun("n" + n, List()) def nodeVar(n: Any) = Fun("n" + n, List())
def choiceVar(n: Any) = "choice" + n def choiceVar(n: Any) = "choice" + n
def makeblock(b: WFBlock, n1: Int, n2: Int, makeNode: (() => Int), makeId: (() => WFBlock)): (List[LDiEdge[Int]]) = { def toBlock(e:WorkflowGraph#EdgeT):SimpleWFBlock[_] = e
def toNumber(n:WorkflowGraph#NodeT):Int = n.toOuter
def makeblock[BL <: Block](b: BL, n1: Int, n2: Int, makeNode: () => Int, makeId: () => BL): List[LDiEdge[Int]] = {
b match { b match {
// single edge // single edge
case b: SimpleWFBlock => { case b: SimpleBlock[_, _] => {
List((n1 ~+> n2)(b)) List((n1 ~+> n2)(b))
} }
case Loop(steps) => { case l:Loop[_, _] => {
// add empty statement if loop ends with loop // add empty statement if loop ends with loop
val adjsteps = steps.last match { val adjsteps = l.steps.last match {
case _: Loop => steps :+ makeId() case _: Loop[_, _] => l.steps :+ makeId()
case _: WFBlock => steps case _ => l.steps
} }
// looping with n-1 nodes around n1 // looping with n-1 nodes around n1
val newnodes = n1 +: (0 until adjsteps.size - 1).toList.map(_ => makeNode()) :+ n1 val newnodes = n1 +: (0 until adjsteps.size - 1).toList.map(_ => makeNode()) :+ n1
...@@ -51,7 +50,9 @@ object Encoding extends LazyLogging { ...@@ -51,7 +50,9 @@ object Encoding extends LazyLogging {
edges.flatten :+ (n1 ~+> n2)(makeId()) edges.flatten :+ (n1 ~+> n2)(makeId())
} }
case NondetChoice(l1, l2) => { case nd:NondetChoice[_, _] => {
val l1 = nd.left
val l2 = nd.right
// make sure that at least one of the two branches has one node, so they will never build 2 edges between the same node // make sure that at least one of the two branches has one node, so they will never build 2 edges between the same node
val newl1 = if (l1.length == l2.length && l1.length == 1) { val newl1 = if (l1.length == l2.length && l1.length == 1) {
l1 :+ makeId() l1 :+ makeId()
...@@ -72,6 +73,8 @@ object Encoding extends LazyLogging { ...@@ -72,6 +73,8 @@ object Encoding extends LazyLogging {
} }
} }
def toGraph(w: Workflow): WorkflowGraph = { def toGraph(w: Workflow): WorkflowGraph = {
var n1 = 0 var n1 = 0
...@@ -83,7 +86,7 @@ object Encoding extends LazyLogging { ...@@ -83,7 +86,7 @@ object Encoding extends LazyLogging {
def makeid() = ForallWFBlock(List(), List()) def makeid() = ForallWFBlock(List(), List())
val edges = (for ((step, i) <- w.steps.zipWithIndex) yield { val edges = (for ((step, i) <- w.steps.zipWithIndex) yield {
if (i == 0 && step.isInstanceOf[Loop]) { if (i == 0 && step.isInstanceOf[Loop[_, _]]) {
logger.info("Found loop in the initial step") logger.info("Found loop in the initial step")
val n = n1 val n = n1
val n2 = newnode() val n2 = newnode()
...@@ -109,114 +112,17 @@ object Encoding extends LazyLogging { ...@@ -109,114 +112,17 @@ object Encoding extends LazyLogging {
Graph.from(nodes, edges) Graph.from(nodes, edges)
} }
def encodeGraph(g: WorkflowGraph) = {
val allnodes = for (n <- g.nodes.toList) yield {
val list = n.outgoing.toList.map(e => nodeVar(e.to))
Implies(nodeVar(n), Next(Or.make(list: _*)))
}
Globally(And.make(allnodes))
}
def encodeSanity(g: WorkflowGraph) = {
val negs = for (n <- g.nodes.toList; n2 <- g.nodes.toList if n < n2) yield {
Neg(And(nodeVar(n), nodeVar(n2)))
}
val nodes = for (n <- g.nodes.toList if !(n == 0)) yield {
Neg(nodeVar(n))
}
And.make(nodeVar(0), And.make(nodes), Globally(And.make(negs)))
}
def encodeStmt(s: Statement, pred: Option[Formula], bind: List[Var]): (Formula, String) = {
// var guard = s.guard
// for (p <- pred) { // if pred defined
// guard = And(guard, p)
// }
val list = List(s.guard) ++ pred.toList
val guard = And.make(list)
// omitted variables
val omitted = (bind toSet) -- (s.tuple toSet)
val t = s match {
case Add(_, f, tup) if omitted.isEmpty => Or(Fun(f, tup), guard)
case Add(_, f, tup) => Or(Fun(f, tup), Exists(omitted toList, guard))
case Remove(_, f, tup) if omitted.isEmpty => And(Fun(f, tup), Neg(guard))
case Remove(_, f, tup) => And(Fun(f, tup), Exists(omitted toList, Neg(guard)))
}
(Forall(s.tuple, Equiv(Next(Fun(s.fun, s.tuple)), t)), s.fun)
}
def encodeStaying(target: Fun) = {
Forall(target.params, Equiv(Next(target), target))
}
def encodeSem(sig: Signature, g: Graph[Int, LDiEdge]) = {
val impls = for (e <- g.edges.toList) yield {
val choice = e.pred.map(n => Fun(n, e.agents))
val bound = e.agents
val res = for (s <- e.steps) yield {
encodeStmt(s, choice, e.agents)
}
val updates = res.map(_._2)
val staying = for (f <- sig.preds if !updates.contains(f.name)) yield {
encodeStaying(f)
}
val terms = res.map(_._1) ++ staying
Implies(And(nodeVar(e.from), Next(nodeVar(e.to))), And.make(terms))
}
Globally(And.make(impls))
}
def encodeInitial(sig: Signature, g: Graph[Int, LDiEdge]) = {
val empties = for (f <- sig.preds toList) yield {
Forall(f.params, Neg(f))
}
And.make(empties)
}
def sanecfg(g: Graph[Int, LDiEdge]) = {
And(encodeGraph(g), encodeSanity(g))
}
def exec(sig: Signature, g: Graph[Int, LDiEdge]) = {
And(encodeInitial(sig, g), encodeSem(sig, g))
}
def nodepredicates(g: Graph[Int, LDiEdge]) = {
// toSet because the initial set is mutable
g.nodes map nodeVar toSet
}
// def toFOLTL(w: Workflow) = {
// val g = toGraph(w)
// logger.info("Graph of w:\n" + g)
//
// val cfg = encodeGraph(g)
// logger.info(s"cfg(w): $cfg")
// val sanity = encodeSanity(g)
// logger.info(s"sanity(w): $sanity")
// val sem = encodeSem(w.sig, g)
// logger.info(s"sem(w): $sem")
// val init = encodeInitial(w.sig, g)
// logger.info(s"init(w): $init")
//
// And.make(List(cfg, sanity, sem, init))
// }
val MAXINVLENGTH = 800 val MAXINVLENGTH = 800
def toDot(g: WorkflowGraph, elaboration:Option[(InvProperties, NISpec)] = None)(labels:Map[Int, String], edges:Set[g.EdgeT]) = { def toDot(g: WorkflowGraph, elaboration:Option[(InvProperties, NISpec)] = None)(labels:Map[Int, String], edges:Set[g.EdgeT]) = {
val root = DotRootGraph( val root = DotRootGraph(
directed = true, directed = true,
id = Some("Invariant Labelling")) id = Some("Invariant Labelling")
)
def edgeTransformer(innerEdge: WorkflowGraph#EdgeT): Option[(DotGraph, DotEdgeStmt)] = innerEdge.edge match { def edgeTransformer(innerEdge: WorkflowGraph#EdgeT): Option[(DotGraph, DotEdgeStmt)] = innerEdge.edge match {
case LDiEdge(source, target, label) => label match { case LDiEdge(source, target, label) => label match {
case label: SimpleWFBlock => { case label: SimpleWFBlock[_] => {
val green = edges.exists(_ == innerEdge) val green = edges.exists(_ == innerEdge)
val color = List(DotAttr("color", if (green) "green" else "red")) val color = List(DotAttr("color", if (green) "green" else "red"))
......
package de.tum.niwo package de.tum.niwo
import foltl.FOLTL._
import blocks._ import blocks._
import Implicits._
import java.io.File import java.io.File
import java.io.FilenameFilter
import scala.io.Source import scala.io.Source
import com.typesafe.scalalogging.LazyLogging import com.typesafe.scalalogging.LazyLogging
import de.tum.niwo.parser.WorkflowParser import de.tum.niwo.parser.{TransitionSystemParser, WorkflowParser}
object ExampleWorkflows extends LazyLogging {
object Examples extends LazyLogging {
val FOLDER = new File("examples")
val ENDING = ".spec" private val BASE = new File("examples/").toPath
private val WFFOLDERS = List("tests/", "omitting/", "nonomitting/")
private val TSFOLDERS = List("tstests/")
private val ENDING = ".spec"
def listExamples(prefix:String, folder:File):Map[String,File] = { def listExamples(folder:File):Map[String,File] = {
val sublists = (for (f <- folder.listFiles if f.isDirectory()) yield {
listExamples(s"$prefix${f.getName}/", f) val sublists = (for (f <- folder.listFiles if f.isDirectory) yield {
}) flatten listExamples(f)
}).flatten
val here = (for (f <- folder.listFiles() if f.isFile() && f.getName.endsWith(ENDING)) yield { val here = (for (f <- folder.listFiles() if f.isFile && f.getName.endsWith(ENDING)) yield {
prefix + f.getName.replace(ENDING, "") -> f val name = BASE.relativize(f.toPath).toString.stripSuffix(ENDING)
}) toList name -> f
}).toList
(sublists toMap) ++ here sublists.toMap ++ here
} }
def parseExample(s:String):Option[NISpec] = { def parseExampleWF(s:String):Option[NISpec] = {
if (!examples.contains(s)) { if (!wfexamples.contains(s)) {
logger.error(s"$s not contained in list of examples") logger.error(s"$s not contained in list of examples")
None None
} else { } else {
val f = examples(s) val f = wfexamples(s)
val source = Source.fromFile(f).mkString val source = Source.fromFile(f).mkString
val spec = WorkflowParser.parseSpec(source) val spec = WorkflowParser.parseSpec(source)
if (!spec.successful) { if (!spec.successful) {
...@@ -49,8 +51,8 @@ object ExampleWorkflows extends LazyLogging { ...@@ -49,8 +51,8 @@ object ExampleWorkflows extends LazyLogging {
} }
} }
def parsedExamples(prefix:String, folder:File):Map[String, NISpec] = { def parsedWFExamples():Map[String, NISpec] = {
val map = for ((name, f) <- examples) yield { val map = for ((name, f) <- wfexamples) yield {
val s = Source.fromFile(f).mkString val s = Source.fromFile(f).mkString
val spec = WorkflowParser.parseSpec(s) val spec = WorkflowParser.parseSpec(s)
...@@ -70,10 +72,59 @@ object ExampleWorkflows extends LazyLogging { ...@@ -70,10 +72,59 @@ object ExampleWorkflows extends LazyLogging {
} }
// filter out all empty specs and those that are not sane // filter out all empty specs and those that are not sane
for ((k, v) <- map if (v.isDefined)) yield { for ((k, v) <- map if v.isDefined) yield {
(k, v.get)
}
}
def parseExampleTS(s:String):Option[InvariantSpec] = {
if (!tsexamples.contains(s)) {
logger.error(s"$s not contained in list of examples")
None
} else {
val f = tsexamples(s)
val source = Source.fromFile(f).mkString
val spec = TransitionSystemParser.parseSpec(source)
if (!spec.successful) {
logger.error(s"Parsing of $f unsuccessful: $spec")
None
} else {
if (!spec.get.isSane) {
logger.error(s"Sanity check of $f failed. Skipping file.")
None
} else {
Some(spec.get)
}
}
}
}
def parsedTSExamples():Map[String, InvariantSpec] = {
val map = for ((name, f) <- tsexamples) yield {
val s = Source.fromFile(f).mkString
logger.info(s"Parsing file $f")
val spec = TransitionSystemParser.parseSpec(s)
if (!spec.successful) {
logger.error(s"Parsing of $f unsuccessful: $spec")
name -> None
} else {
if (!spec.get.isSane) {
logger.error(s"Sanity check of $f failed. Skipping file.")
name -> None
} else {
name -> Some(spec.get)
}
}
}
// filter out all empty specs and those that are not sane
for ((k, v) <- map if v.isDefined) yield {
(k, v.get) (k, v.get)
} }
} }
val examples = listExamples("", FOLDER) val wfexamples: Map[String, File] = WFFOLDERS.flatMap(wffolder => listExamples(new File(BASE.toFile, wffolder))).toMap
val tsexamples: Map[String, File] = TSFOLDERS.flatMap(tsfolder => listExamples(new File(BASE.toFile, tsfolder))).toMap
} }
...@@ -4,7 +4,7 @@ import de.tum.niwo.foltl.FOLTL._ ...@@ -4,7 +4,7 @@ import de.tum.niwo.foltl.FOLTL._
import scalax.collection.edge.LBase.LEdgeImplicits import scalax.collection.edge.LBase.LEdgeImplicits
import de.tum.niwo.blocks.SimpleWFBlock import de.tum.niwo.blocks.SimpleWFBlock
object Implicits extends LEdgeImplicits[SimpleWFBlock] { object Implicits extends LEdgeImplicits[SimpleWFBlock[_ <: SimpleWFBlock[_]]] {
implicit def toList[A](v: A): List[A] = List(v) implicit def toList[A](v: A): List[A] = List(v)
// Logic // Logic
......
...@@ -22,7 +22,7 @@ object InvariantInspector extends App with LazyLogging { ...@@ -22,7 +22,7 @@ object InvariantInspector extends App with LazyLogging {
def inspect(name: String) { def inspect(name: String) {
logger.info(s"Generating $name") logger.info(s"Generating $name")
val optspec = ExampleWorkflows.parseExample(name) val optspec = Examples.parseExampleWF(name)
if (!optspec.isDefined) { if (!optspec.isDefined) {
logger.error(s"Not a valid spec: $name") logger.error(s"Not a valid spec: $name")
......
...@@ -35,7 +35,7 @@ object MainInvariants extends App with LazyLogging { ...@@ -35,7 +35,7 @@ object MainInvariants extends App with LazyLogging {
def generateExample(name: String) { def generateExample(name: String) {
logger.info(s"Generating $name") logger.info(s"Generating $name")
val spec = ExampleWorkflows.parseExample(name) val spec = Examples.parseExampleWF(name)
if (spec.isEmpty) { if (spec.isEmpty) {
logger.error(s"Not a valid spec: $name") logger.error(s"Not a valid spec: $name")
...@@ -47,7 +47,7 @@ object MainInvariants extends App with LazyLogging { ...@@ -47,7 +47,7 @@ object MainInvariants extends App with LazyLogging {
def generateAllExamples() { def generateAllExamples() {
clear() clear()
// Fill results alphabetically // Fill results alphabetically
for (k <- ExampleWorkflows.examples.keys.toList.sorted) { for (k <- Examples.wfexamples.keys.toList.sorted) {
generateExample(k) generateExample(k)
} }
} }
......
...@@ -43,7 +43,7 @@ object MainInvariantsInference extends App with LazyLogging { ...@@ -43,7 +43,7 @@ object MainInvariantsInference extends App with LazyLogging {
def generateExample(name: String, target: Int) { def generateExample(name: String, target: Int) {
logger.info(s"Generating $name") logger.info(s"Generating $name")
val spec = ExampleWorkflows.parseExample(name) val spec = Examples.parseExampleWF(name)
if (spec.isEmpty) { if (spec.isEmpty) {
logger.error(s"Not a valid spec: $name") logger.error(s"Not a valid spec: $name")
......
...@@ -139,7 +139,7 @@ object MainInvariantsInterpolation extends App with LazyLogging { ...@@ -139,7 +139,7 @@ object MainInvariantsInterpolation extends App with LazyLogging {
def generateExample(name: String, target: Int) { def generateExample(name: String, target: Int) {
logger.info(s"Generating $name") logger.info(s"Generating $name")
val spec = ExampleWorkflows.parseExample(name) val spec = Examples.parseExampleWF(name)
if (spec.isEmpty) { if (spec.isEmpty) {
logger.error(s"Not a valid spec: $name") logger.error(s"Not a valid spec: $name")
......
...@@ -91,7 +91,7 @@ object MainLTL extends App with LazyLogging { ...@@ -91,7 +91,7 @@ object MainLTL extends App with LazyLogging {
def generateExample(name: String) { def generateExample(name: String) {
logger.info(s"Generating $name") logger.info(s"Generating $name")
val spec = ExampleWorkflows.parseExample(name) val spec = Examples.parseExampleWF(name)
if (spec.isEmpty) { if (spec.isEmpty) {
logger.error(s"Not a valid spec: $name") logger.error(s"Not a valid spec: $name")
...@@ -103,7 +103,7 @@ object MainLTL extends App with LazyLogging { ...@@ -103,7 +103,7 @@ object MainLTL extends App with LazyLogging {
def generateAllExamples() { def generateAllExamples() {
clear() clear()
// Fill results alphabetically // Fill results alphabetically
for (k <- ExampleWorkflows.examples.keys.toList.sorted) { for (k <- Examples.wfexamples.keys.toList.sorted) {
generateExample(k) generateExample(k)
} }
} }
......
...@@ -9,13 +9,13 @@ import de.tum.niwo.toz3.{InvProperties, Z3BSFO} ...@@ -9,13 +9,13 @@ import de.tum.niwo.toz3.{InvProperties, Z3BSFO}
object Preconditions extends LazyLogging { object Preconditions extends LazyLogging {
private def elaborateSteps(b: SimpleWFBlock, spec: NISpec, properties: InvProperties): List[SimpleWFBlock] = { private def elaborateSteps(b: SimpleWFBlock[_], spec: NISpec, properties: InvProperties):List[SimpleWFBlock[_]] = {
val guardfix = if (!b.isoracly && b.pred.isDefined) { val guardfix = if (!b.isoracly && b.pred.isDefined) {
// is "normal" may block // is "normal" may block
val choice = Fun(b.pred.get, b.agents) val choice = Fun(b.pred.get, b.agents)
for (s <- b.steps) yield { val fixed = for (s <- b.steps) yield {
val first = s.tuple.head val first = s.tuple.head
val inner = if (first.typ == spec.target.params.head.typ) { val inner = if (first.typ == spec.target.params.head.typ) {
if (properties.stubborn) { if (properties.stubborn) {
...@@ -28,16 +28,18 @@ object Preconditions extends LazyLogging { ...@@ -28,16 +28,18 @@ object Preconditions extends LazyLogging {
choice choice
} }
val newguard = And(s.guard, inner) val newguard = And(s.guard, inner)
s.updateGuard(newguard) s.update(guard = newguard)
} }
fixed
} else { } else {
b.steps b.steps
} }
val newb = b.update(guardfix) // FIXME: wät? why do I have to cast this? this should be an inference error
val newb:Any = b.update(guardfix)
// for causality, add informedness updates // for causality, add informedness updates
if (properties.stubborn) { val list = if (properties.stubborn) {
List(newb) List(newb)
} else { } else {
val newsteps = for ( val newsteps = for (
...@@ -51,10 +53,11 @@ object Preconditions extends LazyLogging { ...@@ -51,10 +53,11 @@ object Preconditions extends LazyLogging {
} }
newb :: newsteps newb :: newsteps
} }
list.asInstanceOf[List[SimpleWFBlock[_]]]
} }
// For oracly blocks, remove O from guard and add to ForallMay choice predicate // For oracly blocks, remove O from guard and add to ForallMay choice predicate
private def elaborateOraclyBlock(b: SimpleWFBlock, spec: NISpec) = { private def elaborateOraclyBlock(b: SimpleWFBlock[_], spec: NISpec) = {
if (b.isoracly) { if (b.isoracly) {
val stmt = b.steps.head // can only be one val stmt = b.steps.head // can only be one
...@@ -93,7 +96,7 @@ object Preconditions extends LazyLogging { ...@@ -93,7 +96,7 @@ object Preconditions extends LazyLogging {
} else b } else b
} }
def subst(f: Formula, updates: List[(String, (List[FOLTL.Var], FOLTL.Formula))], b: SimpleWFBlock): Formula = { def subst(f: Formula, updates: List[(String, (List[FOLTL.Var], FOLTL.Formula))], b: SimpleWFBlock[_]): Formula = {
// TODO: should this contain f.freeVars? // TODO: should this contain f.freeVars?
val boundvars = f.boundVars val boundvars = f.boundVars
updates.foldRight(f)((update, f) => { updates.foldRight(f)((update, f) => {
...@@ -116,7 +119,7 @@ object Preconditions extends LazyLogging { ...@@ -116,7 +119,7 @@ object Preconditions extends LazyLogging {
}) })
} }
def getUpdate(s:Statement, spec:NISpec, properties:InvProperties): Formula = { def getUpdate(s:Statement[_], spec:NISpec, properties:InvProperties): Formula = {
val frees = s.guard.freeVars -- s.tuple.toSet -- spec.constants val frees = s.guard.freeVars -- s.tuple.toSet -- spec.constants
...@@ -131,12 +134,12 @@ object Preconditions extends LazyLogging { ...@@ -131,12 +134,12 @@ object Preconditions extends LazyLogging {
form form
} }
def elaborate(block: SimpleWFBlock, spec:NISpec, properties:InvProperties): List[SimpleWFBlock] = { def elaborate(block: SimpleWFBlock[_], spec:NISpec, properties:InvProperties): List[SimpleWFBlock[_]] = {
val stepOne = elaborateSteps(block, spec, properties) val stepOne = elaborateSteps(block, spec, properties)
stepOne map { b => elaborateOraclyBlock(b, spec) } stepOne map { b => elaborateOraclyBlock(b, spec) }
} }
def weakestPrecondition(post: Formula, outerb: SimpleWFBlock, spec: NISpec, properties: InvProperties): Formula = { def weakestPrecondition(post: Formula, outerb: SimpleWFBlock[_], spec: NISpec, properties: InvProperties): Formula = {
// TODO: Make 2-trace elaboration optional // TODO: Make 2-trace elaboration optional
...@@ -149,7 +152,7 @@ object Preconditions extends LazyLogging { ...@@ -149,7 +152,7 @@ object Preconditions extends LazyLogging {
precond precond
} }
private def weakestPreconditionSingle(f: Formula, b:SimpleWFBlock, spec: NISpec, properties: InvProperties) = { private def weakestPreconditionSingle(f: Formula, b:SimpleWFBlock[_], spec: NISpec, properties: InvProperties) = {
val updates = for (s <- b.steps) yield { val updates = for (s <- b.steps) yield {
s.fun -> (s.tuple, { s.fun -> (s.tuple, {
...@@ -174,7 +177,7 @@ object Preconditions extends LazyLogging { ...@@ -174,7 +177,7 @@ object Preconditions extends LazyLogging {
removed removed
} }
def abstractedPrecondition(f: Formula, b: SimpleWFBlock, spec: NISpec, properties: InvProperties, untouched: Set[String]): Formula = { def abstractedPrecondition(f: Formula, b: SimpleWFBlock[_], spec: NISpec, properties: InvProperties, untouched: Set[String]): Formula = {
val precond = weakestPrecondition(f, b, spec, properties) val precond = weakestPrecondition(f, b, spec, properties)
// Assume untouched predicates empty // Assume untouched predicates empty
......
...@@ -7,7 +7,6 @@ import java.io.PrintWriter ...@@ -7,7 +7,6 @@ import java.io.PrintWriter
import de.tum.niwo.toz3.{InvProperties, InvariantChecker, Z3BSFO} import de.tum.niwo.toz3.{InvProperties, InvariantChecker, Z3BSFO}
import com.typesafe.scalalogging.LazyLogging import com.typesafe.scalalogging.LazyLogging
import de.tum.niwo.MainInvariantsInference.logger
object Utils extends LazyLogging { object Utils extends LazyLogging {
...@@ -20,15 +19,15 @@ object Utils extends LazyLogging { ...@@ -20,15 +19,15 @@ object Utils extends LazyLogging {
def collectChoices(w: WFBlock): List[Fun] = { def collectChoices(w: WFBlock): List[Fun] = {