diff --git a/src/main/scala/Main.scala b/src/main/scala/Main.scala index 3fb3f0139..b67087406 100644 --- a/src/main/scala/Main.scala +++ b/src/main/scala/Main.scala @@ -34,6 +34,10 @@ object Main { interpret: Flag, @arg(name = "dump-il", doc = "Dump the Intermediate Language to text.") dumpIL: Option[String], + @arg(name = "main-procedure-name", short = 'm', doc = "Name of the main procedure to begin analysis at.") + mainProcedureName: String = "main", + @arg(name = "procedure-call-depth", doc = "Cull procedures beyond this call depth from the main function (defaults to Int.MaxValue)") + procedureDepth: Int = Int.MaxValue, @arg(name = "help", short = 'h', doc = "Show this help message.") help: Flag, @arg(name = "analysis-results", doc = "Log analysis results in files at specified path.") @@ -63,7 +67,7 @@ object Main { } val q = BASILConfig( - loading = ILLoadingConfig(conf.adtFileName, conf.relfFileName, conf.specFileName, conf.dumpIL), + loading = ILLoadingConfig(conf.adtFileName, conf.relfFileName, conf.specFileName, conf.dumpIL, conf.mainProcedureName, conf.procedureDepth), runInterpret = conf.interpret.value, staticAnalysis = if conf.analyse.value then Some(StaticAnalysisConfig(conf.dumpIL, conf.analysisResults, conf.analysisResultsDot)) else None, boogieTranslation = BoogieGeneratorConfig(if conf.lambdaStores.value then BoogieMemoryAccessMode.LambdaStoreSelect else BoogieMemoryAccessMode.SuccessiveStoreSelect), diff --git a/src/main/scala/boogie/BExpr.scala b/src/main/scala/boogie/BExpr.scala index 2c5dd37b7..d9ff756b5 100644 --- a/src/main/scala/boogie/BExpr.scala +++ b/src/main/scala/boogie/BExpr.scala @@ -1,6 +1,9 @@ package boogie -import ir._ -import specification._ +import ir.* +import specification.* +import collection.mutable + +import java.io.Writer trait BExpr { def getType: BType @@ -15,6 +18,7 @@ trait BExpr { def resolveSpecL: BExpr = this def resolveInsideOld: BExpr = this def loads: Set[BExpr] = Set() + def serialiseBoogie(w: Writer): Unit = w.append(toString) } trait BLiteral extends BExpr {} @@ -59,11 +63,18 @@ case class BVExtract(end: Int, start: Int, body: BExpr) extends BExpr { override def resolveInsideOld: BVExtract = copy(body = body.resolveInsideOld) override def removeOld: BVExtract = copy(body = body.removeOld) override def loads: Set[BExpr] = body.loads + + override def serialiseBoogie(w: Writer): Unit = { + body.serialiseBoogie(w) + w.append(s"[$end:$start]") + } + } case class BVRepeat(repeats: Int, body: BExpr) extends BExpr { override def getType: BitVecBType = BitVecBType(bodySize * repeats) + private def bodySize: Int = body.getType match { case bv: BitVecBType => bv.size case _ => throw new Exception("type mismatch, non bv expression: " + body + " in body of extract: " + this) @@ -72,6 +83,13 @@ case class BVRepeat(repeats: Int, body: BExpr) extends BExpr { override def toString: String = s"$fnName($body)" + override def serialiseBoogie(w: Writer): Unit = { + w.append(fnName) + w.append("(") + body.serialiseBoogie(w) + w.append(")") + } + override def functionOps: Set[FunctionOp] = { val thisFn = BVFunctionOp(fnName, s"repeat $repeats", List(BParam(BitVecBType(bodySize))), BParam(getType)) body.functionOps + thisFn @@ -100,6 +118,13 @@ case class BVZeroExtend(extension: Int, body: BExpr) extends BExpr { override def toString: String = s"$fnName($body)" + override def serialiseBoogie(w: Writer): Unit = { + w.append(fnName) + w.append("(") + body.serialiseBoogie(w) + w.append(")") + } + override def functionOps: Set[FunctionOp] = { val thisFn = BVFunctionOp(fnName, s"zero_extend $extension", List(BParam(BitVecBType(bodySize))), BParam(getType)) body.functionOps + thisFn @@ -128,6 +153,14 @@ case class BVSignExtend(extension: Int, body: BExpr) extends BExpr { override def toString: String = s"$fnName($body)" + override def serialiseBoogie(w: Writer): Unit = { + w.append(fnName) + w.append("(") + body.serialiseBoogie(w) + w.append(")") + } + + override def functionOps: Set[FunctionOp] = { val thisFn = BVFunctionOp(fnName, s"sign_extend $extension", List(BParam(BitVecBType(bodySize))), BParam(getType)) body.functionOps + thisFn @@ -297,6 +330,32 @@ case class BinaryBExpr(op: BinOp, arg1: BExpr, arg2: BExpr) extends BExpr { case _ => throw new Exception("type mismatch") } + override def serialiseBoogie(w: Writer): Unit = { + val traversalQueue = mutable.Stack[BExpr | BinOp | String]() + traversalQueue.append(this) + + while (traversalQueue.nonEmpty) { + val next = traversalQueue.pop() + + def infix(b: BinaryBExpr): Unit = traversalQueue.pushAll(Seq("(", b.arg1, s" ${b.op} ", b.arg2, ")").reverse) + def prefix(b: BinaryBExpr): Unit = traversalQueue.pushAll(Seq(s"bv${b.op}${b.inSize}(", b.arg1, ",", b.arg2, ")").reverse) + + next match + case b: BinaryBExpr => + b.op match { + case bOp: BoolBinOp => infix(b) + case bOp: BVBinOp => bOp match { + case BVEQ | BVNEQ | BVCONCAT => infix(b) + case _ => prefix(b) + } + case bOp: IntBinOp => infix(b) + } + case b: BExpr => b.serialiseBoogie(w) + case b: BinOp => w.append(b.toString) + case s: String => w.append(s) + } + } + override def toString: String = op match { case bOp: BoolBinOp => s"($arg1 $bOp $arg2)" case bOp: BVBinOp => @@ -309,6 +368,8 @@ case class BinaryBExpr(op: BinOp, arg1: BExpr, arg2: BExpr) extends BExpr { case bOp: IntBinOp => s"($arg1 $bOp $arg2)" } + + override def functionOps: Set[FunctionOp] = { val thisFn = op match { case b: BVBinOp => diff --git a/src/main/scala/boogie/BProgram.scala b/src/main/scala/boogie/BProgram.scala index bac192237..7eae0b359 100644 --- a/src/main/scala/boogie/BProgram.scala +++ b/src/main/scala/boogie/BProgram.scala @@ -1,12 +1,27 @@ package boogie +import java.io.{StringWriter, Writer} case class BProgram(declarations: List[BDeclaration]) { - override def toString: String = declarations.flatMap(x => x.toBoogie).mkString("\n") + override def toString: String = declarations.flatMap(x => x.toBoogie).mkString(System.lineSeparator()) + + def writeToString(w: Writer): Unit = { + declarations.foreach(x => { + x.writeToString(w) + }) + } } trait BDeclaration extends HasAttributes { override def attributes: List[BAttribute] = List() def toBoogie: List[String] = List(toString) + + final def writeToString(w: Writer): Unit = { + for (elem <- toBoogie) { + w.append(elem) + w.append(System.lineSeparator()) + } + } + } case class BProcedure( @@ -27,12 +42,12 @@ case class BProcedure( override def compare(that: BProcedure): Int = name.compare(that.name) override def toBoogie: List[String] = { val header = s"procedure $attrString$name(${in.map(_.withType).mkString(", ")})" + val implHeader = s"implementation $attrString$name(${in.map(_.withType).mkString(", ")})" val returns = if (out.nonEmpty) { s" returns (${out.map(_.withType).mkString(", ")})" } else { "" } - val semicolon = if body.nonEmpty then "" else ";" val modifiesStr = if (modifies.nonEmpty) { List(s" modifies ${modifies.toSeq.sorted.mkString(", ")};") } else { @@ -49,9 +64,17 @@ case class BProcedure( } else { List() } - List( - header + returns + semicolon - ) ++ modifiesStr ++ requiresStrs ++ freeRequiresStrs ++ ensuresStrs ++ freeEnsuresStrs ++ bodyStr ++ List("") + + val procDecl = s"$header$returns;" + val procList = List(procDecl) ++ modifiesStr ++ requiresStrs ++ freeRequiresStrs ++ ensuresStrs ++ freeEnsuresStrs + val implDecl = s"$implHeader$returns" + val implList = if (body.nonEmpty) { + List("", implDecl) ++ bodyStr + } else { + List() + } + + procList ++ implList ++ List("") } override def toString: String = toBoogie.mkString("\n") def functionOps: Set[FunctionOp] = @@ -72,12 +95,21 @@ case class BFunction(name: String, in: List[BVar], out: BVar, body: Option[BExpr with Ordered[BFunction] { override def compare(that: BFunction): Int = name.compare(that.name) override def toBoogie: List[String] = { + val s = new StringWriter() + val inString = in.map(_.withType).mkString(", ") val declString = s"function $attrString$name($inString) returns (${out.withType})" - body match { - case Some(b) => List(declString + " {", " " + b.toString, "}", "") - case None => List(declString + ";") + s.append(declString) + + val decl = body match { + case Some(b) => + s.append(" {" + System.lineSeparator() + " ") + b.serialiseBoogie(s) + s.append(System.lineSeparator()) + s.append("}" + System.lineSeparator()) + case None => s.append(";") } + List(s.toString) } override def toString: String = toBoogie.mkString("\n") def functionOps: Set[FunctionOp] = body match { diff --git a/src/main/scala/ir/Expr.scala b/src/main/scala/ir/Expr.scala index 304db4a16..c90dacd64 100644 --- a/src/main/scala/ir/Expr.scala +++ b/src/main/scala/ir/Expr.scala @@ -146,6 +146,7 @@ sealed trait IntUnOp(op: String) extends UnOp { case object IntNEG extends IntUnOp("-") + sealed trait BVUnOp(op: String) extends UnOp { override def toString: String = op } diff --git a/src/main/scala/ir/IRType.scala b/src/main/scala/ir/IRType.scala index f72a3bf5a..2818cdd47 100644 --- a/src/main/scala/ir/IRType.scala +++ b/src/main/scala/ir/IRType.scala @@ -22,3 +22,12 @@ case class BitVecType(size: Int) extends IRType("bv" + size) { case class MapType(param: IRType, result: IRType) extends IRType(s"[$param]$result") { override def toBoogie: BType = MapBType(param.toBoogie, result.toBoogie) } + +def coerceToBool(e: Expr): Expr = { + e.getType match { + case BitVecType(s) => BinaryExpr(BVNEQ, e, BitVecLiteral(0, s)) + case IntType => BinaryExpr(IntNEQ, e, IntLiteral(0)) + case BoolType => e + case MapType(_, _) => ??? + } +} diff --git a/src/main/scala/ir/Interpreter.scala b/src/main/scala/ir/Interpreter.scala index bf8464821..a4cf495f7 100644 --- a/src/main/scala/ir/Interpreter.scala +++ b/src/main/scala/ir/Interpreter.scala @@ -170,7 +170,7 @@ class Interpreter() { case BoolNOT => if evalBool(un.arg, env) == TrueLiteral then FalseLiteral else TrueLiteral case _ => ??? } - + case _ => ??? } } diff --git a/src/main/scala/ir/Program.scala b/src/main/scala/ir/Program.scala index 8b4796615..8cec400c4 100644 --- a/src/main/scala/ir/Program.scala +++ b/src/main/scala/ir/Program.scala @@ -8,25 +8,39 @@ import analysis.BitVectorEval class Program(var procedures: ArrayBuffer[Procedure], var mainProcedure: Procedure, var initialMemory: ArrayBuffer[MemorySection], var readOnlyMemory: ArrayBuffer[MemorySection]) { // This shouldn't be run before indirect calls are resolved - def stripUnreachableFunctions(): Unit = { - val functionToChildren = procedures.map(f => f.name -> f.calls.map(_.name)).toMap - var next = mainProcedure.name - var reachableNames: Set[String] = Set(next) - var toVisit: List[String] = List() + + def stripUnreachableFunctions(depth: Int = Int.MaxValue): Unit = { + val procedureCalleeNames = procedures.map(f => f.name -> f.calls.map(_.name)).toMap + + var toVisit: mutable.LinkedHashSet[(Int, String)] = mutable.LinkedHashSet((0, mainProcedure.name)) var reachableFound = true - while (reachableFound) { - val children = functionToChildren(next) -- reachableNames -- toVisit - next - reachableNames = reachableNames ++ children - toVisit = toVisit ++ children - if (toVisit.isEmpty) { - reachableFound = false - } else { - next = toVisit.head - toVisit = toVisit.tail + val reachableNames = mutable.HashMap[String, Int]() + while (toVisit.nonEmpty) { + val next = toVisit.head + toVisit.remove(next) + + if (next._1 <= depth) { + + def addName(depth: Int, name: String): Unit = { + val oldDepth = reachableNames.getOrElse(name, Integer.MAX_VALUE) + reachableNames.put(next._2, if depth < oldDepth then depth else oldDepth) + } + addName(next._1, next._2) + + val callees = procedureCalleeNames(next._2) + + toVisit.addAll(callees.diff(reachableNames.keySet).map(c => (next._1 + 1, c))) + callees.foreach(c => addName(next._1 + 1, c)) } } - procedures = procedures.filter(f => reachableNames.contains(f.name)) + procedures = procedures.filter(f => reachableNames.keySet.contains(f.name)) + + for (elem <- procedures.filter(c => c.calls.exists(s => !procedures.contains(s)))) { + // last layer is analysed only as specifications so we remove the body for anything that calls + // a function we have removed + elem.blocks.clear() + } } def setModifies(specModifies: Map[String, List[String]]): Unit = { diff --git a/src/main/scala/translating/BAPToIR.scala b/src/main/scala/translating/BAPToIR.scala index a601dd43e..5b74774d7 100644 --- a/src/main/scala/translating/BAPToIR.scala +++ b/src/main/scala/translating/BAPToIR.scala @@ -2,7 +2,7 @@ package translating import bap.* import boogie.UnaryBExpr -import ir.{UnaryExpr, *} +import ir.{UnaryExpr, BinaryExpr, *} import specification.* import scala.collection.mutable @@ -147,10 +147,27 @@ class BAPToIR(var program: BAPProgram, mainAddress: Int) { * Converts a BAPExpr condition that returns a bitvector of size 1 to an Expr condition that returns a Boolean * * If negative is true then the negation of the condition is returned + * + * If the BAPExpr uses a comparator that returns a Boolean then no further conversion is performed except negation, + * if necessary. * */ private def convertConditionBool(expr: BAPExpr, negative: Boolean): Expr = { - val op = if negative then BVEQ else BVNEQ - BinaryExpr(op, expr.toIR, BitVecLiteral(0, expr.size)) + val e = expr.toIR + e.getType match { + case BitVecType(s) => + if (negative) { + BinaryExpr(BVEQ, e, BitVecLiteral(0, s)) + } else { + BinaryExpr(BVNEQ, e, BitVecLiteral(0, s)) + } + case BoolType => + if (negative) { + UnaryExpr(BoolNOT, e) + } else { + e + } + case _ => ??? + } } private def newBlockCondition(block: Block, target: Block, condition: Expr): Block = { diff --git a/src/main/scala/translating/IRToBoogie.scala b/src/main/scala/translating/IRToBoogie.scala index 42d1b14d5..2b4cb2fd2 100644 --- a/src/main/scala/translating/IRToBoogie.scala +++ b/src/main/scala/translating/IRToBoogie.scala @@ -40,6 +40,7 @@ class IRToBoogie(var program: Program, var spec: Specification) { def translate(boogieGeneratorConfig: BoogieGeneratorConfig): BProgram = { config = boogieGeneratorConfig val readOnlyMemory = memoryToCondition(program.readOnlyMemory) + val procedures = program.procedures.map(f => translateProcedure(f, readOnlyMemory)) val defaultGlobals = List(BVarDecl(mem, List(externAttr)), BVarDecl(Gamma_mem, List(externAttr))) val globalVars = procedures.flatMap(p => p.globals ++ p.freeRequires.flatMap(_.globals) ++ p.freeEnsures.flatMap(_.globals) ++ p.ensures.flatMap(_.globals) ++ p.requires.flatMap(_.globals)) @@ -69,6 +70,7 @@ class IRToBoogie(var program: Program, var spec: Specification) { procedures.flatMap(p => p.functionOps).toSet ++ rgProcs.flatMap(p => p.functionOps).toSet ++ directFunctions + val functionsUsed2 = functionsUsed1.map(p => functionOpToDefinition(p)) val functionsUsed3 = functionsUsed2.flatMap(p => p.functionOps).map(p => functionOpToDefinition(p)) val functionsUsed4 = functionsUsed3.flatMap(p => p.functionOps).map(p => functionOpToDefinition(p)) @@ -102,6 +104,18 @@ class IRToBoogie(var program: Program, var spec: Specification) { List(relyProc, relyTransitive, relyReflexive) } + /** + * A predicate used to assert the value of all readonly memory. + * (Boogie does not like this it if it is too large due to it being a single expression) + * + * E.g. + * val readOnlyMemoryFunction = readOnlyMemoryPredicate(memoryToCondition(program.readOnlyMemory), mem) + * val readOnlyMemory = List(BFunctionCall(readOnlyMemoryFunction.name, List(mem), BoolBType)) + */ + private def readOnlyMemoryPredicate(readonly: List[BExpr], mem: BVar) : BFunction = { + BFunction("readonly_memory", List(BParam("mem", mem.bType)), BParam(BoolBType), Some(readonly.reduce((a, b) => BinaryBExpr(BoolAND, a, b))), List(externAttr)) + } + def functionOpToDefinition(f: FunctionOp): BFunction = { f match { case b: BVFunctionOp => BFunction(b.name, b.in, b.out, None, List(externAttr, b.attribute)) @@ -368,16 +382,49 @@ class IRToBoogie(var program: Program, var spec: Specification) { } private def memoryToCondition(memory: ArrayBuffer[MemorySection]): List[BExpr] = { - val sections = memory.flatMap { s => - for (b <- s.bytes.indices) yield { - BinaryBExpr( - BVEQ, - BMemoryLoad(mem, BitVecBLiteral(s.address + b, 64), Endian.LittleEndian, 8), - s.bytes(b).toBoogie - ) + + def coalesced(): List[BExpr] = { + val sections = memory.flatMap { s => + // Phrase the memory condition in terms of 64-bit operations, as long as the memory + // region is a multiple of such operations and appropriately aligned + if (s.address % 8 == 0 && s.bytes.size % 8 == 0) { + for (b <- s.bytes.indices by 8) yield { + // Combine the byte constants into a 64-bit value + val sum: BigInt = + (0 until 8).foldLeft(BigInt(0))((x, y) => x + (s.bytes(b + y).value * (BigInt(2).pow(y * 8)))) + BinaryBExpr( + BVEQ, + BMemoryLoad(mem, BitVecBLiteral(s.address + b, 64), Endian.LittleEndian, 64), + BitVecBLiteral(sum, 64) + ) + } + } else { + for (b <- s.bytes.indices) yield { + BinaryBExpr( + BVEQ, + BMemoryLoad(mem, BitVecBLiteral(s.address + b, 64), Endian.LittleEndian, 8), + s.bytes(b).toBoogie + ) + } + } } + sections.toList } - sections.toList + + def bytes(): List[BExpr] = { + val sections = memory.flatMap { s => + for (b <- s.bytes.indices) yield { + BinaryBExpr( + BVEQ, + BMemoryLoad(mem, BitVecBLiteral(s.address + b, 64), Endian.LittleEndian, 8), + s.bytes(b).toBoogie + ) + } + } + sections.toList + } + + if config.coalesceConstantMemory then coalesced() else bytes() } diff --git a/src/main/scala/translating/ReadELFLoader.scala b/src/main/scala/translating/ReadELFLoader.scala index c58d6b383..d874f05fe 100644 --- a/src/main/scala/translating/ReadELFLoader.scala +++ b/src/main/scala/translating/ReadELFLoader.scala @@ -1,17 +1,19 @@ package translating -import Parsers.ReadELFParser._ -import specification._ -import scala.jdk.CollectionConverters._ +import Parsers.ReadELFParser.* +import specification.* +import util.ILLoadingConfig + +import scala.jdk.CollectionConverters.* object ReadELFLoader { - def visitSyms(ctx: SymsContext): (Set[ExternalFunction], Set[SpecGlobal], Map[BigInt, BigInt], Int) = { + def visitSyms(ctx: SymsContext, config: ILLoadingConfig): (Set[ExternalFunction], Set[SpecGlobal], Map[BigInt, BigInt], Int) = { val externalFunctions = ctx.relocationTable.asScala.flatMap(r => visitRelocationTableExtFunc(r)).toSet val relocationOffsets = ctx.relocationTable.asScala.flatMap(r => visitRelocationTableOffsets(r)).toMap val globalVariables = ctx.symbolTable.asScala.flatMap(s => visitSymbolTable(s)).toSet - val mainAddress = ctx.symbolTable.asScala.flatMap(s => getMainAddress(s)) + val mainAddress = ctx.symbolTable.asScala.flatMap(s => getFunctionAddress(s, config.mainProcedureName)) if (mainAddress.isEmpty) { - throw Exception("no main function in symbol table") + throw Exception(s"no ${config.mainProcedureName} function in symbol table") } (externalFunctions, globalVariables, relocationOffsets, mainAddress.head) } @@ -56,11 +58,15 @@ object ReadELFLoader { } } - def getMainAddress(ctx: SymbolTableContext): Option[Int] = { + def getFunctionAddress(ctx: SymsContext, functionName: String): Option[Int] = { + ctx.symbolTable.asScala.flatMap(s => getFunctionAddress(s, functionName)).headOption + } + + private def getFunctionAddress(ctx: SymbolTableContext, functionName: String): Option[Int] = { if (ctx.symbolTableHeader.tableName.STRING.getText == ".symtab") { val rows = ctx.symbolTableRow.asScala val mainAddress = rows.collectFirst { - case r if r.entrytype.getText == "FUNC" && r.bind.getText == "GLOBAL" && r.name.getText == "main" => + case r if r.entrytype.getText == "FUNC" && r.bind.getText == "GLOBAL" && r.name.getText == functionName => Integer.parseInt(r.value.getText, 16) } mainAddress diff --git a/src/main/scala/util/BASILConfig.scala b/src/main/scala/util/BASILConfig.scala index ac0e3d5f7..09b65e303 100644 --- a/src/main/scala/util/BASILConfig.scala +++ b/src/main/scala/util/BASILConfig.scala @@ -1,7 +1,7 @@ package util -case class ILLoadingConfig(adtFile: String, relfFile: String, specFile: Option[String], dumpIL: Option[String]) -case class BoogieGeneratorConfig(memoryFunctionType: BoogieMemoryAccessMode = BoogieMemoryAccessMode.SuccessiveStoreSelect) +case class ILLoadingConfig(adtFile: String, relfFile: String, specFile: Option[String] = None, dumpIL: Option[String] = None, mainProcedureName: String = "main", procedureTrimDepth: Int = Int.MaxValue) +case class BoogieGeneratorConfig(memoryFunctionType: BoogieMemoryAccessMode = BoogieMemoryAccessMode.SuccessiveStoreSelect, coalesceConstantMemory: Boolean = true) case class StaticAnalysisConfig(dumpILToPath: Option[String] = None, analysisResultsPath: Option[String] = None, analysisDotPath: Option[String] = None) enum BoogieMemoryAccessMode: case SuccessiveStoreSelect, LambdaStoreSelect diff --git a/src/main/scala/util/RunUtils.scala b/src/main/scala/util/RunUtils.scala index 6ec84a96e..1eb1072ef 100644 --- a/src/main/scala/util/RunUtils.scala +++ b/src/main/scala/util/RunUtils.scala @@ -40,12 +40,12 @@ object RunUtils { BAPLoader.visitProject(parser.project()) } - def loadReadELF(fileName: String): (Set[ExternalFunction], Set[SpecGlobal], Map[BigInt, BigInt], Int) = { + def loadReadELF(fileName: String, config: ILLoadingConfig): (Set[ExternalFunction], Set[SpecGlobal], Map[BigInt, BigInt], Int) = { val lexer = ReadELFLexer(CharStreams.fromFileName(fileName)) val tokens = CommonTokenStream(lexer) val parser = ReadELFParser(tokens) parser.setBuildParseTree(true) - ReadELFLoader.visitSyms(parser.syms()) + ReadELFLoader.visitSyms(parser.syms(), config) } def loadSpecification(filename: Option[String], program: Program, globals: Set[SpecGlobal]): Specification = { @@ -62,9 +62,12 @@ object RunUtils { } def run(q: BASILConfig): Unit = { - Logger.info("[!] Writing file...") val boogieProgram = loadAndTranslate(q) - writeToFile(boogieProgram.toString, q.outputPrefix) + + Logger.info("[!] Writing file...") + val wr = BufferedWriter(FileWriter(q.outputPrefix)) + boogieProgram.writeToString(wr) + wr.close() } def loadAndTranslate(q: BASILConfig): BProgram = { @@ -72,7 +75,7 @@ object RunUtils { * Loading phase */ val bapProgram = loadBAP(q.loading.adtFile) - val (externalFunctions, globals, globalOffsets, mainAddress) = loadReadELF(q.loading.relfFile) + val (externalFunctions, globals, globalOffsets, mainAddress) = loadReadELF(q.loading.relfFile, q.loading) val IRTranslator = BAPToIR(bapProgram, mainAddress) var IRProgram = IRTranslator.translate @@ -98,7 +101,12 @@ object RunUtils { } IRProgram.determineRelevantMemory(globalOffsets) - IRProgram.stripUnreachableFunctions() + + Logger.info("[!] Stripping unreachable") + val before = IRProgram.procedures.size + IRProgram.stripUnreachableFunctions(q.loading.procedureTrimDepth) + Logger.info(s"[!] Removed ${before - IRProgram.procedures.size} functions (${IRProgram.procedures.size} remaining)") + val stackIdentification = StackSubstituter() stackIdentification.visitProgram(IRProgram) @@ -114,7 +122,6 @@ object RunUtils { Logger.info("[!] Translating to Boogie") val boogieTranslator = IRToBoogie(IRProgram, specification) - Logger.info("[!] Done! Exiting...") val boogieProgram = boogieTranslator.translate(q.boogieTranslation) boogieProgram } diff --git a/src/test/correct/arrays_simple/clang/arrays_simple.expected b/src/test/correct/arrays_simple/clang/arrays_simple.expected index ca54b2d0a..e8148fdd9 100644 --- a/src/test/correct/arrays_simple/clang/arrays_simple.expected +++ b/src/test/correct/arrays_simple/clang/arrays_simple.expected @@ -23,6 +23,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -40,43 +44,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1873bv64) == 0bv8); free ensures (memory_load8_le(mem, 1874bv64) == 2bv8); free ensures (memory_load8_le(mem, 1875bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -87,98 +65,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_stack, R0, R31, R8, stack; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1872bv64) == 1bv8); free requires (memory_load8_le(mem, 1873bv64) == 0bv8); free requires (memory_load8_le(mem, 1874bv64) == 2bv8); free requires (memory_load8_le(mem, 1875bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1872bv64) == 1bv8); free ensures (memory_load8_le(mem, 1873bv64) == 0bv8); free ensures (memory_load8_le(mem, 1874bv64) == 2bv8); free ensures (memory_load8_le(mem, 1875bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -196,3 +106,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; return; } + diff --git a/src/test/correct/arrays_simple/clang_O2/arrays_simple.expected b/src/test/correct/arrays_simple/clang_O2/arrays_simple.expected index b904c03a5..93df8d220 100644 --- a/src/test/correct/arrays_simple/clang_O2/arrays_simple.expected +++ b/src/test/correct/arrays_simple/clang_O2/arrays_simple.expected @@ -4,6 +4,11 @@ var {:extern} R0: bv64; var {:extern} mem: [bv64]bv8; const {:extern} $_IO_stdin_used_addr: bv64; axiom ($_IO_stdin_used_addr == 1840bv64); +function {:extern} {:bvbuiltin "bvadd"} bvadd64(bv64, bv64) returns (bv64); +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -16,43 +21,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1841bv64) == 0bv8); free ensures (memory_load8_le(mem, 1842bv64) == 2bv8); free ensures (memory_load8_le(mem, 1843bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -63,99 +42,32 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, R0; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1840bv64) == 1bv8); free requires (memory_load8_le(mem, 1841bv64) == 0bv8); free requires (memory_load8_le(mem, 1842bv64) == 2bv8); free requires (memory_load8_le(mem, 1843bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (memory_load8_le(mem, 1840bv64) == 1bv8); free ensures (memory_load8_le(mem, 1841bv64) == 0bv8); free ensures (memory_load8_le(mem, 1842bv64) == 2bv8); free ensures (memory_load8_le(mem, 1843bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/arrays_simple/clang_no_plt_no_pic/arrays_simple.expected b/src/test/correct/arrays_simple/clang_no_plt_no_pic/arrays_simple.expected index ca54b2d0a..e8148fdd9 100644 --- a/src/test/correct/arrays_simple/clang_no_plt_no_pic/arrays_simple.expected +++ b/src/test/correct/arrays_simple/clang_no_plt_no_pic/arrays_simple.expected @@ -23,6 +23,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -40,43 +44,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1873bv64) == 0bv8); free ensures (memory_load8_le(mem, 1874bv64) == 2bv8); free ensures (memory_load8_le(mem, 1875bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -87,98 +65,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_stack, R0, R31, R8, stack; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1872bv64) == 1bv8); free requires (memory_load8_le(mem, 1873bv64) == 0bv8); free requires (memory_load8_le(mem, 1874bv64) == 2bv8); free requires (memory_load8_le(mem, 1875bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1872bv64) == 1bv8); free ensures (memory_load8_le(mem, 1873bv64) == 0bv8); free ensures (memory_load8_le(mem, 1874bv64) == 2bv8); free ensures (memory_load8_le(mem, 1875bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -196,3 +106,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; return; } + diff --git a/src/test/correct/arrays_simple/clang_pic/arrays_simple.expected b/src/test/correct/arrays_simple/clang_pic/arrays_simple.expected index ca54b2d0a..e8148fdd9 100644 --- a/src/test/correct/arrays_simple/clang_pic/arrays_simple.expected +++ b/src/test/correct/arrays_simple/clang_pic/arrays_simple.expected @@ -23,6 +23,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -40,43 +44,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1873bv64) == 0bv8); free ensures (memory_load8_le(mem, 1874bv64) == 2bv8); free ensures (memory_load8_le(mem, 1875bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -87,98 +65,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_stack, R0, R31, R8, stack; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1872bv64) == 1bv8); free requires (memory_load8_le(mem, 1873bv64) == 0bv8); free requires (memory_load8_le(mem, 1874bv64) == 2bv8); free requires (memory_load8_le(mem, 1875bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1872bv64) == 1bv8); free ensures (memory_load8_le(mem, 1873bv64) == 0bv8); free ensures (memory_load8_le(mem, 1874bv64) == 2bv8); free ensures (memory_load8_le(mem, 1875bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -196,3 +106,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; return; } + diff --git a/src/test/correct/arrays_simple/gcc_O2/arrays_simple.expected b/src/test/correct/arrays_simple/gcc_O2/arrays_simple.expected index 306991d20..657d807d3 100644 --- a/src/test/correct/arrays_simple/gcc_O2/arrays_simple.expected +++ b/src/test/correct/arrays_simple/gcc_O2/arrays_simple.expected @@ -4,6 +4,11 @@ var {:extern} R0: bv64; var {:extern} mem: [bv64]bv8; const {:extern} $_IO_stdin_used_addr: bv64; axiom ($_IO_stdin_used_addr == 1896bv64); +function {:extern} {:bvbuiltin "bvadd"} bvadd64(bv64, bv64) returns (bv64); +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -16,43 +21,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -63,99 +42,32 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, R0; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1896bv64) == 1bv8); free requires (memory_load8_le(mem, 1897bv64) == 0bv8); free requires (memory_load8_le(mem, 1898bv64) == 2bv8); free requires (memory_load8_le(mem, 1899bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 80bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 0bv8); - free requires (memory_load8_le(mem, 69025bv64) == 7bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 0bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1536bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1896bv64) == 1bv8); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/basic_arrays_read/clang/basic_arrays_read.expected b/src/test/correct/basic_arrays_read/clang/basic_arrays_read.expected index 4bdf41446..c5b688e20 100644 --- a/src/test/correct/basic_arrays_read/clang/basic_arrays_read.expected +++ b/src/test/correct/basic_arrays_read/clang/basic_arrays_read.expected @@ -27,6 +27,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -44,150 +48,60 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1861bv64) == 0bv8); free ensures (memory_load8_le(mem, 1862bv64) == 2bv8); free ensures (memory_load8_le(mem, 1863bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (old(memory_load32_le(mem, bvadd64($arr_addr, 0bv64))) == memory_load32_le(mem, bvadd64($arr_addr, 0bv64))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, bvadd64($arr_addr, 0bv64)) == memory_load32_le(mem, bvadd64($arr_addr, 0bv64))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert true; } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_mem, Gamma_stack, R0, R31, R8, mem, stack; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1860bv64) == 1bv8); free requires (memory_load8_le(mem, 1861bv64) == 0bv8); free requires (memory_load8_le(mem, 1862bv64) == 2bv8); free requires (memory_load8_le(mem, 1863bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1860bv64) == 1bv8); free ensures (memory_load8_le(mem, 1861bv64) == 0bv8); free ensures (memory_load8_le(mem, 1862bv64) == 2bv8); free ensures (memory_load8_le(mem, 1863bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -205,3 +119,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/correct/basic_arrays_read/clang_O2/basic_arrays_read.expected b/src/test/correct/basic_arrays_read/clang_O2/basic_arrays_read.expected index 053a779de..6d956c255 100644 --- a/src/test/correct/basic_arrays_read/clang_O2/basic_arrays_read.expected +++ b/src/test/correct/basic_arrays_read/clang_O2/basic_arrays_read.expected @@ -19,6 +19,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -35,148 +39,58 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1849bv64) == 0bv8); free ensures (memory_load8_le(mem, 1850bv64) == 2bv8); free ensures (memory_load8_le(mem, 1851bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (old(memory_load32_le(mem, bvadd64($arr_addr, 0bv64))) == memory_load32_le(mem, bvadd64($arr_addr, 0bv64))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, bvadd64($arr_addr, 0bv64)) == memory_load32_le(mem, bvadd64($arr_addr, 0bv64))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert true; } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R8, Gamma_mem, R0, R8, mem; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1848bv64) == 1bv8); free requires (memory_load8_le(mem, 1849bv64) == 0bv8); free requires (memory_load8_le(mem, 1850bv64) == 2bv8); free requires (memory_load8_le(mem, 1851bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (memory_load8_le(mem, 1848bv64) == 1bv8); free ensures (memory_load8_le(mem, 1849bv64) == 0bv8); free ensures (memory_load8_le(mem, 1850bv64) == 2bv8); free ensures (memory_load8_le(mem, 1851bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -189,3 +103,4 @@ procedure main() assume {:captureState "%000002c9"} true; return; } + diff --git a/src/test/correct/basic_arrays_read/clang_no_plt_no_pic/basic_arrays_read.expected b/src/test/correct/basic_arrays_read/clang_no_plt_no_pic/basic_arrays_read.expected index 8fa9643f0..4c17176f2 100644 --- a/src/test/correct/basic_arrays_read/clang_no_plt_no_pic/basic_arrays_read.expected +++ b/src/test/correct/basic_arrays_read/clang_no_plt_no_pic/basic_arrays_read.expected @@ -27,6 +27,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -44,150 +48,60 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1861bv64) == 0bv8); free ensures (memory_load8_le(mem, 1862bv64) == 2bv8); free ensures (memory_load8_le(mem, 1863bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (old(memory_load32_le(mem, bvadd64($arr_addr, 0bv64))) == memory_load32_le(mem, bvadd64($arr_addr, 0bv64))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, bvadd64($arr_addr, 0bv64)) == memory_load32_le(mem, bvadd64($arr_addr, 0bv64))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert true; } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_mem, Gamma_stack, R0, R31, R8, mem, stack; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1860bv64) == 1bv8); free requires (memory_load8_le(mem, 1861bv64) == 0bv8); free requires (memory_load8_le(mem, 1862bv64) == 2bv8); free requires (memory_load8_le(mem, 1863bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1860bv64) == 1bv8); free ensures (memory_load8_le(mem, 1861bv64) == 0bv8); free ensures (memory_load8_le(mem, 1862bv64) == 2bv8); free ensures (memory_load8_le(mem, 1863bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -205,3 +119,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/correct/basic_arrays_read/clang_pic/basic_arrays_read.expected b/src/test/correct/basic_arrays_read/clang_pic/basic_arrays_read.expected index fe469ac3d..ab9f8055e 100644 --- a/src/test/correct/basic_arrays_read/clang_pic/basic_arrays_read.expected +++ b/src/test/correct/basic_arrays_read/clang_pic/basic_arrays_read.expected @@ -52,174 +52,63 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1929bv64) == 0bv8); free ensures (memory_load8_le(mem, 1930bv64) == 2bv8); free ensures (memory_load8_le(mem, 1931bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69584bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69585bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69586bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69587bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69588bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69589bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69590bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69591bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69584bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69064bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 69684bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (old(memory_load32_le(mem, bvadd64($arr_addr, 0bv64))) == memory_load32_le(mem, bvadd64($arr_addr, 0bv64))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, bvadd64($arr_addr, 0bv64)) == memory_load32_le(mem, bvadd64($arr_addr, 0bv64))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert true; } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_mem, Gamma_stack, R0, R31, R8, mem, stack; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1928bv64) == 1bv8); free requires (memory_load8_le(mem, 1929bv64) == 0bv8); free requires (memory_load8_le(mem, 1930bv64) == 2bv8); free requires (memory_load8_le(mem, 1931bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); - free requires (memory_load8_le(mem, 69584bv64) == 84bv8); - free requires (memory_load8_le(mem, 69585bv64) == 7bv8); - free requires (memory_load8_le(mem, 69586bv64) == 0bv8); - free requires (memory_load8_le(mem, 69587bv64) == 0bv8); - free requires (memory_load8_le(mem, 69588bv64) == 0bv8); - free requires (memory_load8_le(mem, 69589bv64) == 0bv8); - free requires (memory_load8_le(mem, 69590bv64) == 0bv8); - free requires (memory_load8_le(mem, 69591bv64) == 0bv8); - free requires (memory_load8_le(mem, 69056bv64) == 80bv8); - free requires (memory_load8_le(mem, 69057bv64) == 7bv8); - free requires (memory_load8_le(mem, 69058bv64) == 0bv8); - free requires (memory_load8_le(mem, 69059bv64) == 0bv8); - free requires (memory_load8_le(mem, 69060bv64) == 0bv8); - free requires (memory_load8_le(mem, 69061bv64) == 0bv8); - free requires (memory_load8_le(mem, 69062bv64) == 0bv8); - free requires (memory_load8_le(mem, 69063bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 0bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 52bv8); - free requires (memory_load8_le(mem, 69593bv64) == 16bv8); - free requires (memory_load8_le(mem, 69594bv64) == 1bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); + free requires (memory_load64_le(mem, 69584bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69056bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69064bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69592bv64) == 69684bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1928bv64) == 1bv8); free ensures (memory_load8_le(mem, 1929bv64) == 0bv8); free ensures (memory_load8_le(mem, 1930bv64) == 2bv8); free ensures (memory_load8_le(mem, 1931bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69584bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69585bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69586bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69587bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69588bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69589bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69590bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69591bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69584bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69064bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 69684bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -239,3 +128,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/correct/basic_arrays_read/gcc/basic_arrays_read.expected b/src/test/correct/basic_arrays_read/gcc/basic_arrays_read.expected index 39f86e8f0..edb11860b 100644 --- a/src/test/correct/basic_arrays_read/gcc/basic_arrays_read.expected +++ b/src/test/correct/basic_arrays_read/gcc/basic_arrays_read.expected @@ -21,6 +21,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -38,148 +42,58 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1861bv64) == 0bv8); free ensures (memory_load8_le(mem, 1862bv64) == 2bv8); free ensures (memory_load8_le(mem, 1863bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (old(memory_load32_le(mem, bvadd64($arr_addr, 0bv64))) == memory_load32_le(mem, bvadd64($arr_addr, 0bv64))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, bvadd64($arr_addr, 0bv64)) == memory_load32_le(mem, bvadd64($arr_addr, 0bv64))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert true; } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_mem, R0, mem; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1860bv64) == 1bv8); free requires (memory_load8_le(mem, 1861bv64) == 0bv8); free requires (memory_load8_le(mem, 1862bv64) == 2bv8); free requires (memory_load8_le(mem, 1863bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1860bv64) == 1bv8); free ensures (memory_load8_le(mem, 1861bv64) == 0bv8); free ensures (memory_load8_le(mem, 1862bv64) == 2bv8); free ensures (memory_load8_le(mem, 1863bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -196,3 +110,4 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(mem, R0)), (gamma_load32(Gamma_mem, R0) || L(mem, R0)); return; } + diff --git a/src/test/correct/basic_arrays_read/gcc_O2/basic_arrays_read.expected b/src/test/correct/basic_arrays_read/gcc_O2/basic_arrays_read.expected index 897f29d0a..c843cddaa 100644 --- a/src/test/correct/basic_arrays_read/gcc_O2/basic_arrays_read.expected +++ b/src/test/correct/basic_arrays_read/gcc_O2/basic_arrays_read.expected @@ -19,6 +19,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -35,148 +39,58 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (old(memory_load32_le(mem, bvadd64($arr_addr, 0bv64))) == memory_load32_le(mem, bvadd64($arr_addr, 0bv64))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, bvadd64($arr_addr, 0bv64)) == memory_load32_le(mem, bvadd64($arr_addr, 0bv64))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert true; } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1896bv64) == 1bv8); free requires (memory_load8_le(mem, 1897bv64) == 0bv8); free requires (memory_load8_le(mem, 1898bv64) == 2bv8); free requires (memory_load8_le(mem, 1899bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 80bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 0bv8); - free requires (memory_load8_le(mem, 69025bv64) == 7bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 0bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1536bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1896bv64) == 1bv8); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -189,3 +103,4 @@ procedure main() assume {:captureState "%000001b7"} true; return; } + diff --git a/src/test/correct/basic_arrays_read/gcc_no_plt_no_pic/basic_arrays_read.expected b/src/test/correct/basic_arrays_read/gcc_no_plt_no_pic/basic_arrays_read.expected index fe51c2369..99b9ee356 100644 --- a/src/test/correct/basic_arrays_read/gcc_no_plt_no_pic/basic_arrays_read.expected +++ b/src/test/correct/basic_arrays_read/gcc_no_plt_no_pic/basic_arrays_read.expected @@ -21,6 +21,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -38,148 +42,58 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1861bv64) == 0bv8); free ensures (memory_load8_le(mem, 1862bv64) == 2bv8); free ensures (memory_load8_le(mem, 1863bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (old(memory_load32_le(mem, bvadd64($arr_addr, 0bv64))) == memory_load32_le(mem, bvadd64($arr_addr, 0bv64))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, bvadd64($arr_addr, 0bv64)) == memory_load32_le(mem, bvadd64($arr_addr, 0bv64))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert true; } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_mem, R0, mem; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1860bv64) == 1bv8); free requires (memory_load8_le(mem, 1861bv64) == 0bv8); free requires (memory_load8_le(mem, 1862bv64) == 2bv8); free requires (memory_load8_le(mem, 1863bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1860bv64) == 1bv8); free ensures (memory_load8_le(mem, 1861bv64) == 0bv8); free ensures (memory_load8_le(mem, 1862bv64) == 2bv8); free ensures (memory_load8_le(mem, 1863bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -196,3 +110,4 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(mem, R0)), (gamma_load32(Gamma_mem, R0) || L(mem, R0)); return; } + diff --git a/src/test/correct/basic_arrays_read/gcc_pic/basic_arrays_read.expected b/src/test/correct/basic_arrays_read/gcc_pic/basic_arrays_read.expected index b8d3ae1b0..ae0f28825 100644 --- a/src/test/correct/basic_arrays_read/gcc_pic/basic_arrays_read.expected +++ b/src/test/correct/basic_arrays_read/gcc_pic/basic_arrays_read.expected @@ -46,172 +46,61 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1925bv64) == 0bv8); free ensures (memory_load8_le(mem, 1926bv64) == 2bv8); free ensures (memory_load8_le(mem, 1927bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69608bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69609bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69610bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69611bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69612bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69613bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69614bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69615bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 24bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69608bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 69656bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1872bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (old(memory_load32_le(mem, bvadd64($arr_addr, 0bv64))) == memory_load32_le(mem, bvadd64($arr_addr, 0bv64))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, bvadd64($arr_addr, 0bv64)) == memory_load32_le(mem, bvadd64($arr_addr, 0bv64))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert true; } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_mem, R0, mem; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1924bv64) == 1bv8); free requires (memory_load8_le(mem, 1925bv64) == 0bv8); free requires (memory_load8_le(mem, 1926bv64) == 2bv8); free requires (memory_load8_le(mem, 1927bv64) == 0bv8); - free requires (memory_load8_le(mem, 69608bv64) == 84bv8); - free requires (memory_load8_le(mem, 69609bv64) == 7bv8); - free requires (memory_load8_le(mem, 69610bv64) == 0bv8); - free requires (memory_load8_le(mem, 69611bv64) == 0bv8); - free requires (memory_load8_le(mem, 69612bv64) == 0bv8); - free requires (memory_load8_le(mem, 69613bv64) == 0bv8); - free requires (memory_load8_le(mem, 69614bv64) == 0bv8); - free requires (memory_load8_le(mem, 69615bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 24bv8); - free requires (memory_load8_le(mem, 69617bv64) == 16bv8); - free requires (memory_load8_le(mem, 69618bv64) == 1bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 0bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 80bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); + free requires (memory_load64_le(mem, 69608bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free requires (memory_load64_le(mem, 69616bv64) == 69656bv64); + free requires (memory_load64_le(mem, 69016bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69008bv64) == 1872bv64); free ensures (memory_load8_le(mem, 1924bv64) == 1bv8); free ensures (memory_load8_le(mem, 1925bv64) == 0bv8); free ensures (memory_load8_le(mem, 1926bv64) == 2bv8); free ensures (memory_load8_le(mem, 1927bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69608bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69609bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69610bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69611bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69612bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69613bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69614bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69615bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 24bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69608bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 69656bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1872bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -230,3 +119,4 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(mem, R0)), (gamma_load32(Gamma_mem, R0) || L(mem, R0)); return; } + diff --git a/src/test/correct/basic_arrays_write/clang/basic_arrays_write.expected b/src/test/correct/basic_arrays_write/clang/basic_arrays_write.expected index 802dd2fd8..f2fd56f92 100644 --- a/src/test/correct/basic_arrays_write/clang/basic_arrays_write.expected +++ b/src/test/correct/basic_arrays_write/clang/basic_arrays_write.expected @@ -29,6 +29,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -46,151 +50,61 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1869bv64) == 0bv8); free ensures (memory_load8_le(mem, 1870bv64) == 2bv8); free ensures (memory_load8_le(mem, 1871bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures true; + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert true; } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (memory_load32_le(mem, bvadd64($arr_addr, 0bv64)) == memory_load32_le(mem, bvadd64($arr_addr, 0bv64))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R31, R8, R9, mem, stack; requires (Gamma_R0 == false); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1868bv64) == 1bv8); free requires (memory_load8_le(mem, 1869bv64) == 0bv8); free requires (memory_load8_le(mem, 1870bv64) == 2bv8); free requires (memory_load8_le(mem, 1871bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1868bv64) == 1bv8); free ensures (memory_load8_le(mem, 1869bv64) == 0bv8); free ensures (memory_load8_le(mem, 1870bv64) == 2bv8); free ensures (memory_load8_le(mem, 1871bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var arr$0_old: bv32; lmain: @@ -211,3 +125,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/correct/basic_arrays_write/clang_O2/basic_arrays_write.expected b/src/test/correct/basic_arrays_write/clang_O2/basic_arrays_write.expected index 0b0f67500..ebb755408 100644 --- a/src/test/correct/basic_arrays_write/clang_O2/basic_arrays_write.expected +++ b/src/test/correct/basic_arrays_write/clang_O2/basic_arrays_write.expected @@ -21,6 +21,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -38,149 +42,59 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1853bv64) == 0bv8); free ensures (memory_load8_le(mem, 1854bv64) == 2bv8); free ensures (memory_load8_le(mem, 1855bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures true; + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert true; } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (memory_load32_le(mem, bvadd64($arr_addr, 0bv64)) == memory_load32_le(mem, bvadd64($arr_addr, 0bv64))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R8, Gamma_R9, Gamma_mem, R0, R8, R9, mem; requires (Gamma_R0 == false); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1852bv64) == 1bv8); free requires (memory_load8_le(mem, 1853bv64) == 0bv8); free requires (memory_load8_le(mem, 1854bv64) == 2bv8); free requires (memory_load8_le(mem, 1855bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (memory_load8_le(mem, 1852bv64) == 1bv8); free ensures (memory_load8_le(mem, 1853bv64) == 0bv8); free ensures (memory_load8_le(mem, 1854bv64) == 2bv8); free ensures (memory_load8_le(mem, 1855bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var arr$0_old: bv32; lmain: @@ -196,3 +110,4 @@ procedure main() assume {:captureState "%000002d4"} true; return; } + diff --git a/src/test/correct/basic_arrays_write/clang_no_plt_no_pic/basic_arrays_write.expected b/src/test/correct/basic_arrays_write/clang_no_plt_no_pic/basic_arrays_write.expected index 451345fbe..76a559719 100644 --- a/src/test/correct/basic_arrays_write/clang_no_plt_no_pic/basic_arrays_write.expected +++ b/src/test/correct/basic_arrays_write/clang_no_plt_no_pic/basic_arrays_write.expected @@ -29,6 +29,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -46,151 +50,61 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1869bv64) == 0bv8); free ensures (memory_load8_le(mem, 1870bv64) == 2bv8); free ensures (memory_load8_le(mem, 1871bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures true; + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert true; } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (memory_load32_le(mem, bvadd64($arr_addr, 0bv64)) == memory_load32_le(mem, bvadd64($arr_addr, 0bv64))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R31, R8, R9, mem, stack; requires (Gamma_R0 == false); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1868bv64) == 1bv8); free requires (memory_load8_le(mem, 1869bv64) == 0bv8); free requires (memory_load8_le(mem, 1870bv64) == 2bv8); free requires (memory_load8_le(mem, 1871bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1868bv64) == 1bv8); free ensures (memory_load8_le(mem, 1869bv64) == 0bv8); free ensures (memory_load8_le(mem, 1870bv64) == 2bv8); free ensures (memory_load8_le(mem, 1871bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var arr$0_old: bv32; lmain: @@ -211,3 +125,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/correct/basic_arrays_write/clang_pic/basic_arrays_write.expected b/src/test/correct/basic_arrays_write/clang_pic/basic_arrays_write.expected index d97347e01..9fcce3ab0 100644 --- a/src/test/correct/basic_arrays_write/clang_pic/basic_arrays_write.expected +++ b/src/test/correct/basic_arrays_write/clang_pic/basic_arrays_write.expected @@ -54,175 +54,64 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1933bv64) == 0bv8); free ensures (memory_load8_le(mem, 1934bv64) == 2bv8); free ensures (memory_load8_le(mem, 1935bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69584bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69585bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69586bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69587bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69588bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69589bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69590bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69591bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69584bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69064bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 69684bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures true; + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert true; } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (memory_load32_le(mem, bvadd64($arr_addr, 0bv64)) == memory_load32_le(mem, bvadd64($arr_addr, 0bv64))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R31, R8, R9, mem, stack; requires (Gamma_R0 == false); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1932bv64) == 1bv8); free requires (memory_load8_le(mem, 1933bv64) == 0bv8); free requires (memory_load8_le(mem, 1934bv64) == 2bv8); free requires (memory_load8_le(mem, 1935bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); - free requires (memory_load8_le(mem, 69584bv64) == 84bv8); - free requires (memory_load8_le(mem, 69585bv64) == 7bv8); - free requires (memory_load8_le(mem, 69586bv64) == 0bv8); - free requires (memory_load8_le(mem, 69587bv64) == 0bv8); - free requires (memory_load8_le(mem, 69588bv64) == 0bv8); - free requires (memory_load8_le(mem, 69589bv64) == 0bv8); - free requires (memory_load8_le(mem, 69590bv64) == 0bv8); - free requires (memory_load8_le(mem, 69591bv64) == 0bv8); - free requires (memory_load8_le(mem, 69056bv64) == 80bv8); - free requires (memory_load8_le(mem, 69057bv64) == 7bv8); - free requires (memory_load8_le(mem, 69058bv64) == 0bv8); - free requires (memory_load8_le(mem, 69059bv64) == 0bv8); - free requires (memory_load8_le(mem, 69060bv64) == 0bv8); - free requires (memory_load8_le(mem, 69061bv64) == 0bv8); - free requires (memory_load8_le(mem, 69062bv64) == 0bv8); - free requires (memory_load8_le(mem, 69063bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 0bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 52bv8); - free requires (memory_load8_le(mem, 69593bv64) == 16bv8); - free requires (memory_load8_le(mem, 69594bv64) == 1bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); + free requires (memory_load64_le(mem, 69584bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69056bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69064bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69592bv64) == 69684bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1932bv64) == 1bv8); free ensures (memory_load8_le(mem, 1933bv64) == 0bv8); free ensures (memory_load8_le(mem, 1934bv64) == 2bv8); free ensures (memory_load8_le(mem, 1935bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69584bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69585bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69586bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69587bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69588bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69589bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69590bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69591bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69584bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69064bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 69684bv64); + +implementation main() { var arr$0_old: bv32; lmain: @@ -244,3 +133,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/correct/basic_arrays_write/gcc/basic_arrays_write.expected b/src/test/correct/basic_arrays_write/gcc/basic_arrays_write.expected index 633928146..8e03e4189 100644 --- a/src/test/correct/basic_arrays_write/gcc/basic_arrays_write.expected +++ b/src/test/correct/basic_arrays_write/gcc/basic_arrays_write.expected @@ -27,6 +27,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -44,151 +48,61 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1869bv64) == 0bv8); free ensures (memory_load8_le(mem, 1870bv64) == 2bv8); free ensures (memory_load8_le(mem, 1871bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures true; + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert true; } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (memory_load32_le(mem, bvadd64($arr_addr, 0bv64)) == memory_load32_le(mem, bvadd64($arr_addr, 0bv64))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R31, mem, stack; requires (Gamma_R0 == false); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1868bv64) == 1bv8); free requires (memory_load8_le(mem, 1869bv64) == 0bv8); free requires (memory_load8_le(mem, 1870bv64) == 2bv8); free requires (memory_load8_le(mem, 1871bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1868bv64) == 1bv8); free ensures (memory_load8_le(mem, 1869bv64) == 0bv8); free ensures (memory_load8_le(mem, 1870bv64) == 2bv8); free ensures (memory_load8_le(mem, 1871bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var arr$0_old: bv32; lmain: @@ -209,3 +123,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/correct/basic_arrays_write/gcc_O2/basic_arrays_write.expected b/src/test/correct/basic_arrays_write/gcc_O2/basic_arrays_write.expected index 72ddd2b51..c804e3075 100644 --- a/src/test/correct/basic_arrays_write/gcc_O2/basic_arrays_write.expected +++ b/src/test/correct/basic_arrays_write/gcc_O2/basic_arrays_write.expected @@ -21,6 +21,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -38,149 +42,59 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures true; + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert true; } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (memory_load32_le(mem, bvadd64($arr_addr, 0bv64)) == memory_load32_le(mem, bvadd64($arr_addr, 0bv64))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R2, Gamma_mem, R0, R1, R2, mem; requires (Gamma_R0 == false); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1896bv64) == 1bv8); free requires (memory_load8_le(mem, 1897bv64) == 0bv8); free requires (memory_load8_le(mem, 1898bv64) == 2bv8); free requires (memory_load8_le(mem, 1899bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 80bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 0bv8); - free requires (memory_load8_le(mem, 69025bv64) == 7bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 0bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1536bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1896bv64) == 1bv8); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var arr$0_old: bv32; lmain: @@ -196,3 +110,4 @@ procedure main() assume {:captureState "%000001be"} true; return; } + diff --git a/src/test/correct/basic_arrays_write/gcc_no_plt_no_pic/basic_arrays_write.expected b/src/test/correct/basic_arrays_write/gcc_no_plt_no_pic/basic_arrays_write.expected index acde06d29..cbc4e476f 100644 --- a/src/test/correct/basic_arrays_write/gcc_no_plt_no_pic/basic_arrays_write.expected +++ b/src/test/correct/basic_arrays_write/gcc_no_plt_no_pic/basic_arrays_write.expected @@ -27,6 +27,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -44,151 +48,61 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1869bv64) == 0bv8); free ensures (memory_load8_le(mem, 1870bv64) == 2bv8); free ensures (memory_load8_le(mem, 1871bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures true; + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert true; } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (memory_load32_le(mem, bvadd64($arr_addr, 0bv64)) == memory_load32_le(mem, bvadd64($arr_addr, 0bv64))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R31, mem, stack; requires (Gamma_R0 == false); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1868bv64) == 1bv8); free requires (memory_load8_le(mem, 1869bv64) == 0bv8); free requires (memory_load8_le(mem, 1870bv64) == 2bv8); free requires (memory_load8_le(mem, 1871bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1868bv64) == 1bv8); free ensures (memory_load8_le(mem, 1869bv64) == 0bv8); free ensures (memory_load8_le(mem, 1870bv64) == 2bv8); free ensures (memory_load8_le(mem, 1871bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var arr$0_old: bv32; lmain: @@ -209,3 +123,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/correct/basic_arrays_write/gcc_pic/basic_arrays_write.expected b/src/test/correct/basic_arrays_write/gcc_pic/basic_arrays_write.expected index f49966fbc..84af2b94c 100644 --- a/src/test/correct/basic_arrays_write/gcc_pic/basic_arrays_write.expected +++ b/src/test/correct/basic_arrays_write/gcc_pic/basic_arrays_write.expected @@ -52,175 +52,64 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1933bv64) == 0bv8); free ensures (memory_load8_le(mem, 1934bv64) == 2bv8); free ensures (memory_load8_le(mem, 1935bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69608bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69609bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69610bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69611bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69612bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69613bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69614bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69615bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 24bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69608bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 69656bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1872bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures true; + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert true; } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (memory_load32_le(mem, bvadd64($arr_addr, 0bv64)) == memory_load32_le(mem, bvadd64($arr_addr, 0bv64))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R31, mem, stack; requires (Gamma_R0 == false); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1932bv64) == 1bv8); free requires (memory_load8_le(mem, 1933bv64) == 0bv8); free requires (memory_load8_le(mem, 1934bv64) == 2bv8); free requires (memory_load8_le(mem, 1935bv64) == 0bv8); - free requires (memory_load8_le(mem, 69608bv64) == 84bv8); - free requires (memory_load8_le(mem, 69609bv64) == 7bv8); - free requires (memory_load8_le(mem, 69610bv64) == 0bv8); - free requires (memory_load8_le(mem, 69611bv64) == 0bv8); - free requires (memory_load8_le(mem, 69612bv64) == 0bv8); - free requires (memory_load8_le(mem, 69613bv64) == 0bv8); - free requires (memory_load8_le(mem, 69614bv64) == 0bv8); - free requires (memory_load8_le(mem, 69615bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 24bv8); - free requires (memory_load8_le(mem, 69617bv64) == 16bv8); - free requires (memory_load8_le(mem, 69618bv64) == 1bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 0bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 80bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); + free requires (memory_load64_le(mem, 69608bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free requires (memory_load64_le(mem, 69616bv64) == 69656bv64); + free requires (memory_load64_le(mem, 69016bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69008bv64) == 1872bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1932bv64) == 1bv8); free ensures (memory_load8_le(mem, 1933bv64) == 0bv8); free ensures (memory_load8_le(mem, 1934bv64) == 2bv8); free ensures (memory_load8_le(mem, 1935bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69608bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69609bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69610bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69611bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69612bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69613bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69614bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69615bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 24bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69608bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 69656bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1872bv64); + +implementation main() { var arr$0_old: bv32; lmain: @@ -242,3 +131,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/correct/basic_assign_assign/clang/basic_assign_assign.expected b/src/test/correct/basic_assign_assign/clang/basic_assign_assign.expected index 45d3ed040..ef04944c8 100644 --- a/src/test/correct/basic_assign_assign/clang/basic_assign_assign.expected +++ b/src/test/correct/basic_assign_assign/clang/basic_assign_assign.expected @@ -21,6 +21,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -37,150 +41,60 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1853bv64) == 0bv8); free ensures (memory_load8_le(mem, 1854bv64) == 2bv8); free ensures (memory_load8_le(mem, 1855bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (((memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))) || (memory_load32_le(mem, $x_addr) == 1bv32)) || (memory_load32_le(mem, $x_addr) == 6bv32)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) || (memory_load32_le(mem, $x_addr) == 1bv32)) || (memory_load32_le(mem, $x_addr) == 6bv32)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) || (memory_load32_le(mem, $x_addr) == 5bv32)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R8, Gamma_R9, Gamma_mem, R0, R8, R9, mem; requires (memory_load32_le(mem, $x_addr) == 0bv32); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1852bv64) == 1bv8); free requires (memory_load8_le(mem, 1853bv64) == 0bv8); free requires (memory_load8_le(mem, 1854bv64) == 2bv8); free requires (memory_load8_le(mem, 1855bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); ensures ((memory_load32_le(mem, $x_addr) == 5bv32) || (memory_load32_le(mem, $x_addr) == 6bv32)); free ensures (memory_load8_le(mem, 1852bv64) == 1bv8); free ensures (memory_load8_le(mem, 1853bv64) == 0bv8); free ensures (memory_load8_le(mem, 1854bv64) == 2bv8); free ensures (memory_load8_le(mem, 1855bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var x_old: bv32; lmain: @@ -196,3 +110,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/basic_assign_assign/clang_O2/basic_assign_assign.expected b/src/test/correct/basic_assign_assign/clang_O2/basic_assign_assign.expected index 00e811d26..d64b06e7f 100644 --- a/src/test/correct/basic_assign_assign/clang_O2/basic_assign_assign.expected +++ b/src/test/correct/basic_assign_assign/clang_O2/basic_assign_assign.expected @@ -21,6 +21,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -37,150 +41,60 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1853bv64) == 0bv8); free ensures (memory_load8_le(mem, 1854bv64) == 2bv8); free ensures (memory_load8_le(mem, 1855bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (((memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))) || (memory_load32_le(mem, $x_addr) == 1bv32)) || (memory_load32_le(mem, $x_addr) == 6bv32)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) || (memory_load32_le(mem, $x_addr) == 1bv32)) || (memory_load32_le(mem, $x_addr) == 6bv32)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) || (memory_load32_le(mem, $x_addr) == 5bv32)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R8, Gamma_R9, Gamma_mem, R0, R8, R9, mem; requires (memory_load32_le(mem, $x_addr) == 0bv32); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1852bv64) == 1bv8); free requires (memory_load8_le(mem, 1853bv64) == 0bv8); free requires (memory_load8_le(mem, 1854bv64) == 2bv8); free requires (memory_load8_le(mem, 1855bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); ensures ((memory_load32_le(mem, $x_addr) == 5bv32) || (memory_load32_le(mem, $x_addr) == 6bv32)); free ensures (memory_load8_le(mem, 1852bv64) == 1bv8); free ensures (memory_load8_le(mem, 1853bv64) == 0bv8); free ensures (memory_load8_le(mem, 1854bv64) == 2bv8); free ensures (memory_load8_le(mem, 1855bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var x_old: bv32; lmain: @@ -196,3 +110,4 @@ procedure main() assume {:captureState "%000002d3"} true; return; } + diff --git a/src/test/correct/basic_assign_assign/clang_no_plt_no_pic/basic_assign_assign.expected b/src/test/correct/basic_assign_assign/clang_no_plt_no_pic/basic_assign_assign.expected index 1d38b377b..cb4eb6691 100644 --- a/src/test/correct/basic_assign_assign/clang_no_plt_no_pic/basic_assign_assign.expected +++ b/src/test/correct/basic_assign_assign/clang_no_plt_no_pic/basic_assign_assign.expected @@ -21,6 +21,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -37,150 +41,60 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1853bv64) == 0bv8); free ensures (memory_load8_le(mem, 1854bv64) == 2bv8); free ensures (memory_load8_le(mem, 1855bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (((memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))) || (memory_load32_le(mem, $x_addr) == 1bv32)) || (memory_load32_le(mem, $x_addr) == 6bv32)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) || (memory_load32_le(mem, $x_addr) == 1bv32)) || (memory_load32_le(mem, $x_addr) == 6bv32)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) || (memory_load32_le(mem, $x_addr) == 5bv32)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R8, Gamma_R9, Gamma_mem, R0, R8, R9, mem; requires (memory_load32_le(mem, $x_addr) == 0bv32); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1852bv64) == 1bv8); free requires (memory_load8_le(mem, 1853bv64) == 0bv8); free requires (memory_load8_le(mem, 1854bv64) == 2bv8); free requires (memory_load8_le(mem, 1855bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); ensures ((memory_load32_le(mem, $x_addr) == 5bv32) || (memory_load32_le(mem, $x_addr) == 6bv32)); free ensures (memory_load8_le(mem, 1852bv64) == 1bv8); free ensures (memory_load8_le(mem, 1853bv64) == 0bv8); free ensures (memory_load8_le(mem, 1854bv64) == 2bv8); free ensures (memory_load8_le(mem, 1855bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var x_old: bv32; lmain: @@ -196,3 +110,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/basic_assign_assign/clang_pic/basic_assign_assign.expected b/src/test/correct/basic_assign_assign/clang_pic/basic_assign_assign.expected index 17aef59a5..ba57bc23c 100644 --- a/src/test/correct/basic_assign_assign/clang_pic/basic_assign_assign.expected +++ b/src/test/correct/basic_assign_assign/clang_pic/basic_assign_assign.expected @@ -45,174 +45,63 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1921bv64) == 0bv8); free ensures (memory_load8_le(mem, 1922bv64) == 2bv8); free ensures (memory_load8_le(mem, 1923bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69576bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69577bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69578bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69579bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69580bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69581bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69582bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69583bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69576bv64) == 69684bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69064bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (((memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))) || (memory_load32_le(mem, $x_addr) == 1bv32)) || (memory_load32_le(mem, $x_addr) == 6bv32)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) || (memory_load32_le(mem, $x_addr) == 1bv32)) || (memory_load32_le(mem, $x_addr) == 6bv32)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) || (memory_load32_le(mem, $x_addr) == 5bv32)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R8, Gamma_R9, Gamma_mem, R0, R8, R9, mem; requires (memory_load32_le(mem, $x_addr) == 0bv32); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1920bv64) == 1bv8); free requires (memory_load8_le(mem, 1921bv64) == 0bv8); free requires (memory_load8_le(mem, 1922bv64) == 2bv8); free requires (memory_load8_le(mem, 1923bv64) == 0bv8); - free requires (memory_load8_le(mem, 69576bv64) == 52bv8); - free requires (memory_load8_le(mem, 69577bv64) == 16bv8); - free requires (memory_load8_le(mem, 69578bv64) == 1bv8); - free requires (memory_load8_le(mem, 69579bv64) == 0bv8); - free requires (memory_load8_le(mem, 69580bv64) == 0bv8); - free requires (memory_load8_le(mem, 69581bv64) == 0bv8); - free requires (memory_load8_le(mem, 69582bv64) == 0bv8); - free requires (memory_load8_le(mem, 69583bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); - free requires (memory_load8_le(mem, 69056bv64) == 80bv8); - free requires (memory_load8_le(mem, 69057bv64) == 7bv8); - free requires (memory_load8_le(mem, 69058bv64) == 0bv8); - free requires (memory_load8_le(mem, 69059bv64) == 0bv8); - free requires (memory_load8_le(mem, 69060bv64) == 0bv8); - free requires (memory_load8_le(mem, 69061bv64) == 0bv8); - free requires (memory_load8_le(mem, 69062bv64) == 0bv8); - free requires (memory_load8_le(mem, 69063bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 0bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 84bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); + free requires (memory_load64_le(mem, 69576bv64) == 69684bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); + free requires (memory_load64_le(mem, 69056bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69064bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1876bv64); ensures ((memory_load32_le(mem, $x_addr) == 5bv32) || (memory_load32_le(mem, $x_addr) == 6bv32)); free ensures (memory_load8_le(mem, 1920bv64) == 1bv8); free ensures (memory_load8_le(mem, 1921bv64) == 0bv8); free ensures (memory_load8_le(mem, 1922bv64) == 2bv8); free ensures (memory_load8_le(mem, 1923bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69576bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69577bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69578bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69579bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69580bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69581bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69582bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69583bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69576bv64) == 69684bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69064bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + +implementation main() { var x_old: bv32; lmain: @@ -230,3 +119,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/basic_assign_assign/gcc/basic_assign_assign.expected b/src/test/correct/basic_assign_assign/gcc/basic_assign_assign.expected index 238102d1a..67cd54772 100644 --- a/src/test/correct/basic_assign_assign/gcc/basic_assign_assign.expected +++ b/src/test/correct/basic_assign_assign/gcc/basic_assign_assign.expected @@ -19,6 +19,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -35,150 +39,60 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1857bv64) == 0bv8); free ensures (memory_load8_le(mem, 1858bv64) == 2bv8); free ensures (memory_load8_le(mem, 1859bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (((memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))) || (memory_load32_le(mem, $x_addr) == 1bv32)) || (memory_load32_le(mem, $x_addr) == 6bv32)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) || (memory_load32_le(mem, $x_addr) == 1bv32)) || (memory_load32_le(mem, $x_addr) == 6bv32)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) || (memory_load32_le(mem, $x_addr) == 5bv32)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; requires (memory_load32_le(mem, $x_addr) == 0bv32); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1856bv64) == 1bv8); free requires (memory_load8_le(mem, 1857bv64) == 0bv8); free requires (memory_load8_le(mem, 1858bv64) == 2bv8); free requires (memory_load8_le(mem, 1859bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); ensures ((memory_load32_le(mem, $x_addr) == 5bv32) || (memory_load32_le(mem, $x_addr) == 6bv32)); free ensures (memory_load8_le(mem, 1856bv64) == 1bv8); free ensures (memory_load8_le(mem, 1857bv64) == 0bv8); free ensures (memory_load8_le(mem, 1858bv64) == 2bv8); free ensures (memory_load8_le(mem, 1859bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var x_old: bv32; lmain: @@ -195,3 +109,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/basic_assign_assign/gcc_O2/basic_assign_assign.expected b/src/test/correct/basic_assign_assign/gcc_O2/basic_assign_assign.expected index 81d8fdece..2c52bf6ac 100644 --- a/src/test/correct/basic_assign_assign/gcc_O2/basic_assign_assign.expected +++ b/src/test/correct/basic_assign_assign/gcc_O2/basic_assign_assign.expected @@ -21,6 +21,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -37,150 +41,60 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (((memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))) || (memory_load32_le(mem, $x_addr) == 1bv32)) || (memory_load32_le(mem, $x_addr) == 6bv32)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) || (memory_load32_le(mem, $x_addr) == 1bv32)) || (memory_load32_le(mem, $x_addr) == 6bv32)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) || (memory_load32_le(mem, $x_addr) == 5bv32)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R2, Gamma_mem, R0, R1, R2, mem; requires (memory_load32_le(mem, $x_addr) == 0bv32); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1896bv64) == 1bv8); free requires (memory_load8_le(mem, 1897bv64) == 0bv8); free requires (memory_load8_le(mem, 1898bv64) == 2bv8); free requires (memory_load8_le(mem, 1899bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 80bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 0bv8); - free requires (memory_load8_le(mem, 69025bv64) == 7bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 0bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1536bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); ensures ((memory_load32_le(mem, $x_addr) == 5bv32) || (memory_load32_le(mem, $x_addr) == 6bv32)); free ensures (memory_load8_le(mem, 1896bv64) == 1bv8); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var x_old: bv32; lmain: @@ -196,3 +110,4 @@ procedure main() assume {:captureState "%000001bd"} true; return; } + diff --git a/src/test/correct/basic_assign_assign/gcc_no_plt_no_pic/basic_assign_assign.expected b/src/test/correct/basic_assign_assign/gcc_no_plt_no_pic/basic_assign_assign.expected index 1b1ef4f87..c22f17d25 100644 --- a/src/test/correct/basic_assign_assign/gcc_no_plt_no_pic/basic_assign_assign.expected +++ b/src/test/correct/basic_assign_assign/gcc_no_plt_no_pic/basic_assign_assign.expected @@ -19,6 +19,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -35,150 +39,60 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1857bv64) == 0bv8); free ensures (memory_load8_le(mem, 1858bv64) == 2bv8); free ensures (memory_load8_le(mem, 1859bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (((memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))) || (memory_load32_le(mem, $x_addr) == 1bv32)) || (memory_load32_le(mem, $x_addr) == 6bv32)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) || (memory_load32_le(mem, $x_addr) == 1bv32)) || (memory_load32_le(mem, $x_addr) == 6bv32)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) || (memory_load32_le(mem, $x_addr) == 5bv32)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; requires (memory_load32_le(mem, $x_addr) == 0bv32); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1856bv64) == 1bv8); free requires (memory_load8_le(mem, 1857bv64) == 0bv8); free requires (memory_load8_le(mem, 1858bv64) == 2bv8); free requires (memory_load8_le(mem, 1859bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); ensures ((memory_load32_le(mem, $x_addr) == 5bv32) || (memory_load32_le(mem, $x_addr) == 6bv32)); free ensures (memory_load8_le(mem, 1856bv64) == 1bv8); free ensures (memory_load8_le(mem, 1857bv64) == 0bv8); free ensures (memory_load8_le(mem, 1858bv64) == 2bv8); free ensures (memory_load8_le(mem, 1859bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var x_old: bv32; lmain: @@ -195,3 +109,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/basic_assign_assign/gcc_pic/basic_assign_assign.expected b/src/test/correct/basic_assign_assign/gcc_pic/basic_assign_assign.expected index ffd291153..906116fac 100644 --- a/src/test/correct/basic_assign_assign/gcc_pic/basic_assign_assign.expected +++ b/src/test/correct/basic_assign_assign/gcc_pic/basic_assign_assign.expected @@ -43,174 +43,63 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1921bv64) == 0bv8); free ensures (memory_load8_le(mem, 1922bv64) == 2bv8); free ensures (memory_load8_le(mem, 1923bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69600bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69601bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69602bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69603bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69604bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69605bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69606bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69607bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69600bv64) == 69652bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1872bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (((memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))) || (memory_load32_le(mem, $x_addr) == 1bv32)) || (memory_load32_le(mem, $x_addr) == 6bv32)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) || (memory_load32_le(mem, $x_addr) == 1bv32)) || (memory_load32_le(mem, $x_addr) == 6bv32)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) || (memory_load32_le(mem, $x_addr) == 5bv32)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; requires (memory_load32_le(mem, $x_addr) == 0bv32); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1920bv64) == 1bv8); free requires (memory_load8_le(mem, 1921bv64) == 0bv8); free requires (memory_load8_le(mem, 1922bv64) == 2bv8); free requires (memory_load8_le(mem, 1923bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 84bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 0bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69600bv64) == 20bv8); - free requires (memory_load8_le(mem, 69601bv64) == 16bv8); - free requires (memory_load8_le(mem, 69602bv64) == 1bv8); - free requires (memory_load8_le(mem, 69603bv64) == 0bv8); - free requires (memory_load8_le(mem, 69604bv64) == 0bv8); - free requires (memory_load8_le(mem, 69605bv64) == 0bv8); - free requires (memory_load8_le(mem, 69606bv64) == 0bv8); - free requires (memory_load8_le(mem, 69607bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 80bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69016bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69600bv64) == 69652bv64); + free requires (memory_load64_le(mem, 69008bv64) == 1872bv64); ensures ((memory_load32_le(mem, $x_addr) == 5bv32) || (memory_load32_le(mem, $x_addr) == 6bv32)); free ensures (memory_load8_le(mem, 1920bv64) == 1bv8); free ensures (memory_load8_le(mem, 1921bv64) == 0bv8); free ensures (memory_load8_le(mem, 1922bv64) == 2bv8); free ensures (memory_load8_le(mem, 1923bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69600bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69601bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69602bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69603bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69604bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69605bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69606bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69607bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69600bv64) == 69652bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1872bv64); + +implementation main() { var x_old: bv32; lmain: @@ -228,3 +117,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/basic_assign_increment/clang/basic_assign_increment.expected b/src/test/correct/basic_assign_increment/clang/basic_assign_increment.expected index 528931a0f..63e8aa7c6 100644 --- a/src/test/correct/basic_assign_increment/clang/basic_assign_increment.expected +++ b/src/test/correct/basic_assign_increment/clang/basic_assign_increment.expected @@ -26,6 +26,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -43,150 +47,60 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1857bv64) == 0bv8); free ensures (memory_load8_le(mem, 1858bv64) == 2bv8); free ensures (memory_load8_le(mem, 1859bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))) || (memory_load32_le(mem, $x_addr) == 5bv32)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) || (memory_load32_le(mem, $x_addr) == 5bv32)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) || (memory_load32_le(mem, $x_addr) == 1bv32)) || (memory_load32_le(mem, $x_addr) == 6bv32)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R8, Gamma_R9, Gamma_mem, R0, R8, R9, mem; requires (memory_load32_le(mem, $x_addr) == 0bv32); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1856bv64) == 1bv8); free requires (memory_load8_le(mem, 1857bv64) == 0bv8); free requires (memory_load8_le(mem, 1858bv64) == 2bv8); free requires (memory_load8_le(mem, 1859bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); ensures (((memory_load32_le(mem, $x_addr) == 1bv32) || (memory_load32_le(mem, $x_addr) == 5bv32)) || (memory_load32_le(mem, $x_addr) == 6bv32)); free ensures (memory_load8_le(mem, 1856bv64) == 1bv8); free ensures (memory_load8_le(mem, 1857bv64) == 0bv8); free ensures (memory_load8_le(mem, 1858bv64) == 2bv8); free ensures (memory_load8_le(mem, 1859bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var x_old: bv32; lmain: @@ -204,3 +118,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/basic_assign_increment/clang_O2/basic_assign_increment.expected b/src/test/correct/basic_assign_increment/clang_O2/basic_assign_increment.expected index 68697865d..c4614ad48 100644 --- a/src/test/correct/basic_assign_increment/clang_O2/basic_assign_increment.expected +++ b/src/test/correct/basic_assign_increment/clang_O2/basic_assign_increment.expected @@ -26,6 +26,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -43,150 +47,60 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1857bv64) == 0bv8); free ensures (memory_load8_le(mem, 1858bv64) == 2bv8); free ensures (memory_load8_le(mem, 1859bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))) || (memory_load32_le(mem, $x_addr) == 5bv32)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) || (memory_load32_le(mem, $x_addr) == 5bv32)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) || (memory_load32_le(mem, $x_addr) == 1bv32)) || (memory_load32_le(mem, $x_addr) == 6bv32)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R8, Gamma_R9, Gamma_mem, R0, R8, R9, mem; requires (memory_load32_le(mem, $x_addr) == 0bv32); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1856bv64) == 1bv8); free requires (memory_load8_le(mem, 1857bv64) == 0bv8); free requires (memory_load8_le(mem, 1858bv64) == 2bv8); free requires (memory_load8_le(mem, 1859bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); ensures (((memory_load32_le(mem, $x_addr) == 1bv32) || (memory_load32_le(mem, $x_addr) == 5bv32)) || (memory_load32_le(mem, $x_addr) == 6bv32)); free ensures (memory_load8_le(mem, 1856bv64) == 1bv8); free ensures (memory_load8_le(mem, 1857bv64) == 0bv8); free ensures (memory_load8_le(mem, 1858bv64) == 2bv8); free ensures (memory_load8_le(mem, 1859bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var x_old: bv32; lmain: @@ -204,3 +118,4 @@ procedure main() assume {:captureState "%000002df"} true; return; } + diff --git a/src/test/correct/basic_assign_increment/clang_no_plt_no_pic/basic_assign_increment.expected b/src/test/correct/basic_assign_increment/clang_no_plt_no_pic/basic_assign_increment.expected index fcde38982..82a1091e7 100644 --- a/src/test/correct/basic_assign_increment/clang_no_plt_no_pic/basic_assign_increment.expected +++ b/src/test/correct/basic_assign_increment/clang_no_plt_no_pic/basic_assign_increment.expected @@ -26,6 +26,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -43,150 +47,60 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1857bv64) == 0bv8); free ensures (memory_load8_le(mem, 1858bv64) == 2bv8); free ensures (memory_load8_le(mem, 1859bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))) || (memory_load32_le(mem, $x_addr) == 5bv32)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) || (memory_load32_le(mem, $x_addr) == 5bv32)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) || (memory_load32_le(mem, $x_addr) == 1bv32)) || (memory_load32_le(mem, $x_addr) == 6bv32)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R8, Gamma_R9, Gamma_mem, R0, R8, R9, mem; requires (memory_load32_le(mem, $x_addr) == 0bv32); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1856bv64) == 1bv8); free requires (memory_load8_le(mem, 1857bv64) == 0bv8); free requires (memory_load8_le(mem, 1858bv64) == 2bv8); free requires (memory_load8_le(mem, 1859bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); ensures (((memory_load32_le(mem, $x_addr) == 1bv32) || (memory_load32_le(mem, $x_addr) == 5bv32)) || (memory_load32_le(mem, $x_addr) == 6bv32)); free ensures (memory_load8_le(mem, 1856bv64) == 1bv8); free ensures (memory_load8_le(mem, 1857bv64) == 0bv8); free ensures (memory_load8_le(mem, 1858bv64) == 2bv8); free ensures (memory_load8_le(mem, 1859bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var x_old: bv32; lmain: @@ -204,3 +118,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/basic_assign_increment/clang_pic/basic_assign_increment.expected b/src/test/correct/basic_assign_increment/clang_pic/basic_assign_increment.expected index 86e9d68ec..faa73d91e 100644 --- a/src/test/correct/basic_assign_increment/clang_pic/basic_assign_increment.expected +++ b/src/test/correct/basic_assign_increment/clang_pic/basic_assign_increment.expected @@ -51,174 +51,63 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1925bv64) == 0bv8); free ensures (memory_load8_le(mem, 1926bv64) == 2bv8); free ensures (memory_load8_le(mem, 1927bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69576bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69577bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69578bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69579bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69580bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69581bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69582bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69583bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69576bv64) == 69684bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69064bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))) || (memory_load32_le(mem, $x_addr) == 5bv32)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) || (memory_load32_le(mem, $x_addr) == 5bv32)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) || (memory_load32_le(mem, $x_addr) == 1bv32)) || (memory_load32_le(mem, $x_addr) == 6bv32)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R8, Gamma_R9, Gamma_mem, R0, R8, R9, mem; requires (memory_load32_le(mem, $x_addr) == 0bv32); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1924bv64) == 1bv8); free requires (memory_load8_le(mem, 1925bv64) == 0bv8); free requires (memory_load8_le(mem, 1926bv64) == 2bv8); free requires (memory_load8_le(mem, 1927bv64) == 0bv8); - free requires (memory_load8_le(mem, 69576bv64) == 52bv8); - free requires (memory_load8_le(mem, 69577bv64) == 16bv8); - free requires (memory_load8_le(mem, 69578bv64) == 1bv8); - free requires (memory_load8_le(mem, 69579bv64) == 0bv8); - free requires (memory_load8_le(mem, 69580bv64) == 0bv8); - free requires (memory_load8_le(mem, 69581bv64) == 0bv8); - free requires (memory_load8_le(mem, 69582bv64) == 0bv8); - free requires (memory_load8_le(mem, 69583bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); - free requires (memory_load8_le(mem, 69056bv64) == 80bv8); - free requires (memory_load8_le(mem, 69057bv64) == 7bv8); - free requires (memory_load8_le(mem, 69058bv64) == 0bv8); - free requires (memory_load8_le(mem, 69059bv64) == 0bv8); - free requires (memory_load8_le(mem, 69060bv64) == 0bv8); - free requires (memory_load8_le(mem, 69061bv64) == 0bv8); - free requires (memory_load8_le(mem, 69062bv64) == 0bv8); - free requires (memory_load8_le(mem, 69063bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 0bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 84bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); + free requires (memory_load64_le(mem, 69576bv64) == 69684bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); + free requires (memory_load64_le(mem, 69056bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69064bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1876bv64); ensures (((memory_load32_le(mem, $x_addr) == 1bv32) || (memory_load32_le(mem, $x_addr) == 5bv32)) || (memory_load32_le(mem, $x_addr) == 6bv32)); free ensures (memory_load8_le(mem, 1924bv64) == 1bv8); free ensures (memory_load8_le(mem, 1925bv64) == 0bv8); free ensures (memory_load8_le(mem, 1926bv64) == 2bv8); free ensures (memory_load8_le(mem, 1927bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69576bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69577bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69578bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69579bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69580bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69581bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69582bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69583bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69576bv64) == 69684bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69064bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + +implementation main() { var x_old: bv32; lmain: @@ -238,3 +127,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/basic_assign_increment/gcc/basic_assign_increment.expected b/src/test/correct/basic_assign_increment/gcc/basic_assign_increment.expected index 1c13cd862..fbd2704b0 100644 --- a/src/test/correct/basic_assign_increment/gcc/basic_assign_increment.expected +++ b/src/test/correct/basic_assign_increment/gcc/basic_assign_increment.expected @@ -24,6 +24,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -41,150 +45,60 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1869bv64) == 0bv8); free ensures (memory_load8_le(mem, 1870bv64) == 2bv8); free ensures (memory_load8_le(mem, 1871bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))) || (memory_load32_le(mem, $x_addr) == 5bv32)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) || (memory_load32_le(mem, $x_addr) == 5bv32)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) || (memory_load32_le(mem, $x_addr) == 1bv32)) || (memory_load32_le(mem, $x_addr) == 6bv32)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; requires (memory_load32_le(mem, $x_addr) == 0bv32); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1868bv64) == 1bv8); free requires (memory_load8_le(mem, 1869bv64) == 0bv8); free requires (memory_load8_le(mem, 1870bv64) == 2bv8); free requires (memory_load8_le(mem, 1871bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); ensures (((memory_load32_le(mem, $x_addr) == 1bv32) || (memory_load32_le(mem, $x_addr) == 5bv32)) || (memory_load32_le(mem, $x_addr) == 6bv32)); free ensures (memory_load8_le(mem, 1868bv64) == 1bv8); free ensures (memory_load8_le(mem, 1869bv64) == 0bv8); free ensures (memory_load8_le(mem, 1870bv64) == 2bv8); free ensures (memory_load8_le(mem, 1871bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var x_old: bv32; lmain: @@ -205,3 +119,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/basic_assign_increment/gcc_O2/basic_assign_increment.expected b/src/test/correct/basic_assign_increment/gcc_O2/basic_assign_increment.expected index 07a2894d0..9ca19cfbc 100644 --- a/src/test/correct/basic_assign_increment/gcc_O2/basic_assign_increment.expected +++ b/src/test/correct/basic_assign_increment/gcc_O2/basic_assign_increment.expected @@ -26,6 +26,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -43,150 +47,60 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))) || (memory_load32_le(mem, $x_addr) == 5bv32)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) || (memory_load32_le(mem, $x_addr) == 5bv32)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) || (memory_load32_le(mem, $x_addr) == 1bv32)) || (memory_load32_le(mem, $x_addr) == 6bv32)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R2, Gamma_mem, R0, R1, R2, mem; requires (memory_load32_le(mem, $x_addr) == 0bv32); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1896bv64) == 1bv8); free requires (memory_load8_le(mem, 1897bv64) == 0bv8); free requires (memory_load8_le(mem, 1898bv64) == 2bv8); free requires (memory_load8_le(mem, 1899bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 80bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 0bv8); - free requires (memory_load8_le(mem, 69025bv64) == 7bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 0bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1536bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); ensures (((memory_load32_le(mem, $x_addr) == 1bv32) || (memory_load32_le(mem, $x_addr) == 5bv32)) || (memory_load32_le(mem, $x_addr) == 6bv32)); free ensures (memory_load8_le(mem, 1896bv64) == 1bv8); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var x_old: bv32; lmain: @@ -204,3 +118,4 @@ procedure main() assume {:captureState "%000001c5"} true; return; } + diff --git a/src/test/correct/basic_assign_increment/gcc_no_plt_no_pic/basic_assign_increment.expected b/src/test/correct/basic_assign_increment/gcc_no_plt_no_pic/basic_assign_increment.expected index 01ec2e5fb..d4bf3b846 100644 --- a/src/test/correct/basic_assign_increment/gcc_no_plt_no_pic/basic_assign_increment.expected +++ b/src/test/correct/basic_assign_increment/gcc_no_plt_no_pic/basic_assign_increment.expected @@ -24,6 +24,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -41,150 +45,60 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1869bv64) == 0bv8); free ensures (memory_load8_le(mem, 1870bv64) == 2bv8); free ensures (memory_load8_le(mem, 1871bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))) || (memory_load32_le(mem, $x_addr) == 5bv32)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) || (memory_load32_le(mem, $x_addr) == 5bv32)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) || (memory_load32_le(mem, $x_addr) == 1bv32)) || (memory_load32_le(mem, $x_addr) == 6bv32)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; requires (memory_load32_le(mem, $x_addr) == 0bv32); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1868bv64) == 1bv8); free requires (memory_load8_le(mem, 1869bv64) == 0bv8); free requires (memory_load8_le(mem, 1870bv64) == 2bv8); free requires (memory_load8_le(mem, 1871bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); ensures (((memory_load32_le(mem, $x_addr) == 1bv32) || (memory_load32_le(mem, $x_addr) == 5bv32)) || (memory_load32_le(mem, $x_addr) == 6bv32)); free ensures (memory_load8_le(mem, 1868bv64) == 1bv8); free ensures (memory_load8_le(mem, 1869bv64) == 0bv8); free ensures (memory_load8_le(mem, 1870bv64) == 2bv8); free ensures (memory_load8_le(mem, 1871bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var x_old: bv32; lmain: @@ -205,3 +119,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/basic_assign_increment/gcc_pic/basic_assign_increment.expected b/src/test/correct/basic_assign_increment/gcc_pic/basic_assign_increment.expected index 0f73e2bfe..227c5dffc 100644 --- a/src/test/correct/basic_assign_increment/gcc_pic/basic_assign_increment.expected +++ b/src/test/correct/basic_assign_increment/gcc_pic/basic_assign_increment.expected @@ -49,174 +49,63 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1933bv64) == 0bv8); free ensures (memory_load8_le(mem, 1934bv64) == 2bv8); free ensures (memory_load8_le(mem, 1935bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69600bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69601bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69602bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69603bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69604bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69605bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69606bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69607bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69600bv64) == 69652bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1872bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))) || (memory_load32_le(mem, $x_addr) == 5bv32)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) || (memory_load32_le(mem, $x_addr) == 5bv32)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) || (memory_load32_le(mem, $x_addr) == 1bv32)) || (memory_load32_le(mem, $x_addr) == 6bv32)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; requires (memory_load32_le(mem, $x_addr) == 0bv32); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1932bv64) == 1bv8); free requires (memory_load8_le(mem, 1933bv64) == 0bv8); free requires (memory_load8_le(mem, 1934bv64) == 2bv8); free requires (memory_load8_le(mem, 1935bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 84bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 0bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69600bv64) == 20bv8); - free requires (memory_load8_le(mem, 69601bv64) == 16bv8); - free requires (memory_load8_le(mem, 69602bv64) == 1bv8); - free requires (memory_load8_le(mem, 69603bv64) == 0bv8); - free requires (memory_load8_le(mem, 69604bv64) == 0bv8); - free requires (memory_load8_le(mem, 69605bv64) == 0bv8); - free requires (memory_load8_le(mem, 69606bv64) == 0bv8); - free requires (memory_load8_le(mem, 69607bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 80bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69016bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69600bv64) == 69652bv64); + free requires (memory_load64_le(mem, 69008bv64) == 1872bv64); ensures (((memory_load32_le(mem, $x_addr) == 1bv32) || (memory_load32_le(mem, $x_addr) == 5bv32)) || (memory_load32_le(mem, $x_addr) == 6bv32)); free ensures (memory_load8_le(mem, 1932bv64) == 1bv8); free ensures (memory_load8_le(mem, 1933bv64) == 0bv8); free ensures (memory_load8_le(mem, 1934bv64) == 2bv8); free ensures (memory_load8_le(mem, 1935bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69600bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69601bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69602bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69603bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69604bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69605bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69606bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69607bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69600bv64) == 69652bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1872bv64); + +implementation main() { var x_old: bv32; lmain: @@ -239,3 +128,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/basic_function_call_caller/clang/basic_function_call_caller.expected b/src/test/correct/basic_function_call_caller/clang/basic_function_call_caller.expected index 6c8610d8c..f7b4a805a 100644 --- a/src/test/correct/basic_function_call_caller/clang/basic_function_call_caller.expected +++ b/src/test/correct/basic_function_call_caller/clang/basic_function_call_caller.expected @@ -69,116 +69,52 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 28bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1820bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))); ensures (memory_load32_le(mem, $y_addr) == old(memory_load32_le(mem, $y_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)); assert (memory_load32_le(mem, $y_addr) == memory_load32_le(mem, $y_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $x_addr) == 0bv32) ==> (memory_load32_le(mem, $x_addr) == 0bv32)); assert (gamma_load32(Gamma_mem, $y_addr) ==> ((memory_load32_le(mem, $x_addr) == 0bv32) || gamma_load32(Gamma_mem, $y_addr))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R29, R30, R31, R8, R9, mem, stack; requires (Gamma_R0 == false); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1896bv64) == 1bv8); free requires (memory_load8_le(mem, 1897bv64) == 0bv8); free requires (memory_load8_le(mem, 1898bv64) == 2bv8); free requires (memory_load8_le(mem, 1899bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 28bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1820bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -187,38 +123,12 @@ procedure main() free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 28bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1820bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var #4: bv64; var #5: bv64; @@ -271,84 +181,31 @@ procedure main() return; } -procedure zero() +procedure zero(); modifies Gamma_R0, R0; free requires (memory_load8_le(mem, 1896bv64) == 1bv8); free requires (memory_load8_le(mem, 1897bv64) == 0bv8); free requires (memory_load8_le(mem, 1898bv64) == 2bv8); free requires (memory_load8_le(mem, 1899bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 28bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1820bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); ensures ((R0[32:0] == 0bv32) && Gamma_R0); free ensures (memory_load8_le(mem, 1896bv64) == 1bv8); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 28bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1820bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation zero() { lzero: assume {:captureState "lzero"} true; R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/basic_function_call_caller/clang_O2/basic_function_call_caller.expected b/src/test/correct/basic_function_call_caller/clang_O2/basic_function_call_caller.expected index 74d7abc58..f0ffa441b 100644 --- a/src/test/correct/basic_function_call_caller/clang_O2/basic_function_call_caller.expected +++ b/src/test/correct/basic_function_call_caller/clang_O2/basic_function_call_caller.expected @@ -29,6 +29,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -47,152 +51,62 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1869bv64) == 0bv8); free ensures (memory_load8_le(mem, 1870bv64) == 2bv8); free ensures (memory_load8_le(mem, 1871bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 28bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1820bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))); ensures (memory_load32_le(mem, $y_addr) == old(memory_load32_le(mem, $y_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)); assert (memory_load32_le(mem, $y_addr) == memory_load32_le(mem, $y_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $x_addr) == 0bv32) ==> (memory_load32_le(mem, $x_addr) == 0bv32)); assert (gamma_load32(Gamma_mem, $y_addr) ==> ((memory_load32_le(mem, $x_addr) == 0bv32) || gamma_load32(Gamma_mem, $y_addr))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R10, Gamma_R8, Gamma_R9, Gamma_mem, R0, R10, R8, R9, mem; requires (Gamma_R0 == false); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1868bv64) == 1bv8); free requires (memory_load8_le(mem, 1869bv64) == 0bv8); free requires (memory_load8_le(mem, 1870bv64) == 2bv8); free requires (memory_load8_le(mem, 1871bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 28bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1820bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (memory_load8_le(mem, 1868bv64) == 1bv8); free ensures (memory_load8_le(mem, 1869bv64) == 0bv8); free ensures (memory_load8_le(mem, 1870bv64) == 2bv8); free ensures (memory_load8_le(mem, 1871bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 28bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1820bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var Gamma_y_old: bool; var x_old: bv32; @@ -222,3 +136,4 @@ procedure main() assume {:captureState "%000002fa"} true; return; } + diff --git a/src/test/correct/basic_function_call_caller/clang_no_plt_no_pic/basic_function_call_caller.expected b/src/test/correct/basic_function_call_caller/clang_no_plt_no_pic/basic_function_call_caller.expected index 04a6a5d25..2520dda04 100644 --- a/src/test/correct/basic_function_call_caller/clang_no_plt_no_pic/basic_function_call_caller.expected +++ b/src/test/correct/basic_function_call_caller/clang_no_plt_no_pic/basic_function_call_caller.expected @@ -69,116 +69,52 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 28bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1820bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))); ensures (memory_load32_le(mem, $y_addr) == old(memory_load32_le(mem, $y_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)); assert (memory_load32_le(mem, $y_addr) == memory_load32_le(mem, $y_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $x_addr) == 0bv32) ==> (memory_load32_le(mem, $x_addr) == 0bv32)); assert (gamma_load32(Gamma_mem, $y_addr) ==> ((memory_load32_le(mem, $x_addr) == 0bv32) || gamma_load32(Gamma_mem, $y_addr))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R29, R30, R31, R8, R9, mem, stack; requires (Gamma_R0 == false); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1896bv64) == 1bv8); free requires (memory_load8_le(mem, 1897bv64) == 0bv8); free requires (memory_load8_le(mem, 1898bv64) == 2bv8); free requires (memory_load8_le(mem, 1899bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 28bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1820bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -187,38 +123,12 @@ procedure main() free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 28bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1820bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var #4: bv64; var #5: bv64; @@ -271,84 +181,31 @@ procedure main() return; } -procedure zero() +procedure zero(); modifies Gamma_R0, R0; free requires (memory_load8_le(mem, 1896bv64) == 1bv8); free requires (memory_load8_le(mem, 1897bv64) == 0bv8); free requires (memory_load8_le(mem, 1898bv64) == 2bv8); free requires (memory_load8_le(mem, 1899bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 28bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1820bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); ensures ((R0[32:0] == 0bv32) && Gamma_R0); free ensures (memory_load8_le(mem, 1896bv64) == 1bv8); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 28bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1820bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation zero() { lzero: assume {:captureState "lzero"} true; R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/basic_function_call_caller/clang_pic/basic_function_call_caller.expected b/src/test/correct/basic_function_call_caller/clang_pic/basic_function_call_caller.expected index 861158d4a..35abd32f8 100644 --- a/src/test/correct/basic_function_call_caller/clang_pic/basic_function_call_caller.expected +++ b/src/test/correct/basic_function_call_caller/clang_pic/basic_function_call_caller.expected @@ -69,148 +69,56 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1969bv64) == 0bv8); free ensures (memory_load8_le(mem, 1970bv64) == 2bv8); free ensures (memory_load8_le(mem, 1971bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69584bv64) == 56bv8); - free ensures (memory_load8_le(mem, 69585bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69586bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69587bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69588bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69589bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69590bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69591bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69048bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69049bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69050bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69051bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69052bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69053bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69054bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69055bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69568bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69569bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69570bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69571bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69572bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69573bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69574bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69575bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 92bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69584bv64) == 69688bv64); + free ensures (memory_load64_le(mem, 69048bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69568bv64) == 69684bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1884bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1792bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))); ensures (memory_load32_le(mem, $y_addr) == old(memory_load32_le(mem, $y_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)); assert (memory_load32_le(mem, $y_addr) == memory_load32_le(mem, $y_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $x_addr) == 0bv32) ==> (memory_load32_le(mem, $x_addr) == 0bv32)); assert (gamma_load32(Gamma_mem, $y_addr) ==> ((memory_load32_le(mem, $x_addr) == 0bv32) || gamma_load32(Gamma_mem, $y_addr))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R29, R30, R31, R8, R9, mem, stack; requires (Gamma_R0 == false); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1968bv64) == 1bv8); free requires (memory_load8_le(mem, 1969bv64) == 0bv8); free requires (memory_load8_le(mem, 1970bv64) == 2bv8); free requires (memory_load8_le(mem, 1971bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); - free requires (memory_load8_le(mem, 69584bv64) == 56bv8); - free requires (memory_load8_le(mem, 69585bv64) == 16bv8); - free requires (memory_load8_le(mem, 69586bv64) == 1bv8); - free requires (memory_load8_le(mem, 69587bv64) == 0bv8); - free requires (memory_load8_le(mem, 69588bv64) == 0bv8); - free requires (memory_load8_le(mem, 69589bv64) == 0bv8); - free requires (memory_load8_le(mem, 69590bv64) == 0bv8); - free requires (memory_load8_le(mem, 69591bv64) == 0bv8); - free requires (memory_load8_le(mem, 69048bv64) == 80bv8); - free requires (memory_load8_le(mem, 69049bv64) == 7bv8); - free requires (memory_load8_le(mem, 69050bv64) == 0bv8); - free requires (memory_load8_le(mem, 69051bv64) == 0bv8); - free requires (memory_load8_le(mem, 69052bv64) == 0bv8); - free requires (memory_load8_le(mem, 69053bv64) == 0bv8); - free requires (memory_load8_le(mem, 69054bv64) == 0bv8); - free requires (memory_load8_le(mem, 69055bv64) == 0bv8); - free requires (memory_load8_le(mem, 69568bv64) == 52bv8); - free requires (memory_load8_le(mem, 69569bv64) == 16bv8); - free requires (memory_load8_le(mem, 69570bv64) == 1bv8); - free requires (memory_load8_le(mem, 69571bv64) == 0bv8); - free requires (memory_load8_le(mem, 69572bv64) == 0bv8); - free requires (memory_load8_le(mem, 69573bv64) == 0bv8); - free requires (memory_load8_le(mem, 69574bv64) == 0bv8); - free requires (memory_load8_le(mem, 69575bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 92bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69056bv64) == 0bv8); - free requires (memory_load8_le(mem, 69057bv64) == 7bv8); - free requires (memory_load8_le(mem, 69058bv64) == 0bv8); - free requires (memory_load8_le(mem, 69059bv64) == 0bv8); - free requires (memory_load8_le(mem, 69060bv64) == 0bv8); - free requires (memory_load8_le(mem, 69061bv64) == 0bv8); - free requires (memory_load8_le(mem, 69062bv64) == 0bv8); - free requires (memory_load8_le(mem, 69063bv64) == 0bv8); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); + free requires (memory_load64_le(mem, 69584bv64) == 69688bv64); + free requires (memory_load64_le(mem, 69048bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69568bv64) == 69684bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1884bv64); + free requires (memory_load64_le(mem, 69056bv64) == 1792bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -219,54 +127,14 @@ procedure main() free ensures (memory_load8_le(mem, 1969bv64) == 0bv8); free ensures (memory_load8_le(mem, 1970bv64) == 2bv8); free ensures (memory_load8_le(mem, 1971bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69584bv64) == 56bv8); - free ensures (memory_load8_le(mem, 69585bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69586bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69587bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69588bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69589bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69590bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69591bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69048bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69049bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69050bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69051bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69052bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69053bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69054bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69055bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69568bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69569bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69570bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69571bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69572bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69573bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69574bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69575bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 92bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69584bv64) == 69688bv64); + free ensures (memory_load64_le(mem, 69048bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69568bv64) == 69684bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1884bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1792bv64); + +implementation main() { var #4: bv64; var #5: bv64; @@ -323,116 +191,35 @@ procedure main() return; } -procedure zero() +procedure zero(); modifies Gamma_R0, R0; free requires (memory_load8_le(mem, 1968bv64) == 1bv8); free requires (memory_load8_le(mem, 1969bv64) == 0bv8); free requires (memory_load8_le(mem, 1970bv64) == 2bv8); free requires (memory_load8_le(mem, 1971bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); - free requires (memory_load8_le(mem, 69584bv64) == 56bv8); - free requires (memory_load8_le(mem, 69585bv64) == 16bv8); - free requires (memory_load8_le(mem, 69586bv64) == 1bv8); - free requires (memory_load8_le(mem, 69587bv64) == 0bv8); - free requires (memory_load8_le(mem, 69588bv64) == 0bv8); - free requires (memory_load8_le(mem, 69589bv64) == 0bv8); - free requires (memory_load8_le(mem, 69590bv64) == 0bv8); - free requires (memory_load8_le(mem, 69591bv64) == 0bv8); - free requires (memory_load8_le(mem, 69048bv64) == 80bv8); - free requires (memory_load8_le(mem, 69049bv64) == 7bv8); - free requires (memory_load8_le(mem, 69050bv64) == 0bv8); - free requires (memory_load8_le(mem, 69051bv64) == 0bv8); - free requires (memory_load8_le(mem, 69052bv64) == 0bv8); - free requires (memory_load8_le(mem, 69053bv64) == 0bv8); - free requires (memory_load8_le(mem, 69054bv64) == 0bv8); - free requires (memory_load8_le(mem, 69055bv64) == 0bv8); - free requires (memory_load8_le(mem, 69568bv64) == 52bv8); - free requires (memory_load8_le(mem, 69569bv64) == 16bv8); - free requires (memory_load8_le(mem, 69570bv64) == 1bv8); - free requires (memory_load8_le(mem, 69571bv64) == 0bv8); - free requires (memory_load8_le(mem, 69572bv64) == 0bv8); - free requires (memory_load8_le(mem, 69573bv64) == 0bv8); - free requires (memory_load8_le(mem, 69574bv64) == 0bv8); - free requires (memory_load8_le(mem, 69575bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 92bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69056bv64) == 0bv8); - free requires (memory_load8_le(mem, 69057bv64) == 7bv8); - free requires (memory_load8_le(mem, 69058bv64) == 0bv8); - free requires (memory_load8_le(mem, 69059bv64) == 0bv8); - free requires (memory_load8_le(mem, 69060bv64) == 0bv8); - free requires (memory_load8_le(mem, 69061bv64) == 0bv8); - free requires (memory_load8_le(mem, 69062bv64) == 0bv8); - free requires (memory_load8_le(mem, 69063bv64) == 0bv8); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); + free requires (memory_load64_le(mem, 69584bv64) == 69688bv64); + free requires (memory_load64_le(mem, 69048bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69568bv64) == 69684bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1884bv64); + free requires (memory_load64_le(mem, 69056bv64) == 1792bv64); ensures ((R0[32:0] == 0bv32) && Gamma_R0); free ensures (memory_load8_le(mem, 1968bv64) == 1bv8); free ensures (memory_load8_le(mem, 1969bv64) == 0bv8); free ensures (memory_load8_le(mem, 1970bv64) == 2bv8); free ensures (memory_load8_le(mem, 1971bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69584bv64) == 56bv8); - free ensures (memory_load8_le(mem, 69585bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69586bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69587bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69588bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69589bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69590bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69591bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69048bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69049bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69050bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69051bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69052bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69053bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69054bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69055bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69568bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69569bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69570bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69571bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69572bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69573bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69574bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69575bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 92bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69584bv64) == 69688bv64); + free ensures (memory_load64_le(mem, 69048bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69568bv64) == 69684bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1884bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1792bv64); + +implementation zero() { lzero: assume {:captureState "lzero"} true; R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/basic_function_call_caller/gcc/basic_function_call_caller.expected b/src/test/correct/basic_function_call_caller/gcc/basic_function_call_caller.expected index d350182f1..5ba0d1baf 100644 --- a/src/test/correct/basic_function_call_caller/gcc/basic_function_call_caller.expected +++ b/src/test/correct/basic_function_call_caller/gcc/basic_function_call_caller.expected @@ -67,116 +67,52 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1901bv64) == 0bv8); free ensures (memory_load8_le(mem, 1902bv64) == 2bv8); free ensures (memory_load8_le(mem, 1903bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 28bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1820bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))); ensures (memory_load32_le(mem, $y_addr) == old(memory_load32_le(mem, $y_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)); assert (memory_load32_le(mem, $y_addr) == memory_load32_le(mem, $y_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $x_addr) == 0bv32) ==> (memory_load32_le(mem, $x_addr) == 0bv32)); assert (gamma_load32(Gamma_mem, $y_addr) ==> ((memory_load32_le(mem, $x_addr) == 0bv32) || gamma_load32(Gamma_mem, $y_addr))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R29, R30, R31, mem, stack; requires (Gamma_R0 == false); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1900bv64) == 1bv8); free requires (memory_load8_le(mem, 1901bv64) == 0bv8); free requires (memory_load8_le(mem, 1902bv64) == 2bv8); free requires (memory_load8_le(mem, 1903bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 28bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1820bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -185,38 +121,12 @@ procedure main() free ensures (memory_load8_le(mem, 1901bv64) == 0bv8); free ensures (memory_load8_le(mem, 1902bv64) == 2bv8); free ensures (memory_load8_le(mem, 1903bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 28bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1820bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv64; var Gamma_#4: bool; @@ -269,84 +179,31 @@ procedure main() return; } -procedure zero() +procedure zero(); modifies Gamma_R0, R0; free requires (memory_load8_le(mem, 1900bv64) == 1bv8); free requires (memory_load8_le(mem, 1901bv64) == 0bv8); free requires (memory_load8_le(mem, 1902bv64) == 2bv8); free requires (memory_load8_le(mem, 1903bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 28bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1820bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); ensures ((R0[32:0] == 0bv32) && Gamma_R0); free ensures (memory_load8_le(mem, 1900bv64) == 1bv8); free ensures (memory_load8_le(mem, 1901bv64) == 0bv8); free ensures (memory_load8_le(mem, 1902bv64) == 2bv8); free ensures (memory_load8_le(mem, 1903bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 28bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1820bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation zero() { lzero: assume {:captureState "lzero"} true; R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/basic_function_call_caller/gcc_O2/basic_function_call_caller.expected b/src/test/correct/basic_function_call_caller/gcc_O2/basic_function_call_caller.expected index 0d135f9f8..0f4323cd4 100644 --- a/src/test/correct/basic_function_call_caller/gcc_O2/basic_function_call_caller.expected +++ b/src/test/correct/basic_function_call_caller/gcc_O2/basic_function_call_caller.expected @@ -29,6 +29,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -47,152 +51,62 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1917bv64) == 0bv8); free ensures (memory_load8_le(mem, 1918bv64) == 2bv8); free ensures (memory_load8_le(mem, 1919bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))); ensures (memory_load32_le(mem, $y_addr) == old(memory_load32_le(mem, $y_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)); assert (memory_load32_le(mem, $y_addr) == memory_load32_le(mem, $y_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $x_addr) == 0bv32) ==> (memory_load32_le(mem, $x_addr) == 0bv32)); assert (gamma_load32(Gamma_mem, $y_addr) ==> ((memory_load32_le(mem, $x_addr) == 0bv32) || gamma_load32(Gamma_mem, $y_addr))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R2, Gamma_R3, Gamma_mem, R0, R1, R2, R3, mem; requires (Gamma_R0 == false); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1916bv64) == 1bv8); free requires (memory_load8_le(mem, 1917bv64) == 0bv8); free requires (memory_load8_le(mem, 1918bv64) == 2bv8); free requires (memory_load8_le(mem, 1919bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 80bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 0bv8); - free requires (memory_load8_le(mem, 69025bv64) == 7bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 0bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1536bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1916bv64) == 1bv8); free ensures (memory_load8_le(mem, 1917bv64) == 0bv8); free ensures (memory_load8_le(mem, 1918bv64) == 2bv8); free ensures (memory_load8_le(mem, 1919bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var Gamma_y_old: bool; var x_old: bv32; @@ -222,3 +136,4 @@ procedure main() assume {:captureState "%000001df"} true; return; } + diff --git a/src/test/correct/basic_function_call_caller/gcc_no_plt_no_pic/basic_function_call_caller.expected b/src/test/correct/basic_function_call_caller/gcc_no_plt_no_pic/basic_function_call_caller.expected index 39a811b3e..5a1961394 100644 --- a/src/test/correct/basic_function_call_caller/gcc_no_plt_no_pic/basic_function_call_caller.expected +++ b/src/test/correct/basic_function_call_caller/gcc_no_plt_no_pic/basic_function_call_caller.expected @@ -67,116 +67,52 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1901bv64) == 0bv8); free ensures (memory_load8_le(mem, 1902bv64) == 2bv8); free ensures (memory_load8_le(mem, 1903bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 28bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1820bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))); ensures (memory_load32_le(mem, $y_addr) == old(memory_load32_le(mem, $y_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)); assert (memory_load32_le(mem, $y_addr) == memory_load32_le(mem, $y_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $x_addr) == 0bv32) ==> (memory_load32_le(mem, $x_addr) == 0bv32)); assert (gamma_load32(Gamma_mem, $y_addr) ==> ((memory_load32_le(mem, $x_addr) == 0bv32) || gamma_load32(Gamma_mem, $y_addr))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R29, R30, R31, mem, stack; requires (Gamma_R0 == false); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1900bv64) == 1bv8); free requires (memory_load8_le(mem, 1901bv64) == 0bv8); free requires (memory_load8_le(mem, 1902bv64) == 2bv8); free requires (memory_load8_le(mem, 1903bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 28bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1820bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -185,38 +121,12 @@ procedure main() free ensures (memory_load8_le(mem, 1901bv64) == 0bv8); free ensures (memory_load8_le(mem, 1902bv64) == 2bv8); free ensures (memory_load8_le(mem, 1903bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 28bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1820bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv64; var Gamma_#4: bool; @@ -269,84 +179,31 @@ procedure main() return; } -procedure zero() +procedure zero(); modifies Gamma_R0, R0; free requires (memory_load8_le(mem, 1900bv64) == 1bv8); free requires (memory_load8_le(mem, 1901bv64) == 0bv8); free requires (memory_load8_le(mem, 1902bv64) == 2bv8); free requires (memory_load8_le(mem, 1903bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 28bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1820bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); ensures ((R0[32:0] == 0bv32) && Gamma_R0); free ensures (memory_load8_le(mem, 1900bv64) == 1bv8); free ensures (memory_load8_le(mem, 1901bv64) == 0bv8); free ensures (memory_load8_le(mem, 1902bv64) == 2bv8); free ensures (memory_load8_le(mem, 1903bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 28bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1820bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation zero() { lzero: assume {:captureState "lzero"} true; R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/basic_function_call_caller/gcc_pic/basic_function_call_caller.expected b/src/test/correct/basic_function_call_caller/gcc_pic/basic_function_call_caller.expected index 75e7e00b2..82a5d1bc0 100644 --- a/src/test/correct/basic_function_call_caller/gcc_pic/basic_function_call_caller.expected +++ b/src/test/correct/basic_function_call_caller/gcc_pic/basic_function_call_caller.expected @@ -67,148 +67,56 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1965bv64) == 0bv8); free ensures (memory_load8_le(mem, 1966bv64) == 2bv8); free ensures (memory_load8_le(mem, 1967bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69608bv64) == 24bv8); - free ensures (memory_load8_le(mem, 69609bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69610bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69611bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69612bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69613bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69614bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69615bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 92bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69608bv64) == 69656bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1884bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 69652bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1872bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))); ensures (memory_load32_le(mem, $y_addr) == old(memory_load32_le(mem, $y_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)); assert (memory_load32_le(mem, $y_addr) == memory_load32_le(mem, $y_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $x_addr) == 0bv32) ==> (memory_load32_le(mem, $x_addr) == 0bv32)); assert (gamma_load32(Gamma_mem, $y_addr) ==> ((memory_load32_le(mem, $x_addr) == 0bv32) || gamma_load32(Gamma_mem, $y_addr))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R29, R30, R31, mem, stack; requires (Gamma_R0 == false); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1964bv64) == 1bv8); free requires (memory_load8_le(mem, 1965bv64) == 0bv8); free requires (memory_load8_le(mem, 1966bv64) == 2bv8); free requires (memory_load8_le(mem, 1967bv64) == 0bv8); - free requires (memory_load8_le(mem, 69608bv64) == 24bv8); - free requires (memory_load8_le(mem, 69609bv64) == 16bv8); - free requires (memory_load8_le(mem, 69610bv64) == 1bv8); - free requires (memory_load8_le(mem, 69611bv64) == 0bv8); - free requires (memory_load8_le(mem, 69612bv64) == 0bv8); - free requires (memory_load8_le(mem, 69613bv64) == 0bv8); - free requires (memory_load8_le(mem, 69614bv64) == 0bv8); - free requires (memory_load8_le(mem, 69615bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 92bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 0bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 16bv8); - free requires (memory_load8_le(mem, 69594bv64) == 1bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 80bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); + free requires (memory_load64_le(mem, 69608bv64) == 69656bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1884bv64); + free requires (memory_load64_le(mem, 69008bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69592bv64) == 69652bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1872bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -217,54 +125,14 @@ procedure main() free ensures (memory_load8_le(mem, 1965bv64) == 0bv8); free ensures (memory_load8_le(mem, 1966bv64) == 2bv8); free ensures (memory_load8_le(mem, 1967bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69608bv64) == 24bv8); - free ensures (memory_load8_le(mem, 69609bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69610bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69611bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69612bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69613bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69614bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69615bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 92bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69608bv64) == 69656bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1884bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 69652bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1872bv64); + +implementation main() { var #4: bv64; var Gamma_#4: bool; @@ -319,116 +187,35 @@ procedure main() return; } -procedure zero() +procedure zero(); modifies Gamma_R0, R0; free requires (memory_load8_le(mem, 1964bv64) == 1bv8); free requires (memory_load8_le(mem, 1965bv64) == 0bv8); free requires (memory_load8_le(mem, 1966bv64) == 2bv8); free requires (memory_load8_le(mem, 1967bv64) == 0bv8); - free requires (memory_load8_le(mem, 69608bv64) == 24bv8); - free requires (memory_load8_le(mem, 69609bv64) == 16bv8); - free requires (memory_load8_le(mem, 69610bv64) == 1bv8); - free requires (memory_load8_le(mem, 69611bv64) == 0bv8); - free requires (memory_load8_le(mem, 69612bv64) == 0bv8); - free requires (memory_load8_le(mem, 69613bv64) == 0bv8); - free requires (memory_load8_le(mem, 69614bv64) == 0bv8); - free requires (memory_load8_le(mem, 69615bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 92bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 0bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 16bv8); - free requires (memory_load8_le(mem, 69594bv64) == 1bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 80bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); + free requires (memory_load64_le(mem, 69608bv64) == 69656bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1884bv64); + free requires (memory_load64_le(mem, 69008bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69592bv64) == 69652bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1872bv64); ensures ((R0[32:0] == 0bv32) && Gamma_R0); free ensures (memory_load8_le(mem, 1964bv64) == 1bv8); free ensures (memory_load8_le(mem, 1965bv64) == 0bv8); free ensures (memory_load8_le(mem, 1966bv64) == 2bv8); free ensures (memory_load8_le(mem, 1967bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69608bv64) == 24bv8); - free ensures (memory_load8_le(mem, 69609bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69610bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69611bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69612bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69613bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69614bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69615bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 92bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69608bv64) == 69656bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1884bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 69652bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1872bv64); + +implementation zero() { lzero: assume {:captureState "lzero"} true; R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/basic_function_call_reader/clang/basic_function_call_reader.expected b/src/test/correct/basic_function_call_reader/clang/basic_function_call_reader.expected index e7add125d..b061e6446 100644 --- a/src/test/correct/basic_function_call_reader/clang/basic_function_call_reader.expected +++ b/src/test/correct/basic_function_call_reader/clang/basic_function_call_reader.expected @@ -35,6 +35,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -55,153 +59,63 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1909bv64) == 0bv8); free ensures (memory_load8_le(mem, 1910bv64) == 2bv8); free ensures (memory_load8_le(mem, 1911bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((old(memory_load32_le(mem, $x_addr)) == 0bv32) ==> (memory_load32_le(mem, $x_addr) == 0bv32)); ensures (old(gamma_load32(Gamma_mem, $y_addr)) ==> ((memory_load32_le(mem, $x_addr) == 0bv32) || gamma_load32(Gamma_mem, $y_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $x_addr) == 0bv32) ==> (memory_load32_le(mem, $x_addr) == 0bv32)); assert (gamma_load32(Gamma_mem, $y_addr) ==> ((memory_load32_le(mem, $x_addr) == 0bv32) || gamma_load32(Gamma_mem, $y_addr))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)); assert (memory_load32_le(mem, $y_addr) == memory_load32_le(mem, $y_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_mem, Gamma_stack, R0, R31, R8, mem, stack; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1908bv64) == 1bv8); free requires (memory_load8_le(mem, 1909bv64) == 0bv8); free requires (memory_load8_le(mem, 1910bv64) == 2bv8); free requires (memory_load8_le(mem, 1911bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1908bv64) == 1bv8); free ensures (memory_load8_le(mem, 1909bv64) == 0bv8); free ensures (memory_load8_le(mem, 1910bv64) == 2bv8); free ensures (memory_load8_le(mem, 1911bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -282,3 +196,4 @@ procedure main() assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l0000037a; } + diff --git a/src/test/correct/basic_function_call_reader/clang_O2/basic_function_call_reader.expected b/src/test/correct/basic_function_call_reader/clang_O2/basic_function_call_reader.expected index 49025abea..17422fd8f 100644 --- a/src/test/correct/basic_function_call_reader/clang_O2/basic_function_call_reader.expected +++ b/src/test/correct/basic_function_call_reader/clang_O2/basic_function_call_reader.expected @@ -29,6 +29,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -45,151 +49,61 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1861bv64) == 0bv8); free ensures (memory_load8_le(mem, 1862bv64) == 2bv8); free ensures (memory_load8_le(mem, 1863bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((old(memory_load32_le(mem, $x_addr)) == 0bv32) ==> (memory_load32_le(mem, $x_addr) == 0bv32)); ensures (old(gamma_load32(Gamma_mem, $y_addr)) ==> ((memory_load32_le(mem, $x_addr) == 0bv32) || gamma_load32(Gamma_mem, $y_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $x_addr) == 0bv32) ==> (memory_load32_le(mem, $x_addr) == 0bv32)); assert (gamma_load32(Gamma_mem, $y_addr) ==> ((memory_load32_le(mem, $x_addr) == 0bv32) || gamma_load32(Gamma_mem, $y_addr))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)); assert (memory_load32_le(mem, $y_addr) == memory_load32_le(mem, $y_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R8, Gamma_R9, Gamma_mem, R0, R8, R9, mem; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1860bv64) == 1bv8); free requires (memory_load8_le(mem, 1861bv64) == 0bv8); free requires (memory_load8_le(mem, 1862bv64) == 2bv8); free requires (memory_load8_le(mem, 1863bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (memory_load8_le(mem, 1860bv64) == 1bv8); free ensures (memory_load8_le(mem, 1861bv64) == 0bv8); free ensures (memory_load8_le(mem, 1862bv64) == 2bv8); free ensures (memory_load8_le(mem, 1863bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -236,3 +150,4 @@ procedure main() assume (bvcomp1(ZF, 1bv1) == 0bv1); goto l000002fd; } + diff --git a/src/test/correct/basic_function_call_reader/clang_no_plt_no_pic/basic_function_call_reader.expected b/src/test/correct/basic_function_call_reader/clang_no_plt_no_pic/basic_function_call_reader.expected index 80fd49730..1cac520ec 100644 --- a/src/test/correct/basic_function_call_reader/clang_no_plt_no_pic/basic_function_call_reader.expected +++ b/src/test/correct/basic_function_call_reader/clang_no_plt_no_pic/basic_function_call_reader.expected @@ -35,6 +35,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -55,153 +59,63 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1909bv64) == 0bv8); free ensures (memory_load8_le(mem, 1910bv64) == 2bv8); free ensures (memory_load8_le(mem, 1911bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((old(memory_load32_le(mem, $x_addr)) == 0bv32) ==> (memory_load32_le(mem, $x_addr) == 0bv32)); ensures (old(gamma_load32(Gamma_mem, $y_addr)) ==> ((memory_load32_le(mem, $x_addr) == 0bv32) || gamma_load32(Gamma_mem, $y_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $x_addr) == 0bv32) ==> (memory_load32_le(mem, $x_addr) == 0bv32)); assert (gamma_load32(Gamma_mem, $y_addr) ==> ((memory_load32_le(mem, $x_addr) == 0bv32) || gamma_load32(Gamma_mem, $y_addr))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)); assert (memory_load32_le(mem, $y_addr) == memory_load32_le(mem, $y_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_mem, Gamma_stack, R0, R31, R8, mem, stack; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1908bv64) == 1bv8); free requires (memory_load8_le(mem, 1909bv64) == 0bv8); free requires (memory_load8_le(mem, 1910bv64) == 2bv8); free requires (memory_load8_le(mem, 1911bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1908bv64) == 1bv8); free ensures (memory_load8_le(mem, 1909bv64) == 0bv8); free ensures (memory_load8_le(mem, 1910bv64) == 2bv8); free ensures (memory_load8_le(mem, 1911bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -282,3 +196,4 @@ procedure main() assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l000009bd; } + diff --git a/src/test/correct/basic_function_call_reader/clang_pic/basic_function_call_reader.expected b/src/test/correct/basic_function_call_reader/clang_pic/basic_function_call_reader.expected index 4ade8ab46..79f1d9df6 100644 --- a/src/test/correct/basic_function_call_reader/clang_pic/basic_function_call_reader.expected +++ b/src/test/correct/basic_function_call_reader/clang_pic/basic_function_call_reader.expected @@ -63,201 +63,69 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1981bv64) == 0bv8); free ensures (memory_load8_le(mem, 1982bv64) == 2bv8); free ensures (memory_load8_le(mem, 1983bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69584bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69585bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69586bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69587bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69588bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69589bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69590bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69591bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69048bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69049bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69050bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69051bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69052bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69053bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69054bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69055bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69568bv64) == 56bv8); - free ensures (memory_load8_le(mem, 69569bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69570bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69571bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69572bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69573bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69574bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69575bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69584bv64) == 69684bv64); + free ensures (memory_load64_le(mem, 69048bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69568bv64) == 69688bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1792bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((old(memory_load32_le(mem, $x_addr)) == 0bv32) ==> (memory_load32_le(mem, $x_addr) == 0bv32)); ensures (old(gamma_load32(Gamma_mem, $y_addr)) ==> ((memory_load32_le(mem, $x_addr) == 0bv32) || gamma_load32(Gamma_mem, $y_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $x_addr) == 0bv32) ==> (memory_load32_le(mem, $x_addr) == 0bv32)); assert (gamma_load32(Gamma_mem, $y_addr) ==> ((memory_load32_le(mem, $x_addr) == 0bv32) || gamma_load32(Gamma_mem, $y_addr))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)); assert (memory_load32_le(mem, $y_addr) == memory_load32_le(mem, $y_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_mem, Gamma_stack, R0, R31, R8, mem, stack; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1980bv64) == 1bv8); free requires (memory_load8_le(mem, 1981bv64) == 0bv8); free requires (memory_load8_le(mem, 1982bv64) == 2bv8); free requires (memory_load8_le(mem, 1983bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); - free requires (memory_load8_le(mem, 69584bv64) == 52bv8); - free requires (memory_load8_le(mem, 69585bv64) == 16bv8); - free requires (memory_load8_le(mem, 69586bv64) == 1bv8); - free requires (memory_load8_le(mem, 69587bv64) == 0bv8); - free requires (memory_load8_le(mem, 69588bv64) == 0bv8); - free requires (memory_load8_le(mem, 69589bv64) == 0bv8); - free requires (memory_load8_le(mem, 69590bv64) == 0bv8); - free requires (memory_load8_le(mem, 69591bv64) == 0bv8); - free requires (memory_load8_le(mem, 69048bv64) == 80bv8); - free requires (memory_load8_le(mem, 69049bv64) == 7bv8); - free requires (memory_load8_le(mem, 69050bv64) == 0bv8); - free requires (memory_load8_le(mem, 69051bv64) == 0bv8); - free requires (memory_load8_le(mem, 69052bv64) == 0bv8); - free requires (memory_load8_le(mem, 69053bv64) == 0bv8); - free requires (memory_load8_le(mem, 69054bv64) == 0bv8); - free requires (memory_load8_le(mem, 69055bv64) == 0bv8); - free requires (memory_load8_le(mem, 69568bv64) == 56bv8); - free requires (memory_load8_le(mem, 69569bv64) == 16bv8); - free requires (memory_load8_le(mem, 69570bv64) == 1bv8); - free requires (memory_load8_le(mem, 69571bv64) == 0bv8); - free requires (memory_load8_le(mem, 69572bv64) == 0bv8); - free requires (memory_load8_le(mem, 69573bv64) == 0bv8); - free requires (memory_load8_le(mem, 69574bv64) == 0bv8); - free requires (memory_load8_le(mem, 69575bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 84bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69056bv64) == 0bv8); - free requires (memory_load8_le(mem, 69057bv64) == 7bv8); - free requires (memory_load8_le(mem, 69058bv64) == 0bv8); - free requires (memory_load8_le(mem, 69059bv64) == 0bv8); - free requires (memory_load8_le(mem, 69060bv64) == 0bv8); - free requires (memory_load8_le(mem, 69061bv64) == 0bv8); - free requires (memory_load8_le(mem, 69062bv64) == 0bv8); - free requires (memory_load8_le(mem, 69063bv64) == 0bv8); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); + free requires (memory_load64_le(mem, 69584bv64) == 69684bv64); + free requires (memory_load64_le(mem, 69048bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69568bv64) == 69688bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69056bv64) == 1792bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1980bv64) == 1bv8); free ensures (memory_load8_le(mem, 1981bv64) == 0bv8); free ensures (memory_load8_le(mem, 1982bv64) == 2bv8); free ensures (memory_load8_le(mem, 1983bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69584bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69585bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69586bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69587bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69588bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69589bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69590bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69591bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69048bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69049bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69050bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69051bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69052bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69053bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69054bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69055bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69568bv64) == 56bv8); - free ensures (memory_load8_le(mem, 69569bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69570bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69571bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69572bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69573bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69574bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69575bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69584bv64) == 69684bv64); + free ensures (memory_load64_le(mem, 69048bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69568bv64) == 69688bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1792bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -342,3 +210,4 @@ procedure main() assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l00000390; } + diff --git a/src/test/correct/basic_function_call_reader/gcc/basic_function_call_reader.expected b/src/test/correct/basic_function_call_reader/gcc/basic_function_call_reader.expected index f9c7deafc..822dfd0ae 100644 --- a/src/test/correct/basic_function_call_reader/gcc/basic_function_call_reader.expected +++ b/src/test/correct/basic_function_call_reader/gcc/basic_function_call_reader.expected @@ -33,6 +33,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -53,153 +57,63 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1893bv64) == 0bv8); free ensures (memory_load8_le(mem, 1894bv64) == 2bv8); free ensures (memory_load8_le(mem, 1895bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((old(memory_load32_le(mem, $x_addr)) == 0bv32) ==> (memory_load32_le(mem, $x_addr) == 0bv32)); ensures (old(gamma_load32(Gamma_mem, $y_addr)) ==> ((memory_load32_le(mem, $x_addr) == 0bv32) || gamma_load32(Gamma_mem, $y_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $x_addr) == 0bv32) ==> (memory_load32_le(mem, $x_addr) == 0bv32)); assert (gamma_load32(Gamma_mem, $y_addr) ==> ((memory_load32_le(mem, $x_addr) == 0bv32) || gamma_load32(Gamma_mem, $y_addr))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)); assert (memory_load32_le(mem, $y_addr) == memory_load32_le(mem, $y_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_mem, Gamma_stack, R0, R31, mem, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1892bv64) == 1bv8); free requires (memory_load8_le(mem, 1893bv64) == 0bv8); free requires (memory_load8_le(mem, 1894bv64) == 2bv8); free requires (memory_load8_le(mem, 1895bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1892bv64) == 1bv8); free ensures (memory_load8_le(mem, 1893bv64) == 0bv8); free ensures (memory_load8_le(mem, 1894bv64) == 2bv8); free ensures (memory_load8_le(mem, 1895bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -252,3 +166,4 @@ procedure main() assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l00000349; } + diff --git a/src/test/correct/basic_function_call_reader/gcc_O2/basic_function_call_reader.expected b/src/test/correct/basic_function_call_reader/gcc_O2/basic_function_call_reader.expected index ad0366224..9e4dbdf63 100644 --- a/src/test/correct/basic_function_call_reader/gcc_O2/basic_function_call_reader.expected +++ b/src/test/correct/basic_function_call_reader/gcc_O2/basic_function_call_reader.expected @@ -22,6 +22,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -36,151 +40,61 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((old(memory_load32_le(mem, $x_addr)) == 0bv32) ==> (memory_load32_le(mem, $x_addr) == 0bv32)); ensures (old(gamma_load32(Gamma_mem, $y_addr)) ==> ((memory_load32_le(mem, $x_addr) == 0bv32) || gamma_load32(Gamma_mem, $y_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $x_addr) == 0bv32) ==> (memory_load32_le(mem, $x_addr) == 0bv32)); assert (gamma_load32(Gamma_mem, $y_addr) ==> ((memory_load32_le(mem, $x_addr) == 0bv32) || gamma_load32(Gamma_mem, $y_addr))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)); assert (memory_load32_le(mem, $y_addr) == memory_load32_le(mem, $y_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1896bv64) == 1bv8); free requires (memory_load8_le(mem, 1897bv64) == 0bv8); free requires (memory_load8_le(mem, 1898bv64) == 2bv8); free requires (memory_load8_le(mem, 1899bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 80bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 0bv8); - free requires (memory_load8_le(mem, 69025bv64) == 7bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 0bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1536bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1896bv64) == 1bv8); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -207,3 +121,4 @@ procedure main() assume (bvcomp32(R0[32:0], 0bv32) == 0bv1); goto l00000398; } + diff --git a/src/test/correct/basic_function_call_reader/gcc_no_plt_no_pic/basic_function_call_reader.expected b/src/test/correct/basic_function_call_reader/gcc_no_plt_no_pic/basic_function_call_reader.expected index d417cea69..c9203915f 100644 --- a/src/test/correct/basic_function_call_reader/gcc_no_plt_no_pic/basic_function_call_reader.expected +++ b/src/test/correct/basic_function_call_reader/gcc_no_plt_no_pic/basic_function_call_reader.expected @@ -33,6 +33,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -53,153 +57,63 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1893bv64) == 0bv8); free ensures (memory_load8_le(mem, 1894bv64) == 2bv8); free ensures (memory_load8_le(mem, 1895bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((old(memory_load32_le(mem, $x_addr)) == 0bv32) ==> (memory_load32_le(mem, $x_addr) == 0bv32)); ensures (old(gamma_load32(Gamma_mem, $y_addr)) ==> ((memory_load32_le(mem, $x_addr) == 0bv32) || gamma_load32(Gamma_mem, $y_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $x_addr) == 0bv32) ==> (memory_load32_le(mem, $x_addr) == 0bv32)); assert (gamma_load32(Gamma_mem, $y_addr) ==> ((memory_load32_le(mem, $x_addr) == 0bv32) || gamma_load32(Gamma_mem, $y_addr))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)); assert (memory_load32_le(mem, $y_addr) == memory_load32_le(mem, $y_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_mem, Gamma_stack, R0, R31, mem, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1892bv64) == 1bv8); free requires (memory_load8_le(mem, 1893bv64) == 0bv8); free requires (memory_load8_le(mem, 1894bv64) == 2bv8); free requires (memory_load8_le(mem, 1895bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1892bv64) == 1bv8); free ensures (memory_load8_le(mem, 1893bv64) == 0bv8); free ensures (memory_load8_le(mem, 1894bv64) == 2bv8); free ensures (memory_load8_le(mem, 1895bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -252,3 +166,4 @@ procedure main() assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l0000094e; } + diff --git a/src/test/correct/basic_function_call_reader/gcc_pic/basic_function_call_reader.expected b/src/test/correct/basic_function_call_reader/gcc_pic/basic_function_call_reader.expected index 60dcad679..942505785 100644 --- a/src/test/correct/basic_function_call_reader/gcc_pic/basic_function_call_reader.expected +++ b/src/test/correct/basic_function_call_reader/gcc_pic/basic_function_call_reader.expected @@ -61,201 +61,69 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1957bv64) == 0bv8); free ensures (memory_load8_le(mem, 1958bv64) == 2bv8); free ensures (memory_load8_le(mem, 1959bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69608bv64) == 24bv8); - free ensures (memory_load8_le(mem, 69609bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69610bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69611bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69612bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69613bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69614bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69615bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69608bv64) == 69656bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 69652bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1872bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((old(memory_load32_le(mem, $x_addr)) == 0bv32) ==> (memory_load32_le(mem, $x_addr) == 0bv32)); ensures (old(gamma_load32(Gamma_mem, $y_addr)) ==> ((memory_load32_le(mem, $x_addr) == 0bv32) || gamma_load32(Gamma_mem, $y_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $x_addr) == 0bv32) ==> (memory_load32_le(mem, $x_addr) == 0bv32)); assert (gamma_load32(Gamma_mem, $y_addr) ==> ((memory_load32_le(mem, $x_addr) == 0bv32) || gamma_load32(Gamma_mem, $y_addr))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)); assert (memory_load32_le(mem, $y_addr) == memory_load32_le(mem, $y_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_mem, Gamma_stack, R0, R31, mem, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1956bv64) == 1bv8); free requires (memory_load8_le(mem, 1957bv64) == 0bv8); free requires (memory_load8_le(mem, 1958bv64) == 2bv8); free requires (memory_load8_le(mem, 1959bv64) == 0bv8); - free requires (memory_load8_le(mem, 69608bv64) == 24bv8); - free requires (memory_load8_le(mem, 69609bv64) == 16bv8); - free requires (memory_load8_le(mem, 69610bv64) == 1bv8); - free requires (memory_load8_le(mem, 69611bv64) == 0bv8); - free requires (memory_load8_le(mem, 69612bv64) == 0bv8); - free requires (memory_load8_le(mem, 69613bv64) == 0bv8); - free requires (memory_load8_le(mem, 69614bv64) == 0bv8); - free requires (memory_load8_le(mem, 69615bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 84bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 0bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 16bv8); - free requires (memory_load8_le(mem, 69594bv64) == 1bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 80bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); + free requires (memory_load64_le(mem, 69608bv64) == 69656bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69008bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69592bv64) == 69652bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1872bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1956bv64) == 1bv8); free ensures (memory_load8_le(mem, 1957bv64) == 0bv8); free ensures (memory_load8_le(mem, 1958bv64) == 2bv8); free ensures (memory_load8_le(mem, 1959bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69608bv64) == 24bv8); - free ensures (memory_load8_le(mem, 69609bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69610bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69611bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69612bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69613bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69614bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69615bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69608bv64) == 69656bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 69652bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1872bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -310,3 +178,4 @@ procedure main() assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l0000034b; } + diff --git a/src/test/correct/basic_lock_read/clang/basic_lock_read.expected b/src/test/correct/basic_lock_read/clang/basic_lock_read.expected index 9a12d05e8..46b155617 100644 --- a/src/test/correct/basic_lock_read/clang/basic_lock_read.expected +++ b/src/test/correct/basic_lock_read/clang/basic_lock_read.expected @@ -35,6 +35,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -54,112 +58,48 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1901bv64) == 0bv8); free ensures (memory_load8_le(mem, 1902bv64) == 2bv8); free ensures (memory_load8_le(mem, 1903bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((old(memory_load32_le(mem, $z_addr)) == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))) && (memory_load32_le(mem, $z_addr) == old(memory_load32_le(mem, $z_addr))))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $z_addr) == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) && (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_mem, Gamma_stack, R0, R31, R8, mem, stack; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1900bv64) == 1bv8); free requires (memory_load8_le(mem, 1901bv64) == 0bv8); free requires (memory_load8_le(mem, 1902bv64) == 2bv8); free requires (memory_load8_le(mem, 1903bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); ensures (R0[32:0] == 0bv32); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); @@ -167,38 +107,12 @@ procedure main() free ensures (memory_load8_le(mem, 1901bv64) == 0bv8); free ensures (memory_load8_le(mem, 1902bv64) == 2bv8); free ensures (memory_load8_le(mem, 1903bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -280,3 +194,4 @@ procedure main() assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l00000352; } + diff --git a/src/test/correct/basic_lock_read/clang_O2/basic_lock_read.expected b/src/test/correct/basic_lock_read/clang_O2/basic_lock_read.expected index cddb678c2..4be10047d 100644 --- a/src/test/correct/basic_lock_read/clang_O2/basic_lock_read.expected +++ b/src/test/correct/basic_lock_read/clang_O2/basic_lock_read.expected @@ -26,6 +26,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -43,149 +47,59 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1869bv64) == 0bv8); free ensures (memory_load8_le(mem, 1870bv64) == 2bv8); free ensures (memory_load8_le(mem, 1871bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((old(memory_load32_le(mem, $z_addr)) == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))) && (memory_load32_le(mem, $z_addr) == old(memory_load32_le(mem, $z_addr))))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $z_addr) == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) && (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R8, Gamma_mem, R0, R8, mem; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1868bv64) == 1bv8); free requires (memory_load8_le(mem, 1869bv64) == 0bv8); free requires (memory_load8_le(mem, 1870bv64) == 2bv8); free requires (memory_load8_le(mem, 1871bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); ensures (R0[32:0] == 0bv32); free ensures (memory_load8_le(mem, 1868bv64) == 1bv8); free ensures (memory_load8_le(mem, 1869bv64) == 0bv8); free ensures (memory_load8_le(mem, 1870bv64) == 2bv8); free ensures (memory_load8_le(mem, 1871bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var z_old: bv32; lmain: @@ -219,3 +133,4 @@ procedure main() assume (bvcomp32(R8[32:0], 0bv32) == 0bv1); goto l000002f7; } + diff --git a/src/test/correct/basic_lock_read/clang_no_plt_no_pic/basic_lock_read.expected b/src/test/correct/basic_lock_read/clang_no_plt_no_pic/basic_lock_read.expected index 31eb2d168..2af9450e5 100644 --- a/src/test/correct/basic_lock_read/clang_no_plt_no_pic/basic_lock_read.expected +++ b/src/test/correct/basic_lock_read/clang_no_plt_no_pic/basic_lock_read.expected @@ -35,6 +35,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -54,112 +58,48 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1901bv64) == 0bv8); free ensures (memory_load8_le(mem, 1902bv64) == 2bv8); free ensures (memory_load8_le(mem, 1903bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((old(memory_load32_le(mem, $z_addr)) == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))) && (memory_load32_le(mem, $z_addr) == old(memory_load32_le(mem, $z_addr))))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $z_addr) == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) && (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_mem, Gamma_stack, R0, R31, R8, mem, stack; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1900bv64) == 1bv8); free requires (memory_load8_le(mem, 1901bv64) == 0bv8); free requires (memory_load8_le(mem, 1902bv64) == 2bv8); free requires (memory_load8_le(mem, 1903bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); ensures (R0[32:0] == 0bv32); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); @@ -167,38 +107,12 @@ procedure main() free ensures (memory_load8_le(mem, 1901bv64) == 0bv8); free ensures (memory_load8_le(mem, 1902bv64) == 2bv8); free ensures (memory_load8_le(mem, 1903bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -280,3 +194,4 @@ procedure main() assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l0000097d; } + diff --git a/src/test/correct/basic_lock_read/clang_pic/basic_lock_read.expected b/src/test/correct/basic_lock_read/clang_pic/basic_lock_read.expected index e7ccaa507..55e344550 100644 --- a/src/test/correct/basic_lock_read/clang_pic/basic_lock_read.expected +++ b/src/test/correct/basic_lock_read/clang_pic/basic_lock_read.expected @@ -62,144 +62,52 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1973bv64) == 0bv8); free ensures (memory_load8_le(mem, 1974bv64) == 2bv8); free ensures (memory_load8_le(mem, 1975bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69576bv64) == 56bv8); - free ensures (memory_load8_le(mem, 69577bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69578bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69579bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69580bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69581bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69582bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69583bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69048bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69049bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69050bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69051bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69052bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69053bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69054bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69055bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69568bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69569bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69570bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69571bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69572bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69573bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69574bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69575bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69576bv64) == 69688bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69048bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69568bv64) == 69684bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1792bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((old(memory_load32_le(mem, $z_addr)) == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))) && (memory_load32_le(mem, $z_addr) == old(memory_load32_le(mem, $z_addr))))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $z_addr) == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) && (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_mem, Gamma_stack, R0, R31, R8, mem, stack; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1972bv64) == 1bv8); free requires (memory_load8_le(mem, 1973bv64) == 0bv8); free requires (memory_load8_le(mem, 1974bv64) == 2bv8); free requires (memory_load8_le(mem, 1975bv64) == 0bv8); - free requires (memory_load8_le(mem, 69576bv64) == 56bv8); - free requires (memory_load8_le(mem, 69577bv64) == 16bv8); - free requires (memory_load8_le(mem, 69578bv64) == 1bv8); - free requires (memory_load8_le(mem, 69579bv64) == 0bv8); - free requires (memory_load8_le(mem, 69580bv64) == 0bv8); - free requires (memory_load8_le(mem, 69581bv64) == 0bv8); - free requires (memory_load8_le(mem, 69582bv64) == 0bv8); - free requires (memory_load8_le(mem, 69583bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); - free requires (memory_load8_le(mem, 69048bv64) == 80bv8); - free requires (memory_load8_le(mem, 69049bv64) == 7bv8); - free requires (memory_load8_le(mem, 69050bv64) == 0bv8); - free requires (memory_load8_le(mem, 69051bv64) == 0bv8); - free requires (memory_load8_le(mem, 69052bv64) == 0bv8); - free requires (memory_load8_le(mem, 69053bv64) == 0bv8); - free requires (memory_load8_le(mem, 69054bv64) == 0bv8); - free requires (memory_load8_le(mem, 69055bv64) == 0bv8); - free requires (memory_load8_le(mem, 69568bv64) == 52bv8); - free requires (memory_load8_le(mem, 69569bv64) == 16bv8); - free requires (memory_load8_le(mem, 69570bv64) == 1bv8); - free requires (memory_load8_le(mem, 69571bv64) == 0bv8); - free requires (memory_load8_le(mem, 69572bv64) == 0bv8); - free requires (memory_load8_le(mem, 69573bv64) == 0bv8); - free requires (memory_load8_le(mem, 69574bv64) == 0bv8); - free requires (memory_load8_le(mem, 69575bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 84bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69056bv64) == 0bv8); - free requires (memory_load8_le(mem, 69057bv64) == 7bv8); - free requires (memory_load8_le(mem, 69058bv64) == 0bv8); - free requires (memory_load8_le(mem, 69059bv64) == 0bv8); - free requires (memory_load8_le(mem, 69060bv64) == 0bv8); - free requires (memory_load8_le(mem, 69061bv64) == 0bv8); - free requires (memory_load8_le(mem, 69062bv64) == 0bv8); - free requires (memory_load8_le(mem, 69063bv64) == 0bv8); + free requires (memory_load64_le(mem, 69576bv64) == 69688bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); + free requires (memory_load64_le(mem, 69048bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69568bv64) == 69684bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69056bv64) == 1792bv64); ensures (R0[32:0] == 0bv32); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); @@ -207,54 +115,14 @@ procedure main() free ensures (memory_load8_le(mem, 1973bv64) == 0bv8); free ensures (memory_load8_le(mem, 1974bv64) == 2bv8); free ensures (memory_load8_le(mem, 1975bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69576bv64) == 56bv8); - free ensures (memory_load8_le(mem, 69577bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69578bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69579bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69580bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69581bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69582bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69583bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69048bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69049bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69050bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69051bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69052bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69053bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69054bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69055bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69568bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69569bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69570bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69571bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69572bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69573bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69574bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69575bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69576bv64) == 69688bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69048bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69568bv64) == 69684bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1792bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -340,3 +208,4 @@ procedure main() assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l00000361; } + diff --git a/src/test/correct/basic_lock_read/gcc/basic_lock_read.expected b/src/test/correct/basic_lock_read/gcc/basic_lock_read.expected index f3d1f915f..04694eca2 100644 --- a/src/test/correct/basic_lock_read/gcc/basic_lock_read.expected +++ b/src/test/correct/basic_lock_read/gcc/basic_lock_read.expected @@ -33,6 +33,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -52,112 +56,48 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1901bv64) == 0bv8); free ensures (memory_load8_le(mem, 1902bv64) == 2bv8); free ensures (memory_load8_le(mem, 1903bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((old(memory_load32_le(mem, $z_addr)) == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))) && (memory_load32_le(mem, $z_addr) == old(memory_load32_le(mem, $z_addr))))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $z_addr) == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) && (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_mem, Gamma_stack, R0, R31, mem, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1900bv64) == 1bv8); free requires (memory_load8_le(mem, 1901bv64) == 0bv8); free requires (memory_load8_le(mem, 1902bv64) == 2bv8); free requires (memory_load8_le(mem, 1903bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); ensures (R0[32:0] == 0bv32); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); @@ -165,38 +105,12 @@ procedure main() free ensures (memory_load8_le(mem, 1901bv64) == 0bv8); free ensures (memory_load8_le(mem, 1902bv64) == 2bv8); free ensures (memory_load8_le(mem, 1903bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -256,3 +170,4 @@ procedure main() assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l0000033e; } + diff --git a/src/test/correct/basic_lock_read/gcc_O2/basic_lock_read.expected b/src/test/correct/basic_lock_read/gcc_O2/basic_lock_read.expected index 269cc87f0..a5778d8e2 100644 --- a/src/test/correct/basic_lock_read/gcc_O2/basic_lock_read.expected +++ b/src/test/correct/basic_lock_read/gcc_O2/basic_lock_read.expected @@ -27,6 +27,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -44,149 +48,59 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((old(memory_load32_le(mem, $z_addr)) == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))) && (memory_load32_le(mem, $z_addr) == old(memory_load32_le(mem, $z_addr))))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $z_addr) == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) && (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1896bv64) == 1bv8); free requires (memory_load8_le(mem, 1897bv64) == 0bv8); free requires (memory_load8_le(mem, 1898bv64) == 2bv8); free requires (memory_load8_le(mem, 1899bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 80bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 0bv8); - free requires (memory_load8_le(mem, 69025bv64) == 7bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 0bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1536bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); ensures (R0[32:0] == 0bv32); free ensures (memory_load8_le(mem, 1896bv64) == 1bv8); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var z_old: bv32; lmain: @@ -219,3 +133,4 @@ procedure main() assume (bvnot1(bvcomp32(R0[32:0], 0bv32)) == 0bv1); goto l0000039c; } + diff --git a/src/test/correct/basic_lock_read/gcc_no_plt_no_pic/basic_lock_read.expected b/src/test/correct/basic_lock_read/gcc_no_plt_no_pic/basic_lock_read.expected index 9156594f7..013371bd5 100644 --- a/src/test/correct/basic_lock_read/gcc_no_plt_no_pic/basic_lock_read.expected +++ b/src/test/correct/basic_lock_read/gcc_no_plt_no_pic/basic_lock_read.expected @@ -33,6 +33,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -52,112 +56,48 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1901bv64) == 0bv8); free ensures (memory_load8_le(mem, 1902bv64) == 2bv8); free ensures (memory_load8_le(mem, 1903bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((old(memory_load32_le(mem, $z_addr)) == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))) && (memory_load32_le(mem, $z_addr) == old(memory_load32_le(mem, $z_addr))))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $z_addr) == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) && (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_mem, Gamma_stack, R0, R31, mem, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1900bv64) == 1bv8); free requires (memory_load8_le(mem, 1901bv64) == 0bv8); free requires (memory_load8_le(mem, 1902bv64) == 2bv8); free requires (memory_load8_le(mem, 1903bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); ensures (R0[32:0] == 0bv32); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); @@ -165,38 +105,12 @@ procedure main() free ensures (memory_load8_le(mem, 1901bv64) == 0bv8); free ensures (memory_load8_le(mem, 1902bv64) == 2bv8); free ensures (memory_load8_le(mem, 1903bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -256,3 +170,4 @@ procedure main() assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l0000095f; } + diff --git a/src/test/correct/basic_lock_read/gcc_pic/basic_lock_read.expected b/src/test/correct/basic_lock_read/gcc_pic/basic_lock_read.expected index 6146649e8..b0f65f92f 100644 --- a/src/test/correct/basic_lock_read/gcc_pic/basic_lock_read.expected +++ b/src/test/correct/basic_lock_read/gcc_pic/basic_lock_read.expected @@ -60,144 +60,52 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1965bv64) == 0bv8); free ensures (memory_load8_le(mem, 1966bv64) == 2bv8); free ensures (memory_load8_le(mem, 1967bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69600bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69601bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69602bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69603bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69604bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69605bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69606bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69607bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 24bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69600bv64) == 69652bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 69656bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1872bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((old(memory_load32_le(mem, $z_addr)) == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))) && (memory_load32_le(mem, $z_addr) == old(memory_load32_le(mem, $z_addr))))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $z_addr) == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) && (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_mem, Gamma_stack, R0, R31, mem, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1964bv64) == 1bv8); free requires (memory_load8_le(mem, 1965bv64) == 0bv8); free requires (memory_load8_le(mem, 1966bv64) == 2bv8); free requires (memory_load8_le(mem, 1967bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 84bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69600bv64) == 20bv8); - free requires (memory_load8_le(mem, 69601bv64) == 16bv8); - free requires (memory_load8_le(mem, 69602bv64) == 1bv8); - free requires (memory_load8_le(mem, 69603bv64) == 0bv8); - free requires (memory_load8_le(mem, 69604bv64) == 0bv8); - free requires (memory_load8_le(mem, 69605bv64) == 0bv8); - free requires (memory_load8_le(mem, 69606bv64) == 0bv8); - free requires (memory_load8_le(mem, 69607bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 0bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 24bv8); - free requires (memory_load8_le(mem, 69593bv64) == 16bv8); - free requires (memory_load8_le(mem, 69594bv64) == 1bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 80bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69600bv64) == 69652bv64); + free requires (memory_load64_le(mem, 69008bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69592bv64) == 69656bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1872bv64); ensures (R0[32:0] == 0bv32); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); @@ -205,54 +113,14 @@ procedure main() free ensures (memory_load8_le(mem, 1965bv64) == 0bv8); free ensures (memory_load8_le(mem, 1966bv64) == 2bv8); free ensures (memory_load8_le(mem, 1967bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69600bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69601bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69602bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69603bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69604bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69605bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69606bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69607bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 24bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69600bv64) == 69652bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 69656bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1872bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -315,3 +183,4 @@ procedure main() assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l0000033f; } + diff --git a/src/test/correct/basic_lock_security_read/clang/basic_lock_security_read.expected b/src/test/correct/basic_lock_security_read/clang/basic_lock_security_read.expected index 09f70f03f..256f2ffdb 100644 --- a/src/test/correct/basic_lock_security_read/clang/basic_lock_security_read.expected +++ b/src/test/correct/basic_lock_security_read/clang/basic_lock_security_read.expected @@ -35,6 +35,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -54,150 +58,60 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((old(memory_load32_le(mem, $z_addr)) == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))) && (memory_load32_le(mem, $z_addr) == old(memory_load32_le(mem, $z_addr))))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $z_addr) == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) && (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)) && (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_mem, Gamma_stack, R0, R31, R8, mem, stack; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1896bv64) == 1bv8); free requires (memory_load8_le(mem, 1897bv64) == 0bv8); free requires (memory_load8_le(mem, 1898bv64) == 2bv8); free requires (memory_load8_le(mem, 1899bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1896bv64) == 1bv8); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -272,3 +186,4 @@ procedure main() assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l0000034e; } + diff --git a/src/test/correct/basic_lock_security_read/clang_O2/basic_lock_security_read.expected b/src/test/correct/basic_lock_security_read/clang_O2/basic_lock_security_read.expected index a2f10d1ca..d58bdf4b7 100644 --- a/src/test/correct/basic_lock_security_read/clang_O2/basic_lock_security_read.expected +++ b/src/test/correct/basic_lock_security_read/clang_O2/basic_lock_security_read.expected @@ -29,6 +29,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -44,148 +48,58 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1861bv64) == 0bv8); free ensures (memory_load8_le(mem, 1862bv64) == 2bv8); free ensures (memory_load8_le(mem, 1863bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((old(memory_load32_le(mem, $z_addr)) == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))) && (memory_load32_le(mem, $z_addr) == old(memory_load32_le(mem, $z_addr))))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $z_addr) == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) && (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)) && (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R8, Gamma_R9, Gamma_mem, R0, R8, R9, mem; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1860bv64) == 1bv8); free requires (memory_load8_le(mem, 1861bv64) == 0bv8); free requires (memory_load8_le(mem, 1862bv64) == 2bv8); free requires (memory_load8_le(mem, 1863bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (memory_load8_le(mem, 1860bv64) == 1bv8); free ensures (memory_load8_le(mem, 1861bv64) == 0bv8); free ensures (memory_load8_le(mem, 1862bv64) == 2bv8); free ensures (memory_load8_le(mem, 1863bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -232,3 +146,4 @@ procedure main() assume (bvcomp1(ZF, 1bv1) == 0bv1); goto l000002fd; } + diff --git a/src/test/correct/basic_lock_security_read/clang_no_plt_no_pic/basic_lock_security_read.expected b/src/test/correct/basic_lock_security_read/clang_no_plt_no_pic/basic_lock_security_read.expected index d4c28b724..b6cf86194 100644 --- a/src/test/correct/basic_lock_security_read/clang_no_plt_no_pic/basic_lock_security_read.expected +++ b/src/test/correct/basic_lock_security_read/clang_no_plt_no_pic/basic_lock_security_read.expected @@ -35,6 +35,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -54,150 +58,60 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((old(memory_load32_le(mem, $z_addr)) == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))) && (memory_load32_le(mem, $z_addr) == old(memory_load32_le(mem, $z_addr))))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $z_addr) == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) && (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)) && (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_mem, Gamma_stack, R0, R31, R8, mem, stack; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1896bv64) == 1bv8); free requires (memory_load8_le(mem, 1897bv64) == 0bv8); free requires (memory_load8_le(mem, 1898bv64) == 2bv8); free requires (memory_load8_le(mem, 1899bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1896bv64) == 1bv8); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -272,3 +186,4 @@ procedure main() assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l0000096c; } + diff --git a/src/test/correct/basic_lock_security_read/clang_pic/basic_lock_security_read.expected b/src/test/correct/basic_lock_security_read/clang_pic/basic_lock_security_read.expected index 0b25229ee..3a4d8c854 100644 --- a/src/test/correct/basic_lock_security_read/clang_pic/basic_lock_security_read.expected +++ b/src/test/correct/basic_lock_security_read/clang_pic/basic_lock_security_read.expected @@ -62,198 +62,66 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1969bv64) == 0bv8); free ensures (memory_load8_le(mem, 1970bv64) == 2bv8); free ensures (memory_load8_le(mem, 1971bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69576bv64) == 56bv8); - free ensures (memory_load8_le(mem, 69577bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69578bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69579bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69580bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69581bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69582bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69583bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69048bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69049bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69050bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69051bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69052bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69053bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69054bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69055bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69568bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69569bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69570bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69571bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69572bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69573bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69574bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69575bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69576bv64) == 69688bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69048bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69568bv64) == 69684bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1792bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((old(memory_load32_le(mem, $z_addr)) == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))) && (memory_load32_le(mem, $z_addr) == old(memory_load32_le(mem, $z_addr))))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $z_addr) == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) && (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)) && (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_mem, Gamma_stack, R0, R31, R8, mem, stack; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1968bv64) == 1bv8); free requires (memory_load8_le(mem, 1969bv64) == 0bv8); free requires (memory_load8_le(mem, 1970bv64) == 2bv8); free requires (memory_load8_le(mem, 1971bv64) == 0bv8); - free requires (memory_load8_le(mem, 69576bv64) == 56bv8); - free requires (memory_load8_le(mem, 69577bv64) == 16bv8); - free requires (memory_load8_le(mem, 69578bv64) == 1bv8); - free requires (memory_load8_le(mem, 69579bv64) == 0bv8); - free requires (memory_load8_le(mem, 69580bv64) == 0bv8); - free requires (memory_load8_le(mem, 69581bv64) == 0bv8); - free requires (memory_load8_le(mem, 69582bv64) == 0bv8); - free requires (memory_load8_le(mem, 69583bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); - free requires (memory_load8_le(mem, 69048bv64) == 80bv8); - free requires (memory_load8_le(mem, 69049bv64) == 7bv8); - free requires (memory_load8_le(mem, 69050bv64) == 0bv8); - free requires (memory_load8_le(mem, 69051bv64) == 0bv8); - free requires (memory_load8_le(mem, 69052bv64) == 0bv8); - free requires (memory_load8_le(mem, 69053bv64) == 0bv8); - free requires (memory_load8_le(mem, 69054bv64) == 0bv8); - free requires (memory_load8_le(mem, 69055bv64) == 0bv8); - free requires (memory_load8_le(mem, 69568bv64) == 52bv8); - free requires (memory_load8_le(mem, 69569bv64) == 16bv8); - free requires (memory_load8_le(mem, 69570bv64) == 1bv8); - free requires (memory_load8_le(mem, 69571bv64) == 0bv8); - free requires (memory_load8_le(mem, 69572bv64) == 0bv8); - free requires (memory_load8_le(mem, 69573bv64) == 0bv8); - free requires (memory_load8_le(mem, 69574bv64) == 0bv8); - free requires (memory_load8_le(mem, 69575bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 84bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69056bv64) == 0bv8); - free requires (memory_load8_le(mem, 69057bv64) == 7bv8); - free requires (memory_load8_le(mem, 69058bv64) == 0bv8); - free requires (memory_load8_le(mem, 69059bv64) == 0bv8); - free requires (memory_load8_le(mem, 69060bv64) == 0bv8); - free requires (memory_load8_le(mem, 69061bv64) == 0bv8); - free requires (memory_load8_le(mem, 69062bv64) == 0bv8); - free requires (memory_load8_le(mem, 69063bv64) == 0bv8); + free requires (memory_load64_le(mem, 69576bv64) == 69688bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); + free requires (memory_load64_le(mem, 69048bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69568bv64) == 69684bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69056bv64) == 1792bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1968bv64) == 1bv8); free ensures (memory_load8_le(mem, 1969bv64) == 0bv8); free ensures (memory_load8_le(mem, 1970bv64) == 2bv8); free ensures (memory_load8_le(mem, 1971bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69576bv64) == 56bv8); - free ensures (memory_load8_le(mem, 69577bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69578bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69579bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69580bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69581bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69582bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69583bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69048bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69049bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69050bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69051bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69052bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69053bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69054bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69055bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69568bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69569bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69570bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69571bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69572bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69573bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69574bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69575bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69576bv64) == 69688bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69048bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69568bv64) == 69684bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1792bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -332,3 +200,4 @@ procedure main() assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l0000035d; } + diff --git a/src/test/correct/basic_lock_security_read/gcc/basic_lock_security_read.expected b/src/test/correct/basic_lock_security_read/gcc/basic_lock_security_read.expected index 634a9333e..651c01ac4 100644 --- a/src/test/correct/basic_lock_security_read/gcc/basic_lock_security_read.expected +++ b/src/test/correct/basic_lock_security_read/gcc/basic_lock_security_read.expected @@ -33,6 +33,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -52,150 +56,60 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1889bv64) == 0bv8); free ensures (memory_load8_le(mem, 1890bv64) == 2bv8); free ensures (memory_load8_le(mem, 1891bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((old(memory_load32_le(mem, $z_addr)) == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))) && (memory_load32_le(mem, $z_addr) == old(memory_load32_le(mem, $z_addr))))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $z_addr) == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) && (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)) && (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_mem, Gamma_stack, R0, R31, mem, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1888bv64) == 1bv8); free requires (memory_load8_le(mem, 1889bv64) == 0bv8); free requires (memory_load8_le(mem, 1890bv64) == 2bv8); free requires (memory_load8_le(mem, 1891bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1888bv64) == 1bv8); free ensures (memory_load8_le(mem, 1889bv64) == 0bv8); free ensures (memory_load8_le(mem, 1890bv64) == 2bv8); free ensures (memory_load8_le(mem, 1891bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -246,3 +160,4 @@ procedure main() assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l00000332; } + diff --git a/src/test/correct/basic_lock_security_read/gcc_O2/basic_lock_security_read.expected b/src/test/correct/basic_lock_security_read/gcc_O2/basic_lock_security_read.expected index e439d3e8c..d00ef7870 100644 --- a/src/test/correct/basic_lock_security_read/gcc_O2/basic_lock_security_read.expected +++ b/src/test/correct/basic_lock_security_read/gcc_O2/basic_lock_security_read.expected @@ -25,6 +25,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -38,148 +42,58 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((old(memory_load32_le(mem, $z_addr)) == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))) && (memory_load32_le(mem, $z_addr) == old(memory_load32_le(mem, $z_addr))))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $z_addr) == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) && (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)) && (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R2, Gamma_mem, R0, R1, R2, mem; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1896bv64) == 1bv8); free requires (memory_load8_le(mem, 1897bv64) == 0bv8); free requires (memory_load8_le(mem, 1898bv64) == 2bv8); free requires (memory_load8_le(mem, 1899bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 80bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 0bv8); - free requires (memory_load8_le(mem, 69025bv64) == 7bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 0bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1536bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1896bv64) == 1bv8); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -207,3 +121,4 @@ procedure main() assume (bvnot1(bvcomp32(R1[32:0], 0bv32)) == 0bv1); goto l0000039c; } + diff --git a/src/test/correct/basic_lock_security_read/gcc_no_plt_no_pic/basic_lock_security_read.expected b/src/test/correct/basic_lock_security_read/gcc_no_plt_no_pic/basic_lock_security_read.expected index 2a17426c5..b2243b92c 100644 --- a/src/test/correct/basic_lock_security_read/gcc_no_plt_no_pic/basic_lock_security_read.expected +++ b/src/test/correct/basic_lock_security_read/gcc_no_plt_no_pic/basic_lock_security_read.expected @@ -33,6 +33,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -52,150 +56,60 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1889bv64) == 0bv8); free ensures (memory_load8_le(mem, 1890bv64) == 2bv8); free ensures (memory_load8_le(mem, 1891bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((old(memory_load32_le(mem, $z_addr)) == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))) && (memory_load32_le(mem, $z_addr) == old(memory_load32_le(mem, $z_addr))))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $z_addr) == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) && (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)) && (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_mem, Gamma_stack, R0, R31, mem, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1888bv64) == 1bv8); free requires (memory_load8_le(mem, 1889bv64) == 0bv8); free requires (memory_load8_le(mem, 1890bv64) == 2bv8); free requires (memory_load8_le(mem, 1891bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1888bv64) == 1bv8); free ensures (memory_load8_le(mem, 1889bv64) == 0bv8); free ensures (memory_load8_le(mem, 1890bv64) == 2bv8); free ensures (memory_load8_le(mem, 1891bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -246,3 +160,4 @@ procedure main() assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l0000092f; } + diff --git a/src/test/correct/basic_lock_security_read/gcc_pic/basic_lock_security_read.expected b/src/test/correct/basic_lock_security_read/gcc_pic/basic_lock_security_read.expected index 32ac0823c..808cfc037 100644 --- a/src/test/correct/basic_lock_security_read/gcc_pic/basic_lock_security_read.expected +++ b/src/test/correct/basic_lock_security_read/gcc_pic/basic_lock_security_read.expected @@ -60,198 +60,66 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1953bv64) == 0bv8); free ensures (memory_load8_le(mem, 1954bv64) == 2bv8); free ensures (memory_load8_le(mem, 1955bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69600bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69601bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69602bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69603bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69604bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69605bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69606bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69607bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 24bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69600bv64) == 69652bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 69656bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1872bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((old(memory_load32_le(mem, $z_addr)) == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))) && (memory_load32_le(mem, $z_addr) == old(memory_load32_le(mem, $z_addr))))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $z_addr) == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) && (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)) && (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_mem, Gamma_stack, R0, R31, mem, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1952bv64) == 1bv8); free requires (memory_load8_le(mem, 1953bv64) == 0bv8); free requires (memory_load8_le(mem, 1954bv64) == 2bv8); free requires (memory_load8_le(mem, 1955bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 84bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69600bv64) == 20bv8); - free requires (memory_load8_le(mem, 69601bv64) == 16bv8); - free requires (memory_load8_le(mem, 69602bv64) == 1bv8); - free requires (memory_load8_le(mem, 69603bv64) == 0bv8); - free requires (memory_load8_le(mem, 69604bv64) == 0bv8); - free requires (memory_load8_le(mem, 69605bv64) == 0bv8); - free requires (memory_load8_le(mem, 69606bv64) == 0bv8); - free requires (memory_load8_le(mem, 69607bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 0bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 24bv8); - free requires (memory_load8_le(mem, 69593bv64) == 16bv8); - free requires (memory_load8_le(mem, 69594bv64) == 1bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 80bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69600bv64) == 69652bv64); + free requires (memory_load64_le(mem, 69008bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69592bv64) == 69656bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1872bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1952bv64) == 1bv8); free ensures (memory_load8_le(mem, 1953bv64) == 0bv8); free ensures (memory_load8_le(mem, 1954bv64) == 2bv8); free ensures (memory_load8_le(mem, 1955bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69600bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69601bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69602bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69603bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69604bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69605bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69606bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69607bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 24bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69600bv64) == 69652bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 69656bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1872bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -304,3 +172,4 @@ procedure main() assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l00000333; } + diff --git a/src/test/correct/basic_lock_security_write/clang/basic_lock_security_write.expected b/src/test/correct/basic_lock_security_write/clang/basic_lock_security_write.expected index f2f05a0b1..367b4ac90 100644 --- a/src/test/correct/basic_lock_security_write/clang/basic_lock_security_write.expected +++ b/src/test/correct/basic_lock_security_write/clang/basic_lock_security_write.expected @@ -33,6 +33,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -50,152 +54,62 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1885bv64) == 0bv8); free ensures (memory_load8_le(mem, 1886bv64) == 2bv8); free ensures (memory_load8_le(mem, 1887bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((memory_load32_le(mem, $z_addr) == old(memory_load32_le(mem, $z_addr))) && (memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr)))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)) && (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $z_addr) == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) && (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R10, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R10, R31, R8, R9, mem, stack; requires (memory_load32_le(mem, $z_addr) != 0bv32); requires (Gamma_R0 == false); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1884bv64) == 1bv8); free requires (memory_load8_le(mem, 1885bv64) == 0bv8); free requires (memory_load8_le(mem, 1886bv64) == 2bv8); free requires (memory_load8_le(mem, 1887bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1884bv64) == 1bv8); free ensures (memory_load8_le(mem, 1885bv64) == 0bv8); free ensures (memory_load8_le(mem, 1886bv64) == 2bv8); free ensures (memory_load8_le(mem, 1887bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var Gamma_x_old: bool; var x_old: bv32; @@ -249,3 +163,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/correct/basic_lock_security_write/clang_O2/basic_lock_security_write.expected b/src/test/correct/basic_lock_security_write/clang_O2/basic_lock_security_write.expected index dd56def9f..19b7d3ccb 100644 --- a/src/test/correct/basic_lock_security_write/clang_O2/basic_lock_security_write.expected +++ b/src/test/correct/basic_lock_security_write/clang_O2/basic_lock_security_write.expected @@ -27,6 +27,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -43,150 +47,60 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1857bv64) == 0bv8); free ensures (memory_load8_le(mem, 1858bv64) == 2bv8); free ensures (memory_load8_le(mem, 1859bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((memory_load32_le(mem, $z_addr) == old(memory_load32_le(mem, $z_addr))) && (memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr)))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)) && (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $z_addr) == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) && (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R8, Gamma_R9, Gamma_mem, R0, R8, R9, mem; requires (memory_load32_le(mem, $z_addr) != 0bv32); requires (Gamma_R0 == false); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1856bv64) == 1bv8); free requires (memory_load8_le(mem, 1857bv64) == 0bv8); free requires (memory_load8_le(mem, 1858bv64) == 2bv8); free requires (memory_load8_le(mem, 1859bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (memory_load8_le(mem, 1856bv64) == 1bv8); free ensures (memory_load8_le(mem, 1857bv64) == 0bv8); free ensures (memory_load8_le(mem, 1858bv64) == 2bv8); free ensures (memory_load8_le(mem, 1859bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var Gamma_x_old: bool; var x_old: bv32; @@ -216,3 +130,4 @@ procedure main() assume {:captureState "%000002dd"} true; return; } + diff --git a/src/test/correct/basic_lock_security_write/clang_no_plt_no_pic/basic_lock_security_write.expected b/src/test/correct/basic_lock_security_write/clang_no_plt_no_pic/basic_lock_security_write.expected index f38c4c74d..ae005a5ac 100644 --- a/src/test/correct/basic_lock_security_write/clang_no_plt_no_pic/basic_lock_security_write.expected +++ b/src/test/correct/basic_lock_security_write/clang_no_plt_no_pic/basic_lock_security_write.expected @@ -33,6 +33,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -50,152 +54,62 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1885bv64) == 0bv8); free ensures (memory_load8_le(mem, 1886bv64) == 2bv8); free ensures (memory_load8_le(mem, 1887bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((memory_load32_le(mem, $z_addr) == old(memory_load32_le(mem, $z_addr))) && (memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr)))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)) && (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $z_addr) == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) && (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R10, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R10, R31, R8, R9, mem, stack; requires (memory_load32_le(mem, $z_addr) != 0bv32); requires (Gamma_R0 == false); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1884bv64) == 1bv8); free requires (memory_load8_le(mem, 1885bv64) == 0bv8); free requires (memory_load8_le(mem, 1886bv64) == 2bv8); free requires (memory_load8_le(mem, 1887bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1884bv64) == 1bv8); free ensures (memory_load8_le(mem, 1885bv64) == 0bv8); free ensures (memory_load8_le(mem, 1886bv64) == 2bv8); free ensures (memory_load8_le(mem, 1887bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var Gamma_x_old: bool; var x_old: bv32; @@ -249,3 +163,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/correct/basic_lock_security_write/clang_pic/basic_lock_security_write.expected b/src/test/correct/basic_lock_security_write/clang_pic/basic_lock_security_write.expected index f99743610..c1174454e 100644 --- a/src/test/correct/basic_lock_security_write/clang_pic/basic_lock_security_write.expected +++ b/src/test/correct/basic_lock_security_write/clang_pic/basic_lock_security_write.expected @@ -58,200 +58,68 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1957bv64) == 0bv8); free ensures (memory_load8_le(mem, 1958bv64) == 2bv8); free ensures (memory_load8_le(mem, 1959bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69576bv64) == 56bv8); - free ensures (memory_load8_le(mem, 69577bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69578bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69579bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69580bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69581bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69582bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69583bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69048bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69049bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69050bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69051bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69052bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69053bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69054bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69055bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69568bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69569bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69570bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69571bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69572bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69573bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69574bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69575bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69576bv64) == 69688bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69048bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69568bv64) == 69684bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1792bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((memory_load32_le(mem, $z_addr) == old(memory_load32_le(mem, $z_addr))) && (memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr)))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)) && (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $z_addr) == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) && (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R10, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R10, R31, R8, R9, mem, stack; requires (memory_load32_le(mem, $z_addr) != 0bv32); requires (Gamma_R0 == false); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1956bv64) == 1bv8); free requires (memory_load8_le(mem, 1957bv64) == 0bv8); free requires (memory_load8_le(mem, 1958bv64) == 2bv8); free requires (memory_load8_le(mem, 1959bv64) == 0bv8); - free requires (memory_load8_le(mem, 69576bv64) == 56bv8); - free requires (memory_load8_le(mem, 69577bv64) == 16bv8); - free requires (memory_load8_le(mem, 69578bv64) == 1bv8); - free requires (memory_load8_le(mem, 69579bv64) == 0bv8); - free requires (memory_load8_le(mem, 69580bv64) == 0bv8); - free requires (memory_load8_le(mem, 69581bv64) == 0bv8); - free requires (memory_load8_le(mem, 69582bv64) == 0bv8); - free requires (memory_load8_le(mem, 69583bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); - free requires (memory_load8_le(mem, 69048bv64) == 80bv8); - free requires (memory_load8_le(mem, 69049bv64) == 7bv8); - free requires (memory_load8_le(mem, 69050bv64) == 0bv8); - free requires (memory_load8_le(mem, 69051bv64) == 0bv8); - free requires (memory_load8_le(mem, 69052bv64) == 0bv8); - free requires (memory_load8_le(mem, 69053bv64) == 0bv8); - free requires (memory_load8_le(mem, 69054bv64) == 0bv8); - free requires (memory_load8_le(mem, 69055bv64) == 0bv8); - free requires (memory_load8_le(mem, 69568bv64) == 52bv8); - free requires (memory_load8_le(mem, 69569bv64) == 16bv8); - free requires (memory_load8_le(mem, 69570bv64) == 1bv8); - free requires (memory_load8_le(mem, 69571bv64) == 0bv8); - free requires (memory_load8_le(mem, 69572bv64) == 0bv8); - free requires (memory_load8_le(mem, 69573bv64) == 0bv8); - free requires (memory_load8_le(mem, 69574bv64) == 0bv8); - free requires (memory_load8_le(mem, 69575bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 84bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69056bv64) == 0bv8); - free requires (memory_load8_le(mem, 69057bv64) == 7bv8); - free requires (memory_load8_le(mem, 69058bv64) == 0bv8); - free requires (memory_load8_le(mem, 69059bv64) == 0bv8); - free requires (memory_load8_le(mem, 69060bv64) == 0bv8); - free requires (memory_load8_le(mem, 69061bv64) == 0bv8); - free requires (memory_load8_le(mem, 69062bv64) == 0bv8); - free requires (memory_load8_le(mem, 69063bv64) == 0bv8); + free requires (memory_load64_le(mem, 69576bv64) == 69688bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); + free requires (memory_load64_le(mem, 69048bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69568bv64) == 69684bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69056bv64) == 1792bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1956bv64) == 1bv8); free ensures (memory_load8_le(mem, 1957bv64) == 0bv8); free ensures (memory_load8_le(mem, 1958bv64) == 2bv8); free ensures (memory_load8_le(mem, 1959bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69576bv64) == 56bv8); - free ensures (memory_load8_le(mem, 69577bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69578bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69579bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69580bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69581bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69582bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69583bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69048bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69049bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69050bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69051bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69052bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69053bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69054bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69055bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69568bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69569bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69570bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69571bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69572bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69573bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69574bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69575bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69576bv64) == 69688bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69048bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69568bv64) == 69684bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1792bv64); + +implementation main() { var Gamma_x_old: bool; var x_old: bv32; @@ -309,3 +177,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/correct/basic_lock_security_write/gcc/basic_lock_security_write.expected b/src/test/correct/basic_lock_security_write/gcc/basic_lock_security_write.expected index ba5c4d59d..6fcb6c50a 100644 --- a/src/test/correct/basic_lock_security_write/gcc/basic_lock_security_write.expected +++ b/src/test/correct/basic_lock_security_write/gcc/basic_lock_security_write.expected @@ -29,6 +29,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -46,152 +50,62 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1909bv64) == 0bv8); free ensures (memory_load8_le(mem, 1910bv64) == 2bv8); free ensures (memory_load8_le(mem, 1911bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((memory_load32_le(mem, $z_addr) == old(memory_load32_le(mem, $z_addr))) && (memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr)))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)) && (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $z_addr) == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) && (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R31, mem, stack; requires (memory_load32_le(mem, $z_addr) != 0bv32); requires (Gamma_R0 == false); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1908bv64) == 1bv8); free requires (memory_load8_le(mem, 1909bv64) == 0bv8); free requires (memory_load8_le(mem, 1910bv64) == 2bv8); free requires (memory_load8_le(mem, 1911bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1908bv64) == 1bv8); free ensures (memory_load8_le(mem, 1909bv64) == 0bv8); free ensures (memory_load8_le(mem, 1910bv64) == 2bv8); free ensures (memory_load8_le(mem, 1911bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var Gamma_x_old: bool; var x_old: bv32; @@ -251,3 +165,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/correct/basic_lock_security_write/gcc_O2/basic_lock_security_write.expected b/src/test/correct/basic_lock_security_write/gcc_O2/basic_lock_security_write.expected index 4bbaa34c0..4539ec2d1 100644 --- a/src/test/correct/basic_lock_security_write/gcc_O2/basic_lock_security_write.expected +++ b/src/test/correct/basic_lock_security_write/gcc_O2/basic_lock_security_write.expected @@ -27,6 +27,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -43,150 +47,60 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((memory_load32_le(mem, $z_addr) == old(memory_load32_le(mem, $z_addr))) && (memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr)))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)) && (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $z_addr) == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) && (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R2, Gamma_mem, R0, R1, R2, mem; requires (memory_load32_le(mem, $z_addr) != 0bv32); requires (Gamma_R0 == false); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1896bv64) == 1bv8); free requires (memory_load8_le(mem, 1897bv64) == 0bv8); free requires (memory_load8_le(mem, 1898bv64) == 2bv8); free requires (memory_load8_le(mem, 1899bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 80bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 0bv8); - free requires (memory_load8_le(mem, 69025bv64) == 7bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 0bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1536bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1896bv64) == 1bv8); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var Gamma_x_old: bool; var x_old: bv32; @@ -216,3 +130,4 @@ procedure main() assume {:captureState "%000001c4"} true; return; } + diff --git a/src/test/correct/basic_lock_security_write/gcc_no_plt_no_pic/basic_lock_security_write.expected b/src/test/correct/basic_lock_security_write/gcc_no_plt_no_pic/basic_lock_security_write.expected index b374205cf..16fe76e1f 100644 --- a/src/test/correct/basic_lock_security_write/gcc_no_plt_no_pic/basic_lock_security_write.expected +++ b/src/test/correct/basic_lock_security_write/gcc_no_plt_no_pic/basic_lock_security_write.expected @@ -29,6 +29,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -46,152 +50,62 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1909bv64) == 0bv8); free ensures (memory_load8_le(mem, 1910bv64) == 2bv8); free ensures (memory_load8_le(mem, 1911bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((memory_load32_le(mem, $z_addr) == old(memory_load32_le(mem, $z_addr))) && (memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr)))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)) && (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $z_addr) == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) && (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R31, mem, stack; requires (memory_load32_le(mem, $z_addr) != 0bv32); requires (Gamma_R0 == false); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1908bv64) == 1bv8); free requires (memory_load8_le(mem, 1909bv64) == 0bv8); free requires (memory_load8_le(mem, 1910bv64) == 2bv8); free requires (memory_load8_le(mem, 1911bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1908bv64) == 1bv8); free ensures (memory_load8_le(mem, 1909bv64) == 0bv8); free ensures (memory_load8_le(mem, 1910bv64) == 2bv8); free ensures (memory_load8_le(mem, 1911bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var Gamma_x_old: bool; var x_old: bv32; @@ -251,3 +165,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/correct/basic_lock_security_write/gcc_pic/basic_lock_security_write.expected b/src/test/correct/basic_lock_security_write/gcc_pic/basic_lock_security_write.expected index cb4b9c8ca..b07bb0495 100644 --- a/src/test/correct/basic_lock_security_write/gcc_pic/basic_lock_security_write.expected +++ b/src/test/correct/basic_lock_security_write/gcc_pic/basic_lock_security_write.expected @@ -54,200 +54,68 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1973bv64) == 0bv8); free ensures (memory_load8_le(mem, 1974bv64) == 2bv8); free ensures (memory_load8_le(mem, 1975bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69600bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69601bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69602bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69603bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69604bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69605bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69606bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69607bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 24bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69600bv64) == 69652bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 69656bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1872bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((memory_load32_le(mem, $z_addr) == old(memory_load32_le(mem, $z_addr))) && (memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr)))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)) && (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $z_addr) == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) && (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R31, mem, stack; requires (memory_load32_le(mem, $z_addr) != 0bv32); requires (Gamma_R0 == false); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1972bv64) == 1bv8); free requires (memory_load8_le(mem, 1973bv64) == 0bv8); free requires (memory_load8_le(mem, 1974bv64) == 2bv8); free requires (memory_load8_le(mem, 1975bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 84bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69600bv64) == 20bv8); - free requires (memory_load8_le(mem, 69601bv64) == 16bv8); - free requires (memory_load8_le(mem, 69602bv64) == 1bv8); - free requires (memory_load8_le(mem, 69603bv64) == 0bv8); - free requires (memory_load8_le(mem, 69604bv64) == 0bv8); - free requires (memory_load8_le(mem, 69605bv64) == 0bv8); - free requires (memory_load8_le(mem, 69606bv64) == 0bv8); - free requires (memory_load8_le(mem, 69607bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 0bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 24bv8); - free requires (memory_load8_le(mem, 69593bv64) == 16bv8); - free requires (memory_load8_le(mem, 69594bv64) == 1bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 80bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69600bv64) == 69652bv64); + free requires (memory_load64_le(mem, 69008bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69592bv64) == 69656bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1872bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1972bv64) == 1bv8); free ensures (memory_load8_le(mem, 1973bv64) == 0bv8); free ensures (memory_load8_le(mem, 1974bv64) == 2bv8); free ensures (memory_load8_le(mem, 1975bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69600bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69601bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69602bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69603bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69604bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69605bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69606bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69607bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 24bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69600bv64) == 69652bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 69656bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1872bv64); + +implementation main() { var Gamma_x_old: bool; var x_old: bv32; @@ -311,3 +179,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/correct/basic_lock_unlock/clang/basic_lock_unlock.expected b/src/test/correct/basic_lock_unlock/clang/basic_lock_unlock.expected index 52936b563..19fe5df42 100644 --- a/src/test/correct/basic_lock_unlock/clang/basic_lock_unlock.expected +++ b/src/test/correct/basic_lock_unlock/clang/basic_lock_unlock.expected @@ -23,6 +23,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -39,149 +43,59 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1861bv64) == 0bv8); free ensures (memory_load8_le(mem, 1862bv64) == 2bv8); free ensures (memory_load8_le(mem, 1863bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $z_addr) == old(memory_load32_le(mem, $z_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $z_addr) == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) && (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R8, Gamma_R9, Gamma_mem, R0, R8, R9, mem; requires (memory_load32_le(mem, $z_addr) == 1bv32); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1860bv64) == 1bv8); free requires (memory_load8_le(mem, 1861bv64) == 0bv8); free requires (memory_load8_le(mem, 1862bv64) == 2bv8); free requires (memory_load8_le(mem, 1863bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (memory_load8_le(mem, 1860bv64) == 1bv8); free ensures (memory_load8_le(mem, 1861bv64) == 0bv8); free ensures (memory_load8_le(mem, 1862bv64) == 2bv8); free ensures (memory_load8_le(mem, 1863bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var x_old: bv32; var z_old: bv32; @@ -207,3 +121,4 @@ procedure main() assume {:captureState "%000002e7"} true; return; } + diff --git a/src/test/correct/basic_lock_unlock/clang_O2/basic_lock_unlock.expected b/src/test/correct/basic_lock_unlock/clang_O2/basic_lock_unlock.expected index d052faebb..50cb46fbc 100644 --- a/src/test/correct/basic_lock_unlock/clang_O2/basic_lock_unlock.expected +++ b/src/test/correct/basic_lock_unlock/clang_O2/basic_lock_unlock.expected @@ -25,6 +25,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -41,149 +45,59 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1861bv64) == 0bv8); free ensures (memory_load8_le(mem, 1862bv64) == 2bv8); free ensures (memory_load8_le(mem, 1863bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $z_addr) == old(memory_load32_le(mem, $z_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $z_addr) == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) && (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R10, Gamma_R8, Gamma_R9, Gamma_mem, R0, R10, R8, R9, mem; requires (memory_load32_le(mem, $z_addr) == 1bv32); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1860bv64) == 1bv8); free requires (memory_load8_le(mem, 1861bv64) == 0bv8); free requires (memory_load8_le(mem, 1862bv64) == 2bv8); free requires (memory_load8_le(mem, 1863bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (memory_load8_le(mem, 1860bv64) == 1bv8); free ensures (memory_load8_le(mem, 1861bv64) == 0bv8); free ensures (memory_load8_le(mem, 1862bv64) == 2bv8); free ensures (memory_load8_le(mem, 1863bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var x_old: bv32; var z_old: bv32; @@ -209,3 +123,4 @@ procedure main() assume {:captureState "%000002e7"} true; return; } + diff --git a/src/test/correct/basic_lock_unlock/clang_no_plt_no_pic/basic_lock_unlock.expected b/src/test/correct/basic_lock_unlock/clang_no_plt_no_pic/basic_lock_unlock.expected index 934a892e7..42faa9199 100644 --- a/src/test/correct/basic_lock_unlock/clang_no_plt_no_pic/basic_lock_unlock.expected +++ b/src/test/correct/basic_lock_unlock/clang_no_plt_no_pic/basic_lock_unlock.expected @@ -23,6 +23,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -39,149 +43,59 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1861bv64) == 0bv8); free ensures (memory_load8_le(mem, 1862bv64) == 2bv8); free ensures (memory_load8_le(mem, 1863bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $z_addr) == old(memory_load32_le(mem, $z_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $z_addr) == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) && (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R8, Gamma_R9, Gamma_mem, R0, R8, R9, mem; requires (memory_load32_le(mem, $z_addr) == 1bv32); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1860bv64) == 1bv8); free requires (memory_load8_le(mem, 1861bv64) == 0bv8); free requires (memory_load8_le(mem, 1862bv64) == 2bv8); free requires (memory_load8_le(mem, 1863bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (memory_load8_le(mem, 1860bv64) == 1bv8); free ensures (memory_load8_le(mem, 1861bv64) == 0bv8); free ensures (memory_load8_le(mem, 1862bv64) == 2bv8); free ensures (memory_load8_le(mem, 1863bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var x_old: bv32; var z_old: bv32; @@ -207,3 +121,4 @@ procedure main() assume {:captureState "%00000876"} true; return; } + diff --git a/src/test/correct/basic_lock_unlock/clang_pic/basic_lock_unlock.expected b/src/test/correct/basic_lock_unlock/clang_pic/basic_lock_unlock.expected index 1b825317d..a73fa8a5f 100644 --- a/src/test/correct/basic_lock_unlock/clang_pic/basic_lock_unlock.expected +++ b/src/test/correct/basic_lock_unlock/clang_pic/basic_lock_unlock.expected @@ -47,197 +47,65 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1933bv64) == 0bv8); free ensures (memory_load8_le(mem, 1934bv64) == 2bv8); free ensures (memory_load8_le(mem, 1935bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69576bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69577bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69578bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69579bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69580bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69581bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69582bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69583bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69048bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69049bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69050bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69051bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69052bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69053bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69054bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69055bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69568bv64) == 56bv8); - free ensures (memory_load8_le(mem, 69569bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69570bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69571bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69572bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69573bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69574bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69575bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69576bv64) == 69684bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69048bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69568bv64) == 69688bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1792bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $z_addr) == old(memory_load32_le(mem, $z_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $z_addr) == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) && (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R8, Gamma_R9, Gamma_mem, R0, R8, R9, mem; requires (memory_load32_le(mem, $z_addr) == 1bv32); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1932bv64) == 1bv8); free requires (memory_load8_le(mem, 1933bv64) == 0bv8); free requires (memory_load8_le(mem, 1934bv64) == 2bv8); free requires (memory_load8_le(mem, 1935bv64) == 0bv8); - free requires (memory_load8_le(mem, 69576bv64) == 52bv8); - free requires (memory_load8_le(mem, 69577bv64) == 16bv8); - free requires (memory_load8_le(mem, 69578bv64) == 1bv8); - free requires (memory_load8_le(mem, 69579bv64) == 0bv8); - free requires (memory_load8_le(mem, 69580bv64) == 0bv8); - free requires (memory_load8_le(mem, 69581bv64) == 0bv8); - free requires (memory_load8_le(mem, 69582bv64) == 0bv8); - free requires (memory_load8_le(mem, 69583bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); - free requires (memory_load8_le(mem, 69048bv64) == 80bv8); - free requires (memory_load8_le(mem, 69049bv64) == 7bv8); - free requires (memory_load8_le(mem, 69050bv64) == 0bv8); - free requires (memory_load8_le(mem, 69051bv64) == 0bv8); - free requires (memory_load8_le(mem, 69052bv64) == 0bv8); - free requires (memory_load8_le(mem, 69053bv64) == 0bv8); - free requires (memory_load8_le(mem, 69054bv64) == 0bv8); - free requires (memory_load8_le(mem, 69055bv64) == 0bv8); - free requires (memory_load8_le(mem, 69568bv64) == 56bv8); - free requires (memory_load8_le(mem, 69569bv64) == 16bv8); - free requires (memory_load8_le(mem, 69570bv64) == 1bv8); - free requires (memory_load8_le(mem, 69571bv64) == 0bv8); - free requires (memory_load8_le(mem, 69572bv64) == 0bv8); - free requires (memory_load8_le(mem, 69573bv64) == 0bv8); - free requires (memory_load8_le(mem, 69574bv64) == 0bv8); - free requires (memory_load8_le(mem, 69575bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 84bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69056bv64) == 0bv8); - free requires (memory_load8_le(mem, 69057bv64) == 7bv8); - free requires (memory_load8_le(mem, 69058bv64) == 0bv8); - free requires (memory_load8_le(mem, 69059bv64) == 0bv8); - free requires (memory_load8_le(mem, 69060bv64) == 0bv8); - free requires (memory_load8_le(mem, 69061bv64) == 0bv8); - free requires (memory_load8_le(mem, 69062bv64) == 0bv8); - free requires (memory_load8_le(mem, 69063bv64) == 0bv8); + free requires (memory_load64_le(mem, 69576bv64) == 69684bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); + free requires (memory_load64_le(mem, 69048bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69568bv64) == 69688bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69056bv64) == 1792bv64); free ensures (memory_load8_le(mem, 1932bv64) == 1bv8); free ensures (memory_load8_le(mem, 1933bv64) == 0bv8); free ensures (memory_load8_le(mem, 1934bv64) == 2bv8); free ensures (memory_load8_le(mem, 1935bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69576bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69577bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69578bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69579bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69580bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69581bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69582bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69583bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69048bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69049bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69050bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69051bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69052bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69053bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69054bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69055bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69568bv64) == 56bv8); - free ensures (memory_load8_le(mem, 69569bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69570bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69571bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69572bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69573bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69574bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69575bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69576bv64) == 69684bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69048bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69568bv64) == 69688bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1792bv64); + +implementation main() { var x_old: bv32; var z_old: bv32; @@ -267,3 +135,4 @@ procedure main() assume {:captureState "%000002fd"} true; return; } + diff --git a/src/test/correct/basic_lock_unlock/gcc/basic_lock_unlock.expected b/src/test/correct/basic_lock_unlock/gcc/basic_lock_unlock.expected index 45c3f0f16..5199b11f1 100644 --- a/src/test/correct/basic_lock_unlock/gcc/basic_lock_unlock.expected +++ b/src/test/correct/basic_lock_unlock/gcc/basic_lock_unlock.expected @@ -21,6 +21,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -37,149 +41,59 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1869bv64) == 0bv8); free ensures (memory_load8_le(mem, 1870bv64) == 2bv8); free ensures (memory_load8_le(mem, 1871bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $z_addr) == old(memory_load32_le(mem, $z_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $z_addr) == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) && (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; requires (memory_load32_le(mem, $z_addr) == 1bv32); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1868bv64) == 1bv8); free requires (memory_load8_le(mem, 1869bv64) == 0bv8); free requires (memory_load8_le(mem, 1870bv64) == 2bv8); free requires (memory_load8_le(mem, 1871bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1868bv64) == 1bv8); free ensures (memory_load8_le(mem, 1869bv64) == 0bv8); free ensures (memory_load8_le(mem, 1870bv64) == 2bv8); free ensures (memory_load8_le(mem, 1871bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var x_old: bv32; var z_old: bv32; @@ -207,3 +121,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/basic_lock_unlock/gcc_O2/basic_lock_unlock.expected b/src/test/correct/basic_lock_unlock/gcc_O2/basic_lock_unlock.expected index 4bb063905..46caff477 100644 --- a/src/test/correct/basic_lock_unlock/gcc_O2/basic_lock_unlock.expected +++ b/src/test/correct/basic_lock_unlock/gcc_O2/basic_lock_unlock.expected @@ -25,6 +25,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -41,149 +45,59 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $z_addr) == old(memory_load32_le(mem, $z_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $z_addr) == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) && (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R2, Gamma_R3, Gamma_mem, R0, R1, R2, R3, mem; requires (memory_load32_le(mem, $z_addr) == 1bv32); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1896bv64) == 1bv8); free requires (memory_load8_le(mem, 1897bv64) == 0bv8); free requires (memory_load8_le(mem, 1898bv64) == 2bv8); free requires (memory_load8_le(mem, 1899bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 80bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 0bv8); - free requires (memory_load8_le(mem, 69025bv64) == 7bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 0bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1536bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1896bv64) == 1bv8); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var x_old: bv32; var z_old: bv32; @@ -209,3 +123,4 @@ procedure main() assume {:captureState "%000001ca"} true; return; } + diff --git a/src/test/correct/basic_lock_unlock/gcc_no_plt_no_pic/basic_lock_unlock.expected b/src/test/correct/basic_lock_unlock/gcc_no_plt_no_pic/basic_lock_unlock.expected index 7de6a308f..ad4646279 100644 --- a/src/test/correct/basic_lock_unlock/gcc_no_plt_no_pic/basic_lock_unlock.expected +++ b/src/test/correct/basic_lock_unlock/gcc_no_plt_no_pic/basic_lock_unlock.expected @@ -21,6 +21,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -37,149 +41,59 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1869bv64) == 0bv8); free ensures (memory_load8_le(mem, 1870bv64) == 2bv8); free ensures (memory_load8_le(mem, 1871bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $z_addr) == old(memory_load32_le(mem, $z_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $z_addr) == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) && (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; requires (memory_load32_le(mem, $z_addr) == 1bv32); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1868bv64) == 1bv8); free requires (memory_load8_le(mem, 1869bv64) == 0bv8); free requires (memory_load8_le(mem, 1870bv64) == 2bv8); free requires (memory_load8_le(mem, 1871bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1868bv64) == 1bv8); free ensures (memory_load8_le(mem, 1869bv64) == 0bv8); free ensures (memory_load8_le(mem, 1870bv64) == 2bv8); free ensures (memory_load8_le(mem, 1871bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var x_old: bv32; var z_old: bv32; @@ -207,3 +121,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/basic_lock_unlock/gcc_pic/basic_lock_unlock.expected b/src/test/correct/basic_lock_unlock/gcc_pic/basic_lock_unlock.expected index e7f59e5d7..59062e0c6 100644 --- a/src/test/correct/basic_lock_unlock/gcc_pic/basic_lock_unlock.expected +++ b/src/test/correct/basic_lock_unlock/gcc_pic/basic_lock_unlock.expected @@ -45,197 +45,65 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1933bv64) == 0bv8); free ensures (memory_load8_le(mem, 1934bv64) == 2bv8); free ensures (memory_load8_le(mem, 1935bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69600bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69601bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69602bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69603bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69604bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69605bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69606bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69607bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 24bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69600bv64) == 69652bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 69656bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1872bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $z_addr) == old(memory_load32_le(mem, $z_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $z_addr) == 0bv32) ==> ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) && (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; requires (memory_load32_le(mem, $z_addr) == 1bv32); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1932bv64) == 1bv8); free requires (memory_load8_le(mem, 1933bv64) == 0bv8); free requires (memory_load8_le(mem, 1934bv64) == 2bv8); free requires (memory_load8_le(mem, 1935bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 84bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69600bv64) == 20bv8); - free requires (memory_load8_le(mem, 69601bv64) == 16bv8); - free requires (memory_load8_le(mem, 69602bv64) == 1bv8); - free requires (memory_load8_le(mem, 69603bv64) == 0bv8); - free requires (memory_load8_le(mem, 69604bv64) == 0bv8); - free requires (memory_load8_le(mem, 69605bv64) == 0bv8); - free requires (memory_load8_le(mem, 69606bv64) == 0bv8); - free requires (memory_load8_le(mem, 69607bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 0bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 24bv8); - free requires (memory_load8_le(mem, 69593bv64) == 16bv8); - free requires (memory_load8_le(mem, 69594bv64) == 1bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 80bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69600bv64) == 69652bv64); + free requires (memory_load64_le(mem, 69008bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69592bv64) == 69656bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1872bv64); free ensures (memory_load8_le(mem, 1932bv64) == 1bv8); free ensures (memory_load8_le(mem, 1933bv64) == 0bv8); free ensures (memory_load8_le(mem, 1934bv64) == 2bv8); free ensures (memory_load8_le(mem, 1935bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69600bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69601bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69602bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69603bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69604bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69605bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69606bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69607bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 24bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69600bv64) == 69652bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 69656bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1872bv64); + +implementation main() { var x_old: bv32; var z_old: bv32; @@ -265,3 +133,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/basic_loop_assign/clang/basic_loop_assign.expected b/src/test/correct/basic_loop_assign/clang/basic_loop_assign.expected index 1702ab871..9e3e90520 100644 --- a/src/test/correct/basic_loop_assign/clang/basic_loop_assign.expected +++ b/src/test/correct/basic_loop_assign/clang/basic_loop_assign.expected @@ -23,6 +23,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -39,150 +43,60 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1853bv64) == 0bv8); free ensures (memory_load8_le(mem, 1854bv64) == 2bv8); free ensures (memory_load8_le(mem, 1855bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (((memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))) || (bvsle32(memory_load32_le(mem, $x_addr), 10bv32) && bvslt32(old(memory_load32_le(mem, $x_addr)), 10bv32))) || ((memory_load32_le(mem, $x_addr) == 21bv32) && (old(memory_load32_le(mem, $x_addr)) == 20bv32))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) || (bvsle32(memory_load32_le(mem, $x_addr), 10bv32) && bvslt32(memory_load32_le(mem, $x_addr), 10bv32))) || ((memory_load32_le(mem, $x_addr) == 21bv32) && (memory_load32_le(mem, $x_addr) == 20bv32))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) || ((memory_load32_le(mem, $x_addr) == 20bv32) && (memory_load32_le(mem, $x_addr) == 0bv32))) || ((memory_load32_le(mem, $x_addr) == 20bv32) && bvsle32(memory_load32_le(mem, $x_addr), 10bv32))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R8, Gamma_R9, Gamma_mem, R0, R8, R9, mem; requires (memory_load32_le(mem, $x_addr) == 0bv32); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1852bv64) == 1bv8); free requires (memory_load8_le(mem, 1853bv64) == 0bv8); free requires (memory_load8_le(mem, 1854bv64) == 2bv8); free requires (memory_load8_le(mem, 1855bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); ensures ((memory_load32_le(mem, $x_addr) == 20bv32) || (memory_load32_le(mem, $x_addr) == 21bv32)); free ensures (memory_load8_le(mem, 1852bv64) == 1bv8); free ensures (memory_load8_le(mem, 1853bv64) == 0bv8); free ensures (memory_load8_le(mem, 1854bv64) == 2bv8); free ensures (memory_load8_le(mem, 1855bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var x_old: bv32; lmain: @@ -198,3 +112,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/basic_loop_assign/clang_O2/basic_loop_assign.expected b/src/test/correct/basic_loop_assign/clang_O2/basic_loop_assign.expected index 8031b1142..5796c5ea2 100644 --- a/src/test/correct/basic_loop_assign/clang_O2/basic_loop_assign.expected +++ b/src/test/correct/basic_loop_assign/clang_O2/basic_loop_assign.expected @@ -23,6 +23,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -39,150 +43,60 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1853bv64) == 0bv8); free ensures (memory_load8_le(mem, 1854bv64) == 2bv8); free ensures (memory_load8_le(mem, 1855bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (((memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))) || (bvsle32(memory_load32_le(mem, $x_addr), 10bv32) && bvslt32(old(memory_load32_le(mem, $x_addr)), 10bv32))) || ((memory_load32_le(mem, $x_addr) == 21bv32) && (old(memory_load32_le(mem, $x_addr)) == 20bv32))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) || (bvsle32(memory_load32_le(mem, $x_addr), 10bv32) && bvslt32(memory_load32_le(mem, $x_addr), 10bv32))) || ((memory_load32_le(mem, $x_addr) == 21bv32) && (memory_load32_le(mem, $x_addr) == 20bv32))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) || ((memory_load32_le(mem, $x_addr) == 20bv32) && (memory_load32_le(mem, $x_addr) == 0bv32))) || ((memory_load32_le(mem, $x_addr) == 20bv32) && bvsle32(memory_load32_le(mem, $x_addr), 10bv32))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R8, Gamma_R9, Gamma_mem, R0, R8, R9, mem; requires (memory_load32_le(mem, $x_addr) == 0bv32); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1852bv64) == 1bv8); free requires (memory_load8_le(mem, 1853bv64) == 0bv8); free requires (memory_load8_le(mem, 1854bv64) == 2bv8); free requires (memory_load8_le(mem, 1855bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); ensures ((memory_load32_le(mem, $x_addr) == 20bv32) || (memory_load32_le(mem, $x_addr) == 21bv32)); free ensures (memory_load8_le(mem, 1852bv64) == 1bv8); free ensures (memory_load8_le(mem, 1853bv64) == 0bv8); free ensures (memory_load8_le(mem, 1854bv64) == 2bv8); free ensures (memory_load8_le(mem, 1855bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var x_old: bv32; lmain: @@ -198,3 +112,4 @@ procedure main() assume {:captureState "%000002d3"} true; return; } + diff --git a/src/test/correct/basic_loop_assign/clang_no_plt_no_pic/basic_loop_assign.expected b/src/test/correct/basic_loop_assign/clang_no_plt_no_pic/basic_loop_assign.expected index 45a841343..167275531 100644 --- a/src/test/correct/basic_loop_assign/clang_no_plt_no_pic/basic_loop_assign.expected +++ b/src/test/correct/basic_loop_assign/clang_no_plt_no_pic/basic_loop_assign.expected @@ -23,6 +23,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -39,150 +43,60 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1853bv64) == 0bv8); free ensures (memory_load8_le(mem, 1854bv64) == 2bv8); free ensures (memory_load8_le(mem, 1855bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (((memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))) || (bvsle32(memory_load32_le(mem, $x_addr), 10bv32) && bvslt32(old(memory_load32_le(mem, $x_addr)), 10bv32))) || ((memory_load32_le(mem, $x_addr) == 21bv32) && (old(memory_load32_le(mem, $x_addr)) == 20bv32))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) || (bvsle32(memory_load32_le(mem, $x_addr), 10bv32) && bvslt32(memory_load32_le(mem, $x_addr), 10bv32))) || ((memory_load32_le(mem, $x_addr) == 21bv32) && (memory_load32_le(mem, $x_addr) == 20bv32))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) || ((memory_load32_le(mem, $x_addr) == 20bv32) && (memory_load32_le(mem, $x_addr) == 0bv32))) || ((memory_load32_le(mem, $x_addr) == 20bv32) && bvsle32(memory_load32_le(mem, $x_addr), 10bv32))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R8, Gamma_R9, Gamma_mem, R0, R8, R9, mem; requires (memory_load32_le(mem, $x_addr) == 0bv32); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1852bv64) == 1bv8); free requires (memory_load8_le(mem, 1853bv64) == 0bv8); free requires (memory_load8_le(mem, 1854bv64) == 2bv8); free requires (memory_load8_le(mem, 1855bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); ensures ((memory_load32_le(mem, $x_addr) == 20bv32) || (memory_load32_le(mem, $x_addr) == 21bv32)); free ensures (memory_load8_le(mem, 1852bv64) == 1bv8); free ensures (memory_load8_le(mem, 1853bv64) == 0bv8); free ensures (memory_load8_le(mem, 1854bv64) == 2bv8); free ensures (memory_load8_le(mem, 1855bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var x_old: bv32; lmain: @@ -198,3 +112,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/basic_loop_assign/clang_pic/basic_loop_assign.expected b/src/test/correct/basic_loop_assign/clang_pic/basic_loop_assign.expected index 9c2937fd7..715eb7aac 100644 --- a/src/test/correct/basic_loop_assign/clang_pic/basic_loop_assign.expected +++ b/src/test/correct/basic_loop_assign/clang_pic/basic_loop_assign.expected @@ -47,174 +47,63 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1921bv64) == 0bv8); free ensures (memory_load8_le(mem, 1922bv64) == 2bv8); free ensures (memory_load8_le(mem, 1923bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69576bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69577bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69578bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69579bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69580bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69581bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69582bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69583bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69576bv64) == 69684bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69064bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (((memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))) || (bvsle32(memory_load32_le(mem, $x_addr), 10bv32) && bvslt32(old(memory_load32_le(mem, $x_addr)), 10bv32))) || ((memory_load32_le(mem, $x_addr) == 21bv32) && (old(memory_load32_le(mem, $x_addr)) == 20bv32))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) || (bvsle32(memory_load32_le(mem, $x_addr), 10bv32) && bvslt32(memory_load32_le(mem, $x_addr), 10bv32))) || ((memory_load32_le(mem, $x_addr) == 21bv32) && (memory_load32_le(mem, $x_addr) == 20bv32))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) || ((memory_load32_le(mem, $x_addr) == 20bv32) && (memory_load32_le(mem, $x_addr) == 0bv32))) || ((memory_load32_le(mem, $x_addr) == 20bv32) && bvsle32(memory_load32_le(mem, $x_addr), 10bv32))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R8, Gamma_R9, Gamma_mem, R0, R8, R9, mem; requires (memory_load32_le(mem, $x_addr) == 0bv32); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1920bv64) == 1bv8); free requires (memory_load8_le(mem, 1921bv64) == 0bv8); free requires (memory_load8_le(mem, 1922bv64) == 2bv8); free requires (memory_load8_le(mem, 1923bv64) == 0bv8); - free requires (memory_load8_le(mem, 69576bv64) == 52bv8); - free requires (memory_load8_le(mem, 69577bv64) == 16bv8); - free requires (memory_load8_le(mem, 69578bv64) == 1bv8); - free requires (memory_load8_le(mem, 69579bv64) == 0bv8); - free requires (memory_load8_le(mem, 69580bv64) == 0bv8); - free requires (memory_load8_le(mem, 69581bv64) == 0bv8); - free requires (memory_load8_le(mem, 69582bv64) == 0bv8); - free requires (memory_load8_le(mem, 69583bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); - free requires (memory_load8_le(mem, 69056bv64) == 80bv8); - free requires (memory_load8_le(mem, 69057bv64) == 7bv8); - free requires (memory_load8_le(mem, 69058bv64) == 0bv8); - free requires (memory_load8_le(mem, 69059bv64) == 0bv8); - free requires (memory_load8_le(mem, 69060bv64) == 0bv8); - free requires (memory_load8_le(mem, 69061bv64) == 0bv8); - free requires (memory_load8_le(mem, 69062bv64) == 0bv8); - free requires (memory_load8_le(mem, 69063bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 0bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 84bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); + free requires (memory_load64_le(mem, 69576bv64) == 69684bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); + free requires (memory_load64_le(mem, 69056bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69064bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1876bv64); ensures ((memory_load32_le(mem, $x_addr) == 20bv32) || (memory_load32_le(mem, $x_addr) == 21bv32)); free ensures (memory_load8_le(mem, 1920bv64) == 1bv8); free ensures (memory_load8_le(mem, 1921bv64) == 0bv8); free ensures (memory_load8_le(mem, 1922bv64) == 2bv8); free ensures (memory_load8_le(mem, 1923bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69576bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69577bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69578bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69579bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69580bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69581bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69582bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69583bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69576bv64) == 69684bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69064bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + +implementation main() { var x_old: bv32; lmain: @@ -232,3 +121,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/basic_loop_assign/gcc/basic_loop_assign.expected b/src/test/correct/basic_loop_assign/gcc/basic_loop_assign.expected index 55d86092d..da04f4e45 100644 --- a/src/test/correct/basic_loop_assign/gcc/basic_loop_assign.expected +++ b/src/test/correct/basic_loop_assign/gcc/basic_loop_assign.expected @@ -21,6 +21,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -37,150 +41,60 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1857bv64) == 0bv8); free ensures (memory_load8_le(mem, 1858bv64) == 2bv8); free ensures (memory_load8_le(mem, 1859bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (((memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))) || (bvsle32(memory_load32_le(mem, $x_addr), 10bv32) && bvslt32(old(memory_load32_le(mem, $x_addr)), 10bv32))) || ((memory_load32_le(mem, $x_addr) == 21bv32) && (old(memory_load32_le(mem, $x_addr)) == 20bv32))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) || (bvsle32(memory_load32_le(mem, $x_addr), 10bv32) && bvslt32(memory_load32_le(mem, $x_addr), 10bv32))) || ((memory_load32_le(mem, $x_addr) == 21bv32) && (memory_load32_le(mem, $x_addr) == 20bv32))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) || ((memory_load32_le(mem, $x_addr) == 20bv32) && (memory_load32_le(mem, $x_addr) == 0bv32))) || ((memory_load32_le(mem, $x_addr) == 20bv32) && bvsle32(memory_load32_le(mem, $x_addr), 10bv32))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; requires (memory_load32_le(mem, $x_addr) == 0bv32); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1856bv64) == 1bv8); free requires (memory_load8_le(mem, 1857bv64) == 0bv8); free requires (memory_load8_le(mem, 1858bv64) == 2bv8); free requires (memory_load8_le(mem, 1859bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); ensures ((memory_load32_le(mem, $x_addr) == 20bv32) || (memory_load32_le(mem, $x_addr) == 21bv32)); free ensures (memory_load8_le(mem, 1856bv64) == 1bv8); free ensures (memory_load8_le(mem, 1857bv64) == 0bv8); free ensures (memory_load8_le(mem, 1858bv64) == 2bv8); free ensures (memory_load8_le(mem, 1859bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var x_old: bv32; lmain: @@ -197,3 +111,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/basic_loop_assign/gcc_O2/basic_loop_assign.expected b/src/test/correct/basic_loop_assign/gcc_O2/basic_loop_assign.expected index 8a5abed56..40d90295d 100644 --- a/src/test/correct/basic_loop_assign/gcc_O2/basic_loop_assign.expected +++ b/src/test/correct/basic_loop_assign/gcc_O2/basic_loop_assign.expected @@ -23,6 +23,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -39,150 +43,60 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (((memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))) || (bvsle32(memory_load32_le(mem, $x_addr), 10bv32) && bvslt32(old(memory_load32_le(mem, $x_addr)), 10bv32))) || ((memory_load32_le(mem, $x_addr) == 21bv32) && (old(memory_load32_le(mem, $x_addr)) == 20bv32))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) || (bvsle32(memory_load32_le(mem, $x_addr), 10bv32) && bvslt32(memory_load32_le(mem, $x_addr), 10bv32))) || ((memory_load32_le(mem, $x_addr) == 21bv32) && (memory_load32_le(mem, $x_addr) == 20bv32))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) || ((memory_load32_le(mem, $x_addr) == 20bv32) && (memory_load32_le(mem, $x_addr) == 0bv32))) || ((memory_load32_le(mem, $x_addr) == 20bv32) && bvsle32(memory_load32_le(mem, $x_addr), 10bv32))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R2, Gamma_mem, R0, R1, R2, mem; requires (memory_load32_le(mem, $x_addr) == 0bv32); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1896bv64) == 1bv8); free requires (memory_load8_le(mem, 1897bv64) == 0bv8); free requires (memory_load8_le(mem, 1898bv64) == 2bv8); free requires (memory_load8_le(mem, 1899bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 80bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 0bv8); - free requires (memory_load8_le(mem, 69025bv64) == 7bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 0bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1536bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); ensures ((memory_load32_le(mem, $x_addr) == 20bv32) || (memory_load32_le(mem, $x_addr) == 21bv32)); free ensures (memory_load8_le(mem, 1896bv64) == 1bv8); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var x_old: bv32; lmain: @@ -198,3 +112,4 @@ procedure main() assume {:captureState "%000001bd"} true; return; } + diff --git a/src/test/correct/basic_loop_assign/gcc_no_plt_no_pic/basic_loop_assign.expected b/src/test/correct/basic_loop_assign/gcc_no_plt_no_pic/basic_loop_assign.expected index 406846cdd..3b0a8d602 100644 --- a/src/test/correct/basic_loop_assign/gcc_no_plt_no_pic/basic_loop_assign.expected +++ b/src/test/correct/basic_loop_assign/gcc_no_plt_no_pic/basic_loop_assign.expected @@ -21,6 +21,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -37,150 +41,60 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1857bv64) == 0bv8); free ensures (memory_load8_le(mem, 1858bv64) == 2bv8); free ensures (memory_load8_le(mem, 1859bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (((memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))) || (bvsle32(memory_load32_le(mem, $x_addr), 10bv32) && bvslt32(old(memory_load32_le(mem, $x_addr)), 10bv32))) || ((memory_load32_le(mem, $x_addr) == 21bv32) && (old(memory_load32_le(mem, $x_addr)) == 20bv32))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) || (bvsle32(memory_load32_le(mem, $x_addr), 10bv32) && bvslt32(memory_load32_le(mem, $x_addr), 10bv32))) || ((memory_load32_le(mem, $x_addr) == 21bv32) && (memory_load32_le(mem, $x_addr) == 20bv32))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) || ((memory_load32_le(mem, $x_addr) == 20bv32) && (memory_load32_le(mem, $x_addr) == 0bv32))) || ((memory_load32_le(mem, $x_addr) == 20bv32) && bvsle32(memory_load32_le(mem, $x_addr), 10bv32))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; requires (memory_load32_le(mem, $x_addr) == 0bv32); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1856bv64) == 1bv8); free requires (memory_load8_le(mem, 1857bv64) == 0bv8); free requires (memory_load8_le(mem, 1858bv64) == 2bv8); free requires (memory_load8_le(mem, 1859bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); ensures ((memory_load32_le(mem, $x_addr) == 20bv32) || (memory_load32_le(mem, $x_addr) == 21bv32)); free ensures (memory_load8_le(mem, 1856bv64) == 1bv8); free ensures (memory_load8_le(mem, 1857bv64) == 0bv8); free ensures (memory_load8_le(mem, 1858bv64) == 2bv8); free ensures (memory_load8_le(mem, 1859bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var x_old: bv32; lmain: @@ -197,3 +111,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/basic_loop_assign/gcc_pic/basic_loop_assign.expected b/src/test/correct/basic_loop_assign/gcc_pic/basic_loop_assign.expected index 4296b2ef3..8b50e1cff 100644 --- a/src/test/correct/basic_loop_assign/gcc_pic/basic_loop_assign.expected +++ b/src/test/correct/basic_loop_assign/gcc_pic/basic_loop_assign.expected @@ -45,174 +45,63 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1921bv64) == 0bv8); free ensures (memory_load8_le(mem, 1922bv64) == 2bv8); free ensures (memory_load8_le(mem, 1923bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69600bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69601bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69602bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69603bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69604bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69605bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69606bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69607bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69600bv64) == 69652bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1872bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (((memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))) || (bvsle32(memory_load32_le(mem, $x_addr), 10bv32) && bvslt32(old(memory_load32_le(mem, $x_addr)), 10bv32))) || ((memory_load32_le(mem, $x_addr) == 21bv32) && (old(memory_load32_le(mem, $x_addr)) == 20bv32))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) || (bvsle32(memory_load32_le(mem, $x_addr), 10bv32) && bvslt32(memory_load32_le(mem, $x_addr), 10bv32))) || ((memory_load32_le(mem, $x_addr) == 21bv32) && (memory_load32_le(mem, $x_addr) == 20bv32))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) || ((memory_load32_le(mem, $x_addr) == 20bv32) && (memory_load32_le(mem, $x_addr) == 0bv32))) || ((memory_load32_le(mem, $x_addr) == 20bv32) && bvsle32(memory_load32_le(mem, $x_addr), 10bv32))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; requires (memory_load32_le(mem, $x_addr) == 0bv32); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1920bv64) == 1bv8); free requires (memory_load8_le(mem, 1921bv64) == 0bv8); free requires (memory_load8_le(mem, 1922bv64) == 2bv8); free requires (memory_load8_le(mem, 1923bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 84bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 0bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69600bv64) == 20bv8); - free requires (memory_load8_le(mem, 69601bv64) == 16bv8); - free requires (memory_load8_le(mem, 69602bv64) == 1bv8); - free requires (memory_load8_le(mem, 69603bv64) == 0bv8); - free requires (memory_load8_le(mem, 69604bv64) == 0bv8); - free requires (memory_load8_le(mem, 69605bv64) == 0bv8); - free requires (memory_load8_le(mem, 69606bv64) == 0bv8); - free requires (memory_load8_le(mem, 69607bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 80bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69016bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69600bv64) == 69652bv64); + free requires (memory_load64_le(mem, 69008bv64) == 1872bv64); ensures ((memory_load32_le(mem, $x_addr) == 20bv32) || (memory_load32_le(mem, $x_addr) == 21bv32)); free ensures (memory_load8_le(mem, 1920bv64) == 1bv8); free ensures (memory_load8_le(mem, 1921bv64) == 0bv8); free ensures (memory_load8_le(mem, 1922bv64) == 2bv8); free ensures (memory_load8_le(mem, 1923bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69600bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69601bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69602bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69603bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69604bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69605bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69606bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69607bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69600bv64) == 69652bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1872bv64); + +implementation main() { var x_old: bv32; lmain: @@ -230,3 +119,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/basic_operation_evaluation/clang/basic_operation_evaluation.expected b/src/test/correct/basic_operation_evaluation/clang/basic_operation_evaluation.expected index 1b7086b6a..eb30200ff 100644 --- a/src/test/correct/basic_operation_evaluation/clang/basic_operation_evaluation.expected +++ b/src/test/correct/basic_operation_evaluation/clang/basic_operation_evaluation.expected @@ -43,6 +43,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -66,43 +70,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1953bv64) == 0bv8); free ensures (memory_load8_le(mem, 1954bv64) == 2bv8); free ensures (memory_load8_le(mem, 1955bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -113,98 +91,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R10, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_stack, R0, R10, R31, R8, R9, stack; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1952bv64) == 1bv8); free requires (memory_load8_le(mem, 1953bv64) == 0bv8); free requires (memory_load8_le(mem, 1954bv64) == 2bv8); free requires (memory_load8_le(mem, 1955bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1952bv64) == 1bv8); free ensures (memory_load8_le(mem, 1953bv64) == 0bv8); free ensures (memory_load8_le(mem, 1954bv64) == 2bv8); free ensures (memory_load8_le(mem, 1955bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var #4: bv32; var #5: bv32; @@ -286,3 +196,4 @@ procedure main() assume (bvcomp32(R10[32:0], 0bv32) == 0bv1); goto l000003ce; } + diff --git a/src/test/correct/basic_operation_evaluation/clang_O2/basic_operation_evaluation.expected b/src/test/correct/basic_operation_evaluation/clang_O2/basic_operation_evaluation.expected index b904c03a5..93df8d220 100644 --- a/src/test/correct/basic_operation_evaluation/clang_O2/basic_operation_evaluation.expected +++ b/src/test/correct/basic_operation_evaluation/clang_O2/basic_operation_evaluation.expected @@ -4,6 +4,11 @@ var {:extern} R0: bv64; var {:extern} mem: [bv64]bv8; const {:extern} $_IO_stdin_used_addr: bv64; axiom ($_IO_stdin_used_addr == 1840bv64); +function {:extern} {:bvbuiltin "bvadd"} bvadd64(bv64, bv64) returns (bv64); +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -16,43 +21,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1841bv64) == 0bv8); free ensures (memory_load8_le(mem, 1842bv64) == 2bv8); free ensures (memory_load8_le(mem, 1843bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -63,99 +42,32 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, R0; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1840bv64) == 1bv8); free requires (memory_load8_le(mem, 1841bv64) == 0bv8); free requires (memory_load8_le(mem, 1842bv64) == 2bv8); free requires (memory_load8_le(mem, 1843bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (memory_load8_le(mem, 1840bv64) == 1bv8); free ensures (memory_load8_le(mem, 1841bv64) == 0bv8); free ensures (memory_load8_le(mem, 1842bv64) == 2bv8); free ensures (memory_load8_le(mem, 1843bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/basic_operation_evaluation/clang_no_plt_no_pic/basic_operation_evaluation.expected b/src/test/correct/basic_operation_evaluation/clang_no_plt_no_pic/basic_operation_evaluation.expected index 69b3dc72e..0c0529a9a 100644 --- a/src/test/correct/basic_operation_evaluation/clang_no_plt_no_pic/basic_operation_evaluation.expected +++ b/src/test/correct/basic_operation_evaluation/clang_no_plt_no_pic/basic_operation_evaluation.expected @@ -43,6 +43,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -66,43 +70,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1953bv64) == 0bv8); free ensures (memory_load8_le(mem, 1954bv64) == 2bv8); free ensures (memory_load8_le(mem, 1955bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -113,98 +91,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R10, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_stack, R0, R10, R31, R8, R9, stack; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1952bv64) == 1bv8); free requires (memory_load8_le(mem, 1953bv64) == 0bv8); free requires (memory_load8_le(mem, 1954bv64) == 2bv8); free requires (memory_load8_le(mem, 1955bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1952bv64) == 1bv8); free ensures (memory_load8_le(mem, 1953bv64) == 0bv8); free ensures (memory_load8_le(mem, 1954bv64) == 2bv8); free ensures (memory_load8_le(mem, 1955bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var #4: bv32; var #5: bv32; @@ -286,3 +196,4 @@ procedure main() assume (bvcomp32(R10[32:0], 0bv32) == 0bv1); goto l00000ab1; } + diff --git a/src/test/correct/basic_operation_evaluation/clang_pic/basic_operation_evaluation.expected b/src/test/correct/basic_operation_evaluation/clang_pic/basic_operation_evaluation.expected index 69b3dc72e..0c0529a9a 100644 --- a/src/test/correct/basic_operation_evaluation/clang_pic/basic_operation_evaluation.expected +++ b/src/test/correct/basic_operation_evaluation/clang_pic/basic_operation_evaluation.expected @@ -43,6 +43,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -66,43 +70,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1953bv64) == 0bv8); free ensures (memory_load8_le(mem, 1954bv64) == 2bv8); free ensures (memory_load8_le(mem, 1955bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -113,98 +91,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R10, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_stack, R0, R10, R31, R8, R9, stack; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1952bv64) == 1bv8); free requires (memory_load8_le(mem, 1953bv64) == 0bv8); free requires (memory_load8_le(mem, 1954bv64) == 2bv8); free requires (memory_load8_le(mem, 1955bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1952bv64) == 1bv8); free ensures (memory_load8_le(mem, 1953bv64) == 0bv8); free ensures (memory_load8_le(mem, 1954bv64) == 2bv8); free ensures (memory_load8_le(mem, 1955bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var #4: bv32; var #5: bv32; @@ -286,3 +196,4 @@ procedure main() assume (bvcomp32(R10[32:0], 0bv32) == 0bv1); goto l00000ab1; } + diff --git a/src/test/correct/basic_operation_evaluation/gcc/basic_operation_evaluation.expected b/src/test/correct/basic_operation_evaluation/gcc/basic_operation_evaluation.expected index 255fa84d0..ad78cb05e 100644 --- a/src/test/correct/basic_operation_evaluation/gcc/basic_operation_evaluation.expected +++ b/src/test/correct/basic_operation_evaluation/gcc/basic_operation_evaluation.expected @@ -36,6 +36,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -58,43 +62,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1949bv64) == 0bv8); free ensures (memory_load8_le(mem, 1950bv64) == 2bv8); free ensures (memory_load8_le(mem, 1951bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -105,98 +83,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R2, Gamma_R31, Gamma_stack, R0, R1, R2, R31, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1948bv64) == 1bv8); free requires (memory_load8_le(mem, 1949bv64) == 0bv8); free requires (memory_load8_le(mem, 1950bv64) == 2bv8); free requires (memory_load8_le(mem, 1951bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1948bv64) == 1bv8); free ensures (memory_load8_le(mem, 1949bv64) == 0bv8); free ensures (memory_load8_le(mem, 1950bv64) == 2bv8); free ensures (memory_load8_le(mem, 1951bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -258,3 +168,4 @@ procedure main() assume (bvcomp32(R1[32:0], 0bv32) == 0bv1); goto l000003b8; } + diff --git a/src/test/correct/basic_operation_evaluation/gcc_O2/basic_operation_evaluation.expected b/src/test/correct/basic_operation_evaluation/gcc_O2/basic_operation_evaluation.expected index 306991d20..657d807d3 100644 --- a/src/test/correct/basic_operation_evaluation/gcc_O2/basic_operation_evaluation.expected +++ b/src/test/correct/basic_operation_evaluation/gcc_O2/basic_operation_evaluation.expected @@ -4,6 +4,11 @@ var {:extern} R0: bv64; var {:extern} mem: [bv64]bv8; const {:extern} $_IO_stdin_used_addr: bv64; axiom ($_IO_stdin_used_addr == 1896bv64); +function {:extern} {:bvbuiltin "bvadd"} bvadd64(bv64, bv64) returns (bv64); +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -16,43 +21,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -63,99 +42,32 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, R0; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1896bv64) == 1bv8); free requires (memory_load8_le(mem, 1897bv64) == 0bv8); free requires (memory_load8_le(mem, 1898bv64) == 2bv8); free requires (memory_load8_le(mem, 1899bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 80bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 0bv8); - free requires (memory_load8_le(mem, 69025bv64) == 7bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 0bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1536bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1896bv64) == 1bv8); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/basic_operation_evaluation/gcc_no_plt_no_pic/basic_operation_evaluation.expected b/src/test/correct/basic_operation_evaluation/gcc_no_plt_no_pic/basic_operation_evaluation.expected index b0c230c36..7a7b55d86 100644 --- a/src/test/correct/basic_operation_evaluation/gcc_no_plt_no_pic/basic_operation_evaluation.expected +++ b/src/test/correct/basic_operation_evaluation/gcc_no_plt_no_pic/basic_operation_evaluation.expected @@ -36,6 +36,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -58,43 +62,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1949bv64) == 0bv8); free ensures (memory_load8_le(mem, 1950bv64) == 2bv8); free ensures (memory_load8_le(mem, 1951bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -105,98 +83,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R2, Gamma_R31, Gamma_stack, R0, R1, R2, R31, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1948bv64) == 1bv8); free requires (memory_load8_le(mem, 1949bv64) == 0bv8); free requires (memory_load8_le(mem, 1950bv64) == 2bv8); free requires (memory_load8_le(mem, 1951bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1948bv64) == 1bv8); free ensures (memory_load8_le(mem, 1949bv64) == 0bv8); free ensures (memory_load8_le(mem, 1950bv64) == 2bv8); free ensures (memory_load8_le(mem, 1951bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -258,3 +168,4 @@ procedure main() assume (bvcomp32(R1[32:0], 0bv32) == 0bv1); goto l00000a73; } + diff --git a/src/test/correct/basic_operation_evaluation/gcc_pic/basic_operation_evaluation.expected b/src/test/correct/basic_operation_evaluation/gcc_pic/basic_operation_evaluation.expected index b0c230c36..7a7b55d86 100644 --- a/src/test/correct/basic_operation_evaluation/gcc_pic/basic_operation_evaluation.expected +++ b/src/test/correct/basic_operation_evaluation/gcc_pic/basic_operation_evaluation.expected @@ -36,6 +36,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -58,43 +62,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1949bv64) == 0bv8); free ensures (memory_load8_le(mem, 1950bv64) == 2bv8); free ensures (memory_load8_le(mem, 1951bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -105,98 +83,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R2, Gamma_R31, Gamma_stack, R0, R1, R2, R31, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1948bv64) == 1bv8); free requires (memory_load8_le(mem, 1949bv64) == 0bv8); free requires (memory_load8_le(mem, 1950bv64) == 2bv8); free requires (memory_load8_le(mem, 1951bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1948bv64) == 1bv8); free ensures (memory_load8_le(mem, 1949bv64) == 0bv8); free ensures (memory_load8_le(mem, 1950bv64) == 2bv8); free ensures (memory_load8_le(mem, 1951bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -258,3 +168,4 @@ procedure main() assume (bvcomp32(R1[32:0], 0bv32) == 0bv1); goto l00000a73; } + diff --git a/src/test/correct/basic_sec_policy_read/clang/basic_sec_policy_read.expected b/src/test/correct/basic_sec_policy_read/clang/basic_sec_policy_read.expected index ccd417130..d3df02ca2 100644 --- a/src/test/correct/basic_sec_policy_read/clang/basic_sec_policy_read.expected +++ b/src/test/correct/basic_sec_policy_read/clang/basic_sec_policy_read.expected @@ -35,6 +35,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -54,150 +58,60 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((old(memory_load32_le(mem, $z_addr)) != 0bv32) ==> (memory_load32_le(mem, $z_addr) != 0bv32)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $z_addr) != 0bv32) ==> (memory_load32_le(mem, $z_addr) != 0bv32)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_mem, Gamma_stack, R0, R31, R8, mem, stack; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1896bv64) == 1bv8); free requires (memory_load8_le(mem, 1897bv64) == 0bv8); free requires (memory_load8_le(mem, 1898bv64) == 2bv8); free requires (memory_load8_le(mem, 1899bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1896bv64) == 1bv8); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -272,3 +186,4 @@ procedure main() assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l0000035b; } + diff --git a/src/test/correct/basic_sec_policy_read/clang_O2/basic_sec_policy_read.expected b/src/test/correct/basic_sec_policy_read/clang_O2/basic_sec_policy_read.expected index 92491b85c..52ed26e37 100644 --- a/src/test/correct/basic_sec_policy_read/clang_O2/basic_sec_policy_read.expected +++ b/src/test/correct/basic_sec_policy_read/clang_O2/basic_sec_policy_read.expected @@ -29,6 +29,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -44,148 +48,58 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1861bv64) == 0bv8); free ensures (memory_load8_le(mem, 1862bv64) == 2bv8); free ensures (memory_load8_le(mem, 1863bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((old(memory_load32_le(mem, $z_addr)) != 0bv32) ==> (memory_load32_le(mem, $z_addr) != 0bv32)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $z_addr) != 0bv32) ==> (memory_load32_le(mem, $z_addr) != 0bv32)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R8, Gamma_R9, Gamma_mem, R0, R8, R9, mem; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1860bv64) == 1bv8); free requires (memory_load8_le(mem, 1861bv64) == 0bv8); free requires (memory_load8_le(mem, 1862bv64) == 2bv8); free requires (memory_load8_le(mem, 1863bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (memory_load8_le(mem, 1860bv64) == 1bv8); free ensures (memory_load8_le(mem, 1861bv64) == 0bv8); free ensures (memory_load8_le(mem, 1862bv64) == 2bv8); free ensures (memory_load8_le(mem, 1863bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -232,3 +146,4 @@ procedure main() assume (bvcomp1(ZF, 1bv1) == 0bv1); goto l000002fd; } + diff --git a/src/test/correct/basic_sec_policy_read/clang_no_plt_no_pic/basic_sec_policy_read.expected b/src/test/correct/basic_sec_policy_read/clang_no_plt_no_pic/basic_sec_policy_read.expected index 230807188..801699e47 100644 --- a/src/test/correct/basic_sec_policy_read/clang_no_plt_no_pic/basic_sec_policy_read.expected +++ b/src/test/correct/basic_sec_policy_read/clang_no_plt_no_pic/basic_sec_policy_read.expected @@ -35,6 +35,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -54,150 +58,60 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((old(memory_load32_le(mem, $z_addr)) != 0bv32) ==> (memory_load32_le(mem, $z_addr) != 0bv32)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $z_addr) != 0bv32) ==> (memory_load32_le(mem, $z_addr) != 0bv32)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_mem, Gamma_stack, R0, R31, R8, mem, stack; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1896bv64) == 1bv8); free requires (memory_load8_le(mem, 1897bv64) == 0bv8); free requires (memory_load8_le(mem, 1898bv64) == 2bv8); free requires (memory_load8_le(mem, 1899bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1896bv64) == 1bv8); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -272,3 +186,4 @@ procedure main() assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l00000979; } + diff --git a/src/test/correct/basic_sec_policy_read/clang_pic/basic_sec_policy_read.expected b/src/test/correct/basic_sec_policy_read/clang_pic/basic_sec_policy_read.expected index 4046bd5c3..012c24569 100644 --- a/src/test/correct/basic_sec_policy_read/clang_pic/basic_sec_policy_read.expected +++ b/src/test/correct/basic_sec_policy_read/clang_pic/basic_sec_policy_read.expected @@ -62,198 +62,66 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1969bv64) == 0bv8); free ensures (memory_load8_le(mem, 1970bv64) == 2bv8); free ensures (memory_load8_le(mem, 1971bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69576bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69577bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69578bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69579bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69580bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69581bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69582bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69583bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69048bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69049bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69050bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69051bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69052bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69053bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69054bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69055bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69568bv64) == 56bv8); - free ensures (memory_load8_le(mem, 69569bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69570bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69571bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69572bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69573bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69574bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69575bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69576bv64) == 69684bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69048bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69568bv64) == 69688bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1792bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((old(memory_load32_le(mem, $z_addr)) != 0bv32) ==> (memory_load32_le(mem, $z_addr) != 0bv32)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $z_addr) != 0bv32) ==> (memory_load32_le(mem, $z_addr) != 0bv32)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_mem, Gamma_stack, R0, R31, R8, mem, stack; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1968bv64) == 1bv8); free requires (memory_load8_le(mem, 1969bv64) == 0bv8); free requires (memory_load8_le(mem, 1970bv64) == 2bv8); free requires (memory_load8_le(mem, 1971bv64) == 0bv8); - free requires (memory_load8_le(mem, 69576bv64) == 52bv8); - free requires (memory_load8_le(mem, 69577bv64) == 16bv8); - free requires (memory_load8_le(mem, 69578bv64) == 1bv8); - free requires (memory_load8_le(mem, 69579bv64) == 0bv8); - free requires (memory_load8_le(mem, 69580bv64) == 0bv8); - free requires (memory_load8_le(mem, 69581bv64) == 0bv8); - free requires (memory_load8_le(mem, 69582bv64) == 0bv8); - free requires (memory_load8_le(mem, 69583bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); - free requires (memory_load8_le(mem, 69048bv64) == 80bv8); - free requires (memory_load8_le(mem, 69049bv64) == 7bv8); - free requires (memory_load8_le(mem, 69050bv64) == 0bv8); - free requires (memory_load8_le(mem, 69051bv64) == 0bv8); - free requires (memory_load8_le(mem, 69052bv64) == 0bv8); - free requires (memory_load8_le(mem, 69053bv64) == 0bv8); - free requires (memory_load8_le(mem, 69054bv64) == 0bv8); - free requires (memory_load8_le(mem, 69055bv64) == 0bv8); - free requires (memory_load8_le(mem, 69568bv64) == 56bv8); - free requires (memory_load8_le(mem, 69569bv64) == 16bv8); - free requires (memory_load8_le(mem, 69570bv64) == 1bv8); - free requires (memory_load8_le(mem, 69571bv64) == 0bv8); - free requires (memory_load8_le(mem, 69572bv64) == 0bv8); - free requires (memory_load8_le(mem, 69573bv64) == 0bv8); - free requires (memory_load8_le(mem, 69574bv64) == 0bv8); - free requires (memory_load8_le(mem, 69575bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 84bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69056bv64) == 0bv8); - free requires (memory_load8_le(mem, 69057bv64) == 7bv8); - free requires (memory_load8_le(mem, 69058bv64) == 0bv8); - free requires (memory_load8_le(mem, 69059bv64) == 0bv8); - free requires (memory_load8_le(mem, 69060bv64) == 0bv8); - free requires (memory_load8_le(mem, 69061bv64) == 0bv8); - free requires (memory_load8_le(mem, 69062bv64) == 0bv8); - free requires (memory_load8_le(mem, 69063bv64) == 0bv8); + free requires (memory_load64_le(mem, 69576bv64) == 69684bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); + free requires (memory_load64_le(mem, 69048bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69568bv64) == 69688bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69056bv64) == 1792bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1968bv64) == 1bv8); free ensures (memory_load8_le(mem, 1969bv64) == 0bv8); free ensures (memory_load8_le(mem, 1970bv64) == 2bv8); free ensures (memory_load8_le(mem, 1971bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69576bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69577bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69578bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69579bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69580bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69581bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69582bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69583bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69048bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69049bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69050bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69051bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69052bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69053bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69054bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69055bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69568bv64) == 56bv8); - free ensures (memory_load8_le(mem, 69569bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69570bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69571bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69572bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69573bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69574bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69575bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69576bv64) == 69684bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69048bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69568bv64) == 69688bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1792bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -332,3 +200,4 @@ procedure main() assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l00000371; } + diff --git a/src/test/correct/basic_sec_policy_read/gcc/basic_sec_policy_read.expected b/src/test/correct/basic_sec_policy_read/gcc/basic_sec_policy_read.expected index 7bae9d7fb..09f319a88 100644 --- a/src/test/correct/basic_sec_policy_read/gcc/basic_sec_policy_read.expected +++ b/src/test/correct/basic_sec_policy_read/gcc/basic_sec_policy_read.expected @@ -33,6 +33,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -52,150 +56,60 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1889bv64) == 0bv8); free ensures (memory_load8_le(mem, 1890bv64) == 2bv8); free ensures (memory_load8_le(mem, 1891bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((old(memory_load32_le(mem, $z_addr)) != 0bv32) ==> (memory_load32_le(mem, $z_addr) != 0bv32)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $z_addr) != 0bv32) ==> (memory_load32_le(mem, $z_addr) != 0bv32)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_mem, Gamma_stack, R0, R31, mem, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1888bv64) == 1bv8); free requires (memory_load8_le(mem, 1889bv64) == 0bv8); free requires (memory_load8_le(mem, 1890bv64) == 2bv8); free requires (memory_load8_le(mem, 1891bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1888bv64) == 1bv8); free ensures (memory_load8_le(mem, 1889bv64) == 0bv8); free ensures (memory_load8_le(mem, 1890bv64) == 2bv8); free ensures (memory_load8_le(mem, 1891bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -246,3 +160,4 @@ procedure main() assume (bvcomp1(ZF, 1bv1) == 0bv1); goto l00000345; } + diff --git a/src/test/correct/basic_sec_policy_read/gcc_O2/basic_sec_policy_read.expected b/src/test/correct/basic_sec_policy_read/gcc_O2/basic_sec_policy_read.expected index 44fc144b9..932695a5d 100644 --- a/src/test/correct/basic_sec_policy_read/gcc_O2/basic_sec_policy_read.expected +++ b/src/test/correct/basic_sec_policy_read/gcc_O2/basic_sec_policy_read.expected @@ -25,6 +25,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -38,148 +42,58 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((old(memory_load32_le(mem, $z_addr)) != 0bv32) ==> (memory_load32_le(mem, $z_addr) != 0bv32)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $z_addr) != 0bv32) ==> (memory_load32_le(mem, $z_addr) != 0bv32)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R2, Gamma_mem, R0, R1, R2, mem; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1896bv64) == 1bv8); free requires (memory_load8_le(mem, 1897bv64) == 0bv8); free requires (memory_load8_le(mem, 1898bv64) == 2bv8); free requires (memory_load8_le(mem, 1899bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 80bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 0bv8); - free requires (memory_load8_le(mem, 69025bv64) == 7bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 0bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1536bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1896bv64) == 1bv8); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -207,3 +121,4 @@ procedure main() assume (bvnot1(bvcomp32(R1[32:0], 0bv32)) == 0bv1); goto l0000039c; } + diff --git a/src/test/correct/basic_sec_policy_read/gcc_no_plt_no_pic/basic_sec_policy_read.expected b/src/test/correct/basic_sec_policy_read/gcc_no_plt_no_pic/basic_sec_policy_read.expected index 7882f9a88..649cd90fb 100644 --- a/src/test/correct/basic_sec_policy_read/gcc_no_plt_no_pic/basic_sec_policy_read.expected +++ b/src/test/correct/basic_sec_policy_read/gcc_no_plt_no_pic/basic_sec_policy_read.expected @@ -33,6 +33,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -52,150 +56,60 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1889bv64) == 0bv8); free ensures (memory_load8_le(mem, 1890bv64) == 2bv8); free ensures (memory_load8_le(mem, 1891bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((old(memory_load32_le(mem, $z_addr)) != 0bv32) ==> (memory_load32_le(mem, $z_addr) != 0bv32)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $z_addr) != 0bv32) ==> (memory_load32_le(mem, $z_addr) != 0bv32)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_mem, Gamma_stack, R0, R31, mem, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1888bv64) == 1bv8); free requires (memory_load8_le(mem, 1889bv64) == 0bv8); free requires (memory_load8_le(mem, 1890bv64) == 2bv8); free requires (memory_load8_le(mem, 1891bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1888bv64) == 1bv8); free ensures (memory_load8_le(mem, 1889bv64) == 0bv8); free ensures (memory_load8_le(mem, 1890bv64) == 2bv8); free ensures (memory_load8_le(mem, 1891bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -246,3 +160,4 @@ procedure main() assume (bvcomp1(ZF, 1bv1) == 0bv1); goto l00000942; } + diff --git a/src/test/correct/basic_sec_policy_read/gcc_pic/basic_sec_policy_read.expected b/src/test/correct/basic_sec_policy_read/gcc_pic/basic_sec_policy_read.expected index 2802fe353..6cb642e12 100644 --- a/src/test/correct/basic_sec_policy_read/gcc_pic/basic_sec_policy_read.expected +++ b/src/test/correct/basic_sec_policy_read/gcc_pic/basic_sec_policy_read.expected @@ -60,198 +60,66 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1953bv64) == 0bv8); free ensures (memory_load8_le(mem, 1954bv64) == 2bv8); free ensures (memory_load8_le(mem, 1955bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69600bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69601bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69602bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69603bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69604bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69605bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69606bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69607bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 24bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69600bv64) == 69652bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 69656bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1872bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((old(memory_load32_le(mem, $z_addr)) != 0bv32) ==> (memory_load32_le(mem, $z_addr) != 0bv32)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $z_addr) != 0bv32) ==> (memory_load32_le(mem, $z_addr) != 0bv32)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_mem, Gamma_stack, R0, R31, mem, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1952bv64) == 1bv8); free requires (memory_load8_le(mem, 1953bv64) == 0bv8); free requires (memory_load8_le(mem, 1954bv64) == 2bv8); free requires (memory_load8_le(mem, 1955bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 84bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69600bv64) == 20bv8); - free requires (memory_load8_le(mem, 69601bv64) == 16bv8); - free requires (memory_load8_le(mem, 69602bv64) == 1bv8); - free requires (memory_load8_le(mem, 69603bv64) == 0bv8); - free requires (memory_load8_le(mem, 69604bv64) == 0bv8); - free requires (memory_load8_le(mem, 69605bv64) == 0bv8); - free requires (memory_load8_le(mem, 69606bv64) == 0bv8); - free requires (memory_load8_le(mem, 69607bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 0bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 24bv8); - free requires (memory_load8_le(mem, 69593bv64) == 16bv8); - free requires (memory_load8_le(mem, 69594bv64) == 1bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 80bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69600bv64) == 69652bv64); + free requires (memory_load64_le(mem, 69008bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69592bv64) == 69656bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1872bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1952bv64) == 1bv8); free ensures (memory_load8_le(mem, 1953bv64) == 0bv8); free ensures (memory_load8_le(mem, 1954bv64) == 2bv8); free ensures (memory_load8_le(mem, 1955bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69600bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69601bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69602bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69603bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69604bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69605bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69606bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69607bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 24bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69600bv64) == 69652bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 69656bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1872bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -304,3 +172,4 @@ procedure main() assume (bvcomp1(ZF, 1bv1) == 0bv1); goto l00000347; } + diff --git a/src/test/correct/basic_sec_policy_write/clang/basic_sec_policy_write.expected b/src/test/correct/basic_sec_policy_write/clang/basic_sec_policy_write.expected index 201b37eeb..ff3f08d23 100644 --- a/src/test/correct/basic_sec_policy_write/clang/basic_sec_policy_write.expected +++ b/src/test/correct/basic_sec_policy_write/clang/basic_sec_policy_write.expected @@ -33,6 +33,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -50,151 +54,61 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1889bv64) == 0bv8); free ensures (memory_load8_le(mem, 1890bv64) == 2bv8); free ensures (memory_load8_le(mem, 1891bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (old(memory_load32_le(mem, $z_addr)) == memory_load32_le(mem, $z_addr)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $z_addr) != 0bv32) ==> (memory_load32_le(mem, $z_addr) != 0bv32)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R10, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R10, R31, R8, R9, mem, stack; requires (Gamma_R0 == false); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1888bv64) == 1bv8); free requires (memory_load8_le(mem, 1889bv64) == 0bv8); free requires (memory_load8_le(mem, 1890bv64) == 2bv8); free requires (memory_load8_le(mem, 1891bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1888bv64) == 1bv8); free ensures (memory_load8_le(mem, 1889bv64) == 0bv8); free ensures (memory_load8_le(mem, 1890bv64) == 2bv8); free ensures (memory_load8_le(mem, 1891bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var Gamma_x_old: bool; var z_old: bv32; @@ -244,3 +158,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/correct/basic_sec_policy_write/clang_O2/basic_sec_policy_write.expected b/src/test/correct/basic_sec_policy_write/clang_O2/basic_sec_policy_write.expected index 9dac0c99a..265c75910 100644 --- a/src/test/correct/basic_sec_policy_write/clang_O2/basic_sec_policy_write.expected +++ b/src/test/correct/basic_sec_policy_write/clang_O2/basic_sec_policy_write.expected @@ -29,6 +29,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -45,149 +49,59 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1861bv64) == 0bv8); free ensures (memory_load8_le(mem, 1862bv64) == 2bv8); free ensures (memory_load8_le(mem, 1863bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (old(memory_load32_le(mem, $z_addr)) == memory_load32_le(mem, $z_addr)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $z_addr) != 0bv32) ==> (memory_load32_le(mem, $z_addr) != 0bv32)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R10, Gamma_R8, Gamma_R9, Gamma_mem, R0, R10, R8, R9, mem; requires (Gamma_R0 == false); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1860bv64) == 1bv8); free requires (memory_load8_le(mem, 1861bv64) == 0bv8); free requires (memory_load8_le(mem, 1862bv64) == 2bv8); free requires (memory_load8_le(mem, 1863bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (memory_load8_le(mem, 1860bv64) == 1bv8); free ensures (memory_load8_le(mem, 1861bv64) == 0bv8); free ensures (memory_load8_le(mem, 1862bv64) == 2bv8); free ensures (memory_load8_le(mem, 1863bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var Gamma_x_old: bool; var z_old: bv32; @@ -215,3 +129,4 @@ procedure main() assume {:captureState "%000002e7"} true; return; } + diff --git a/src/test/correct/basic_sec_policy_write/clang_no_plt_no_pic/basic_sec_policy_write.expected b/src/test/correct/basic_sec_policy_write/clang_no_plt_no_pic/basic_sec_policy_write.expected index bf97d9983..b840b320f 100644 --- a/src/test/correct/basic_sec_policy_write/clang_no_plt_no_pic/basic_sec_policy_write.expected +++ b/src/test/correct/basic_sec_policy_write/clang_no_plt_no_pic/basic_sec_policy_write.expected @@ -33,6 +33,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -50,151 +54,61 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1889bv64) == 0bv8); free ensures (memory_load8_le(mem, 1890bv64) == 2bv8); free ensures (memory_load8_le(mem, 1891bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (old(memory_load32_le(mem, $z_addr)) == memory_load32_le(mem, $z_addr)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $z_addr) != 0bv32) ==> (memory_load32_le(mem, $z_addr) != 0bv32)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R10, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R10, R31, R8, R9, mem, stack; requires (Gamma_R0 == false); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1888bv64) == 1bv8); free requires (memory_load8_le(mem, 1889bv64) == 0bv8); free requires (memory_load8_le(mem, 1890bv64) == 2bv8); free requires (memory_load8_le(mem, 1891bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1888bv64) == 1bv8); free ensures (memory_load8_le(mem, 1889bv64) == 0bv8); free ensures (memory_load8_le(mem, 1890bv64) == 2bv8); free ensures (memory_load8_le(mem, 1891bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var Gamma_x_old: bool; var z_old: bv32; @@ -244,3 +158,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/correct/basic_sec_policy_write/clang_pic/basic_sec_policy_write.expected b/src/test/correct/basic_sec_policy_write/clang_pic/basic_sec_policy_write.expected index 36ab6f168..1db974e9f 100644 --- a/src/test/correct/basic_sec_policy_write/clang_pic/basic_sec_policy_write.expected +++ b/src/test/correct/basic_sec_policy_write/clang_pic/basic_sec_policy_write.expected @@ -58,199 +58,67 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1961bv64) == 0bv8); free ensures (memory_load8_le(mem, 1962bv64) == 2bv8); free ensures (memory_load8_le(mem, 1963bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69576bv64) == 56bv8); - free ensures (memory_load8_le(mem, 69577bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69578bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69579bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69580bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69581bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69582bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69583bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69048bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69049bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69050bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69051bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69052bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69053bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69054bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69055bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69568bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69569bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69570bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69571bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69572bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69573bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69574bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69575bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69576bv64) == 69688bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69048bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69568bv64) == 69684bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1792bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (old(memory_load32_le(mem, $z_addr)) == memory_load32_le(mem, $z_addr)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $z_addr) != 0bv32) ==> (memory_load32_le(mem, $z_addr) != 0bv32)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R10, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R10, R31, R8, R9, mem, stack; requires (Gamma_R0 == false); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1960bv64) == 1bv8); free requires (memory_load8_le(mem, 1961bv64) == 0bv8); free requires (memory_load8_le(mem, 1962bv64) == 2bv8); free requires (memory_load8_le(mem, 1963bv64) == 0bv8); - free requires (memory_load8_le(mem, 69576bv64) == 56bv8); - free requires (memory_load8_le(mem, 69577bv64) == 16bv8); - free requires (memory_load8_le(mem, 69578bv64) == 1bv8); - free requires (memory_load8_le(mem, 69579bv64) == 0bv8); - free requires (memory_load8_le(mem, 69580bv64) == 0bv8); - free requires (memory_load8_le(mem, 69581bv64) == 0bv8); - free requires (memory_load8_le(mem, 69582bv64) == 0bv8); - free requires (memory_load8_le(mem, 69583bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); - free requires (memory_load8_le(mem, 69048bv64) == 80bv8); - free requires (memory_load8_le(mem, 69049bv64) == 7bv8); - free requires (memory_load8_le(mem, 69050bv64) == 0bv8); - free requires (memory_load8_le(mem, 69051bv64) == 0bv8); - free requires (memory_load8_le(mem, 69052bv64) == 0bv8); - free requires (memory_load8_le(mem, 69053bv64) == 0bv8); - free requires (memory_load8_le(mem, 69054bv64) == 0bv8); - free requires (memory_load8_le(mem, 69055bv64) == 0bv8); - free requires (memory_load8_le(mem, 69568bv64) == 52bv8); - free requires (memory_load8_le(mem, 69569bv64) == 16bv8); - free requires (memory_load8_le(mem, 69570bv64) == 1bv8); - free requires (memory_load8_le(mem, 69571bv64) == 0bv8); - free requires (memory_load8_le(mem, 69572bv64) == 0bv8); - free requires (memory_load8_le(mem, 69573bv64) == 0bv8); - free requires (memory_load8_le(mem, 69574bv64) == 0bv8); - free requires (memory_load8_le(mem, 69575bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 84bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69056bv64) == 0bv8); - free requires (memory_load8_le(mem, 69057bv64) == 7bv8); - free requires (memory_load8_le(mem, 69058bv64) == 0bv8); - free requires (memory_load8_le(mem, 69059bv64) == 0bv8); - free requires (memory_load8_le(mem, 69060bv64) == 0bv8); - free requires (memory_load8_le(mem, 69061bv64) == 0bv8); - free requires (memory_load8_le(mem, 69062bv64) == 0bv8); - free requires (memory_load8_le(mem, 69063bv64) == 0bv8); + free requires (memory_load64_le(mem, 69576bv64) == 69688bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); + free requires (memory_load64_le(mem, 69048bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69568bv64) == 69684bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69056bv64) == 1792bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1960bv64) == 1bv8); free ensures (memory_load8_le(mem, 1961bv64) == 0bv8); free ensures (memory_load8_le(mem, 1962bv64) == 2bv8); free ensures (memory_load8_le(mem, 1963bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69576bv64) == 56bv8); - free ensures (memory_load8_le(mem, 69577bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69578bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69579bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69580bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69581bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69582bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69583bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69048bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69049bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69050bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69051bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69052bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69053bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69054bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69055bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69568bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69569bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69570bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69571bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69572bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69573bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69574bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69575bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69576bv64) == 69688bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69048bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69568bv64) == 69684bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1792bv64); + +implementation main() { var Gamma_x_old: bool; var z_old: bv32; @@ -304,3 +172,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/correct/basic_sec_policy_write/gcc/basic_sec_policy_write.expected b/src/test/correct/basic_sec_policy_write/gcc/basic_sec_policy_write.expected index e1602790f..5938703b5 100644 --- a/src/test/correct/basic_sec_policy_write/gcc/basic_sec_policy_write.expected +++ b/src/test/correct/basic_sec_policy_write/gcc/basic_sec_policy_write.expected @@ -29,6 +29,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -46,151 +50,61 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1913bv64) == 0bv8); free ensures (memory_load8_le(mem, 1914bv64) == 2bv8); free ensures (memory_load8_le(mem, 1915bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (old(memory_load32_le(mem, $z_addr)) == memory_load32_le(mem, $z_addr)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $z_addr) != 0bv32) ==> (memory_load32_le(mem, $z_addr) != 0bv32)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R31, mem, stack; requires (Gamma_R0 == false); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1912bv64) == 1bv8); free requires (memory_load8_le(mem, 1913bv64) == 0bv8); free requires (memory_load8_le(mem, 1914bv64) == 2bv8); free requires (memory_load8_le(mem, 1915bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1912bv64) == 1bv8); free ensures (memory_load8_le(mem, 1913bv64) == 0bv8); free ensures (memory_load8_le(mem, 1914bv64) == 2bv8); free ensures (memory_load8_le(mem, 1915bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var Gamma_x_old: bool; var z_old: bv32; @@ -246,3 +160,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/correct/basic_sec_policy_write/gcc_O2/basic_sec_policy_write.expected b/src/test/correct/basic_sec_policy_write/gcc_O2/basic_sec_policy_write.expected index 08c116932..be4b9b9c7 100644 --- a/src/test/correct/basic_sec_policy_write/gcc_O2/basic_sec_policy_write.expected +++ b/src/test/correct/basic_sec_policy_write/gcc_O2/basic_sec_policy_write.expected @@ -29,6 +29,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -45,149 +49,59 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (old(memory_load32_le(mem, $z_addr)) == memory_load32_le(mem, $z_addr)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $z_addr) != 0bv32) ==> (memory_load32_le(mem, $z_addr) != 0bv32)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R2, Gamma_R3, Gamma_mem, R0, R1, R2, R3, mem; requires (Gamma_R0 == false); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1896bv64) == 1bv8); free requires (memory_load8_le(mem, 1897bv64) == 0bv8); free requires (memory_load8_le(mem, 1898bv64) == 2bv8); free requires (memory_load8_le(mem, 1899bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 80bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 0bv8); - free requires (memory_load8_le(mem, 69025bv64) == 7bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 0bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1536bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1896bv64) == 1bv8); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var Gamma_x_old: bool; var z_old: bv32; @@ -215,3 +129,4 @@ procedure main() assume {:captureState "%000001ca"} true; return; } + diff --git a/src/test/correct/basic_sec_policy_write/gcc_no_plt_no_pic/basic_sec_policy_write.expected b/src/test/correct/basic_sec_policy_write/gcc_no_plt_no_pic/basic_sec_policy_write.expected index 959c60219..7dd67fdb8 100644 --- a/src/test/correct/basic_sec_policy_write/gcc_no_plt_no_pic/basic_sec_policy_write.expected +++ b/src/test/correct/basic_sec_policy_write/gcc_no_plt_no_pic/basic_sec_policy_write.expected @@ -29,6 +29,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -46,151 +50,61 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1913bv64) == 0bv8); free ensures (memory_load8_le(mem, 1914bv64) == 2bv8); free ensures (memory_load8_le(mem, 1915bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (old(memory_load32_le(mem, $z_addr)) == memory_load32_le(mem, $z_addr)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $z_addr) != 0bv32) ==> (memory_load32_le(mem, $z_addr) != 0bv32)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R31, mem, stack; requires (Gamma_R0 == false); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1912bv64) == 1bv8); free requires (memory_load8_le(mem, 1913bv64) == 0bv8); free requires (memory_load8_le(mem, 1914bv64) == 2bv8); free requires (memory_load8_le(mem, 1915bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1912bv64) == 1bv8); free ensures (memory_load8_le(mem, 1913bv64) == 0bv8); free ensures (memory_load8_le(mem, 1914bv64) == 2bv8); free ensures (memory_load8_le(mem, 1915bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var Gamma_x_old: bool; var z_old: bv32; @@ -246,3 +160,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/correct/basic_sec_policy_write/gcc_pic/basic_sec_policy_write.expected b/src/test/correct/basic_sec_policy_write/gcc_pic/basic_sec_policy_write.expected index 1fd3aca8c..1b7295c33 100644 --- a/src/test/correct/basic_sec_policy_write/gcc_pic/basic_sec_policy_write.expected +++ b/src/test/correct/basic_sec_policy_write/gcc_pic/basic_sec_policy_write.expected @@ -54,199 +54,67 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1977bv64) == 0bv8); free ensures (memory_load8_le(mem, 1978bv64) == 2bv8); free ensures (memory_load8_le(mem, 1979bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69600bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69601bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69602bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69603bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69604bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69605bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69606bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69607bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 24bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69600bv64) == 69652bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 69656bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1872bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (old(memory_load32_le(mem, $z_addr)) == memory_load32_le(mem, $z_addr)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $z_addr) != 0bv32) ==> (memory_load32_le(mem, $z_addr) != 0bv32)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R31, mem, stack; requires (Gamma_R0 == false); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1976bv64) == 1bv8); free requires (memory_load8_le(mem, 1977bv64) == 0bv8); free requires (memory_load8_le(mem, 1978bv64) == 2bv8); free requires (memory_load8_le(mem, 1979bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 84bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69600bv64) == 20bv8); - free requires (memory_load8_le(mem, 69601bv64) == 16bv8); - free requires (memory_load8_le(mem, 69602bv64) == 1bv8); - free requires (memory_load8_le(mem, 69603bv64) == 0bv8); - free requires (memory_load8_le(mem, 69604bv64) == 0bv8); - free requires (memory_load8_le(mem, 69605bv64) == 0bv8); - free requires (memory_load8_le(mem, 69606bv64) == 0bv8); - free requires (memory_load8_le(mem, 69607bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 0bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 24bv8); - free requires (memory_load8_le(mem, 69593bv64) == 16bv8); - free requires (memory_load8_le(mem, 69594bv64) == 1bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 80bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69600bv64) == 69652bv64); + free requires (memory_load64_le(mem, 69008bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69592bv64) == 69656bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1872bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1976bv64) == 1bv8); free ensures (memory_load8_le(mem, 1977bv64) == 0bv8); free ensures (memory_load8_le(mem, 1978bv64) == 2bv8); free ensures (memory_load8_le(mem, 1979bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69600bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69601bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69602bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69603bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69604bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69605bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69606bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69607bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 24bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69600bv64) == 69652bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 69656bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1872bv64); + +implementation main() { var Gamma_x_old: bool; var z_old: bv32; @@ -306,3 +174,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/correct/basicassign_gamma0/clang/basicassign_gamma0.expected b/src/test/correct/basicassign_gamma0/clang/basicassign_gamma0.expected index 4fd51f050..6ae41834b 100644 --- a/src/test/correct/basicassign_gamma0/clang/basicassign_gamma0.expected +++ b/src/test/correct/basicassign_gamma0/clang/basicassign_gamma0.expected @@ -27,6 +27,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -44,48 +48,24 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1857bv64) == 0bv8); free ensures (memory_load8_le(mem, 1858bv64) == 2bv8); free ensures (memory_load8_le(mem, 1859bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $secret_addr) == old(memory_load32_le(mem, $secret_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $secret_addr) == memory_load32_le(mem, $secret_addr)); } @@ -93,97 +73,29 @@ procedure {:extern} rely_reflexive() procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R8, Gamma_R9, Gamma_mem, R0, R8, R9, mem; requires (gamma_load32(Gamma_mem, $secret_addr) == true); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1856bv64) == 1bv8); free requires (memory_load8_le(mem, 1857bv64) == 0bv8); free requires (memory_load8_le(mem, 1858bv64) == 2bv8); free requires (memory_load8_le(mem, 1859bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (memory_load8_le(mem, 1856bv64) == 1bv8); free ensures (memory_load8_le(mem, 1857bv64) == 0bv8); free ensures (memory_load8_le(mem, 1858bv64) == 2bv8); free ensures (memory_load8_le(mem, 1859bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -198,3 +110,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/basicassign_gamma0/clang_O2/basicassign_gamma0.expected b/src/test/correct/basicassign_gamma0/clang_O2/basicassign_gamma0.expected index 0a66841bf..dd4546591 100644 --- a/src/test/correct/basicassign_gamma0/clang_O2/basicassign_gamma0.expected +++ b/src/test/correct/basicassign_gamma0/clang_O2/basicassign_gamma0.expected @@ -27,6 +27,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -44,48 +48,24 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1857bv64) == 0bv8); free ensures (memory_load8_le(mem, 1858bv64) == 2bv8); free ensures (memory_load8_le(mem, 1859bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $secret_addr) == old(memory_load32_le(mem, $secret_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $secret_addr) == memory_load32_le(mem, $secret_addr)); } @@ -93,97 +73,29 @@ procedure {:extern} rely_reflexive() procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R8, Gamma_R9, Gamma_mem, R0, R8, R9, mem; requires (gamma_load32(Gamma_mem, $secret_addr) == true); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1856bv64) == 1bv8); free requires (memory_load8_le(mem, 1857bv64) == 0bv8); free requires (memory_load8_le(mem, 1858bv64) == 2bv8); free requires (memory_load8_le(mem, 1859bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (memory_load8_le(mem, 1856bv64) == 1bv8); free ensures (memory_load8_le(mem, 1857bv64) == 0bv8); free ensures (memory_load8_le(mem, 1858bv64) == 2bv8); free ensures (memory_load8_le(mem, 1859bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -198,3 +110,4 @@ procedure main() assume {:captureState "%000002de"} true; return; } + diff --git a/src/test/correct/basicassign_gamma0/clang_no_plt_no_pic/basicassign_gamma0.expected b/src/test/correct/basicassign_gamma0/clang_no_plt_no_pic/basicassign_gamma0.expected index 2a980ae8e..25c8f2b6b 100644 --- a/src/test/correct/basicassign_gamma0/clang_no_plt_no_pic/basicassign_gamma0.expected +++ b/src/test/correct/basicassign_gamma0/clang_no_plt_no_pic/basicassign_gamma0.expected @@ -27,6 +27,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -44,48 +48,24 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1857bv64) == 0bv8); free ensures (memory_load8_le(mem, 1858bv64) == 2bv8); free ensures (memory_load8_le(mem, 1859bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $secret_addr) == old(memory_load32_le(mem, $secret_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $secret_addr) == memory_load32_le(mem, $secret_addr)); } @@ -93,97 +73,29 @@ procedure {:extern} rely_reflexive() procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R8, Gamma_R9, Gamma_mem, R0, R8, R9, mem; requires (gamma_load32(Gamma_mem, $secret_addr) == true); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1856bv64) == 1bv8); free requires (memory_load8_le(mem, 1857bv64) == 0bv8); free requires (memory_load8_le(mem, 1858bv64) == 2bv8); free requires (memory_load8_le(mem, 1859bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (memory_load8_le(mem, 1856bv64) == 1bv8); free ensures (memory_load8_le(mem, 1857bv64) == 0bv8); free ensures (memory_load8_le(mem, 1858bv64) == 2bv8); free ensures (memory_load8_le(mem, 1859bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -198,3 +110,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/basicassign_gamma0/clang_pic/basicassign_gamma0.expected b/src/test/correct/basicassign_gamma0/clang_pic/basicassign_gamma0.expected index 49233a65d..6d2a3151e 100644 --- a/src/test/correct/basicassign_gamma0/clang_pic/basicassign_gamma0.expected +++ b/src/test/correct/basicassign_gamma0/clang_pic/basicassign_gamma0.expected @@ -52,64 +52,26 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1929bv64) == 0bv8); free ensures (memory_load8_le(mem, 1930bv64) == 2bv8); free ensures (memory_load8_le(mem, 1931bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69584bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69585bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69586bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69587bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69588bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69589bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69590bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69591bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69048bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69049bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69050bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69051bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69052bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69053bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69054bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69055bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69568bv64) == 56bv8); - free ensures (memory_load8_le(mem, 69569bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69570bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69571bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69572bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69573bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69574bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69575bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69584bv64) == 69684bv64); + free ensures (memory_load64_le(mem, 69048bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69568bv64) == 69688bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1792bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $secret_addr) == old(memory_load32_le(mem, $secret_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $secret_addr) == memory_load32_le(mem, $secret_addr)); } @@ -117,129 +79,33 @@ procedure {:extern} rely_reflexive() procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R8, Gamma_R9, Gamma_mem, R0, R8, R9, mem; requires (gamma_load32(Gamma_mem, $secret_addr) == true); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1928bv64) == 1bv8); free requires (memory_load8_le(mem, 1929bv64) == 0bv8); free requires (memory_load8_le(mem, 1930bv64) == 2bv8); free requires (memory_load8_le(mem, 1931bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); - free requires (memory_load8_le(mem, 69584bv64) == 52bv8); - free requires (memory_load8_le(mem, 69585bv64) == 16bv8); - free requires (memory_load8_le(mem, 69586bv64) == 1bv8); - free requires (memory_load8_le(mem, 69587bv64) == 0bv8); - free requires (memory_load8_le(mem, 69588bv64) == 0bv8); - free requires (memory_load8_le(mem, 69589bv64) == 0bv8); - free requires (memory_load8_le(mem, 69590bv64) == 0bv8); - free requires (memory_load8_le(mem, 69591bv64) == 0bv8); - free requires (memory_load8_le(mem, 69048bv64) == 80bv8); - free requires (memory_load8_le(mem, 69049bv64) == 7bv8); - free requires (memory_load8_le(mem, 69050bv64) == 0bv8); - free requires (memory_load8_le(mem, 69051bv64) == 0bv8); - free requires (memory_load8_le(mem, 69052bv64) == 0bv8); - free requires (memory_load8_le(mem, 69053bv64) == 0bv8); - free requires (memory_load8_le(mem, 69054bv64) == 0bv8); - free requires (memory_load8_le(mem, 69055bv64) == 0bv8); - free requires (memory_load8_le(mem, 69568bv64) == 56bv8); - free requires (memory_load8_le(mem, 69569bv64) == 16bv8); - free requires (memory_load8_le(mem, 69570bv64) == 1bv8); - free requires (memory_load8_le(mem, 69571bv64) == 0bv8); - free requires (memory_load8_le(mem, 69572bv64) == 0bv8); - free requires (memory_load8_le(mem, 69573bv64) == 0bv8); - free requires (memory_load8_le(mem, 69574bv64) == 0bv8); - free requires (memory_load8_le(mem, 69575bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 84bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69056bv64) == 0bv8); - free requires (memory_load8_le(mem, 69057bv64) == 7bv8); - free requires (memory_load8_le(mem, 69058bv64) == 0bv8); - free requires (memory_load8_le(mem, 69059bv64) == 0bv8); - free requires (memory_load8_le(mem, 69060bv64) == 0bv8); - free requires (memory_load8_le(mem, 69061bv64) == 0bv8); - free requires (memory_load8_le(mem, 69062bv64) == 0bv8); - free requires (memory_load8_le(mem, 69063bv64) == 0bv8); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); + free requires (memory_load64_le(mem, 69584bv64) == 69684bv64); + free requires (memory_load64_le(mem, 69048bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69568bv64) == 69688bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69056bv64) == 1792bv64); free ensures (memory_load8_le(mem, 1928bv64) == 1bv8); free ensures (memory_load8_le(mem, 1929bv64) == 0bv8); free ensures (memory_load8_le(mem, 1930bv64) == 2bv8); free ensures (memory_load8_le(mem, 1931bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69584bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69585bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69586bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69587bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69588bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69589bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69590bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69591bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69048bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69049bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69050bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69051bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69052bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69053bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69054bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69055bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69568bv64) == 56bv8); - free ensures (memory_load8_le(mem, 69569bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69570bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69571bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69572bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69573bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69574bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69575bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69584bv64) == 69684bv64); + free ensures (memory_load64_le(mem, 69048bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69568bv64) == 69688bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1792bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -258,3 +124,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/basicassign_gamma0/gcc/basicassign_gamma0.expected b/src/test/correct/basicassign_gamma0/gcc/basicassign_gamma0.expected index 61c06314d..99829cc76 100644 --- a/src/test/correct/basicassign_gamma0/gcc/basicassign_gamma0.expected +++ b/src/test/correct/basicassign_gamma0/gcc/basicassign_gamma0.expected @@ -25,6 +25,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -42,48 +46,24 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1865bv64) == 0bv8); free ensures (memory_load8_le(mem, 1866bv64) == 2bv8); free ensures (memory_load8_le(mem, 1867bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $secret_addr) == old(memory_load32_le(mem, $secret_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $secret_addr) == memory_load32_le(mem, $secret_addr)); } @@ -91,97 +71,29 @@ procedure {:extern} rely_reflexive() procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; requires (gamma_load32(Gamma_mem, $secret_addr) == true); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1864bv64) == 1bv8); free requires (memory_load8_le(mem, 1865bv64) == 0bv8); free requires (memory_load8_le(mem, 1866bv64) == 2bv8); free requires (memory_load8_le(mem, 1867bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1864bv64) == 1bv8); free ensures (memory_load8_le(mem, 1865bv64) == 0bv8); free ensures (memory_load8_le(mem, 1866bv64) == 2bv8); free ensures (memory_load8_le(mem, 1867bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -198,3 +110,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/basicassign_gamma0/gcc_O2/basicassign_gamma0.expected b/src/test/correct/basicassign_gamma0/gcc_O2/basicassign_gamma0.expected index 80ca6e118..77e5a8d69 100644 --- a/src/test/correct/basicassign_gamma0/gcc_O2/basicassign_gamma0.expected +++ b/src/test/correct/basicassign_gamma0/gcc_O2/basicassign_gamma0.expected @@ -27,6 +27,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -44,48 +48,24 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $secret_addr) == old(memory_load32_le(mem, $secret_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $secret_addr) == memory_load32_le(mem, $secret_addr)); } @@ -93,97 +73,29 @@ procedure {:extern} rely_reflexive() procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R2, Gamma_mem, R0, R1, R2, mem; requires (gamma_load32(Gamma_mem, $secret_addr) == true); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1896bv64) == 1bv8); free requires (memory_load8_le(mem, 1897bv64) == 0bv8); free requires (memory_load8_le(mem, 1898bv64) == 2bv8); free requires (memory_load8_le(mem, 1899bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 80bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 0bv8); - free requires (memory_load8_le(mem, 69025bv64) == 7bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 0bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1536bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1896bv64) == 1bv8); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -198,3 +110,4 @@ procedure main() assume {:captureState "%000001c5"} true; return; } + diff --git a/src/test/correct/basicassign_gamma0/gcc_no_plt_no_pic/basicassign_gamma0.expected b/src/test/correct/basicassign_gamma0/gcc_no_plt_no_pic/basicassign_gamma0.expected index f64a19b05..7c731bd2e 100644 --- a/src/test/correct/basicassign_gamma0/gcc_no_plt_no_pic/basicassign_gamma0.expected +++ b/src/test/correct/basicassign_gamma0/gcc_no_plt_no_pic/basicassign_gamma0.expected @@ -25,6 +25,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -42,48 +46,24 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1865bv64) == 0bv8); free ensures (memory_load8_le(mem, 1866bv64) == 2bv8); free ensures (memory_load8_le(mem, 1867bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $secret_addr) == old(memory_load32_le(mem, $secret_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $secret_addr) == memory_load32_le(mem, $secret_addr)); } @@ -91,97 +71,29 @@ procedure {:extern} rely_reflexive() procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; requires (gamma_load32(Gamma_mem, $secret_addr) == true); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1864bv64) == 1bv8); free requires (memory_load8_le(mem, 1865bv64) == 0bv8); free requires (memory_load8_le(mem, 1866bv64) == 2bv8); free requires (memory_load8_le(mem, 1867bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1864bv64) == 1bv8); free ensures (memory_load8_le(mem, 1865bv64) == 0bv8); free ensures (memory_load8_le(mem, 1866bv64) == 2bv8); free ensures (memory_load8_le(mem, 1867bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -198,3 +110,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/basicassign_gamma0/gcc_pic/basicassign_gamma0.expected b/src/test/correct/basicassign_gamma0/gcc_pic/basicassign_gamma0.expected index 640aca070..80b631034 100644 --- a/src/test/correct/basicassign_gamma0/gcc_pic/basicassign_gamma0.expected +++ b/src/test/correct/basicassign_gamma0/gcc_pic/basicassign_gamma0.expected @@ -50,64 +50,26 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1929bv64) == 0bv8); free ensures (memory_load8_le(mem, 1930bv64) == 2bv8); free ensures (memory_load8_le(mem, 1931bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69608bv64) == 24bv8); - free ensures (memory_load8_le(mem, 69609bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69610bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69611bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69612bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69613bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69614bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69615bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69608bv64) == 69656bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 69652bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1872bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $secret_addr) == old(memory_load32_le(mem, $secret_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $secret_addr) == memory_load32_le(mem, $secret_addr)); } @@ -115,129 +77,33 @@ procedure {:extern} rely_reflexive() procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; requires (gamma_load32(Gamma_mem, $secret_addr) == true); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1928bv64) == 1bv8); free requires (memory_load8_le(mem, 1929bv64) == 0bv8); free requires (memory_load8_le(mem, 1930bv64) == 2bv8); free requires (memory_load8_le(mem, 1931bv64) == 0bv8); - free requires (memory_load8_le(mem, 69608bv64) == 24bv8); - free requires (memory_load8_le(mem, 69609bv64) == 16bv8); - free requires (memory_load8_le(mem, 69610bv64) == 1bv8); - free requires (memory_load8_le(mem, 69611bv64) == 0bv8); - free requires (memory_load8_le(mem, 69612bv64) == 0bv8); - free requires (memory_load8_le(mem, 69613bv64) == 0bv8); - free requires (memory_load8_le(mem, 69614bv64) == 0bv8); - free requires (memory_load8_le(mem, 69615bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 84bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 0bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 16bv8); - free requires (memory_load8_le(mem, 69594bv64) == 1bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 80bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); + free requires (memory_load64_le(mem, 69608bv64) == 69656bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69008bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69592bv64) == 69652bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1872bv64); free ensures (memory_load8_le(mem, 1928bv64) == 1bv8); free ensures (memory_load8_le(mem, 1929bv64) == 0bv8); free ensures (memory_load8_le(mem, 1930bv64) == 2bv8); free ensures (memory_load8_le(mem, 1931bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69608bv64) == 24bv8); - free ensures (memory_load8_le(mem, 69609bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69610bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69611bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69612bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69613bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69614bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69615bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69608bv64) == 69656bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 69652bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1872bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -256,3 +122,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/basicfree/clang/basicfree.expected b/src/test/correct/basicfree/clang/basicfree.expected index 726176432..9dcf5bd61 100644 --- a/src/test/correct/basicfree/clang/basicfree.expected +++ b/src/test/correct/basicfree/clang/basicfree.expected @@ -61,43 +61,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 2081bv64) == 0bv8); free ensures (memory_load8_le(mem, 2082bv64) == 2bv8); free ensures (memory_load8_le(mem, 2083bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 208bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 212bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69688bv64) == 56bv8); - free ensures (memory_load8_le(mem, 69689bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69690bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69691bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69692bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69693bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69694bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69695bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2000bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1920bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2004bv64); + free ensures (memory_load64_le(mem, 69688bv64) == 69688bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -114,129 +88,31 @@ procedure #free(); free requires (memory_load8_le(mem, 2081bv64) == 0bv8); free requires (memory_load8_le(mem, 2082bv64) == 2bv8); free requires (memory_load8_le(mem, 2083bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 208bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 128bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 212bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69688bv64) == 56bv8); - free requires (memory_load8_le(mem, 69689bv64) == 16bv8); - free requires (memory_load8_le(mem, 69690bv64) == 1bv8); - free requires (memory_load8_le(mem, 69691bv64) == 0bv8); - free requires (memory_load8_le(mem, 69692bv64) == 0bv8); - free requires (memory_load8_le(mem, 69693bv64) == 0bv8); - free requires (memory_load8_le(mem, 69694bv64) == 0bv8); - free requires (memory_load8_le(mem, 69695bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 2000bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1920bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2004bv64); + free requires (memory_load64_le(mem, 69688bv64) == 69688bv64); free ensures (memory_load8_le(mem, 2080bv64) == 1bv8); free ensures (memory_load8_le(mem, 2081bv64) == 0bv8); free ensures (memory_load8_le(mem, 2082bv64) == 2bv8); free ensures (memory_load8_le(mem, 2083bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 208bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 212bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69688bv64) == 56bv8); - free ensures (memory_load8_le(mem, 69689bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69690bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69691bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69692bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69693bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69694bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69695bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2000bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1920bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2004bv64); + free ensures (memory_load64_le(mem, 69688bv64) == 69688bv64); -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R16, Gamma_R17, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R16, R17, R29, R30, R31, R8, R9, mem, stack; - free requires (memory_load8_le(mem, 69680bv64) == 0bv8); - free requires (memory_load8_le(mem, 69681bv64) == 0bv8); - free requires (memory_load8_le(mem, 69682bv64) == 0bv8); - free requires (memory_load8_le(mem, 69683bv64) == 0bv8); - free requires (memory_load8_le(mem, 69684bv64) == 0bv8); - free requires (memory_load8_le(mem, 69685bv64) == 0bv8); - free requires (memory_load8_le(mem, 69686bv64) == 0bv8); - free requires (memory_load8_le(mem, 69687bv64) == 0bv8); - free requires (memory_load8_le(mem, 69688bv64) == 56bv8); - free requires (memory_load8_le(mem, 69689bv64) == 16bv8); - free requires (memory_load8_le(mem, 69690bv64) == 1bv8); - free requires (memory_load8_le(mem, 69691bv64) == 0bv8); - free requires (memory_load8_le(mem, 69692bv64) == 0bv8); - free requires (memory_load8_le(mem, 69693bv64) == 0bv8); - free requires (memory_load8_le(mem, 69694bv64) == 0bv8); - free requires (memory_load8_le(mem, 69695bv64) == 0bv8); + free requires (memory_load64_le(mem, 69680bv64) == 0bv64); + free requires (memory_load64_le(mem, 69688bv64) == 69688bv64); free requires (memory_load8_le(mem, 2080bv64) == 1bv8); free requires (memory_load8_le(mem, 2081bv64) == 0bv8); free requires (memory_load8_le(mem, 2082bv64) == 2bv8); free requires (memory_load8_le(mem, 2083bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 208bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 128bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 212bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69688bv64) == 56bv8); - free requires (memory_load8_le(mem, 69689bv64) == 16bv8); - free requires (memory_load8_le(mem, 69690bv64) == 1bv8); - free requires (memory_load8_le(mem, 69691bv64) == 0bv8); - free requires (memory_load8_le(mem, 69692bv64) == 0bv8); - free requires (memory_load8_le(mem, 69693bv64) == 0bv8); - free requires (memory_load8_le(mem, 69694bv64) == 0bv8); - free requires (memory_load8_le(mem, 69695bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 2000bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1920bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2004bv64); + free requires (memory_load64_le(mem, 69688bv64) == 69688bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -245,38 +121,12 @@ procedure main() free ensures (memory_load8_le(mem, 2081bv64) == 0bv8); free ensures (memory_load8_le(mem, 2082bv64) == 2bv8); free ensures (memory_load8_le(mem, 2083bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 208bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 212bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69688bv64) == 56bv8); - free ensures (memory_load8_le(mem, 69689bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69690bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69691bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69692bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69693bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69694bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69695bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2000bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1920bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2004bv64); + free ensures (memory_load64_le(mem, 69688bv64) == 69688bv64); + +implementation main() { var #4: bv64; var #5: bv64; @@ -324,71 +174,16 @@ procedure malloc(); free requires (memory_load8_le(mem, 2081bv64) == 0bv8); free requires (memory_load8_le(mem, 2082bv64) == 2bv8); free requires (memory_load8_le(mem, 2083bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 208bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 128bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 212bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69688bv64) == 56bv8); - free requires (memory_load8_le(mem, 69689bv64) == 16bv8); - free requires (memory_load8_le(mem, 69690bv64) == 1bv8); - free requires (memory_load8_le(mem, 69691bv64) == 0bv8); - free requires (memory_load8_le(mem, 69692bv64) == 0bv8); - free requires (memory_load8_le(mem, 69693bv64) == 0bv8); - free requires (memory_load8_le(mem, 69694bv64) == 0bv8); - free requires (memory_load8_le(mem, 69695bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 2000bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1920bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2004bv64); + free requires (memory_load64_le(mem, 69688bv64) == 69688bv64); free ensures (memory_load8_le(mem, 2080bv64) == 1bv8); free ensures (memory_load8_le(mem, 2081bv64) == 0bv8); free ensures (memory_load8_le(mem, 2082bv64) == 2bv8); free ensures (memory_load8_le(mem, 2083bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 208bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 212bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69688bv64) == 56bv8); - free ensures (memory_load8_le(mem, 69689bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69690bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69691bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69692bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69693bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69694bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69695bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2000bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1920bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2004bv64); + free ensures (memory_load64_le(mem, 69688bv64) == 69688bv64); + diff --git a/src/test/correct/basicfree/clang_O2/basicfree.expected b/src/test/correct/basicfree/clang_O2/basicfree.expected index ae43ad872..658b3ad9b 100644 --- a/src/test/correct/basicfree/clang_O2/basicfree.expected +++ b/src/test/correct/basicfree/clang_O2/basicfree.expected @@ -2,6 +2,11 @@ var {:extern} Gamma_mem: [bv64]bool; var {:extern} mem: [bv64]bv8; const {:extern} $_IO_stdin_used_addr: bv64; axiom ($_IO_stdin_used_addr == 1836bv64); +function {:extern} {:bvbuiltin "bvadd"} bvadd64(bv64, bv64) returns (bv64); +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -14,43 +19,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1837bv64) == 0bv8); free ensures (memory_load8_le(mem, 1838bv64) == 2bv8); free ensures (memory_load8_le(mem, 1839bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -61,97 +40,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); +procedure main(); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1836bv64) == 1bv8); free requires (memory_load8_le(mem, 1837bv64) == 0bv8); free requires (memory_load8_le(mem, 1838bv64) == 2bv8); free requires (memory_load8_le(mem, 1839bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (memory_load8_le(mem, 1836bv64) == 1bv8); free ensures (memory_load8_le(mem, 1837bv64) == 0bv8); free ensures (memory_load8_le(mem, 1838bv64) == 2bv8); free ensures (memory_load8_le(mem, 1839bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; return; } + diff --git a/src/test/correct/basicfree/clang_no_plt_no_pic/basicfree.expected b/src/test/correct/basicfree/clang_no_plt_no_pic/basicfree.expected index 76c2aa03f..d9acf1966 100644 --- a/src/test/correct/basicfree/clang_no_plt_no_pic/basicfree.expected +++ b/src/test/correct/basicfree/clang_no_plt_no_pic/basicfree.expected @@ -61,43 +61,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 2081bv64) == 0bv8); free ensures (memory_load8_le(mem, 2082bv64) == 2bv8); free ensures (memory_load8_le(mem, 2083bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 208bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 212bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69688bv64) == 56bv8); - free ensures (memory_load8_le(mem, 69689bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69690bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69691bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69692bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69693bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69694bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69695bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2000bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1920bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2004bv64); + free ensures (memory_load64_le(mem, 69688bv64) == 69688bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -114,129 +88,31 @@ procedure #free(); free requires (memory_load8_le(mem, 2081bv64) == 0bv8); free requires (memory_load8_le(mem, 2082bv64) == 2bv8); free requires (memory_load8_le(mem, 2083bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 208bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 128bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 212bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69688bv64) == 56bv8); - free requires (memory_load8_le(mem, 69689bv64) == 16bv8); - free requires (memory_load8_le(mem, 69690bv64) == 1bv8); - free requires (memory_load8_le(mem, 69691bv64) == 0bv8); - free requires (memory_load8_le(mem, 69692bv64) == 0bv8); - free requires (memory_load8_le(mem, 69693bv64) == 0bv8); - free requires (memory_load8_le(mem, 69694bv64) == 0bv8); - free requires (memory_load8_le(mem, 69695bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 2000bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1920bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2004bv64); + free requires (memory_load64_le(mem, 69688bv64) == 69688bv64); free ensures (memory_load8_le(mem, 2080bv64) == 1bv8); free ensures (memory_load8_le(mem, 2081bv64) == 0bv8); free ensures (memory_load8_le(mem, 2082bv64) == 2bv8); free ensures (memory_load8_le(mem, 2083bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 208bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 212bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69688bv64) == 56bv8); - free ensures (memory_load8_le(mem, 69689bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69690bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69691bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69692bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69693bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69694bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69695bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2000bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1920bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2004bv64); + free ensures (memory_load64_le(mem, 69688bv64) == 69688bv64); -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R16, Gamma_R17, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R16, R17, R29, R30, R31, R8, R9, mem, stack; - free requires (memory_load8_le(mem, 69680bv64) == 0bv8); - free requires (memory_load8_le(mem, 69681bv64) == 0bv8); - free requires (memory_load8_le(mem, 69682bv64) == 0bv8); - free requires (memory_load8_le(mem, 69683bv64) == 0bv8); - free requires (memory_load8_le(mem, 69684bv64) == 0bv8); - free requires (memory_load8_le(mem, 69685bv64) == 0bv8); - free requires (memory_load8_le(mem, 69686bv64) == 0bv8); - free requires (memory_load8_le(mem, 69687bv64) == 0bv8); - free requires (memory_load8_le(mem, 69688bv64) == 56bv8); - free requires (memory_load8_le(mem, 69689bv64) == 16bv8); - free requires (memory_load8_le(mem, 69690bv64) == 1bv8); - free requires (memory_load8_le(mem, 69691bv64) == 0bv8); - free requires (memory_load8_le(mem, 69692bv64) == 0bv8); - free requires (memory_load8_le(mem, 69693bv64) == 0bv8); - free requires (memory_load8_le(mem, 69694bv64) == 0bv8); - free requires (memory_load8_le(mem, 69695bv64) == 0bv8); + free requires (memory_load64_le(mem, 69680bv64) == 0bv64); + free requires (memory_load64_le(mem, 69688bv64) == 69688bv64); free requires (memory_load8_le(mem, 2080bv64) == 1bv8); free requires (memory_load8_le(mem, 2081bv64) == 0bv8); free requires (memory_load8_le(mem, 2082bv64) == 2bv8); free requires (memory_load8_le(mem, 2083bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 208bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 128bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 212bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69688bv64) == 56bv8); - free requires (memory_load8_le(mem, 69689bv64) == 16bv8); - free requires (memory_load8_le(mem, 69690bv64) == 1bv8); - free requires (memory_load8_le(mem, 69691bv64) == 0bv8); - free requires (memory_load8_le(mem, 69692bv64) == 0bv8); - free requires (memory_load8_le(mem, 69693bv64) == 0bv8); - free requires (memory_load8_le(mem, 69694bv64) == 0bv8); - free requires (memory_load8_le(mem, 69695bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 2000bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1920bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2004bv64); + free requires (memory_load64_le(mem, 69688bv64) == 69688bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -245,38 +121,12 @@ procedure main() free ensures (memory_load8_le(mem, 2081bv64) == 0bv8); free ensures (memory_load8_le(mem, 2082bv64) == 2bv8); free ensures (memory_load8_le(mem, 2083bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 208bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 212bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69688bv64) == 56bv8); - free ensures (memory_load8_le(mem, 69689bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69690bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69691bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69692bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69693bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69694bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69695bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2000bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1920bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2004bv64); + free ensures (memory_load64_le(mem, 69688bv64) == 69688bv64); + +implementation main() { var #4: bv64; var #5: bv64; @@ -324,71 +174,16 @@ procedure malloc(); free requires (memory_load8_le(mem, 2081bv64) == 0bv8); free requires (memory_load8_le(mem, 2082bv64) == 2bv8); free requires (memory_load8_le(mem, 2083bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 208bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 128bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 212bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69688bv64) == 56bv8); - free requires (memory_load8_le(mem, 69689bv64) == 16bv8); - free requires (memory_load8_le(mem, 69690bv64) == 1bv8); - free requires (memory_load8_le(mem, 69691bv64) == 0bv8); - free requires (memory_load8_le(mem, 69692bv64) == 0bv8); - free requires (memory_load8_le(mem, 69693bv64) == 0bv8); - free requires (memory_load8_le(mem, 69694bv64) == 0bv8); - free requires (memory_load8_le(mem, 69695bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 2000bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1920bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2004bv64); + free requires (memory_load64_le(mem, 69688bv64) == 69688bv64); free ensures (memory_load8_le(mem, 2080bv64) == 1bv8); free ensures (memory_load8_le(mem, 2081bv64) == 0bv8); free ensures (memory_load8_le(mem, 2082bv64) == 2bv8); free ensures (memory_load8_le(mem, 2083bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 208bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 212bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69688bv64) == 56bv8); - free ensures (memory_load8_le(mem, 69689bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69690bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69691bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69692bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69693bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69694bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69695bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2000bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1920bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2004bv64); + free ensures (memory_load64_le(mem, 69688bv64) == 69688bv64); + diff --git a/src/test/correct/basicfree/clang_pic/basicfree.expected b/src/test/correct/basicfree/clang_pic/basicfree.expected index 76c2aa03f..d9acf1966 100644 --- a/src/test/correct/basicfree/clang_pic/basicfree.expected +++ b/src/test/correct/basicfree/clang_pic/basicfree.expected @@ -61,43 +61,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 2081bv64) == 0bv8); free ensures (memory_load8_le(mem, 2082bv64) == 2bv8); free ensures (memory_load8_le(mem, 2083bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 208bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 212bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69688bv64) == 56bv8); - free ensures (memory_load8_le(mem, 69689bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69690bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69691bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69692bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69693bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69694bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69695bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2000bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1920bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2004bv64); + free ensures (memory_load64_le(mem, 69688bv64) == 69688bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -114,129 +88,31 @@ procedure #free(); free requires (memory_load8_le(mem, 2081bv64) == 0bv8); free requires (memory_load8_le(mem, 2082bv64) == 2bv8); free requires (memory_load8_le(mem, 2083bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 208bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 128bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 212bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69688bv64) == 56bv8); - free requires (memory_load8_le(mem, 69689bv64) == 16bv8); - free requires (memory_load8_le(mem, 69690bv64) == 1bv8); - free requires (memory_load8_le(mem, 69691bv64) == 0bv8); - free requires (memory_load8_le(mem, 69692bv64) == 0bv8); - free requires (memory_load8_le(mem, 69693bv64) == 0bv8); - free requires (memory_load8_le(mem, 69694bv64) == 0bv8); - free requires (memory_load8_le(mem, 69695bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 2000bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1920bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2004bv64); + free requires (memory_load64_le(mem, 69688bv64) == 69688bv64); free ensures (memory_load8_le(mem, 2080bv64) == 1bv8); free ensures (memory_load8_le(mem, 2081bv64) == 0bv8); free ensures (memory_load8_le(mem, 2082bv64) == 2bv8); free ensures (memory_load8_le(mem, 2083bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 208bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 212bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69688bv64) == 56bv8); - free ensures (memory_load8_le(mem, 69689bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69690bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69691bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69692bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69693bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69694bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69695bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2000bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1920bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2004bv64); + free ensures (memory_load64_le(mem, 69688bv64) == 69688bv64); -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R16, Gamma_R17, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R16, R17, R29, R30, R31, R8, R9, mem, stack; - free requires (memory_load8_le(mem, 69680bv64) == 0bv8); - free requires (memory_load8_le(mem, 69681bv64) == 0bv8); - free requires (memory_load8_le(mem, 69682bv64) == 0bv8); - free requires (memory_load8_le(mem, 69683bv64) == 0bv8); - free requires (memory_load8_le(mem, 69684bv64) == 0bv8); - free requires (memory_load8_le(mem, 69685bv64) == 0bv8); - free requires (memory_load8_le(mem, 69686bv64) == 0bv8); - free requires (memory_load8_le(mem, 69687bv64) == 0bv8); - free requires (memory_load8_le(mem, 69688bv64) == 56bv8); - free requires (memory_load8_le(mem, 69689bv64) == 16bv8); - free requires (memory_load8_le(mem, 69690bv64) == 1bv8); - free requires (memory_load8_le(mem, 69691bv64) == 0bv8); - free requires (memory_load8_le(mem, 69692bv64) == 0bv8); - free requires (memory_load8_le(mem, 69693bv64) == 0bv8); - free requires (memory_load8_le(mem, 69694bv64) == 0bv8); - free requires (memory_load8_le(mem, 69695bv64) == 0bv8); + free requires (memory_load64_le(mem, 69680bv64) == 0bv64); + free requires (memory_load64_le(mem, 69688bv64) == 69688bv64); free requires (memory_load8_le(mem, 2080bv64) == 1bv8); free requires (memory_load8_le(mem, 2081bv64) == 0bv8); free requires (memory_load8_le(mem, 2082bv64) == 2bv8); free requires (memory_load8_le(mem, 2083bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 208bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 128bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 212bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69688bv64) == 56bv8); - free requires (memory_load8_le(mem, 69689bv64) == 16bv8); - free requires (memory_load8_le(mem, 69690bv64) == 1bv8); - free requires (memory_load8_le(mem, 69691bv64) == 0bv8); - free requires (memory_load8_le(mem, 69692bv64) == 0bv8); - free requires (memory_load8_le(mem, 69693bv64) == 0bv8); - free requires (memory_load8_le(mem, 69694bv64) == 0bv8); - free requires (memory_load8_le(mem, 69695bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 2000bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1920bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2004bv64); + free requires (memory_load64_le(mem, 69688bv64) == 69688bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -245,38 +121,12 @@ procedure main() free ensures (memory_load8_le(mem, 2081bv64) == 0bv8); free ensures (memory_load8_le(mem, 2082bv64) == 2bv8); free ensures (memory_load8_le(mem, 2083bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 208bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 212bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69688bv64) == 56bv8); - free ensures (memory_load8_le(mem, 69689bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69690bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69691bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69692bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69693bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69694bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69695bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2000bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1920bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2004bv64); + free ensures (memory_load64_le(mem, 69688bv64) == 69688bv64); + +implementation main() { var #4: bv64; var #5: bv64; @@ -324,71 +174,16 @@ procedure malloc(); free requires (memory_load8_le(mem, 2081bv64) == 0bv8); free requires (memory_load8_le(mem, 2082bv64) == 2bv8); free requires (memory_load8_le(mem, 2083bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 208bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 128bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 212bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69688bv64) == 56bv8); - free requires (memory_load8_le(mem, 69689bv64) == 16bv8); - free requires (memory_load8_le(mem, 69690bv64) == 1bv8); - free requires (memory_load8_le(mem, 69691bv64) == 0bv8); - free requires (memory_load8_le(mem, 69692bv64) == 0bv8); - free requires (memory_load8_le(mem, 69693bv64) == 0bv8); - free requires (memory_load8_le(mem, 69694bv64) == 0bv8); - free requires (memory_load8_le(mem, 69695bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 2000bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1920bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2004bv64); + free requires (memory_load64_le(mem, 69688bv64) == 69688bv64); free ensures (memory_load8_le(mem, 2080bv64) == 1bv8); free ensures (memory_load8_le(mem, 2081bv64) == 0bv8); free ensures (memory_load8_le(mem, 2082bv64) == 2bv8); free ensures (memory_load8_le(mem, 2083bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 208bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 212bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69688bv64) == 56bv8); - free ensures (memory_load8_le(mem, 69689bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69690bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69691bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69692bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69693bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69694bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69695bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2000bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1920bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2004bv64); + free ensures (memory_load64_le(mem, 69688bv64) == 69688bv64); + diff --git a/src/test/correct/basicfree/gcc/basicfree.expected b/src/test/correct/basicfree/gcc/basicfree.expected index 0abdad17b..f006ebff3 100644 --- a/src/test/correct/basicfree/gcc/basicfree.expected +++ b/src/test/correct/basicfree/gcc/basicfree.expected @@ -59,43 +59,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 2077bv64) == 0bv8); free ensures (memory_load8_le(mem, 2078bv64) == 2bv8); free ensures (memory_load8_le(mem, 2079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 208bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 212bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69000bv64) == 2000bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1920bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2004bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -112,129 +86,31 @@ procedure #free(); free requires (memory_load8_le(mem, 2077bv64) == 0bv8); free requires (memory_load8_le(mem, 2078bv64) == 2bv8); free requires (memory_load8_le(mem, 2079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 208bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 128bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 212bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69000bv64) == 2000bv64); + free requires (memory_load64_le(mem, 69008bv64) == 1920bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2004bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2076bv64) == 1bv8); free ensures (memory_load8_le(mem, 2077bv64) == 0bv8); free ensures (memory_load8_le(mem, 2078bv64) == 2bv8); free ensures (memory_load8_le(mem, 2079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 208bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 212bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69000bv64) == 2000bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1920bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2004bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R16, Gamma_R17, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R16, R17, R29, R30, R31, mem, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 2076bv64) == 1bv8); free requires (memory_load8_le(mem, 2077bv64) == 0bv8); free requires (memory_load8_le(mem, 2078bv64) == 2bv8); free requires (memory_load8_le(mem, 2079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 208bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 128bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 212bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69000bv64) == 2000bv64); + free requires (memory_load64_le(mem, 69008bv64) == 1920bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2004bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -243,38 +119,12 @@ procedure main() free ensures (memory_load8_le(mem, 2077bv64) == 0bv8); free ensures (memory_load8_le(mem, 2078bv64) == 2bv8); free ensures (memory_load8_le(mem, 2079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 208bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 212bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69000bv64) == 2000bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1920bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2004bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv64; var Gamma_#4: bool; @@ -319,71 +169,16 @@ procedure malloc(); free requires (memory_load8_le(mem, 2077bv64) == 0bv8); free requires (memory_load8_le(mem, 2078bv64) == 2bv8); free requires (memory_load8_le(mem, 2079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 208bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 128bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 212bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69000bv64) == 2000bv64); + free requires (memory_load64_le(mem, 69008bv64) == 1920bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2004bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2076bv64) == 1bv8); free ensures (memory_load8_le(mem, 2077bv64) == 0bv8); free ensures (memory_load8_le(mem, 2078bv64) == 2bv8); free ensures (memory_load8_le(mem, 2079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 208bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 212bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69000bv64) == 2000bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1920bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2004bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + diff --git a/src/test/correct/basicfree/gcc_O2/basicfree.expected b/src/test/correct/basicfree/gcc_O2/basicfree.expected index f96261171..628d250a1 100644 --- a/src/test/correct/basicfree/gcc_O2/basicfree.expected +++ b/src/test/correct/basicfree/gcc_O2/basicfree.expected @@ -2,6 +2,11 @@ var {:extern} Gamma_mem: [bv64]bool; var {:extern} mem: [bv64]bv8; const {:extern} $_IO_stdin_used_addr: bv64; axiom ($_IO_stdin_used_addr == 1896bv64); +function {:extern} {:bvbuiltin "bvadd"} bvadd64(bv64, bv64) returns (bv64); +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -14,43 +19,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -61,97 +40,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); +procedure main(); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1896bv64) == 1bv8); free requires (memory_load8_le(mem, 1897bv64) == 0bv8); free requires (memory_load8_le(mem, 1898bv64) == 2bv8); free requires (memory_load8_le(mem, 1899bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 80bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 0bv8); - free requires (memory_load8_le(mem, 69025bv64) == 7bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 0bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1536bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1896bv64) == 1bv8); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; return; } + diff --git a/src/test/correct/basicfree/gcc_no_plt_no_pic/basicfree.expected b/src/test/correct/basicfree/gcc_no_plt_no_pic/basicfree.expected index 07b9f0233..62fa514c8 100644 --- a/src/test/correct/basicfree/gcc_no_plt_no_pic/basicfree.expected +++ b/src/test/correct/basicfree/gcc_no_plt_no_pic/basicfree.expected @@ -59,43 +59,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 2077bv64) == 0bv8); free ensures (memory_load8_le(mem, 2078bv64) == 2bv8); free ensures (memory_load8_le(mem, 2079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 208bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 212bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69000bv64) == 2000bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1920bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2004bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -112,129 +86,31 @@ procedure #free(); free requires (memory_load8_le(mem, 2077bv64) == 0bv8); free requires (memory_load8_le(mem, 2078bv64) == 2bv8); free requires (memory_load8_le(mem, 2079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 208bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 128bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 212bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69000bv64) == 2000bv64); + free requires (memory_load64_le(mem, 69008bv64) == 1920bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2004bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2076bv64) == 1bv8); free ensures (memory_load8_le(mem, 2077bv64) == 0bv8); free ensures (memory_load8_le(mem, 2078bv64) == 2bv8); free ensures (memory_load8_le(mem, 2079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 208bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 212bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69000bv64) == 2000bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1920bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2004bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R16, Gamma_R17, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R16, R17, R29, R30, R31, mem, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 2076bv64) == 1bv8); free requires (memory_load8_le(mem, 2077bv64) == 0bv8); free requires (memory_load8_le(mem, 2078bv64) == 2bv8); free requires (memory_load8_le(mem, 2079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 208bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 128bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 212bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69000bv64) == 2000bv64); + free requires (memory_load64_le(mem, 69008bv64) == 1920bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2004bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -243,38 +119,12 @@ procedure main() free ensures (memory_load8_le(mem, 2077bv64) == 0bv8); free ensures (memory_load8_le(mem, 2078bv64) == 2bv8); free ensures (memory_load8_le(mem, 2079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 208bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 212bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69000bv64) == 2000bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1920bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2004bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv64; var Gamma_#4: bool; @@ -319,71 +169,16 @@ procedure malloc(); free requires (memory_load8_le(mem, 2077bv64) == 0bv8); free requires (memory_load8_le(mem, 2078bv64) == 2bv8); free requires (memory_load8_le(mem, 2079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 208bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 128bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 212bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69000bv64) == 2000bv64); + free requires (memory_load64_le(mem, 69008bv64) == 1920bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2004bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2076bv64) == 1bv8); free ensures (memory_load8_le(mem, 2077bv64) == 0bv8); free ensures (memory_load8_le(mem, 2078bv64) == 2bv8); free ensures (memory_load8_le(mem, 2079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 208bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 212bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69000bv64) == 2000bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1920bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2004bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + diff --git a/src/test/correct/basicfree/gcc_pic/basicfree.expected b/src/test/correct/basicfree/gcc_pic/basicfree.expected index 07b9f0233..62fa514c8 100644 --- a/src/test/correct/basicfree/gcc_pic/basicfree.expected +++ b/src/test/correct/basicfree/gcc_pic/basicfree.expected @@ -59,43 +59,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 2077bv64) == 0bv8); free ensures (memory_load8_le(mem, 2078bv64) == 2bv8); free ensures (memory_load8_le(mem, 2079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 208bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 212bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69000bv64) == 2000bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1920bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2004bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -112,129 +86,31 @@ procedure #free(); free requires (memory_load8_le(mem, 2077bv64) == 0bv8); free requires (memory_load8_le(mem, 2078bv64) == 2bv8); free requires (memory_load8_le(mem, 2079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 208bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 128bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 212bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69000bv64) == 2000bv64); + free requires (memory_load64_le(mem, 69008bv64) == 1920bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2004bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2076bv64) == 1bv8); free ensures (memory_load8_le(mem, 2077bv64) == 0bv8); free ensures (memory_load8_le(mem, 2078bv64) == 2bv8); free ensures (memory_load8_le(mem, 2079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 208bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 212bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69000bv64) == 2000bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1920bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2004bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R16, Gamma_R17, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R16, R17, R29, R30, R31, mem, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 2076bv64) == 1bv8); free requires (memory_load8_le(mem, 2077bv64) == 0bv8); free requires (memory_load8_le(mem, 2078bv64) == 2bv8); free requires (memory_load8_le(mem, 2079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 208bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 128bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 212bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69000bv64) == 2000bv64); + free requires (memory_load64_le(mem, 69008bv64) == 1920bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2004bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -243,38 +119,12 @@ procedure main() free ensures (memory_load8_le(mem, 2077bv64) == 0bv8); free ensures (memory_load8_le(mem, 2078bv64) == 2bv8); free ensures (memory_load8_le(mem, 2079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 208bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 212bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69000bv64) == 2000bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1920bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2004bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv64; var Gamma_#4: bool; @@ -319,71 +169,16 @@ procedure malloc(); free requires (memory_load8_le(mem, 2077bv64) == 0bv8); free requires (memory_load8_le(mem, 2078bv64) == 2bv8); free requires (memory_load8_le(mem, 2079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 208bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 128bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 212bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69000bv64) == 2000bv64); + free requires (memory_load64_le(mem, 69008bv64) == 1920bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2004bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2076bv64) == 1bv8); free ensures (memory_load8_le(mem, 2077bv64) == 0bv8); free ensures (memory_load8_le(mem, 2078bv64) == 2bv8); free ensures (memory_load8_le(mem, 2079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 208bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 212bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69000bv64) == 2000bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1920bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2004bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + diff --git a/src/test/correct/cjump/clang/cjump.expected b/src/test/correct/cjump/clang/cjump.expected index 539ef9a99..d0cdf6dcf 100644 --- a/src/test/correct/cjump/clang/cjump.expected +++ b/src/test/correct/cjump/clang/cjump.expected @@ -37,6 +37,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -56,43 +60,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1917bv64) == 0bv8); free ensures (memory_load8_le(mem, 1918bv64) == 2bv8); free ensures (memory_load8_le(mem, 1919bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -103,100 +81,32 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R31, R8, R9, mem, stack; requires (gamma_load32(Gamma_mem, $x_addr) == true); requires (gamma_load32(Gamma_mem, $y_addr) == false); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1916bv64) == 1bv8); free requires (memory_load8_le(mem, 1917bv64) == 0bv8); free requires (memory_load8_le(mem, 1918bv64) == 2bv8); free requires (memory_load8_le(mem, 1919bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1916bv64) == 1bv8); free ensures (memory_load8_le(mem, 1917bv64) == 0bv8); free ensures (memory_load8_le(mem, 1918bv64) == 2bv8); free ensures (memory_load8_le(mem, 1919bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -284,3 +194,4 @@ procedure main() assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l0000037e; } + diff --git a/src/test/correct/cjump/clang_O2/cjump.expected b/src/test/correct/cjump/clang_O2/cjump.expected index d3e291679..a58745453 100644 --- a/src/test/correct/cjump/clang_O2/cjump.expected +++ b/src/test/correct/cjump/clang_O2/cjump.expected @@ -27,6 +27,10 @@ function {:extern} gamma_store32(gammaMap: [bv64]bool, index: bv64, value: bool) gammaMap[index := value][bvadd64(index, 1bv64) := value][bvadd64(index, 2bv64) := value][bvadd64(index, 3bv64) := value] } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -43,43 +47,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1865bv64) == 0bv8); free ensures (memory_load8_le(mem, 1866bv64) == 2bv8); free ensures (memory_load8_le(mem, 1867bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -90,98 +68,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R10, Gamma_R11, Gamma_R8, Gamma_R9, Gamma_mem, R0, R10, R11, R8, R9, mem; requires (gamma_load32(Gamma_mem, $x_addr) == true); requires (gamma_load32(Gamma_mem, $y_addr) == false); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1864bv64) == 1bv8); free requires (memory_load8_le(mem, 1865bv64) == 0bv8); free requires (memory_load8_le(mem, 1866bv64) == 2bv8); free requires (memory_load8_le(mem, 1867bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (memory_load8_le(mem, 1864bv64) == 1bv8); free ensures (memory_load8_le(mem, 1865bv64) == 0bv8); free ensures (memory_load8_le(mem, 1866bv64) == 2bv8); free ensures (memory_load8_le(mem, 1867bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -200,3 +110,4 @@ procedure main() assume {:captureState "%000002f1"} true; return; } + diff --git a/src/test/correct/cjump/clang_no_plt_no_pic/cjump.expected b/src/test/correct/cjump/clang_no_plt_no_pic/cjump.expected index 796eec6f1..72022dfd4 100644 --- a/src/test/correct/cjump/clang_no_plt_no_pic/cjump.expected +++ b/src/test/correct/cjump/clang_no_plt_no_pic/cjump.expected @@ -37,6 +37,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -56,43 +60,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1917bv64) == 0bv8); free ensures (memory_load8_le(mem, 1918bv64) == 2bv8); free ensures (memory_load8_le(mem, 1919bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -103,100 +81,32 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R31, R8, R9, mem, stack; requires (gamma_load32(Gamma_mem, $x_addr) == true); requires (gamma_load32(Gamma_mem, $y_addr) == false); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1916bv64) == 1bv8); free requires (memory_load8_le(mem, 1917bv64) == 0bv8); free requires (memory_load8_le(mem, 1918bv64) == 2bv8); free requires (memory_load8_le(mem, 1919bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1916bv64) == 1bv8); free ensures (memory_load8_le(mem, 1917bv64) == 0bv8); free ensures (memory_load8_le(mem, 1918bv64) == 2bv8); free ensures (memory_load8_le(mem, 1919bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -284,3 +194,4 @@ procedure main() assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l000009d4; } + diff --git a/src/test/correct/cjump/clang_pic/cjump.expected b/src/test/correct/cjump/clang_pic/cjump.expected index 1ecbdeb7c..db408d8e8 100644 --- a/src/test/correct/cjump/clang_pic/cjump.expected +++ b/src/test/correct/cjump/clang_pic/cjump.expected @@ -64,59 +64,19 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1993bv64) == 0bv8); free ensures (memory_load8_le(mem, 1994bv64) == 2bv8); free ensures (memory_load8_le(mem, 1995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69584bv64) == 56bv8); - free ensures (memory_load8_le(mem, 69585bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69586bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69587bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69588bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69589bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69590bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69591bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69048bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69049bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69050bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69051bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69052bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69053bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69054bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69055bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69568bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69569bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69570bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69571bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69572bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69573bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69574bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69575bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69584bv64) == 69688bv64); + free ensures (memory_load64_le(mem, 69048bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69568bv64) == 69684bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1792bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -127,132 +87,36 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R31, R8, R9, mem, stack; requires (gamma_load32(Gamma_mem, $x_addr) == true); requires (gamma_load32(Gamma_mem, $y_addr) == false); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1992bv64) == 1bv8); free requires (memory_load8_le(mem, 1993bv64) == 0bv8); free requires (memory_load8_le(mem, 1994bv64) == 2bv8); free requires (memory_load8_le(mem, 1995bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); - free requires (memory_load8_le(mem, 69584bv64) == 56bv8); - free requires (memory_load8_le(mem, 69585bv64) == 16bv8); - free requires (memory_load8_le(mem, 69586bv64) == 1bv8); - free requires (memory_load8_le(mem, 69587bv64) == 0bv8); - free requires (memory_load8_le(mem, 69588bv64) == 0bv8); - free requires (memory_load8_le(mem, 69589bv64) == 0bv8); - free requires (memory_load8_le(mem, 69590bv64) == 0bv8); - free requires (memory_load8_le(mem, 69591bv64) == 0bv8); - free requires (memory_load8_le(mem, 69048bv64) == 80bv8); - free requires (memory_load8_le(mem, 69049bv64) == 7bv8); - free requires (memory_load8_le(mem, 69050bv64) == 0bv8); - free requires (memory_load8_le(mem, 69051bv64) == 0bv8); - free requires (memory_load8_le(mem, 69052bv64) == 0bv8); - free requires (memory_load8_le(mem, 69053bv64) == 0bv8); - free requires (memory_load8_le(mem, 69054bv64) == 0bv8); - free requires (memory_load8_le(mem, 69055bv64) == 0bv8); - free requires (memory_load8_le(mem, 69568bv64) == 52bv8); - free requires (memory_load8_le(mem, 69569bv64) == 16bv8); - free requires (memory_load8_le(mem, 69570bv64) == 1bv8); - free requires (memory_load8_le(mem, 69571bv64) == 0bv8); - free requires (memory_load8_le(mem, 69572bv64) == 0bv8); - free requires (memory_load8_le(mem, 69573bv64) == 0bv8); - free requires (memory_load8_le(mem, 69574bv64) == 0bv8); - free requires (memory_load8_le(mem, 69575bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 84bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69056bv64) == 0bv8); - free requires (memory_load8_le(mem, 69057bv64) == 7bv8); - free requires (memory_load8_le(mem, 69058bv64) == 0bv8); - free requires (memory_load8_le(mem, 69059bv64) == 0bv8); - free requires (memory_load8_le(mem, 69060bv64) == 0bv8); - free requires (memory_load8_le(mem, 69061bv64) == 0bv8); - free requires (memory_load8_le(mem, 69062bv64) == 0bv8); - free requires (memory_load8_le(mem, 69063bv64) == 0bv8); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); + free requires (memory_load64_le(mem, 69584bv64) == 69688bv64); + free requires (memory_load64_le(mem, 69048bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69568bv64) == 69684bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69056bv64) == 1792bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1992bv64) == 1bv8); free ensures (memory_load8_le(mem, 1993bv64) == 0bv8); free ensures (memory_load8_le(mem, 1994bv64) == 2bv8); free ensures (memory_load8_le(mem, 1995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69584bv64) == 56bv8); - free ensures (memory_load8_le(mem, 69585bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69586bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69587bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69588bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69589bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69590bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69591bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69048bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69049bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69050bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69051bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69052bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69053bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69054bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69055bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69568bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69569bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69570bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69571bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69572bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69573bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69574bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69575bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69584bv64) == 69688bv64); + free ensures (memory_load64_le(mem, 69048bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69568bv64) == 69684bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1792bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -346,3 +210,4 @@ procedure main() assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l00000398; } + diff --git a/src/test/correct/cjump/gcc/cjump.expected b/src/test/correct/cjump/gcc/cjump.expected index 9a98e6265..ba9fc0dc9 100644 --- a/src/test/correct/cjump/gcc/cjump.expected +++ b/src/test/correct/cjump/gcc/cjump.expected @@ -31,6 +31,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -50,43 +54,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1913bv64) == 0bv8); free ensures (memory_load8_le(mem, 1914bv64) == 2bv8); free ensures (memory_load8_le(mem, 1915bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -97,98 +75,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; requires (gamma_load32(Gamma_mem, $x_addr) == true); requires (gamma_load32(Gamma_mem, $y_addr) == false); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1912bv64) == 1bv8); free requires (memory_load8_le(mem, 1913bv64) == 0bv8); free requires (memory_load8_le(mem, 1914bv64) == 2bv8); free requires (memory_load8_le(mem, 1915bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1912bv64) == 1bv8); free ensures (memory_load8_le(mem, 1913bv64) == 0bv8); free ensures (memory_load8_le(mem, 1914bv64) == 2bv8); free ensures (memory_load8_le(mem, 1915bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -253,3 +163,4 @@ procedure main() assume (bvcomp1(ZF, 1bv1) == 0bv1); goto l00000365; } + diff --git a/src/test/correct/cjump/gcc_O2/cjump.expected b/src/test/correct/cjump/gcc_O2/cjump.expected index a280e9d8a..0d59a5334 100644 --- a/src/test/correct/cjump/gcc_O2/cjump.expected +++ b/src/test/correct/cjump/gcc_O2/cjump.expected @@ -25,6 +25,10 @@ function {:extern} gamma_store32(gammaMap: [bv64]bool, index: bv64, value: bool) gammaMap[index := value][bvadd64(index, 1bv64) := value][bvadd64(index, 2bv64) := value][bvadd64(index, 3bv64) := value] } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -41,43 +45,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -88,98 +66,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R2, Gamma_R3, Gamma_mem, R0, R1, R2, R3, mem; requires (gamma_load32(Gamma_mem, $x_addr) == true); requires (gamma_load32(Gamma_mem, $y_addr) == false); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1896bv64) == 1bv8); free requires (memory_load8_le(mem, 1897bv64) == 0bv8); free requires (memory_load8_le(mem, 1898bv64) == 2bv8); free requires (memory_load8_le(mem, 1899bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 80bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 0bv8); - free requires (memory_load8_le(mem, 69025bv64) == 7bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 0bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1536bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1896bv64) == 1bv8); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -198,3 +108,4 @@ procedure main() assume {:captureState "%000001d0"} true; return; } + diff --git a/src/test/correct/cjump/gcc_no_plt_no_pic/cjump.expected b/src/test/correct/cjump/gcc_no_plt_no_pic/cjump.expected index 1f3af0871..634105831 100644 --- a/src/test/correct/cjump/gcc_no_plt_no_pic/cjump.expected +++ b/src/test/correct/cjump/gcc_no_plt_no_pic/cjump.expected @@ -31,6 +31,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -50,43 +54,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1913bv64) == 0bv8); free ensures (memory_load8_le(mem, 1914bv64) == 2bv8); free ensures (memory_load8_le(mem, 1915bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -97,98 +75,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; requires (gamma_load32(Gamma_mem, $x_addr) == true); requires (gamma_load32(Gamma_mem, $y_addr) == false); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1912bv64) == 1bv8); free requires (memory_load8_le(mem, 1913bv64) == 0bv8); free requires (memory_load8_le(mem, 1914bv64) == 2bv8); free requires (memory_load8_le(mem, 1915bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1912bv64) == 1bv8); free ensures (memory_load8_le(mem, 1913bv64) == 0bv8); free ensures (memory_load8_le(mem, 1914bv64) == 2bv8); free ensures (memory_load8_le(mem, 1915bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -253,3 +163,4 @@ procedure main() assume (bvcomp1(ZF, 1bv1) == 0bv1); goto l000009a3; } + diff --git a/src/test/correct/cjump/gcc_pic/cjump.expected b/src/test/correct/cjump/gcc_pic/cjump.expected index 5ca9cc9fa..76d3d7e0e 100644 --- a/src/test/correct/cjump/gcc_pic/cjump.expected +++ b/src/test/correct/cjump/gcc_pic/cjump.expected @@ -58,59 +58,19 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1977bv64) == 0bv8); free ensures (memory_load8_le(mem, 1978bv64) == 2bv8); free ensures (memory_load8_le(mem, 1979bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69608bv64) == 24bv8); - free ensures (memory_load8_le(mem, 69609bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69610bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69611bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69612bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69613bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69614bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69615bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69608bv64) == 69656bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 69652bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1872bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -121,130 +81,34 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; requires (gamma_load32(Gamma_mem, $x_addr) == true); requires (gamma_load32(Gamma_mem, $y_addr) == false); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1976bv64) == 1bv8); free requires (memory_load8_le(mem, 1977bv64) == 0bv8); free requires (memory_load8_le(mem, 1978bv64) == 2bv8); free requires (memory_load8_le(mem, 1979bv64) == 0bv8); - free requires (memory_load8_le(mem, 69608bv64) == 24bv8); - free requires (memory_load8_le(mem, 69609bv64) == 16bv8); - free requires (memory_load8_le(mem, 69610bv64) == 1bv8); - free requires (memory_load8_le(mem, 69611bv64) == 0bv8); - free requires (memory_load8_le(mem, 69612bv64) == 0bv8); - free requires (memory_load8_le(mem, 69613bv64) == 0bv8); - free requires (memory_load8_le(mem, 69614bv64) == 0bv8); - free requires (memory_load8_le(mem, 69615bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 84bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 0bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 16bv8); - free requires (memory_load8_le(mem, 69594bv64) == 1bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 80bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); + free requires (memory_load64_le(mem, 69608bv64) == 69656bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69008bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69592bv64) == 69652bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1872bv64); free ensures (memory_load8_le(mem, 1976bv64) == 1bv8); free ensures (memory_load8_le(mem, 1977bv64) == 0bv8); free ensures (memory_load8_le(mem, 1978bv64) == 2bv8); free ensures (memory_load8_le(mem, 1979bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69608bv64) == 24bv8); - free ensures (memory_load8_le(mem, 69609bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69610bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69611bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69612bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69613bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69614bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69615bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69608bv64) == 69656bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 69652bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1872bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -313,3 +177,4 @@ procedure main() assume (bvcomp1(ZF, 1bv1) == 0bv1); goto l00000368; } + diff --git a/src/test/correct/function/clang/function.expected b/src/test/correct/function/clang/function.expected index 5f0453715..cbf682fdd 100644 --- a/src/test/correct/function/clang/function.expected +++ b/src/test/correct/function/clang/function.expected @@ -63,43 +63,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1885bv64) == 0bv8); free ensures (memory_load8_le(mem, 1886bv64) == 2bv8); free ensures (memory_load8_le(mem, 1887bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -110,81 +84,27 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure get_two() +procedure get_two(); modifies Gamma_R0, R0; free requires (memory_load8_le(mem, 1884bv64) == 1bv8); free requires (memory_load8_le(mem, 1885bv64) == 0bv8); free requires (memory_load8_le(mem, 1886bv64) == 2bv8); free requires (memory_load8_le(mem, 1887bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); ensures (Gamma_R0 == true); free ensures (memory_load8_le(mem, 1884bv64) == 1bv8); free ensures (memory_load8_le(mem, 1885bv64) == 0bv8); free ensures (memory_load8_le(mem, 1886bv64) == 2bv8); free ensures (memory_load8_le(mem, 1887bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation get_two() { lget_two: assume {:captureState "lget_two"} true; @@ -192,62 +112,20 @@ procedure get_two() return; } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R29, R30, R31, R8, R9, mem, stack; requires (gamma_load32(Gamma_mem, $x_addr) == true); requires (gamma_load32(Gamma_mem, $y_addr) == true); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1884bv64) == 1bv8); free requires (memory_load8_le(mem, 1885bv64) == 0bv8); free requires (memory_load8_le(mem, 1886bv64) == 2bv8); free requires (memory_load8_le(mem, 1887bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -256,38 +134,12 @@ procedure main() free ensures (memory_load8_le(mem, 1885bv64) == 0bv8); free ensures (memory_load8_le(mem, 1886bv64) == 2bv8); free ensures (memory_load8_le(mem, 1887bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var #4: bv64; var Gamma_#4: bool; @@ -322,3 +174,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/correct/function/clang_O2/function.expected b/src/test/correct/function/clang_O2/function.expected index fd677be34..2c9511907 100644 --- a/src/test/correct/function/clang_O2/function.expected +++ b/src/test/correct/function/clang_O2/function.expected @@ -27,6 +27,10 @@ function {:extern} gamma_store32(gammaMap: [bv64]bool, index: bv64, value: bool) gammaMap[index := value][bvadd64(index, 1bv64) := value][bvadd64(index, 2bv64) := value][bvadd64(index, 3bv64) := value] } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -43,43 +47,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1873bv64) == 0bv8); free ensures (memory_load8_le(mem, 1874bv64) == 2bv8); free ensures (memory_load8_le(mem, 1875bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -90,98 +68,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R10, Gamma_R11, Gamma_R8, Gamma_R9, Gamma_mem, R0, R10, R11, R8, R9, mem; requires (gamma_load32(Gamma_mem, $x_addr) == true); requires (gamma_load32(Gamma_mem, $y_addr) == true); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1872bv64) == 1bv8); free requires (memory_load8_le(mem, 1873bv64) == 0bv8); free requires (memory_load8_le(mem, 1874bv64) == 2bv8); free requires (memory_load8_le(mem, 1875bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (memory_load8_le(mem, 1872bv64) == 1bv8); free ensures (memory_load8_le(mem, 1873bv64) == 0bv8); free ensures (memory_load8_le(mem, 1874bv64) == 2bv8); free ensures (memory_load8_le(mem, 1875bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -200,3 +110,4 @@ procedure main() assume {:captureState "%000002f9"} true; return; } + diff --git a/src/test/correct/function/clang_no_plt_no_pic/function.expected b/src/test/correct/function/clang_no_plt_no_pic/function.expected index 5f0453715..cbf682fdd 100644 --- a/src/test/correct/function/clang_no_plt_no_pic/function.expected +++ b/src/test/correct/function/clang_no_plt_no_pic/function.expected @@ -63,43 +63,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1885bv64) == 0bv8); free ensures (memory_load8_le(mem, 1886bv64) == 2bv8); free ensures (memory_load8_le(mem, 1887bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -110,81 +84,27 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure get_two() +procedure get_two(); modifies Gamma_R0, R0; free requires (memory_load8_le(mem, 1884bv64) == 1bv8); free requires (memory_load8_le(mem, 1885bv64) == 0bv8); free requires (memory_load8_le(mem, 1886bv64) == 2bv8); free requires (memory_load8_le(mem, 1887bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); ensures (Gamma_R0 == true); free ensures (memory_load8_le(mem, 1884bv64) == 1bv8); free ensures (memory_load8_le(mem, 1885bv64) == 0bv8); free ensures (memory_load8_le(mem, 1886bv64) == 2bv8); free ensures (memory_load8_le(mem, 1887bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation get_two() { lget_two: assume {:captureState "lget_two"} true; @@ -192,62 +112,20 @@ procedure get_two() return; } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R29, R30, R31, R8, R9, mem, stack; requires (gamma_load32(Gamma_mem, $x_addr) == true); requires (gamma_load32(Gamma_mem, $y_addr) == true); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1884bv64) == 1bv8); free requires (memory_load8_le(mem, 1885bv64) == 0bv8); free requires (memory_load8_le(mem, 1886bv64) == 2bv8); free requires (memory_load8_le(mem, 1887bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -256,38 +134,12 @@ procedure main() free ensures (memory_load8_le(mem, 1885bv64) == 0bv8); free ensures (memory_load8_le(mem, 1886bv64) == 2bv8); free ensures (memory_load8_le(mem, 1887bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var #4: bv64; var Gamma_#4: bool; @@ -322,3 +174,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/correct/function/clang_pic/function.expected b/src/test/correct/function/clang_pic/function.expected index 3937a0029..05351a818 100644 --- a/src/test/correct/function/clang_pic/function.expected +++ b/src/test/correct/function/clang_pic/function.expected @@ -63,59 +63,19 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1957bv64) == 0bv8); free ensures (memory_load8_le(mem, 1958bv64) == 2bv8); free ensures (memory_load8_le(mem, 1959bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69584bv64) == 56bv8); - free ensures (memory_load8_le(mem, 69585bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69586bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69587bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69588bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69589bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69590bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69591bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69048bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69049bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69050bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69051bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69052bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69053bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69054bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69055bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69568bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69569bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69570bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69571bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69572bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69573bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69574bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69575bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69584bv64) == 69688bv64); + free ensures (memory_load64_le(mem, 69048bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69568bv64) == 69684bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1792bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -126,113 +86,31 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure get_two() +procedure get_two(); modifies Gamma_R0, R0; free requires (memory_load8_le(mem, 1956bv64) == 1bv8); free requires (memory_load8_le(mem, 1957bv64) == 0bv8); free requires (memory_load8_le(mem, 1958bv64) == 2bv8); free requires (memory_load8_le(mem, 1959bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); - free requires (memory_load8_le(mem, 69584bv64) == 56bv8); - free requires (memory_load8_le(mem, 69585bv64) == 16bv8); - free requires (memory_load8_le(mem, 69586bv64) == 1bv8); - free requires (memory_load8_le(mem, 69587bv64) == 0bv8); - free requires (memory_load8_le(mem, 69588bv64) == 0bv8); - free requires (memory_load8_le(mem, 69589bv64) == 0bv8); - free requires (memory_load8_le(mem, 69590bv64) == 0bv8); - free requires (memory_load8_le(mem, 69591bv64) == 0bv8); - free requires (memory_load8_le(mem, 69048bv64) == 80bv8); - free requires (memory_load8_le(mem, 69049bv64) == 7bv8); - free requires (memory_load8_le(mem, 69050bv64) == 0bv8); - free requires (memory_load8_le(mem, 69051bv64) == 0bv8); - free requires (memory_load8_le(mem, 69052bv64) == 0bv8); - free requires (memory_load8_le(mem, 69053bv64) == 0bv8); - free requires (memory_load8_le(mem, 69054bv64) == 0bv8); - free requires (memory_load8_le(mem, 69055bv64) == 0bv8); - free requires (memory_load8_le(mem, 69568bv64) == 52bv8); - free requires (memory_load8_le(mem, 69569bv64) == 16bv8); - free requires (memory_load8_le(mem, 69570bv64) == 1bv8); - free requires (memory_load8_le(mem, 69571bv64) == 0bv8); - free requires (memory_load8_le(mem, 69572bv64) == 0bv8); - free requires (memory_load8_le(mem, 69573bv64) == 0bv8); - free requires (memory_load8_le(mem, 69574bv64) == 0bv8); - free requires (memory_load8_le(mem, 69575bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 84bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69056bv64) == 0bv8); - free requires (memory_load8_le(mem, 69057bv64) == 7bv8); - free requires (memory_load8_le(mem, 69058bv64) == 0bv8); - free requires (memory_load8_le(mem, 69059bv64) == 0bv8); - free requires (memory_load8_le(mem, 69060bv64) == 0bv8); - free requires (memory_load8_le(mem, 69061bv64) == 0bv8); - free requires (memory_load8_le(mem, 69062bv64) == 0bv8); - free requires (memory_load8_le(mem, 69063bv64) == 0bv8); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); + free requires (memory_load64_le(mem, 69584bv64) == 69688bv64); + free requires (memory_load64_le(mem, 69048bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69568bv64) == 69684bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69056bv64) == 1792bv64); ensures (Gamma_R0 == true); free ensures (memory_load8_le(mem, 1956bv64) == 1bv8); free ensures (memory_load8_le(mem, 1957bv64) == 0bv8); free ensures (memory_load8_le(mem, 1958bv64) == 2bv8); free ensures (memory_load8_le(mem, 1959bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69584bv64) == 56bv8); - free ensures (memory_load8_le(mem, 69585bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69586bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69587bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69588bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69589bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69590bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69591bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69048bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69049bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69050bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69051bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69052bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69053bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69054bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69055bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69568bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69569bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69570bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69571bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69572bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69573bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69574bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69575bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69584bv64) == 69688bv64); + free ensures (memory_load64_le(mem, 69048bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69568bv64) == 69684bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1792bv64); + +implementation get_two() { lget_two: assume {:captureState "lget_two"} true; @@ -240,78 +118,22 @@ procedure get_two() return; } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R29, R30, R31, R8, R9, mem, stack; requires (gamma_load32(Gamma_mem, $x_addr) == true); requires (gamma_load32(Gamma_mem, $y_addr) == true); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1956bv64) == 1bv8); free requires (memory_load8_le(mem, 1957bv64) == 0bv8); free requires (memory_load8_le(mem, 1958bv64) == 2bv8); free requires (memory_load8_le(mem, 1959bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); - free requires (memory_load8_le(mem, 69584bv64) == 56bv8); - free requires (memory_load8_le(mem, 69585bv64) == 16bv8); - free requires (memory_load8_le(mem, 69586bv64) == 1bv8); - free requires (memory_load8_le(mem, 69587bv64) == 0bv8); - free requires (memory_load8_le(mem, 69588bv64) == 0bv8); - free requires (memory_load8_le(mem, 69589bv64) == 0bv8); - free requires (memory_load8_le(mem, 69590bv64) == 0bv8); - free requires (memory_load8_le(mem, 69591bv64) == 0bv8); - free requires (memory_load8_le(mem, 69048bv64) == 80bv8); - free requires (memory_load8_le(mem, 69049bv64) == 7bv8); - free requires (memory_load8_le(mem, 69050bv64) == 0bv8); - free requires (memory_load8_le(mem, 69051bv64) == 0bv8); - free requires (memory_load8_le(mem, 69052bv64) == 0bv8); - free requires (memory_load8_le(mem, 69053bv64) == 0bv8); - free requires (memory_load8_le(mem, 69054bv64) == 0bv8); - free requires (memory_load8_le(mem, 69055bv64) == 0bv8); - free requires (memory_load8_le(mem, 69568bv64) == 52bv8); - free requires (memory_load8_le(mem, 69569bv64) == 16bv8); - free requires (memory_load8_le(mem, 69570bv64) == 1bv8); - free requires (memory_load8_le(mem, 69571bv64) == 0bv8); - free requires (memory_load8_le(mem, 69572bv64) == 0bv8); - free requires (memory_load8_le(mem, 69573bv64) == 0bv8); - free requires (memory_load8_le(mem, 69574bv64) == 0bv8); - free requires (memory_load8_le(mem, 69575bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 84bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69056bv64) == 0bv8); - free requires (memory_load8_le(mem, 69057bv64) == 7bv8); - free requires (memory_load8_le(mem, 69058bv64) == 0bv8); - free requires (memory_load8_le(mem, 69059bv64) == 0bv8); - free requires (memory_load8_le(mem, 69060bv64) == 0bv8); - free requires (memory_load8_le(mem, 69061bv64) == 0bv8); - free requires (memory_load8_le(mem, 69062bv64) == 0bv8); - free requires (memory_load8_le(mem, 69063bv64) == 0bv8); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); + free requires (memory_load64_le(mem, 69584bv64) == 69688bv64); + free requires (memory_load64_le(mem, 69048bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69568bv64) == 69684bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69056bv64) == 1792bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -320,54 +142,14 @@ procedure main() free ensures (memory_load8_le(mem, 1957bv64) == 0bv8); free ensures (memory_load8_le(mem, 1958bv64) == 2bv8); free ensures (memory_load8_le(mem, 1959bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69584bv64) == 56bv8); - free ensures (memory_load8_le(mem, 69585bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69586bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69587bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69588bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69589bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69590bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69591bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69048bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69049bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69050bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69051bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69052bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69053bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69054bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69055bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69568bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69569bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69570bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69571bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69572bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69573bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69574bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69575bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69584bv64) == 69688bv64); + free ensures (memory_load64_le(mem, 69048bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69568bv64) == 69684bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1792bv64); + +implementation main() { var #4: bv64; var Gamma_#4: bool; @@ -406,3 +188,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/correct/function/gcc/function.expected b/src/test/correct/function/gcc/function.expected index 81e902be8..7acf13282 100644 --- a/src/test/correct/function/gcc/function.expected +++ b/src/test/correct/function/gcc/function.expected @@ -62,43 +62,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -109,81 +83,27 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure get_two() +procedure get_two(); modifies Gamma_R0, R0; free requires (memory_load8_le(mem, 1896bv64) == 1bv8); free requires (memory_load8_le(mem, 1897bv64) == 0bv8); free requires (memory_load8_le(mem, 1898bv64) == 2bv8); free requires (memory_load8_le(mem, 1899bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); ensures (Gamma_R0 == true); free ensures (memory_load8_le(mem, 1896bv64) == 1bv8); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation get_two() { lget_two: assume {:captureState "lget_two"} true; @@ -191,62 +111,20 @@ procedure get_two() return; } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R29, R30, R31, mem, stack; requires (gamma_load32(Gamma_mem, $x_addr) == true); requires (gamma_load32(Gamma_mem, $y_addr) == true); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1896bv64) == 1bv8); free requires (memory_load8_le(mem, 1897bv64) == 0bv8); free requires (memory_load8_le(mem, 1898bv64) == 2bv8); free requires (memory_load8_le(mem, 1899bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -255,38 +133,12 @@ procedure main() free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv64; var Gamma_#4: bool; @@ -324,3 +176,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/correct/function/gcc_O2/function.expected b/src/test/correct/function/gcc_O2/function.expected index d1f3a9437..bca56db7f 100644 --- a/src/test/correct/function/gcc_O2/function.expected +++ b/src/test/correct/function/gcc_O2/function.expected @@ -25,6 +25,10 @@ function {:extern} gamma_store32(gammaMap: [bv64]bool, index: bv64, value: bool) gammaMap[index := value][bvadd64(index, 1bv64) := value][bvadd64(index, 2bv64) := value][bvadd64(index, 3bv64) := value] } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -41,43 +45,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1917bv64) == 0bv8); free ensures (memory_load8_le(mem, 1918bv64) == 2bv8); free ensures (memory_load8_le(mem, 1919bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -88,98 +66,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R2, Gamma_R3, Gamma_mem, R0, R1, R2, R3, mem; requires (gamma_load32(Gamma_mem, $x_addr) == true); requires (gamma_load32(Gamma_mem, $y_addr) == true); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1916bv64) == 1bv8); free requires (memory_load8_le(mem, 1917bv64) == 0bv8); free requires (memory_load8_le(mem, 1918bv64) == 2bv8); free requires (memory_load8_le(mem, 1919bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 80bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 0bv8); - free requires (memory_load8_le(mem, 69025bv64) == 7bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 0bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1536bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1916bv64) == 1bv8); free ensures (memory_load8_le(mem, 1917bv64) == 0bv8); free ensures (memory_load8_le(mem, 1918bv64) == 2bv8); free ensures (memory_load8_le(mem, 1919bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -198,3 +108,4 @@ procedure main() assume {:captureState "%000001e4"} true; return; } + diff --git a/src/test/correct/function/gcc_no_plt_no_pic/function.expected b/src/test/correct/function/gcc_no_plt_no_pic/function.expected index 81e902be8..7acf13282 100644 --- a/src/test/correct/function/gcc_no_plt_no_pic/function.expected +++ b/src/test/correct/function/gcc_no_plt_no_pic/function.expected @@ -62,43 +62,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -109,81 +83,27 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure get_two() +procedure get_two(); modifies Gamma_R0, R0; free requires (memory_load8_le(mem, 1896bv64) == 1bv8); free requires (memory_load8_le(mem, 1897bv64) == 0bv8); free requires (memory_load8_le(mem, 1898bv64) == 2bv8); free requires (memory_load8_le(mem, 1899bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); ensures (Gamma_R0 == true); free ensures (memory_load8_le(mem, 1896bv64) == 1bv8); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation get_two() { lget_two: assume {:captureState "lget_two"} true; @@ -191,62 +111,20 @@ procedure get_two() return; } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R29, R30, R31, mem, stack; requires (gamma_load32(Gamma_mem, $x_addr) == true); requires (gamma_load32(Gamma_mem, $y_addr) == true); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1896bv64) == 1bv8); free requires (memory_load8_le(mem, 1897bv64) == 0bv8); free requires (memory_load8_le(mem, 1898bv64) == 2bv8); free requires (memory_load8_le(mem, 1899bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -255,38 +133,12 @@ procedure main() free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv64; var Gamma_#4: bool; @@ -324,3 +176,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/correct/function/gcc_pic/function.expected b/src/test/correct/function/gcc_pic/function.expected index ecdb2f43c..7dc0369c7 100644 --- a/src/test/correct/function/gcc_pic/function.expected +++ b/src/test/correct/function/gcc_pic/function.expected @@ -62,59 +62,19 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1961bv64) == 0bv8); free ensures (memory_load8_le(mem, 1962bv64) == 2bv8); free ensures (memory_load8_le(mem, 1963bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69608bv64) == 24bv8); - free ensures (memory_load8_le(mem, 69609bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69610bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69611bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69612bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69613bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69614bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69615bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69608bv64) == 69656bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 69652bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1872bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -125,113 +85,31 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure get_two() +procedure get_two(); modifies Gamma_R0, R0; free requires (memory_load8_le(mem, 1960bv64) == 1bv8); free requires (memory_load8_le(mem, 1961bv64) == 0bv8); free requires (memory_load8_le(mem, 1962bv64) == 2bv8); free requires (memory_load8_le(mem, 1963bv64) == 0bv8); - free requires (memory_load8_le(mem, 69608bv64) == 24bv8); - free requires (memory_load8_le(mem, 69609bv64) == 16bv8); - free requires (memory_load8_le(mem, 69610bv64) == 1bv8); - free requires (memory_load8_le(mem, 69611bv64) == 0bv8); - free requires (memory_load8_le(mem, 69612bv64) == 0bv8); - free requires (memory_load8_le(mem, 69613bv64) == 0bv8); - free requires (memory_load8_le(mem, 69614bv64) == 0bv8); - free requires (memory_load8_le(mem, 69615bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 84bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 0bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 16bv8); - free requires (memory_load8_le(mem, 69594bv64) == 1bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 80bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); + free requires (memory_load64_le(mem, 69608bv64) == 69656bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69008bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69592bv64) == 69652bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1872bv64); ensures (Gamma_R0 == true); free ensures (memory_load8_le(mem, 1960bv64) == 1bv8); free ensures (memory_load8_le(mem, 1961bv64) == 0bv8); free ensures (memory_load8_le(mem, 1962bv64) == 2bv8); free ensures (memory_load8_le(mem, 1963bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69608bv64) == 24bv8); - free ensures (memory_load8_le(mem, 69609bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69610bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69611bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69612bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69613bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69614bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69615bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69608bv64) == 69656bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 69652bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1872bv64); + +implementation get_two() { lget_two: assume {:captureState "lget_two"} true; @@ -239,78 +117,22 @@ procedure get_two() return; } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R29, R30, R31, mem, stack; requires (gamma_load32(Gamma_mem, $x_addr) == true); requires (gamma_load32(Gamma_mem, $y_addr) == true); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1960bv64) == 1bv8); free requires (memory_load8_le(mem, 1961bv64) == 0bv8); free requires (memory_load8_le(mem, 1962bv64) == 2bv8); free requires (memory_load8_le(mem, 1963bv64) == 0bv8); - free requires (memory_load8_le(mem, 69608bv64) == 24bv8); - free requires (memory_load8_le(mem, 69609bv64) == 16bv8); - free requires (memory_load8_le(mem, 69610bv64) == 1bv8); - free requires (memory_load8_le(mem, 69611bv64) == 0bv8); - free requires (memory_load8_le(mem, 69612bv64) == 0bv8); - free requires (memory_load8_le(mem, 69613bv64) == 0bv8); - free requires (memory_load8_le(mem, 69614bv64) == 0bv8); - free requires (memory_load8_le(mem, 69615bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 84bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 0bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 16bv8); - free requires (memory_load8_le(mem, 69594bv64) == 1bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 80bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); + free requires (memory_load64_le(mem, 69608bv64) == 69656bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69008bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69592bv64) == 69652bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1872bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -319,54 +141,14 @@ procedure main() free ensures (memory_load8_le(mem, 1961bv64) == 0bv8); free ensures (memory_load8_le(mem, 1962bv64) == 2bv8); free ensures (memory_load8_le(mem, 1963bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69608bv64) == 24bv8); - free ensures (memory_load8_le(mem, 69609bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69610bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69611bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69612bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69613bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69614bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69615bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69608bv64) == 69656bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 69652bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1872bv64); + +implementation main() { var #4: bv64; var Gamma_#4: bool; @@ -406,3 +188,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/correct/function1/clang/function1.expected b/src/test/correct/function1/clang/function1.expected index 22620843f..bd56d178a 100644 --- a/src/test/correct/function1/clang/function1.expected +++ b/src/test/correct/function1/clang/function1.expected @@ -89,51 +89,18 @@ procedure {:extern} rely(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); - free ensures (memory_load8_le(mem, 2024bv64) == 1bv8); - free ensures (memory_load8_le(mem, 2025bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2026bv64) == 2bv8); - free ensures (memory_load8_le(mem, 2027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2028bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2029bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2030bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 132bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69680bv64) == 48bv8); - free ensures (memory_load8_le(mem, 69681bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69682bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69683bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69684bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69685bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69686bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69687bv64) == 0bv8); + free ensures (memory_load64_le(mem, 2024bv64) == 2924859843805185bv64); + free ensures (memory_load64_le(mem, 69064bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1924bv64); + free ensures (memory_load64_le(mem, 69680bv64) == 69680bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -144,90 +111,22 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure get_two() +procedure get_two(); modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_stack, R0, R31, R8, R9, stack; - free requires (memory_load8_le(mem, 2024bv64) == 1bv8); - free requires (memory_load8_le(mem, 2025bv64) == 0bv8); - free requires (memory_load8_le(mem, 2026bv64) == 2bv8); - free requires (memory_load8_le(mem, 2027bv64) == 0bv8); - free requires (memory_load8_le(mem, 2028bv64) == 37bv8); - free requires (memory_load8_le(mem, 2029bv64) == 100bv8); - free requires (memory_load8_le(mem, 2030bv64) == 10bv8); - free requires (memory_load8_le(mem, 2031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 80bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 0bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 132bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69680bv64) == 48bv8); - free requires (memory_load8_le(mem, 69681bv64) == 16bv8); - free requires (memory_load8_le(mem, 69682bv64) == 1bv8); - free requires (memory_load8_le(mem, 69683bv64) == 0bv8); - free requires (memory_load8_le(mem, 69684bv64) == 0bv8); - free requires (memory_load8_le(mem, 69685bv64) == 0bv8); - free requires (memory_load8_le(mem, 69686bv64) == 0bv8); - free requires (memory_load8_le(mem, 69687bv64) == 0bv8); + free requires (memory_load64_le(mem, 2024bv64) == 2924859843805185bv64); + free requires (memory_load64_le(mem, 69064bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1924bv64); + free requires (memory_load64_le(mem, 69680bv64) == 69680bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); - free ensures (memory_load8_le(mem, 2024bv64) == 1bv8); - free ensures (memory_load8_le(mem, 2025bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2026bv64) == 2bv8); - free ensures (memory_load8_le(mem, 2027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2028bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2029bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2030bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 132bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69680bv64) == 48bv8); - free ensures (memory_load8_le(mem, 69681bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69682bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69683bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69684bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69685bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69686bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69687bv64) == 0bv8); + free ensures (memory_load64_le(mem, 2024bv64) == 2924859843805185bv64); + free ensures (memory_load64_le(mem, 69064bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1924bv64); + free ensures (memory_load64_le(mem, 69680bv64) == 69680bv64); + +implementation get_two() { lget_two: assume {:captureState "lget_two"} true; @@ -248,108 +147,26 @@ procedure get_two() return; } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R16, Gamma_R17, Gamma_R2, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R1, R16, R17, R2, R29, R30, R31, R8, R9, mem, stack; - free requires (memory_load8_le(mem, 69672bv64) == 0bv8); - free requires (memory_load8_le(mem, 69673bv64) == 0bv8); - free requires (memory_load8_le(mem, 69674bv64) == 0bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); - free requires (memory_load8_le(mem, 69680bv64) == 48bv8); - free requires (memory_load8_le(mem, 69681bv64) == 16bv8); - free requires (memory_load8_le(mem, 69682bv64) == 1bv8); - free requires (memory_load8_le(mem, 69683bv64) == 0bv8); - free requires (memory_load8_le(mem, 69684bv64) == 0bv8); - free requires (memory_load8_le(mem, 69685bv64) == 0bv8); - free requires (memory_load8_le(mem, 69686bv64) == 0bv8); - free requires (memory_load8_le(mem, 69687bv64) == 0bv8); - free requires (memory_load8_le(mem, 2024bv64) == 1bv8); - free requires (memory_load8_le(mem, 2025bv64) == 0bv8); - free requires (memory_load8_le(mem, 2026bv64) == 2bv8); - free requires (memory_load8_le(mem, 2027bv64) == 0bv8); - free requires (memory_load8_le(mem, 2028bv64) == 37bv8); - free requires (memory_load8_le(mem, 2029bv64) == 100bv8); - free requires (memory_load8_le(mem, 2030bv64) == 10bv8); - free requires (memory_load8_le(mem, 2031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 80bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 0bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 132bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69680bv64) == 48bv8); - free requires (memory_load8_le(mem, 69681bv64) == 16bv8); - free requires (memory_load8_le(mem, 69682bv64) == 1bv8); - free requires (memory_load8_le(mem, 69683bv64) == 0bv8); - free requires (memory_load8_le(mem, 69684bv64) == 0bv8); - free requires (memory_load8_le(mem, 69685bv64) == 0bv8); - free requires (memory_load8_le(mem, 69686bv64) == 0bv8); - free requires (memory_load8_le(mem, 69687bv64) == 0bv8); + free requires (memory_load64_le(mem, 69672bv64) == 0bv64); + free requires (memory_load64_le(mem, 69680bv64) == 69680bv64); + free requires (memory_load64_le(mem, 2024bv64) == 2924859843805185bv64); + free requires (memory_load64_le(mem, 69064bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1924bv64); + free requires (memory_load64_le(mem, 69680bv64) == 69680bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); free ensures (R31 == old(R31)); - free ensures (memory_load8_le(mem, 2024bv64) == 1bv8); - free ensures (memory_load8_le(mem, 2025bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2026bv64) == 2bv8); - free ensures (memory_load8_le(mem, 2027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2028bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2029bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2030bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 132bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69680bv64) == 48bv8); - free ensures (memory_load8_le(mem, 69681bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69682bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69683bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69684bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69685bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69686bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69687bv64) == 0bv8); + free ensures (memory_load64_le(mem, 2024bv64) == 2924859843805185bv64); + free ensures (memory_load64_le(mem, 69064bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1924bv64); + free ensures (memory_load64_le(mem, 69680bv64) == 69680bv64); + +implementation main() { var #4: bv64; var Gamma_#4: bool; @@ -401,83 +218,14 @@ procedure main() procedure printf(); modifies Gamma_R16, Gamma_R17, R16, R17; - free requires (memory_load8_le(mem, 2024bv64) == 1bv8); - free requires (memory_load8_le(mem, 2025bv64) == 0bv8); - free requires (memory_load8_le(mem, 2026bv64) == 2bv8); - free requires (memory_load8_le(mem, 2027bv64) == 0bv8); - free requires (memory_load8_le(mem, 2028bv64) == 37bv8); - free requires (memory_load8_le(mem, 2029bv64) == 100bv8); - free requires (memory_load8_le(mem, 2030bv64) == 10bv8); - free requires (memory_load8_le(mem, 2031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 80bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 0bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 132bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69680bv64) == 48bv8); - free requires (memory_load8_le(mem, 69681bv64) == 16bv8); - free requires (memory_load8_le(mem, 69682bv64) == 1bv8); - free requires (memory_load8_le(mem, 69683bv64) == 0bv8); - free requires (memory_load8_le(mem, 69684bv64) == 0bv8); - free requires (memory_load8_le(mem, 69685bv64) == 0bv8); - free requires (memory_load8_le(mem, 69686bv64) == 0bv8); - free requires (memory_load8_le(mem, 69687bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2024bv64) == 1bv8); - free ensures (memory_load8_le(mem, 2025bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2026bv64) == 2bv8); - free ensures (memory_load8_le(mem, 2027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2028bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2029bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2030bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 132bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69680bv64) == 48bv8); - free ensures (memory_load8_le(mem, 69681bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69682bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69683bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69684bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69685bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69686bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69687bv64) == 0bv8); + free requires (memory_load64_le(mem, 2024bv64) == 2924859843805185bv64); + free requires (memory_load64_le(mem, 69064bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1924bv64); + free requires (memory_load64_le(mem, 69680bv64) == 69680bv64); + free ensures (memory_load64_le(mem, 2024bv64) == 2924859843805185bv64); + free ensures (memory_load64_le(mem, 69064bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1924bv64); + free ensures (memory_load64_le(mem, 69680bv64) == 69680bv64); + diff --git a/src/test/correct/function1/clang_O2/function1.expected b/src/test/correct/function1/clang_O2/function1.expected index bddeefebb..b409938cf 100644 --- a/src/test/correct/function1/clang_O2/function1.expected +++ b/src/test/correct/function1/clang_O2/function1.expected @@ -51,10 +51,6 @@ function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv6 (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) } -function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { - memory[index] -} - function {:extern} memory_store32_le(memory: [bv64]bv8, index: bv64, value: bv32) returns ([bv64]bv8) { memory[index := value[8:0]][bvadd64(index, 1bv64) := value[16:8]][bvadd64(index, 2bv64) := value[24:16]][bvadd64(index, 3bv64) := value[32:24]] } @@ -68,51 +64,18 @@ procedure {:extern} rely(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); - free ensures (memory_load8_le(mem, 1976bv64) == 1bv8); - free ensures (memory_load8_le(mem, 1977bv64) == 0bv8); - free ensures (memory_load8_le(mem, 1978bv64) == 2bv8); - free ensures (memory_load8_le(mem, 1979bv64) == 0bv8); - free ensures (memory_load8_le(mem, 1980bv64) == 37bv8); - free ensures (memory_load8_le(mem, 1981bv64) == 100bv8); - free ensures (memory_load8_le(mem, 1982bv64) == 10bv8); - free ensures (memory_load8_le(mem, 1983bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 96bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69680bv64) == 48bv8); - free ensures (memory_load8_le(mem, 69681bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69682bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69683bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69684bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69685bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69686bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69687bv64) == 0bv8); + free ensures (memory_load64_le(mem, 1976bv64) == 2924859843805185bv64); + free ensures (memory_load64_le(mem, 69064bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1888bv64); + free ensures (memory_load64_le(mem, 69680bv64) == 69680bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -123,108 +86,26 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R10, Gamma_R11, Gamma_R16, Gamma_R17, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R1, R10, R11, R16, R17, R29, R30, R31, R8, R9, mem, stack; - free requires (memory_load8_le(mem, 69672bv64) == 0bv8); - free requires (memory_load8_le(mem, 69673bv64) == 0bv8); - free requires (memory_load8_le(mem, 69674bv64) == 0bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); - free requires (memory_load8_le(mem, 69680bv64) == 48bv8); - free requires (memory_load8_le(mem, 69681bv64) == 16bv8); - free requires (memory_load8_le(mem, 69682bv64) == 1bv8); - free requires (memory_load8_le(mem, 69683bv64) == 0bv8); - free requires (memory_load8_le(mem, 69684bv64) == 0bv8); - free requires (memory_load8_le(mem, 69685bv64) == 0bv8); - free requires (memory_load8_le(mem, 69686bv64) == 0bv8); - free requires (memory_load8_le(mem, 69687bv64) == 0bv8); - free requires (memory_load8_le(mem, 1976bv64) == 1bv8); - free requires (memory_load8_le(mem, 1977bv64) == 0bv8); - free requires (memory_load8_le(mem, 1978bv64) == 2bv8); - free requires (memory_load8_le(mem, 1979bv64) == 0bv8); - free requires (memory_load8_le(mem, 1980bv64) == 37bv8); - free requires (memory_load8_le(mem, 1981bv64) == 100bv8); - free requires (memory_load8_le(mem, 1982bv64) == 10bv8); - free requires (memory_load8_le(mem, 1983bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 80bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 0bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 96bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69680bv64) == 48bv8); - free requires (memory_load8_le(mem, 69681bv64) == 16bv8); - free requires (memory_load8_le(mem, 69682bv64) == 1bv8); - free requires (memory_load8_le(mem, 69683bv64) == 0bv8); - free requires (memory_load8_le(mem, 69684bv64) == 0bv8); - free requires (memory_load8_le(mem, 69685bv64) == 0bv8); - free requires (memory_load8_le(mem, 69686bv64) == 0bv8); - free requires (memory_load8_le(mem, 69687bv64) == 0bv8); + free requires (memory_load64_le(mem, 69672bv64) == 0bv64); + free requires (memory_load64_le(mem, 69680bv64) == 69680bv64); + free requires (memory_load64_le(mem, 1976bv64) == 2924859843805185bv64); + free requires (memory_load64_le(mem, 69064bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1888bv64); + free requires (memory_load64_le(mem, 69680bv64) == 69680bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); free ensures (R31 == old(R31)); - free ensures (memory_load8_le(mem, 1976bv64) == 1bv8); - free ensures (memory_load8_le(mem, 1977bv64) == 0bv8); - free ensures (memory_load8_le(mem, 1978bv64) == 2bv8); - free ensures (memory_load8_le(mem, 1979bv64) == 0bv8); - free ensures (memory_load8_le(mem, 1980bv64) == 37bv8); - free ensures (memory_load8_le(mem, 1981bv64) == 100bv8); - free ensures (memory_load8_le(mem, 1982bv64) == 10bv8); - free ensures (memory_load8_le(mem, 1983bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 96bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69680bv64) == 48bv8); - free ensures (memory_load8_le(mem, 69681bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69682bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69683bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69684bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69685bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69686bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69687bv64) == 0bv8); + free ensures (memory_load64_le(mem, 1976bv64) == 2924859843805185bv64); + free ensures (memory_load64_le(mem, 69064bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1888bv64); + free ensures (memory_load64_le(mem, 69680bv64) == 69680bv64); + +implementation main() { var #4: bv64; var Gamma_#4: bool; @@ -268,83 +149,14 @@ procedure main() procedure printf(); modifies Gamma_R16, Gamma_R17, R16, R17; - free requires (memory_load8_le(mem, 1976bv64) == 1bv8); - free requires (memory_load8_le(mem, 1977bv64) == 0bv8); - free requires (memory_load8_le(mem, 1978bv64) == 2bv8); - free requires (memory_load8_le(mem, 1979bv64) == 0bv8); - free requires (memory_load8_le(mem, 1980bv64) == 37bv8); - free requires (memory_load8_le(mem, 1981bv64) == 100bv8); - free requires (memory_load8_le(mem, 1982bv64) == 10bv8); - free requires (memory_load8_le(mem, 1983bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 80bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 0bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 96bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69680bv64) == 48bv8); - free requires (memory_load8_le(mem, 69681bv64) == 16bv8); - free requires (memory_load8_le(mem, 69682bv64) == 1bv8); - free requires (memory_load8_le(mem, 69683bv64) == 0bv8); - free requires (memory_load8_le(mem, 69684bv64) == 0bv8); - free requires (memory_load8_le(mem, 69685bv64) == 0bv8); - free requires (memory_load8_le(mem, 69686bv64) == 0bv8); - free requires (memory_load8_le(mem, 69687bv64) == 0bv8); - free ensures (memory_load8_le(mem, 1976bv64) == 1bv8); - free ensures (memory_load8_le(mem, 1977bv64) == 0bv8); - free ensures (memory_load8_le(mem, 1978bv64) == 2bv8); - free ensures (memory_load8_le(mem, 1979bv64) == 0bv8); - free ensures (memory_load8_le(mem, 1980bv64) == 37bv8); - free ensures (memory_load8_le(mem, 1981bv64) == 100bv8); - free ensures (memory_load8_le(mem, 1982bv64) == 10bv8); - free ensures (memory_load8_le(mem, 1983bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 96bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69680bv64) == 48bv8); - free ensures (memory_load8_le(mem, 69681bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69682bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69683bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69684bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69685bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69686bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69687bv64) == 0bv8); + free requires (memory_load64_le(mem, 1976bv64) == 2924859843805185bv64); + free requires (memory_load64_le(mem, 69064bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1888bv64); + free requires (memory_load64_le(mem, 69680bv64) == 69680bv64); + free ensures (memory_load64_le(mem, 1976bv64) == 2924859843805185bv64); + free ensures (memory_load64_le(mem, 69064bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1888bv64); + free ensures (memory_load64_le(mem, 69680bv64) == 69680bv64); + diff --git a/src/test/correct/function1/clang_no_plt_no_pic/function1.expected b/src/test/correct/function1/clang_no_plt_no_pic/function1.expected index aa6caaf17..c08b53e66 100644 --- a/src/test/correct/function1/clang_no_plt_no_pic/function1.expected +++ b/src/test/correct/function1/clang_no_plt_no_pic/function1.expected @@ -89,51 +89,18 @@ procedure {:extern} rely(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); - free ensures (memory_load8_le(mem, 2024bv64) == 1bv8); - free ensures (memory_load8_le(mem, 2025bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2026bv64) == 2bv8); - free ensures (memory_load8_le(mem, 2027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2028bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2029bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2030bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 132bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69680bv64) == 48bv8); - free ensures (memory_load8_le(mem, 69681bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69682bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69683bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69684bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69685bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69686bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69687bv64) == 0bv8); + free ensures (memory_load64_le(mem, 2024bv64) == 2924859843805185bv64); + free ensures (memory_load64_le(mem, 69064bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1924bv64); + free ensures (memory_load64_le(mem, 69680bv64) == 69680bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -144,90 +111,22 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure get_two() +procedure get_two(); modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_stack, R0, R31, R8, R9, stack; - free requires (memory_load8_le(mem, 2024bv64) == 1bv8); - free requires (memory_load8_le(mem, 2025bv64) == 0bv8); - free requires (memory_load8_le(mem, 2026bv64) == 2bv8); - free requires (memory_load8_le(mem, 2027bv64) == 0bv8); - free requires (memory_load8_le(mem, 2028bv64) == 37bv8); - free requires (memory_load8_le(mem, 2029bv64) == 100bv8); - free requires (memory_load8_le(mem, 2030bv64) == 10bv8); - free requires (memory_load8_le(mem, 2031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 80bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 0bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 132bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69680bv64) == 48bv8); - free requires (memory_load8_le(mem, 69681bv64) == 16bv8); - free requires (memory_load8_le(mem, 69682bv64) == 1bv8); - free requires (memory_load8_le(mem, 69683bv64) == 0bv8); - free requires (memory_load8_le(mem, 69684bv64) == 0bv8); - free requires (memory_load8_le(mem, 69685bv64) == 0bv8); - free requires (memory_load8_le(mem, 69686bv64) == 0bv8); - free requires (memory_load8_le(mem, 69687bv64) == 0bv8); + free requires (memory_load64_le(mem, 2024bv64) == 2924859843805185bv64); + free requires (memory_load64_le(mem, 69064bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1924bv64); + free requires (memory_load64_le(mem, 69680bv64) == 69680bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); - free ensures (memory_load8_le(mem, 2024bv64) == 1bv8); - free ensures (memory_load8_le(mem, 2025bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2026bv64) == 2bv8); - free ensures (memory_load8_le(mem, 2027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2028bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2029bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2030bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 132bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69680bv64) == 48bv8); - free ensures (memory_load8_le(mem, 69681bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69682bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69683bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69684bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69685bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69686bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69687bv64) == 0bv8); + free ensures (memory_load64_le(mem, 2024bv64) == 2924859843805185bv64); + free ensures (memory_load64_le(mem, 69064bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1924bv64); + free ensures (memory_load64_le(mem, 69680bv64) == 69680bv64); + +implementation get_two() { lget_two: assume {:captureState "lget_two"} true; @@ -248,108 +147,26 @@ procedure get_two() return; } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R16, Gamma_R17, Gamma_R2, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R1, R16, R17, R2, R29, R30, R31, R8, R9, mem, stack; - free requires (memory_load8_le(mem, 69672bv64) == 0bv8); - free requires (memory_load8_le(mem, 69673bv64) == 0bv8); - free requires (memory_load8_le(mem, 69674bv64) == 0bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); - free requires (memory_load8_le(mem, 69680bv64) == 48bv8); - free requires (memory_load8_le(mem, 69681bv64) == 16bv8); - free requires (memory_load8_le(mem, 69682bv64) == 1bv8); - free requires (memory_load8_le(mem, 69683bv64) == 0bv8); - free requires (memory_load8_le(mem, 69684bv64) == 0bv8); - free requires (memory_load8_le(mem, 69685bv64) == 0bv8); - free requires (memory_load8_le(mem, 69686bv64) == 0bv8); - free requires (memory_load8_le(mem, 69687bv64) == 0bv8); - free requires (memory_load8_le(mem, 2024bv64) == 1bv8); - free requires (memory_load8_le(mem, 2025bv64) == 0bv8); - free requires (memory_load8_le(mem, 2026bv64) == 2bv8); - free requires (memory_load8_le(mem, 2027bv64) == 0bv8); - free requires (memory_load8_le(mem, 2028bv64) == 37bv8); - free requires (memory_load8_le(mem, 2029bv64) == 100bv8); - free requires (memory_load8_le(mem, 2030bv64) == 10bv8); - free requires (memory_load8_le(mem, 2031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 80bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 0bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 132bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69680bv64) == 48bv8); - free requires (memory_load8_le(mem, 69681bv64) == 16bv8); - free requires (memory_load8_le(mem, 69682bv64) == 1bv8); - free requires (memory_load8_le(mem, 69683bv64) == 0bv8); - free requires (memory_load8_le(mem, 69684bv64) == 0bv8); - free requires (memory_load8_le(mem, 69685bv64) == 0bv8); - free requires (memory_load8_le(mem, 69686bv64) == 0bv8); - free requires (memory_load8_le(mem, 69687bv64) == 0bv8); + free requires (memory_load64_le(mem, 69672bv64) == 0bv64); + free requires (memory_load64_le(mem, 69680bv64) == 69680bv64); + free requires (memory_load64_le(mem, 2024bv64) == 2924859843805185bv64); + free requires (memory_load64_le(mem, 69064bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1924bv64); + free requires (memory_load64_le(mem, 69680bv64) == 69680bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); free ensures (R31 == old(R31)); - free ensures (memory_load8_le(mem, 2024bv64) == 1bv8); - free ensures (memory_load8_le(mem, 2025bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2026bv64) == 2bv8); - free ensures (memory_load8_le(mem, 2027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2028bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2029bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2030bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 132bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69680bv64) == 48bv8); - free ensures (memory_load8_le(mem, 69681bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69682bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69683bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69684bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69685bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69686bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69687bv64) == 0bv8); + free ensures (memory_load64_le(mem, 2024bv64) == 2924859843805185bv64); + free ensures (memory_load64_le(mem, 69064bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1924bv64); + free ensures (memory_load64_le(mem, 69680bv64) == 69680bv64); + +implementation main() { var #4: bv64; var Gamma_#4: bool; @@ -401,83 +218,14 @@ procedure main() procedure printf(); modifies Gamma_R16, Gamma_R17, R16, R17; - free requires (memory_load8_le(mem, 2024bv64) == 1bv8); - free requires (memory_load8_le(mem, 2025bv64) == 0bv8); - free requires (memory_load8_le(mem, 2026bv64) == 2bv8); - free requires (memory_load8_le(mem, 2027bv64) == 0bv8); - free requires (memory_load8_le(mem, 2028bv64) == 37bv8); - free requires (memory_load8_le(mem, 2029bv64) == 100bv8); - free requires (memory_load8_le(mem, 2030bv64) == 10bv8); - free requires (memory_load8_le(mem, 2031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 80bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 0bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 132bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69680bv64) == 48bv8); - free requires (memory_load8_le(mem, 69681bv64) == 16bv8); - free requires (memory_load8_le(mem, 69682bv64) == 1bv8); - free requires (memory_load8_le(mem, 69683bv64) == 0bv8); - free requires (memory_load8_le(mem, 69684bv64) == 0bv8); - free requires (memory_load8_le(mem, 69685bv64) == 0bv8); - free requires (memory_load8_le(mem, 69686bv64) == 0bv8); - free requires (memory_load8_le(mem, 69687bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2024bv64) == 1bv8); - free ensures (memory_load8_le(mem, 2025bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2026bv64) == 2bv8); - free ensures (memory_load8_le(mem, 2027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2028bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2029bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2030bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 132bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69680bv64) == 48bv8); - free ensures (memory_load8_le(mem, 69681bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69682bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69683bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69684bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69685bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69686bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69687bv64) == 0bv8); + free requires (memory_load64_le(mem, 2024bv64) == 2924859843805185bv64); + free requires (memory_load64_le(mem, 69064bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1924bv64); + free requires (memory_load64_le(mem, 69680bv64) == 69680bv64); + free ensures (memory_load64_le(mem, 2024bv64) == 2924859843805185bv64); + free ensures (memory_load64_le(mem, 69064bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1924bv64); + free ensures (memory_load64_le(mem, 69680bv64) == 69680bv64); + diff --git a/src/test/correct/function1/clang_pic/function1.expected b/src/test/correct/function1/clang_pic/function1.expected index 2c77c2294..460f00f06 100644 --- a/src/test/correct/function1/clang_pic/function1.expected +++ b/src/test/correct/function1/clang_pic/function1.expected @@ -89,67 +89,20 @@ procedure {:extern} rely(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); - free ensures (memory_load8_le(mem, 2096bv64) == 1bv8); - free ensures (memory_load8_le(mem, 2097bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2098bv64) == 2bv8); - free ensures (memory_load8_le(mem, 2099bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2100bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2101bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2102bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2103bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69048bv64) == 144bv8); - free ensures (memory_load8_le(mem, 69049bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69050bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69051bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69052bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69053bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69054bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69055bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69568bv64) == 60bv8); - free ensures (memory_load8_le(mem, 69569bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69570bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69571bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69572bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69573bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69574bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69575bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 196bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69680bv64) == 48bv8); - free ensures (memory_load8_le(mem, 69681bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69682bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69683bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69684bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69685bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69686bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69687bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69584bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69585bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69586bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69587bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69588bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69589bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69590bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69591bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 2096bv64) == 2924859843805185bv64); + free ensures (memory_load64_le(mem, 69048bv64) == 1936bv64); + free ensures (memory_load64_le(mem, 69568bv64) == 69692bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1988bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1856bv64); + free ensures (memory_load64_le(mem, 69680bv64) == 69680bv64); + free ensures (memory_load64_le(mem, 69584bv64) == 69696bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -160,122 +113,26 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure get_two() +procedure get_two(); modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_stack, R0, R31, R8, R9, stack; - free requires (memory_load8_le(mem, 2096bv64) == 1bv8); - free requires (memory_load8_le(mem, 2097bv64) == 0bv8); - free requires (memory_load8_le(mem, 2098bv64) == 2bv8); - free requires (memory_load8_le(mem, 2099bv64) == 0bv8); - free requires (memory_load8_le(mem, 2100bv64) == 37bv8); - free requires (memory_load8_le(mem, 2101bv64) == 100bv8); - free requires (memory_load8_le(mem, 2102bv64) == 10bv8); - free requires (memory_load8_le(mem, 2103bv64) == 0bv8); - free requires (memory_load8_le(mem, 69048bv64) == 144bv8); - free requires (memory_load8_le(mem, 69049bv64) == 7bv8); - free requires (memory_load8_le(mem, 69050bv64) == 0bv8); - free requires (memory_load8_le(mem, 69051bv64) == 0bv8); - free requires (memory_load8_le(mem, 69052bv64) == 0bv8); - free requires (memory_load8_le(mem, 69053bv64) == 0bv8); - free requires (memory_load8_le(mem, 69054bv64) == 0bv8); - free requires (memory_load8_le(mem, 69055bv64) == 0bv8); - free requires (memory_load8_le(mem, 69568bv64) == 60bv8); - free requires (memory_load8_le(mem, 69569bv64) == 16bv8); - free requires (memory_load8_le(mem, 69570bv64) == 1bv8); - free requires (memory_load8_le(mem, 69571bv64) == 0bv8); - free requires (memory_load8_le(mem, 69572bv64) == 0bv8); - free requires (memory_load8_le(mem, 69573bv64) == 0bv8); - free requires (memory_load8_le(mem, 69574bv64) == 0bv8); - free requires (memory_load8_le(mem, 69575bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 196bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69056bv64) == 64bv8); - free requires (memory_load8_le(mem, 69057bv64) == 7bv8); - free requires (memory_load8_le(mem, 69058bv64) == 0bv8); - free requires (memory_load8_le(mem, 69059bv64) == 0bv8); - free requires (memory_load8_le(mem, 69060bv64) == 0bv8); - free requires (memory_load8_le(mem, 69061bv64) == 0bv8); - free requires (memory_load8_le(mem, 69062bv64) == 0bv8); - free requires (memory_load8_le(mem, 69063bv64) == 0bv8); - free requires (memory_load8_le(mem, 69680bv64) == 48bv8); - free requires (memory_load8_le(mem, 69681bv64) == 16bv8); - free requires (memory_load8_le(mem, 69682bv64) == 1bv8); - free requires (memory_load8_le(mem, 69683bv64) == 0bv8); - free requires (memory_load8_le(mem, 69684bv64) == 0bv8); - free requires (memory_load8_le(mem, 69685bv64) == 0bv8); - free requires (memory_load8_le(mem, 69686bv64) == 0bv8); - free requires (memory_load8_le(mem, 69687bv64) == 0bv8); - free requires (memory_load8_le(mem, 69584bv64) == 64bv8); - free requires (memory_load8_le(mem, 69585bv64) == 16bv8); - free requires (memory_load8_le(mem, 69586bv64) == 1bv8); - free requires (memory_load8_le(mem, 69587bv64) == 0bv8); - free requires (memory_load8_le(mem, 69588bv64) == 0bv8); - free requires (memory_load8_le(mem, 69589bv64) == 0bv8); - free requires (memory_load8_le(mem, 69590bv64) == 0bv8); - free requires (memory_load8_le(mem, 69591bv64) == 0bv8); + free requires (memory_load64_le(mem, 2096bv64) == 2924859843805185bv64); + free requires (memory_load64_le(mem, 69048bv64) == 1936bv64); + free requires (memory_load64_le(mem, 69568bv64) == 69692bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1988bv64); + free requires (memory_load64_le(mem, 69056bv64) == 1856bv64); + free requires (memory_load64_le(mem, 69680bv64) == 69680bv64); + free requires (memory_load64_le(mem, 69584bv64) == 69696bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); - free ensures (memory_load8_le(mem, 2096bv64) == 1bv8); - free ensures (memory_load8_le(mem, 2097bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2098bv64) == 2bv8); - free ensures (memory_load8_le(mem, 2099bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2100bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2101bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2102bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2103bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69048bv64) == 144bv8); - free ensures (memory_load8_le(mem, 69049bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69050bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69051bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69052bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69053bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69054bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69055bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69568bv64) == 60bv8); - free ensures (memory_load8_le(mem, 69569bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69570bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69571bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69572bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69573bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69574bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69575bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 196bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69680bv64) == 48bv8); - free ensures (memory_load8_le(mem, 69681bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69682bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69683bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69684bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69685bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69686bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69687bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69584bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69585bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69586bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69587bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69588bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69589bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69590bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69591bv64) == 0bv8); + free ensures (memory_load64_le(mem, 2096bv64) == 2924859843805185bv64); + free ensures (memory_load64_le(mem, 69048bv64) == 1936bv64); + free ensures (memory_load64_le(mem, 69568bv64) == 69692bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1988bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1856bv64); + free ensures (memory_load64_le(mem, 69680bv64) == 69680bv64); + free ensures (memory_load64_le(mem, 69584bv64) == 69696bv64); + +implementation get_two() { lget_two: assume {:captureState "lget_two"} true; @@ -296,140 +153,30 @@ procedure get_two() return; } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R16, Gamma_R17, Gamma_R2, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R1, R16, R17, R2, R29, R30, R31, R8, R9, mem, stack; - free requires (memory_load8_le(mem, 69672bv64) == 0bv8); - free requires (memory_load8_le(mem, 69673bv64) == 0bv8); - free requires (memory_load8_le(mem, 69674bv64) == 0bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); - free requires (memory_load8_le(mem, 69680bv64) == 48bv8); - free requires (memory_load8_le(mem, 69681bv64) == 16bv8); - free requires (memory_load8_le(mem, 69682bv64) == 1bv8); - free requires (memory_load8_le(mem, 69683bv64) == 0bv8); - free requires (memory_load8_le(mem, 69684bv64) == 0bv8); - free requires (memory_load8_le(mem, 69685bv64) == 0bv8); - free requires (memory_load8_le(mem, 69686bv64) == 0bv8); - free requires (memory_load8_le(mem, 69687bv64) == 0bv8); - free requires (memory_load8_le(mem, 2096bv64) == 1bv8); - free requires (memory_load8_le(mem, 2097bv64) == 0bv8); - free requires (memory_load8_le(mem, 2098bv64) == 2bv8); - free requires (memory_load8_le(mem, 2099bv64) == 0bv8); - free requires (memory_load8_le(mem, 2100bv64) == 37bv8); - free requires (memory_load8_le(mem, 2101bv64) == 100bv8); - free requires (memory_load8_le(mem, 2102bv64) == 10bv8); - free requires (memory_load8_le(mem, 2103bv64) == 0bv8); - free requires (memory_load8_le(mem, 69048bv64) == 144bv8); - free requires (memory_load8_le(mem, 69049bv64) == 7bv8); - free requires (memory_load8_le(mem, 69050bv64) == 0bv8); - free requires (memory_load8_le(mem, 69051bv64) == 0bv8); - free requires (memory_load8_le(mem, 69052bv64) == 0bv8); - free requires (memory_load8_le(mem, 69053bv64) == 0bv8); - free requires (memory_load8_le(mem, 69054bv64) == 0bv8); - free requires (memory_load8_le(mem, 69055bv64) == 0bv8); - free requires (memory_load8_le(mem, 69568bv64) == 60bv8); - free requires (memory_load8_le(mem, 69569bv64) == 16bv8); - free requires (memory_load8_le(mem, 69570bv64) == 1bv8); - free requires (memory_load8_le(mem, 69571bv64) == 0bv8); - free requires (memory_load8_le(mem, 69572bv64) == 0bv8); - free requires (memory_load8_le(mem, 69573bv64) == 0bv8); - free requires (memory_load8_le(mem, 69574bv64) == 0bv8); - free requires (memory_load8_le(mem, 69575bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 196bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69056bv64) == 64bv8); - free requires (memory_load8_le(mem, 69057bv64) == 7bv8); - free requires (memory_load8_le(mem, 69058bv64) == 0bv8); - free requires (memory_load8_le(mem, 69059bv64) == 0bv8); - free requires (memory_load8_le(mem, 69060bv64) == 0bv8); - free requires (memory_load8_le(mem, 69061bv64) == 0bv8); - free requires (memory_load8_le(mem, 69062bv64) == 0bv8); - free requires (memory_load8_le(mem, 69063bv64) == 0bv8); - free requires (memory_load8_le(mem, 69680bv64) == 48bv8); - free requires (memory_load8_le(mem, 69681bv64) == 16bv8); - free requires (memory_load8_le(mem, 69682bv64) == 1bv8); - free requires (memory_load8_le(mem, 69683bv64) == 0bv8); - free requires (memory_load8_le(mem, 69684bv64) == 0bv8); - free requires (memory_load8_le(mem, 69685bv64) == 0bv8); - free requires (memory_load8_le(mem, 69686bv64) == 0bv8); - free requires (memory_load8_le(mem, 69687bv64) == 0bv8); - free requires (memory_load8_le(mem, 69584bv64) == 64bv8); - free requires (memory_load8_le(mem, 69585bv64) == 16bv8); - free requires (memory_load8_le(mem, 69586bv64) == 1bv8); - free requires (memory_load8_le(mem, 69587bv64) == 0bv8); - free requires (memory_load8_le(mem, 69588bv64) == 0bv8); - free requires (memory_load8_le(mem, 69589bv64) == 0bv8); - free requires (memory_load8_le(mem, 69590bv64) == 0bv8); - free requires (memory_load8_le(mem, 69591bv64) == 0bv8); + free requires (memory_load64_le(mem, 69672bv64) == 0bv64); + free requires (memory_load64_le(mem, 69680bv64) == 69680bv64); + free requires (memory_load64_le(mem, 2096bv64) == 2924859843805185bv64); + free requires (memory_load64_le(mem, 69048bv64) == 1936bv64); + free requires (memory_load64_le(mem, 69568bv64) == 69692bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1988bv64); + free requires (memory_load64_le(mem, 69056bv64) == 1856bv64); + free requires (memory_load64_le(mem, 69680bv64) == 69680bv64); + free requires (memory_load64_le(mem, 69584bv64) == 69696bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); free ensures (R31 == old(R31)); - free ensures (memory_load8_le(mem, 2096bv64) == 1bv8); - free ensures (memory_load8_le(mem, 2097bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2098bv64) == 2bv8); - free ensures (memory_load8_le(mem, 2099bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2100bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2101bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2102bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2103bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69048bv64) == 144bv8); - free ensures (memory_load8_le(mem, 69049bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69050bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69051bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69052bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69053bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69054bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69055bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69568bv64) == 60bv8); - free ensures (memory_load8_le(mem, 69569bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69570bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69571bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69572bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69573bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69574bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69575bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 196bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69680bv64) == 48bv8); - free ensures (memory_load8_le(mem, 69681bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69682bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69683bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69684bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69685bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69686bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69687bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69584bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69585bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69586bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69587bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69588bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69589bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69590bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69591bv64) == 0bv8); + free ensures (memory_load64_le(mem, 2096bv64) == 2924859843805185bv64); + free ensures (memory_load64_le(mem, 69048bv64) == 1936bv64); + free ensures (memory_load64_le(mem, 69568bv64) == 69692bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1988bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1856bv64); + free ensures (memory_load64_le(mem, 69680bv64) == 69680bv64); + free ensures (memory_load64_le(mem, 69584bv64) == 69696bv64); + +implementation main() { var #4: bv64; var Gamma_#4: bool; @@ -485,115 +232,18 @@ procedure main() procedure printf(); modifies Gamma_R16, Gamma_R17, R16, R17; - free requires (memory_load8_le(mem, 2096bv64) == 1bv8); - free requires (memory_load8_le(mem, 2097bv64) == 0bv8); - free requires (memory_load8_le(mem, 2098bv64) == 2bv8); - free requires (memory_load8_le(mem, 2099bv64) == 0bv8); - free requires (memory_load8_le(mem, 2100bv64) == 37bv8); - free requires (memory_load8_le(mem, 2101bv64) == 100bv8); - free requires (memory_load8_le(mem, 2102bv64) == 10bv8); - free requires (memory_load8_le(mem, 2103bv64) == 0bv8); - free requires (memory_load8_le(mem, 69048bv64) == 144bv8); - free requires (memory_load8_le(mem, 69049bv64) == 7bv8); - free requires (memory_load8_le(mem, 69050bv64) == 0bv8); - free requires (memory_load8_le(mem, 69051bv64) == 0bv8); - free requires (memory_load8_le(mem, 69052bv64) == 0bv8); - free requires (memory_load8_le(mem, 69053bv64) == 0bv8); - free requires (memory_load8_le(mem, 69054bv64) == 0bv8); - free requires (memory_load8_le(mem, 69055bv64) == 0bv8); - free requires (memory_load8_le(mem, 69568bv64) == 60bv8); - free requires (memory_load8_le(mem, 69569bv64) == 16bv8); - free requires (memory_load8_le(mem, 69570bv64) == 1bv8); - free requires (memory_load8_le(mem, 69571bv64) == 0bv8); - free requires (memory_load8_le(mem, 69572bv64) == 0bv8); - free requires (memory_load8_le(mem, 69573bv64) == 0bv8); - free requires (memory_load8_le(mem, 69574bv64) == 0bv8); - free requires (memory_load8_le(mem, 69575bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 196bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69056bv64) == 64bv8); - free requires (memory_load8_le(mem, 69057bv64) == 7bv8); - free requires (memory_load8_le(mem, 69058bv64) == 0bv8); - free requires (memory_load8_le(mem, 69059bv64) == 0bv8); - free requires (memory_load8_le(mem, 69060bv64) == 0bv8); - free requires (memory_load8_le(mem, 69061bv64) == 0bv8); - free requires (memory_load8_le(mem, 69062bv64) == 0bv8); - free requires (memory_load8_le(mem, 69063bv64) == 0bv8); - free requires (memory_load8_le(mem, 69680bv64) == 48bv8); - free requires (memory_load8_le(mem, 69681bv64) == 16bv8); - free requires (memory_load8_le(mem, 69682bv64) == 1bv8); - free requires (memory_load8_le(mem, 69683bv64) == 0bv8); - free requires (memory_load8_le(mem, 69684bv64) == 0bv8); - free requires (memory_load8_le(mem, 69685bv64) == 0bv8); - free requires (memory_load8_le(mem, 69686bv64) == 0bv8); - free requires (memory_load8_le(mem, 69687bv64) == 0bv8); - free requires (memory_load8_le(mem, 69584bv64) == 64bv8); - free requires (memory_load8_le(mem, 69585bv64) == 16bv8); - free requires (memory_load8_le(mem, 69586bv64) == 1bv8); - free requires (memory_load8_le(mem, 69587bv64) == 0bv8); - free requires (memory_load8_le(mem, 69588bv64) == 0bv8); - free requires (memory_load8_le(mem, 69589bv64) == 0bv8); - free requires (memory_load8_le(mem, 69590bv64) == 0bv8); - free requires (memory_load8_le(mem, 69591bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2096bv64) == 1bv8); - free ensures (memory_load8_le(mem, 2097bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2098bv64) == 2bv8); - free ensures (memory_load8_le(mem, 2099bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2100bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2101bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2102bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2103bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69048bv64) == 144bv8); - free ensures (memory_load8_le(mem, 69049bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69050bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69051bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69052bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69053bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69054bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69055bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69568bv64) == 60bv8); - free ensures (memory_load8_le(mem, 69569bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69570bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69571bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69572bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69573bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69574bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69575bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 196bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69680bv64) == 48bv8); - free ensures (memory_load8_le(mem, 69681bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69682bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69683bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69684bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69685bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69686bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69687bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69584bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69585bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69586bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69587bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69588bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69589bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69590bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69591bv64) == 0bv8); + free requires (memory_load64_le(mem, 2096bv64) == 2924859843805185bv64); + free requires (memory_load64_le(mem, 69048bv64) == 1936bv64); + free requires (memory_load64_le(mem, 69568bv64) == 69692bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1988bv64); + free requires (memory_load64_le(mem, 69056bv64) == 1856bv64); + free requires (memory_load64_le(mem, 69680bv64) == 69680bv64); + free requires (memory_load64_le(mem, 69584bv64) == 69696bv64); + free ensures (memory_load64_le(mem, 2096bv64) == 2924859843805185bv64); + free ensures (memory_load64_le(mem, 69048bv64) == 1936bv64); + free ensures (memory_load64_le(mem, 69568bv64) == 69692bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1988bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1856bv64); + free ensures (memory_load64_le(mem, 69680bv64) == 69680bv64); + free ensures (memory_load64_le(mem, 69584bv64) == 69696bv64); + diff --git a/src/test/correct/function1/gcc/function1.expected b/src/test/correct/function1/gcc/function1.expected index a95a503aa..c8a75de3d 100644 --- a/src/test/correct/function1/gcc/function1.expected +++ b/src/test/correct/function1/gcc/function1.expected @@ -96,43 +96,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 2057bv64) == 100bv8); free ensures (memory_load8_le(mem, 2058bv64) == 10bv8); free ensures (memory_load8_le(mem, 2059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 132bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69008bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1924bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -143,7 +117,7 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure get_two() +procedure get_two(); modifies Gamma_R0, Gamma_R1, Gamma_R31, Gamma_stack, R0, R1, R31, stack; free requires (memory_load8_le(mem, 2048bv64) == 1bv8); free requires (memory_load8_le(mem, 2049bv64) == 0bv8); @@ -157,38 +131,10 @@ procedure get_two() free requires (memory_load8_le(mem, 2057bv64) == 100bv8); free requires (memory_load8_le(mem, 2058bv64) == 10bv8); free requires (memory_load8_le(mem, 2059bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 80bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 0bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 132bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69008bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69016bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1924bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 2048bv64) == 1bv8); @@ -203,38 +149,12 @@ procedure get_two() free ensures (memory_load8_le(mem, 2057bv64) == 100bv8); free ensures (memory_load8_le(mem, 2058bv64) == 10bv8); free ensures (memory_load8_le(mem, 2059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 132bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69008bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1924bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation get_two() { lget_two: assume {:captureState "lget_two"} true; @@ -255,24 +175,10 @@ procedure get_two() return; } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R16, Gamma_R17, Gamma_R2, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R16, R17, R2, R29, R30, R31, mem, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 2048bv64) == 1bv8); free requires (memory_load8_le(mem, 2049bv64) == 0bv8); free requires (memory_load8_le(mem, 2050bv64) == 2bv8); @@ -285,38 +191,10 @@ procedure main() free requires (memory_load8_le(mem, 2057bv64) == 100bv8); free requires (memory_load8_le(mem, 2058bv64) == 10bv8); free requires (memory_load8_le(mem, 2059bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 80bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 0bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 132bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69008bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69016bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1924bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -333,38 +211,12 @@ procedure main() free ensures (memory_load8_le(mem, 2057bv64) == 100bv8); free ensures (memory_load8_le(mem, 2058bv64) == 10bv8); free ensures (memory_load8_le(mem, 2059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 132bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69008bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1924bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv64; var Gamma_#4: bool; @@ -434,38 +286,10 @@ procedure printf(); free requires (memory_load8_le(mem, 2057bv64) == 100bv8); free requires (memory_load8_le(mem, 2058bv64) == 10bv8); free requires (memory_load8_le(mem, 2059bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 80bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 0bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 132bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69008bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69016bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1924bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2048bv64) == 1bv8); free ensures (memory_load8_le(mem, 2049bv64) == 0bv8); free ensures (memory_load8_le(mem, 2050bv64) == 2bv8); @@ -478,35 +302,8 @@ procedure printf(); free ensures (memory_load8_le(mem, 2057bv64) == 100bv8); free ensures (memory_load8_le(mem, 2058bv64) == 10bv8); free ensures (memory_load8_le(mem, 2059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 132bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69008bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1924bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + diff --git a/src/test/correct/function1/gcc_O2/function1.expected b/src/test/correct/function1/gcc_O2/function1.expected index 8296db663..7f1e3d2a7 100644 --- a/src/test/correct/function1/gcc_O2/function1.expected +++ b/src/test/correct/function1/gcc_O2/function1.expected @@ -76,43 +76,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 2057bv64) == 100bv8); free ensures (memory_load8_le(mem, 2058bv64) == 10bv8); free ensures (memory_load8_le(mem, 2059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 208bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69008bv64) == 2000bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1920bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1664bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -137,38 +111,10 @@ procedure __printf_chk(); free requires (memory_load8_le(mem, 2057bv64) == 100bv8); free requires (memory_load8_le(mem, 2058bv64) == 10bv8); free requires (memory_load8_le(mem, 2059bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 208bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 128bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 128bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69008bv64) == 2000bv64); + free requires (memory_load64_le(mem, 69016bv64) == 1920bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1664bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2048bv64) == 1bv8); free ensures (memory_load8_le(mem, 2049bv64) == 0bv8); free ensures (memory_load8_le(mem, 2050bv64) == 2bv8); @@ -181,57 +127,15 @@ procedure __printf_chk(); free ensures (memory_load8_le(mem, 2057bv64) == 100bv8); free ensures (memory_load8_le(mem, 2058bv64) == 10bv8); free ensures (memory_load8_le(mem, 2059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 208bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69008bv64) == 2000bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1920bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1664bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R16, Gamma_R17, Gamma_R2, Gamma_R29, Gamma_R3, Gamma_R30, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R16, R17, R2, R29, R3, R30, R31, mem, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 2048bv64) == 1bv8); free requires (memory_load8_le(mem, 2049bv64) == 0bv8); free requires (memory_load8_le(mem, 2050bv64) == 2bv8); @@ -244,38 +148,10 @@ procedure main() free requires (memory_load8_le(mem, 2057bv64) == 100bv8); free requires (memory_load8_le(mem, 2058bv64) == 10bv8); free requires (memory_load8_le(mem, 2059bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 208bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 128bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 128bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69008bv64) == 2000bv64); + free requires (memory_load64_le(mem, 69016bv64) == 1920bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1664bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -292,38 +168,12 @@ procedure main() free ensures (memory_load8_le(mem, 2057bv64) == 100bv8); free ensures (memory_load8_le(mem, 2058bv64) == 10bv8); free ensures (memory_load8_le(mem, 2059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 208bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69008bv64) == 2000bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1920bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1664bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #1: bv64; var Gamma_#1: bool; @@ -362,3 +212,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/correct/function1/gcc_no_plt_no_pic/function1.expected b/src/test/correct/function1/gcc_no_plt_no_pic/function1.expected index 711e70cf1..a6bc0b7f5 100644 --- a/src/test/correct/function1/gcc_no_plt_no_pic/function1.expected +++ b/src/test/correct/function1/gcc_no_plt_no_pic/function1.expected @@ -96,43 +96,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 2057bv64) == 100bv8); free ensures (memory_load8_le(mem, 2058bv64) == 10bv8); free ensures (memory_load8_le(mem, 2059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 132bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69008bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1924bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -143,7 +117,7 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure get_two() +procedure get_two(); modifies Gamma_R0, Gamma_R1, Gamma_R31, Gamma_stack, R0, R1, R31, stack; free requires (memory_load8_le(mem, 2048bv64) == 1bv8); free requires (memory_load8_le(mem, 2049bv64) == 0bv8); @@ -157,38 +131,10 @@ procedure get_two() free requires (memory_load8_le(mem, 2057bv64) == 100bv8); free requires (memory_load8_le(mem, 2058bv64) == 10bv8); free requires (memory_load8_le(mem, 2059bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 80bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 0bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 132bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69008bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69016bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1924bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 2048bv64) == 1bv8); @@ -203,38 +149,12 @@ procedure get_two() free ensures (memory_load8_le(mem, 2057bv64) == 100bv8); free ensures (memory_load8_le(mem, 2058bv64) == 10bv8); free ensures (memory_load8_le(mem, 2059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 132bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69008bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1924bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation get_two() { lget_two: assume {:captureState "lget_two"} true; @@ -255,24 +175,10 @@ procedure get_two() return; } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R16, Gamma_R17, Gamma_R2, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R16, R17, R2, R29, R30, R31, mem, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 2048bv64) == 1bv8); free requires (memory_load8_le(mem, 2049bv64) == 0bv8); free requires (memory_load8_le(mem, 2050bv64) == 2bv8); @@ -285,38 +191,10 @@ procedure main() free requires (memory_load8_le(mem, 2057bv64) == 100bv8); free requires (memory_load8_le(mem, 2058bv64) == 10bv8); free requires (memory_load8_le(mem, 2059bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 80bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 0bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 132bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69008bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69016bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1924bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -333,38 +211,12 @@ procedure main() free ensures (memory_load8_le(mem, 2057bv64) == 100bv8); free ensures (memory_load8_le(mem, 2058bv64) == 10bv8); free ensures (memory_load8_le(mem, 2059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 132bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69008bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1924bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv64; var Gamma_#4: bool; @@ -434,38 +286,10 @@ procedure printf(); free requires (memory_load8_le(mem, 2057bv64) == 100bv8); free requires (memory_load8_le(mem, 2058bv64) == 10bv8); free requires (memory_load8_le(mem, 2059bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 80bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 0bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 132bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69008bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69016bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1924bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2048bv64) == 1bv8); free ensures (memory_load8_le(mem, 2049bv64) == 0bv8); free ensures (memory_load8_le(mem, 2050bv64) == 2bv8); @@ -478,35 +302,8 @@ procedure printf(); free ensures (memory_load8_le(mem, 2057bv64) == 100bv8); free ensures (memory_load8_le(mem, 2058bv64) == 10bv8); free ensures (memory_load8_le(mem, 2059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 132bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69008bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1924bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + diff --git a/src/test/correct/function1/gcc_pic/function1.expected b/src/test/correct/function1/gcc_pic/function1.expected index 313d20eac..e8785a70e 100644 --- a/src/test/correct/function1/gcc_pic/function1.expected +++ b/src/test/correct/function1/gcc_pic/function1.expected @@ -96,59 +96,19 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 2121bv64) == 100bv8); free ensures (memory_load8_le(mem, 2122bv64) == 10bv8); free ensures (memory_load8_le(mem, 2123bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69608bv64) == 24bv8); - free ensures (memory_load8_le(mem, 69609bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69610bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69611bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69612bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69613bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69614bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69615bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 196bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 144bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 7bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69608bv64) == 69656bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1988bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 69652bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1856bv64); + free ensures (memory_load64_le(mem, 68992bv64) == 1936bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -159,7 +119,7 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure get_two() +procedure get_two(); modifies Gamma_R0, Gamma_R1, Gamma_R31, Gamma_stack, R0, R1, R31, stack; free requires (memory_load8_le(mem, 2112bv64) == 1bv8); free requires (memory_load8_le(mem, 2113bv64) == 0bv8); @@ -173,54 +133,12 @@ procedure get_two() free requires (memory_load8_le(mem, 2121bv64) == 100bv8); free requires (memory_load8_le(mem, 2122bv64) == 10bv8); free requires (memory_load8_le(mem, 2123bv64) == 0bv8); - free requires (memory_load8_le(mem, 69608bv64) == 24bv8); - free requires (memory_load8_le(mem, 69609bv64) == 16bv8); - free requires (memory_load8_le(mem, 69610bv64) == 1bv8); - free requires (memory_load8_le(mem, 69611bv64) == 0bv8); - free requires (memory_load8_le(mem, 69612bv64) == 0bv8); - free requires (memory_load8_le(mem, 69613bv64) == 0bv8); - free requires (memory_load8_le(mem, 69614bv64) == 0bv8); - free requires (memory_load8_le(mem, 69615bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 196bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 16bv8); - free requires (memory_load8_le(mem, 69594bv64) == 1bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 64bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 144bv8); - free requires (memory_load8_le(mem, 68993bv64) == 7bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); + free requires (memory_load64_le(mem, 69608bv64) == 69656bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1988bv64); + free requires (memory_load64_le(mem, 69592bv64) == 69652bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1856bv64); + free requires (memory_load64_le(mem, 68992bv64) == 1936bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 2112bv64) == 1bv8); @@ -235,54 +153,14 @@ procedure get_two() free ensures (memory_load8_le(mem, 2121bv64) == 100bv8); free ensures (memory_load8_le(mem, 2122bv64) == 10bv8); free ensures (memory_load8_le(mem, 2123bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69608bv64) == 24bv8); - free ensures (memory_load8_le(mem, 69609bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69610bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69611bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69612bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69613bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69614bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69615bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 196bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 144bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 7bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69608bv64) == 69656bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1988bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 69652bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1856bv64); + free ensures (memory_load64_le(mem, 68992bv64) == 1936bv64); + +implementation get_two() { lget_two: assume {:captureState "lget_two"} true; @@ -303,24 +181,10 @@ procedure get_two() return; } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R16, Gamma_R17, Gamma_R2, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R16, R17, R2, R29, R30, R31, mem, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 2112bv64) == 1bv8); free requires (memory_load8_le(mem, 2113bv64) == 0bv8); free requires (memory_load8_le(mem, 2114bv64) == 2bv8); @@ -333,54 +197,12 @@ procedure main() free requires (memory_load8_le(mem, 2121bv64) == 100bv8); free requires (memory_load8_le(mem, 2122bv64) == 10bv8); free requires (memory_load8_le(mem, 2123bv64) == 0bv8); - free requires (memory_load8_le(mem, 69608bv64) == 24bv8); - free requires (memory_load8_le(mem, 69609bv64) == 16bv8); - free requires (memory_load8_le(mem, 69610bv64) == 1bv8); - free requires (memory_load8_le(mem, 69611bv64) == 0bv8); - free requires (memory_load8_le(mem, 69612bv64) == 0bv8); - free requires (memory_load8_le(mem, 69613bv64) == 0bv8); - free requires (memory_load8_le(mem, 69614bv64) == 0bv8); - free requires (memory_load8_le(mem, 69615bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 196bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 16bv8); - free requires (memory_load8_le(mem, 69594bv64) == 1bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 64bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 144bv8); - free requires (memory_load8_le(mem, 68993bv64) == 7bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); + free requires (memory_load64_le(mem, 69608bv64) == 69656bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1988bv64); + free requires (memory_load64_le(mem, 69592bv64) == 69652bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1856bv64); + free requires (memory_load64_le(mem, 68992bv64) == 1936bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -397,54 +219,14 @@ procedure main() free ensures (memory_load8_le(mem, 2121bv64) == 100bv8); free ensures (memory_load8_le(mem, 2122bv64) == 10bv8); free ensures (memory_load8_le(mem, 2123bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69608bv64) == 24bv8); - free ensures (memory_load8_le(mem, 69609bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69610bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69611bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69612bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69613bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69614bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69615bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 196bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 144bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 7bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69608bv64) == 69656bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1988bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 69652bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1856bv64); + free ensures (memory_load64_le(mem, 68992bv64) == 1936bv64); + +implementation main() { var #4: bv64; var Gamma_#4: bool; @@ -517,54 +299,12 @@ procedure printf(); free requires (memory_load8_le(mem, 2121bv64) == 100bv8); free requires (memory_load8_le(mem, 2122bv64) == 10bv8); free requires (memory_load8_le(mem, 2123bv64) == 0bv8); - free requires (memory_load8_le(mem, 69608bv64) == 24bv8); - free requires (memory_load8_le(mem, 69609bv64) == 16bv8); - free requires (memory_load8_le(mem, 69610bv64) == 1bv8); - free requires (memory_load8_le(mem, 69611bv64) == 0bv8); - free requires (memory_load8_le(mem, 69612bv64) == 0bv8); - free requires (memory_load8_le(mem, 69613bv64) == 0bv8); - free requires (memory_load8_le(mem, 69614bv64) == 0bv8); - free requires (memory_load8_le(mem, 69615bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 196bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 16bv8); - free requires (memory_load8_le(mem, 69594bv64) == 1bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 64bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 144bv8); - free requires (memory_load8_le(mem, 68993bv64) == 7bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); + free requires (memory_load64_le(mem, 69608bv64) == 69656bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1988bv64); + free requires (memory_load64_le(mem, 69592bv64) == 69652bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1856bv64); + free requires (memory_load64_le(mem, 68992bv64) == 1936bv64); free ensures (memory_load8_le(mem, 2112bv64) == 1bv8); free ensures (memory_load8_le(mem, 2113bv64) == 0bv8); free ensures (memory_load8_le(mem, 2114bv64) == 2bv8); @@ -577,51 +317,10 @@ procedure printf(); free ensures (memory_load8_le(mem, 2121bv64) == 100bv8); free ensures (memory_load8_le(mem, 2122bv64) == 10bv8); free ensures (memory_load8_le(mem, 2123bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69608bv64) == 24bv8); - free ensures (memory_load8_le(mem, 69609bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69610bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69611bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69612bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69613bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69614bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69615bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 196bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 144bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 7bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69608bv64) == 69656bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1988bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 69652bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1856bv64); + free ensures (memory_load64_le(mem, 68992bv64) == 1936bv64); + diff --git a/src/test/correct/functions_with_params/clang/functions_with_params.expected b/src/test/correct/functions_with_params/clang/functions_with_params.expected index dfe4dc6cb..8457da0ee 100644 --- a/src/test/correct/functions_with_params/clang/functions_with_params.expected +++ b/src/test/correct/functions_with_params/clang/functions_with_params.expected @@ -61,43 +61,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1913bv64) == 0bv8); free ensures (memory_load8_le(mem, 1914bv64) == 2bv8); free ensures (memory_load8_le(mem, 1915bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -108,60 +82,18 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_R8, Gamma_stack, R0, R29, R30, R31, R8, stack; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1912bv64) == 1bv8); free requires (memory_load8_le(mem, 1913bv64) == 0bv8); free requires (memory_load8_le(mem, 1914bv64) == 2bv8); free requires (memory_load8_le(mem, 1915bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -170,38 +102,12 @@ procedure main() free ensures (memory_load8_le(mem, 1913bv64) == 0bv8); free ensures (memory_load8_le(mem, 1914bv64) == 2bv8); free ensures (memory_load8_le(mem, 1915bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var #4: bv64; var #5: bv64; @@ -238,82 +144,28 @@ procedure main() return; } -procedure plus_one() +procedure plus_one(); modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_stack, R0, R31, R8, stack; free requires (memory_load8_le(mem, 1912bv64) == 1bv8); free requires (memory_load8_le(mem, 1913bv64) == 0bv8); free requires (memory_load8_le(mem, 1914bv64) == 2bv8); free requires (memory_load8_le(mem, 1915bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1912bv64) == 1bv8); free ensures (memory_load8_le(mem, 1913bv64) == 0bv8); free ensures (memory_load8_le(mem, 1914bv64) == 2bv8); free ensures (memory_load8_le(mem, 1915bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation plus_one() { lplus_one: assume {:captureState "lplus_one"} true; @@ -325,3 +177,4 @@ procedure plus_one() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/correct/functions_with_params/clang_O2/functions_with_params.expected b/src/test/correct/functions_with_params/clang_O2/functions_with_params.expected index c92fd296f..3ac2427ae 100644 --- a/src/test/correct/functions_with_params/clang_O2/functions_with_params.expected +++ b/src/test/correct/functions_with_params/clang_O2/functions_with_params.expected @@ -4,6 +4,11 @@ var {:extern} R0: bv64; var {:extern} mem: [bv64]bv8; const {:extern} $_IO_stdin_used_addr: bv64; axiom ($_IO_stdin_used_addr == 1848bv64); +function {:extern} {:bvbuiltin "bvadd"} bvadd64(bv64, bv64) returns (bv64); +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -16,43 +21,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1849bv64) == 0bv8); free ensures (memory_load8_le(mem, 1850bv64) == 2bv8); free ensures (memory_load8_le(mem, 1851bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -63,99 +42,32 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, R0; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1848bv64) == 1bv8); free requires (memory_load8_le(mem, 1849bv64) == 0bv8); free requires (memory_load8_le(mem, 1850bv64) == 2bv8); free requires (memory_load8_le(mem, 1851bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (memory_load8_le(mem, 1848bv64) == 1bv8); free ensures (memory_load8_le(mem, 1849bv64) == 0bv8); free ensures (memory_load8_le(mem, 1850bv64) == 2bv8); free ensures (memory_load8_le(mem, 1851bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/functions_with_params/clang_no_plt_no_pic/functions_with_params.expected b/src/test/correct/functions_with_params/clang_no_plt_no_pic/functions_with_params.expected index 1136a902b..ee1683ebc 100644 --- a/src/test/correct/functions_with_params/clang_no_plt_no_pic/functions_with_params.expected +++ b/src/test/correct/functions_with_params/clang_no_plt_no_pic/functions_with_params.expected @@ -61,43 +61,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1913bv64) == 0bv8); free ensures (memory_load8_le(mem, 1914bv64) == 2bv8); free ensures (memory_load8_le(mem, 1915bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -108,60 +82,18 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_R8, Gamma_stack, R0, R29, R30, R31, R8, stack; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1912bv64) == 1bv8); free requires (memory_load8_le(mem, 1913bv64) == 0bv8); free requires (memory_load8_le(mem, 1914bv64) == 2bv8); free requires (memory_load8_le(mem, 1915bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -170,38 +102,12 @@ procedure main() free ensures (memory_load8_le(mem, 1913bv64) == 0bv8); free ensures (memory_load8_le(mem, 1914bv64) == 2bv8); free ensures (memory_load8_le(mem, 1915bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var #4: bv64; var #5: bv64; @@ -238,82 +144,28 @@ procedure main() return; } -procedure plus_one() +procedure plus_one(); modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_stack, R0, R31, R8, stack; free requires (memory_load8_le(mem, 1912bv64) == 1bv8); free requires (memory_load8_le(mem, 1913bv64) == 0bv8); free requires (memory_load8_le(mem, 1914bv64) == 2bv8); free requires (memory_load8_le(mem, 1915bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1912bv64) == 1bv8); free ensures (memory_load8_le(mem, 1913bv64) == 0bv8); free ensures (memory_load8_le(mem, 1914bv64) == 2bv8); free ensures (memory_load8_le(mem, 1915bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation plus_one() { lplus_one: assume {:captureState "lplus_one"} true; @@ -325,3 +177,4 @@ procedure plus_one() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/correct/functions_with_params/clang_pic/functions_with_params.expected b/src/test/correct/functions_with_params/clang_pic/functions_with_params.expected index 1136a902b..ee1683ebc 100644 --- a/src/test/correct/functions_with_params/clang_pic/functions_with_params.expected +++ b/src/test/correct/functions_with_params/clang_pic/functions_with_params.expected @@ -61,43 +61,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1913bv64) == 0bv8); free ensures (memory_load8_le(mem, 1914bv64) == 2bv8); free ensures (memory_load8_le(mem, 1915bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -108,60 +82,18 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_R8, Gamma_stack, R0, R29, R30, R31, R8, stack; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1912bv64) == 1bv8); free requires (memory_load8_le(mem, 1913bv64) == 0bv8); free requires (memory_load8_le(mem, 1914bv64) == 2bv8); free requires (memory_load8_le(mem, 1915bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -170,38 +102,12 @@ procedure main() free ensures (memory_load8_le(mem, 1913bv64) == 0bv8); free ensures (memory_load8_le(mem, 1914bv64) == 2bv8); free ensures (memory_load8_le(mem, 1915bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var #4: bv64; var #5: bv64; @@ -238,82 +144,28 @@ procedure main() return; } -procedure plus_one() +procedure plus_one(); modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_stack, R0, R31, R8, stack; free requires (memory_load8_le(mem, 1912bv64) == 1bv8); free requires (memory_load8_le(mem, 1913bv64) == 0bv8); free requires (memory_load8_le(mem, 1914bv64) == 2bv8); free requires (memory_load8_le(mem, 1915bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1912bv64) == 1bv8); free ensures (memory_load8_le(mem, 1913bv64) == 0bv8); free ensures (memory_load8_le(mem, 1914bv64) == 2bv8); free ensures (memory_load8_le(mem, 1915bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation plus_one() { lplus_one: assume {:captureState "lplus_one"} true; @@ -325,3 +177,4 @@ procedure plus_one() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/correct/functions_with_params/gcc/functions_with_params.expected b/src/test/correct/functions_with_params/gcc/functions_with_params.expected index 284845f2f..c0d99c4a2 100644 --- a/src/test/correct/functions_with_params/gcc/functions_with_params.expected +++ b/src/test/correct/functions_with_params/gcc/functions_with_params.expected @@ -59,43 +59,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1905bv64) == 0bv8); free ensures (memory_load8_le(mem, 1906bv64) == 2bv8); free ensures (memory_load8_le(mem, 1907bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -106,60 +80,18 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_stack, R0, R29, R30, R31, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1904bv64) == 1bv8); free requires (memory_load8_le(mem, 1905bv64) == 0bv8); free requires (memory_load8_le(mem, 1906bv64) == 2bv8); free requires (memory_load8_le(mem, 1907bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -168,38 +100,12 @@ procedure main() free ensures (memory_load8_le(mem, 1905bv64) == 0bv8); free ensures (memory_load8_le(mem, 1906bv64) == 2bv8); free ensures (memory_load8_le(mem, 1907bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv64; var Gamma_#4: bool; @@ -233,82 +139,28 @@ procedure main() return; } -procedure plus_one() +procedure plus_one(); modifies Gamma_R0, Gamma_R31, Gamma_stack, R0, R31, stack; free requires (memory_load8_le(mem, 1904bv64) == 1bv8); free requires (memory_load8_le(mem, 1905bv64) == 0bv8); free requires (memory_load8_le(mem, 1906bv64) == 2bv8); free requires (memory_load8_le(mem, 1907bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1904bv64) == 1bv8); free ensures (memory_load8_le(mem, 1905bv64) == 0bv8); free ensures (memory_load8_le(mem, 1906bv64) == 2bv8); free ensures (memory_load8_le(mem, 1907bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation plus_one() { lplus_one: assume {:captureState "lplus_one"} true; @@ -320,3 +172,4 @@ procedure plus_one() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/correct/functions_with_params/gcc_O2/functions_with_params.expected b/src/test/correct/functions_with_params/gcc_O2/functions_with_params.expected index 031602cf6..3a93588d6 100644 --- a/src/test/correct/functions_with_params/gcc_O2/functions_with_params.expected +++ b/src/test/correct/functions_with_params/gcc_O2/functions_with_params.expected @@ -4,6 +4,11 @@ var {:extern} R0: bv64; var {:extern} mem: [bv64]bv8; const {:extern} $_IO_stdin_used_addr: bv64; axiom ($_IO_stdin_used_addr == 1916bv64); +function {:extern} {:bvbuiltin "bvadd"} bvadd64(bv64, bv64) returns (bv64); +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -16,43 +21,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1917bv64) == 0bv8); free ensures (memory_load8_le(mem, 1918bv64) == 2bv8); free ensures (memory_load8_le(mem, 1919bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -63,99 +42,32 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, R0; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1916bv64) == 1bv8); free requires (memory_load8_le(mem, 1917bv64) == 0bv8); free requires (memory_load8_le(mem, 1918bv64) == 2bv8); free requires (memory_load8_le(mem, 1919bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 80bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 0bv8); - free requires (memory_load8_le(mem, 69025bv64) == 7bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 0bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1536bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1916bv64) == 1bv8); free ensures (memory_load8_le(mem, 1917bv64) == 0bv8); free ensures (memory_load8_le(mem, 1918bv64) == 2bv8); free ensures (memory_load8_le(mem, 1919bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/functions_with_params/gcc_no_plt_no_pic/functions_with_params.expected b/src/test/correct/functions_with_params/gcc_no_plt_no_pic/functions_with_params.expected index 03251913e..6c154344e 100644 --- a/src/test/correct/functions_with_params/gcc_no_plt_no_pic/functions_with_params.expected +++ b/src/test/correct/functions_with_params/gcc_no_plt_no_pic/functions_with_params.expected @@ -59,43 +59,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1905bv64) == 0bv8); free ensures (memory_load8_le(mem, 1906bv64) == 2bv8); free ensures (memory_load8_le(mem, 1907bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -106,60 +80,18 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_stack, R0, R29, R30, R31, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1904bv64) == 1bv8); free requires (memory_load8_le(mem, 1905bv64) == 0bv8); free requires (memory_load8_le(mem, 1906bv64) == 2bv8); free requires (memory_load8_le(mem, 1907bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -168,38 +100,12 @@ procedure main() free ensures (memory_load8_le(mem, 1905bv64) == 0bv8); free ensures (memory_load8_le(mem, 1906bv64) == 2bv8); free ensures (memory_load8_le(mem, 1907bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv64; var Gamma_#4: bool; @@ -233,82 +139,28 @@ procedure main() return; } -procedure plus_one() +procedure plus_one(); modifies Gamma_R0, Gamma_R31, Gamma_stack, R0, R31, stack; free requires (memory_load8_le(mem, 1904bv64) == 1bv8); free requires (memory_load8_le(mem, 1905bv64) == 0bv8); free requires (memory_load8_le(mem, 1906bv64) == 2bv8); free requires (memory_load8_le(mem, 1907bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1904bv64) == 1bv8); free ensures (memory_load8_le(mem, 1905bv64) == 0bv8); free ensures (memory_load8_le(mem, 1906bv64) == 2bv8); free ensures (memory_load8_le(mem, 1907bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation plus_one() { lplus_one: assume {:captureState "lplus_one"} true; @@ -320,3 +172,4 @@ procedure plus_one() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/correct/functions_with_params/gcc_pic/functions_with_params.expected b/src/test/correct/functions_with_params/gcc_pic/functions_with_params.expected index 03251913e..6c154344e 100644 --- a/src/test/correct/functions_with_params/gcc_pic/functions_with_params.expected +++ b/src/test/correct/functions_with_params/gcc_pic/functions_with_params.expected @@ -59,43 +59,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1905bv64) == 0bv8); free ensures (memory_load8_le(mem, 1906bv64) == 2bv8); free ensures (memory_load8_le(mem, 1907bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -106,60 +80,18 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_stack, R0, R29, R30, R31, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1904bv64) == 1bv8); free requires (memory_load8_le(mem, 1905bv64) == 0bv8); free requires (memory_load8_le(mem, 1906bv64) == 2bv8); free requires (memory_load8_le(mem, 1907bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -168,38 +100,12 @@ procedure main() free ensures (memory_load8_le(mem, 1905bv64) == 0bv8); free ensures (memory_load8_le(mem, 1906bv64) == 2bv8); free ensures (memory_load8_le(mem, 1907bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv64; var Gamma_#4: bool; @@ -233,82 +139,28 @@ procedure main() return; } -procedure plus_one() +procedure plus_one(); modifies Gamma_R0, Gamma_R31, Gamma_stack, R0, R31, stack; free requires (memory_load8_le(mem, 1904bv64) == 1bv8); free requires (memory_load8_le(mem, 1905bv64) == 0bv8); free requires (memory_load8_le(mem, 1906bv64) == 2bv8); free requires (memory_load8_le(mem, 1907bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1904bv64) == 1bv8); free ensures (memory_load8_le(mem, 1905bv64) == 0bv8); free ensures (memory_load8_le(mem, 1906bv64) == 2bv8); free ensures (memory_load8_le(mem, 1907bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation plus_one() { lplus_one: assume {:captureState "lplus_one"} true; @@ -320,3 +172,4 @@ procedure plus_one() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/correct/ifbranches/clang/ifbranches.expected b/src/test/correct/ifbranches/clang/ifbranches.expected index f43c98adb..c0067a67f 100644 --- a/src/test/correct/ifbranches/clang/ifbranches.expected +++ b/src/test/correct/ifbranches/clang/ifbranches.expected @@ -33,6 +33,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -56,43 +60,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1921bv64) == 0bv8); free ensures (memory_load8_le(mem, 1922bv64) == 2bv8); free ensures (memory_load8_le(mem, 1923bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -103,99 +81,31 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_stack, R0, R31, R8, stack; requires (Gamma_R0 == true); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1920bv64) == 1bv8); free requires (memory_load8_le(mem, 1921bv64) == 0bv8); free requires (memory_load8_le(mem, 1922bv64) == 2bv8); free requires (memory_load8_le(mem, 1923bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1920bv64) == 1bv8); free ensures (memory_load8_le(mem, 1921bv64) == 0bv8); free ensures (memory_load8_le(mem, 1922bv64) == 2bv8); free ensures (memory_load8_le(mem, 1923bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -280,3 +190,4 @@ procedure main() assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l00000397; } + diff --git a/src/test/correct/ifbranches/clang_O2/ifbranches.expected b/src/test/correct/ifbranches/clang_O2/ifbranches.expected index 4617d4c7f..ccfb7c037 100644 --- a/src/test/correct/ifbranches/clang_O2/ifbranches.expected +++ b/src/test/correct/ifbranches/clang_O2/ifbranches.expected @@ -6,10 +6,15 @@ var {:extern} R8: bv64; var {:extern} mem: [bv64]bv8; function {:extern} {:bvbuiltin "bvadd"} bvadd32(bv32, bv32) returns (bv32); function {:extern} {:bvbuiltin "bvadd"} bvadd33(bv33, bv33) returns (bv33); +function {:extern} {:bvbuiltin "bvadd"} bvadd64(bv64, bv64) returns (bv64); function {:extern} {:bvbuiltin "bvcomp"} bvcomp1(bv1, bv1) returns (bv1); function {:extern} {:bvbuiltin "bvcomp"} bvcomp32(bv32, bv32) returns (bv1); function {:extern} {:bvbuiltin "bvcomp"} bvcomp33(bv33, bv33) returns (bv1); function {:extern} {:bvbuiltin "bvnot"} bvnot1(bv1) returns (bv1); +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -25,43 +30,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1849bv64) == 0bv8); free ensures (memory_load8_le(mem, 1850bv64) == 2bv8); free ensures (memory_load8_le(mem, 1851bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -72,97 +51,29 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R8, R0, R8; requires (Gamma_R0 == true); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1848bv64) == 1bv8); free requires (memory_load8_le(mem, 1849bv64) == 0bv8); free requires (memory_load8_le(mem, 1850bv64) == 2bv8); free requires (memory_load8_le(mem, 1851bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (memory_load8_le(mem, 1848bv64) == 1bv8); free ensures (memory_load8_le(mem, 1849bv64) == 0bv8); free ensures (memory_load8_le(mem, 1850bv64) == 2bv8); free ensures (memory_load8_le(mem, 1851bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -204,3 +115,4 @@ procedure main() assume (bvcomp1(ZF, 1bv1) == 0bv1); goto l000002df; } + diff --git a/src/test/correct/ifbranches/clang_no_plt_no_pic/ifbranches.expected b/src/test/correct/ifbranches/clang_no_plt_no_pic/ifbranches.expected index 852ead596..8d82b2768 100644 --- a/src/test/correct/ifbranches/clang_no_plt_no_pic/ifbranches.expected +++ b/src/test/correct/ifbranches/clang_no_plt_no_pic/ifbranches.expected @@ -33,6 +33,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -56,43 +60,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1921bv64) == 0bv8); free ensures (memory_load8_le(mem, 1922bv64) == 2bv8); free ensures (memory_load8_le(mem, 1923bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -103,99 +81,31 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_stack, R0, R31, R8, stack; requires (Gamma_R0 == true); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1920bv64) == 1bv8); free requires (memory_load8_le(mem, 1921bv64) == 0bv8); free requires (memory_load8_le(mem, 1922bv64) == 2bv8); free requires (memory_load8_le(mem, 1923bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1920bv64) == 1bv8); free ensures (memory_load8_le(mem, 1921bv64) == 0bv8); free ensures (memory_load8_le(mem, 1922bv64) == 2bv8); free ensures (memory_load8_le(mem, 1923bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -280,3 +190,4 @@ procedure main() assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l00000a03; } + diff --git a/src/test/correct/ifbranches/clang_pic/ifbranches.expected b/src/test/correct/ifbranches/clang_pic/ifbranches.expected index 852ead596..8d82b2768 100644 --- a/src/test/correct/ifbranches/clang_pic/ifbranches.expected +++ b/src/test/correct/ifbranches/clang_pic/ifbranches.expected @@ -33,6 +33,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -56,43 +60,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1921bv64) == 0bv8); free ensures (memory_load8_le(mem, 1922bv64) == 2bv8); free ensures (memory_load8_le(mem, 1923bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -103,99 +81,31 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_stack, R0, R31, R8, stack; requires (Gamma_R0 == true); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1920bv64) == 1bv8); free requires (memory_load8_le(mem, 1921bv64) == 0bv8); free requires (memory_load8_le(mem, 1922bv64) == 2bv8); free requires (memory_load8_le(mem, 1923bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1920bv64) == 1bv8); free ensures (memory_load8_le(mem, 1921bv64) == 0bv8); free ensures (memory_load8_le(mem, 1922bv64) == 2bv8); free ensures (memory_load8_le(mem, 1923bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -280,3 +190,4 @@ procedure main() assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l00000a03; } + diff --git a/src/test/correct/ifbranches/gcc/ifbranches.expected b/src/test/correct/ifbranches/gcc/ifbranches.expected index cd7916e92..ac1bec839 100644 --- a/src/test/correct/ifbranches/gcc/ifbranches.expected +++ b/src/test/correct/ifbranches/gcc/ifbranches.expected @@ -31,6 +31,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -54,43 +58,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1905bv64) == 0bv8); free ensures (memory_load8_le(mem, 1906bv64) == 2bv8); free ensures (memory_load8_le(mem, 1907bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -101,99 +79,31 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_stack, R0, R31, stack; requires (Gamma_R0 == true); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1904bv64) == 1bv8); free requires (memory_load8_le(mem, 1905bv64) == 0bv8); free requires (memory_load8_le(mem, 1906bv64) == 2bv8); free requires (memory_load8_le(mem, 1907bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1904bv64) == 1bv8); free ensures (memory_load8_le(mem, 1905bv64) == 0bv8); free ensures (memory_load8_le(mem, 1906bv64) == 2bv8); free ensures (memory_load8_le(mem, 1907bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -252,3 +162,4 @@ procedure main() assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l00000369; } + diff --git a/src/test/correct/ifbranches/gcc_O2/ifbranches.expected b/src/test/correct/ifbranches/gcc_O2/ifbranches.expected index 6a212af81..8ac961753 100644 --- a/src/test/correct/ifbranches/gcc_O2/ifbranches.expected +++ b/src/test/correct/ifbranches/gcc_O2/ifbranches.expected @@ -4,10 +4,15 @@ var {:extern} R0: bv64; var {:extern} mem: [bv64]bv8; function {:extern} {:bvbuiltin "bvadd"} bvadd32(bv32, bv32) returns (bv32); function {:extern} {:bvbuiltin "bvadd"} bvadd33(bv33, bv33) returns (bv33); +function {:extern} {:bvbuiltin "bvadd"} bvadd64(bv64, bv64) returns (bv64); function {:extern} {:bvbuiltin "bvcomp"} bvcomp1(bv1, bv1) returns (bv1); function {:extern} {:bvbuiltin "bvcomp"} bvcomp32(bv32, bv32) returns (bv1); function {:extern} {:bvbuiltin "bvcomp"} bvcomp33(bv33, bv33) returns (bv1); function {:extern} {:bvbuiltin "bvnot"} bvnot1(bv1) returns (bv1); +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -23,43 +28,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -70,97 +49,29 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, R0; requires (Gamma_R0 == true); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1896bv64) == 1bv8); free requires (memory_load8_le(mem, 1897bv64) == 0bv8); free requires (memory_load8_le(mem, 1898bv64) == 2bv8); free requires (memory_load8_le(mem, 1899bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 80bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 0bv8); - free requires (memory_load8_le(mem, 69025bv64) == 7bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 0bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1536bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1896bv64) == 1bv8); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #1: bv32; var CF: bv1; @@ -202,3 +113,4 @@ procedure main() assume (bvcomp1(ZF, 1bv1) == 0bv1); goto l000001c6; } + diff --git a/src/test/correct/ifbranches/gcc_no_plt_no_pic/ifbranches.expected b/src/test/correct/ifbranches/gcc_no_plt_no_pic/ifbranches.expected index da091cc0a..c53ffab7b 100644 --- a/src/test/correct/ifbranches/gcc_no_plt_no_pic/ifbranches.expected +++ b/src/test/correct/ifbranches/gcc_no_plt_no_pic/ifbranches.expected @@ -31,6 +31,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -54,43 +58,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1905bv64) == 0bv8); free ensures (memory_load8_le(mem, 1906bv64) == 2bv8); free ensures (memory_load8_le(mem, 1907bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -101,99 +79,31 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_stack, R0, R31, stack; requires (Gamma_R0 == true); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1904bv64) == 1bv8); free requires (memory_load8_le(mem, 1905bv64) == 0bv8); free requires (memory_load8_le(mem, 1906bv64) == 2bv8); free requires (memory_load8_le(mem, 1907bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1904bv64) == 1bv8); free ensures (memory_load8_le(mem, 1905bv64) == 0bv8); free ensures (memory_load8_le(mem, 1906bv64) == 2bv8); free ensures (memory_load8_le(mem, 1907bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -252,3 +162,4 @@ procedure main() assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l0000099c; } + diff --git a/src/test/correct/ifbranches/gcc_pic/ifbranches.expected b/src/test/correct/ifbranches/gcc_pic/ifbranches.expected index da091cc0a..c53ffab7b 100644 --- a/src/test/correct/ifbranches/gcc_pic/ifbranches.expected +++ b/src/test/correct/ifbranches/gcc_pic/ifbranches.expected @@ -31,6 +31,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -54,43 +58,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1905bv64) == 0bv8); free ensures (memory_load8_le(mem, 1906bv64) == 2bv8); free ensures (memory_load8_le(mem, 1907bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -101,99 +79,31 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_stack, R0, R31, stack; requires (Gamma_R0 == true); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1904bv64) == 1bv8); free requires (memory_load8_le(mem, 1905bv64) == 0bv8); free requires (memory_load8_le(mem, 1906bv64) == 2bv8); free requires (memory_load8_le(mem, 1907bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1904bv64) == 1bv8); free ensures (memory_load8_le(mem, 1905bv64) == 0bv8); free ensures (memory_load8_le(mem, 1906bv64) == 2bv8); free ensures (memory_load8_le(mem, 1907bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -252,3 +162,4 @@ procedure main() assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l0000099c; } + diff --git a/src/test/correct/ifglobal/clang/ifglobal.expected b/src/test/correct/ifglobal/clang/ifglobal.expected index 70d46adf3..1200382ed 100644 --- a/src/test/correct/ifglobal/clang/ifglobal.expected +++ b/src/test/correct/ifglobal/clang/ifglobal.expected @@ -35,6 +35,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -54,43 +58,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1893bv64) == 0bv8); free ensures (memory_load8_le(mem, 1894bv64) == 2bv8); free ensures (memory_load8_le(mem, 1895bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -101,98 +79,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R31, R8, R9, mem, stack; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1892bv64) == 1bv8); free requires (memory_load8_le(mem, 1893bv64) == 0bv8); free requires (memory_load8_le(mem, 1894bv64) == 2bv8); free requires (memory_load8_le(mem, 1895bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1892bv64) == 1bv8); free ensures (memory_load8_le(mem, 1893bv64) == 0bv8); free ensures (memory_load8_le(mem, 1894bv64) == 2bv8); free ensures (memory_load8_le(mem, 1895bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -266,3 +176,4 @@ procedure main() assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l00000343; } + diff --git a/src/test/correct/ifglobal/clang_O2/ifglobal.expected b/src/test/correct/ifglobal/clang_O2/ifglobal.expected index 2181d6c4f..28eaf250b 100644 --- a/src/test/correct/ifglobal/clang_O2/ifglobal.expected +++ b/src/test/correct/ifglobal/clang_O2/ifglobal.expected @@ -26,6 +26,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -43,43 +47,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1869bv64) == 0bv8); free ensures (memory_load8_le(mem, 1870bv64) == 2bv8); free ensures (memory_load8_le(mem, 1871bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -90,96 +68,28 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R8, Gamma_R9, Gamma_mem, R0, R8, R9, mem; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1868bv64) == 1bv8); free requires (memory_load8_le(mem, 1869bv64) == 0bv8); free requires (memory_load8_le(mem, 1870bv64) == 2bv8); free requires (memory_load8_le(mem, 1871bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (memory_load8_le(mem, 1868bv64) == 1bv8); free ensures (memory_load8_le(mem, 1869bv64) == 0bv8); free ensures (memory_load8_le(mem, 1870bv64) == 2bv8); free ensures (memory_load8_le(mem, 1871bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -210,3 +120,4 @@ procedure main() assume (bvcomp32(R9[32:0], 0bv32) == 0bv1); goto l000002f8; } + diff --git a/src/test/correct/ifglobal/clang_no_plt_no_pic/ifglobal.expected b/src/test/correct/ifglobal/clang_no_plt_no_pic/ifglobal.expected index 8ae5517aa..e27dcdecd 100644 --- a/src/test/correct/ifglobal/clang_no_plt_no_pic/ifglobal.expected +++ b/src/test/correct/ifglobal/clang_no_plt_no_pic/ifglobal.expected @@ -35,6 +35,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -54,43 +58,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1893bv64) == 0bv8); free ensures (memory_load8_le(mem, 1894bv64) == 2bv8); free ensures (memory_load8_le(mem, 1895bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -101,98 +79,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R31, R8, R9, mem, stack; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1892bv64) == 1bv8); free requires (memory_load8_le(mem, 1893bv64) == 0bv8); free requires (memory_load8_le(mem, 1894bv64) == 2bv8); free requires (memory_load8_le(mem, 1895bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1892bv64) == 1bv8); free ensures (memory_load8_le(mem, 1893bv64) == 0bv8); free ensures (memory_load8_le(mem, 1894bv64) == 2bv8); free ensures (memory_load8_le(mem, 1895bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -266,3 +176,4 @@ procedure main() assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l00000952; } + diff --git a/src/test/correct/ifglobal/clang_pic/ifglobal.expected b/src/test/correct/ifglobal/clang_pic/ifglobal.expected index 2f170c699..7d2806261 100644 --- a/src/test/correct/ifglobal/clang_pic/ifglobal.expected +++ b/src/test/correct/ifglobal/clang_pic/ifglobal.expected @@ -62,51 +62,18 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1965bv64) == 0bv8); free ensures (memory_load8_le(mem, 1966bv64) == 2bv8); free ensures (memory_load8_le(mem, 1967bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69576bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69577bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69578bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69579bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69580bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69581bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69582bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69583bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69576bv64) == 69684bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69064bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -117,114 +84,32 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R31, R8, R9, mem, stack; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1964bv64) == 1bv8); free requires (memory_load8_le(mem, 1965bv64) == 0bv8); free requires (memory_load8_le(mem, 1966bv64) == 2bv8); free requires (memory_load8_le(mem, 1967bv64) == 0bv8); - free requires (memory_load8_le(mem, 69576bv64) == 52bv8); - free requires (memory_load8_le(mem, 69577bv64) == 16bv8); - free requires (memory_load8_le(mem, 69578bv64) == 1bv8); - free requires (memory_load8_le(mem, 69579bv64) == 0bv8); - free requires (memory_load8_le(mem, 69580bv64) == 0bv8); - free requires (memory_load8_le(mem, 69581bv64) == 0bv8); - free requires (memory_load8_le(mem, 69582bv64) == 0bv8); - free requires (memory_load8_le(mem, 69583bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); - free requires (memory_load8_le(mem, 69056bv64) == 80bv8); - free requires (memory_load8_le(mem, 69057bv64) == 7bv8); - free requires (memory_load8_le(mem, 69058bv64) == 0bv8); - free requires (memory_load8_le(mem, 69059bv64) == 0bv8); - free requires (memory_load8_le(mem, 69060bv64) == 0bv8); - free requires (memory_load8_le(mem, 69061bv64) == 0bv8); - free requires (memory_load8_le(mem, 69062bv64) == 0bv8); - free requires (memory_load8_le(mem, 69063bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 0bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 84bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); + free requires (memory_load64_le(mem, 69576bv64) == 69684bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); + free requires (memory_load64_le(mem, 69056bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69064bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1876bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1964bv64) == 1bv8); free ensures (memory_load8_le(mem, 1965bv64) == 0bv8); free ensures (memory_load8_le(mem, 1966bv64) == 2bv8); free ensures (memory_load8_le(mem, 1967bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69576bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69577bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69578bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69579bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69580bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69581bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69582bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69583bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69576bv64) == 69684bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69064bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -302,3 +187,4 @@ procedure main() assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l00000352; } + diff --git a/src/test/correct/ifglobal/gcc/ifglobal.expected b/src/test/correct/ifglobal/gcc/ifglobal.expected index a82d65ba3..3a8aab8e8 100644 --- a/src/test/correct/ifglobal/gcc/ifglobal.expected +++ b/src/test/correct/ifglobal/gcc/ifglobal.expected @@ -29,6 +29,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -48,43 +52,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1877bv64) == 0bv8); free ensures (memory_load8_le(mem, 1878bv64) == 2bv8); free ensures (memory_load8_le(mem, 1879bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -95,96 +73,28 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1876bv64) == 1bv8); free requires (memory_load8_le(mem, 1877bv64) == 0bv8); free requires (memory_load8_le(mem, 1878bv64) == 2bv8); free requires (memory_load8_le(mem, 1879bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1876bv64) == 1bv8); free ensures (memory_load8_le(mem, 1877bv64) == 0bv8); free ensures (memory_load8_le(mem, 1878bv64) == 2bv8); free ensures (memory_load8_le(mem, 1879bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -232,3 +142,4 @@ procedure main() assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l00000311; } + diff --git a/src/test/correct/ifglobal/gcc_O2/ifglobal.expected b/src/test/correct/ifglobal/gcc_O2/ifglobal.expected index 07170dee4..da48f81dc 100644 --- a/src/test/correct/ifglobal/gcc_O2/ifglobal.expected +++ b/src/test/correct/ifglobal/gcc_O2/ifglobal.expected @@ -25,6 +25,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -42,43 +46,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -89,96 +67,28 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1896bv64) == 1bv8); free requires (memory_load8_le(mem, 1897bv64) == 0bv8); free requires (memory_load8_le(mem, 1898bv64) == 2bv8); free requires (memory_load8_le(mem, 1899bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 80bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 0bv8); - free requires (memory_load8_le(mem, 69025bv64) == 7bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 0bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1536bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1896bv64) == 1bv8); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -208,3 +118,4 @@ procedure main() assume (bvnot1(bvcomp32(R1[32:0], 0bv32)) == 0bv1); goto l00000396; } + diff --git a/src/test/correct/ifglobal/gcc_no_plt_no_pic/ifglobal.expected b/src/test/correct/ifglobal/gcc_no_plt_no_pic/ifglobal.expected index bc013859c..3aaf2a46f 100644 --- a/src/test/correct/ifglobal/gcc_no_plt_no_pic/ifglobal.expected +++ b/src/test/correct/ifglobal/gcc_no_plt_no_pic/ifglobal.expected @@ -29,6 +29,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -48,43 +52,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1877bv64) == 0bv8); free ensures (memory_load8_le(mem, 1878bv64) == 2bv8); free ensures (memory_load8_le(mem, 1879bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -95,96 +73,28 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1876bv64) == 1bv8); free requires (memory_load8_le(mem, 1877bv64) == 0bv8); free requires (memory_load8_le(mem, 1878bv64) == 2bv8); free requires (memory_load8_le(mem, 1879bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1876bv64) == 1bv8); free ensures (memory_load8_le(mem, 1877bv64) == 0bv8); free ensures (memory_load8_le(mem, 1878bv64) == 2bv8); free ensures (memory_load8_le(mem, 1879bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -232,3 +142,4 @@ procedure main() assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l000008e5; } + diff --git a/src/test/correct/ifglobal/gcc_pic/ifglobal.expected b/src/test/correct/ifglobal/gcc_pic/ifglobal.expected index 66adb7f43..3a0d2e99f 100644 --- a/src/test/correct/ifglobal/gcc_pic/ifglobal.expected +++ b/src/test/correct/ifglobal/gcc_pic/ifglobal.expected @@ -56,51 +56,18 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1941bv64) == 0bv8); free ensures (memory_load8_le(mem, 1942bv64) == 2bv8); free ensures (memory_load8_le(mem, 1943bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69600bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69601bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69602bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69603bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69604bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69605bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69606bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69607bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69600bv64) == 69652bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1872bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -111,112 +78,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1940bv64) == 1bv8); free requires (memory_load8_le(mem, 1941bv64) == 0bv8); free requires (memory_load8_le(mem, 1942bv64) == 2bv8); free requires (memory_load8_le(mem, 1943bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 84bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 0bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69600bv64) == 20bv8); - free requires (memory_load8_le(mem, 69601bv64) == 16bv8); - free requires (memory_load8_le(mem, 69602bv64) == 1bv8); - free requires (memory_load8_le(mem, 69603bv64) == 0bv8); - free requires (memory_load8_le(mem, 69604bv64) == 0bv8); - free requires (memory_load8_le(mem, 69605bv64) == 0bv8); - free requires (memory_load8_le(mem, 69606bv64) == 0bv8); - free requires (memory_load8_le(mem, 69607bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 80bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69016bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69600bv64) == 69652bv64); + free requires (memory_load64_le(mem, 69008bv64) == 1872bv64); free ensures (memory_load8_le(mem, 1940bv64) == 1bv8); free ensures (memory_load8_le(mem, 1941bv64) == 0bv8); free ensures (memory_load8_le(mem, 1942bv64) == 2bv8); free ensures (memory_load8_le(mem, 1943bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69600bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69601bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69602bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69603bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69604bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69605bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69606bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69607bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69600bv64) == 69652bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1872bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -266,3 +151,4 @@ procedure main() assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l00000312; } + diff --git a/src/test/correct/indirect_call/clang_O2/indirect_call.expected b/src/test/correct/indirect_call/clang_O2/indirect_call.expected index d04773ed9..c52d56929 100644 --- a/src/test/correct/indirect_call/clang_O2/indirect_call.expected +++ b/src/test/correct/indirect_call/clang_O2/indirect_call.expected @@ -87,43 +87,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1995bv64) == 121bv8); free ensures (memory_load8_le(mem, 1996bv64) == 58bv8); free ensures (memory_load8_le(mem, 1997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 96bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69680bv64) == 48bv8); - free ensures (memory_load8_le(mem, 69681bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69682bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69683bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69684bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69685bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69686bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69687bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1888bv64); + free ensures (memory_load64_le(mem, 69680bv64) == 69680bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -134,24 +108,10 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R16, Gamma_R17, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_stack, R0, R16, R17, R29, R30, R31, stack; - free requires (memory_load8_le(mem, 69672bv64) == 0bv8); - free requires (memory_load8_le(mem, 69673bv64) == 0bv8); - free requires (memory_load8_le(mem, 69674bv64) == 0bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); - free requires (memory_load8_le(mem, 69680bv64) == 48bv8); - free requires (memory_load8_le(mem, 69681bv64) == 16bv8); - free requires (memory_load8_le(mem, 69682bv64) == 1bv8); - free requires (memory_load8_le(mem, 69683bv64) == 0bv8); - free requires (memory_load8_le(mem, 69684bv64) == 0bv8); - free requires (memory_load8_le(mem, 69685bv64) == 0bv8); - free requires (memory_load8_le(mem, 69686bv64) == 0bv8); - free requires (memory_load8_le(mem, 69687bv64) == 0bv8); + free requires (memory_load64_le(mem, 69672bv64) == 0bv64); + free requires (memory_load64_le(mem, 69680bv64) == 69680bv64); free requires (memory_load8_le(mem, 1952bv64) == 1bv8); free requires (memory_load8_le(mem, 1953bv64) == 0bv8); free requires (memory_load8_le(mem, 1954bv64) == 2bv8); @@ -198,38 +158,10 @@ procedure main() free requires (memory_load8_le(mem, 1995bv64) == 121bv8); free requires (memory_load8_le(mem, 1996bv64) == 58bv8); free requires (memory_load8_le(mem, 1997bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 80bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 0bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 96bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69680bv64) == 48bv8); - free requires (memory_load8_le(mem, 69681bv64) == 16bv8); - free requires (memory_load8_le(mem, 69682bv64) == 1bv8); - free requires (memory_load8_le(mem, 69683bv64) == 0bv8); - free requires (memory_load8_le(mem, 69684bv64) == 0bv8); - free requires (memory_load8_le(mem, 69685bv64) == 0bv8); - free requires (memory_load8_le(mem, 69686bv64) == 0bv8); - free requires (memory_load8_le(mem, 69687bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1888bv64); + free requires (memory_load64_le(mem, 69680bv64) == 69680bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -280,38 +212,12 @@ procedure main() free ensures (memory_load8_le(mem, 1995bv64) == 121bv8); free ensures (memory_load8_le(mem, 1996bv64) == 58bv8); free ensures (memory_load8_le(mem, 1997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 96bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69680bv64) == 48bv8); - free ensures (memory_load8_le(mem, 69681bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69682bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69683bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69684bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69685bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69686bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69687bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1888bv64); + free ensures (memory_load64_le(mem, 69680bv64) == 69680bv64); + +implementation main() { var #4: bv64; var Gamma_#4: bool; @@ -393,38 +299,10 @@ procedure puts(); free requires (memory_load8_le(mem, 1995bv64) == 121bv8); free requires (memory_load8_le(mem, 1996bv64) == 58bv8); free requires (memory_load8_le(mem, 1997bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 80bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 0bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 96bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69680bv64) == 48bv8); - free requires (memory_load8_le(mem, 69681bv64) == 16bv8); - free requires (memory_load8_le(mem, 69682bv64) == 1bv8); - free requires (memory_load8_le(mem, 69683bv64) == 0bv8); - free requires (memory_load8_le(mem, 69684bv64) == 0bv8); - free requires (memory_load8_le(mem, 69685bv64) == 0bv8); - free requires (memory_load8_le(mem, 69686bv64) == 0bv8); - free requires (memory_load8_le(mem, 69687bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1888bv64); + free requires (memory_load64_le(mem, 69680bv64) == 69680bv64); free ensures (memory_load8_le(mem, 1952bv64) == 1bv8); free ensures (memory_load8_le(mem, 1953bv64) == 0bv8); free ensures (memory_load8_le(mem, 1954bv64) == 2bv8); @@ -471,35 +349,8 @@ procedure puts(); free ensures (memory_load8_le(mem, 1995bv64) == 121bv8); free ensures (memory_load8_le(mem, 1996bv64) == 58bv8); free ensures (memory_load8_le(mem, 1997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 96bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69680bv64) == 48bv8); - free ensures (memory_load8_le(mem, 69681bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69682bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69683bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69684bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69685bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69686bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69687bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1888bv64); + free ensures (memory_load64_le(mem, 69680bv64) == 69680bv64); + diff --git a/src/test/correct/indirect_call/gcc_O2/indirect_call.expected b/src/test/correct/indirect_call/gcc_O2/indirect_call.expected index 992bdfc81..62225a051 100644 --- a/src/test/correct/indirect_call/gcc_O2/indirect_call.expected +++ b/src/test/correct/indirect_call/gcc_O2/indirect_call.expected @@ -93,43 +93,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 2033bv64) == 121bv8); free ensures (memory_load8_le(mem, 2034bv64) == 58bv8); free ensures (memory_load8_le(mem, 2035bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 144bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69008bv64) == 1936bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1856bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1600bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -140,7 +114,7 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure greet() +procedure greet(); modifies Gamma_R0, Gamma_R16, Gamma_R17, R0, R16, R17; free requires (memory_load8_le(mem, 1984bv64) == 1bv8); free requires (memory_load8_le(mem, 1985bv64) == 0bv8); @@ -194,38 +168,10 @@ procedure greet() free requires (memory_load8_le(mem, 2033bv64) == 121bv8); free requires (memory_load8_le(mem, 2034bv64) == 58bv8); free requires (memory_load8_le(mem, 2035bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 144bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 64bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 64bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69008bv64) == 1936bv64); + free requires (memory_load64_le(mem, 69016bv64) == 1856bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1600bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1984bv64) == 1bv8); free ensures (memory_load8_le(mem, 1985bv64) == 0bv8); free ensures (memory_load8_le(mem, 1986bv64) == 2bv8); @@ -278,38 +224,12 @@ procedure greet() free ensures (memory_load8_le(mem, 2033bv64) == 121bv8); free ensures (memory_load8_le(mem, 2034bv64) == 58bv8); free ensures (memory_load8_le(mem, 2035bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 144bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69008bv64) == 1936bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1856bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1600bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation greet() { lgreet: assume {:captureState "lgreet"} true; @@ -320,24 +240,10 @@ procedure greet() assume false; } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R16, Gamma_R17, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_stack, R0, R16, R17, R29, R30, R31, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1984bv64) == 1bv8); free requires (memory_load8_le(mem, 1985bv64) == 0bv8); free requires (memory_load8_le(mem, 1986bv64) == 2bv8); @@ -390,38 +296,10 @@ procedure main() free requires (memory_load8_le(mem, 2033bv64) == 121bv8); free requires (memory_load8_le(mem, 2034bv64) == 58bv8); free requires (memory_load8_le(mem, 2035bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 144bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 64bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 64bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69008bv64) == 1936bv64); + free requires (memory_load64_le(mem, 69016bv64) == 1856bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1600bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -478,38 +356,12 @@ procedure main() free ensures (memory_load8_le(mem, 2033bv64) == 121bv8); free ensures (memory_load8_le(mem, 2034bv64) == 58bv8); free ensures (memory_load8_le(mem, 2035bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 144bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69008bv64) == 1936bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1856bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1600bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #1: bv64; var Gamma_#1: bool; @@ -595,38 +447,10 @@ procedure puts(); free requires (memory_load8_le(mem, 2033bv64) == 121bv8); free requires (memory_load8_le(mem, 2034bv64) == 58bv8); free requires (memory_load8_le(mem, 2035bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 144bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 64bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 64bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69008bv64) == 1936bv64); + free requires (memory_load64_le(mem, 69016bv64) == 1856bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1600bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1984bv64) == 1bv8); free ensures (memory_load8_le(mem, 1985bv64) == 0bv8); free ensures (memory_load8_le(mem, 1986bv64) == 2bv8); @@ -679,35 +503,8 @@ procedure puts(); free ensures (memory_load8_le(mem, 2033bv64) == 121bv8); free ensures (memory_load8_le(mem, 2034bv64) == 58bv8); free ensures (memory_load8_le(mem, 2035bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 144bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69008bv64) == 1936bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1856bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1600bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + diff --git a/src/test/correct/initialisation/clang/initialisation.expected b/src/test/correct/initialisation/clang/initialisation.expected index 4a8b8a7ad..19ae309d0 100644 --- a/src/test/correct/initialisation/clang/initialisation.expected +++ b/src/test/correct/initialisation/clang/initialisation.expected @@ -88,43 +88,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1913bv64) == 0bv8); free ensures (memory_load8_le(mem, 1914bv64) == 2bv8); free ensures (memory_load8_le(mem, 1915bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -135,84 +109,21 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R10, Gamma_R11, Gamma_R8, Gamma_R9, Gamma_mem, R0, R10, R11, R8, R9, mem; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); - free requires (memory_load8_le(mem, 69680bv64) == 5bv8); - free requires (memory_load8_le(mem, 69681bv64) == 0bv8); - free requires (memory_load8_le(mem, 69682bv64) == 0bv8); - free requires (memory_load8_le(mem, 69683bv64) == 0bv8); - free requires (memory_load8_le(mem, 69684bv64) == 97bv8); - free requires (memory_load8_le(mem, 69685bv64) == 0bv8); - free requires (memory_load8_le(mem, 69686bv64) == 0bv8); - free requires (memory_load8_le(mem, 69687bv64) == 0bv8); - free requires (memory_load8_le(mem, 69688bv64) == 255bv8); - free requires (memory_load8_le(mem, 69689bv64) == 255bv8); - free requires (memory_load8_le(mem, 69690bv64) == 255bv8); - free requires (memory_load8_le(mem, 69691bv64) == 255bv8); - free requires (memory_load8_le(mem, 69692bv64) == 15bv8); - free requires (memory_load8_le(mem, 69693bv64) == 0bv8); - free requires (memory_load8_le(mem, 69694bv64) == 0bv8); - free requires (memory_load8_le(mem, 69695bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 1bv8); - free requires (memory_load8_le(mem, 69697bv64) == 0bv8); - free requires (memory_load8_le(mem, 69698bv64) == 0bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 2bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); + free requires (memory_load64_le(mem, 69680bv64) == 416611827717bv64); + free requires (memory_load64_le(mem, 69688bv64) == 68719476735bv64); + free requires (memory_load64_le(mem, 69696bv64) == 8589934593bv64); free requires (memory_load8_le(mem, 1912bv64) == 1bv8); free requires (memory_load8_le(mem, 1913bv64) == 0bv8); free requires (memory_load8_le(mem, 1914bv64) == 2bv8); free requires (memory_load8_le(mem, 1915bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); ensures (memory_load32_le(mem, $x_addr) == 6bv32); ensures (memory_load32_le(mem, bvadd64($a_addr, 4bv64)) == 4bv32); ensures (memory_load32_le(mem, bvadd64($a_addr, 0bv64)) == 1bv32); @@ -220,38 +131,12 @@ procedure main() free ensures (memory_load8_le(mem, 1913bv64) == 0bv8); free ensures (memory_load8_le(mem, 1914bv64) == 2bv8); free ensures (memory_load8_le(mem, 1915bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var #4: bv64; var CF: bv1; @@ -307,3 +192,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/initialisation/clang_O2/initialisation.expected b/src/test/correct/initialisation/clang_O2/initialisation.expected index 5bbd94028..12558980d 100644 --- a/src/test/correct/initialisation/clang_O2/initialisation.expected +++ b/src/test/correct/initialisation/clang_O2/initialisation.expected @@ -90,43 +90,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1909bv64) == 0bv8); free ensures (memory_load8_le(mem, 1910bv64) == 2bv8); free ensures (memory_load8_le(mem, 1911bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -137,84 +111,21 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R10, Gamma_R11, Gamma_R12, Gamma_R13, Gamma_R14, Gamma_R15, Gamma_R8, Gamma_R9, Gamma_mem, R0, R10, R11, R12, R13, R14, R15, R8, R9, mem; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); - free requires (memory_load8_le(mem, 69680bv64) == 5bv8); - free requires (memory_load8_le(mem, 69681bv64) == 0bv8); - free requires (memory_load8_le(mem, 69682bv64) == 0bv8); - free requires (memory_load8_le(mem, 69683bv64) == 0bv8); - free requires (memory_load8_le(mem, 69684bv64) == 97bv8); - free requires (memory_load8_le(mem, 69685bv64) == 0bv8); - free requires (memory_load8_le(mem, 69686bv64) == 0bv8); - free requires (memory_load8_le(mem, 69687bv64) == 0bv8); - free requires (memory_load8_le(mem, 69688bv64) == 255bv8); - free requires (memory_load8_le(mem, 69689bv64) == 255bv8); - free requires (memory_load8_le(mem, 69690bv64) == 255bv8); - free requires (memory_load8_le(mem, 69691bv64) == 255bv8); - free requires (memory_load8_le(mem, 69692bv64) == 15bv8); - free requires (memory_load8_le(mem, 69693bv64) == 0bv8); - free requires (memory_load8_le(mem, 69694bv64) == 0bv8); - free requires (memory_load8_le(mem, 69695bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 1bv8); - free requires (memory_load8_le(mem, 69697bv64) == 0bv8); - free requires (memory_load8_le(mem, 69698bv64) == 0bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 2bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); + free requires (memory_load64_le(mem, 69680bv64) == 416611827717bv64); + free requires (memory_load64_le(mem, 69688bv64) == 68719476735bv64); + free requires (memory_load64_le(mem, 69696bv64) == 8589934593bv64); free requires (memory_load8_le(mem, 1908bv64) == 1bv8); free requires (memory_load8_le(mem, 1909bv64) == 0bv8); free requires (memory_load8_le(mem, 1910bv64) == 2bv8); free requires (memory_load8_le(mem, 1911bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); ensures (memory_load32_le(mem, $x_addr) == 6bv32); ensures (memory_load32_le(mem, bvadd64($a_addr, 4bv64)) == 4bv32); ensures (memory_load32_le(mem, bvadd64($a_addr, 0bv64)) == 1bv32); @@ -222,38 +133,12 @@ procedure main() free ensures (memory_load8_le(mem, 1909bv64) == 0bv8); free ensures (memory_load8_le(mem, 1910bv64) == 2bv8); free ensures (memory_load8_le(mem, 1911bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -293,3 +178,4 @@ procedure main() assume {:captureState "%00000367"} true; return; } + diff --git a/src/test/correct/initialisation/clang_no_plt_no_pic/initialisation.expected b/src/test/correct/initialisation/clang_no_plt_no_pic/initialisation.expected index 2487e0171..1a8bd119b 100644 --- a/src/test/correct/initialisation/clang_no_plt_no_pic/initialisation.expected +++ b/src/test/correct/initialisation/clang_no_plt_no_pic/initialisation.expected @@ -88,43 +88,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1913bv64) == 0bv8); free ensures (memory_load8_le(mem, 1914bv64) == 2bv8); free ensures (memory_load8_le(mem, 1915bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -135,84 +109,21 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R10, Gamma_R11, Gamma_R8, Gamma_R9, Gamma_mem, R0, R10, R11, R8, R9, mem; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); - free requires (memory_load8_le(mem, 69680bv64) == 5bv8); - free requires (memory_load8_le(mem, 69681bv64) == 0bv8); - free requires (memory_load8_le(mem, 69682bv64) == 0bv8); - free requires (memory_load8_le(mem, 69683bv64) == 0bv8); - free requires (memory_load8_le(mem, 69684bv64) == 97bv8); - free requires (memory_load8_le(mem, 69685bv64) == 0bv8); - free requires (memory_load8_le(mem, 69686bv64) == 0bv8); - free requires (memory_load8_le(mem, 69687bv64) == 0bv8); - free requires (memory_load8_le(mem, 69688bv64) == 255bv8); - free requires (memory_load8_le(mem, 69689bv64) == 255bv8); - free requires (memory_load8_le(mem, 69690bv64) == 255bv8); - free requires (memory_load8_le(mem, 69691bv64) == 255bv8); - free requires (memory_load8_le(mem, 69692bv64) == 15bv8); - free requires (memory_load8_le(mem, 69693bv64) == 0bv8); - free requires (memory_load8_le(mem, 69694bv64) == 0bv8); - free requires (memory_load8_le(mem, 69695bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 1bv8); - free requires (memory_load8_le(mem, 69697bv64) == 0bv8); - free requires (memory_load8_le(mem, 69698bv64) == 0bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 2bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); + free requires (memory_load64_le(mem, 69680bv64) == 416611827717bv64); + free requires (memory_load64_le(mem, 69688bv64) == 68719476735bv64); + free requires (memory_load64_le(mem, 69696bv64) == 8589934593bv64); free requires (memory_load8_le(mem, 1912bv64) == 1bv8); free requires (memory_load8_le(mem, 1913bv64) == 0bv8); free requires (memory_load8_le(mem, 1914bv64) == 2bv8); free requires (memory_load8_le(mem, 1915bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); ensures (memory_load32_le(mem, $x_addr) == 6bv32); ensures (memory_load32_le(mem, bvadd64($a_addr, 4bv64)) == 4bv32); ensures (memory_load32_le(mem, bvadd64($a_addr, 0bv64)) == 1bv32); @@ -220,38 +131,12 @@ procedure main() free ensures (memory_load8_le(mem, 1913bv64) == 0bv8); free ensures (memory_load8_le(mem, 1914bv64) == 2bv8); free ensures (memory_load8_le(mem, 1915bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var #4: bv64; var CF: bv1; @@ -307,3 +192,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/initialisation/clang_pic/initialisation.expected b/src/test/correct/initialisation/clang_pic/initialisation.expected index 6fb983d9b..9e95130d8 100644 --- a/src/test/correct/initialisation/clang_pic/initialisation.expected +++ b/src/test/correct/initialisation/clang_pic/initialisation.expected @@ -86,75 +86,21 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 2049bv64) == 0bv8); free ensures (memory_load8_le(mem, 2050bv64) == 2bv8); free ensures (memory_load8_le(mem, 2051bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69576bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69577bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69578bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69579bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69580bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69581bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69582bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69583bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69584bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69585bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69586bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69587bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69588bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69589bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69590bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69591bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69552bv64) == 56bv8); - free ensures (memory_load8_le(mem, 69553bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69554bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69555bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69556bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69557bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69558bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69559bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69040bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69041bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69042bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69043bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69044bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69045bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69046bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69047bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 148bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69032bv64) == 144bv8); - free ensures (memory_load8_le(mem, 69033bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69034bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69035bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69036bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69037bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69038bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69039bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69560bv64) == 48bv8); - free ensures (memory_load8_le(mem, 69561bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69562bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69563bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69564bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69565bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69566bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69567bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69576bv64) == 69696bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69584bv64) == 69684bv64); + free ensures (memory_load64_le(mem, 69552bv64) == 69688bv64); + free ensures (memory_load64_le(mem, 69040bv64) == 1856bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1940bv64); + free ensures (memory_load64_le(mem, 69032bv64) == 1936bv64); + free ensures (memory_load64_le(mem, 69560bv64) == 69680bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -165,116 +111,25 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R10, Gamma_R8, Gamma_R9, Gamma_mem, R0, R10, R8, R9, mem; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); - free requires (memory_load8_le(mem, 69680bv64) == 5bv8); - free requires (memory_load8_le(mem, 69681bv64) == 0bv8); - free requires (memory_load8_le(mem, 69682bv64) == 0bv8); - free requires (memory_load8_le(mem, 69683bv64) == 0bv8); - free requires (memory_load8_le(mem, 69684bv64) == 97bv8); - free requires (memory_load8_le(mem, 69685bv64) == 0bv8); - free requires (memory_load8_le(mem, 69686bv64) == 0bv8); - free requires (memory_load8_le(mem, 69687bv64) == 0bv8); - free requires (memory_load8_le(mem, 69688bv64) == 255bv8); - free requires (memory_load8_le(mem, 69689bv64) == 255bv8); - free requires (memory_load8_le(mem, 69690bv64) == 255bv8); - free requires (memory_load8_le(mem, 69691bv64) == 255bv8); - free requires (memory_load8_le(mem, 69692bv64) == 15bv8); - free requires (memory_load8_le(mem, 69693bv64) == 0bv8); - free requires (memory_load8_le(mem, 69694bv64) == 0bv8); - free requires (memory_load8_le(mem, 69695bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 1bv8); - free requires (memory_load8_le(mem, 69697bv64) == 0bv8); - free requires (memory_load8_le(mem, 69698bv64) == 0bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 2bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); + free requires (memory_load64_le(mem, 69680bv64) == 416611827717bv64); + free requires (memory_load64_le(mem, 69688bv64) == 68719476735bv64); + free requires (memory_load64_le(mem, 69696bv64) == 8589934593bv64); free requires (memory_load8_le(mem, 2048bv64) == 1bv8); free requires (memory_load8_le(mem, 2049bv64) == 0bv8); free requires (memory_load8_le(mem, 2050bv64) == 2bv8); free requires (memory_load8_le(mem, 2051bv64) == 0bv8); - free requires (memory_load8_le(mem, 69576bv64) == 64bv8); - free requires (memory_load8_le(mem, 69577bv64) == 16bv8); - free requires (memory_load8_le(mem, 69578bv64) == 1bv8); - free requires (memory_load8_le(mem, 69579bv64) == 0bv8); - free requires (memory_load8_le(mem, 69580bv64) == 0bv8); - free requires (memory_load8_le(mem, 69581bv64) == 0bv8); - free requires (memory_load8_le(mem, 69582bv64) == 0bv8); - free requires (memory_load8_le(mem, 69583bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); - free requires (memory_load8_le(mem, 69584bv64) == 52bv8); - free requires (memory_load8_le(mem, 69585bv64) == 16bv8); - free requires (memory_load8_le(mem, 69586bv64) == 1bv8); - free requires (memory_load8_le(mem, 69587bv64) == 0bv8); - free requires (memory_load8_le(mem, 69588bv64) == 0bv8); - free requires (memory_load8_le(mem, 69589bv64) == 0bv8); - free requires (memory_load8_le(mem, 69590bv64) == 0bv8); - free requires (memory_load8_le(mem, 69591bv64) == 0bv8); - free requires (memory_load8_le(mem, 69552bv64) == 56bv8); - free requires (memory_load8_le(mem, 69553bv64) == 16bv8); - free requires (memory_load8_le(mem, 69554bv64) == 1bv8); - free requires (memory_load8_le(mem, 69555bv64) == 0bv8); - free requires (memory_load8_le(mem, 69556bv64) == 0bv8); - free requires (memory_load8_le(mem, 69557bv64) == 0bv8); - free requires (memory_load8_le(mem, 69558bv64) == 0bv8); - free requires (memory_load8_le(mem, 69559bv64) == 0bv8); - free requires (memory_load8_le(mem, 69040bv64) == 64bv8); - free requires (memory_load8_le(mem, 69041bv64) == 7bv8); - free requires (memory_load8_le(mem, 69042bv64) == 0bv8); - free requires (memory_load8_le(mem, 69043bv64) == 0bv8); - free requires (memory_load8_le(mem, 69044bv64) == 0bv8); - free requires (memory_load8_le(mem, 69045bv64) == 0bv8); - free requires (memory_load8_le(mem, 69046bv64) == 0bv8); - free requires (memory_load8_le(mem, 69047bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 148bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69032bv64) == 144bv8); - free requires (memory_load8_le(mem, 69033bv64) == 7bv8); - free requires (memory_load8_le(mem, 69034bv64) == 0bv8); - free requires (memory_load8_le(mem, 69035bv64) == 0bv8); - free requires (memory_load8_le(mem, 69036bv64) == 0bv8); - free requires (memory_load8_le(mem, 69037bv64) == 0bv8); - free requires (memory_load8_le(mem, 69038bv64) == 0bv8); - free requires (memory_load8_le(mem, 69039bv64) == 0bv8); - free requires (memory_load8_le(mem, 69560bv64) == 48bv8); - free requires (memory_load8_le(mem, 69561bv64) == 16bv8); - free requires (memory_load8_le(mem, 69562bv64) == 1bv8); - free requires (memory_load8_le(mem, 69563bv64) == 0bv8); - free requires (memory_load8_le(mem, 69564bv64) == 0bv8); - free requires (memory_load8_le(mem, 69565bv64) == 0bv8); - free requires (memory_load8_le(mem, 69566bv64) == 0bv8); - free requires (memory_load8_le(mem, 69567bv64) == 0bv8); + free requires (memory_load64_le(mem, 69576bv64) == 69696bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); + free requires (memory_load64_le(mem, 69584bv64) == 69684bv64); + free requires (memory_load64_le(mem, 69552bv64) == 69688bv64); + free requires (memory_load64_le(mem, 69040bv64) == 1856bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1940bv64); + free requires (memory_load64_le(mem, 69032bv64) == 1936bv64); + free requires (memory_load64_le(mem, 69560bv64) == 69680bv64); ensures (memory_load32_le(mem, $x_addr) == 6bv32); ensures (memory_load32_le(mem, bvadd64($a_addr, 4bv64)) == 4bv32); ensures (memory_load32_le(mem, bvadd64($a_addr, 0bv64)) == 1bv32); @@ -282,70 +137,16 @@ procedure main() free ensures (memory_load8_le(mem, 2049bv64) == 0bv8); free ensures (memory_load8_le(mem, 2050bv64) == 2bv8); free ensures (memory_load8_le(mem, 2051bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69576bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69577bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69578bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69579bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69580bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69581bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69582bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69583bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69584bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69585bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69586bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69587bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69588bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69589bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69590bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69591bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69552bv64) == 56bv8); - free ensures (memory_load8_le(mem, 69553bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69554bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69555bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69556bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69557bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69558bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69559bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69040bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69041bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69042bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69043bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69044bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69045bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69046bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69047bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 148bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69032bv64) == 144bv8); - free ensures (memory_load8_le(mem, 69033bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69034bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69035bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69036bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69037bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69038bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69039bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69560bv64) == 48bv8); - free ensures (memory_load8_le(mem, 69561bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69562bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69563bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69564bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69565bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69566bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69567bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69576bv64) == 69696bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69584bv64) == 69684bv64); + free ensures (memory_load64_le(mem, 69552bv64) == 69688bv64); + free ensures (memory_load64_le(mem, 69040bv64) == 1856bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1940bv64); + free ensures (memory_load64_le(mem, 69032bv64) == 1936bv64); + free ensures (memory_load64_le(mem, 69560bv64) == 69680bv64); + +implementation main() { var #4: bv64; var CF: bv1; @@ -407,3 +208,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/initialisation/gcc/initialisation.expected b/src/test/correct/initialisation/gcc/initialisation.expected index cd8f95208..01a4e5c28 100644 --- a/src/test/correct/initialisation/gcc/initialisation.expected +++ b/src/test/correct/initialisation/gcc/initialisation.expected @@ -76,43 +76,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1957bv64) == 0bv8); free ensures (memory_load8_le(mem, 1958bv64) == 2bv8); free ensures (memory_load8_le(mem, 1959bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -123,84 +97,21 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free requires (memory_load8_le(mem, 69648bv64) == 5bv8); - free requires (memory_load8_le(mem, 69649bv64) == 0bv8); - free requires (memory_load8_le(mem, 69650bv64) == 0bv8); - free requires (memory_load8_le(mem, 69651bv64) == 0bv8); - free requires (memory_load8_le(mem, 69652bv64) == 97bv8); - free requires (memory_load8_le(mem, 69653bv64) == 0bv8); - free requires (memory_load8_le(mem, 69654bv64) == 0bv8); - free requires (memory_load8_le(mem, 69655bv64) == 0bv8); - free requires (memory_load8_le(mem, 69656bv64) == 255bv8); - free requires (memory_load8_le(mem, 69657bv64) == 255bv8); - free requires (memory_load8_le(mem, 69658bv64) == 255bv8); - free requires (memory_load8_le(mem, 69659bv64) == 255bv8); - free requires (memory_load8_le(mem, 69660bv64) == 15bv8); - free requires (memory_load8_le(mem, 69661bv64) == 0bv8); - free requires (memory_load8_le(mem, 69662bv64) == 0bv8); - free requires (memory_load8_le(mem, 69663bv64) == 0bv8); - free requires (memory_load8_le(mem, 69664bv64) == 1bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 2bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free requires (memory_load64_le(mem, 69648bv64) == 416611827717bv64); + free requires (memory_load64_le(mem, 69656bv64) == 68719476735bv64); + free requires (memory_load64_le(mem, 69664bv64) == 8589934593bv64); free requires (memory_load8_le(mem, 1956bv64) == 1bv8); free requires (memory_load8_le(mem, 1957bv64) == 0bv8); free requires (memory_load8_le(mem, 1958bv64) == 2bv8); free requires (memory_load8_le(mem, 1959bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); ensures (memory_load32_le(mem, $x_addr) == 6bv32); ensures (memory_load32_le(mem, bvadd64($a_addr, 4bv64)) == 4bv32); ensures (memory_load32_le(mem, bvadd64($a_addr, 0bv64)) == 1bv32); @@ -208,38 +119,12 @@ procedure main() free ensures (memory_load8_le(mem, 1957bv64) == 0bv8); free ensures (memory_load8_le(mem, 1958bv64) == 2bv8); free ensures (memory_load8_le(mem, 1959bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -291,3 +176,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/initialisation/gcc_O2/initialisation.expected b/src/test/correct/initialisation/gcc_O2/initialisation.expected index 0b0da4f5d..2e931610a 100644 --- a/src/test/correct/initialisation/gcc_O2/initialisation.expected +++ b/src/test/correct/initialisation/gcc_O2/initialisation.expected @@ -86,43 +86,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -133,7 +107,7 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R2, Gamma_R3, Gamma_R4, Gamma_R5, Gamma_R6, Gamma_mem, R0, R1, R2, R3, R4, R5, R6, mem; free requires (memory_load8_le(mem, 69632bv64) == 0bv8); free requires (memory_load8_le(mem, 69633bv64) == 0bv8); @@ -180,38 +154,10 @@ procedure main() free requires (memory_load8_le(mem, 1897bv64) == 0bv8); free requires (memory_load8_le(mem, 1898bv64) == 2bv8); free requires (memory_load8_le(mem, 1899bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 80bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 0bv8); - free requires (memory_load8_le(mem, 69025bv64) == 7bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 0bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1536bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); ensures (memory_load32_le(mem, $x_addr) == 6bv32); ensures (memory_load32_le(mem, bvadd64($a_addr, 4bv64)) == 4bv32); ensures (memory_load32_le(mem, bvadd64($a_addr, 0bv64)) == 1bv32); @@ -219,38 +165,12 @@ procedure main() free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -287,3 +207,4 @@ procedure main() assume {:captureState "%0000020a"} true; return; } + diff --git a/src/test/correct/initialisation/gcc_no_plt_no_pic/initialisation.expected b/src/test/correct/initialisation/gcc_no_plt_no_pic/initialisation.expected index 418adaae6..54d544e1d 100644 --- a/src/test/correct/initialisation/gcc_no_plt_no_pic/initialisation.expected +++ b/src/test/correct/initialisation/gcc_no_plt_no_pic/initialisation.expected @@ -76,43 +76,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1957bv64) == 0bv8); free ensures (memory_load8_le(mem, 1958bv64) == 2bv8); free ensures (memory_load8_le(mem, 1959bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -123,84 +97,21 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free requires (memory_load8_le(mem, 69648bv64) == 5bv8); - free requires (memory_load8_le(mem, 69649bv64) == 0bv8); - free requires (memory_load8_le(mem, 69650bv64) == 0bv8); - free requires (memory_load8_le(mem, 69651bv64) == 0bv8); - free requires (memory_load8_le(mem, 69652bv64) == 97bv8); - free requires (memory_load8_le(mem, 69653bv64) == 0bv8); - free requires (memory_load8_le(mem, 69654bv64) == 0bv8); - free requires (memory_load8_le(mem, 69655bv64) == 0bv8); - free requires (memory_load8_le(mem, 69656bv64) == 255bv8); - free requires (memory_load8_le(mem, 69657bv64) == 255bv8); - free requires (memory_load8_le(mem, 69658bv64) == 255bv8); - free requires (memory_load8_le(mem, 69659bv64) == 255bv8); - free requires (memory_load8_le(mem, 69660bv64) == 15bv8); - free requires (memory_load8_le(mem, 69661bv64) == 0bv8); - free requires (memory_load8_le(mem, 69662bv64) == 0bv8); - free requires (memory_load8_le(mem, 69663bv64) == 0bv8); - free requires (memory_load8_le(mem, 69664bv64) == 1bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 2bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free requires (memory_load64_le(mem, 69648bv64) == 416611827717bv64); + free requires (memory_load64_le(mem, 69656bv64) == 68719476735bv64); + free requires (memory_load64_le(mem, 69664bv64) == 8589934593bv64); free requires (memory_load8_le(mem, 1956bv64) == 1bv8); free requires (memory_load8_le(mem, 1957bv64) == 0bv8); free requires (memory_load8_le(mem, 1958bv64) == 2bv8); free requires (memory_load8_le(mem, 1959bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); ensures (memory_load32_le(mem, $x_addr) == 6bv32); ensures (memory_load32_le(mem, bvadd64($a_addr, 4bv64)) == 4bv32); ensures (memory_load32_le(mem, bvadd64($a_addr, 0bv64)) == 1bv32); @@ -208,38 +119,12 @@ procedure main() free ensures (memory_load8_le(mem, 1957bv64) == 0bv8); free ensures (memory_load8_le(mem, 1958bv64) == 2bv8); free ensures (memory_load8_le(mem, 1959bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -291,3 +176,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/initialisation/gcc_pic/initialisation.expected b/src/test/correct/initialisation/gcc_pic/initialisation.expected index 4f95961a3..36dbed728 100644 --- a/src/test/correct/initialisation/gcc_pic/initialisation.expected +++ b/src/test/correct/initialisation/gcc_pic/initialisation.expected @@ -76,75 +76,21 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 2085bv64) == 0bv8); free ensures (memory_load8_le(mem, 2086bv64) == 2bv8); free ensures (memory_load8_le(mem, 2087bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69608bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69609bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69610bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69611bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69612bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69613bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69614bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69615bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69576bv64) == 24bv8); - free ensures (memory_load8_le(mem, 69577bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69578bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69579bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69580bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69581bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69582bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69583bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 148bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69584bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69585bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69586bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69587bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69588bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69589bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69590bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69591bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69600bv64) == 32bv8); - free ensures (memory_load8_le(mem, 69601bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69602bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69603bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69604bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69605bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69606bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69607bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68984bv64) == 144bv8); - free ensures (memory_load8_le(mem, 68985bv64) == 7bv8); - free ensures (memory_load8_le(mem, 68986bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68987bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68988bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68989bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68990bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68991bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 64bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 7bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69608bv64) == 69652bv64); + free ensures (memory_load64_le(mem, 69576bv64) == 69656bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1940bv64); + free ensures (memory_load64_le(mem, 69584bv64) == 69648bv64); + free ensures (memory_load64_le(mem, 69600bv64) == 69664bv64); + free ensures (memory_load64_le(mem, 68984bv64) == 1936bv64); + free ensures (memory_load64_le(mem, 68992bv64) == 1856bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -155,116 +101,25 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free requires (memory_load8_le(mem, 69648bv64) == 5bv8); - free requires (memory_load8_le(mem, 69649bv64) == 0bv8); - free requires (memory_load8_le(mem, 69650bv64) == 0bv8); - free requires (memory_load8_le(mem, 69651bv64) == 0bv8); - free requires (memory_load8_le(mem, 69652bv64) == 97bv8); - free requires (memory_load8_le(mem, 69653bv64) == 0bv8); - free requires (memory_load8_le(mem, 69654bv64) == 0bv8); - free requires (memory_load8_le(mem, 69655bv64) == 0bv8); - free requires (memory_load8_le(mem, 69656bv64) == 255bv8); - free requires (memory_load8_le(mem, 69657bv64) == 255bv8); - free requires (memory_load8_le(mem, 69658bv64) == 255bv8); - free requires (memory_load8_le(mem, 69659bv64) == 255bv8); - free requires (memory_load8_le(mem, 69660bv64) == 15bv8); - free requires (memory_load8_le(mem, 69661bv64) == 0bv8); - free requires (memory_load8_le(mem, 69662bv64) == 0bv8); - free requires (memory_load8_le(mem, 69663bv64) == 0bv8); - free requires (memory_load8_le(mem, 69664bv64) == 1bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 2bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free requires (memory_load64_le(mem, 69648bv64) == 416611827717bv64); + free requires (memory_load64_le(mem, 69656bv64) == 68719476735bv64); + free requires (memory_load64_le(mem, 69664bv64) == 8589934593bv64); free requires (memory_load8_le(mem, 2084bv64) == 1bv8); free requires (memory_load8_le(mem, 2085bv64) == 0bv8); free requires (memory_load8_le(mem, 2086bv64) == 2bv8); free requires (memory_load8_le(mem, 2087bv64) == 0bv8); - free requires (memory_load8_le(mem, 69608bv64) == 20bv8); - free requires (memory_load8_le(mem, 69609bv64) == 16bv8); - free requires (memory_load8_le(mem, 69610bv64) == 1bv8); - free requires (memory_load8_le(mem, 69611bv64) == 0bv8); - free requires (memory_load8_le(mem, 69612bv64) == 0bv8); - free requires (memory_load8_le(mem, 69613bv64) == 0bv8); - free requires (memory_load8_le(mem, 69614bv64) == 0bv8); - free requires (memory_load8_le(mem, 69615bv64) == 0bv8); - free requires (memory_load8_le(mem, 69576bv64) == 24bv8); - free requires (memory_load8_le(mem, 69577bv64) == 16bv8); - free requires (memory_load8_le(mem, 69578bv64) == 1bv8); - free requires (memory_load8_le(mem, 69579bv64) == 0bv8); - free requires (memory_load8_le(mem, 69580bv64) == 0bv8); - free requires (memory_load8_le(mem, 69581bv64) == 0bv8); - free requires (memory_load8_le(mem, 69582bv64) == 0bv8); - free requires (memory_load8_le(mem, 69583bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 148bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69584bv64) == 16bv8); - free requires (memory_load8_le(mem, 69585bv64) == 16bv8); - free requires (memory_load8_le(mem, 69586bv64) == 1bv8); - free requires (memory_load8_le(mem, 69587bv64) == 0bv8); - free requires (memory_load8_le(mem, 69588bv64) == 0bv8); - free requires (memory_load8_le(mem, 69589bv64) == 0bv8); - free requires (memory_load8_le(mem, 69590bv64) == 0bv8); - free requires (memory_load8_le(mem, 69591bv64) == 0bv8); - free requires (memory_load8_le(mem, 69600bv64) == 32bv8); - free requires (memory_load8_le(mem, 69601bv64) == 16bv8); - free requires (memory_load8_le(mem, 69602bv64) == 1bv8); - free requires (memory_load8_le(mem, 69603bv64) == 0bv8); - free requires (memory_load8_le(mem, 69604bv64) == 0bv8); - free requires (memory_load8_le(mem, 69605bv64) == 0bv8); - free requires (memory_load8_le(mem, 69606bv64) == 0bv8); - free requires (memory_load8_le(mem, 69607bv64) == 0bv8); - free requires (memory_load8_le(mem, 68984bv64) == 144bv8); - free requires (memory_load8_le(mem, 68985bv64) == 7bv8); - free requires (memory_load8_le(mem, 68986bv64) == 0bv8); - free requires (memory_load8_le(mem, 68987bv64) == 0bv8); - free requires (memory_load8_le(mem, 68988bv64) == 0bv8); - free requires (memory_load8_le(mem, 68989bv64) == 0bv8); - free requires (memory_load8_le(mem, 68990bv64) == 0bv8); - free requires (memory_load8_le(mem, 68991bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 64bv8); - free requires (memory_load8_le(mem, 68993bv64) == 7bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); + free requires (memory_load64_le(mem, 69608bv64) == 69652bv64); + free requires (memory_load64_le(mem, 69576bv64) == 69656bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1940bv64); + free requires (memory_load64_le(mem, 69584bv64) == 69648bv64); + free requires (memory_load64_le(mem, 69600bv64) == 69664bv64); + free requires (memory_load64_le(mem, 68984bv64) == 1936bv64); + free requires (memory_load64_le(mem, 68992bv64) == 1856bv64); ensures (memory_load32_le(mem, $x_addr) == 6bv32); ensures (memory_load32_le(mem, bvadd64($a_addr, 4bv64)) == 4bv32); ensures (memory_load32_le(mem, bvadd64($a_addr, 0bv64)) == 1bv32); @@ -272,70 +127,16 @@ procedure main() free ensures (memory_load8_le(mem, 2085bv64) == 0bv8); free ensures (memory_load8_le(mem, 2086bv64) == 2bv8); free ensures (memory_load8_le(mem, 2087bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69608bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69609bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69610bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69611bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69612bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69613bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69614bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69615bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69576bv64) == 24bv8); - free ensures (memory_load8_le(mem, 69577bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69578bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69579bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69580bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69581bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69582bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69583bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 148bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69584bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69585bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69586bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69587bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69588bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69589bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69590bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69591bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69600bv64) == 32bv8); - free ensures (memory_load8_le(mem, 69601bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69602bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69603bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69604bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69605bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69606bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69607bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68984bv64) == 144bv8); - free ensures (memory_load8_le(mem, 68985bv64) == 7bv8); - free ensures (memory_load8_le(mem, 68986bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68987bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68988bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68989bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68990bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68991bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 64bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 7bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69608bv64) == 69652bv64); + free ensures (memory_load64_le(mem, 69576bv64) == 69656bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1940bv64); + free ensures (memory_load64_le(mem, 69584bv64) == 69648bv64); + free ensures (memory_load64_le(mem, 69600bv64) == 69664bv64); + free ensures (memory_load64_le(mem, 68984bv64) == 1936bv64); + free ensures (memory_load64_le(mem, 68992bv64) == 1856bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -395,3 +196,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/jumptable/clang_O2/jumptable.expected b/src/test/correct/jumptable/clang_O2/jumptable.expected index 8de643ece..56e298df9 100644 --- a/src/test/correct/jumptable/clang_O2/jumptable.expected +++ b/src/test/correct/jumptable/clang_O2/jumptable.expected @@ -28,6 +28,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -45,43 +49,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1917bv64) == 0bv8); free ensures (memory_load8_le(mem, 1918bv64) == 2bv8); free ensures (memory_load8_le(mem, 1919bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -92,7 +70,7 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R8, Gamma_R9, Gamma_mem, R0, R8, R9, mem; free requires (memory_load8_le(mem, 69664bv64) == 0bv8); free requires (memory_load8_le(mem, 69665bv64) == 0bv8); @@ -118,74 +96,20 @@ procedure main() free requires (memory_load8_le(mem, 1917bv64) == 0bv8); free requires (memory_load8_le(mem, 1918bv64) == 2bv8); free requires (memory_load8_le(mem, 1919bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 80bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (memory_load8_le(mem, 1916bv64) == 1bv8); free ensures (memory_load8_le(mem, 1917bv64) == 0bv8); free ensures (memory_load8_le(mem, 1918bv64) == 2bv8); free ensures (memory_load8_le(mem, 1919bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -200,3 +124,4 @@ procedure main() assume {:captureState "%00000378"} true; return; } + diff --git a/src/test/correct/jumptable/gcc_O2/jumptable.expected b/src/test/correct/jumptable/gcc_O2/jumptable.expected index 0b02b32d3..e5a14e88e 100644 --- a/src/test/correct/jumptable/gcc_O2/jumptable.expected +++ b/src/test/correct/jumptable/gcc_O2/jumptable.expected @@ -67,43 +67,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1977bv64) == 0bv8); free ensures (memory_load8_le(mem, 1978bv64) == 2bv8); free ensures (memory_load8_le(mem, 1979bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -114,80 +88,26 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure add_six() +procedure add_six(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; free requires (memory_load8_le(mem, 1976bv64) == 1bv8); free requires (memory_load8_le(mem, 1977bv64) == 0bv8); free requires (memory_load8_le(mem, 1978bv64) == 2bv8); free requires (memory_load8_le(mem, 1979bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 80bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 0bv8); - free requires (memory_load8_le(mem, 69025bv64) == 7bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 0bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1536bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1976bv64) == 1bv8); free ensures (memory_load8_le(mem, 1977bv64) == 0bv8); free ensures (memory_load8_le(mem, 1978bv64) == 2bv8); free ensures (memory_load8_le(mem, 1979bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation add_six() { ladd_six: assume {:captureState "ladd_six"} true; @@ -202,80 +122,26 @@ procedure add_six() return; } -procedure add_two() +procedure add_two(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; free requires (memory_load8_le(mem, 1976bv64) == 1bv8); free requires (memory_load8_le(mem, 1977bv64) == 0bv8); free requires (memory_load8_le(mem, 1978bv64) == 2bv8); free requires (memory_load8_le(mem, 1979bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 80bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 0bv8); - free requires (memory_load8_le(mem, 69025bv64) == 7bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 0bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1536bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1976bv64) == 1bv8); free ensures (memory_load8_le(mem, 1977bv64) == 0bv8); free ensures (memory_load8_le(mem, 1978bv64) == 2bv8); free ensures (memory_load8_le(mem, 1979bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation add_two() { ladd_two: assume {:captureState "ladd_two"} true; @@ -290,7 +156,7 @@ procedure add_two() return; } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R29, R30, R31, mem, stack; free requires (memory_load8_le(mem, 69632bv64) == 0bv8); free requires (memory_load8_le(mem, 69633bv64) == 0bv8); @@ -316,38 +182,10 @@ procedure main() free requires (memory_load8_le(mem, 1977bv64) == 0bv8); free requires (memory_load8_le(mem, 1978bv64) == 2bv8); free requires (memory_load8_le(mem, 1979bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 80bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 0bv8); - free requires (memory_load8_le(mem, 69025bv64) == 7bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 0bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1536bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -356,38 +194,12 @@ procedure main() free ensures (memory_load8_le(mem, 1977bv64) == 0bv8); free ensures (memory_load8_le(mem, 1978bv64) == 2bv8); free ensures (memory_load8_le(mem, 1979bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #1: bv64; var Gamma_#1: bool; @@ -422,80 +234,26 @@ procedure main() return; } -procedure sub_seven() +procedure sub_seven(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; free requires (memory_load8_le(mem, 1976bv64) == 1bv8); free requires (memory_load8_le(mem, 1977bv64) == 0bv8); free requires (memory_load8_le(mem, 1978bv64) == 2bv8); free requires (memory_load8_le(mem, 1979bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 80bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 0bv8); - free requires (memory_load8_le(mem, 69025bv64) == 7bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 0bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1536bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1976bv64) == 1bv8); free ensures (memory_load8_le(mem, 1977bv64) == 0bv8); free ensures (memory_load8_le(mem, 1978bv64) == 2bv8); free ensures (memory_load8_le(mem, 1979bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation sub_seven() { lsub_seven: assume {:captureState "lsub_seven"} true; @@ -509,3 +267,4 @@ procedure sub_seven() assume {:captureState "%00000275"} true; return; } + diff --git a/src/test/correct/jumptable3/gcc/jumptable3.expected b/src/test/correct/jumptable3/gcc/jumptable3.expected index c0d970237..48aac8bf5 100644 --- a/src/test/correct/jumptable3/gcc/jumptable3.expected +++ b/src/test/correct/jumptable3/gcc/jumptable3.expected @@ -71,43 +71,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 2357bv64) == 0bv8); free ensures (memory_load8_le(mem, 2358bv64) == 2bv8); free ensures (memory_load8_le(mem, 2359bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1920bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -118,80 +92,26 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure add_six() +procedure add_six(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; free requires (memory_load8_le(mem, 2356bv64) == 1bv8); free requires (memory_load8_le(mem, 2357bv64) == 0bv8); free requires (memory_load8_le(mem, 2358bv64) == 2bv8); free requires (memory_load8_le(mem, 2359bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 128bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1920bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2356bv64) == 1bv8); free ensures (memory_load8_le(mem, 2357bv64) == 0bv8); free ensures (memory_load8_le(mem, 2358bv64) == 2bv8); free ensures (memory_load8_le(mem, 2359bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1920bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation add_six() { ladd_six: assume {:captureState "ladd_six"} true; @@ -209,80 +129,26 @@ procedure add_six() return; } -procedure add_two() +procedure add_two(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; free requires (memory_load8_le(mem, 2356bv64) == 1bv8); free requires (memory_load8_le(mem, 2357bv64) == 0bv8); free requires (memory_load8_le(mem, 2358bv64) == 2bv8); free requires (memory_load8_le(mem, 2359bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 128bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1920bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2356bv64) == 1bv8); free ensures (memory_load8_le(mem, 2357bv64) == 0bv8); free ensures (memory_load8_le(mem, 2358bv64) == 2bv8); free ensures (memory_load8_le(mem, 2359bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1920bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation add_two() { ladd_two: assume {:captureState "ladd_two"} true; @@ -300,7 +166,7 @@ procedure add_two() return; } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R29, R30, R31, mem, stack; requires (Gamma_R0 == true); free requires (memory_load8_le(mem, 69632bv64) == 0bv8); @@ -327,38 +193,10 @@ procedure main() free requires (memory_load8_le(mem, 2357bv64) == 0bv8); free requires (memory_load8_le(mem, 2358bv64) == 2bv8); free requires (memory_load8_le(mem, 2359bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 128bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1920bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -367,38 +205,12 @@ procedure main() free ensures (memory_load8_le(mem, 2357bv64) == 0bv8); free ensures (memory_load8_le(mem, 2358bv64) == 2bv8); free ensures (memory_load8_le(mem, 2359bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1920bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #10: bv32; var #11: bv32; @@ -999,80 +811,26 @@ procedure main() goto l000009a1; } -procedure sub_seven() +procedure sub_seven(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; free requires (memory_load8_le(mem, 2356bv64) == 1bv8); free requires (memory_load8_le(mem, 2357bv64) == 0bv8); free requires (memory_load8_le(mem, 2358bv64) == 2bv8); free requires (memory_load8_le(mem, 2359bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 128bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1920bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2356bv64) == 1bv8); free ensures (memory_load8_le(mem, 2357bv64) == 0bv8); free ensures (memory_load8_le(mem, 2358bv64) == 2bv8); free ensures (memory_load8_le(mem, 2359bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1920bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation sub_seven() { lsub_seven: assume {:captureState "lsub_seven"} true; @@ -1089,3 +847,4 @@ procedure sub_seven() assume {:captureState "%00000543"} true; return; } + diff --git a/src/test/correct/jumptable3/gcc_O2/jumptable3.expected b/src/test/correct/jumptable3/gcc_O2/jumptable3.expected index 27d281ba8..be4f9228a 100644 --- a/src/test/correct/jumptable3/gcc_O2/jumptable3.expected +++ b/src/test/correct/jumptable3/gcc_O2/jumptable3.expected @@ -28,6 +28,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -47,43 +51,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 2233bv64) == 0bv8); free ensures (memory_load8_le(mem, 2234bv64) == 2bv8); free ensures (memory_load8_le(mem, 2235bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 2128bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 2048bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -94,7 +72,7 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; requires (Gamma_R0 == true); free requires (memory_load8_le(mem, 69632bv64) == 0bv8); @@ -121,74 +99,20 @@ procedure main() free requires (memory_load8_le(mem, 2233bv64) == 0bv8); free requires (memory_load8_le(mem, 2234bv64) == 2bv8); free requires (memory_load8_le(mem, 2235bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 80bv8); - free requires (memory_load8_le(mem, 69017bv64) == 8bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 0bv8); - free requires (memory_load8_le(mem, 69025bv64) == 8bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 0bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 2128bv64); + free requires (memory_load64_le(mem, 69024bv64) == 2048bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1536bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2232bv64) == 1bv8); free ensures (memory_load8_le(mem, 2233bv64) == 0bv8); free ensures (memory_load8_le(mem, 2234bv64) == 2bv8); free ensures (memory_load8_le(mem, 2235bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 2128bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 2048bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #1: bv32; var #10: bv32; @@ -570,3 +494,4 @@ procedure main() assume (bvnot1(bvcomp32(R0[32:0], 0bv32)) == 0bv1); goto l000005a3; } + diff --git a/src/test/correct/jumptable3/gcc_no_plt_no_pic/jumptable3.expected b/src/test/correct/jumptable3/gcc_no_plt_no_pic/jumptable3.expected index 75b244d38..d3074e769 100644 --- a/src/test/correct/jumptable3/gcc_no_plt_no_pic/jumptable3.expected +++ b/src/test/correct/jumptable3/gcc_no_plt_no_pic/jumptable3.expected @@ -71,43 +71,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 2357bv64) == 0bv8); free ensures (memory_load8_le(mem, 2358bv64) == 2bv8); free ensures (memory_load8_le(mem, 2359bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1920bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -118,80 +92,26 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure add_six() +procedure add_six(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; free requires (memory_load8_le(mem, 2356bv64) == 1bv8); free requires (memory_load8_le(mem, 2357bv64) == 0bv8); free requires (memory_load8_le(mem, 2358bv64) == 2bv8); free requires (memory_load8_le(mem, 2359bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 128bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1920bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2356bv64) == 1bv8); free ensures (memory_load8_le(mem, 2357bv64) == 0bv8); free ensures (memory_load8_le(mem, 2358bv64) == 2bv8); free ensures (memory_load8_le(mem, 2359bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1920bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation add_six() { ladd_six: assume {:captureState "ladd_six"} true; @@ -209,80 +129,26 @@ procedure add_six() return; } -procedure add_two() +procedure add_two(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; free requires (memory_load8_le(mem, 2356bv64) == 1bv8); free requires (memory_load8_le(mem, 2357bv64) == 0bv8); free requires (memory_load8_le(mem, 2358bv64) == 2bv8); free requires (memory_load8_le(mem, 2359bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 128bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1920bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2356bv64) == 1bv8); free ensures (memory_load8_le(mem, 2357bv64) == 0bv8); free ensures (memory_load8_le(mem, 2358bv64) == 2bv8); free ensures (memory_load8_le(mem, 2359bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1920bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation add_two() { ladd_two: assume {:captureState "ladd_two"} true; @@ -300,7 +166,7 @@ procedure add_two() return; } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R29, R30, R31, mem, stack; requires (Gamma_R0 == true); free requires (memory_load8_le(mem, 69632bv64) == 0bv8); @@ -327,38 +193,10 @@ procedure main() free requires (memory_load8_le(mem, 2357bv64) == 0bv8); free requires (memory_load8_le(mem, 2358bv64) == 2bv8); free requires (memory_load8_le(mem, 2359bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 128bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1920bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -367,38 +205,12 @@ procedure main() free ensures (memory_load8_le(mem, 2357bv64) == 0bv8); free ensures (memory_load8_le(mem, 2358bv64) == 2bv8); free ensures (memory_load8_le(mem, 2359bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1920bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #10: bv32; var #11: bv32; @@ -999,80 +811,26 @@ procedure main() goto l000016fc; } -procedure sub_seven() +procedure sub_seven(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; free requires (memory_load8_le(mem, 2356bv64) == 1bv8); free requires (memory_load8_le(mem, 2357bv64) == 0bv8); free requires (memory_load8_le(mem, 2358bv64) == 2bv8); free requires (memory_load8_le(mem, 2359bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 128bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1920bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2356bv64) == 1bv8); free ensures (memory_load8_le(mem, 2357bv64) == 0bv8); free ensures (memory_load8_le(mem, 2358bv64) == 2bv8); free ensures (memory_load8_le(mem, 2359bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1920bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation sub_seven() { lsub_seven: assume {:captureState "lsub_seven"} true; @@ -1089,3 +847,4 @@ procedure sub_seven() assume {:captureState "%0000129e"} true; return; } + diff --git a/src/test/correct/jumptable3/gcc_pic/jumptable3.expected b/src/test/correct/jumptable3/gcc_pic/jumptable3.expected index f0bff08a8..1a665e115 100644 --- a/src/test/correct/jumptable3/gcc_pic/jumptable3.expected +++ b/src/test/correct/jumptable3/gcc_pic/jumptable3.expected @@ -71,51 +71,18 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 2421bv64) == 0bv8); free ensures (memory_load8_le(mem, 2422bv64) == 2bv8); free ensures (memory_load8_le(mem, 2423bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69600bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69601bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69602bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69603bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69604bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69605bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69606bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69607bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69600bv64) == 69648bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1872bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -126,96 +93,28 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure add_six() +procedure add_six(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; free requires (memory_load8_le(mem, 2420bv64) == 1bv8); free requires (memory_load8_le(mem, 2421bv64) == 0bv8); free requires (memory_load8_le(mem, 2422bv64) == 2bv8); free requires (memory_load8_le(mem, 2423bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 192bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 0bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69600bv64) == 16bv8); - free requires (memory_load8_le(mem, 69601bv64) == 16bv8); - free requires (memory_load8_le(mem, 69602bv64) == 1bv8); - free requires (memory_load8_le(mem, 69603bv64) == 0bv8); - free requires (memory_load8_le(mem, 69604bv64) == 0bv8); - free requires (memory_load8_le(mem, 69605bv64) == 0bv8); - free requires (memory_load8_le(mem, 69606bv64) == 0bv8); - free requires (memory_load8_le(mem, 69607bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 80bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69016bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69600bv64) == 69648bv64); + free requires (memory_load64_le(mem, 69008bv64) == 1872bv64); free ensures (memory_load8_le(mem, 2420bv64) == 1bv8); free ensures (memory_load8_le(mem, 2421bv64) == 0bv8); free ensures (memory_load8_le(mem, 2422bv64) == 2bv8); free ensures (memory_load8_le(mem, 2423bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69600bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69601bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69602bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69603bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69604bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69605bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69606bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69607bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69600bv64) == 69648bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1872bv64); + +implementation add_six() { ladd_six: assume {:captureState "ladd_six"} true; @@ -235,96 +134,28 @@ procedure add_six() return; } -procedure add_two() +procedure add_two(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; free requires (memory_load8_le(mem, 2420bv64) == 1bv8); free requires (memory_load8_le(mem, 2421bv64) == 0bv8); free requires (memory_load8_le(mem, 2422bv64) == 2bv8); free requires (memory_load8_le(mem, 2423bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 192bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 0bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69600bv64) == 16bv8); - free requires (memory_load8_le(mem, 69601bv64) == 16bv8); - free requires (memory_load8_le(mem, 69602bv64) == 1bv8); - free requires (memory_load8_le(mem, 69603bv64) == 0bv8); - free requires (memory_load8_le(mem, 69604bv64) == 0bv8); - free requires (memory_load8_le(mem, 69605bv64) == 0bv8); - free requires (memory_load8_le(mem, 69606bv64) == 0bv8); - free requires (memory_load8_le(mem, 69607bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 80bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69016bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69600bv64) == 69648bv64); + free requires (memory_load64_le(mem, 69008bv64) == 1872bv64); free ensures (memory_load8_le(mem, 2420bv64) == 1bv8); free ensures (memory_load8_le(mem, 2421bv64) == 0bv8); free ensures (memory_load8_le(mem, 2422bv64) == 2bv8); free ensures (memory_load8_le(mem, 2423bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69600bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69601bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69602bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69603bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69604bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69605bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69606bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69607bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69600bv64) == 69648bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1872bv64); + +implementation add_two() { ladd_two: assume {:captureState "ladd_two"} true; @@ -344,7 +175,7 @@ procedure add_two() return; } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R29, R30, R31, mem, stack; requires (Gamma_R0 == true); free requires (memory_load8_le(mem, 69632bv64) == 0bv8); @@ -371,46 +202,11 @@ procedure main() free requires (memory_load8_le(mem, 2421bv64) == 0bv8); free requires (memory_load8_le(mem, 2422bv64) == 2bv8); free requires (memory_load8_le(mem, 2423bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 192bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 0bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69600bv64) == 16bv8); - free requires (memory_load8_le(mem, 69601bv64) == 16bv8); - free requires (memory_load8_le(mem, 69602bv64) == 1bv8); - free requires (memory_load8_le(mem, 69603bv64) == 0bv8); - free requires (memory_load8_le(mem, 69604bv64) == 0bv8); - free requires (memory_load8_le(mem, 69605bv64) == 0bv8); - free requires (memory_load8_le(mem, 69606bv64) == 0bv8); - free requires (memory_load8_le(mem, 69607bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 80bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69016bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69600bv64) == 69648bv64); + free requires (memory_load64_le(mem, 69008bv64) == 1872bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -419,46 +215,13 @@ procedure main() free ensures (memory_load8_le(mem, 2421bv64) == 0bv8); free ensures (memory_load8_le(mem, 2422bv64) == 2bv8); free ensures (memory_load8_le(mem, 2423bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69600bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69601bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69602bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69603bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69604bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69605bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69606bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69607bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69600bv64) == 69648bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1872bv64); + +implementation main() { var #10: bv32; var #11: bv32; @@ -1060,96 +823,28 @@ procedure main() goto l000009a8; } -procedure sub_seven() +procedure sub_seven(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; free requires (memory_load8_le(mem, 2420bv64) == 1bv8); free requires (memory_load8_le(mem, 2421bv64) == 0bv8); free requires (memory_load8_le(mem, 2422bv64) == 2bv8); free requires (memory_load8_le(mem, 2423bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 192bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 0bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69600bv64) == 16bv8); - free requires (memory_load8_le(mem, 69601bv64) == 16bv8); - free requires (memory_load8_le(mem, 69602bv64) == 1bv8); - free requires (memory_load8_le(mem, 69603bv64) == 0bv8); - free requires (memory_load8_le(mem, 69604bv64) == 0bv8); - free requires (memory_load8_le(mem, 69605bv64) == 0bv8); - free requires (memory_load8_le(mem, 69606bv64) == 0bv8); - free requires (memory_load8_le(mem, 69607bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 80bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69016bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69600bv64) == 69648bv64); + free requires (memory_load64_le(mem, 69008bv64) == 1872bv64); free ensures (memory_load8_le(mem, 2420bv64) == 1bv8); free ensures (memory_load8_le(mem, 2421bv64) == 0bv8); free ensures (memory_load8_le(mem, 2422bv64) == 2bv8); free ensures (memory_load8_le(mem, 2423bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69600bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69601bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69602bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69603bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69604bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69605bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69606bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69607bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69600bv64) == 69648bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1872bv64); + +implementation sub_seven() { lsub_seven: assume {:captureState "lsub_seven"} true; @@ -1168,3 +863,4 @@ procedure sub_seven() assume {:captureState "%00000549"} true; return; } + diff --git a/src/test/correct/malloc_with_local/clang/malloc_with_local.expected b/src/test/correct/malloc_with_local/clang/malloc_with_local.expected index ecaf1a185..01185a1df 100644 --- a/src/test/correct/malloc_with_local/clang/malloc_with_local.expected +++ b/src/test/correct/malloc_with_local/clang/malloc_with_local.expected @@ -81,107 +81,25 @@ procedure {:extern} rely(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); - free ensures (memory_load8_le(mem, 2256bv64) == 1bv8); - free ensures (memory_load8_le(mem, 2257bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2258bv64) == 2bv8); - free ensures (memory_load8_le(mem, 2259bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2260bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2261bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2262bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2263bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2264bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2265bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2266bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2267bv64) == 114bv8); - free ensures (memory_load8_le(mem, 2268bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2269bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2270bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2271bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2272bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2273bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2274bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2275bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2276bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2277bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2278bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2279bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2280bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2281bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2282bv64) == 110bv8); - free ensures (memory_load8_le(mem, 2283bv64) == 116bv8); - free ensures (memory_load8_le(mem, 2284bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2285bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2286bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2287bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2288bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2289bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2290bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2291bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2292bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2293bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2294bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2295bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2296bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2297bv64) == 108bv8); - free ensures (memory_load8_le(mem, 2298bv64) == 111bv8); - free ensures (memory_load8_le(mem, 2299bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2300bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2301bv64) == 108bv8); - free ensures (memory_load8_le(mem, 2302bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2303bv64) == 118bv8); - free ensures (memory_load8_le(mem, 2304bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2305bv64) == 114bv8); - free ensures (memory_load8_le(mem, 2306bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2307bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2308bv64) == 98bv8); - free ensures (memory_load8_le(mem, 2309bv64) == 108bv8); - free ensures (memory_load8_le(mem, 2310bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2311bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2312bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2313bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2314bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2315bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2316bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2317bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2318bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2319bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 2256bv64) == 2334386691848142849bv64); + free ensures (memory_load64_le(mem, 2264bv64) == 4211825664600402019bv64); + free ensures (memory_load64_le(mem, 2272bv64) == 7307182754559632672bv64); + free ensures (memory_load64_le(mem, 2280bv64) == 4211825664634808608bv64); + free ensures (memory_load64_le(mem, 2288bv64) == 7307182754559698208bv64); + free ensures (memory_load64_le(mem, 2296bv64) == 8511922461266111520bv64); + free ensures (memory_load64_le(mem, 2304bv64) == 2334391151658365537bv64); + free ensures (memory_load64_le(mem, 2312bv64) == 2924860384375657bv64); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -194,413 +112,65 @@ procedure {:extern} guarantee_reflexive(); procedure #free(); modifies Gamma_R16, Gamma_R17, R16, R17; - free requires (memory_load8_le(mem, 2256bv64) == 1bv8); - free requires (memory_load8_le(mem, 2257bv64) == 0bv8); - free requires (memory_load8_le(mem, 2258bv64) == 2bv8); - free requires (memory_load8_le(mem, 2259bv64) == 0bv8); - free requires (memory_load8_le(mem, 2260bv64) == 84bv8); - free requires (memory_load8_le(mem, 2261bv64) == 104bv8); - free requires (memory_load8_le(mem, 2262bv64) == 101bv8); - free requires (memory_load8_le(mem, 2263bv64) == 32bv8); - free requires (memory_load8_le(mem, 2264bv64) == 99bv8); - free requires (memory_load8_le(mem, 2265bv64) == 104bv8); - free requires (memory_load8_le(mem, 2266bv64) == 97bv8); - free requires (memory_load8_le(mem, 2267bv64) == 114bv8); - free requires (memory_load8_le(mem, 2268bv64) == 32bv8); - free requires (memory_load8_le(mem, 2269bv64) == 105bv8); - free requires (memory_load8_le(mem, 2270bv64) == 115bv8); - free requires (memory_load8_le(mem, 2271bv64) == 58bv8); - free requires (memory_load8_le(mem, 2272bv64) == 32bv8); - free requires (memory_load8_le(mem, 2273bv64) == 37bv8); - free requires (memory_load8_le(mem, 2274bv64) == 99bv8); - free requires (memory_load8_le(mem, 2275bv64) == 10bv8); - free requires (memory_load8_le(mem, 2276bv64) == 0bv8); - free requires (memory_load8_le(mem, 2277bv64) == 84bv8); - free requires (memory_load8_le(mem, 2278bv64) == 104bv8); - free requires (memory_load8_le(mem, 2279bv64) == 101bv8); - free requires (memory_load8_le(mem, 2280bv64) == 32bv8); - free requires (memory_load8_le(mem, 2281bv64) == 105bv8); - free requires (memory_load8_le(mem, 2282bv64) == 110bv8); - free requires (memory_load8_le(mem, 2283bv64) == 116bv8); - free requires (memory_load8_le(mem, 2284bv64) == 32bv8); - free requires (memory_load8_le(mem, 2285bv64) == 105bv8); - free requires (memory_load8_le(mem, 2286bv64) == 115bv8); - free requires (memory_load8_le(mem, 2287bv64) == 58bv8); - free requires (memory_load8_le(mem, 2288bv64) == 32bv8); - free requires (memory_load8_le(mem, 2289bv64) == 37bv8); - free requires (memory_load8_le(mem, 2290bv64) == 100bv8); - free requires (memory_load8_le(mem, 2291bv64) == 10bv8); - free requires (memory_load8_le(mem, 2292bv64) == 0bv8); - free requires (memory_load8_le(mem, 2293bv64) == 84bv8); - free requires (memory_load8_le(mem, 2294bv64) == 104bv8); - free requires (memory_load8_le(mem, 2295bv64) == 101bv8); - free requires (memory_load8_le(mem, 2296bv64) == 32bv8); - free requires (memory_load8_le(mem, 2297bv64) == 108bv8); - free requires (memory_load8_le(mem, 2298bv64) == 111bv8); - free requires (memory_load8_le(mem, 2299bv64) == 99bv8); - free requires (memory_load8_le(mem, 2300bv64) == 97bv8); - free requires (memory_load8_le(mem, 2301bv64) == 108bv8); - free requires (memory_load8_le(mem, 2302bv64) == 32bv8); - free requires (memory_load8_le(mem, 2303bv64) == 118bv8); - free requires (memory_load8_le(mem, 2304bv64) == 97bv8); - free requires (memory_load8_le(mem, 2305bv64) == 114bv8); - free requires (memory_load8_le(mem, 2306bv64) == 105bv8); - free requires (memory_load8_le(mem, 2307bv64) == 97bv8); - free requires (memory_load8_le(mem, 2308bv64) == 98bv8); - free requires (memory_load8_le(mem, 2309bv64) == 108bv8); - free requires (memory_load8_le(mem, 2310bv64) == 101bv8); - free requires (memory_load8_le(mem, 2311bv64) == 32bv8); - free requires (memory_load8_le(mem, 2312bv64) == 105bv8); - free requires (memory_load8_le(mem, 2313bv64) == 115bv8); - free requires (memory_load8_le(mem, 2314bv64) == 58bv8); - free requires (memory_load8_le(mem, 2315bv64) == 32bv8); - free requires (memory_load8_le(mem, 2316bv64) == 37bv8); - free requires (memory_load8_le(mem, 2317bv64) == 100bv8); - free requires (memory_load8_le(mem, 2318bv64) == 10bv8); - free requires (memory_load8_le(mem, 2319bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 8bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 8bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2256bv64) == 1bv8); - free ensures (memory_load8_le(mem, 2257bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2258bv64) == 2bv8); - free ensures (memory_load8_le(mem, 2259bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2260bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2261bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2262bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2263bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2264bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2265bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2266bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2267bv64) == 114bv8); - free ensures (memory_load8_le(mem, 2268bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2269bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2270bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2271bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2272bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2273bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2274bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2275bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2276bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2277bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2278bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2279bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2280bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2281bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2282bv64) == 110bv8); - free ensures (memory_load8_le(mem, 2283bv64) == 116bv8); - free ensures (memory_load8_le(mem, 2284bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2285bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2286bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2287bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2288bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2289bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2290bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2291bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2292bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2293bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2294bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2295bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2296bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2297bv64) == 108bv8); - free ensures (memory_load8_le(mem, 2298bv64) == 111bv8); - free ensures (memory_load8_le(mem, 2299bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2300bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2301bv64) == 108bv8); - free ensures (memory_load8_le(mem, 2302bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2303bv64) == 118bv8); - free ensures (memory_load8_le(mem, 2304bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2305bv64) == 114bv8); - free ensures (memory_load8_le(mem, 2306bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2307bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2308bv64) == 98bv8); - free ensures (memory_load8_le(mem, 2309bv64) == 108bv8); - free ensures (memory_load8_le(mem, 2310bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2311bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2312bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2313bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2314bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2315bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2316bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2317bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2318bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2319bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 2256bv64) == 2334386691848142849bv64); + free requires (memory_load64_le(mem, 2264bv64) == 4211825664600402019bv64); + free requires (memory_load64_le(mem, 2272bv64) == 7307182754559632672bv64); + free requires (memory_load64_le(mem, 2280bv64) == 4211825664634808608bv64); + free requires (memory_load64_le(mem, 2288bv64) == 7307182754559698208bv64); + free requires (memory_load64_le(mem, 2296bv64) == 8511922461266111520bv64); + free requires (memory_load64_le(mem, 2304bv64) == 2334391151658365537bv64); + free requires (memory_load64_le(mem, 2312bv64) == 2924860384375657bv64); + free requires (memory_load64_le(mem, 69064bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); + free ensures (memory_load64_le(mem, 2256bv64) == 2334386691848142849bv64); + free ensures (memory_load64_le(mem, 2264bv64) == 4211825664600402019bv64); + free ensures (memory_load64_le(mem, 2272bv64) == 7307182754559632672bv64); + free ensures (memory_load64_le(mem, 2280bv64) == 4211825664634808608bv64); + free ensures (memory_load64_le(mem, 2288bv64) == 7307182754559698208bv64); + free ensures (memory_load64_le(mem, 2296bv64) == 8511922461266111520bv64); + free ensures (memory_load64_le(mem, 2304bv64) == 2334391151658365537bv64); + free ensures (memory_load64_le(mem, 2312bv64) == 2924860384375657bv64); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R16, Gamma_R17, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R1, R16, R17, R29, R30, R31, R8, R9, mem, stack; - free requires (memory_load8_le(mem, 69688bv64) == 0bv8); - free requires (memory_load8_le(mem, 69689bv64) == 0bv8); - free requires (memory_load8_le(mem, 69690bv64) == 0bv8); - free requires (memory_load8_le(mem, 69691bv64) == 0bv8); - free requires (memory_load8_le(mem, 69692bv64) == 0bv8); - free requires (memory_load8_le(mem, 69693bv64) == 0bv8); - free requires (memory_load8_le(mem, 69694bv64) == 0bv8); - free requires (memory_load8_le(mem, 69695bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); - free requires (memory_load8_le(mem, 2256bv64) == 1bv8); - free requires (memory_load8_le(mem, 2257bv64) == 0bv8); - free requires (memory_load8_le(mem, 2258bv64) == 2bv8); - free requires (memory_load8_le(mem, 2259bv64) == 0bv8); - free requires (memory_load8_le(mem, 2260bv64) == 84bv8); - free requires (memory_load8_le(mem, 2261bv64) == 104bv8); - free requires (memory_load8_le(mem, 2262bv64) == 101bv8); - free requires (memory_load8_le(mem, 2263bv64) == 32bv8); - free requires (memory_load8_le(mem, 2264bv64) == 99bv8); - free requires (memory_load8_le(mem, 2265bv64) == 104bv8); - free requires (memory_load8_le(mem, 2266bv64) == 97bv8); - free requires (memory_load8_le(mem, 2267bv64) == 114bv8); - free requires (memory_load8_le(mem, 2268bv64) == 32bv8); - free requires (memory_load8_le(mem, 2269bv64) == 105bv8); - free requires (memory_load8_le(mem, 2270bv64) == 115bv8); - free requires (memory_load8_le(mem, 2271bv64) == 58bv8); - free requires (memory_load8_le(mem, 2272bv64) == 32bv8); - free requires (memory_load8_le(mem, 2273bv64) == 37bv8); - free requires (memory_load8_le(mem, 2274bv64) == 99bv8); - free requires (memory_load8_le(mem, 2275bv64) == 10bv8); - free requires (memory_load8_le(mem, 2276bv64) == 0bv8); - free requires (memory_load8_le(mem, 2277bv64) == 84bv8); - free requires (memory_load8_le(mem, 2278bv64) == 104bv8); - free requires (memory_load8_le(mem, 2279bv64) == 101bv8); - free requires (memory_load8_le(mem, 2280bv64) == 32bv8); - free requires (memory_load8_le(mem, 2281bv64) == 105bv8); - free requires (memory_load8_le(mem, 2282bv64) == 110bv8); - free requires (memory_load8_le(mem, 2283bv64) == 116bv8); - free requires (memory_load8_le(mem, 2284bv64) == 32bv8); - free requires (memory_load8_le(mem, 2285bv64) == 105bv8); - free requires (memory_load8_le(mem, 2286bv64) == 115bv8); - free requires (memory_load8_le(mem, 2287bv64) == 58bv8); - free requires (memory_load8_le(mem, 2288bv64) == 32bv8); - free requires (memory_load8_le(mem, 2289bv64) == 37bv8); - free requires (memory_load8_le(mem, 2290bv64) == 100bv8); - free requires (memory_load8_le(mem, 2291bv64) == 10bv8); - free requires (memory_load8_le(mem, 2292bv64) == 0bv8); - free requires (memory_load8_le(mem, 2293bv64) == 84bv8); - free requires (memory_load8_le(mem, 2294bv64) == 104bv8); - free requires (memory_load8_le(mem, 2295bv64) == 101bv8); - free requires (memory_load8_le(mem, 2296bv64) == 32bv8); - free requires (memory_load8_le(mem, 2297bv64) == 108bv8); - free requires (memory_load8_le(mem, 2298bv64) == 111bv8); - free requires (memory_load8_le(mem, 2299bv64) == 99bv8); - free requires (memory_load8_le(mem, 2300bv64) == 97bv8); - free requires (memory_load8_le(mem, 2301bv64) == 108bv8); - free requires (memory_load8_le(mem, 2302bv64) == 32bv8); - free requires (memory_load8_le(mem, 2303bv64) == 118bv8); - free requires (memory_load8_le(mem, 2304bv64) == 97bv8); - free requires (memory_load8_le(mem, 2305bv64) == 114bv8); - free requires (memory_load8_le(mem, 2306bv64) == 105bv8); - free requires (memory_load8_le(mem, 2307bv64) == 97bv8); - free requires (memory_load8_le(mem, 2308bv64) == 98bv8); - free requires (memory_load8_le(mem, 2309bv64) == 108bv8); - free requires (memory_load8_le(mem, 2310bv64) == 101bv8); - free requires (memory_load8_le(mem, 2311bv64) == 32bv8); - free requires (memory_load8_le(mem, 2312bv64) == 105bv8); - free requires (memory_load8_le(mem, 2313bv64) == 115bv8); - free requires (memory_load8_le(mem, 2314bv64) == 58bv8); - free requires (memory_load8_le(mem, 2315bv64) == 32bv8); - free requires (memory_load8_le(mem, 2316bv64) == 37bv8); - free requires (memory_load8_le(mem, 2317bv64) == 100bv8); - free requires (memory_load8_le(mem, 2318bv64) == 10bv8); - free requires (memory_load8_le(mem, 2319bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 8bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 8bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69688bv64) == 0bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); + free requires (memory_load64_le(mem, 2256bv64) == 2334386691848142849bv64); + free requires (memory_load64_le(mem, 2264bv64) == 4211825664600402019bv64); + free requires (memory_load64_le(mem, 2272bv64) == 7307182754559632672bv64); + free requires (memory_load64_le(mem, 2280bv64) == 4211825664634808608bv64); + free requires (memory_load64_le(mem, 2288bv64) == 7307182754559698208bv64); + free requires (memory_load64_le(mem, 2296bv64) == 8511922461266111520bv64); + free requires (memory_load64_le(mem, 2304bv64) == 2334391151658365537bv64); + free requires (memory_load64_le(mem, 2312bv64) == 2924860384375657bv64); + free requires (memory_load64_le(mem, 69064bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); free ensures (R31 == old(R31)); - free ensures (memory_load8_le(mem, 2256bv64) == 1bv8); - free ensures (memory_load8_le(mem, 2257bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2258bv64) == 2bv8); - free ensures (memory_load8_le(mem, 2259bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2260bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2261bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2262bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2263bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2264bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2265bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2266bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2267bv64) == 114bv8); - free ensures (memory_load8_le(mem, 2268bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2269bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2270bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2271bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2272bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2273bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2274bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2275bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2276bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2277bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2278bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2279bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2280bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2281bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2282bv64) == 110bv8); - free ensures (memory_load8_le(mem, 2283bv64) == 116bv8); - free ensures (memory_load8_le(mem, 2284bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2285bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2286bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2287bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2288bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2289bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2290bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2291bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2292bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2293bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2294bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2295bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2296bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2297bv64) == 108bv8); - free ensures (memory_load8_le(mem, 2298bv64) == 111bv8); - free ensures (memory_load8_le(mem, 2299bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2300bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2301bv64) == 108bv8); - free ensures (memory_load8_le(mem, 2302bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2303bv64) == 118bv8); - free ensures (memory_load8_le(mem, 2304bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2305bv64) == 114bv8); - free ensures (memory_load8_le(mem, 2306bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2307bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2308bv64) == 98bv8); - free ensures (memory_load8_le(mem, 2309bv64) == 108bv8); - free ensures (memory_load8_le(mem, 2310bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2311bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2312bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2313bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2314bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2315bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2316bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2317bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2318bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2319bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 2256bv64) == 2334386691848142849bv64); + free ensures (memory_load64_le(mem, 2264bv64) == 4211825664600402019bv64); + free ensures (memory_load64_le(mem, 2272bv64) == 7307182754559632672bv64); + free ensures (memory_load64_le(mem, 2280bv64) == 4211825664634808608bv64); + free ensures (memory_load64_le(mem, 2288bv64) == 7307182754559698208bv64); + free ensures (memory_load64_le(mem, 2296bv64) == 8511922461266111520bv64); + free ensures (memory_load64_le(mem, 2304bv64) == 2334391151658365537bv64); + free ensures (memory_load64_le(mem, 2312bv64) == 2924860384375657bv64); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); + +implementation main() { var #4: bv64; var #5: bv64; @@ -701,390 +271,55 @@ procedure main() procedure malloc(); modifies Gamma_R16, Gamma_R17, R16, R17; - free requires (memory_load8_le(mem, 2256bv64) == 1bv8); - free requires (memory_load8_le(mem, 2257bv64) == 0bv8); - free requires (memory_load8_le(mem, 2258bv64) == 2bv8); - free requires (memory_load8_le(mem, 2259bv64) == 0bv8); - free requires (memory_load8_le(mem, 2260bv64) == 84bv8); - free requires (memory_load8_le(mem, 2261bv64) == 104bv8); - free requires (memory_load8_le(mem, 2262bv64) == 101bv8); - free requires (memory_load8_le(mem, 2263bv64) == 32bv8); - free requires (memory_load8_le(mem, 2264bv64) == 99bv8); - free requires (memory_load8_le(mem, 2265bv64) == 104bv8); - free requires (memory_load8_le(mem, 2266bv64) == 97bv8); - free requires (memory_load8_le(mem, 2267bv64) == 114bv8); - free requires (memory_load8_le(mem, 2268bv64) == 32bv8); - free requires (memory_load8_le(mem, 2269bv64) == 105bv8); - free requires (memory_load8_le(mem, 2270bv64) == 115bv8); - free requires (memory_load8_le(mem, 2271bv64) == 58bv8); - free requires (memory_load8_le(mem, 2272bv64) == 32bv8); - free requires (memory_load8_le(mem, 2273bv64) == 37bv8); - free requires (memory_load8_le(mem, 2274bv64) == 99bv8); - free requires (memory_load8_le(mem, 2275bv64) == 10bv8); - free requires (memory_load8_le(mem, 2276bv64) == 0bv8); - free requires (memory_load8_le(mem, 2277bv64) == 84bv8); - free requires (memory_load8_le(mem, 2278bv64) == 104bv8); - free requires (memory_load8_le(mem, 2279bv64) == 101bv8); - free requires (memory_load8_le(mem, 2280bv64) == 32bv8); - free requires (memory_load8_le(mem, 2281bv64) == 105bv8); - free requires (memory_load8_le(mem, 2282bv64) == 110bv8); - free requires (memory_load8_le(mem, 2283bv64) == 116bv8); - free requires (memory_load8_le(mem, 2284bv64) == 32bv8); - free requires (memory_load8_le(mem, 2285bv64) == 105bv8); - free requires (memory_load8_le(mem, 2286bv64) == 115bv8); - free requires (memory_load8_le(mem, 2287bv64) == 58bv8); - free requires (memory_load8_le(mem, 2288bv64) == 32bv8); - free requires (memory_load8_le(mem, 2289bv64) == 37bv8); - free requires (memory_load8_le(mem, 2290bv64) == 100bv8); - free requires (memory_load8_le(mem, 2291bv64) == 10bv8); - free requires (memory_load8_le(mem, 2292bv64) == 0bv8); - free requires (memory_load8_le(mem, 2293bv64) == 84bv8); - free requires (memory_load8_le(mem, 2294bv64) == 104bv8); - free requires (memory_load8_le(mem, 2295bv64) == 101bv8); - free requires (memory_load8_le(mem, 2296bv64) == 32bv8); - free requires (memory_load8_le(mem, 2297bv64) == 108bv8); - free requires (memory_load8_le(mem, 2298bv64) == 111bv8); - free requires (memory_load8_le(mem, 2299bv64) == 99bv8); - free requires (memory_load8_le(mem, 2300bv64) == 97bv8); - free requires (memory_load8_le(mem, 2301bv64) == 108bv8); - free requires (memory_load8_le(mem, 2302bv64) == 32bv8); - free requires (memory_load8_le(mem, 2303bv64) == 118bv8); - free requires (memory_load8_le(mem, 2304bv64) == 97bv8); - free requires (memory_load8_le(mem, 2305bv64) == 114bv8); - free requires (memory_load8_le(mem, 2306bv64) == 105bv8); - free requires (memory_load8_le(mem, 2307bv64) == 97bv8); - free requires (memory_load8_le(mem, 2308bv64) == 98bv8); - free requires (memory_load8_le(mem, 2309bv64) == 108bv8); - free requires (memory_load8_le(mem, 2310bv64) == 101bv8); - free requires (memory_load8_le(mem, 2311bv64) == 32bv8); - free requires (memory_load8_le(mem, 2312bv64) == 105bv8); - free requires (memory_load8_le(mem, 2313bv64) == 115bv8); - free requires (memory_load8_le(mem, 2314bv64) == 58bv8); - free requires (memory_load8_le(mem, 2315bv64) == 32bv8); - free requires (memory_load8_le(mem, 2316bv64) == 37bv8); - free requires (memory_load8_le(mem, 2317bv64) == 100bv8); - free requires (memory_load8_le(mem, 2318bv64) == 10bv8); - free requires (memory_load8_le(mem, 2319bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 8bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 8bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2256bv64) == 1bv8); - free ensures (memory_load8_le(mem, 2257bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2258bv64) == 2bv8); - free ensures (memory_load8_le(mem, 2259bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2260bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2261bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2262bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2263bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2264bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2265bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2266bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2267bv64) == 114bv8); - free ensures (memory_load8_le(mem, 2268bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2269bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2270bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2271bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2272bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2273bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2274bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2275bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2276bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2277bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2278bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2279bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2280bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2281bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2282bv64) == 110bv8); - free ensures (memory_load8_le(mem, 2283bv64) == 116bv8); - free ensures (memory_load8_le(mem, 2284bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2285bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2286bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2287bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2288bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2289bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2290bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2291bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2292bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2293bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2294bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2295bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2296bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2297bv64) == 108bv8); - free ensures (memory_load8_le(mem, 2298bv64) == 111bv8); - free ensures (memory_load8_le(mem, 2299bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2300bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2301bv64) == 108bv8); - free ensures (memory_load8_le(mem, 2302bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2303bv64) == 118bv8); - free ensures (memory_load8_le(mem, 2304bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2305bv64) == 114bv8); - free ensures (memory_load8_le(mem, 2306bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2307bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2308bv64) == 98bv8); - free ensures (memory_load8_le(mem, 2309bv64) == 108bv8); - free ensures (memory_load8_le(mem, 2310bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2311bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2312bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2313bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2314bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2315bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2316bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2317bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2318bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2319bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 2256bv64) == 2334386691848142849bv64); + free requires (memory_load64_le(mem, 2264bv64) == 4211825664600402019bv64); + free requires (memory_load64_le(mem, 2272bv64) == 7307182754559632672bv64); + free requires (memory_load64_le(mem, 2280bv64) == 4211825664634808608bv64); + free requires (memory_load64_le(mem, 2288bv64) == 7307182754559698208bv64); + free requires (memory_load64_le(mem, 2296bv64) == 8511922461266111520bv64); + free requires (memory_load64_le(mem, 2304bv64) == 2334391151658365537bv64); + free requires (memory_load64_le(mem, 2312bv64) == 2924860384375657bv64); + free requires (memory_load64_le(mem, 69064bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); + free ensures (memory_load64_le(mem, 2256bv64) == 2334386691848142849bv64); + free ensures (memory_load64_le(mem, 2264bv64) == 4211825664600402019bv64); + free ensures (memory_load64_le(mem, 2272bv64) == 7307182754559632672bv64); + free ensures (memory_load64_le(mem, 2280bv64) == 4211825664634808608bv64); + free ensures (memory_load64_le(mem, 2288bv64) == 7307182754559698208bv64); + free ensures (memory_load64_le(mem, 2296bv64) == 8511922461266111520bv64); + free ensures (memory_load64_le(mem, 2304bv64) == 2334391151658365537bv64); + free ensures (memory_load64_le(mem, 2312bv64) == 2924860384375657bv64); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); procedure printf(); modifies Gamma_R16, Gamma_R17, R16, R17; - free requires (memory_load8_le(mem, 2256bv64) == 1bv8); - free requires (memory_load8_le(mem, 2257bv64) == 0bv8); - free requires (memory_load8_le(mem, 2258bv64) == 2bv8); - free requires (memory_load8_le(mem, 2259bv64) == 0bv8); - free requires (memory_load8_le(mem, 2260bv64) == 84bv8); - free requires (memory_load8_le(mem, 2261bv64) == 104bv8); - free requires (memory_load8_le(mem, 2262bv64) == 101bv8); - free requires (memory_load8_le(mem, 2263bv64) == 32bv8); - free requires (memory_load8_le(mem, 2264bv64) == 99bv8); - free requires (memory_load8_le(mem, 2265bv64) == 104bv8); - free requires (memory_load8_le(mem, 2266bv64) == 97bv8); - free requires (memory_load8_le(mem, 2267bv64) == 114bv8); - free requires (memory_load8_le(mem, 2268bv64) == 32bv8); - free requires (memory_load8_le(mem, 2269bv64) == 105bv8); - free requires (memory_load8_le(mem, 2270bv64) == 115bv8); - free requires (memory_load8_le(mem, 2271bv64) == 58bv8); - free requires (memory_load8_le(mem, 2272bv64) == 32bv8); - free requires (memory_load8_le(mem, 2273bv64) == 37bv8); - free requires (memory_load8_le(mem, 2274bv64) == 99bv8); - free requires (memory_load8_le(mem, 2275bv64) == 10bv8); - free requires (memory_load8_le(mem, 2276bv64) == 0bv8); - free requires (memory_load8_le(mem, 2277bv64) == 84bv8); - free requires (memory_load8_le(mem, 2278bv64) == 104bv8); - free requires (memory_load8_le(mem, 2279bv64) == 101bv8); - free requires (memory_load8_le(mem, 2280bv64) == 32bv8); - free requires (memory_load8_le(mem, 2281bv64) == 105bv8); - free requires (memory_load8_le(mem, 2282bv64) == 110bv8); - free requires (memory_load8_le(mem, 2283bv64) == 116bv8); - free requires (memory_load8_le(mem, 2284bv64) == 32bv8); - free requires (memory_load8_le(mem, 2285bv64) == 105bv8); - free requires (memory_load8_le(mem, 2286bv64) == 115bv8); - free requires (memory_load8_le(mem, 2287bv64) == 58bv8); - free requires (memory_load8_le(mem, 2288bv64) == 32bv8); - free requires (memory_load8_le(mem, 2289bv64) == 37bv8); - free requires (memory_load8_le(mem, 2290bv64) == 100bv8); - free requires (memory_load8_le(mem, 2291bv64) == 10bv8); - free requires (memory_load8_le(mem, 2292bv64) == 0bv8); - free requires (memory_load8_le(mem, 2293bv64) == 84bv8); - free requires (memory_load8_le(mem, 2294bv64) == 104bv8); - free requires (memory_load8_le(mem, 2295bv64) == 101bv8); - free requires (memory_load8_le(mem, 2296bv64) == 32bv8); - free requires (memory_load8_le(mem, 2297bv64) == 108bv8); - free requires (memory_load8_le(mem, 2298bv64) == 111bv8); - free requires (memory_load8_le(mem, 2299bv64) == 99bv8); - free requires (memory_load8_le(mem, 2300bv64) == 97bv8); - free requires (memory_load8_le(mem, 2301bv64) == 108bv8); - free requires (memory_load8_le(mem, 2302bv64) == 32bv8); - free requires (memory_load8_le(mem, 2303bv64) == 118bv8); - free requires (memory_load8_le(mem, 2304bv64) == 97bv8); - free requires (memory_load8_le(mem, 2305bv64) == 114bv8); - free requires (memory_load8_le(mem, 2306bv64) == 105bv8); - free requires (memory_load8_le(mem, 2307bv64) == 97bv8); - free requires (memory_load8_le(mem, 2308bv64) == 98bv8); - free requires (memory_load8_le(mem, 2309bv64) == 108bv8); - free requires (memory_load8_le(mem, 2310bv64) == 101bv8); - free requires (memory_load8_le(mem, 2311bv64) == 32bv8); - free requires (memory_load8_le(mem, 2312bv64) == 105bv8); - free requires (memory_load8_le(mem, 2313bv64) == 115bv8); - free requires (memory_load8_le(mem, 2314bv64) == 58bv8); - free requires (memory_load8_le(mem, 2315bv64) == 32bv8); - free requires (memory_load8_le(mem, 2316bv64) == 37bv8); - free requires (memory_load8_le(mem, 2317bv64) == 100bv8); - free requires (memory_load8_le(mem, 2318bv64) == 10bv8); - free requires (memory_load8_le(mem, 2319bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 8bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 8bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2256bv64) == 1bv8); - free ensures (memory_load8_le(mem, 2257bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2258bv64) == 2bv8); - free ensures (memory_load8_le(mem, 2259bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2260bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2261bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2262bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2263bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2264bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2265bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2266bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2267bv64) == 114bv8); - free ensures (memory_load8_le(mem, 2268bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2269bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2270bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2271bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2272bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2273bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2274bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2275bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2276bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2277bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2278bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2279bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2280bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2281bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2282bv64) == 110bv8); - free ensures (memory_load8_le(mem, 2283bv64) == 116bv8); - free ensures (memory_load8_le(mem, 2284bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2285bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2286bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2287bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2288bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2289bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2290bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2291bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2292bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2293bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2294bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2295bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2296bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2297bv64) == 108bv8); - free ensures (memory_load8_le(mem, 2298bv64) == 111bv8); - free ensures (memory_load8_le(mem, 2299bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2300bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2301bv64) == 108bv8); - free ensures (memory_load8_le(mem, 2302bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2303bv64) == 118bv8); - free ensures (memory_load8_le(mem, 2304bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2305bv64) == 114bv8); - free ensures (memory_load8_le(mem, 2306bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2307bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2308bv64) == 98bv8); - free ensures (memory_load8_le(mem, 2309bv64) == 108bv8); - free ensures (memory_load8_le(mem, 2310bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2311bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2312bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2313bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2314bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2315bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2316bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2317bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2318bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2319bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 2256bv64) == 2334386691848142849bv64); + free requires (memory_load64_le(mem, 2264bv64) == 4211825664600402019bv64); + free requires (memory_load64_le(mem, 2272bv64) == 7307182754559632672bv64); + free requires (memory_load64_le(mem, 2280bv64) == 4211825664634808608bv64); + free requires (memory_load64_le(mem, 2288bv64) == 7307182754559698208bv64); + free requires (memory_load64_le(mem, 2296bv64) == 8511922461266111520bv64); + free requires (memory_load64_le(mem, 2304bv64) == 2334391151658365537bv64); + free requires (memory_load64_le(mem, 2312bv64) == 2924860384375657bv64); + free requires (memory_load64_le(mem, 69064bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); + free ensures (memory_load64_le(mem, 2256bv64) == 2334386691848142849bv64); + free ensures (memory_load64_le(mem, 2264bv64) == 4211825664600402019bv64); + free ensures (memory_load64_le(mem, 2272bv64) == 7307182754559632672bv64); + free ensures (memory_load64_le(mem, 2280bv64) == 4211825664634808608bv64); + free ensures (memory_load64_le(mem, 2288bv64) == 7307182754559698208bv64); + free ensures (memory_load64_le(mem, 2296bv64) == 8511922461266111520bv64); + free ensures (memory_load64_le(mem, 2304bv64) == 2334391151658365537bv64); + free ensures (memory_load64_le(mem, 2312bv64) == 2924860384375657bv64); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); + diff --git a/src/test/correct/malloc_with_local/clang_O2/malloc_with_local.expected b/src/test/correct/malloc_with_local/clang_O2/malloc_with_local.expected index 775c83e11..28d819ea5 100644 --- a/src/test/correct/malloc_with_local/clang_O2/malloc_with_local.expected +++ b/src/test/correct/malloc_with_local/clang_O2/malloc_with_local.expected @@ -107,43 +107,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 2025bv64) == 100bv8); free ensures (memory_load8_le(mem, 2026bv64) == 10bv8); free ensures (memory_load8_le(mem, 2027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69680bv64) == 48bv8); - free ensures (memory_load8_le(mem, 69681bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69682bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69683bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69684bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69685bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69686bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69687bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69680bv64) == 69680bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -154,24 +128,10 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R16, Gamma_R17, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_stack, R0, R1, R16, R17, R29, R30, R31, stack; - free requires (memory_load8_le(mem, 69672bv64) == 0bv8); - free requires (memory_load8_le(mem, 69673bv64) == 0bv8); - free requires (memory_load8_le(mem, 69674bv64) == 0bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); - free requires (memory_load8_le(mem, 69680bv64) == 48bv8); - free requires (memory_load8_le(mem, 69681bv64) == 16bv8); - free requires (memory_load8_le(mem, 69682bv64) == 1bv8); - free requires (memory_load8_le(mem, 69683bv64) == 0bv8); - free requires (memory_load8_le(mem, 69684bv64) == 0bv8); - free requires (memory_load8_le(mem, 69685bv64) == 0bv8); - free requires (memory_load8_le(mem, 69686bv64) == 0bv8); - free requires (memory_load8_le(mem, 69687bv64) == 0bv8); + free requires (memory_load64_le(mem, 69672bv64) == 0bv64); + free requires (memory_load64_le(mem, 69680bv64) == 69680bv64); free requires (memory_load8_le(mem, 1964bv64) == 1bv8); free requires (memory_load8_le(mem, 1965bv64) == 0bv8); free requires (memory_load8_le(mem, 1966bv64) == 2bv8); @@ -236,38 +196,10 @@ procedure main() free requires (memory_load8_le(mem, 2025bv64) == 100bv8); free requires (memory_load8_le(mem, 2026bv64) == 10bv8); free requires (memory_load8_le(mem, 2027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 80bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 0bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 84bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69680bv64) == 48bv8); - free requires (memory_load8_le(mem, 69681bv64) == 16bv8); - free requires (memory_load8_le(mem, 69682bv64) == 1bv8); - free requires (memory_load8_le(mem, 69683bv64) == 0bv8); - free requires (memory_load8_le(mem, 69684bv64) == 0bv8); - free requires (memory_load8_le(mem, 69685bv64) == 0bv8); - free requires (memory_load8_le(mem, 69686bv64) == 0bv8); - free requires (memory_load8_le(mem, 69687bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69680bv64) == 69680bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -336,38 +268,12 @@ procedure main() free ensures (memory_load8_le(mem, 2025bv64) == 100bv8); free ensures (memory_load8_le(mem, 2026bv64) == 10bv8); free ensures (memory_load8_le(mem, 2027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69680bv64) == 48bv8); - free ensures (memory_load8_le(mem, 69681bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69682bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69683bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69684bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69685bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69686bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69687bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69680bv64) == 69680bv64); + +implementation main() { var #4: bv64; var Gamma_#4: bool; @@ -477,38 +383,10 @@ procedure printf(); free requires (memory_load8_le(mem, 2025bv64) == 100bv8); free requires (memory_load8_le(mem, 2026bv64) == 10bv8); free requires (memory_load8_le(mem, 2027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 80bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 0bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 84bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69680bv64) == 48bv8); - free requires (memory_load8_le(mem, 69681bv64) == 16bv8); - free requires (memory_load8_le(mem, 69682bv64) == 1bv8); - free requires (memory_load8_le(mem, 69683bv64) == 0bv8); - free requires (memory_load8_le(mem, 69684bv64) == 0bv8); - free requires (memory_load8_le(mem, 69685bv64) == 0bv8); - free requires (memory_load8_le(mem, 69686bv64) == 0bv8); - free requires (memory_load8_le(mem, 69687bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69680bv64) == 69680bv64); free ensures (memory_load8_le(mem, 1964bv64) == 1bv8); free ensures (memory_load8_le(mem, 1965bv64) == 0bv8); free ensures (memory_load8_le(mem, 1966bv64) == 2bv8); @@ -573,35 +451,8 @@ procedure printf(); free ensures (memory_load8_le(mem, 2025bv64) == 100bv8); free ensures (memory_load8_le(mem, 2026bv64) == 10bv8); free ensures (memory_load8_le(mem, 2027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69680bv64) == 48bv8); - free ensures (memory_load8_le(mem, 69681bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69682bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69683bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69684bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69685bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69686bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69687bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69680bv64) == 69680bv64); + diff --git a/src/test/correct/malloc_with_local/clang_no_plt_no_pic/malloc_with_local.expected b/src/test/correct/malloc_with_local/clang_no_plt_no_pic/malloc_with_local.expected index 07ac928d3..a6a35f93d 100644 --- a/src/test/correct/malloc_with_local/clang_no_plt_no_pic/malloc_with_local.expected +++ b/src/test/correct/malloc_with_local/clang_no_plt_no_pic/malloc_with_local.expected @@ -81,107 +81,25 @@ procedure {:extern} rely(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); - free ensures (memory_load8_le(mem, 2256bv64) == 1bv8); - free ensures (memory_load8_le(mem, 2257bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2258bv64) == 2bv8); - free ensures (memory_load8_le(mem, 2259bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2260bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2261bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2262bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2263bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2264bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2265bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2266bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2267bv64) == 114bv8); - free ensures (memory_load8_le(mem, 2268bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2269bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2270bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2271bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2272bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2273bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2274bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2275bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2276bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2277bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2278bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2279bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2280bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2281bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2282bv64) == 110bv8); - free ensures (memory_load8_le(mem, 2283bv64) == 116bv8); - free ensures (memory_load8_le(mem, 2284bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2285bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2286bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2287bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2288bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2289bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2290bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2291bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2292bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2293bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2294bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2295bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2296bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2297bv64) == 108bv8); - free ensures (memory_load8_le(mem, 2298bv64) == 111bv8); - free ensures (memory_load8_le(mem, 2299bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2300bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2301bv64) == 108bv8); - free ensures (memory_load8_le(mem, 2302bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2303bv64) == 118bv8); - free ensures (memory_load8_le(mem, 2304bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2305bv64) == 114bv8); - free ensures (memory_load8_le(mem, 2306bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2307bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2308bv64) == 98bv8); - free ensures (memory_load8_le(mem, 2309bv64) == 108bv8); - free ensures (memory_load8_le(mem, 2310bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2311bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2312bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2313bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2314bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2315bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2316bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2317bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2318bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2319bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 2256bv64) == 2334386691848142849bv64); + free ensures (memory_load64_le(mem, 2264bv64) == 4211825664600402019bv64); + free ensures (memory_load64_le(mem, 2272bv64) == 7307182754559632672bv64); + free ensures (memory_load64_le(mem, 2280bv64) == 4211825664634808608bv64); + free ensures (memory_load64_le(mem, 2288bv64) == 7307182754559698208bv64); + free ensures (memory_load64_le(mem, 2296bv64) == 8511922461266111520bv64); + free ensures (memory_load64_le(mem, 2304bv64) == 2334391151658365537bv64); + free ensures (memory_load64_le(mem, 2312bv64) == 2924860384375657bv64); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -194,413 +112,65 @@ procedure {:extern} guarantee_reflexive(); procedure #free(); modifies Gamma_R16, Gamma_R17, R16, R17; - free requires (memory_load8_le(mem, 2256bv64) == 1bv8); - free requires (memory_load8_le(mem, 2257bv64) == 0bv8); - free requires (memory_load8_le(mem, 2258bv64) == 2bv8); - free requires (memory_load8_le(mem, 2259bv64) == 0bv8); - free requires (memory_load8_le(mem, 2260bv64) == 84bv8); - free requires (memory_load8_le(mem, 2261bv64) == 104bv8); - free requires (memory_load8_le(mem, 2262bv64) == 101bv8); - free requires (memory_load8_le(mem, 2263bv64) == 32bv8); - free requires (memory_load8_le(mem, 2264bv64) == 99bv8); - free requires (memory_load8_le(mem, 2265bv64) == 104bv8); - free requires (memory_load8_le(mem, 2266bv64) == 97bv8); - free requires (memory_load8_le(mem, 2267bv64) == 114bv8); - free requires (memory_load8_le(mem, 2268bv64) == 32bv8); - free requires (memory_load8_le(mem, 2269bv64) == 105bv8); - free requires (memory_load8_le(mem, 2270bv64) == 115bv8); - free requires (memory_load8_le(mem, 2271bv64) == 58bv8); - free requires (memory_load8_le(mem, 2272bv64) == 32bv8); - free requires (memory_load8_le(mem, 2273bv64) == 37bv8); - free requires (memory_load8_le(mem, 2274bv64) == 99bv8); - free requires (memory_load8_le(mem, 2275bv64) == 10bv8); - free requires (memory_load8_le(mem, 2276bv64) == 0bv8); - free requires (memory_load8_le(mem, 2277bv64) == 84bv8); - free requires (memory_load8_le(mem, 2278bv64) == 104bv8); - free requires (memory_load8_le(mem, 2279bv64) == 101bv8); - free requires (memory_load8_le(mem, 2280bv64) == 32bv8); - free requires (memory_load8_le(mem, 2281bv64) == 105bv8); - free requires (memory_load8_le(mem, 2282bv64) == 110bv8); - free requires (memory_load8_le(mem, 2283bv64) == 116bv8); - free requires (memory_load8_le(mem, 2284bv64) == 32bv8); - free requires (memory_load8_le(mem, 2285bv64) == 105bv8); - free requires (memory_load8_le(mem, 2286bv64) == 115bv8); - free requires (memory_load8_le(mem, 2287bv64) == 58bv8); - free requires (memory_load8_le(mem, 2288bv64) == 32bv8); - free requires (memory_load8_le(mem, 2289bv64) == 37bv8); - free requires (memory_load8_le(mem, 2290bv64) == 100bv8); - free requires (memory_load8_le(mem, 2291bv64) == 10bv8); - free requires (memory_load8_le(mem, 2292bv64) == 0bv8); - free requires (memory_load8_le(mem, 2293bv64) == 84bv8); - free requires (memory_load8_le(mem, 2294bv64) == 104bv8); - free requires (memory_load8_le(mem, 2295bv64) == 101bv8); - free requires (memory_load8_le(mem, 2296bv64) == 32bv8); - free requires (memory_load8_le(mem, 2297bv64) == 108bv8); - free requires (memory_load8_le(mem, 2298bv64) == 111bv8); - free requires (memory_load8_le(mem, 2299bv64) == 99bv8); - free requires (memory_load8_le(mem, 2300bv64) == 97bv8); - free requires (memory_load8_le(mem, 2301bv64) == 108bv8); - free requires (memory_load8_le(mem, 2302bv64) == 32bv8); - free requires (memory_load8_le(mem, 2303bv64) == 118bv8); - free requires (memory_load8_le(mem, 2304bv64) == 97bv8); - free requires (memory_load8_le(mem, 2305bv64) == 114bv8); - free requires (memory_load8_le(mem, 2306bv64) == 105bv8); - free requires (memory_load8_le(mem, 2307bv64) == 97bv8); - free requires (memory_load8_le(mem, 2308bv64) == 98bv8); - free requires (memory_load8_le(mem, 2309bv64) == 108bv8); - free requires (memory_load8_le(mem, 2310bv64) == 101bv8); - free requires (memory_load8_le(mem, 2311bv64) == 32bv8); - free requires (memory_load8_le(mem, 2312bv64) == 105bv8); - free requires (memory_load8_le(mem, 2313bv64) == 115bv8); - free requires (memory_load8_le(mem, 2314bv64) == 58bv8); - free requires (memory_load8_le(mem, 2315bv64) == 32bv8); - free requires (memory_load8_le(mem, 2316bv64) == 37bv8); - free requires (memory_load8_le(mem, 2317bv64) == 100bv8); - free requires (memory_load8_le(mem, 2318bv64) == 10bv8); - free requires (memory_load8_le(mem, 2319bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 8bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 8bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2256bv64) == 1bv8); - free ensures (memory_load8_le(mem, 2257bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2258bv64) == 2bv8); - free ensures (memory_load8_le(mem, 2259bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2260bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2261bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2262bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2263bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2264bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2265bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2266bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2267bv64) == 114bv8); - free ensures (memory_load8_le(mem, 2268bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2269bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2270bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2271bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2272bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2273bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2274bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2275bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2276bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2277bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2278bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2279bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2280bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2281bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2282bv64) == 110bv8); - free ensures (memory_load8_le(mem, 2283bv64) == 116bv8); - free ensures (memory_load8_le(mem, 2284bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2285bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2286bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2287bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2288bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2289bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2290bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2291bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2292bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2293bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2294bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2295bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2296bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2297bv64) == 108bv8); - free ensures (memory_load8_le(mem, 2298bv64) == 111bv8); - free ensures (memory_load8_le(mem, 2299bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2300bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2301bv64) == 108bv8); - free ensures (memory_load8_le(mem, 2302bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2303bv64) == 118bv8); - free ensures (memory_load8_le(mem, 2304bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2305bv64) == 114bv8); - free ensures (memory_load8_le(mem, 2306bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2307bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2308bv64) == 98bv8); - free ensures (memory_load8_le(mem, 2309bv64) == 108bv8); - free ensures (memory_load8_le(mem, 2310bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2311bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2312bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2313bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2314bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2315bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2316bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2317bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2318bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2319bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 2256bv64) == 2334386691848142849bv64); + free requires (memory_load64_le(mem, 2264bv64) == 4211825664600402019bv64); + free requires (memory_load64_le(mem, 2272bv64) == 7307182754559632672bv64); + free requires (memory_load64_le(mem, 2280bv64) == 4211825664634808608bv64); + free requires (memory_load64_le(mem, 2288bv64) == 7307182754559698208bv64); + free requires (memory_load64_le(mem, 2296bv64) == 8511922461266111520bv64); + free requires (memory_load64_le(mem, 2304bv64) == 2334391151658365537bv64); + free requires (memory_load64_le(mem, 2312bv64) == 2924860384375657bv64); + free requires (memory_load64_le(mem, 69064bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); + free ensures (memory_load64_le(mem, 2256bv64) == 2334386691848142849bv64); + free ensures (memory_load64_le(mem, 2264bv64) == 4211825664600402019bv64); + free ensures (memory_load64_le(mem, 2272bv64) == 7307182754559632672bv64); + free ensures (memory_load64_le(mem, 2280bv64) == 4211825664634808608bv64); + free ensures (memory_load64_le(mem, 2288bv64) == 7307182754559698208bv64); + free ensures (memory_load64_le(mem, 2296bv64) == 8511922461266111520bv64); + free ensures (memory_load64_le(mem, 2304bv64) == 2334391151658365537bv64); + free ensures (memory_load64_le(mem, 2312bv64) == 2924860384375657bv64); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R16, Gamma_R17, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R1, R16, R17, R29, R30, R31, R8, R9, mem, stack; - free requires (memory_load8_le(mem, 69688bv64) == 0bv8); - free requires (memory_load8_le(mem, 69689bv64) == 0bv8); - free requires (memory_load8_le(mem, 69690bv64) == 0bv8); - free requires (memory_load8_le(mem, 69691bv64) == 0bv8); - free requires (memory_load8_le(mem, 69692bv64) == 0bv8); - free requires (memory_load8_le(mem, 69693bv64) == 0bv8); - free requires (memory_load8_le(mem, 69694bv64) == 0bv8); - free requires (memory_load8_le(mem, 69695bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); - free requires (memory_load8_le(mem, 2256bv64) == 1bv8); - free requires (memory_load8_le(mem, 2257bv64) == 0bv8); - free requires (memory_load8_le(mem, 2258bv64) == 2bv8); - free requires (memory_load8_le(mem, 2259bv64) == 0bv8); - free requires (memory_load8_le(mem, 2260bv64) == 84bv8); - free requires (memory_load8_le(mem, 2261bv64) == 104bv8); - free requires (memory_load8_le(mem, 2262bv64) == 101bv8); - free requires (memory_load8_le(mem, 2263bv64) == 32bv8); - free requires (memory_load8_le(mem, 2264bv64) == 99bv8); - free requires (memory_load8_le(mem, 2265bv64) == 104bv8); - free requires (memory_load8_le(mem, 2266bv64) == 97bv8); - free requires (memory_load8_le(mem, 2267bv64) == 114bv8); - free requires (memory_load8_le(mem, 2268bv64) == 32bv8); - free requires (memory_load8_le(mem, 2269bv64) == 105bv8); - free requires (memory_load8_le(mem, 2270bv64) == 115bv8); - free requires (memory_load8_le(mem, 2271bv64) == 58bv8); - free requires (memory_load8_le(mem, 2272bv64) == 32bv8); - free requires (memory_load8_le(mem, 2273bv64) == 37bv8); - free requires (memory_load8_le(mem, 2274bv64) == 99bv8); - free requires (memory_load8_le(mem, 2275bv64) == 10bv8); - free requires (memory_load8_le(mem, 2276bv64) == 0bv8); - free requires (memory_load8_le(mem, 2277bv64) == 84bv8); - free requires (memory_load8_le(mem, 2278bv64) == 104bv8); - free requires (memory_load8_le(mem, 2279bv64) == 101bv8); - free requires (memory_load8_le(mem, 2280bv64) == 32bv8); - free requires (memory_load8_le(mem, 2281bv64) == 105bv8); - free requires (memory_load8_le(mem, 2282bv64) == 110bv8); - free requires (memory_load8_le(mem, 2283bv64) == 116bv8); - free requires (memory_load8_le(mem, 2284bv64) == 32bv8); - free requires (memory_load8_le(mem, 2285bv64) == 105bv8); - free requires (memory_load8_le(mem, 2286bv64) == 115bv8); - free requires (memory_load8_le(mem, 2287bv64) == 58bv8); - free requires (memory_load8_le(mem, 2288bv64) == 32bv8); - free requires (memory_load8_le(mem, 2289bv64) == 37bv8); - free requires (memory_load8_le(mem, 2290bv64) == 100bv8); - free requires (memory_load8_le(mem, 2291bv64) == 10bv8); - free requires (memory_load8_le(mem, 2292bv64) == 0bv8); - free requires (memory_load8_le(mem, 2293bv64) == 84bv8); - free requires (memory_load8_le(mem, 2294bv64) == 104bv8); - free requires (memory_load8_le(mem, 2295bv64) == 101bv8); - free requires (memory_load8_le(mem, 2296bv64) == 32bv8); - free requires (memory_load8_le(mem, 2297bv64) == 108bv8); - free requires (memory_load8_le(mem, 2298bv64) == 111bv8); - free requires (memory_load8_le(mem, 2299bv64) == 99bv8); - free requires (memory_load8_le(mem, 2300bv64) == 97bv8); - free requires (memory_load8_le(mem, 2301bv64) == 108bv8); - free requires (memory_load8_le(mem, 2302bv64) == 32bv8); - free requires (memory_load8_le(mem, 2303bv64) == 118bv8); - free requires (memory_load8_le(mem, 2304bv64) == 97bv8); - free requires (memory_load8_le(mem, 2305bv64) == 114bv8); - free requires (memory_load8_le(mem, 2306bv64) == 105bv8); - free requires (memory_load8_le(mem, 2307bv64) == 97bv8); - free requires (memory_load8_le(mem, 2308bv64) == 98bv8); - free requires (memory_load8_le(mem, 2309bv64) == 108bv8); - free requires (memory_load8_le(mem, 2310bv64) == 101bv8); - free requires (memory_load8_le(mem, 2311bv64) == 32bv8); - free requires (memory_load8_le(mem, 2312bv64) == 105bv8); - free requires (memory_load8_le(mem, 2313bv64) == 115bv8); - free requires (memory_load8_le(mem, 2314bv64) == 58bv8); - free requires (memory_load8_le(mem, 2315bv64) == 32bv8); - free requires (memory_load8_le(mem, 2316bv64) == 37bv8); - free requires (memory_load8_le(mem, 2317bv64) == 100bv8); - free requires (memory_load8_le(mem, 2318bv64) == 10bv8); - free requires (memory_load8_le(mem, 2319bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 8bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 8bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69688bv64) == 0bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); + free requires (memory_load64_le(mem, 2256bv64) == 2334386691848142849bv64); + free requires (memory_load64_le(mem, 2264bv64) == 4211825664600402019bv64); + free requires (memory_load64_le(mem, 2272bv64) == 7307182754559632672bv64); + free requires (memory_load64_le(mem, 2280bv64) == 4211825664634808608bv64); + free requires (memory_load64_le(mem, 2288bv64) == 7307182754559698208bv64); + free requires (memory_load64_le(mem, 2296bv64) == 8511922461266111520bv64); + free requires (memory_load64_le(mem, 2304bv64) == 2334391151658365537bv64); + free requires (memory_load64_le(mem, 2312bv64) == 2924860384375657bv64); + free requires (memory_load64_le(mem, 69064bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); free ensures (R31 == old(R31)); - free ensures (memory_load8_le(mem, 2256bv64) == 1bv8); - free ensures (memory_load8_le(mem, 2257bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2258bv64) == 2bv8); - free ensures (memory_load8_le(mem, 2259bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2260bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2261bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2262bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2263bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2264bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2265bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2266bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2267bv64) == 114bv8); - free ensures (memory_load8_le(mem, 2268bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2269bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2270bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2271bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2272bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2273bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2274bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2275bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2276bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2277bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2278bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2279bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2280bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2281bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2282bv64) == 110bv8); - free ensures (memory_load8_le(mem, 2283bv64) == 116bv8); - free ensures (memory_load8_le(mem, 2284bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2285bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2286bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2287bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2288bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2289bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2290bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2291bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2292bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2293bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2294bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2295bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2296bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2297bv64) == 108bv8); - free ensures (memory_load8_le(mem, 2298bv64) == 111bv8); - free ensures (memory_load8_le(mem, 2299bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2300bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2301bv64) == 108bv8); - free ensures (memory_load8_le(mem, 2302bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2303bv64) == 118bv8); - free ensures (memory_load8_le(mem, 2304bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2305bv64) == 114bv8); - free ensures (memory_load8_le(mem, 2306bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2307bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2308bv64) == 98bv8); - free ensures (memory_load8_le(mem, 2309bv64) == 108bv8); - free ensures (memory_load8_le(mem, 2310bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2311bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2312bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2313bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2314bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2315bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2316bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2317bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2318bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2319bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 2256bv64) == 2334386691848142849bv64); + free ensures (memory_load64_le(mem, 2264bv64) == 4211825664600402019bv64); + free ensures (memory_load64_le(mem, 2272bv64) == 7307182754559632672bv64); + free ensures (memory_load64_le(mem, 2280bv64) == 4211825664634808608bv64); + free ensures (memory_load64_le(mem, 2288bv64) == 7307182754559698208bv64); + free ensures (memory_load64_le(mem, 2296bv64) == 8511922461266111520bv64); + free ensures (memory_load64_le(mem, 2304bv64) == 2334391151658365537bv64); + free ensures (memory_load64_le(mem, 2312bv64) == 2924860384375657bv64); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); + +implementation main() { var #4: bv64; var #5: bv64; @@ -701,390 +271,55 @@ procedure main() procedure malloc(); modifies Gamma_R16, Gamma_R17, R16, R17; - free requires (memory_load8_le(mem, 2256bv64) == 1bv8); - free requires (memory_load8_le(mem, 2257bv64) == 0bv8); - free requires (memory_load8_le(mem, 2258bv64) == 2bv8); - free requires (memory_load8_le(mem, 2259bv64) == 0bv8); - free requires (memory_load8_le(mem, 2260bv64) == 84bv8); - free requires (memory_load8_le(mem, 2261bv64) == 104bv8); - free requires (memory_load8_le(mem, 2262bv64) == 101bv8); - free requires (memory_load8_le(mem, 2263bv64) == 32bv8); - free requires (memory_load8_le(mem, 2264bv64) == 99bv8); - free requires (memory_load8_le(mem, 2265bv64) == 104bv8); - free requires (memory_load8_le(mem, 2266bv64) == 97bv8); - free requires (memory_load8_le(mem, 2267bv64) == 114bv8); - free requires (memory_load8_le(mem, 2268bv64) == 32bv8); - free requires (memory_load8_le(mem, 2269bv64) == 105bv8); - free requires (memory_load8_le(mem, 2270bv64) == 115bv8); - free requires (memory_load8_le(mem, 2271bv64) == 58bv8); - free requires (memory_load8_le(mem, 2272bv64) == 32bv8); - free requires (memory_load8_le(mem, 2273bv64) == 37bv8); - free requires (memory_load8_le(mem, 2274bv64) == 99bv8); - free requires (memory_load8_le(mem, 2275bv64) == 10bv8); - free requires (memory_load8_le(mem, 2276bv64) == 0bv8); - free requires (memory_load8_le(mem, 2277bv64) == 84bv8); - free requires (memory_load8_le(mem, 2278bv64) == 104bv8); - free requires (memory_load8_le(mem, 2279bv64) == 101bv8); - free requires (memory_load8_le(mem, 2280bv64) == 32bv8); - free requires (memory_load8_le(mem, 2281bv64) == 105bv8); - free requires (memory_load8_le(mem, 2282bv64) == 110bv8); - free requires (memory_load8_le(mem, 2283bv64) == 116bv8); - free requires (memory_load8_le(mem, 2284bv64) == 32bv8); - free requires (memory_load8_le(mem, 2285bv64) == 105bv8); - free requires (memory_load8_le(mem, 2286bv64) == 115bv8); - free requires (memory_load8_le(mem, 2287bv64) == 58bv8); - free requires (memory_load8_le(mem, 2288bv64) == 32bv8); - free requires (memory_load8_le(mem, 2289bv64) == 37bv8); - free requires (memory_load8_le(mem, 2290bv64) == 100bv8); - free requires (memory_load8_le(mem, 2291bv64) == 10bv8); - free requires (memory_load8_le(mem, 2292bv64) == 0bv8); - free requires (memory_load8_le(mem, 2293bv64) == 84bv8); - free requires (memory_load8_le(mem, 2294bv64) == 104bv8); - free requires (memory_load8_le(mem, 2295bv64) == 101bv8); - free requires (memory_load8_le(mem, 2296bv64) == 32bv8); - free requires (memory_load8_le(mem, 2297bv64) == 108bv8); - free requires (memory_load8_le(mem, 2298bv64) == 111bv8); - free requires (memory_load8_le(mem, 2299bv64) == 99bv8); - free requires (memory_load8_le(mem, 2300bv64) == 97bv8); - free requires (memory_load8_le(mem, 2301bv64) == 108bv8); - free requires (memory_load8_le(mem, 2302bv64) == 32bv8); - free requires (memory_load8_le(mem, 2303bv64) == 118bv8); - free requires (memory_load8_le(mem, 2304bv64) == 97bv8); - free requires (memory_load8_le(mem, 2305bv64) == 114bv8); - free requires (memory_load8_le(mem, 2306bv64) == 105bv8); - free requires (memory_load8_le(mem, 2307bv64) == 97bv8); - free requires (memory_load8_le(mem, 2308bv64) == 98bv8); - free requires (memory_load8_le(mem, 2309bv64) == 108bv8); - free requires (memory_load8_le(mem, 2310bv64) == 101bv8); - free requires (memory_load8_le(mem, 2311bv64) == 32bv8); - free requires (memory_load8_le(mem, 2312bv64) == 105bv8); - free requires (memory_load8_le(mem, 2313bv64) == 115bv8); - free requires (memory_load8_le(mem, 2314bv64) == 58bv8); - free requires (memory_load8_le(mem, 2315bv64) == 32bv8); - free requires (memory_load8_le(mem, 2316bv64) == 37bv8); - free requires (memory_load8_le(mem, 2317bv64) == 100bv8); - free requires (memory_load8_le(mem, 2318bv64) == 10bv8); - free requires (memory_load8_le(mem, 2319bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 8bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 8bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2256bv64) == 1bv8); - free ensures (memory_load8_le(mem, 2257bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2258bv64) == 2bv8); - free ensures (memory_load8_le(mem, 2259bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2260bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2261bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2262bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2263bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2264bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2265bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2266bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2267bv64) == 114bv8); - free ensures (memory_load8_le(mem, 2268bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2269bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2270bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2271bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2272bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2273bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2274bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2275bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2276bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2277bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2278bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2279bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2280bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2281bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2282bv64) == 110bv8); - free ensures (memory_load8_le(mem, 2283bv64) == 116bv8); - free ensures (memory_load8_le(mem, 2284bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2285bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2286bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2287bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2288bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2289bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2290bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2291bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2292bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2293bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2294bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2295bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2296bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2297bv64) == 108bv8); - free ensures (memory_load8_le(mem, 2298bv64) == 111bv8); - free ensures (memory_load8_le(mem, 2299bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2300bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2301bv64) == 108bv8); - free ensures (memory_load8_le(mem, 2302bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2303bv64) == 118bv8); - free ensures (memory_load8_le(mem, 2304bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2305bv64) == 114bv8); - free ensures (memory_load8_le(mem, 2306bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2307bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2308bv64) == 98bv8); - free ensures (memory_load8_le(mem, 2309bv64) == 108bv8); - free ensures (memory_load8_le(mem, 2310bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2311bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2312bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2313bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2314bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2315bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2316bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2317bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2318bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2319bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 2256bv64) == 2334386691848142849bv64); + free requires (memory_load64_le(mem, 2264bv64) == 4211825664600402019bv64); + free requires (memory_load64_le(mem, 2272bv64) == 7307182754559632672bv64); + free requires (memory_load64_le(mem, 2280bv64) == 4211825664634808608bv64); + free requires (memory_load64_le(mem, 2288bv64) == 7307182754559698208bv64); + free requires (memory_load64_le(mem, 2296bv64) == 8511922461266111520bv64); + free requires (memory_load64_le(mem, 2304bv64) == 2334391151658365537bv64); + free requires (memory_load64_le(mem, 2312bv64) == 2924860384375657bv64); + free requires (memory_load64_le(mem, 69064bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); + free ensures (memory_load64_le(mem, 2256bv64) == 2334386691848142849bv64); + free ensures (memory_load64_le(mem, 2264bv64) == 4211825664600402019bv64); + free ensures (memory_load64_le(mem, 2272bv64) == 7307182754559632672bv64); + free ensures (memory_load64_le(mem, 2280bv64) == 4211825664634808608bv64); + free ensures (memory_load64_le(mem, 2288bv64) == 7307182754559698208bv64); + free ensures (memory_load64_le(mem, 2296bv64) == 8511922461266111520bv64); + free ensures (memory_load64_le(mem, 2304bv64) == 2334391151658365537bv64); + free ensures (memory_load64_le(mem, 2312bv64) == 2924860384375657bv64); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); procedure printf(); modifies Gamma_R16, Gamma_R17, R16, R17; - free requires (memory_load8_le(mem, 2256bv64) == 1bv8); - free requires (memory_load8_le(mem, 2257bv64) == 0bv8); - free requires (memory_load8_le(mem, 2258bv64) == 2bv8); - free requires (memory_load8_le(mem, 2259bv64) == 0bv8); - free requires (memory_load8_le(mem, 2260bv64) == 84bv8); - free requires (memory_load8_le(mem, 2261bv64) == 104bv8); - free requires (memory_load8_le(mem, 2262bv64) == 101bv8); - free requires (memory_load8_le(mem, 2263bv64) == 32bv8); - free requires (memory_load8_le(mem, 2264bv64) == 99bv8); - free requires (memory_load8_le(mem, 2265bv64) == 104bv8); - free requires (memory_load8_le(mem, 2266bv64) == 97bv8); - free requires (memory_load8_le(mem, 2267bv64) == 114bv8); - free requires (memory_load8_le(mem, 2268bv64) == 32bv8); - free requires (memory_load8_le(mem, 2269bv64) == 105bv8); - free requires (memory_load8_le(mem, 2270bv64) == 115bv8); - free requires (memory_load8_le(mem, 2271bv64) == 58bv8); - free requires (memory_load8_le(mem, 2272bv64) == 32bv8); - free requires (memory_load8_le(mem, 2273bv64) == 37bv8); - free requires (memory_load8_le(mem, 2274bv64) == 99bv8); - free requires (memory_load8_le(mem, 2275bv64) == 10bv8); - free requires (memory_load8_le(mem, 2276bv64) == 0bv8); - free requires (memory_load8_le(mem, 2277bv64) == 84bv8); - free requires (memory_load8_le(mem, 2278bv64) == 104bv8); - free requires (memory_load8_le(mem, 2279bv64) == 101bv8); - free requires (memory_load8_le(mem, 2280bv64) == 32bv8); - free requires (memory_load8_le(mem, 2281bv64) == 105bv8); - free requires (memory_load8_le(mem, 2282bv64) == 110bv8); - free requires (memory_load8_le(mem, 2283bv64) == 116bv8); - free requires (memory_load8_le(mem, 2284bv64) == 32bv8); - free requires (memory_load8_le(mem, 2285bv64) == 105bv8); - free requires (memory_load8_le(mem, 2286bv64) == 115bv8); - free requires (memory_load8_le(mem, 2287bv64) == 58bv8); - free requires (memory_load8_le(mem, 2288bv64) == 32bv8); - free requires (memory_load8_le(mem, 2289bv64) == 37bv8); - free requires (memory_load8_le(mem, 2290bv64) == 100bv8); - free requires (memory_load8_le(mem, 2291bv64) == 10bv8); - free requires (memory_load8_le(mem, 2292bv64) == 0bv8); - free requires (memory_load8_le(mem, 2293bv64) == 84bv8); - free requires (memory_load8_le(mem, 2294bv64) == 104bv8); - free requires (memory_load8_le(mem, 2295bv64) == 101bv8); - free requires (memory_load8_le(mem, 2296bv64) == 32bv8); - free requires (memory_load8_le(mem, 2297bv64) == 108bv8); - free requires (memory_load8_le(mem, 2298bv64) == 111bv8); - free requires (memory_load8_le(mem, 2299bv64) == 99bv8); - free requires (memory_load8_le(mem, 2300bv64) == 97bv8); - free requires (memory_load8_le(mem, 2301bv64) == 108bv8); - free requires (memory_load8_le(mem, 2302bv64) == 32bv8); - free requires (memory_load8_le(mem, 2303bv64) == 118bv8); - free requires (memory_load8_le(mem, 2304bv64) == 97bv8); - free requires (memory_load8_le(mem, 2305bv64) == 114bv8); - free requires (memory_load8_le(mem, 2306bv64) == 105bv8); - free requires (memory_load8_le(mem, 2307bv64) == 97bv8); - free requires (memory_load8_le(mem, 2308bv64) == 98bv8); - free requires (memory_load8_le(mem, 2309bv64) == 108bv8); - free requires (memory_load8_le(mem, 2310bv64) == 101bv8); - free requires (memory_load8_le(mem, 2311bv64) == 32bv8); - free requires (memory_load8_le(mem, 2312bv64) == 105bv8); - free requires (memory_load8_le(mem, 2313bv64) == 115bv8); - free requires (memory_load8_le(mem, 2314bv64) == 58bv8); - free requires (memory_load8_le(mem, 2315bv64) == 32bv8); - free requires (memory_load8_le(mem, 2316bv64) == 37bv8); - free requires (memory_load8_le(mem, 2317bv64) == 100bv8); - free requires (memory_load8_le(mem, 2318bv64) == 10bv8); - free requires (memory_load8_le(mem, 2319bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 8bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 8bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2256bv64) == 1bv8); - free ensures (memory_load8_le(mem, 2257bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2258bv64) == 2bv8); - free ensures (memory_load8_le(mem, 2259bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2260bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2261bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2262bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2263bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2264bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2265bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2266bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2267bv64) == 114bv8); - free ensures (memory_load8_le(mem, 2268bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2269bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2270bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2271bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2272bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2273bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2274bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2275bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2276bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2277bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2278bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2279bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2280bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2281bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2282bv64) == 110bv8); - free ensures (memory_load8_le(mem, 2283bv64) == 116bv8); - free ensures (memory_load8_le(mem, 2284bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2285bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2286bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2287bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2288bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2289bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2290bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2291bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2292bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2293bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2294bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2295bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2296bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2297bv64) == 108bv8); - free ensures (memory_load8_le(mem, 2298bv64) == 111bv8); - free ensures (memory_load8_le(mem, 2299bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2300bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2301bv64) == 108bv8); - free ensures (memory_load8_le(mem, 2302bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2303bv64) == 118bv8); - free ensures (memory_load8_le(mem, 2304bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2305bv64) == 114bv8); - free ensures (memory_load8_le(mem, 2306bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2307bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2308bv64) == 98bv8); - free ensures (memory_load8_le(mem, 2309bv64) == 108bv8); - free ensures (memory_load8_le(mem, 2310bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2311bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2312bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2313bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2314bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2315bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2316bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2317bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2318bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2319bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 2256bv64) == 2334386691848142849bv64); + free requires (memory_load64_le(mem, 2264bv64) == 4211825664600402019bv64); + free requires (memory_load64_le(mem, 2272bv64) == 7307182754559632672bv64); + free requires (memory_load64_le(mem, 2280bv64) == 4211825664634808608bv64); + free requires (memory_load64_le(mem, 2288bv64) == 7307182754559698208bv64); + free requires (memory_load64_le(mem, 2296bv64) == 8511922461266111520bv64); + free requires (memory_load64_le(mem, 2304bv64) == 2334391151658365537bv64); + free requires (memory_load64_le(mem, 2312bv64) == 2924860384375657bv64); + free requires (memory_load64_le(mem, 69064bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); + free ensures (memory_load64_le(mem, 2256bv64) == 2334386691848142849bv64); + free ensures (memory_load64_le(mem, 2264bv64) == 4211825664600402019bv64); + free ensures (memory_load64_le(mem, 2272bv64) == 7307182754559632672bv64); + free ensures (memory_load64_le(mem, 2280bv64) == 4211825664634808608bv64); + free ensures (memory_load64_le(mem, 2288bv64) == 7307182754559698208bv64); + free ensures (memory_load64_le(mem, 2296bv64) == 8511922461266111520bv64); + free ensures (memory_load64_le(mem, 2304bv64) == 2334391151658365537bv64); + free ensures (memory_load64_le(mem, 2312bv64) == 2924860384375657bv64); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); + diff --git a/src/test/correct/malloc_with_local/clang_pic/malloc_with_local.expected b/src/test/correct/malloc_with_local/clang_pic/malloc_with_local.expected index 07ac928d3..a6a35f93d 100644 --- a/src/test/correct/malloc_with_local/clang_pic/malloc_with_local.expected +++ b/src/test/correct/malloc_with_local/clang_pic/malloc_with_local.expected @@ -81,107 +81,25 @@ procedure {:extern} rely(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); - free ensures (memory_load8_le(mem, 2256bv64) == 1bv8); - free ensures (memory_load8_le(mem, 2257bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2258bv64) == 2bv8); - free ensures (memory_load8_le(mem, 2259bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2260bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2261bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2262bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2263bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2264bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2265bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2266bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2267bv64) == 114bv8); - free ensures (memory_load8_le(mem, 2268bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2269bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2270bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2271bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2272bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2273bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2274bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2275bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2276bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2277bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2278bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2279bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2280bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2281bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2282bv64) == 110bv8); - free ensures (memory_load8_le(mem, 2283bv64) == 116bv8); - free ensures (memory_load8_le(mem, 2284bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2285bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2286bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2287bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2288bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2289bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2290bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2291bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2292bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2293bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2294bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2295bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2296bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2297bv64) == 108bv8); - free ensures (memory_load8_le(mem, 2298bv64) == 111bv8); - free ensures (memory_load8_le(mem, 2299bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2300bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2301bv64) == 108bv8); - free ensures (memory_load8_le(mem, 2302bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2303bv64) == 118bv8); - free ensures (memory_load8_le(mem, 2304bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2305bv64) == 114bv8); - free ensures (memory_load8_le(mem, 2306bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2307bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2308bv64) == 98bv8); - free ensures (memory_load8_le(mem, 2309bv64) == 108bv8); - free ensures (memory_load8_le(mem, 2310bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2311bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2312bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2313bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2314bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2315bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2316bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2317bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2318bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2319bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 2256bv64) == 2334386691848142849bv64); + free ensures (memory_load64_le(mem, 2264bv64) == 4211825664600402019bv64); + free ensures (memory_load64_le(mem, 2272bv64) == 7307182754559632672bv64); + free ensures (memory_load64_le(mem, 2280bv64) == 4211825664634808608bv64); + free ensures (memory_load64_le(mem, 2288bv64) == 7307182754559698208bv64); + free ensures (memory_load64_le(mem, 2296bv64) == 8511922461266111520bv64); + free ensures (memory_load64_le(mem, 2304bv64) == 2334391151658365537bv64); + free ensures (memory_load64_le(mem, 2312bv64) == 2924860384375657bv64); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -194,413 +112,65 @@ procedure {:extern} guarantee_reflexive(); procedure #free(); modifies Gamma_R16, Gamma_R17, R16, R17; - free requires (memory_load8_le(mem, 2256bv64) == 1bv8); - free requires (memory_load8_le(mem, 2257bv64) == 0bv8); - free requires (memory_load8_le(mem, 2258bv64) == 2bv8); - free requires (memory_load8_le(mem, 2259bv64) == 0bv8); - free requires (memory_load8_le(mem, 2260bv64) == 84bv8); - free requires (memory_load8_le(mem, 2261bv64) == 104bv8); - free requires (memory_load8_le(mem, 2262bv64) == 101bv8); - free requires (memory_load8_le(mem, 2263bv64) == 32bv8); - free requires (memory_load8_le(mem, 2264bv64) == 99bv8); - free requires (memory_load8_le(mem, 2265bv64) == 104bv8); - free requires (memory_load8_le(mem, 2266bv64) == 97bv8); - free requires (memory_load8_le(mem, 2267bv64) == 114bv8); - free requires (memory_load8_le(mem, 2268bv64) == 32bv8); - free requires (memory_load8_le(mem, 2269bv64) == 105bv8); - free requires (memory_load8_le(mem, 2270bv64) == 115bv8); - free requires (memory_load8_le(mem, 2271bv64) == 58bv8); - free requires (memory_load8_le(mem, 2272bv64) == 32bv8); - free requires (memory_load8_le(mem, 2273bv64) == 37bv8); - free requires (memory_load8_le(mem, 2274bv64) == 99bv8); - free requires (memory_load8_le(mem, 2275bv64) == 10bv8); - free requires (memory_load8_le(mem, 2276bv64) == 0bv8); - free requires (memory_load8_le(mem, 2277bv64) == 84bv8); - free requires (memory_load8_le(mem, 2278bv64) == 104bv8); - free requires (memory_load8_le(mem, 2279bv64) == 101bv8); - free requires (memory_load8_le(mem, 2280bv64) == 32bv8); - free requires (memory_load8_le(mem, 2281bv64) == 105bv8); - free requires (memory_load8_le(mem, 2282bv64) == 110bv8); - free requires (memory_load8_le(mem, 2283bv64) == 116bv8); - free requires (memory_load8_le(mem, 2284bv64) == 32bv8); - free requires (memory_load8_le(mem, 2285bv64) == 105bv8); - free requires (memory_load8_le(mem, 2286bv64) == 115bv8); - free requires (memory_load8_le(mem, 2287bv64) == 58bv8); - free requires (memory_load8_le(mem, 2288bv64) == 32bv8); - free requires (memory_load8_le(mem, 2289bv64) == 37bv8); - free requires (memory_load8_le(mem, 2290bv64) == 100bv8); - free requires (memory_load8_le(mem, 2291bv64) == 10bv8); - free requires (memory_load8_le(mem, 2292bv64) == 0bv8); - free requires (memory_load8_le(mem, 2293bv64) == 84bv8); - free requires (memory_load8_le(mem, 2294bv64) == 104bv8); - free requires (memory_load8_le(mem, 2295bv64) == 101bv8); - free requires (memory_load8_le(mem, 2296bv64) == 32bv8); - free requires (memory_load8_le(mem, 2297bv64) == 108bv8); - free requires (memory_load8_le(mem, 2298bv64) == 111bv8); - free requires (memory_load8_le(mem, 2299bv64) == 99bv8); - free requires (memory_load8_le(mem, 2300bv64) == 97bv8); - free requires (memory_load8_le(mem, 2301bv64) == 108bv8); - free requires (memory_load8_le(mem, 2302bv64) == 32bv8); - free requires (memory_load8_le(mem, 2303bv64) == 118bv8); - free requires (memory_load8_le(mem, 2304bv64) == 97bv8); - free requires (memory_load8_le(mem, 2305bv64) == 114bv8); - free requires (memory_load8_le(mem, 2306bv64) == 105bv8); - free requires (memory_load8_le(mem, 2307bv64) == 97bv8); - free requires (memory_load8_le(mem, 2308bv64) == 98bv8); - free requires (memory_load8_le(mem, 2309bv64) == 108bv8); - free requires (memory_load8_le(mem, 2310bv64) == 101bv8); - free requires (memory_load8_le(mem, 2311bv64) == 32bv8); - free requires (memory_load8_le(mem, 2312bv64) == 105bv8); - free requires (memory_load8_le(mem, 2313bv64) == 115bv8); - free requires (memory_load8_le(mem, 2314bv64) == 58bv8); - free requires (memory_load8_le(mem, 2315bv64) == 32bv8); - free requires (memory_load8_le(mem, 2316bv64) == 37bv8); - free requires (memory_load8_le(mem, 2317bv64) == 100bv8); - free requires (memory_load8_le(mem, 2318bv64) == 10bv8); - free requires (memory_load8_le(mem, 2319bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 8bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 8bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2256bv64) == 1bv8); - free ensures (memory_load8_le(mem, 2257bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2258bv64) == 2bv8); - free ensures (memory_load8_le(mem, 2259bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2260bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2261bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2262bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2263bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2264bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2265bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2266bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2267bv64) == 114bv8); - free ensures (memory_load8_le(mem, 2268bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2269bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2270bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2271bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2272bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2273bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2274bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2275bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2276bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2277bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2278bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2279bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2280bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2281bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2282bv64) == 110bv8); - free ensures (memory_load8_le(mem, 2283bv64) == 116bv8); - free ensures (memory_load8_le(mem, 2284bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2285bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2286bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2287bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2288bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2289bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2290bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2291bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2292bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2293bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2294bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2295bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2296bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2297bv64) == 108bv8); - free ensures (memory_load8_le(mem, 2298bv64) == 111bv8); - free ensures (memory_load8_le(mem, 2299bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2300bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2301bv64) == 108bv8); - free ensures (memory_load8_le(mem, 2302bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2303bv64) == 118bv8); - free ensures (memory_load8_le(mem, 2304bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2305bv64) == 114bv8); - free ensures (memory_load8_le(mem, 2306bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2307bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2308bv64) == 98bv8); - free ensures (memory_load8_le(mem, 2309bv64) == 108bv8); - free ensures (memory_load8_le(mem, 2310bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2311bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2312bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2313bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2314bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2315bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2316bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2317bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2318bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2319bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 2256bv64) == 2334386691848142849bv64); + free requires (memory_load64_le(mem, 2264bv64) == 4211825664600402019bv64); + free requires (memory_load64_le(mem, 2272bv64) == 7307182754559632672bv64); + free requires (memory_load64_le(mem, 2280bv64) == 4211825664634808608bv64); + free requires (memory_load64_le(mem, 2288bv64) == 7307182754559698208bv64); + free requires (memory_load64_le(mem, 2296bv64) == 8511922461266111520bv64); + free requires (memory_load64_le(mem, 2304bv64) == 2334391151658365537bv64); + free requires (memory_load64_le(mem, 2312bv64) == 2924860384375657bv64); + free requires (memory_load64_le(mem, 69064bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); + free ensures (memory_load64_le(mem, 2256bv64) == 2334386691848142849bv64); + free ensures (memory_load64_le(mem, 2264bv64) == 4211825664600402019bv64); + free ensures (memory_load64_le(mem, 2272bv64) == 7307182754559632672bv64); + free ensures (memory_load64_le(mem, 2280bv64) == 4211825664634808608bv64); + free ensures (memory_load64_le(mem, 2288bv64) == 7307182754559698208bv64); + free ensures (memory_load64_le(mem, 2296bv64) == 8511922461266111520bv64); + free ensures (memory_load64_le(mem, 2304bv64) == 2334391151658365537bv64); + free ensures (memory_load64_le(mem, 2312bv64) == 2924860384375657bv64); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R16, Gamma_R17, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R1, R16, R17, R29, R30, R31, R8, R9, mem, stack; - free requires (memory_load8_le(mem, 69688bv64) == 0bv8); - free requires (memory_load8_le(mem, 69689bv64) == 0bv8); - free requires (memory_load8_le(mem, 69690bv64) == 0bv8); - free requires (memory_load8_le(mem, 69691bv64) == 0bv8); - free requires (memory_load8_le(mem, 69692bv64) == 0bv8); - free requires (memory_load8_le(mem, 69693bv64) == 0bv8); - free requires (memory_load8_le(mem, 69694bv64) == 0bv8); - free requires (memory_load8_le(mem, 69695bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); - free requires (memory_load8_le(mem, 2256bv64) == 1bv8); - free requires (memory_load8_le(mem, 2257bv64) == 0bv8); - free requires (memory_load8_le(mem, 2258bv64) == 2bv8); - free requires (memory_load8_le(mem, 2259bv64) == 0bv8); - free requires (memory_load8_le(mem, 2260bv64) == 84bv8); - free requires (memory_load8_le(mem, 2261bv64) == 104bv8); - free requires (memory_load8_le(mem, 2262bv64) == 101bv8); - free requires (memory_load8_le(mem, 2263bv64) == 32bv8); - free requires (memory_load8_le(mem, 2264bv64) == 99bv8); - free requires (memory_load8_le(mem, 2265bv64) == 104bv8); - free requires (memory_load8_le(mem, 2266bv64) == 97bv8); - free requires (memory_load8_le(mem, 2267bv64) == 114bv8); - free requires (memory_load8_le(mem, 2268bv64) == 32bv8); - free requires (memory_load8_le(mem, 2269bv64) == 105bv8); - free requires (memory_load8_le(mem, 2270bv64) == 115bv8); - free requires (memory_load8_le(mem, 2271bv64) == 58bv8); - free requires (memory_load8_le(mem, 2272bv64) == 32bv8); - free requires (memory_load8_le(mem, 2273bv64) == 37bv8); - free requires (memory_load8_le(mem, 2274bv64) == 99bv8); - free requires (memory_load8_le(mem, 2275bv64) == 10bv8); - free requires (memory_load8_le(mem, 2276bv64) == 0bv8); - free requires (memory_load8_le(mem, 2277bv64) == 84bv8); - free requires (memory_load8_le(mem, 2278bv64) == 104bv8); - free requires (memory_load8_le(mem, 2279bv64) == 101bv8); - free requires (memory_load8_le(mem, 2280bv64) == 32bv8); - free requires (memory_load8_le(mem, 2281bv64) == 105bv8); - free requires (memory_load8_le(mem, 2282bv64) == 110bv8); - free requires (memory_load8_le(mem, 2283bv64) == 116bv8); - free requires (memory_load8_le(mem, 2284bv64) == 32bv8); - free requires (memory_load8_le(mem, 2285bv64) == 105bv8); - free requires (memory_load8_le(mem, 2286bv64) == 115bv8); - free requires (memory_load8_le(mem, 2287bv64) == 58bv8); - free requires (memory_load8_le(mem, 2288bv64) == 32bv8); - free requires (memory_load8_le(mem, 2289bv64) == 37bv8); - free requires (memory_load8_le(mem, 2290bv64) == 100bv8); - free requires (memory_load8_le(mem, 2291bv64) == 10bv8); - free requires (memory_load8_le(mem, 2292bv64) == 0bv8); - free requires (memory_load8_le(mem, 2293bv64) == 84bv8); - free requires (memory_load8_le(mem, 2294bv64) == 104bv8); - free requires (memory_load8_le(mem, 2295bv64) == 101bv8); - free requires (memory_load8_le(mem, 2296bv64) == 32bv8); - free requires (memory_load8_le(mem, 2297bv64) == 108bv8); - free requires (memory_load8_le(mem, 2298bv64) == 111bv8); - free requires (memory_load8_le(mem, 2299bv64) == 99bv8); - free requires (memory_load8_le(mem, 2300bv64) == 97bv8); - free requires (memory_load8_le(mem, 2301bv64) == 108bv8); - free requires (memory_load8_le(mem, 2302bv64) == 32bv8); - free requires (memory_load8_le(mem, 2303bv64) == 118bv8); - free requires (memory_load8_le(mem, 2304bv64) == 97bv8); - free requires (memory_load8_le(mem, 2305bv64) == 114bv8); - free requires (memory_load8_le(mem, 2306bv64) == 105bv8); - free requires (memory_load8_le(mem, 2307bv64) == 97bv8); - free requires (memory_load8_le(mem, 2308bv64) == 98bv8); - free requires (memory_load8_le(mem, 2309bv64) == 108bv8); - free requires (memory_load8_le(mem, 2310bv64) == 101bv8); - free requires (memory_load8_le(mem, 2311bv64) == 32bv8); - free requires (memory_load8_le(mem, 2312bv64) == 105bv8); - free requires (memory_load8_le(mem, 2313bv64) == 115bv8); - free requires (memory_load8_le(mem, 2314bv64) == 58bv8); - free requires (memory_load8_le(mem, 2315bv64) == 32bv8); - free requires (memory_load8_le(mem, 2316bv64) == 37bv8); - free requires (memory_load8_le(mem, 2317bv64) == 100bv8); - free requires (memory_load8_le(mem, 2318bv64) == 10bv8); - free requires (memory_load8_le(mem, 2319bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 8bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 8bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69688bv64) == 0bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); + free requires (memory_load64_le(mem, 2256bv64) == 2334386691848142849bv64); + free requires (memory_load64_le(mem, 2264bv64) == 4211825664600402019bv64); + free requires (memory_load64_le(mem, 2272bv64) == 7307182754559632672bv64); + free requires (memory_load64_le(mem, 2280bv64) == 4211825664634808608bv64); + free requires (memory_load64_le(mem, 2288bv64) == 7307182754559698208bv64); + free requires (memory_load64_le(mem, 2296bv64) == 8511922461266111520bv64); + free requires (memory_load64_le(mem, 2304bv64) == 2334391151658365537bv64); + free requires (memory_load64_le(mem, 2312bv64) == 2924860384375657bv64); + free requires (memory_load64_le(mem, 69064bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); free ensures (R31 == old(R31)); - free ensures (memory_load8_le(mem, 2256bv64) == 1bv8); - free ensures (memory_load8_le(mem, 2257bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2258bv64) == 2bv8); - free ensures (memory_load8_le(mem, 2259bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2260bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2261bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2262bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2263bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2264bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2265bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2266bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2267bv64) == 114bv8); - free ensures (memory_load8_le(mem, 2268bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2269bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2270bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2271bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2272bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2273bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2274bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2275bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2276bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2277bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2278bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2279bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2280bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2281bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2282bv64) == 110bv8); - free ensures (memory_load8_le(mem, 2283bv64) == 116bv8); - free ensures (memory_load8_le(mem, 2284bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2285bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2286bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2287bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2288bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2289bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2290bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2291bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2292bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2293bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2294bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2295bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2296bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2297bv64) == 108bv8); - free ensures (memory_load8_le(mem, 2298bv64) == 111bv8); - free ensures (memory_load8_le(mem, 2299bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2300bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2301bv64) == 108bv8); - free ensures (memory_load8_le(mem, 2302bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2303bv64) == 118bv8); - free ensures (memory_load8_le(mem, 2304bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2305bv64) == 114bv8); - free ensures (memory_load8_le(mem, 2306bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2307bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2308bv64) == 98bv8); - free ensures (memory_load8_le(mem, 2309bv64) == 108bv8); - free ensures (memory_load8_le(mem, 2310bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2311bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2312bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2313bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2314bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2315bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2316bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2317bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2318bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2319bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 2256bv64) == 2334386691848142849bv64); + free ensures (memory_load64_le(mem, 2264bv64) == 4211825664600402019bv64); + free ensures (memory_load64_le(mem, 2272bv64) == 7307182754559632672bv64); + free ensures (memory_load64_le(mem, 2280bv64) == 4211825664634808608bv64); + free ensures (memory_load64_le(mem, 2288bv64) == 7307182754559698208bv64); + free ensures (memory_load64_le(mem, 2296bv64) == 8511922461266111520bv64); + free ensures (memory_load64_le(mem, 2304bv64) == 2334391151658365537bv64); + free ensures (memory_load64_le(mem, 2312bv64) == 2924860384375657bv64); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); + +implementation main() { var #4: bv64; var #5: bv64; @@ -701,390 +271,55 @@ procedure main() procedure malloc(); modifies Gamma_R16, Gamma_R17, R16, R17; - free requires (memory_load8_le(mem, 2256bv64) == 1bv8); - free requires (memory_load8_le(mem, 2257bv64) == 0bv8); - free requires (memory_load8_le(mem, 2258bv64) == 2bv8); - free requires (memory_load8_le(mem, 2259bv64) == 0bv8); - free requires (memory_load8_le(mem, 2260bv64) == 84bv8); - free requires (memory_load8_le(mem, 2261bv64) == 104bv8); - free requires (memory_load8_le(mem, 2262bv64) == 101bv8); - free requires (memory_load8_le(mem, 2263bv64) == 32bv8); - free requires (memory_load8_le(mem, 2264bv64) == 99bv8); - free requires (memory_load8_le(mem, 2265bv64) == 104bv8); - free requires (memory_load8_le(mem, 2266bv64) == 97bv8); - free requires (memory_load8_le(mem, 2267bv64) == 114bv8); - free requires (memory_load8_le(mem, 2268bv64) == 32bv8); - free requires (memory_load8_le(mem, 2269bv64) == 105bv8); - free requires (memory_load8_le(mem, 2270bv64) == 115bv8); - free requires (memory_load8_le(mem, 2271bv64) == 58bv8); - free requires (memory_load8_le(mem, 2272bv64) == 32bv8); - free requires (memory_load8_le(mem, 2273bv64) == 37bv8); - free requires (memory_load8_le(mem, 2274bv64) == 99bv8); - free requires (memory_load8_le(mem, 2275bv64) == 10bv8); - free requires (memory_load8_le(mem, 2276bv64) == 0bv8); - free requires (memory_load8_le(mem, 2277bv64) == 84bv8); - free requires (memory_load8_le(mem, 2278bv64) == 104bv8); - free requires (memory_load8_le(mem, 2279bv64) == 101bv8); - free requires (memory_load8_le(mem, 2280bv64) == 32bv8); - free requires (memory_load8_le(mem, 2281bv64) == 105bv8); - free requires (memory_load8_le(mem, 2282bv64) == 110bv8); - free requires (memory_load8_le(mem, 2283bv64) == 116bv8); - free requires (memory_load8_le(mem, 2284bv64) == 32bv8); - free requires (memory_load8_le(mem, 2285bv64) == 105bv8); - free requires (memory_load8_le(mem, 2286bv64) == 115bv8); - free requires (memory_load8_le(mem, 2287bv64) == 58bv8); - free requires (memory_load8_le(mem, 2288bv64) == 32bv8); - free requires (memory_load8_le(mem, 2289bv64) == 37bv8); - free requires (memory_load8_le(mem, 2290bv64) == 100bv8); - free requires (memory_load8_le(mem, 2291bv64) == 10bv8); - free requires (memory_load8_le(mem, 2292bv64) == 0bv8); - free requires (memory_load8_le(mem, 2293bv64) == 84bv8); - free requires (memory_load8_le(mem, 2294bv64) == 104bv8); - free requires (memory_load8_le(mem, 2295bv64) == 101bv8); - free requires (memory_load8_le(mem, 2296bv64) == 32bv8); - free requires (memory_load8_le(mem, 2297bv64) == 108bv8); - free requires (memory_load8_le(mem, 2298bv64) == 111bv8); - free requires (memory_load8_le(mem, 2299bv64) == 99bv8); - free requires (memory_load8_le(mem, 2300bv64) == 97bv8); - free requires (memory_load8_le(mem, 2301bv64) == 108bv8); - free requires (memory_load8_le(mem, 2302bv64) == 32bv8); - free requires (memory_load8_le(mem, 2303bv64) == 118bv8); - free requires (memory_load8_le(mem, 2304bv64) == 97bv8); - free requires (memory_load8_le(mem, 2305bv64) == 114bv8); - free requires (memory_load8_le(mem, 2306bv64) == 105bv8); - free requires (memory_load8_le(mem, 2307bv64) == 97bv8); - free requires (memory_load8_le(mem, 2308bv64) == 98bv8); - free requires (memory_load8_le(mem, 2309bv64) == 108bv8); - free requires (memory_load8_le(mem, 2310bv64) == 101bv8); - free requires (memory_load8_le(mem, 2311bv64) == 32bv8); - free requires (memory_load8_le(mem, 2312bv64) == 105bv8); - free requires (memory_load8_le(mem, 2313bv64) == 115bv8); - free requires (memory_load8_le(mem, 2314bv64) == 58bv8); - free requires (memory_load8_le(mem, 2315bv64) == 32bv8); - free requires (memory_load8_le(mem, 2316bv64) == 37bv8); - free requires (memory_load8_le(mem, 2317bv64) == 100bv8); - free requires (memory_load8_le(mem, 2318bv64) == 10bv8); - free requires (memory_load8_le(mem, 2319bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 8bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 8bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2256bv64) == 1bv8); - free ensures (memory_load8_le(mem, 2257bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2258bv64) == 2bv8); - free ensures (memory_load8_le(mem, 2259bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2260bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2261bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2262bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2263bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2264bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2265bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2266bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2267bv64) == 114bv8); - free ensures (memory_load8_le(mem, 2268bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2269bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2270bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2271bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2272bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2273bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2274bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2275bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2276bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2277bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2278bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2279bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2280bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2281bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2282bv64) == 110bv8); - free ensures (memory_load8_le(mem, 2283bv64) == 116bv8); - free ensures (memory_load8_le(mem, 2284bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2285bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2286bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2287bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2288bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2289bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2290bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2291bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2292bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2293bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2294bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2295bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2296bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2297bv64) == 108bv8); - free ensures (memory_load8_le(mem, 2298bv64) == 111bv8); - free ensures (memory_load8_le(mem, 2299bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2300bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2301bv64) == 108bv8); - free ensures (memory_load8_le(mem, 2302bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2303bv64) == 118bv8); - free ensures (memory_load8_le(mem, 2304bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2305bv64) == 114bv8); - free ensures (memory_load8_le(mem, 2306bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2307bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2308bv64) == 98bv8); - free ensures (memory_load8_le(mem, 2309bv64) == 108bv8); - free ensures (memory_load8_le(mem, 2310bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2311bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2312bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2313bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2314bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2315bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2316bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2317bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2318bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2319bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 2256bv64) == 2334386691848142849bv64); + free requires (memory_load64_le(mem, 2264bv64) == 4211825664600402019bv64); + free requires (memory_load64_le(mem, 2272bv64) == 7307182754559632672bv64); + free requires (memory_load64_le(mem, 2280bv64) == 4211825664634808608bv64); + free requires (memory_load64_le(mem, 2288bv64) == 7307182754559698208bv64); + free requires (memory_load64_le(mem, 2296bv64) == 8511922461266111520bv64); + free requires (memory_load64_le(mem, 2304bv64) == 2334391151658365537bv64); + free requires (memory_load64_le(mem, 2312bv64) == 2924860384375657bv64); + free requires (memory_load64_le(mem, 69064bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); + free ensures (memory_load64_le(mem, 2256bv64) == 2334386691848142849bv64); + free ensures (memory_load64_le(mem, 2264bv64) == 4211825664600402019bv64); + free ensures (memory_load64_le(mem, 2272bv64) == 7307182754559632672bv64); + free ensures (memory_load64_le(mem, 2280bv64) == 4211825664634808608bv64); + free ensures (memory_load64_le(mem, 2288bv64) == 7307182754559698208bv64); + free ensures (memory_load64_le(mem, 2296bv64) == 8511922461266111520bv64); + free ensures (memory_load64_le(mem, 2304bv64) == 2334391151658365537bv64); + free ensures (memory_load64_le(mem, 2312bv64) == 2924860384375657bv64); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); procedure printf(); modifies Gamma_R16, Gamma_R17, R16, R17; - free requires (memory_load8_le(mem, 2256bv64) == 1bv8); - free requires (memory_load8_le(mem, 2257bv64) == 0bv8); - free requires (memory_load8_le(mem, 2258bv64) == 2bv8); - free requires (memory_load8_le(mem, 2259bv64) == 0bv8); - free requires (memory_load8_le(mem, 2260bv64) == 84bv8); - free requires (memory_load8_le(mem, 2261bv64) == 104bv8); - free requires (memory_load8_le(mem, 2262bv64) == 101bv8); - free requires (memory_load8_le(mem, 2263bv64) == 32bv8); - free requires (memory_load8_le(mem, 2264bv64) == 99bv8); - free requires (memory_load8_le(mem, 2265bv64) == 104bv8); - free requires (memory_load8_le(mem, 2266bv64) == 97bv8); - free requires (memory_load8_le(mem, 2267bv64) == 114bv8); - free requires (memory_load8_le(mem, 2268bv64) == 32bv8); - free requires (memory_load8_le(mem, 2269bv64) == 105bv8); - free requires (memory_load8_le(mem, 2270bv64) == 115bv8); - free requires (memory_load8_le(mem, 2271bv64) == 58bv8); - free requires (memory_load8_le(mem, 2272bv64) == 32bv8); - free requires (memory_load8_le(mem, 2273bv64) == 37bv8); - free requires (memory_load8_le(mem, 2274bv64) == 99bv8); - free requires (memory_load8_le(mem, 2275bv64) == 10bv8); - free requires (memory_load8_le(mem, 2276bv64) == 0bv8); - free requires (memory_load8_le(mem, 2277bv64) == 84bv8); - free requires (memory_load8_le(mem, 2278bv64) == 104bv8); - free requires (memory_load8_le(mem, 2279bv64) == 101bv8); - free requires (memory_load8_le(mem, 2280bv64) == 32bv8); - free requires (memory_load8_le(mem, 2281bv64) == 105bv8); - free requires (memory_load8_le(mem, 2282bv64) == 110bv8); - free requires (memory_load8_le(mem, 2283bv64) == 116bv8); - free requires (memory_load8_le(mem, 2284bv64) == 32bv8); - free requires (memory_load8_le(mem, 2285bv64) == 105bv8); - free requires (memory_load8_le(mem, 2286bv64) == 115bv8); - free requires (memory_load8_le(mem, 2287bv64) == 58bv8); - free requires (memory_load8_le(mem, 2288bv64) == 32bv8); - free requires (memory_load8_le(mem, 2289bv64) == 37bv8); - free requires (memory_load8_le(mem, 2290bv64) == 100bv8); - free requires (memory_load8_le(mem, 2291bv64) == 10bv8); - free requires (memory_load8_le(mem, 2292bv64) == 0bv8); - free requires (memory_load8_le(mem, 2293bv64) == 84bv8); - free requires (memory_load8_le(mem, 2294bv64) == 104bv8); - free requires (memory_load8_le(mem, 2295bv64) == 101bv8); - free requires (memory_load8_le(mem, 2296bv64) == 32bv8); - free requires (memory_load8_le(mem, 2297bv64) == 108bv8); - free requires (memory_load8_le(mem, 2298bv64) == 111bv8); - free requires (memory_load8_le(mem, 2299bv64) == 99bv8); - free requires (memory_load8_le(mem, 2300bv64) == 97bv8); - free requires (memory_load8_le(mem, 2301bv64) == 108bv8); - free requires (memory_load8_le(mem, 2302bv64) == 32bv8); - free requires (memory_load8_le(mem, 2303bv64) == 118bv8); - free requires (memory_load8_le(mem, 2304bv64) == 97bv8); - free requires (memory_load8_le(mem, 2305bv64) == 114bv8); - free requires (memory_load8_le(mem, 2306bv64) == 105bv8); - free requires (memory_load8_le(mem, 2307bv64) == 97bv8); - free requires (memory_load8_le(mem, 2308bv64) == 98bv8); - free requires (memory_load8_le(mem, 2309bv64) == 108bv8); - free requires (memory_load8_le(mem, 2310bv64) == 101bv8); - free requires (memory_load8_le(mem, 2311bv64) == 32bv8); - free requires (memory_load8_le(mem, 2312bv64) == 105bv8); - free requires (memory_load8_le(mem, 2313bv64) == 115bv8); - free requires (memory_load8_le(mem, 2314bv64) == 58bv8); - free requires (memory_load8_le(mem, 2315bv64) == 32bv8); - free requires (memory_load8_le(mem, 2316bv64) == 37bv8); - free requires (memory_load8_le(mem, 2317bv64) == 100bv8); - free requires (memory_load8_le(mem, 2318bv64) == 10bv8); - free requires (memory_load8_le(mem, 2319bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 8bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 8bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2256bv64) == 1bv8); - free ensures (memory_load8_le(mem, 2257bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2258bv64) == 2bv8); - free ensures (memory_load8_le(mem, 2259bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2260bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2261bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2262bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2263bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2264bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2265bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2266bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2267bv64) == 114bv8); - free ensures (memory_load8_le(mem, 2268bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2269bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2270bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2271bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2272bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2273bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2274bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2275bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2276bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2277bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2278bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2279bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2280bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2281bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2282bv64) == 110bv8); - free ensures (memory_load8_le(mem, 2283bv64) == 116bv8); - free ensures (memory_load8_le(mem, 2284bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2285bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2286bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2287bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2288bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2289bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2290bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2291bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2292bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2293bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2294bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2295bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2296bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2297bv64) == 108bv8); - free ensures (memory_load8_le(mem, 2298bv64) == 111bv8); - free ensures (memory_load8_le(mem, 2299bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2300bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2301bv64) == 108bv8); - free ensures (memory_load8_le(mem, 2302bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2303bv64) == 118bv8); - free ensures (memory_load8_le(mem, 2304bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2305bv64) == 114bv8); - free ensures (memory_load8_le(mem, 2306bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2307bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2308bv64) == 98bv8); - free ensures (memory_load8_le(mem, 2309bv64) == 108bv8); - free ensures (memory_load8_le(mem, 2310bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2311bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2312bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2313bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2314bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2315bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2316bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2317bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2318bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2319bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 2256bv64) == 2334386691848142849bv64); + free requires (memory_load64_le(mem, 2264bv64) == 4211825664600402019bv64); + free requires (memory_load64_le(mem, 2272bv64) == 7307182754559632672bv64); + free requires (memory_load64_le(mem, 2280bv64) == 4211825664634808608bv64); + free requires (memory_load64_le(mem, 2288bv64) == 7307182754559698208bv64); + free requires (memory_load64_le(mem, 2296bv64) == 8511922461266111520bv64); + free requires (memory_load64_le(mem, 2304bv64) == 2334391151658365537bv64); + free requires (memory_load64_le(mem, 2312bv64) == 2924860384375657bv64); + free requires (memory_load64_le(mem, 69064bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); + free ensures (memory_load64_le(mem, 2256bv64) == 2334386691848142849bv64); + free ensures (memory_load64_le(mem, 2264bv64) == 4211825664600402019bv64); + free ensures (memory_load64_le(mem, 2272bv64) == 7307182754559632672bv64); + free ensures (memory_load64_le(mem, 2280bv64) == 4211825664634808608bv64); + free ensures (memory_load64_le(mem, 2288bv64) == 7307182754559698208bv64); + free ensures (memory_load64_le(mem, 2296bv64) == 8511922461266111520bv64); + free ensures (memory_load64_le(mem, 2304bv64) == 2334391151658365537bv64); + free ensures (memory_load64_le(mem, 2312bv64) == 2924860384375657bv64); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); + diff --git a/src/test/correct/malloc_with_local/gcc/malloc_with_local.expected b/src/test/correct/malloc_with_local/gcc/malloc_with_local.expected index 7853707b6..8fbd80b51 100644 --- a/src/test/correct/malloc_with_local/gcc/malloc_with_local.expected +++ b/src/test/correct/malloc_with_local/gcc/malloc_with_local.expected @@ -152,43 +152,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 2320bv64) == 100bv8); free ensures (memory_load8_le(mem, 2321bv64) == 10bv8); free ensures (memory_load8_le(mem, 2322bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -276,38 +250,10 @@ procedure #free(); free requires (memory_load8_le(mem, 2320bv64) == 100bv8); free requires (memory_load8_le(mem, 2321bv64) == 10bv8); free requires (memory_load8_le(mem, 2322bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 16bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 192bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 8bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 68992bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2248bv64) == 1bv8); free ensures (memory_load8_le(mem, 2249bv64) == 0bv8); free ensures (memory_load8_le(mem, 2250bv64) == 2bv8); @@ -383,57 +329,15 @@ procedure #free(); free ensures (memory_load8_le(mem, 2320bv64) == 100bv8); free ensures (memory_load8_le(mem, 2321bv64) == 10bv8); free ensures (memory_load8_le(mem, 2322bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R16, Gamma_R17, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R16, R17, R29, R30, R31, mem, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 2248bv64) == 1bv8); free requires (memory_load8_le(mem, 2249bv64) == 0bv8); free requires (memory_load8_le(mem, 2250bv64) == 2bv8); @@ -509,38 +413,10 @@ procedure main() free requires (memory_load8_le(mem, 2320bv64) == 100bv8); free requires (memory_load8_le(mem, 2321bv64) == 10bv8); free requires (memory_load8_le(mem, 2322bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 16bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 192bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 8bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 68992bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -620,38 +496,12 @@ procedure main() free ensures (memory_load8_le(mem, 2320bv64) == 100bv8); free ensures (memory_load8_le(mem, 2321bv64) == 10bv8); free ensures (memory_load8_le(mem, 2322bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv64; var Gamma_#4: bool; @@ -821,38 +671,10 @@ procedure malloc(); free requires (memory_load8_le(mem, 2320bv64) == 100bv8); free requires (memory_load8_le(mem, 2321bv64) == 10bv8); free requires (memory_load8_le(mem, 2322bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 16bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 192bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 8bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 68992bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2248bv64) == 1bv8); free ensures (memory_load8_le(mem, 2249bv64) == 0bv8); free ensures (memory_load8_le(mem, 2250bv64) == 2bv8); @@ -928,38 +750,10 @@ procedure malloc(); free ensures (memory_load8_le(mem, 2320bv64) == 100bv8); free ensures (memory_load8_le(mem, 2321bv64) == 10bv8); free ensures (memory_load8_le(mem, 2322bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); procedure printf(); modifies Gamma_R16, Gamma_R17, R16, R17; @@ -1038,38 +832,10 @@ procedure printf(); free requires (memory_load8_le(mem, 2320bv64) == 100bv8); free requires (memory_load8_le(mem, 2321bv64) == 10bv8); free requires (memory_load8_le(mem, 2322bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 16bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 192bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 8bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 68992bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2248bv64) == 1bv8); free ensures (memory_load8_le(mem, 2249bv64) == 0bv8); free ensures (memory_load8_le(mem, 2250bv64) == 2bv8); @@ -1145,35 +911,8 @@ procedure printf(); free ensures (memory_load8_le(mem, 2320bv64) == 100bv8); free ensures (memory_load8_le(mem, 2321bv64) == 10bv8); free ensures (memory_load8_le(mem, 2322bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + diff --git a/src/test/correct/malloc_with_local/gcc_O2/malloc_with_local.expected b/src/test/correct/malloc_with_local/gcc_O2/malloc_with_local.expected index 2f63e0068..4c167b62f 100644 --- a/src/test/correct/malloc_with_local/gcc_O2/malloc_with_local.expected +++ b/src/test/correct/malloc_with_local/gcc_O2/malloc_with_local.expected @@ -120,43 +120,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 2160bv64) == 100bv8); free ensures (memory_load8_le(mem, 2161bv64) == 10bv8); free ensures (memory_load8_le(mem, 2162bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69008bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1664bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -244,38 +218,10 @@ procedure __printf_chk(); free requires (memory_load8_le(mem, 2160bv64) == 100bv8); free requires (memory_load8_le(mem, 2161bv64) == 10bv8); free requires (memory_load8_le(mem, 2162bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 16bv8); - free requires (memory_load8_le(mem, 69009bv64) == 8bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 192bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 128bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69008bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69016bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1664bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2088bv64) == 1bv8); free ensures (memory_load8_le(mem, 2089bv64) == 0bv8); free ensures (memory_load8_le(mem, 2090bv64) == 2bv8); @@ -351,57 +297,15 @@ procedure __printf_chk(); free ensures (memory_load8_le(mem, 2160bv64) == 100bv8); free ensures (memory_load8_le(mem, 2161bv64) == 10bv8); free ensures (memory_load8_le(mem, 2162bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69008bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1664bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R16, Gamma_R17, Gamma_R2, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_stack, R0, R1, R16, R17, R2, R29, R30, R31, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 2088bv64) == 1bv8); free requires (memory_load8_le(mem, 2089bv64) == 0bv8); free requires (memory_load8_le(mem, 2090bv64) == 2bv8); @@ -477,38 +381,10 @@ procedure main() free requires (memory_load8_le(mem, 2160bv64) == 100bv8); free requires (memory_load8_le(mem, 2161bv64) == 10bv8); free requires (memory_load8_le(mem, 2162bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 16bv8); - free requires (memory_load8_le(mem, 69009bv64) == 8bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 192bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 128bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69008bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69016bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1664bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -588,38 +464,12 @@ procedure main() free ensures (memory_load8_le(mem, 2160bv64) == 100bv8); free ensures (memory_load8_le(mem, 2161bv64) == 10bv8); free ensures (memory_load8_le(mem, 2162bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69008bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1664bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #1: bv64; var Gamma_#1: bool; @@ -665,3 +515,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/correct/malloc_with_local/gcc_no_plt_no_pic/malloc_with_local.expected b/src/test/correct/malloc_with_local/gcc_no_plt_no_pic/malloc_with_local.expected index 91f3ea4d7..c44bb881b 100644 --- a/src/test/correct/malloc_with_local/gcc_no_plt_no_pic/malloc_with_local.expected +++ b/src/test/correct/malloc_with_local/gcc_no_plt_no_pic/malloc_with_local.expected @@ -152,43 +152,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 2320bv64) == 100bv8); free ensures (memory_load8_le(mem, 2321bv64) == 10bv8); free ensures (memory_load8_le(mem, 2322bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -276,38 +250,10 @@ procedure #free(); free requires (memory_load8_le(mem, 2320bv64) == 100bv8); free requires (memory_load8_le(mem, 2321bv64) == 10bv8); free requires (memory_load8_le(mem, 2322bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 16bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 192bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 8bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 68992bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2248bv64) == 1bv8); free ensures (memory_load8_le(mem, 2249bv64) == 0bv8); free ensures (memory_load8_le(mem, 2250bv64) == 2bv8); @@ -383,57 +329,15 @@ procedure #free(); free ensures (memory_load8_le(mem, 2320bv64) == 100bv8); free ensures (memory_load8_le(mem, 2321bv64) == 10bv8); free ensures (memory_load8_le(mem, 2322bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R16, Gamma_R17, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R16, R17, R29, R30, R31, mem, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 2248bv64) == 1bv8); free requires (memory_load8_le(mem, 2249bv64) == 0bv8); free requires (memory_load8_le(mem, 2250bv64) == 2bv8); @@ -509,38 +413,10 @@ procedure main() free requires (memory_load8_le(mem, 2320bv64) == 100bv8); free requires (memory_load8_le(mem, 2321bv64) == 10bv8); free requires (memory_load8_le(mem, 2322bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 16bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 192bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 8bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 68992bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -620,38 +496,12 @@ procedure main() free ensures (memory_load8_le(mem, 2320bv64) == 100bv8); free ensures (memory_load8_le(mem, 2321bv64) == 10bv8); free ensures (memory_load8_le(mem, 2322bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv64; var Gamma_#4: bool; @@ -821,38 +671,10 @@ procedure malloc(); free requires (memory_load8_le(mem, 2320bv64) == 100bv8); free requires (memory_load8_le(mem, 2321bv64) == 10bv8); free requires (memory_load8_le(mem, 2322bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 16bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 192bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 8bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 68992bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2248bv64) == 1bv8); free ensures (memory_load8_le(mem, 2249bv64) == 0bv8); free ensures (memory_load8_le(mem, 2250bv64) == 2bv8); @@ -928,38 +750,10 @@ procedure malloc(); free ensures (memory_load8_le(mem, 2320bv64) == 100bv8); free ensures (memory_load8_le(mem, 2321bv64) == 10bv8); free ensures (memory_load8_le(mem, 2322bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); procedure printf(); modifies Gamma_R16, Gamma_R17, R16, R17; @@ -1038,38 +832,10 @@ procedure printf(); free requires (memory_load8_le(mem, 2320bv64) == 100bv8); free requires (memory_load8_le(mem, 2321bv64) == 10bv8); free requires (memory_load8_le(mem, 2322bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 16bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 192bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 8bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 68992bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2248bv64) == 1bv8); free ensures (memory_load8_le(mem, 2249bv64) == 0bv8); free ensures (memory_load8_le(mem, 2250bv64) == 2bv8); @@ -1145,35 +911,8 @@ procedure printf(); free ensures (memory_load8_le(mem, 2320bv64) == 100bv8); free ensures (memory_load8_le(mem, 2321bv64) == 10bv8); free ensures (memory_load8_le(mem, 2322bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + diff --git a/src/test/correct/malloc_with_local/gcc_pic/malloc_with_local.expected b/src/test/correct/malloc_with_local/gcc_pic/malloc_with_local.expected index 91f3ea4d7..c44bb881b 100644 --- a/src/test/correct/malloc_with_local/gcc_pic/malloc_with_local.expected +++ b/src/test/correct/malloc_with_local/gcc_pic/malloc_with_local.expected @@ -152,43 +152,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 2320bv64) == 100bv8); free ensures (memory_load8_le(mem, 2321bv64) == 10bv8); free ensures (memory_load8_le(mem, 2322bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -276,38 +250,10 @@ procedure #free(); free requires (memory_load8_le(mem, 2320bv64) == 100bv8); free requires (memory_load8_le(mem, 2321bv64) == 10bv8); free requires (memory_load8_le(mem, 2322bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 16bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 192bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 8bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 68992bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2248bv64) == 1bv8); free ensures (memory_load8_le(mem, 2249bv64) == 0bv8); free ensures (memory_load8_le(mem, 2250bv64) == 2bv8); @@ -383,57 +329,15 @@ procedure #free(); free ensures (memory_load8_le(mem, 2320bv64) == 100bv8); free ensures (memory_load8_le(mem, 2321bv64) == 10bv8); free ensures (memory_load8_le(mem, 2322bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R16, Gamma_R17, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R16, R17, R29, R30, R31, mem, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 2248bv64) == 1bv8); free requires (memory_load8_le(mem, 2249bv64) == 0bv8); free requires (memory_load8_le(mem, 2250bv64) == 2bv8); @@ -509,38 +413,10 @@ procedure main() free requires (memory_load8_le(mem, 2320bv64) == 100bv8); free requires (memory_load8_le(mem, 2321bv64) == 10bv8); free requires (memory_load8_le(mem, 2322bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 16bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 192bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 8bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 68992bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -620,38 +496,12 @@ procedure main() free ensures (memory_load8_le(mem, 2320bv64) == 100bv8); free ensures (memory_load8_le(mem, 2321bv64) == 10bv8); free ensures (memory_load8_le(mem, 2322bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv64; var Gamma_#4: bool; @@ -821,38 +671,10 @@ procedure malloc(); free requires (memory_load8_le(mem, 2320bv64) == 100bv8); free requires (memory_load8_le(mem, 2321bv64) == 10bv8); free requires (memory_load8_le(mem, 2322bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 16bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 192bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 8bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 68992bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2248bv64) == 1bv8); free ensures (memory_load8_le(mem, 2249bv64) == 0bv8); free ensures (memory_load8_le(mem, 2250bv64) == 2bv8); @@ -928,38 +750,10 @@ procedure malloc(); free ensures (memory_load8_le(mem, 2320bv64) == 100bv8); free ensures (memory_load8_le(mem, 2321bv64) == 10bv8); free ensures (memory_load8_le(mem, 2322bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); procedure printf(); modifies Gamma_R16, Gamma_R17, R16, R17; @@ -1038,38 +832,10 @@ procedure printf(); free requires (memory_load8_le(mem, 2320bv64) == 100bv8); free requires (memory_load8_le(mem, 2321bv64) == 10bv8); free requires (memory_load8_le(mem, 2322bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 16bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 192bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 8bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 68992bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2248bv64) == 1bv8); free ensures (memory_load8_le(mem, 2249bv64) == 0bv8); free ensures (memory_load8_le(mem, 2250bv64) == 2bv8); @@ -1145,35 +911,8 @@ procedure printf(); free ensures (memory_load8_le(mem, 2320bv64) == 100bv8); free ensures (memory_load8_le(mem, 2321bv64) == 10bv8); free ensures (memory_load8_le(mem, 2322bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + diff --git a/src/test/correct/malloc_with_local2/clang/malloc_with_local2.expected b/src/test/correct/malloc_with_local2/clang/malloc_with_local2.expected index 6030ae003..ae58bbf97 100644 --- a/src/test/correct/malloc_with_local2/clang/malloc_with_local2.expected +++ b/src/test/correct/malloc_with_local2/clang/malloc_with_local2.expected @@ -145,43 +145,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 2353bv64) == 100bv8); free ensures (memory_load8_le(mem, 2354bv64) == 10bv8); free ensures (memory_load8_le(mem, 2355bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -258,38 +232,10 @@ procedure #free(); free requires (memory_load8_le(mem, 2353bv64) == 100bv8); free requires (memory_load8_le(mem, 2354bv64) == 10bv8); free requires (memory_load8_le(mem, 2355bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 8bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 8bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); free ensures (memory_load8_le(mem, 2292bv64) == 1bv8); free ensures (memory_load8_le(mem, 2293bv64) == 0bv8); free ensures (memory_load8_le(mem, 2294bv64) == 2bv8); @@ -354,57 +300,15 @@ procedure #free(); free ensures (memory_load8_le(mem, 2353bv64) == 100bv8); free ensures (memory_load8_le(mem, 2354bv64) == 10bv8); free ensures (memory_load8_le(mem, 2355bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R16, Gamma_R17, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R1, R16, R17, R29, R30, R31, R8, R9, mem, stack; - free requires (memory_load8_le(mem, 69688bv64) == 0bv8); - free requires (memory_load8_le(mem, 69689bv64) == 0bv8); - free requires (memory_load8_le(mem, 69690bv64) == 0bv8); - free requires (memory_load8_le(mem, 69691bv64) == 0bv8); - free requires (memory_load8_le(mem, 69692bv64) == 0bv8); - free requires (memory_load8_le(mem, 69693bv64) == 0bv8); - free requires (memory_load8_le(mem, 69694bv64) == 0bv8); - free requires (memory_load8_le(mem, 69695bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69688bv64) == 0bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); free requires (memory_load8_le(mem, 2292bv64) == 1bv8); free requires (memory_load8_le(mem, 2293bv64) == 0bv8); free requires (memory_load8_le(mem, 2294bv64) == 2bv8); @@ -469,38 +373,10 @@ procedure main() free requires (memory_load8_le(mem, 2353bv64) == 100bv8); free requires (memory_load8_le(mem, 2354bv64) == 10bv8); free requires (memory_load8_le(mem, 2355bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 8bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 8bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -569,38 +445,12 @@ procedure main() free ensures (memory_load8_le(mem, 2353bv64) == 100bv8); free ensures (memory_load8_le(mem, 2354bv64) == 10bv8); free ensures (memory_load8_le(mem, 2355bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); + +implementation main() { var #4: bv64; var #5: bv64; @@ -782,38 +632,10 @@ procedure malloc(); free requires (memory_load8_le(mem, 2353bv64) == 100bv8); free requires (memory_load8_le(mem, 2354bv64) == 10bv8); free requires (memory_load8_le(mem, 2355bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 8bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 8bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); free ensures (memory_load8_le(mem, 2292bv64) == 1bv8); free ensures (memory_load8_le(mem, 2293bv64) == 0bv8); free ensures (memory_load8_le(mem, 2294bv64) == 2bv8); @@ -878,38 +700,10 @@ procedure malloc(); free ensures (memory_load8_le(mem, 2353bv64) == 100bv8); free ensures (memory_load8_le(mem, 2354bv64) == 10bv8); free ensures (memory_load8_le(mem, 2355bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); procedure printf(); modifies Gamma_R16, Gamma_R17, R16, R17; @@ -977,38 +771,10 @@ procedure printf(); free requires (memory_load8_le(mem, 2353bv64) == 100bv8); free requires (memory_load8_le(mem, 2354bv64) == 10bv8); free requires (memory_load8_le(mem, 2355bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 8bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 8bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); free ensures (memory_load8_le(mem, 2292bv64) == 1bv8); free ensures (memory_load8_le(mem, 2293bv64) == 0bv8); free ensures (memory_load8_le(mem, 2294bv64) == 2bv8); @@ -1073,35 +839,8 @@ procedure printf(); free ensures (memory_load8_le(mem, 2353bv64) == 100bv8); free ensures (memory_load8_le(mem, 2354bv64) == 10bv8); free ensures (memory_load8_le(mem, 2355bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); + diff --git a/src/test/correct/malloc_with_local2/clang_O2/malloc_with_local2.expected b/src/test/correct/malloc_with_local2/clang_O2/malloc_with_local2.expected index 775c83e11..28d819ea5 100644 --- a/src/test/correct/malloc_with_local2/clang_O2/malloc_with_local2.expected +++ b/src/test/correct/malloc_with_local2/clang_O2/malloc_with_local2.expected @@ -107,43 +107,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 2025bv64) == 100bv8); free ensures (memory_load8_le(mem, 2026bv64) == 10bv8); free ensures (memory_load8_le(mem, 2027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69680bv64) == 48bv8); - free ensures (memory_load8_le(mem, 69681bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69682bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69683bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69684bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69685bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69686bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69687bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69680bv64) == 69680bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -154,24 +128,10 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R16, Gamma_R17, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_stack, R0, R1, R16, R17, R29, R30, R31, stack; - free requires (memory_load8_le(mem, 69672bv64) == 0bv8); - free requires (memory_load8_le(mem, 69673bv64) == 0bv8); - free requires (memory_load8_le(mem, 69674bv64) == 0bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); - free requires (memory_load8_le(mem, 69680bv64) == 48bv8); - free requires (memory_load8_le(mem, 69681bv64) == 16bv8); - free requires (memory_load8_le(mem, 69682bv64) == 1bv8); - free requires (memory_load8_le(mem, 69683bv64) == 0bv8); - free requires (memory_load8_le(mem, 69684bv64) == 0bv8); - free requires (memory_load8_le(mem, 69685bv64) == 0bv8); - free requires (memory_load8_le(mem, 69686bv64) == 0bv8); - free requires (memory_load8_le(mem, 69687bv64) == 0bv8); + free requires (memory_load64_le(mem, 69672bv64) == 0bv64); + free requires (memory_load64_le(mem, 69680bv64) == 69680bv64); free requires (memory_load8_le(mem, 1964bv64) == 1bv8); free requires (memory_load8_le(mem, 1965bv64) == 0bv8); free requires (memory_load8_le(mem, 1966bv64) == 2bv8); @@ -236,38 +196,10 @@ procedure main() free requires (memory_load8_le(mem, 2025bv64) == 100bv8); free requires (memory_load8_le(mem, 2026bv64) == 10bv8); free requires (memory_load8_le(mem, 2027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 80bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 0bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 84bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69680bv64) == 48bv8); - free requires (memory_load8_le(mem, 69681bv64) == 16bv8); - free requires (memory_load8_le(mem, 69682bv64) == 1bv8); - free requires (memory_load8_le(mem, 69683bv64) == 0bv8); - free requires (memory_load8_le(mem, 69684bv64) == 0bv8); - free requires (memory_load8_le(mem, 69685bv64) == 0bv8); - free requires (memory_load8_le(mem, 69686bv64) == 0bv8); - free requires (memory_load8_le(mem, 69687bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69680bv64) == 69680bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -336,38 +268,12 @@ procedure main() free ensures (memory_load8_le(mem, 2025bv64) == 100bv8); free ensures (memory_load8_le(mem, 2026bv64) == 10bv8); free ensures (memory_load8_le(mem, 2027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69680bv64) == 48bv8); - free ensures (memory_load8_le(mem, 69681bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69682bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69683bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69684bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69685bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69686bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69687bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69680bv64) == 69680bv64); + +implementation main() { var #4: bv64; var Gamma_#4: bool; @@ -477,38 +383,10 @@ procedure printf(); free requires (memory_load8_le(mem, 2025bv64) == 100bv8); free requires (memory_load8_le(mem, 2026bv64) == 10bv8); free requires (memory_load8_le(mem, 2027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 80bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 0bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 84bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69680bv64) == 48bv8); - free requires (memory_load8_le(mem, 69681bv64) == 16bv8); - free requires (memory_load8_le(mem, 69682bv64) == 1bv8); - free requires (memory_load8_le(mem, 69683bv64) == 0bv8); - free requires (memory_load8_le(mem, 69684bv64) == 0bv8); - free requires (memory_load8_le(mem, 69685bv64) == 0bv8); - free requires (memory_load8_le(mem, 69686bv64) == 0bv8); - free requires (memory_load8_le(mem, 69687bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69680bv64) == 69680bv64); free ensures (memory_load8_le(mem, 1964bv64) == 1bv8); free ensures (memory_load8_le(mem, 1965bv64) == 0bv8); free ensures (memory_load8_le(mem, 1966bv64) == 2bv8); @@ -573,35 +451,8 @@ procedure printf(); free ensures (memory_load8_le(mem, 2025bv64) == 100bv8); free ensures (memory_load8_le(mem, 2026bv64) == 10bv8); free ensures (memory_load8_le(mem, 2027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69680bv64) == 48bv8); - free ensures (memory_load8_le(mem, 69681bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69682bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69683bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69684bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69685bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69686bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69687bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69680bv64) == 69680bv64); + diff --git a/src/test/correct/malloc_with_local2/clang_no_plt_no_pic/malloc_with_local2.expected b/src/test/correct/malloc_with_local2/clang_no_plt_no_pic/malloc_with_local2.expected index 8645f53a7..649e99111 100644 --- a/src/test/correct/malloc_with_local2/clang_no_plt_no_pic/malloc_with_local2.expected +++ b/src/test/correct/malloc_with_local2/clang_no_plt_no_pic/malloc_with_local2.expected @@ -145,43 +145,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 2353bv64) == 100bv8); free ensures (memory_load8_le(mem, 2354bv64) == 10bv8); free ensures (memory_load8_le(mem, 2355bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -258,38 +232,10 @@ procedure #free(); free requires (memory_load8_le(mem, 2353bv64) == 100bv8); free requires (memory_load8_le(mem, 2354bv64) == 10bv8); free requires (memory_load8_le(mem, 2355bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 8bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 8bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); free ensures (memory_load8_le(mem, 2292bv64) == 1bv8); free ensures (memory_load8_le(mem, 2293bv64) == 0bv8); free ensures (memory_load8_le(mem, 2294bv64) == 2bv8); @@ -354,57 +300,15 @@ procedure #free(); free ensures (memory_load8_le(mem, 2353bv64) == 100bv8); free ensures (memory_load8_le(mem, 2354bv64) == 10bv8); free ensures (memory_load8_le(mem, 2355bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R16, Gamma_R17, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R1, R16, R17, R29, R30, R31, R8, R9, mem, stack; - free requires (memory_load8_le(mem, 69688bv64) == 0bv8); - free requires (memory_load8_le(mem, 69689bv64) == 0bv8); - free requires (memory_load8_le(mem, 69690bv64) == 0bv8); - free requires (memory_load8_le(mem, 69691bv64) == 0bv8); - free requires (memory_load8_le(mem, 69692bv64) == 0bv8); - free requires (memory_load8_le(mem, 69693bv64) == 0bv8); - free requires (memory_load8_le(mem, 69694bv64) == 0bv8); - free requires (memory_load8_le(mem, 69695bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69688bv64) == 0bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); free requires (memory_load8_le(mem, 2292bv64) == 1bv8); free requires (memory_load8_le(mem, 2293bv64) == 0bv8); free requires (memory_load8_le(mem, 2294bv64) == 2bv8); @@ -469,38 +373,10 @@ procedure main() free requires (memory_load8_le(mem, 2353bv64) == 100bv8); free requires (memory_load8_le(mem, 2354bv64) == 10bv8); free requires (memory_load8_le(mem, 2355bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 8bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 8bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -569,38 +445,12 @@ procedure main() free ensures (memory_load8_le(mem, 2353bv64) == 100bv8); free ensures (memory_load8_le(mem, 2354bv64) == 10bv8); free ensures (memory_load8_le(mem, 2355bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); + +implementation main() { var #4: bv64; var #5: bv64; @@ -782,38 +632,10 @@ procedure malloc(); free requires (memory_load8_le(mem, 2353bv64) == 100bv8); free requires (memory_load8_le(mem, 2354bv64) == 10bv8); free requires (memory_load8_le(mem, 2355bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 8bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 8bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); free ensures (memory_load8_le(mem, 2292bv64) == 1bv8); free ensures (memory_load8_le(mem, 2293bv64) == 0bv8); free ensures (memory_load8_le(mem, 2294bv64) == 2bv8); @@ -878,38 +700,10 @@ procedure malloc(); free ensures (memory_load8_le(mem, 2353bv64) == 100bv8); free ensures (memory_load8_le(mem, 2354bv64) == 10bv8); free ensures (memory_load8_le(mem, 2355bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); procedure printf(); modifies Gamma_R16, Gamma_R17, R16, R17; @@ -977,38 +771,10 @@ procedure printf(); free requires (memory_load8_le(mem, 2353bv64) == 100bv8); free requires (memory_load8_le(mem, 2354bv64) == 10bv8); free requires (memory_load8_le(mem, 2355bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 8bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 8bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); free ensures (memory_load8_le(mem, 2292bv64) == 1bv8); free ensures (memory_load8_le(mem, 2293bv64) == 0bv8); free ensures (memory_load8_le(mem, 2294bv64) == 2bv8); @@ -1073,35 +839,8 @@ procedure printf(); free ensures (memory_load8_le(mem, 2353bv64) == 100bv8); free ensures (memory_load8_le(mem, 2354bv64) == 10bv8); free ensures (memory_load8_le(mem, 2355bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); + diff --git a/src/test/correct/malloc_with_local2/clang_pic/malloc_with_local2.expected b/src/test/correct/malloc_with_local2/clang_pic/malloc_with_local2.expected index 8645f53a7..649e99111 100644 --- a/src/test/correct/malloc_with_local2/clang_pic/malloc_with_local2.expected +++ b/src/test/correct/malloc_with_local2/clang_pic/malloc_with_local2.expected @@ -145,43 +145,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 2353bv64) == 100bv8); free ensures (memory_load8_le(mem, 2354bv64) == 10bv8); free ensures (memory_load8_le(mem, 2355bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -258,38 +232,10 @@ procedure #free(); free requires (memory_load8_le(mem, 2353bv64) == 100bv8); free requires (memory_load8_le(mem, 2354bv64) == 10bv8); free requires (memory_load8_le(mem, 2355bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 8bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 8bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); free ensures (memory_load8_le(mem, 2292bv64) == 1bv8); free ensures (memory_load8_le(mem, 2293bv64) == 0bv8); free ensures (memory_load8_le(mem, 2294bv64) == 2bv8); @@ -354,57 +300,15 @@ procedure #free(); free ensures (memory_load8_le(mem, 2353bv64) == 100bv8); free ensures (memory_load8_le(mem, 2354bv64) == 10bv8); free ensures (memory_load8_le(mem, 2355bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R16, Gamma_R17, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R1, R16, R17, R29, R30, R31, R8, R9, mem, stack; - free requires (memory_load8_le(mem, 69688bv64) == 0bv8); - free requires (memory_load8_le(mem, 69689bv64) == 0bv8); - free requires (memory_load8_le(mem, 69690bv64) == 0bv8); - free requires (memory_load8_le(mem, 69691bv64) == 0bv8); - free requires (memory_load8_le(mem, 69692bv64) == 0bv8); - free requires (memory_load8_le(mem, 69693bv64) == 0bv8); - free requires (memory_load8_le(mem, 69694bv64) == 0bv8); - free requires (memory_load8_le(mem, 69695bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69688bv64) == 0bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); free requires (memory_load8_le(mem, 2292bv64) == 1bv8); free requires (memory_load8_le(mem, 2293bv64) == 0bv8); free requires (memory_load8_le(mem, 2294bv64) == 2bv8); @@ -469,38 +373,10 @@ procedure main() free requires (memory_load8_le(mem, 2353bv64) == 100bv8); free requires (memory_load8_le(mem, 2354bv64) == 10bv8); free requires (memory_load8_le(mem, 2355bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 8bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 8bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -569,38 +445,12 @@ procedure main() free ensures (memory_load8_le(mem, 2353bv64) == 100bv8); free ensures (memory_load8_le(mem, 2354bv64) == 10bv8); free ensures (memory_load8_le(mem, 2355bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); + +implementation main() { var #4: bv64; var #5: bv64; @@ -782,38 +632,10 @@ procedure malloc(); free requires (memory_load8_le(mem, 2353bv64) == 100bv8); free requires (memory_load8_le(mem, 2354bv64) == 10bv8); free requires (memory_load8_le(mem, 2355bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 8bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 8bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); free ensures (memory_load8_le(mem, 2292bv64) == 1bv8); free ensures (memory_load8_le(mem, 2293bv64) == 0bv8); free ensures (memory_load8_le(mem, 2294bv64) == 2bv8); @@ -878,38 +700,10 @@ procedure malloc(); free ensures (memory_load8_le(mem, 2353bv64) == 100bv8); free ensures (memory_load8_le(mem, 2354bv64) == 10bv8); free ensures (memory_load8_le(mem, 2355bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); procedure printf(); modifies Gamma_R16, Gamma_R17, R16, R17; @@ -977,38 +771,10 @@ procedure printf(); free requires (memory_load8_le(mem, 2353bv64) == 100bv8); free requires (memory_load8_le(mem, 2354bv64) == 10bv8); free requires (memory_load8_le(mem, 2355bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 8bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 8bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); free ensures (memory_load8_le(mem, 2292bv64) == 1bv8); free ensures (memory_load8_le(mem, 2293bv64) == 0bv8); free ensures (memory_load8_le(mem, 2294bv64) == 2bv8); @@ -1073,35 +839,8 @@ procedure printf(); free ensures (memory_load8_le(mem, 2353bv64) == 100bv8); free ensures (memory_load8_le(mem, 2354bv64) == 10bv8); free ensures (memory_load8_le(mem, 2355bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); + diff --git a/src/test/correct/malloc_with_local2/gcc/malloc_with_local2.expected b/src/test/correct/malloc_with_local2/gcc/malloc_with_local2.expected index 503331b2c..0805e74d9 100644 --- a/src/test/correct/malloc_with_local2/gcc/malloc_with_local2.expected +++ b/src/test/correct/malloc_with_local2/gcc/malloc_with_local2.expected @@ -152,43 +152,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 2344bv64) == 100bv8); free ensures (memory_load8_le(mem, 2345bv64) == 10bv8); free ensures (memory_load8_le(mem, 2346bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -276,38 +250,10 @@ procedure #free(); free requires (memory_load8_le(mem, 2344bv64) == 100bv8); free requires (memory_load8_le(mem, 2345bv64) == 10bv8); free requires (memory_load8_le(mem, 2346bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 16bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 192bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 8bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 68992bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2272bv64) == 1bv8); free ensures (memory_load8_le(mem, 2273bv64) == 0bv8); free ensures (memory_load8_le(mem, 2274bv64) == 2bv8); @@ -383,57 +329,15 @@ procedure #free(); free ensures (memory_load8_le(mem, 2344bv64) == 100bv8); free ensures (memory_load8_le(mem, 2345bv64) == 10bv8); free ensures (memory_load8_le(mem, 2346bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R16, Gamma_R17, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R16, R17, R29, R30, R31, mem, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 2272bv64) == 1bv8); free requires (memory_load8_le(mem, 2273bv64) == 0bv8); free requires (memory_load8_le(mem, 2274bv64) == 2bv8); @@ -509,38 +413,10 @@ procedure main() free requires (memory_load8_le(mem, 2344bv64) == 100bv8); free requires (memory_load8_le(mem, 2345bv64) == 10bv8); free requires (memory_load8_le(mem, 2346bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 16bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 192bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 8bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 68992bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -620,38 +496,12 @@ procedure main() free ensures (memory_load8_le(mem, 2344bv64) == 100bv8); free ensures (memory_load8_le(mem, 2345bv64) == 10bv8); free ensures (memory_load8_le(mem, 2346bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv64; var Gamma_#4: bool; @@ -835,38 +685,10 @@ procedure malloc(); free requires (memory_load8_le(mem, 2344bv64) == 100bv8); free requires (memory_load8_le(mem, 2345bv64) == 10bv8); free requires (memory_load8_le(mem, 2346bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 16bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 192bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 8bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 68992bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2272bv64) == 1bv8); free ensures (memory_load8_le(mem, 2273bv64) == 0bv8); free ensures (memory_load8_le(mem, 2274bv64) == 2bv8); @@ -942,38 +764,10 @@ procedure malloc(); free ensures (memory_load8_le(mem, 2344bv64) == 100bv8); free ensures (memory_load8_le(mem, 2345bv64) == 10bv8); free ensures (memory_load8_le(mem, 2346bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); procedure printf(); modifies Gamma_R16, Gamma_R17, R16, R17; @@ -1052,38 +846,10 @@ procedure printf(); free requires (memory_load8_le(mem, 2344bv64) == 100bv8); free requires (memory_load8_le(mem, 2345bv64) == 10bv8); free requires (memory_load8_le(mem, 2346bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 16bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 192bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 8bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 68992bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2272bv64) == 1bv8); free ensures (memory_load8_le(mem, 2273bv64) == 0bv8); free ensures (memory_load8_le(mem, 2274bv64) == 2bv8); @@ -1159,35 +925,8 @@ procedure printf(); free ensures (memory_load8_le(mem, 2344bv64) == 100bv8); free ensures (memory_load8_le(mem, 2345bv64) == 10bv8); free ensures (memory_load8_le(mem, 2346bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + diff --git a/src/test/correct/malloc_with_local2/gcc_O2/malloc_with_local2.expected b/src/test/correct/malloc_with_local2/gcc_O2/malloc_with_local2.expected index 2f63e0068..4c167b62f 100644 --- a/src/test/correct/malloc_with_local2/gcc_O2/malloc_with_local2.expected +++ b/src/test/correct/malloc_with_local2/gcc_O2/malloc_with_local2.expected @@ -120,43 +120,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 2160bv64) == 100bv8); free ensures (memory_load8_le(mem, 2161bv64) == 10bv8); free ensures (memory_load8_le(mem, 2162bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69008bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1664bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -244,38 +218,10 @@ procedure __printf_chk(); free requires (memory_load8_le(mem, 2160bv64) == 100bv8); free requires (memory_load8_le(mem, 2161bv64) == 10bv8); free requires (memory_load8_le(mem, 2162bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 16bv8); - free requires (memory_load8_le(mem, 69009bv64) == 8bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 192bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 128bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69008bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69016bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1664bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2088bv64) == 1bv8); free ensures (memory_load8_le(mem, 2089bv64) == 0bv8); free ensures (memory_load8_le(mem, 2090bv64) == 2bv8); @@ -351,57 +297,15 @@ procedure __printf_chk(); free ensures (memory_load8_le(mem, 2160bv64) == 100bv8); free ensures (memory_load8_le(mem, 2161bv64) == 10bv8); free ensures (memory_load8_le(mem, 2162bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69008bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1664bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R16, Gamma_R17, Gamma_R2, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_stack, R0, R1, R16, R17, R2, R29, R30, R31, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 2088bv64) == 1bv8); free requires (memory_load8_le(mem, 2089bv64) == 0bv8); free requires (memory_load8_le(mem, 2090bv64) == 2bv8); @@ -477,38 +381,10 @@ procedure main() free requires (memory_load8_le(mem, 2160bv64) == 100bv8); free requires (memory_load8_le(mem, 2161bv64) == 10bv8); free requires (memory_load8_le(mem, 2162bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 16bv8); - free requires (memory_load8_le(mem, 69009bv64) == 8bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 192bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 128bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69008bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69016bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1664bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -588,38 +464,12 @@ procedure main() free ensures (memory_load8_le(mem, 2160bv64) == 100bv8); free ensures (memory_load8_le(mem, 2161bv64) == 10bv8); free ensures (memory_load8_le(mem, 2162bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69008bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1664bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #1: bv64; var Gamma_#1: bool; @@ -665,3 +515,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/correct/malloc_with_local2/gcc_no_plt_no_pic/malloc_with_local2.expected b/src/test/correct/malloc_with_local2/gcc_no_plt_no_pic/malloc_with_local2.expected index 76eed4543..819b0dbe8 100644 --- a/src/test/correct/malloc_with_local2/gcc_no_plt_no_pic/malloc_with_local2.expected +++ b/src/test/correct/malloc_with_local2/gcc_no_plt_no_pic/malloc_with_local2.expected @@ -152,43 +152,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 2344bv64) == 100bv8); free ensures (memory_load8_le(mem, 2345bv64) == 10bv8); free ensures (memory_load8_le(mem, 2346bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -276,38 +250,10 @@ procedure #free(); free requires (memory_load8_le(mem, 2344bv64) == 100bv8); free requires (memory_load8_le(mem, 2345bv64) == 10bv8); free requires (memory_load8_le(mem, 2346bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 16bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 192bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 8bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 68992bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2272bv64) == 1bv8); free ensures (memory_load8_le(mem, 2273bv64) == 0bv8); free ensures (memory_load8_le(mem, 2274bv64) == 2bv8); @@ -383,57 +329,15 @@ procedure #free(); free ensures (memory_load8_le(mem, 2344bv64) == 100bv8); free ensures (memory_load8_le(mem, 2345bv64) == 10bv8); free ensures (memory_load8_le(mem, 2346bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R16, Gamma_R17, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R16, R17, R29, R30, R31, mem, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 2272bv64) == 1bv8); free requires (memory_load8_le(mem, 2273bv64) == 0bv8); free requires (memory_load8_le(mem, 2274bv64) == 2bv8); @@ -509,38 +413,10 @@ procedure main() free requires (memory_load8_le(mem, 2344bv64) == 100bv8); free requires (memory_load8_le(mem, 2345bv64) == 10bv8); free requires (memory_load8_le(mem, 2346bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 16bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 192bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 8bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 68992bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -620,38 +496,12 @@ procedure main() free ensures (memory_load8_le(mem, 2344bv64) == 100bv8); free ensures (memory_load8_le(mem, 2345bv64) == 10bv8); free ensures (memory_load8_le(mem, 2346bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv64; var Gamma_#4: bool; @@ -835,38 +685,10 @@ procedure malloc(); free requires (memory_load8_le(mem, 2344bv64) == 100bv8); free requires (memory_load8_le(mem, 2345bv64) == 10bv8); free requires (memory_load8_le(mem, 2346bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 16bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 192bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 8bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 68992bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2272bv64) == 1bv8); free ensures (memory_load8_le(mem, 2273bv64) == 0bv8); free ensures (memory_load8_le(mem, 2274bv64) == 2bv8); @@ -942,38 +764,10 @@ procedure malloc(); free ensures (memory_load8_le(mem, 2344bv64) == 100bv8); free ensures (memory_load8_le(mem, 2345bv64) == 10bv8); free ensures (memory_load8_le(mem, 2346bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); procedure printf(); modifies Gamma_R16, Gamma_R17, R16, R17; @@ -1052,38 +846,10 @@ procedure printf(); free requires (memory_load8_le(mem, 2344bv64) == 100bv8); free requires (memory_load8_le(mem, 2345bv64) == 10bv8); free requires (memory_load8_le(mem, 2346bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 16bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 192bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 8bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 68992bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2272bv64) == 1bv8); free ensures (memory_load8_le(mem, 2273bv64) == 0bv8); free ensures (memory_load8_le(mem, 2274bv64) == 2bv8); @@ -1159,35 +925,8 @@ procedure printf(); free ensures (memory_load8_le(mem, 2344bv64) == 100bv8); free ensures (memory_load8_le(mem, 2345bv64) == 10bv8); free ensures (memory_load8_le(mem, 2346bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + diff --git a/src/test/correct/malloc_with_local2/gcc_pic/malloc_with_local2.expected b/src/test/correct/malloc_with_local2/gcc_pic/malloc_with_local2.expected index 76eed4543..819b0dbe8 100644 --- a/src/test/correct/malloc_with_local2/gcc_pic/malloc_with_local2.expected +++ b/src/test/correct/malloc_with_local2/gcc_pic/malloc_with_local2.expected @@ -152,43 +152,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 2344bv64) == 100bv8); free ensures (memory_load8_le(mem, 2345bv64) == 10bv8); free ensures (memory_load8_le(mem, 2346bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -276,38 +250,10 @@ procedure #free(); free requires (memory_load8_le(mem, 2344bv64) == 100bv8); free requires (memory_load8_le(mem, 2345bv64) == 10bv8); free requires (memory_load8_le(mem, 2346bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 16bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 192bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 8bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 68992bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2272bv64) == 1bv8); free ensures (memory_load8_le(mem, 2273bv64) == 0bv8); free ensures (memory_load8_le(mem, 2274bv64) == 2bv8); @@ -383,57 +329,15 @@ procedure #free(); free ensures (memory_load8_le(mem, 2344bv64) == 100bv8); free ensures (memory_load8_le(mem, 2345bv64) == 10bv8); free ensures (memory_load8_le(mem, 2346bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R16, Gamma_R17, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R16, R17, R29, R30, R31, mem, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 2272bv64) == 1bv8); free requires (memory_load8_le(mem, 2273bv64) == 0bv8); free requires (memory_load8_le(mem, 2274bv64) == 2bv8); @@ -509,38 +413,10 @@ procedure main() free requires (memory_load8_le(mem, 2344bv64) == 100bv8); free requires (memory_load8_le(mem, 2345bv64) == 10bv8); free requires (memory_load8_le(mem, 2346bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 16bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 192bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 8bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 68992bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -620,38 +496,12 @@ procedure main() free ensures (memory_load8_le(mem, 2344bv64) == 100bv8); free ensures (memory_load8_le(mem, 2345bv64) == 10bv8); free ensures (memory_load8_le(mem, 2346bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv64; var Gamma_#4: bool; @@ -835,38 +685,10 @@ procedure malloc(); free requires (memory_load8_le(mem, 2344bv64) == 100bv8); free requires (memory_load8_le(mem, 2345bv64) == 10bv8); free requires (memory_load8_le(mem, 2346bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 16bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 192bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 8bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 68992bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2272bv64) == 1bv8); free ensures (memory_load8_le(mem, 2273bv64) == 0bv8); free ensures (memory_load8_le(mem, 2274bv64) == 2bv8); @@ -942,38 +764,10 @@ procedure malloc(); free ensures (memory_load8_le(mem, 2344bv64) == 100bv8); free ensures (memory_load8_le(mem, 2345bv64) == 10bv8); free ensures (memory_load8_le(mem, 2346bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); procedure printf(); modifies Gamma_R16, Gamma_R17, R16, R17; @@ -1052,38 +846,10 @@ procedure printf(); free requires (memory_load8_le(mem, 2344bv64) == 100bv8); free requires (memory_load8_le(mem, 2345bv64) == 10bv8); free requires (memory_load8_le(mem, 2346bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 16bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 192bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 8bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 68992bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2272bv64) == 1bv8); free ensures (memory_load8_le(mem, 2273bv64) == 0bv8); free ensures (memory_load8_le(mem, 2274bv64) == 2bv8); @@ -1159,35 +925,8 @@ procedure printf(); free ensures (memory_load8_le(mem, 2344bv64) == 100bv8); free ensures (memory_load8_le(mem, 2345bv64) == 10bv8); free ensures (memory_load8_le(mem, 2346bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + diff --git a/src/test/correct/malloc_with_local3/clang/malloc_with_local3.expected b/src/test/correct/malloc_with_local3/clang/malloc_with_local3.expected index f97fa4098..7833a364e 100644 --- a/src/test/correct/malloc_with_local3/clang/malloc_with_local3.expected +++ b/src/test/correct/malloc_with_local3/clang/malloc_with_local3.expected @@ -152,43 +152,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 2411bv64) == 99bv8); free ensures (memory_load8_le(mem, 2412bv64) == 10bv8); free ensures (memory_load8_le(mem, 2413bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -271,38 +245,10 @@ procedure #free(); free requires (memory_load8_le(mem, 2411bv64) == 99bv8); free requires (memory_load8_le(mem, 2412bv64) == 10bv8); free requires (memory_load8_le(mem, 2413bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 8bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 8bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); free ensures (memory_load8_le(mem, 2344bv64) == 1bv8); free ensures (memory_load8_le(mem, 2345bv64) == 0bv8); free ensures (memory_load8_le(mem, 2346bv64) == 2bv8); @@ -373,57 +319,15 @@ procedure #free(); free ensures (memory_load8_le(mem, 2411bv64) == 99bv8); free ensures (memory_load8_le(mem, 2412bv64) == 10bv8); free ensures (memory_load8_le(mem, 2413bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R16, Gamma_R17, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R1, R16, R17, R29, R30, R31, R8, R9, mem, stack; - free requires (memory_load8_le(mem, 69688bv64) == 0bv8); - free requires (memory_load8_le(mem, 69689bv64) == 0bv8); - free requires (memory_load8_le(mem, 69690bv64) == 0bv8); - free requires (memory_load8_le(mem, 69691bv64) == 0bv8); - free requires (memory_load8_le(mem, 69692bv64) == 0bv8); - free requires (memory_load8_le(mem, 69693bv64) == 0bv8); - free requires (memory_load8_le(mem, 69694bv64) == 0bv8); - free requires (memory_load8_le(mem, 69695bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69688bv64) == 0bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); free requires (memory_load8_le(mem, 2344bv64) == 1bv8); free requires (memory_load8_le(mem, 2345bv64) == 0bv8); free requires (memory_load8_le(mem, 2346bv64) == 2bv8); @@ -494,38 +398,10 @@ procedure main() free requires (memory_load8_le(mem, 2411bv64) == 99bv8); free requires (memory_load8_le(mem, 2412bv64) == 10bv8); free requires (memory_load8_le(mem, 2413bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 8bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 8bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -600,38 +476,12 @@ procedure main() free ensures (memory_load8_le(mem, 2411bv64) == 99bv8); free ensures (memory_load8_le(mem, 2412bv64) == 10bv8); free ensures (memory_load8_le(mem, 2413bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); + +implementation main() { var #4: bv64; var #7: bv64; @@ -815,38 +665,10 @@ procedure malloc(); free requires (memory_load8_le(mem, 2411bv64) == 99bv8); free requires (memory_load8_le(mem, 2412bv64) == 10bv8); free requires (memory_load8_le(mem, 2413bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 8bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 8bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); free ensures (memory_load8_le(mem, 2344bv64) == 1bv8); free ensures (memory_load8_le(mem, 2345bv64) == 0bv8); free ensures (memory_load8_le(mem, 2346bv64) == 2bv8); @@ -917,40 +739,12 @@ procedure malloc(); free ensures (memory_load8_le(mem, 2411bv64) == 99bv8); free ensures (memory_load8_le(mem, 2412bv64) == 10bv8); free ensures (memory_load8_le(mem, 2413bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); -procedure printCharValue() +procedure printCharValue(); modifies Gamma_R0, Gamma_R1, Gamma_R16, Gamma_R17, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R1, R16, R17, R29, R30, R31, R8, R9, mem, stack; free requires (memory_load8_le(mem, 2344bv64) == 1bv8); free requires (memory_load8_le(mem, 2345bv64) == 0bv8); @@ -1022,38 +816,10 @@ procedure printCharValue() free requires (memory_load8_le(mem, 2411bv64) == 99bv8); free requires (memory_load8_le(mem, 2412bv64) == 10bv8); free requires (memory_load8_le(mem, 2413bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 8bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 8bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -1128,38 +894,12 @@ procedure printCharValue() free ensures (memory_load8_le(mem, 2411bv64) == 99bv8); free ensures (memory_load8_le(mem, 2412bv64) == 10bv8); free ensures (memory_load8_le(mem, 2413bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); + +implementation printCharValue() { var #5: bv64; var #6: bv64; @@ -1273,38 +1013,10 @@ procedure printf(); free requires (memory_load8_le(mem, 2411bv64) == 99bv8); free requires (memory_load8_le(mem, 2412bv64) == 10bv8); free requires (memory_load8_le(mem, 2413bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 8bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 8bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); free ensures (memory_load8_le(mem, 2344bv64) == 1bv8); free ensures (memory_load8_le(mem, 2345bv64) == 0bv8); free ensures (memory_load8_le(mem, 2346bv64) == 2bv8); @@ -1375,35 +1087,8 @@ procedure printf(); free ensures (memory_load8_le(mem, 2411bv64) == 99bv8); free ensures (memory_load8_le(mem, 2412bv64) == 10bv8); free ensures (memory_load8_le(mem, 2413bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); + diff --git a/src/test/correct/malloc_with_local3/clang_O2/malloc_with_local3.expected b/src/test/correct/malloc_with_local3/clang_O2/malloc_with_local3.expected index de0df8c0a..e40292528 100644 --- a/src/test/correct/malloc_with_local3/clang_O2/malloc_with_local3.expected +++ b/src/test/correct/malloc_with_local3/clang_O2/malloc_with_local3.expected @@ -113,43 +113,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 2063bv64) == 99bv8); free ensures (memory_load8_le(mem, 2064bv64) == 10bv8); free ensures (memory_load8_le(mem, 2065bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69680bv64) == 48bv8); - free ensures (memory_load8_le(mem, 69681bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69682bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69683bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69684bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69685bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69686bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69687bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69680bv64) == 69680bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -160,24 +134,10 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R16, Gamma_R17, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_stack, R0, R1, R16, R17, R29, R30, R31, stack; - free requires (memory_load8_le(mem, 69672bv64) == 0bv8); - free requires (memory_load8_le(mem, 69673bv64) == 0bv8); - free requires (memory_load8_le(mem, 69674bv64) == 0bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); - free requires (memory_load8_le(mem, 69680bv64) == 48bv8); - free requires (memory_load8_le(mem, 69681bv64) == 16bv8); - free requires (memory_load8_le(mem, 69682bv64) == 1bv8); - free requires (memory_load8_le(mem, 69683bv64) == 0bv8); - free requires (memory_load8_le(mem, 69684bv64) == 0bv8); - free requires (memory_load8_le(mem, 69685bv64) == 0bv8); - free requires (memory_load8_le(mem, 69686bv64) == 0bv8); - free requires (memory_load8_le(mem, 69687bv64) == 0bv8); + free requires (memory_load64_le(mem, 69672bv64) == 0bv64); + free requires (memory_load64_le(mem, 69680bv64) == 69680bv64); free requires (memory_load8_le(mem, 1996bv64) == 1bv8); free requires (memory_load8_le(mem, 1997bv64) == 0bv8); free requires (memory_load8_le(mem, 1998bv64) == 2bv8); @@ -248,38 +208,10 @@ procedure main() free requires (memory_load8_le(mem, 2063bv64) == 99bv8); free requires (memory_load8_le(mem, 2064bv64) == 10bv8); free requires (memory_load8_le(mem, 2065bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 80bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 0bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 84bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69680bv64) == 48bv8); - free requires (memory_load8_le(mem, 69681bv64) == 16bv8); - free requires (memory_load8_le(mem, 69682bv64) == 1bv8); - free requires (memory_load8_le(mem, 69683bv64) == 0bv8); - free requires (memory_load8_le(mem, 69684bv64) == 0bv8); - free requires (memory_load8_le(mem, 69685bv64) == 0bv8); - free requires (memory_load8_le(mem, 69686bv64) == 0bv8); - free requires (memory_load8_le(mem, 69687bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69680bv64) == 69680bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -354,38 +286,12 @@ procedure main() free ensures (memory_load8_le(mem, 2063bv64) == 99bv8); free ensures (memory_load8_le(mem, 2064bv64) == 10bv8); free ensures (memory_load8_le(mem, 2065bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69680bv64) == 48bv8); - free ensures (memory_load8_le(mem, 69681bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69682bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69683bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69684bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69685bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69686bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69687bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69680bv64) == 69680bv64); + +implementation main() { var #4: bv64; var Gamma_#4: bool; @@ -501,38 +407,10 @@ procedure printf(); free requires (memory_load8_le(mem, 2063bv64) == 99bv8); free requires (memory_load8_le(mem, 2064bv64) == 10bv8); free requires (memory_load8_le(mem, 2065bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 80bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 0bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 84bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69680bv64) == 48bv8); - free requires (memory_load8_le(mem, 69681bv64) == 16bv8); - free requires (memory_load8_le(mem, 69682bv64) == 1bv8); - free requires (memory_load8_le(mem, 69683bv64) == 0bv8); - free requires (memory_load8_le(mem, 69684bv64) == 0bv8); - free requires (memory_load8_le(mem, 69685bv64) == 0bv8); - free requires (memory_load8_le(mem, 69686bv64) == 0bv8); - free requires (memory_load8_le(mem, 69687bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69680bv64) == 69680bv64); free ensures (memory_load8_le(mem, 1996bv64) == 1bv8); free ensures (memory_load8_le(mem, 1997bv64) == 0bv8); free ensures (memory_load8_le(mem, 1998bv64) == 2bv8); @@ -603,35 +481,8 @@ procedure printf(); free ensures (memory_load8_le(mem, 2063bv64) == 99bv8); free ensures (memory_load8_le(mem, 2064bv64) == 10bv8); free ensures (memory_load8_le(mem, 2065bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69680bv64) == 48bv8); - free ensures (memory_load8_le(mem, 69681bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69682bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69683bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69684bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69685bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69686bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69687bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69680bv64) == 69680bv64); + diff --git a/src/test/correct/malloc_with_local3/clang_no_plt_no_pic/malloc_with_local3.expected b/src/test/correct/malloc_with_local3/clang_no_plt_no_pic/malloc_with_local3.expected index 4e8f07b3e..d6051b6c8 100644 --- a/src/test/correct/malloc_with_local3/clang_no_plt_no_pic/malloc_with_local3.expected +++ b/src/test/correct/malloc_with_local3/clang_no_plt_no_pic/malloc_with_local3.expected @@ -152,43 +152,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 2411bv64) == 99bv8); free ensures (memory_load8_le(mem, 2412bv64) == 10bv8); free ensures (memory_load8_le(mem, 2413bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -271,38 +245,10 @@ procedure #free(); free requires (memory_load8_le(mem, 2411bv64) == 99bv8); free requires (memory_load8_le(mem, 2412bv64) == 10bv8); free requires (memory_load8_le(mem, 2413bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 8bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 8bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); free ensures (memory_load8_le(mem, 2344bv64) == 1bv8); free ensures (memory_load8_le(mem, 2345bv64) == 0bv8); free ensures (memory_load8_le(mem, 2346bv64) == 2bv8); @@ -373,57 +319,15 @@ procedure #free(); free ensures (memory_load8_le(mem, 2411bv64) == 99bv8); free ensures (memory_load8_le(mem, 2412bv64) == 10bv8); free ensures (memory_load8_le(mem, 2413bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R16, Gamma_R17, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R1, R16, R17, R29, R30, R31, R8, R9, mem, stack; - free requires (memory_load8_le(mem, 69688bv64) == 0bv8); - free requires (memory_load8_le(mem, 69689bv64) == 0bv8); - free requires (memory_load8_le(mem, 69690bv64) == 0bv8); - free requires (memory_load8_le(mem, 69691bv64) == 0bv8); - free requires (memory_load8_le(mem, 69692bv64) == 0bv8); - free requires (memory_load8_le(mem, 69693bv64) == 0bv8); - free requires (memory_load8_le(mem, 69694bv64) == 0bv8); - free requires (memory_load8_le(mem, 69695bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69688bv64) == 0bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); free requires (memory_load8_le(mem, 2344bv64) == 1bv8); free requires (memory_load8_le(mem, 2345bv64) == 0bv8); free requires (memory_load8_le(mem, 2346bv64) == 2bv8); @@ -494,38 +398,10 @@ procedure main() free requires (memory_load8_le(mem, 2411bv64) == 99bv8); free requires (memory_load8_le(mem, 2412bv64) == 10bv8); free requires (memory_load8_le(mem, 2413bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 8bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 8bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -600,38 +476,12 @@ procedure main() free ensures (memory_load8_le(mem, 2411bv64) == 99bv8); free ensures (memory_load8_le(mem, 2412bv64) == 10bv8); free ensures (memory_load8_le(mem, 2413bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); + +implementation main() { var #4: bv64; var #7: bv64; @@ -815,38 +665,10 @@ procedure malloc(); free requires (memory_load8_le(mem, 2411bv64) == 99bv8); free requires (memory_load8_le(mem, 2412bv64) == 10bv8); free requires (memory_load8_le(mem, 2413bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 8bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 8bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); free ensures (memory_load8_le(mem, 2344bv64) == 1bv8); free ensures (memory_load8_le(mem, 2345bv64) == 0bv8); free ensures (memory_load8_le(mem, 2346bv64) == 2bv8); @@ -917,40 +739,12 @@ procedure malloc(); free ensures (memory_load8_le(mem, 2411bv64) == 99bv8); free ensures (memory_load8_le(mem, 2412bv64) == 10bv8); free ensures (memory_load8_le(mem, 2413bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); -procedure printCharValue() +procedure printCharValue(); modifies Gamma_R0, Gamma_R1, Gamma_R16, Gamma_R17, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R1, R16, R17, R29, R30, R31, R8, R9, mem, stack; free requires (memory_load8_le(mem, 2344bv64) == 1bv8); free requires (memory_load8_le(mem, 2345bv64) == 0bv8); @@ -1022,38 +816,10 @@ procedure printCharValue() free requires (memory_load8_le(mem, 2411bv64) == 99bv8); free requires (memory_load8_le(mem, 2412bv64) == 10bv8); free requires (memory_load8_le(mem, 2413bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 8bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 8bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -1128,38 +894,12 @@ procedure printCharValue() free ensures (memory_load8_le(mem, 2411bv64) == 99bv8); free ensures (memory_load8_le(mem, 2412bv64) == 10bv8); free ensures (memory_load8_le(mem, 2413bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); + +implementation printCharValue() { var #5: bv64; var #6: bv64; @@ -1273,38 +1013,10 @@ procedure printf(); free requires (memory_load8_le(mem, 2411bv64) == 99bv8); free requires (memory_load8_le(mem, 2412bv64) == 10bv8); free requires (memory_load8_le(mem, 2413bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 8bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 8bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); free ensures (memory_load8_le(mem, 2344bv64) == 1bv8); free ensures (memory_load8_le(mem, 2345bv64) == 0bv8); free ensures (memory_load8_le(mem, 2346bv64) == 2bv8); @@ -1375,35 +1087,8 @@ procedure printf(); free ensures (memory_load8_le(mem, 2411bv64) == 99bv8); free ensures (memory_load8_le(mem, 2412bv64) == 10bv8); free ensures (memory_load8_le(mem, 2413bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); + diff --git a/src/test/correct/malloc_with_local3/clang_pic/malloc_with_local3.expected b/src/test/correct/malloc_with_local3/clang_pic/malloc_with_local3.expected index 4e8f07b3e..d6051b6c8 100644 --- a/src/test/correct/malloc_with_local3/clang_pic/malloc_with_local3.expected +++ b/src/test/correct/malloc_with_local3/clang_pic/malloc_with_local3.expected @@ -152,43 +152,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 2411bv64) == 99bv8); free ensures (memory_load8_le(mem, 2412bv64) == 10bv8); free ensures (memory_load8_le(mem, 2413bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -271,38 +245,10 @@ procedure #free(); free requires (memory_load8_le(mem, 2411bv64) == 99bv8); free requires (memory_load8_le(mem, 2412bv64) == 10bv8); free requires (memory_load8_le(mem, 2413bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 8bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 8bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); free ensures (memory_load8_le(mem, 2344bv64) == 1bv8); free ensures (memory_load8_le(mem, 2345bv64) == 0bv8); free ensures (memory_load8_le(mem, 2346bv64) == 2bv8); @@ -373,57 +319,15 @@ procedure #free(); free ensures (memory_load8_le(mem, 2411bv64) == 99bv8); free ensures (memory_load8_le(mem, 2412bv64) == 10bv8); free ensures (memory_load8_le(mem, 2413bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R16, Gamma_R17, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R1, R16, R17, R29, R30, R31, R8, R9, mem, stack; - free requires (memory_load8_le(mem, 69688bv64) == 0bv8); - free requires (memory_load8_le(mem, 69689bv64) == 0bv8); - free requires (memory_load8_le(mem, 69690bv64) == 0bv8); - free requires (memory_load8_le(mem, 69691bv64) == 0bv8); - free requires (memory_load8_le(mem, 69692bv64) == 0bv8); - free requires (memory_load8_le(mem, 69693bv64) == 0bv8); - free requires (memory_load8_le(mem, 69694bv64) == 0bv8); - free requires (memory_load8_le(mem, 69695bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69688bv64) == 0bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); free requires (memory_load8_le(mem, 2344bv64) == 1bv8); free requires (memory_load8_le(mem, 2345bv64) == 0bv8); free requires (memory_load8_le(mem, 2346bv64) == 2bv8); @@ -494,38 +398,10 @@ procedure main() free requires (memory_load8_le(mem, 2411bv64) == 99bv8); free requires (memory_load8_le(mem, 2412bv64) == 10bv8); free requires (memory_load8_le(mem, 2413bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 8bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 8bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -600,38 +476,12 @@ procedure main() free ensures (memory_load8_le(mem, 2411bv64) == 99bv8); free ensures (memory_load8_le(mem, 2412bv64) == 10bv8); free ensures (memory_load8_le(mem, 2413bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); + +implementation main() { var #4: bv64; var #7: bv64; @@ -815,38 +665,10 @@ procedure malloc(); free requires (memory_load8_le(mem, 2411bv64) == 99bv8); free requires (memory_load8_le(mem, 2412bv64) == 10bv8); free requires (memory_load8_le(mem, 2413bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 8bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 8bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); free ensures (memory_load8_le(mem, 2344bv64) == 1bv8); free ensures (memory_load8_le(mem, 2345bv64) == 0bv8); free ensures (memory_load8_le(mem, 2346bv64) == 2bv8); @@ -917,40 +739,12 @@ procedure malloc(); free ensures (memory_load8_le(mem, 2411bv64) == 99bv8); free ensures (memory_load8_le(mem, 2412bv64) == 10bv8); free ensures (memory_load8_le(mem, 2413bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); -procedure printCharValue() +procedure printCharValue(); modifies Gamma_R0, Gamma_R1, Gamma_R16, Gamma_R17, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R1, R16, R17, R29, R30, R31, R8, R9, mem, stack; free requires (memory_load8_le(mem, 2344bv64) == 1bv8); free requires (memory_load8_le(mem, 2345bv64) == 0bv8); @@ -1022,38 +816,10 @@ procedure printCharValue() free requires (memory_load8_le(mem, 2411bv64) == 99bv8); free requires (memory_load8_le(mem, 2412bv64) == 10bv8); free requires (memory_load8_le(mem, 2413bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 8bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 8bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -1128,38 +894,12 @@ procedure printCharValue() free ensures (memory_load8_le(mem, 2411bv64) == 99bv8); free ensures (memory_load8_le(mem, 2412bv64) == 10bv8); free ensures (memory_load8_le(mem, 2413bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); + +implementation printCharValue() { var #5: bv64; var #6: bv64; @@ -1273,38 +1013,10 @@ procedure printf(); free requires (memory_load8_le(mem, 2411bv64) == 99bv8); free requires (memory_load8_le(mem, 2412bv64) == 10bv8); free requires (memory_load8_le(mem, 2413bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 8bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 8bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); free ensures (memory_load8_le(mem, 2344bv64) == 1bv8); free ensures (memory_load8_le(mem, 2345bv64) == 0bv8); free ensures (memory_load8_le(mem, 2346bv64) == 2bv8); @@ -1375,35 +1087,8 @@ procedure printf(); free ensures (memory_load8_le(mem, 2411bv64) == 99bv8); free ensures (memory_load8_le(mem, 2412bv64) == 10bv8); free ensures (memory_load8_le(mem, 2413bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); + diff --git a/src/test/correct/malloc_with_local3/gcc/malloc_with_local3.expected b/src/test/correct/malloc_with_local3/gcc/malloc_with_local3.expected index 84eaf0dd9..2c897de28 100644 --- a/src/test/correct/malloc_with_local3/gcc/malloc_with_local3.expected +++ b/src/test/correct/malloc_with_local3/gcc/malloc_with_local3.expected @@ -157,43 +157,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 2404bv64) == 99bv8); free ensures (memory_load8_le(mem, 2405bv64) == 10bv8); free ensures (memory_load8_le(mem, 2406bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -285,38 +259,10 @@ procedure #free(); free requires (memory_load8_le(mem, 2404bv64) == 99bv8); free requires (memory_load8_le(mem, 2405bv64) == 10bv8); free requires (memory_load8_le(mem, 2406bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 16bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 192bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 8bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 68992bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2328bv64) == 1bv8); free ensures (memory_load8_le(mem, 2329bv64) == 0bv8); free ensures (memory_load8_le(mem, 2330bv64) == 2bv8); @@ -396,57 +342,15 @@ procedure #free(); free ensures (memory_load8_le(mem, 2404bv64) == 99bv8); free ensures (memory_load8_le(mem, 2405bv64) == 10bv8); free ensures (memory_load8_le(mem, 2406bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R16, Gamma_R17, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R16, R17, R29, R30, R31, mem, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 2328bv64) == 1bv8); free requires (memory_load8_le(mem, 2329bv64) == 0bv8); free requires (memory_load8_le(mem, 2330bv64) == 2bv8); @@ -526,38 +430,10 @@ procedure main() free requires (memory_load8_le(mem, 2404bv64) == 99bv8); free requires (memory_load8_le(mem, 2405bv64) == 10bv8); free requires (memory_load8_le(mem, 2406bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 16bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 192bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 8bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 68992bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -641,38 +517,12 @@ procedure main() free ensures (memory_load8_le(mem, 2404bv64) == 99bv8); free ensures (memory_load8_le(mem, 2405bv64) == 10bv8); free ensures (memory_load8_le(mem, 2406bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv64; var Gamma_#4: bool; @@ -855,38 +705,10 @@ procedure malloc(); free requires (memory_load8_le(mem, 2404bv64) == 99bv8); free requires (memory_load8_le(mem, 2405bv64) == 10bv8); free requires (memory_load8_le(mem, 2406bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 16bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 192bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 8bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 68992bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2328bv64) == 1bv8); free ensures (memory_load8_le(mem, 2329bv64) == 0bv8); free ensures (memory_load8_le(mem, 2330bv64) == 2bv8); @@ -966,40 +788,12 @@ procedure malloc(); free ensures (memory_load8_le(mem, 2404bv64) == 99bv8); free ensures (memory_load8_le(mem, 2405bv64) == 10bv8); free ensures (memory_load8_le(mem, 2406bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure printCharValue() +procedure printCharValue(); modifies Gamma_R0, Gamma_R1, Gamma_R16, Gamma_R17, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R16, R17, R29, R30, R31, mem, stack; free requires (memory_load8_le(mem, 2328bv64) == 1bv8); free requires (memory_load8_le(mem, 2329bv64) == 0bv8); @@ -1080,38 +874,10 @@ procedure printCharValue() free requires (memory_load8_le(mem, 2404bv64) == 99bv8); free requires (memory_load8_le(mem, 2405bv64) == 10bv8); free requires (memory_load8_le(mem, 2406bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 16bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 192bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 8bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 68992bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -1195,38 +961,12 @@ procedure printCharValue() free ensures (memory_load8_le(mem, 2404bv64) == 99bv8); free ensures (memory_load8_le(mem, 2405bv64) == 10bv8); free ensures (memory_load8_le(mem, 2406bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation printCharValue() { var #5: bv64; var Gamma_#5: bool; @@ -1349,38 +1089,10 @@ procedure printf(); free requires (memory_load8_le(mem, 2404bv64) == 99bv8); free requires (memory_load8_le(mem, 2405bv64) == 10bv8); free requires (memory_load8_le(mem, 2406bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 16bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 192bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 8bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 68992bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2328bv64) == 1bv8); free ensures (memory_load8_le(mem, 2329bv64) == 0bv8); free ensures (memory_load8_le(mem, 2330bv64) == 2bv8); @@ -1460,35 +1172,8 @@ procedure printf(); free ensures (memory_load8_le(mem, 2404bv64) == 99bv8); free ensures (memory_load8_le(mem, 2405bv64) == 10bv8); free ensures (memory_load8_le(mem, 2406bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + diff --git a/src/test/correct/malloc_with_local3/gcc_O2/malloc_with_local3.expected b/src/test/correct/malloc_with_local3/gcc_O2/malloc_with_local3.expected index cb33d38b0..3f092f772 100644 --- a/src/test/correct/malloc_with_local3/gcc_O2/malloc_with_local3.expected +++ b/src/test/correct/malloc_with_local3/gcc_O2/malloc_with_local3.expected @@ -143,43 +143,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 2336bv64) == 100bv8); free ensures (memory_load8_le(mem, 2337bv64) == 10bv8); free ensures (memory_load8_le(mem, 2338bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 144bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2192bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 2112bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -267,38 +241,10 @@ procedure __printf_chk(); free requires (memory_load8_le(mem, 2336bv64) == 100bv8); free requires (memory_load8_le(mem, 2337bv64) == 10bv8); free requires (memory_load8_le(mem, 2338bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 144bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 64bv8); - free requires (memory_load8_le(mem, 69001bv64) == 8bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 0bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 68992bv64) == 2192bv64); + free requires (memory_load64_le(mem, 69000bv64) == 2112bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2264bv64) == 1bv8); free ensures (memory_load8_le(mem, 2265bv64) == 0bv8); free ensures (memory_load8_le(mem, 2266bv64) == 2bv8); @@ -374,38 +320,10 @@ procedure __printf_chk(); free ensures (memory_load8_le(mem, 2336bv64) == 100bv8); free ensures (memory_load8_le(mem, 2337bv64) == 10bv8); free ensures (memory_load8_le(mem, 2338bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 144bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2192bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 2112bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); procedure #free(); modifies Gamma_R16, Gamma_R17, R16, R17; @@ -484,38 +402,10 @@ procedure #free(); free requires (memory_load8_le(mem, 2336bv64) == 100bv8); free requires (memory_load8_le(mem, 2337bv64) == 10bv8); free requires (memory_load8_le(mem, 2338bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 144bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 64bv8); - free requires (memory_load8_le(mem, 69001bv64) == 8bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 0bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 68992bv64) == 2192bv64); + free requires (memory_load64_le(mem, 69000bv64) == 2112bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2264bv64) == 1bv8); free ensures (memory_load8_le(mem, 2265bv64) == 0bv8); free ensures (memory_load8_le(mem, 2266bv64) == 2bv8); @@ -591,57 +481,15 @@ procedure #free(); free ensures (memory_load8_le(mem, 2336bv64) == 100bv8); free ensures (memory_load8_le(mem, 2337bv64) == 10bv8); free ensures (memory_load8_le(mem, 2338bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 144bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2192bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 2112bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R16, Gamma_R17, Gamma_R19, Gamma_R2, Gamma_R29, Gamma_R3, Gamma_R30, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R16, R17, R19, R2, R29, R3, R30, R31, mem, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 2264bv64) == 1bv8); free requires (memory_load8_le(mem, 2265bv64) == 0bv8); free requires (memory_load8_le(mem, 2266bv64) == 2bv8); @@ -717,38 +565,10 @@ procedure main() free requires (memory_load8_le(mem, 2336bv64) == 100bv8); free requires (memory_load8_le(mem, 2337bv64) == 10bv8); free requires (memory_load8_le(mem, 2338bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 144bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 64bv8); - free requires (memory_load8_le(mem, 69001bv64) == 8bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 0bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 68992bv64) == 2192bv64); + free requires (memory_load64_le(mem, 69000bv64) == 2112bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R19 == old(Gamma_R19)); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); @@ -830,38 +650,12 @@ procedure main() free ensures (memory_load8_le(mem, 2336bv64) == 100bv8); free ensures (memory_load8_le(mem, 2337bv64) == 10bv8); free ensures (memory_load8_le(mem, 2338bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 144bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2192bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 2112bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #1: bv64; var Gamma_#1: bool; @@ -1002,38 +796,10 @@ procedure malloc(); free requires (memory_load8_le(mem, 2336bv64) == 100bv8); free requires (memory_load8_le(mem, 2337bv64) == 10bv8); free requires (memory_load8_le(mem, 2338bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 144bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 64bv8); - free requires (memory_load8_le(mem, 69001bv64) == 8bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 0bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 68992bv64) == 2192bv64); + free requires (memory_load64_le(mem, 69000bv64) == 2112bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2264bv64) == 1bv8); free ensures (memory_load8_le(mem, 2265bv64) == 0bv8); free ensures (memory_load8_le(mem, 2266bv64) == 2bv8); @@ -1109,40 +875,12 @@ procedure malloc(); free ensures (memory_load8_le(mem, 2336bv64) == 100bv8); free ensures (memory_load8_le(mem, 2337bv64) == 10bv8); free ensures (memory_load8_le(mem, 2338bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 144bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2192bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 2112bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure printCharValue() +procedure printCharValue(); modifies Gamma_R0, Gamma_R1, Gamma_R16, Gamma_R17, Gamma_R2, Gamma_R3, Gamma_mem, R0, R1, R16, R17, R2, R3, mem; free requires (memory_load8_le(mem, 2264bv64) == 1bv8); free requires (memory_load8_le(mem, 2265bv64) == 0bv8); @@ -1219,38 +957,10 @@ procedure printCharValue() free requires (memory_load8_le(mem, 2336bv64) == 100bv8); free requires (memory_load8_le(mem, 2337bv64) == 10bv8); free requires (memory_load8_le(mem, 2338bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 144bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 64bv8); - free requires (memory_load8_le(mem, 69001bv64) == 8bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 0bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 68992bv64) == 2192bv64); + free requires (memory_load64_le(mem, 69000bv64) == 2112bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2264bv64) == 1bv8); free ensures (memory_load8_le(mem, 2265bv64) == 0bv8); free ensures (memory_load8_le(mem, 2266bv64) == 2bv8); @@ -1326,38 +1036,12 @@ procedure printCharValue() free ensures (memory_load8_le(mem, 2336bv64) == 100bv8); free ensures (memory_load8_le(mem, 2337bv64) == 10bv8); free ensures (memory_load8_le(mem, 2338bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 144bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2192bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 2112bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation printCharValue() { lprintCharValue: assume {:captureState "lprintCharValue"} true; @@ -1377,3 +1061,4 @@ procedure printCharValue() //no return target assume false; } + diff --git a/src/test/correct/malloc_with_local3/gcc_no_plt_no_pic/malloc_with_local3.expected b/src/test/correct/malloc_with_local3/gcc_no_plt_no_pic/malloc_with_local3.expected index 5b5324742..5d8f3abb6 100644 --- a/src/test/correct/malloc_with_local3/gcc_no_plt_no_pic/malloc_with_local3.expected +++ b/src/test/correct/malloc_with_local3/gcc_no_plt_no_pic/malloc_with_local3.expected @@ -157,43 +157,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 2404bv64) == 99bv8); free ensures (memory_load8_le(mem, 2405bv64) == 10bv8); free ensures (memory_load8_le(mem, 2406bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -285,38 +259,10 @@ procedure #free(); free requires (memory_load8_le(mem, 2404bv64) == 99bv8); free requires (memory_load8_le(mem, 2405bv64) == 10bv8); free requires (memory_load8_le(mem, 2406bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 16bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 192bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 8bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 68992bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2328bv64) == 1bv8); free ensures (memory_load8_le(mem, 2329bv64) == 0bv8); free ensures (memory_load8_le(mem, 2330bv64) == 2bv8); @@ -396,57 +342,15 @@ procedure #free(); free ensures (memory_load8_le(mem, 2404bv64) == 99bv8); free ensures (memory_load8_le(mem, 2405bv64) == 10bv8); free ensures (memory_load8_le(mem, 2406bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R16, Gamma_R17, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R16, R17, R29, R30, R31, mem, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 2328bv64) == 1bv8); free requires (memory_load8_le(mem, 2329bv64) == 0bv8); free requires (memory_load8_le(mem, 2330bv64) == 2bv8); @@ -526,38 +430,10 @@ procedure main() free requires (memory_load8_le(mem, 2404bv64) == 99bv8); free requires (memory_load8_le(mem, 2405bv64) == 10bv8); free requires (memory_load8_le(mem, 2406bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 16bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 192bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 8bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 68992bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -641,38 +517,12 @@ procedure main() free ensures (memory_load8_le(mem, 2404bv64) == 99bv8); free ensures (memory_load8_le(mem, 2405bv64) == 10bv8); free ensures (memory_load8_le(mem, 2406bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv64; var Gamma_#4: bool; @@ -855,38 +705,10 @@ procedure malloc(); free requires (memory_load8_le(mem, 2404bv64) == 99bv8); free requires (memory_load8_le(mem, 2405bv64) == 10bv8); free requires (memory_load8_le(mem, 2406bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 16bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 192bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 8bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 68992bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2328bv64) == 1bv8); free ensures (memory_load8_le(mem, 2329bv64) == 0bv8); free ensures (memory_load8_le(mem, 2330bv64) == 2bv8); @@ -966,40 +788,12 @@ procedure malloc(); free ensures (memory_load8_le(mem, 2404bv64) == 99bv8); free ensures (memory_load8_le(mem, 2405bv64) == 10bv8); free ensures (memory_load8_le(mem, 2406bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure printCharValue() +procedure printCharValue(); modifies Gamma_R0, Gamma_R1, Gamma_R16, Gamma_R17, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R16, R17, R29, R30, R31, mem, stack; free requires (memory_load8_le(mem, 2328bv64) == 1bv8); free requires (memory_load8_le(mem, 2329bv64) == 0bv8); @@ -1080,38 +874,10 @@ procedure printCharValue() free requires (memory_load8_le(mem, 2404bv64) == 99bv8); free requires (memory_load8_le(mem, 2405bv64) == 10bv8); free requires (memory_load8_le(mem, 2406bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 16bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 192bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 8bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 68992bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -1195,38 +961,12 @@ procedure printCharValue() free ensures (memory_load8_le(mem, 2404bv64) == 99bv8); free ensures (memory_load8_le(mem, 2405bv64) == 10bv8); free ensures (memory_load8_le(mem, 2406bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation printCharValue() { var #5: bv64; var Gamma_#5: bool; @@ -1349,38 +1089,10 @@ procedure printf(); free requires (memory_load8_le(mem, 2404bv64) == 99bv8); free requires (memory_load8_le(mem, 2405bv64) == 10bv8); free requires (memory_load8_le(mem, 2406bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 16bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 192bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 8bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 68992bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2328bv64) == 1bv8); free ensures (memory_load8_le(mem, 2329bv64) == 0bv8); free ensures (memory_load8_le(mem, 2330bv64) == 2bv8); @@ -1460,35 +1172,8 @@ procedure printf(); free ensures (memory_load8_le(mem, 2404bv64) == 99bv8); free ensures (memory_load8_le(mem, 2405bv64) == 10bv8); free ensures (memory_load8_le(mem, 2406bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + diff --git a/src/test/correct/malloc_with_local3/gcc_pic/malloc_with_local3.expected b/src/test/correct/malloc_with_local3/gcc_pic/malloc_with_local3.expected index 5b5324742..5d8f3abb6 100644 --- a/src/test/correct/malloc_with_local3/gcc_pic/malloc_with_local3.expected +++ b/src/test/correct/malloc_with_local3/gcc_pic/malloc_with_local3.expected @@ -157,43 +157,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 2404bv64) == 99bv8); free ensures (memory_load8_le(mem, 2405bv64) == 10bv8); free ensures (memory_load8_le(mem, 2406bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -285,38 +259,10 @@ procedure #free(); free requires (memory_load8_le(mem, 2404bv64) == 99bv8); free requires (memory_load8_le(mem, 2405bv64) == 10bv8); free requires (memory_load8_le(mem, 2406bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 16bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 192bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 8bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 68992bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2328bv64) == 1bv8); free ensures (memory_load8_le(mem, 2329bv64) == 0bv8); free ensures (memory_load8_le(mem, 2330bv64) == 2bv8); @@ -396,57 +342,15 @@ procedure #free(); free ensures (memory_load8_le(mem, 2404bv64) == 99bv8); free ensures (memory_load8_le(mem, 2405bv64) == 10bv8); free ensures (memory_load8_le(mem, 2406bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R16, Gamma_R17, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R16, R17, R29, R30, R31, mem, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 2328bv64) == 1bv8); free requires (memory_load8_le(mem, 2329bv64) == 0bv8); free requires (memory_load8_le(mem, 2330bv64) == 2bv8); @@ -526,38 +430,10 @@ procedure main() free requires (memory_load8_le(mem, 2404bv64) == 99bv8); free requires (memory_load8_le(mem, 2405bv64) == 10bv8); free requires (memory_load8_le(mem, 2406bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 16bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 192bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 8bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 68992bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -641,38 +517,12 @@ procedure main() free ensures (memory_load8_le(mem, 2404bv64) == 99bv8); free ensures (memory_load8_le(mem, 2405bv64) == 10bv8); free ensures (memory_load8_le(mem, 2406bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv64; var Gamma_#4: bool; @@ -855,38 +705,10 @@ procedure malloc(); free requires (memory_load8_le(mem, 2404bv64) == 99bv8); free requires (memory_load8_le(mem, 2405bv64) == 10bv8); free requires (memory_load8_le(mem, 2406bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 16bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 192bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 8bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 68992bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2328bv64) == 1bv8); free ensures (memory_load8_le(mem, 2329bv64) == 0bv8); free ensures (memory_load8_le(mem, 2330bv64) == 2bv8); @@ -966,40 +788,12 @@ procedure malloc(); free ensures (memory_load8_le(mem, 2404bv64) == 99bv8); free ensures (memory_load8_le(mem, 2405bv64) == 10bv8); free ensures (memory_load8_le(mem, 2406bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure printCharValue() +procedure printCharValue(); modifies Gamma_R0, Gamma_R1, Gamma_R16, Gamma_R17, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R16, R17, R29, R30, R31, mem, stack; free requires (memory_load8_le(mem, 2328bv64) == 1bv8); free requires (memory_load8_le(mem, 2329bv64) == 0bv8); @@ -1080,38 +874,10 @@ procedure printCharValue() free requires (memory_load8_le(mem, 2404bv64) == 99bv8); free requires (memory_load8_le(mem, 2405bv64) == 10bv8); free requires (memory_load8_le(mem, 2406bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 16bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 192bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 8bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 68992bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -1195,38 +961,12 @@ procedure printCharValue() free ensures (memory_load8_le(mem, 2404bv64) == 99bv8); free ensures (memory_load8_le(mem, 2405bv64) == 10bv8); free ensures (memory_load8_le(mem, 2406bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation printCharValue() { var #5: bv64; var Gamma_#5: bool; @@ -1349,38 +1089,10 @@ procedure printf(); free requires (memory_load8_le(mem, 2404bv64) == 99bv8); free requires (memory_load8_le(mem, 2405bv64) == 10bv8); free requires (memory_load8_le(mem, 2406bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 16bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 192bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 8bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 68992bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2328bv64) == 1bv8); free ensures (memory_load8_le(mem, 2329bv64) == 0bv8); free ensures (memory_load8_le(mem, 2330bv64) == 2bv8); @@ -1460,35 +1172,8 @@ procedure printf(); free ensures (memory_load8_le(mem, 2404bv64) == 99bv8); free ensures (memory_load8_le(mem, 2405bv64) == 10bv8); free ensures (memory_load8_le(mem, 2406bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + diff --git a/src/test/correct/multi_malloc/clang/multi_malloc.expected b/src/test/correct/multi_malloc/clang/multi_malloc.expected index 829a6b1d3..2beff043b 100644 --- a/src/test/correct/multi_malloc/clang/multi_malloc.expected +++ b/src/test/correct/multi_malloc/clang/multi_malloc.expected @@ -118,43 +118,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 2266bv64) == 100bv8); free ensures (memory_load8_le(mem, 2267bv64) == 10bv8); free ensures (memory_load8_le(mem, 2268bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -204,38 +178,10 @@ procedure #free(); free requires (memory_load8_le(mem, 2266bv64) == 100bv8); free requires (memory_load8_le(mem, 2267bv64) == 10bv8); free requires (memory_load8_le(mem, 2268bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 8bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 8bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); free ensures (memory_load8_le(mem, 2232bv64) == 1bv8); free ensures (memory_load8_le(mem, 2233bv64) == 0bv8); free ensures (memory_load8_le(mem, 2234bv64) == 2bv8); @@ -273,57 +219,15 @@ procedure #free(); free ensures (memory_load8_le(mem, 2266bv64) == 100bv8); free ensures (memory_load8_le(mem, 2267bv64) == 10bv8); free ensures (memory_load8_le(mem, 2268bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R16, Gamma_R17, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R1, R16, R17, R29, R30, R31, R8, R9, mem, stack; - free requires (memory_load8_le(mem, 69688bv64) == 0bv8); - free requires (memory_load8_le(mem, 69689bv64) == 0bv8); - free requires (memory_load8_le(mem, 69690bv64) == 0bv8); - free requires (memory_load8_le(mem, 69691bv64) == 0bv8); - free requires (memory_load8_le(mem, 69692bv64) == 0bv8); - free requires (memory_load8_le(mem, 69693bv64) == 0bv8); - free requires (memory_load8_le(mem, 69694bv64) == 0bv8); - free requires (memory_load8_le(mem, 69695bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69688bv64) == 0bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); free requires (memory_load8_le(mem, 2232bv64) == 1bv8); free requires (memory_load8_le(mem, 2233bv64) == 0bv8); free requires (memory_load8_le(mem, 2234bv64) == 2bv8); @@ -361,38 +265,10 @@ procedure main() free requires (memory_load8_le(mem, 2266bv64) == 100bv8); free requires (memory_load8_le(mem, 2267bv64) == 10bv8); free requires (memory_load8_le(mem, 2268bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 8bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 8bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -434,38 +310,12 @@ procedure main() free ensures (memory_load8_le(mem, 2266bv64) == 100bv8); free ensures (memory_load8_le(mem, 2267bv64) == 10bv8); free ensures (memory_load8_le(mem, 2268bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); + +implementation main() { var #4: bv64; var #5: bv64; @@ -592,38 +442,10 @@ procedure malloc(); free requires (memory_load8_le(mem, 2266bv64) == 100bv8); free requires (memory_load8_le(mem, 2267bv64) == 10bv8); free requires (memory_load8_le(mem, 2268bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 8bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 8bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); free ensures (memory_load8_le(mem, 2232bv64) == 1bv8); free ensures (memory_load8_le(mem, 2233bv64) == 0bv8); free ensures (memory_load8_le(mem, 2234bv64) == 2bv8); @@ -661,38 +483,10 @@ procedure malloc(); free ensures (memory_load8_le(mem, 2266bv64) == 100bv8); free ensures (memory_load8_le(mem, 2267bv64) == 10bv8); free ensures (memory_load8_le(mem, 2268bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); procedure printf(); modifies Gamma_R16, Gamma_R17, R16, R17; @@ -733,38 +527,10 @@ procedure printf(); free requires (memory_load8_le(mem, 2266bv64) == 100bv8); free requires (memory_load8_le(mem, 2267bv64) == 10bv8); free requires (memory_load8_le(mem, 2268bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 8bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 8bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); free ensures (memory_load8_le(mem, 2232bv64) == 1bv8); free ensures (memory_load8_le(mem, 2233bv64) == 0bv8); free ensures (memory_load8_le(mem, 2234bv64) == 2bv8); @@ -802,35 +568,8 @@ procedure printf(); free ensures (memory_load8_le(mem, 2266bv64) == 100bv8); free ensures (memory_load8_le(mem, 2267bv64) == 10bv8); free ensures (memory_load8_le(mem, 2268bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); + diff --git a/src/test/correct/multi_malloc/clang_O2/multi_malloc.expected b/src/test/correct/multi_malloc/clang_O2/multi_malloc.expected index d1762ce6b..b70d16d72 100644 --- a/src/test/correct/multi_malloc/clang_O2/multi_malloc.expected +++ b/src/test/correct/multi_malloc/clang_O2/multi_malloc.expected @@ -80,43 +80,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1982bv64) == 100bv8); free ensures (memory_load8_le(mem, 1983bv64) == 10bv8); free ensures (memory_load8_le(mem, 1984bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69680bv64) == 48bv8); - free ensures (memory_load8_le(mem, 69681bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69682bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69683bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69684bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69685bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69686bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69687bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69680bv64) == 69680bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -127,24 +101,10 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R16, Gamma_R17, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_stack, R0, R1, R16, R17, R29, R30, R31, stack; - free requires (memory_load8_le(mem, 69672bv64) == 0bv8); - free requires (memory_load8_le(mem, 69673bv64) == 0bv8); - free requires (memory_load8_le(mem, 69674bv64) == 0bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); - free requires (memory_load8_le(mem, 69680bv64) == 48bv8); - free requires (memory_load8_le(mem, 69681bv64) == 16bv8); - free requires (memory_load8_le(mem, 69682bv64) == 1bv8); - free requires (memory_load8_le(mem, 69683bv64) == 0bv8); - free requires (memory_load8_le(mem, 69684bv64) == 0bv8); - free requires (memory_load8_le(mem, 69685bv64) == 0bv8); - free requires (memory_load8_le(mem, 69686bv64) == 0bv8); - free requires (memory_load8_le(mem, 69687bv64) == 0bv8); + free requires (memory_load64_le(mem, 69672bv64) == 0bv64); + free requires (memory_load64_le(mem, 69680bv64) == 69680bv64); free requires (memory_load8_le(mem, 1948bv64) == 1bv8); free requires (memory_load8_le(mem, 1949bv64) == 0bv8); free requires (memory_load8_le(mem, 1950bv64) == 2bv8); @@ -182,38 +142,10 @@ procedure main() free requires (memory_load8_le(mem, 1982bv64) == 100bv8); free requires (memory_load8_le(mem, 1983bv64) == 10bv8); free requires (memory_load8_le(mem, 1984bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 80bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 0bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 84bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69680bv64) == 48bv8); - free requires (memory_load8_le(mem, 69681bv64) == 16bv8); - free requires (memory_load8_le(mem, 69682bv64) == 1bv8); - free requires (memory_load8_le(mem, 69683bv64) == 0bv8); - free requires (memory_load8_le(mem, 69684bv64) == 0bv8); - free requires (memory_load8_le(mem, 69685bv64) == 0bv8); - free requires (memory_load8_le(mem, 69686bv64) == 0bv8); - free requires (memory_load8_le(mem, 69687bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69680bv64) == 69680bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -255,38 +187,12 @@ procedure main() free ensures (memory_load8_le(mem, 1982bv64) == 100bv8); free ensures (memory_load8_le(mem, 1983bv64) == 10bv8); free ensures (memory_load8_le(mem, 1984bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69680bv64) == 48bv8); - free ensures (memory_load8_le(mem, 69681bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69682bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69683bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69684bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69685bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69686bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69687bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69680bv64) == 69680bv64); + +implementation main() { var #4: bv64; var Gamma_#4: bool; @@ -361,38 +267,10 @@ procedure printf(); free requires (memory_load8_le(mem, 1982bv64) == 100bv8); free requires (memory_load8_le(mem, 1983bv64) == 10bv8); free requires (memory_load8_le(mem, 1984bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 80bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 0bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 84bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69680bv64) == 48bv8); - free requires (memory_load8_le(mem, 69681bv64) == 16bv8); - free requires (memory_load8_le(mem, 69682bv64) == 1bv8); - free requires (memory_load8_le(mem, 69683bv64) == 0bv8); - free requires (memory_load8_le(mem, 69684bv64) == 0bv8); - free requires (memory_load8_le(mem, 69685bv64) == 0bv8); - free requires (memory_load8_le(mem, 69686bv64) == 0bv8); - free requires (memory_load8_le(mem, 69687bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69680bv64) == 69680bv64); free ensures (memory_load8_le(mem, 1948bv64) == 1bv8); free ensures (memory_load8_le(mem, 1949bv64) == 0bv8); free ensures (memory_load8_le(mem, 1950bv64) == 2bv8); @@ -430,35 +308,8 @@ procedure printf(); free ensures (memory_load8_le(mem, 1982bv64) == 100bv8); free ensures (memory_load8_le(mem, 1983bv64) == 10bv8); free ensures (memory_load8_le(mem, 1984bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69680bv64) == 48bv8); - free ensures (memory_load8_le(mem, 69681bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69682bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69683bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69684bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69685bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69686bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69687bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69680bv64) == 69680bv64); + diff --git a/src/test/correct/multi_malloc/clang_no_plt_no_pic/multi_malloc.expected b/src/test/correct/multi_malloc/clang_no_plt_no_pic/multi_malloc.expected index 002ba1344..a3b315d98 100644 --- a/src/test/correct/multi_malloc/clang_no_plt_no_pic/multi_malloc.expected +++ b/src/test/correct/multi_malloc/clang_no_plt_no_pic/multi_malloc.expected @@ -118,43 +118,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 2266bv64) == 100bv8); free ensures (memory_load8_le(mem, 2267bv64) == 10bv8); free ensures (memory_load8_le(mem, 2268bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -204,38 +178,10 @@ procedure #free(); free requires (memory_load8_le(mem, 2266bv64) == 100bv8); free requires (memory_load8_le(mem, 2267bv64) == 10bv8); free requires (memory_load8_le(mem, 2268bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 8bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 8bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); free ensures (memory_load8_le(mem, 2232bv64) == 1bv8); free ensures (memory_load8_le(mem, 2233bv64) == 0bv8); free ensures (memory_load8_le(mem, 2234bv64) == 2bv8); @@ -273,57 +219,15 @@ procedure #free(); free ensures (memory_load8_le(mem, 2266bv64) == 100bv8); free ensures (memory_load8_le(mem, 2267bv64) == 10bv8); free ensures (memory_load8_le(mem, 2268bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R16, Gamma_R17, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R1, R16, R17, R29, R30, R31, R8, R9, mem, stack; - free requires (memory_load8_le(mem, 69688bv64) == 0bv8); - free requires (memory_load8_le(mem, 69689bv64) == 0bv8); - free requires (memory_load8_le(mem, 69690bv64) == 0bv8); - free requires (memory_load8_le(mem, 69691bv64) == 0bv8); - free requires (memory_load8_le(mem, 69692bv64) == 0bv8); - free requires (memory_load8_le(mem, 69693bv64) == 0bv8); - free requires (memory_load8_le(mem, 69694bv64) == 0bv8); - free requires (memory_load8_le(mem, 69695bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69688bv64) == 0bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); free requires (memory_load8_le(mem, 2232bv64) == 1bv8); free requires (memory_load8_le(mem, 2233bv64) == 0bv8); free requires (memory_load8_le(mem, 2234bv64) == 2bv8); @@ -361,38 +265,10 @@ procedure main() free requires (memory_load8_le(mem, 2266bv64) == 100bv8); free requires (memory_load8_le(mem, 2267bv64) == 10bv8); free requires (memory_load8_le(mem, 2268bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 8bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 8bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -434,38 +310,12 @@ procedure main() free ensures (memory_load8_le(mem, 2266bv64) == 100bv8); free ensures (memory_load8_le(mem, 2267bv64) == 10bv8); free ensures (memory_load8_le(mem, 2268bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); + +implementation main() { var #4: bv64; var #5: bv64; @@ -592,38 +442,10 @@ procedure malloc(); free requires (memory_load8_le(mem, 2266bv64) == 100bv8); free requires (memory_load8_le(mem, 2267bv64) == 10bv8); free requires (memory_load8_le(mem, 2268bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 8bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 8bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); free ensures (memory_load8_le(mem, 2232bv64) == 1bv8); free ensures (memory_load8_le(mem, 2233bv64) == 0bv8); free ensures (memory_load8_le(mem, 2234bv64) == 2bv8); @@ -661,38 +483,10 @@ procedure malloc(); free ensures (memory_load8_le(mem, 2266bv64) == 100bv8); free ensures (memory_load8_le(mem, 2267bv64) == 10bv8); free ensures (memory_load8_le(mem, 2268bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); procedure printf(); modifies Gamma_R16, Gamma_R17, R16, R17; @@ -733,38 +527,10 @@ procedure printf(); free requires (memory_load8_le(mem, 2266bv64) == 100bv8); free requires (memory_load8_le(mem, 2267bv64) == 10bv8); free requires (memory_load8_le(mem, 2268bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 8bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 8bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); free ensures (memory_load8_le(mem, 2232bv64) == 1bv8); free ensures (memory_load8_le(mem, 2233bv64) == 0bv8); free ensures (memory_load8_le(mem, 2234bv64) == 2bv8); @@ -802,35 +568,8 @@ procedure printf(); free ensures (memory_load8_le(mem, 2266bv64) == 100bv8); free ensures (memory_load8_le(mem, 2267bv64) == 10bv8); free ensures (memory_load8_le(mem, 2268bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); + diff --git a/src/test/correct/multi_malloc/clang_pic/multi_malloc.expected b/src/test/correct/multi_malloc/clang_pic/multi_malloc.expected index 002ba1344..a3b315d98 100644 --- a/src/test/correct/multi_malloc/clang_pic/multi_malloc.expected +++ b/src/test/correct/multi_malloc/clang_pic/multi_malloc.expected @@ -118,43 +118,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 2266bv64) == 100bv8); free ensures (memory_load8_le(mem, 2267bv64) == 10bv8); free ensures (memory_load8_le(mem, 2268bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -204,38 +178,10 @@ procedure #free(); free requires (memory_load8_le(mem, 2266bv64) == 100bv8); free requires (memory_load8_le(mem, 2267bv64) == 10bv8); free requires (memory_load8_le(mem, 2268bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 8bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 8bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); free ensures (memory_load8_le(mem, 2232bv64) == 1bv8); free ensures (memory_load8_le(mem, 2233bv64) == 0bv8); free ensures (memory_load8_le(mem, 2234bv64) == 2bv8); @@ -273,57 +219,15 @@ procedure #free(); free ensures (memory_load8_le(mem, 2266bv64) == 100bv8); free ensures (memory_load8_le(mem, 2267bv64) == 10bv8); free ensures (memory_load8_le(mem, 2268bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R16, Gamma_R17, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R1, R16, R17, R29, R30, R31, R8, R9, mem, stack; - free requires (memory_load8_le(mem, 69688bv64) == 0bv8); - free requires (memory_load8_le(mem, 69689bv64) == 0bv8); - free requires (memory_load8_le(mem, 69690bv64) == 0bv8); - free requires (memory_load8_le(mem, 69691bv64) == 0bv8); - free requires (memory_load8_le(mem, 69692bv64) == 0bv8); - free requires (memory_load8_le(mem, 69693bv64) == 0bv8); - free requires (memory_load8_le(mem, 69694bv64) == 0bv8); - free requires (memory_load8_le(mem, 69695bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69688bv64) == 0bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); free requires (memory_load8_le(mem, 2232bv64) == 1bv8); free requires (memory_load8_le(mem, 2233bv64) == 0bv8); free requires (memory_load8_le(mem, 2234bv64) == 2bv8); @@ -361,38 +265,10 @@ procedure main() free requires (memory_load8_le(mem, 2266bv64) == 100bv8); free requires (memory_load8_le(mem, 2267bv64) == 10bv8); free requires (memory_load8_le(mem, 2268bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 8bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 8bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -434,38 +310,12 @@ procedure main() free ensures (memory_load8_le(mem, 2266bv64) == 100bv8); free ensures (memory_load8_le(mem, 2267bv64) == 10bv8); free ensures (memory_load8_le(mem, 2268bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); + +implementation main() { var #4: bv64; var #5: bv64; @@ -592,38 +442,10 @@ procedure malloc(); free requires (memory_load8_le(mem, 2266bv64) == 100bv8); free requires (memory_load8_le(mem, 2267bv64) == 10bv8); free requires (memory_load8_le(mem, 2268bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 8bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 8bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); free ensures (memory_load8_le(mem, 2232bv64) == 1bv8); free ensures (memory_load8_le(mem, 2233bv64) == 0bv8); free ensures (memory_load8_le(mem, 2234bv64) == 2bv8); @@ -661,38 +483,10 @@ procedure malloc(); free ensures (memory_load8_le(mem, 2266bv64) == 100bv8); free ensures (memory_load8_le(mem, 2267bv64) == 10bv8); free ensures (memory_load8_le(mem, 2268bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); procedure printf(); modifies Gamma_R16, Gamma_R17, R16, R17; @@ -733,38 +527,10 @@ procedure printf(); free requires (memory_load8_le(mem, 2266bv64) == 100bv8); free requires (memory_load8_le(mem, 2267bv64) == 10bv8); free requires (memory_load8_le(mem, 2268bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 8bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 8bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69696bv64) == 64bv8); - free requires (memory_load8_le(mem, 69697bv64) == 16bv8); - free requires (memory_load8_le(mem, 69698bv64) == 1bv8); - free requires (memory_load8_le(mem, 69699bv64) == 0bv8); - free requires (memory_load8_le(mem, 69700bv64) == 0bv8); - free requires (memory_load8_le(mem, 69701bv64) == 0bv8); - free requires (memory_load8_le(mem, 69702bv64) == 0bv8); - free requires (memory_load8_le(mem, 69703bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69592bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69696bv64) == 69696bv64); free ensures (memory_load8_le(mem, 2232bv64) == 1bv8); free ensures (memory_load8_le(mem, 2233bv64) == 0bv8); free ensures (memory_load8_le(mem, 2234bv64) == 2bv8); @@ -802,35 +568,8 @@ procedure printf(); free ensures (memory_load8_le(mem, 2266bv64) == 100bv8); free ensures (memory_load8_le(mem, 2267bv64) == 10bv8); free ensures (memory_load8_le(mem, 2268bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69696bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69697bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69698bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69699bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69700bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69701bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69702bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69703bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69696bv64) == 69696bv64); + diff --git a/src/test/correct/multi_malloc/gcc/multi_malloc.expected b/src/test/correct/multi_malloc/gcc/multi_malloc.expected index 183a05c34..6ac074ca4 100644 --- a/src/test/correct/multi_malloc/gcc/multi_malloc.expected +++ b/src/test/correct/multi_malloc/gcc/multi_malloc.expected @@ -77,91 +77,23 @@ procedure {:extern} rely(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); - free ensures (memory_load8_le(mem, 2224bv64) == 1bv8); - free ensures (memory_load8_le(mem, 2225bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2226bv64) == 2bv8); - free ensures (memory_load8_le(mem, 2227bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2228bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2229bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2230bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2231bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2232bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2233bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2234bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2235bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2236bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2237bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2238bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2239bv64) == 114bv8); - free ensures (memory_load8_le(mem, 2240bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2241bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2242bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2243bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2244bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2245bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2246bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2247bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2248bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2249bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2250bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2251bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2252bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2253bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2254bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2255bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2256bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2257bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2258bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2259bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2260bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2261bv64) == 110bv8); - free ensures (memory_load8_le(mem, 2262bv64) == 116bv8); - free ensures (memory_load8_le(mem, 2263bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2264bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2265bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2266bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2267bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2268bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2269bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2270bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2271bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 2224bv64) == 131073bv64); + free ensures (memory_load64_le(mem, 2232bv64) == 8241983568019286100bv64); + free ensures (memory_load64_le(mem, 2240bv64) == 748482783423457568bv64); + free ensures (memory_load64_le(mem, 2248bv64) == 0bv64); + free ensures (memory_load64_le(mem, 2256bv64) == 2338615504306268244bv64); + free ensures (memory_load64_le(mem, 2264bv64) == 2924860384375657bv64); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -174,349 +106,57 @@ procedure {:extern} guarantee_reflexive(); procedure #free(); modifies Gamma_R16, Gamma_R17, R16, R17; - free requires (memory_load8_le(mem, 2224bv64) == 1bv8); - free requires (memory_load8_le(mem, 2225bv64) == 0bv8); - free requires (memory_load8_le(mem, 2226bv64) == 2bv8); - free requires (memory_load8_le(mem, 2227bv64) == 0bv8); - free requires (memory_load8_le(mem, 2228bv64) == 0bv8); - free requires (memory_load8_le(mem, 2229bv64) == 0bv8); - free requires (memory_load8_le(mem, 2230bv64) == 0bv8); - free requires (memory_load8_le(mem, 2231bv64) == 0bv8); - free requires (memory_load8_le(mem, 2232bv64) == 84bv8); - free requires (memory_load8_le(mem, 2233bv64) == 104bv8); - free requires (memory_load8_le(mem, 2234bv64) == 101bv8); - free requires (memory_load8_le(mem, 2235bv64) == 32bv8); - free requires (memory_load8_le(mem, 2236bv64) == 99bv8); - free requires (memory_load8_le(mem, 2237bv64) == 104bv8); - free requires (memory_load8_le(mem, 2238bv64) == 97bv8); - free requires (memory_load8_le(mem, 2239bv64) == 114bv8); - free requires (memory_load8_le(mem, 2240bv64) == 32bv8); - free requires (memory_load8_le(mem, 2241bv64) == 105bv8); - free requires (memory_load8_le(mem, 2242bv64) == 115bv8); - free requires (memory_load8_le(mem, 2243bv64) == 58bv8); - free requires (memory_load8_le(mem, 2244bv64) == 32bv8); - free requires (memory_load8_le(mem, 2245bv64) == 37bv8); - free requires (memory_load8_le(mem, 2246bv64) == 99bv8); - free requires (memory_load8_le(mem, 2247bv64) == 10bv8); - free requires (memory_load8_le(mem, 2248bv64) == 0bv8); - free requires (memory_load8_le(mem, 2249bv64) == 0bv8); - free requires (memory_load8_le(mem, 2250bv64) == 0bv8); - free requires (memory_load8_le(mem, 2251bv64) == 0bv8); - free requires (memory_load8_le(mem, 2252bv64) == 0bv8); - free requires (memory_load8_le(mem, 2253bv64) == 0bv8); - free requires (memory_load8_le(mem, 2254bv64) == 0bv8); - free requires (memory_load8_le(mem, 2255bv64) == 0bv8); - free requires (memory_load8_le(mem, 2256bv64) == 84bv8); - free requires (memory_load8_le(mem, 2257bv64) == 104bv8); - free requires (memory_load8_le(mem, 2258bv64) == 101bv8); - free requires (memory_load8_le(mem, 2259bv64) == 32bv8); - free requires (memory_load8_le(mem, 2260bv64) == 105bv8); - free requires (memory_load8_le(mem, 2261bv64) == 110bv8); - free requires (memory_load8_le(mem, 2262bv64) == 116bv8); - free requires (memory_load8_le(mem, 2263bv64) == 32bv8); - free requires (memory_load8_le(mem, 2264bv64) == 105bv8); - free requires (memory_load8_le(mem, 2265bv64) == 115bv8); - free requires (memory_load8_le(mem, 2266bv64) == 58bv8); - free requires (memory_load8_le(mem, 2267bv64) == 32bv8); - free requires (memory_load8_le(mem, 2268bv64) == 37bv8); - free requires (memory_load8_le(mem, 2269bv64) == 100bv8); - free requires (memory_load8_le(mem, 2270bv64) == 10bv8); - free requires (memory_load8_le(mem, 2271bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 16bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 192bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 8bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2224bv64) == 1bv8); - free ensures (memory_load8_le(mem, 2225bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2226bv64) == 2bv8); - free ensures (memory_load8_le(mem, 2227bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2228bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2229bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2230bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2231bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2232bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2233bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2234bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2235bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2236bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2237bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2238bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2239bv64) == 114bv8); - free ensures (memory_load8_le(mem, 2240bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2241bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2242bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2243bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2244bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2245bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2246bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2247bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2248bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2249bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2250bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2251bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2252bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2253bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2254bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2255bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2256bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2257bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2258bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2259bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2260bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2261bv64) == 110bv8); - free ensures (memory_load8_le(mem, 2262bv64) == 116bv8); - free ensures (memory_load8_le(mem, 2263bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2264bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2265bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2266bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2267bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2268bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2269bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2270bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2271bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 2224bv64) == 131073bv64); + free requires (memory_load64_le(mem, 2232bv64) == 8241983568019286100bv64); + free requires (memory_load64_le(mem, 2240bv64) == 748482783423457568bv64); + free requires (memory_load64_le(mem, 2248bv64) == 0bv64); + free requires (memory_load64_le(mem, 2256bv64) == 2338615504306268244bv64); + free requires (memory_load64_le(mem, 2264bv64) == 2924860384375657bv64); + free requires (memory_load64_le(mem, 68992bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 2224bv64) == 131073bv64); + free ensures (memory_load64_le(mem, 2232bv64) == 8241983568019286100bv64); + free ensures (memory_load64_le(mem, 2240bv64) == 748482783423457568bv64); + free ensures (memory_load64_le(mem, 2248bv64) == 0bv64); + free ensures (memory_load64_le(mem, 2256bv64) == 2338615504306268244bv64); + free ensures (memory_load64_le(mem, 2264bv64) == 2924860384375657bv64); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R16, Gamma_R17, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R16, R17, R29, R30, R31, mem, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free requires (memory_load8_le(mem, 2224bv64) == 1bv8); - free requires (memory_load8_le(mem, 2225bv64) == 0bv8); - free requires (memory_load8_le(mem, 2226bv64) == 2bv8); - free requires (memory_load8_le(mem, 2227bv64) == 0bv8); - free requires (memory_load8_le(mem, 2228bv64) == 0bv8); - free requires (memory_load8_le(mem, 2229bv64) == 0bv8); - free requires (memory_load8_le(mem, 2230bv64) == 0bv8); - free requires (memory_load8_le(mem, 2231bv64) == 0bv8); - free requires (memory_load8_le(mem, 2232bv64) == 84bv8); - free requires (memory_load8_le(mem, 2233bv64) == 104bv8); - free requires (memory_load8_le(mem, 2234bv64) == 101bv8); - free requires (memory_load8_le(mem, 2235bv64) == 32bv8); - free requires (memory_load8_le(mem, 2236bv64) == 99bv8); - free requires (memory_load8_le(mem, 2237bv64) == 104bv8); - free requires (memory_load8_le(mem, 2238bv64) == 97bv8); - free requires (memory_load8_le(mem, 2239bv64) == 114bv8); - free requires (memory_load8_le(mem, 2240bv64) == 32bv8); - free requires (memory_load8_le(mem, 2241bv64) == 105bv8); - free requires (memory_load8_le(mem, 2242bv64) == 115bv8); - free requires (memory_load8_le(mem, 2243bv64) == 58bv8); - free requires (memory_load8_le(mem, 2244bv64) == 32bv8); - free requires (memory_load8_le(mem, 2245bv64) == 37bv8); - free requires (memory_load8_le(mem, 2246bv64) == 99bv8); - free requires (memory_load8_le(mem, 2247bv64) == 10bv8); - free requires (memory_load8_le(mem, 2248bv64) == 0bv8); - free requires (memory_load8_le(mem, 2249bv64) == 0bv8); - free requires (memory_load8_le(mem, 2250bv64) == 0bv8); - free requires (memory_load8_le(mem, 2251bv64) == 0bv8); - free requires (memory_load8_le(mem, 2252bv64) == 0bv8); - free requires (memory_load8_le(mem, 2253bv64) == 0bv8); - free requires (memory_load8_le(mem, 2254bv64) == 0bv8); - free requires (memory_load8_le(mem, 2255bv64) == 0bv8); - free requires (memory_load8_le(mem, 2256bv64) == 84bv8); - free requires (memory_load8_le(mem, 2257bv64) == 104bv8); - free requires (memory_load8_le(mem, 2258bv64) == 101bv8); - free requires (memory_load8_le(mem, 2259bv64) == 32bv8); - free requires (memory_load8_le(mem, 2260bv64) == 105bv8); - free requires (memory_load8_le(mem, 2261bv64) == 110bv8); - free requires (memory_load8_le(mem, 2262bv64) == 116bv8); - free requires (memory_load8_le(mem, 2263bv64) == 32bv8); - free requires (memory_load8_le(mem, 2264bv64) == 105bv8); - free requires (memory_load8_le(mem, 2265bv64) == 115bv8); - free requires (memory_load8_le(mem, 2266bv64) == 58bv8); - free requires (memory_load8_le(mem, 2267bv64) == 32bv8); - free requires (memory_load8_le(mem, 2268bv64) == 37bv8); - free requires (memory_load8_le(mem, 2269bv64) == 100bv8); - free requires (memory_load8_le(mem, 2270bv64) == 10bv8); - free requires (memory_load8_le(mem, 2271bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 16bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 192bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 8bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free requires (memory_load64_le(mem, 2224bv64) == 131073bv64); + free requires (memory_load64_le(mem, 2232bv64) == 8241983568019286100bv64); + free requires (memory_load64_le(mem, 2240bv64) == 748482783423457568bv64); + free requires (memory_load64_le(mem, 2248bv64) == 0bv64); + free requires (memory_load64_le(mem, 2256bv64) == 2338615504306268244bv64); + free requires (memory_load64_le(mem, 2264bv64) == 2924860384375657bv64); + free requires (memory_load64_le(mem, 68992bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); free ensures (R31 == old(R31)); - free ensures (memory_load8_le(mem, 2224bv64) == 1bv8); - free ensures (memory_load8_le(mem, 2225bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2226bv64) == 2bv8); - free ensures (memory_load8_le(mem, 2227bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2228bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2229bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2230bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2231bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2232bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2233bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2234bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2235bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2236bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2237bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2238bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2239bv64) == 114bv8); - free ensures (memory_load8_le(mem, 2240bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2241bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2242bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2243bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2244bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2245bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2246bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2247bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2248bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2249bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2250bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2251bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2252bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2253bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2254bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2255bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2256bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2257bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2258bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2259bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2260bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2261bv64) == 110bv8); - free ensures (memory_load8_le(mem, 2262bv64) == 116bv8); - free ensures (memory_load8_le(mem, 2263bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2264bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2265bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2266bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2267bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2268bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2269bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2270bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2271bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 2224bv64) == 131073bv64); + free ensures (memory_load64_le(mem, 2232bv64) == 8241983568019286100bv64); + free ensures (memory_load64_le(mem, 2240bv64) == 748482783423457568bv64); + free ensures (memory_load64_le(mem, 2248bv64) == 0bv64); + free ensures (memory_load64_le(mem, 2256bv64) == 2338615504306268244bv64); + free ensures (memory_load64_le(mem, 2264bv64) == 2924860384375657bv64); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv64; var Gamma_#4: bool; @@ -600,326 +240,47 @@ procedure main() procedure malloc(); modifies Gamma_R16, Gamma_R17, R16, R17; - free requires (memory_load8_le(mem, 2224bv64) == 1bv8); - free requires (memory_load8_le(mem, 2225bv64) == 0bv8); - free requires (memory_load8_le(mem, 2226bv64) == 2bv8); - free requires (memory_load8_le(mem, 2227bv64) == 0bv8); - free requires (memory_load8_le(mem, 2228bv64) == 0bv8); - free requires (memory_load8_le(mem, 2229bv64) == 0bv8); - free requires (memory_load8_le(mem, 2230bv64) == 0bv8); - free requires (memory_load8_le(mem, 2231bv64) == 0bv8); - free requires (memory_load8_le(mem, 2232bv64) == 84bv8); - free requires (memory_load8_le(mem, 2233bv64) == 104bv8); - free requires (memory_load8_le(mem, 2234bv64) == 101bv8); - free requires (memory_load8_le(mem, 2235bv64) == 32bv8); - free requires (memory_load8_le(mem, 2236bv64) == 99bv8); - free requires (memory_load8_le(mem, 2237bv64) == 104bv8); - free requires (memory_load8_le(mem, 2238bv64) == 97bv8); - free requires (memory_load8_le(mem, 2239bv64) == 114bv8); - free requires (memory_load8_le(mem, 2240bv64) == 32bv8); - free requires (memory_load8_le(mem, 2241bv64) == 105bv8); - free requires (memory_load8_le(mem, 2242bv64) == 115bv8); - free requires (memory_load8_le(mem, 2243bv64) == 58bv8); - free requires (memory_load8_le(mem, 2244bv64) == 32bv8); - free requires (memory_load8_le(mem, 2245bv64) == 37bv8); - free requires (memory_load8_le(mem, 2246bv64) == 99bv8); - free requires (memory_load8_le(mem, 2247bv64) == 10bv8); - free requires (memory_load8_le(mem, 2248bv64) == 0bv8); - free requires (memory_load8_le(mem, 2249bv64) == 0bv8); - free requires (memory_load8_le(mem, 2250bv64) == 0bv8); - free requires (memory_load8_le(mem, 2251bv64) == 0bv8); - free requires (memory_load8_le(mem, 2252bv64) == 0bv8); - free requires (memory_load8_le(mem, 2253bv64) == 0bv8); - free requires (memory_load8_le(mem, 2254bv64) == 0bv8); - free requires (memory_load8_le(mem, 2255bv64) == 0bv8); - free requires (memory_load8_le(mem, 2256bv64) == 84bv8); - free requires (memory_load8_le(mem, 2257bv64) == 104bv8); - free requires (memory_load8_le(mem, 2258bv64) == 101bv8); - free requires (memory_load8_le(mem, 2259bv64) == 32bv8); - free requires (memory_load8_le(mem, 2260bv64) == 105bv8); - free requires (memory_load8_le(mem, 2261bv64) == 110bv8); - free requires (memory_load8_le(mem, 2262bv64) == 116bv8); - free requires (memory_load8_le(mem, 2263bv64) == 32bv8); - free requires (memory_load8_le(mem, 2264bv64) == 105bv8); - free requires (memory_load8_le(mem, 2265bv64) == 115bv8); - free requires (memory_load8_le(mem, 2266bv64) == 58bv8); - free requires (memory_load8_le(mem, 2267bv64) == 32bv8); - free requires (memory_load8_le(mem, 2268bv64) == 37bv8); - free requires (memory_load8_le(mem, 2269bv64) == 100bv8); - free requires (memory_load8_le(mem, 2270bv64) == 10bv8); - free requires (memory_load8_le(mem, 2271bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 16bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 192bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 8bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2224bv64) == 1bv8); - free ensures (memory_load8_le(mem, 2225bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2226bv64) == 2bv8); - free ensures (memory_load8_le(mem, 2227bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2228bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2229bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2230bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2231bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2232bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2233bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2234bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2235bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2236bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2237bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2238bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2239bv64) == 114bv8); - free ensures (memory_load8_le(mem, 2240bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2241bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2242bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2243bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2244bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2245bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2246bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2247bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2248bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2249bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2250bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2251bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2252bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2253bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2254bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2255bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2256bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2257bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2258bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2259bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2260bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2261bv64) == 110bv8); - free ensures (memory_load8_le(mem, 2262bv64) == 116bv8); - free ensures (memory_load8_le(mem, 2263bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2264bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2265bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2266bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2267bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2268bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2269bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2270bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2271bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 2224bv64) == 131073bv64); + free requires (memory_load64_le(mem, 2232bv64) == 8241983568019286100bv64); + free requires (memory_load64_le(mem, 2240bv64) == 748482783423457568bv64); + free requires (memory_load64_le(mem, 2248bv64) == 0bv64); + free requires (memory_load64_le(mem, 2256bv64) == 2338615504306268244bv64); + free requires (memory_load64_le(mem, 2264bv64) == 2924860384375657bv64); + free requires (memory_load64_le(mem, 68992bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 2224bv64) == 131073bv64); + free ensures (memory_load64_le(mem, 2232bv64) == 8241983568019286100bv64); + free ensures (memory_load64_le(mem, 2240bv64) == 748482783423457568bv64); + free ensures (memory_load64_le(mem, 2248bv64) == 0bv64); + free ensures (memory_load64_le(mem, 2256bv64) == 2338615504306268244bv64); + free ensures (memory_load64_le(mem, 2264bv64) == 2924860384375657bv64); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); procedure printf(); modifies Gamma_R16, Gamma_R17, R16, R17; - free requires (memory_load8_le(mem, 2224bv64) == 1bv8); - free requires (memory_load8_le(mem, 2225bv64) == 0bv8); - free requires (memory_load8_le(mem, 2226bv64) == 2bv8); - free requires (memory_load8_le(mem, 2227bv64) == 0bv8); - free requires (memory_load8_le(mem, 2228bv64) == 0bv8); - free requires (memory_load8_le(mem, 2229bv64) == 0bv8); - free requires (memory_load8_le(mem, 2230bv64) == 0bv8); - free requires (memory_load8_le(mem, 2231bv64) == 0bv8); - free requires (memory_load8_le(mem, 2232bv64) == 84bv8); - free requires (memory_load8_le(mem, 2233bv64) == 104bv8); - free requires (memory_load8_le(mem, 2234bv64) == 101bv8); - free requires (memory_load8_le(mem, 2235bv64) == 32bv8); - free requires (memory_load8_le(mem, 2236bv64) == 99bv8); - free requires (memory_load8_le(mem, 2237bv64) == 104bv8); - free requires (memory_load8_le(mem, 2238bv64) == 97bv8); - free requires (memory_load8_le(mem, 2239bv64) == 114bv8); - free requires (memory_load8_le(mem, 2240bv64) == 32bv8); - free requires (memory_load8_le(mem, 2241bv64) == 105bv8); - free requires (memory_load8_le(mem, 2242bv64) == 115bv8); - free requires (memory_load8_le(mem, 2243bv64) == 58bv8); - free requires (memory_load8_le(mem, 2244bv64) == 32bv8); - free requires (memory_load8_le(mem, 2245bv64) == 37bv8); - free requires (memory_load8_le(mem, 2246bv64) == 99bv8); - free requires (memory_load8_le(mem, 2247bv64) == 10bv8); - free requires (memory_load8_le(mem, 2248bv64) == 0bv8); - free requires (memory_load8_le(mem, 2249bv64) == 0bv8); - free requires (memory_load8_le(mem, 2250bv64) == 0bv8); - free requires (memory_load8_le(mem, 2251bv64) == 0bv8); - free requires (memory_load8_le(mem, 2252bv64) == 0bv8); - free requires (memory_load8_le(mem, 2253bv64) == 0bv8); - free requires (memory_load8_le(mem, 2254bv64) == 0bv8); - free requires (memory_load8_le(mem, 2255bv64) == 0bv8); - free requires (memory_load8_le(mem, 2256bv64) == 84bv8); - free requires (memory_load8_le(mem, 2257bv64) == 104bv8); - free requires (memory_load8_le(mem, 2258bv64) == 101bv8); - free requires (memory_load8_le(mem, 2259bv64) == 32bv8); - free requires (memory_load8_le(mem, 2260bv64) == 105bv8); - free requires (memory_load8_le(mem, 2261bv64) == 110bv8); - free requires (memory_load8_le(mem, 2262bv64) == 116bv8); - free requires (memory_load8_le(mem, 2263bv64) == 32bv8); - free requires (memory_load8_le(mem, 2264bv64) == 105bv8); - free requires (memory_load8_le(mem, 2265bv64) == 115bv8); - free requires (memory_load8_le(mem, 2266bv64) == 58bv8); - free requires (memory_load8_le(mem, 2267bv64) == 32bv8); - free requires (memory_load8_le(mem, 2268bv64) == 37bv8); - free requires (memory_load8_le(mem, 2269bv64) == 100bv8); - free requires (memory_load8_le(mem, 2270bv64) == 10bv8); - free requires (memory_load8_le(mem, 2271bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 16bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 192bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 8bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2224bv64) == 1bv8); - free ensures (memory_load8_le(mem, 2225bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2226bv64) == 2bv8); - free ensures (memory_load8_le(mem, 2227bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2228bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2229bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2230bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2231bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2232bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2233bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2234bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2235bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2236bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2237bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2238bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2239bv64) == 114bv8); - free ensures (memory_load8_le(mem, 2240bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2241bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2242bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2243bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2244bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2245bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2246bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2247bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2248bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2249bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2250bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2251bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2252bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2253bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2254bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2255bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2256bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2257bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2258bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2259bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2260bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2261bv64) == 110bv8); - free ensures (memory_load8_le(mem, 2262bv64) == 116bv8); - free ensures (memory_load8_le(mem, 2263bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2264bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2265bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2266bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2267bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2268bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2269bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2270bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2271bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 2224bv64) == 131073bv64); + free requires (memory_load64_le(mem, 2232bv64) == 8241983568019286100bv64); + free requires (memory_load64_le(mem, 2240bv64) == 748482783423457568bv64); + free requires (memory_load64_le(mem, 2248bv64) == 0bv64); + free requires (memory_load64_le(mem, 2256bv64) == 2338615504306268244bv64); + free requires (memory_load64_le(mem, 2264bv64) == 2924860384375657bv64); + free requires (memory_load64_le(mem, 68992bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 2224bv64) == 131073bv64); + free ensures (memory_load64_le(mem, 2232bv64) == 8241983568019286100bv64); + free ensures (memory_load64_le(mem, 2240bv64) == 748482783423457568bv64); + free ensures (memory_load64_le(mem, 2248bv64) == 0bv64); + free ensures (memory_load64_le(mem, 2256bv64) == 2338615504306268244bv64); + free ensures (memory_load64_le(mem, 2264bv64) == 2924860384375657bv64); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + diff --git a/src/test/correct/multi_malloc/gcc_O2/multi_malloc.expected b/src/test/correct/multi_malloc/gcc_O2/multi_malloc.expected index 4fa5bf17f..a3a5a2334 100644 --- a/src/test/correct/multi_malloc/gcc_O2/multi_malloc.expected +++ b/src/test/correct/multi_malloc/gcc_O2/multi_malloc.expected @@ -33,10 +33,6 @@ function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv6 (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) } -function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { - memory[index] -} - function {:extern} memory_store64_le(memory: [bv64]bv8, index: bv64, value: bv64) returns ([bv64]bv8) { memory[index := value[8:0]][bvadd64(index, 1bv64) := value[16:8]][bvadd64(index, 2bv64) := value[24:16]][bvadd64(index, 3bv64) := value[32:24]][bvadd64(index, 4bv64) := value[40:32]][bvadd64(index, 5bv64) := value[48:40]][bvadd64(index, 6bv64) := value[56:48]][bvadd64(index, 7bv64) := value[64:56]] } @@ -45,91 +41,23 @@ procedure {:extern} rely(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); - free ensures (memory_load8_le(mem, 2024bv64) == 1bv8); - free ensures (memory_load8_le(mem, 2025bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2026bv64) == 2bv8); - free ensures (memory_load8_le(mem, 2027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2032bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2033bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2034bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2035bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2036bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2037bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2038bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2039bv64) == 114bv8); - free ensures (memory_load8_le(mem, 2040bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2041bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2042bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2043bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2044bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2045bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2046bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2047bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2048bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2049bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2050bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2051bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2052bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2053bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2054bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2055bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2056bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2057bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2058bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2059bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2060bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2061bv64) == 110bv8); - free ensures (memory_load8_le(mem, 2062bv64) == 116bv8); - free ensures (memory_load8_le(mem, 2063bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2064bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2065bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2066bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2067bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2068bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2069bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2070bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 208bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 2024bv64) == 131073bv64); + free ensures (memory_load64_le(mem, 2032bv64) == 8241983568019286100bv64); + free ensures (memory_load64_le(mem, 2040bv64) == 748482783423457568bv64); + free ensures (memory_load64_le(mem, 2048bv64) == 0bv64); + free ensures (memory_load64_le(mem, 2056bv64) == 2338615504306268244bv64); + free ensures (memory_load64_le(mem, 2064bv64) == 2924860384375657bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 2000bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1920bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1664bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -142,349 +70,57 @@ procedure {:extern} guarantee_reflexive(); procedure __printf_chk(); modifies Gamma_R16, Gamma_R17, R16, R17; - free requires (memory_load8_le(mem, 2024bv64) == 1bv8); - free requires (memory_load8_le(mem, 2025bv64) == 0bv8); - free requires (memory_load8_le(mem, 2026bv64) == 2bv8); - free requires (memory_load8_le(mem, 2027bv64) == 0bv8); - free requires (memory_load8_le(mem, 2028bv64) == 0bv8); - free requires (memory_load8_le(mem, 2029bv64) == 0bv8); - free requires (memory_load8_le(mem, 2030bv64) == 0bv8); - free requires (memory_load8_le(mem, 2031bv64) == 0bv8); - free requires (memory_load8_le(mem, 2032bv64) == 84bv8); - free requires (memory_load8_le(mem, 2033bv64) == 104bv8); - free requires (memory_load8_le(mem, 2034bv64) == 101bv8); - free requires (memory_load8_le(mem, 2035bv64) == 32bv8); - free requires (memory_load8_le(mem, 2036bv64) == 99bv8); - free requires (memory_load8_le(mem, 2037bv64) == 104bv8); - free requires (memory_load8_le(mem, 2038bv64) == 97bv8); - free requires (memory_load8_le(mem, 2039bv64) == 114bv8); - free requires (memory_load8_le(mem, 2040bv64) == 32bv8); - free requires (memory_load8_le(mem, 2041bv64) == 105bv8); - free requires (memory_load8_le(mem, 2042bv64) == 115bv8); - free requires (memory_load8_le(mem, 2043bv64) == 58bv8); - free requires (memory_load8_le(mem, 2044bv64) == 32bv8); - free requires (memory_load8_le(mem, 2045bv64) == 37bv8); - free requires (memory_load8_le(mem, 2046bv64) == 99bv8); - free requires (memory_load8_le(mem, 2047bv64) == 10bv8); - free requires (memory_load8_le(mem, 2048bv64) == 0bv8); - free requires (memory_load8_le(mem, 2049bv64) == 0bv8); - free requires (memory_load8_le(mem, 2050bv64) == 0bv8); - free requires (memory_load8_le(mem, 2051bv64) == 0bv8); - free requires (memory_load8_le(mem, 2052bv64) == 0bv8); - free requires (memory_load8_le(mem, 2053bv64) == 0bv8); - free requires (memory_load8_le(mem, 2054bv64) == 0bv8); - free requires (memory_load8_le(mem, 2055bv64) == 0bv8); - free requires (memory_load8_le(mem, 2056bv64) == 84bv8); - free requires (memory_load8_le(mem, 2057bv64) == 104bv8); - free requires (memory_load8_le(mem, 2058bv64) == 101bv8); - free requires (memory_load8_le(mem, 2059bv64) == 32bv8); - free requires (memory_load8_le(mem, 2060bv64) == 105bv8); - free requires (memory_load8_le(mem, 2061bv64) == 110bv8); - free requires (memory_load8_le(mem, 2062bv64) == 116bv8); - free requires (memory_load8_le(mem, 2063bv64) == 32bv8); - free requires (memory_load8_le(mem, 2064bv64) == 105bv8); - free requires (memory_load8_le(mem, 2065bv64) == 115bv8); - free requires (memory_load8_le(mem, 2066bv64) == 58bv8); - free requires (memory_load8_le(mem, 2067bv64) == 32bv8); - free requires (memory_load8_le(mem, 2068bv64) == 37bv8); - free requires (memory_load8_le(mem, 2069bv64) == 100bv8); - free requires (memory_load8_le(mem, 2070bv64) == 10bv8); - free requires (memory_load8_le(mem, 2071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 208bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 128bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 128bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2024bv64) == 1bv8); - free ensures (memory_load8_le(mem, 2025bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2026bv64) == 2bv8); - free ensures (memory_load8_le(mem, 2027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2032bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2033bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2034bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2035bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2036bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2037bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2038bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2039bv64) == 114bv8); - free ensures (memory_load8_le(mem, 2040bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2041bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2042bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2043bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2044bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2045bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2046bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2047bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2048bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2049bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2050bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2051bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2052bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2053bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2054bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2055bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2056bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2057bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2058bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2059bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2060bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2061bv64) == 110bv8); - free ensures (memory_load8_le(mem, 2062bv64) == 116bv8); - free ensures (memory_load8_le(mem, 2063bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2064bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2065bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2066bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2067bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2068bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2069bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2070bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 208bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 2024bv64) == 131073bv64); + free requires (memory_load64_le(mem, 2032bv64) == 8241983568019286100bv64); + free requires (memory_load64_le(mem, 2040bv64) == 748482783423457568bv64); + free requires (memory_load64_le(mem, 2048bv64) == 0bv64); + free requires (memory_load64_le(mem, 2056bv64) == 2338615504306268244bv64); + free requires (memory_load64_le(mem, 2064bv64) == 2924860384375657bv64); + free requires (memory_load64_le(mem, 69008bv64) == 2000bv64); + free requires (memory_load64_le(mem, 69016bv64) == 1920bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1664bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 2024bv64) == 131073bv64); + free ensures (memory_load64_le(mem, 2032bv64) == 8241983568019286100bv64); + free ensures (memory_load64_le(mem, 2040bv64) == 748482783423457568bv64); + free ensures (memory_load64_le(mem, 2048bv64) == 0bv64); + free ensures (memory_load64_le(mem, 2056bv64) == 2338615504306268244bv64); + free ensures (memory_load64_le(mem, 2064bv64) == 2924860384375657bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 2000bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1920bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1664bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R16, Gamma_R17, Gamma_R2, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_stack, R0, R1, R16, R17, R2, R29, R30, R31, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free requires (memory_load8_le(mem, 2024bv64) == 1bv8); - free requires (memory_load8_le(mem, 2025bv64) == 0bv8); - free requires (memory_load8_le(mem, 2026bv64) == 2bv8); - free requires (memory_load8_le(mem, 2027bv64) == 0bv8); - free requires (memory_load8_le(mem, 2028bv64) == 0bv8); - free requires (memory_load8_le(mem, 2029bv64) == 0bv8); - free requires (memory_load8_le(mem, 2030bv64) == 0bv8); - free requires (memory_load8_le(mem, 2031bv64) == 0bv8); - free requires (memory_load8_le(mem, 2032bv64) == 84bv8); - free requires (memory_load8_le(mem, 2033bv64) == 104bv8); - free requires (memory_load8_le(mem, 2034bv64) == 101bv8); - free requires (memory_load8_le(mem, 2035bv64) == 32bv8); - free requires (memory_load8_le(mem, 2036bv64) == 99bv8); - free requires (memory_load8_le(mem, 2037bv64) == 104bv8); - free requires (memory_load8_le(mem, 2038bv64) == 97bv8); - free requires (memory_load8_le(mem, 2039bv64) == 114bv8); - free requires (memory_load8_le(mem, 2040bv64) == 32bv8); - free requires (memory_load8_le(mem, 2041bv64) == 105bv8); - free requires (memory_load8_le(mem, 2042bv64) == 115bv8); - free requires (memory_load8_le(mem, 2043bv64) == 58bv8); - free requires (memory_load8_le(mem, 2044bv64) == 32bv8); - free requires (memory_load8_le(mem, 2045bv64) == 37bv8); - free requires (memory_load8_le(mem, 2046bv64) == 99bv8); - free requires (memory_load8_le(mem, 2047bv64) == 10bv8); - free requires (memory_load8_le(mem, 2048bv64) == 0bv8); - free requires (memory_load8_le(mem, 2049bv64) == 0bv8); - free requires (memory_load8_le(mem, 2050bv64) == 0bv8); - free requires (memory_load8_le(mem, 2051bv64) == 0bv8); - free requires (memory_load8_le(mem, 2052bv64) == 0bv8); - free requires (memory_load8_le(mem, 2053bv64) == 0bv8); - free requires (memory_load8_le(mem, 2054bv64) == 0bv8); - free requires (memory_load8_le(mem, 2055bv64) == 0bv8); - free requires (memory_load8_le(mem, 2056bv64) == 84bv8); - free requires (memory_load8_le(mem, 2057bv64) == 104bv8); - free requires (memory_load8_le(mem, 2058bv64) == 101bv8); - free requires (memory_load8_le(mem, 2059bv64) == 32bv8); - free requires (memory_load8_le(mem, 2060bv64) == 105bv8); - free requires (memory_load8_le(mem, 2061bv64) == 110bv8); - free requires (memory_load8_le(mem, 2062bv64) == 116bv8); - free requires (memory_load8_le(mem, 2063bv64) == 32bv8); - free requires (memory_load8_le(mem, 2064bv64) == 105bv8); - free requires (memory_load8_le(mem, 2065bv64) == 115bv8); - free requires (memory_load8_le(mem, 2066bv64) == 58bv8); - free requires (memory_load8_le(mem, 2067bv64) == 32bv8); - free requires (memory_load8_le(mem, 2068bv64) == 37bv8); - free requires (memory_load8_le(mem, 2069bv64) == 100bv8); - free requires (memory_load8_le(mem, 2070bv64) == 10bv8); - free requires (memory_load8_le(mem, 2071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 208bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 128bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 128bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free requires (memory_load64_le(mem, 2024bv64) == 131073bv64); + free requires (memory_load64_le(mem, 2032bv64) == 8241983568019286100bv64); + free requires (memory_load64_le(mem, 2040bv64) == 748482783423457568bv64); + free requires (memory_load64_le(mem, 2048bv64) == 0bv64); + free requires (memory_load64_le(mem, 2056bv64) == 2338615504306268244bv64); + free requires (memory_load64_le(mem, 2064bv64) == 2924860384375657bv64); + free requires (memory_load64_le(mem, 69008bv64) == 2000bv64); + free requires (memory_load64_le(mem, 69016bv64) == 1920bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1664bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); free ensures (R31 == old(R31)); - free ensures (memory_load8_le(mem, 2024bv64) == 1bv8); - free ensures (memory_load8_le(mem, 2025bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2026bv64) == 2bv8); - free ensures (memory_load8_le(mem, 2027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2032bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2033bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2034bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2035bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2036bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2037bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2038bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2039bv64) == 114bv8); - free ensures (memory_load8_le(mem, 2040bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2041bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2042bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2043bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2044bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2045bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2046bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2047bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2048bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2049bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2050bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2051bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2052bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2053bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2054bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2055bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2056bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2057bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2058bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2059bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2060bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2061bv64) == 110bv8); - free ensures (memory_load8_le(mem, 2062bv64) == 116bv8); - free ensures (memory_load8_le(mem, 2063bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2064bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2065bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2066bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2067bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2068bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2069bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2070bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 208bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 128bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 2024bv64) == 131073bv64); + free ensures (memory_load64_le(mem, 2032bv64) == 8241983568019286100bv64); + free ensures (memory_load64_le(mem, 2040bv64) == 748482783423457568bv64); + free ensures (memory_load64_le(mem, 2048bv64) == 0bv64); + free ensures (memory_load64_le(mem, 2056bv64) == 2338615504306268244bv64); + free ensures (memory_load64_le(mem, 2064bv64) == 2924860384375657bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 2000bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1920bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1664bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #1: bv64; var Gamma_#1: bool; @@ -521,3 +157,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/correct/multi_malloc/gcc_no_plt_no_pic/multi_malloc.expected b/src/test/correct/multi_malloc/gcc_no_plt_no_pic/multi_malloc.expected index 417806157..a81608960 100644 --- a/src/test/correct/multi_malloc/gcc_no_plt_no_pic/multi_malloc.expected +++ b/src/test/correct/multi_malloc/gcc_no_plt_no_pic/multi_malloc.expected @@ -77,91 +77,23 @@ procedure {:extern} rely(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); - free ensures (memory_load8_le(mem, 2224bv64) == 1bv8); - free ensures (memory_load8_le(mem, 2225bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2226bv64) == 2bv8); - free ensures (memory_load8_le(mem, 2227bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2228bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2229bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2230bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2231bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2232bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2233bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2234bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2235bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2236bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2237bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2238bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2239bv64) == 114bv8); - free ensures (memory_load8_le(mem, 2240bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2241bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2242bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2243bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2244bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2245bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2246bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2247bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2248bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2249bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2250bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2251bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2252bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2253bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2254bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2255bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2256bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2257bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2258bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2259bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2260bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2261bv64) == 110bv8); - free ensures (memory_load8_le(mem, 2262bv64) == 116bv8); - free ensures (memory_load8_le(mem, 2263bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2264bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2265bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2266bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2267bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2268bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2269bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2270bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2271bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 2224bv64) == 131073bv64); + free ensures (memory_load64_le(mem, 2232bv64) == 8241983568019286100bv64); + free ensures (memory_load64_le(mem, 2240bv64) == 748482783423457568bv64); + free ensures (memory_load64_le(mem, 2248bv64) == 0bv64); + free ensures (memory_load64_le(mem, 2256bv64) == 2338615504306268244bv64); + free ensures (memory_load64_le(mem, 2264bv64) == 2924860384375657bv64); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -174,349 +106,57 @@ procedure {:extern} guarantee_reflexive(); procedure #free(); modifies Gamma_R16, Gamma_R17, R16, R17; - free requires (memory_load8_le(mem, 2224bv64) == 1bv8); - free requires (memory_load8_le(mem, 2225bv64) == 0bv8); - free requires (memory_load8_le(mem, 2226bv64) == 2bv8); - free requires (memory_load8_le(mem, 2227bv64) == 0bv8); - free requires (memory_load8_le(mem, 2228bv64) == 0bv8); - free requires (memory_load8_le(mem, 2229bv64) == 0bv8); - free requires (memory_load8_le(mem, 2230bv64) == 0bv8); - free requires (memory_load8_le(mem, 2231bv64) == 0bv8); - free requires (memory_load8_le(mem, 2232bv64) == 84bv8); - free requires (memory_load8_le(mem, 2233bv64) == 104bv8); - free requires (memory_load8_le(mem, 2234bv64) == 101bv8); - free requires (memory_load8_le(mem, 2235bv64) == 32bv8); - free requires (memory_load8_le(mem, 2236bv64) == 99bv8); - free requires (memory_load8_le(mem, 2237bv64) == 104bv8); - free requires (memory_load8_le(mem, 2238bv64) == 97bv8); - free requires (memory_load8_le(mem, 2239bv64) == 114bv8); - free requires (memory_load8_le(mem, 2240bv64) == 32bv8); - free requires (memory_load8_le(mem, 2241bv64) == 105bv8); - free requires (memory_load8_le(mem, 2242bv64) == 115bv8); - free requires (memory_load8_le(mem, 2243bv64) == 58bv8); - free requires (memory_load8_le(mem, 2244bv64) == 32bv8); - free requires (memory_load8_le(mem, 2245bv64) == 37bv8); - free requires (memory_load8_le(mem, 2246bv64) == 99bv8); - free requires (memory_load8_le(mem, 2247bv64) == 10bv8); - free requires (memory_load8_le(mem, 2248bv64) == 0bv8); - free requires (memory_load8_le(mem, 2249bv64) == 0bv8); - free requires (memory_load8_le(mem, 2250bv64) == 0bv8); - free requires (memory_load8_le(mem, 2251bv64) == 0bv8); - free requires (memory_load8_le(mem, 2252bv64) == 0bv8); - free requires (memory_load8_le(mem, 2253bv64) == 0bv8); - free requires (memory_load8_le(mem, 2254bv64) == 0bv8); - free requires (memory_load8_le(mem, 2255bv64) == 0bv8); - free requires (memory_load8_le(mem, 2256bv64) == 84bv8); - free requires (memory_load8_le(mem, 2257bv64) == 104bv8); - free requires (memory_load8_le(mem, 2258bv64) == 101bv8); - free requires (memory_load8_le(mem, 2259bv64) == 32bv8); - free requires (memory_load8_le(mem, 2260bv64) == 105bv8); - free requires (memory_load8_le(mem, 2261bv64) == 110bv8); - free requires (memory_load8_le(mem, 2262bv64) == 116bv8); - free requires (memory_load8_le(mem, 2263bv64) == 32bv8); - free requires (memory_load8_le(mem, 2264bv64) == 105bv8); - free requires (memory_load8_le(mem, 2265bv64) == 115bv8); - free requires (memory_load8_le(mem, 2266bv64) == 58bv8); - free requires (memory_load8_le(mem, 2267bv64) == 32bv8); - free requires (memory_load8_le(mem, 2268bv64) == 37bv8); - free requires (memory_load8_le(mem, 2269bv64) == 100bv8); - free requires (memory_load8_le(mem, 2270bv64) == 10bv8); - free requires (memory_load8_le(mem, 2271bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 16bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 192bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 8bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2224bv64) == 1bv8); - free ensures (memory_load8_le(mem, 2225bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2226bv64) == 2bv8); - free ensures (memory_load8_le(mem, 2227bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2228bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2229bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2230bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2231bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2232bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2233bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2234bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2235bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2236bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2237bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2238bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2239bv64) == 114bv8); - free ensures (memory_load8_le(mem, 2240bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2241bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2242bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2243bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2244bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2245bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2246bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2247bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2248bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2249bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2250bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2251bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2252bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2253bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2254bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2255bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2256bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2257bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2258bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2259bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2260bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2261bv64) == 110bv8); - free ensures (memory_load8_le(mem, 2262bv64) == 116bv8); - free ensures (memory_load8_le(mem, 2263bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2264bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2265bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2266bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2267bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2268bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2269bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2270bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2271bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 2224bv64) == 131073bv64); + free requires (memory_load64_le(mem, 2232bv64) == 8241983568019286100bv64); + free requires (memory_load64_le(mem, 2240bv64) == 748482783423457568bv64); + free requires (memory_load64_le(mem, 2248bv64) == 0bv64); + free requires (memory_load64_le(mem, 2256bv64) == 2338615504306268244bv64); + free requires (memory_load64_le(mem, 2264bv64) == 2924860384375657bv64); + free requires (memory_load64_le(mem, 68992bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 2224bv64) == 131073bv64); + free ensures (memory_load64_le(mem, 2232bv64) == 8241983568019286100bv64); + free ensures (memory_load64_le(mem, 2240bv64) == 748482783423457568bv64); + free ensures (memory_load64_le(mem, 2248bv64) == 0bv64); + free ensures (memory_load64_le(mem, 2256bv64) == 2338615504306268244bv64); + free ensures (memory_load64_le(mem, 2264bv64) == 2924860384375657bv64); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R16, Gamma_R17, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R16, R17, R29, R30, R31, mem, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free requires (memory_load8_le(mem, 2224bv64) == 1bv8); - free requires (memory_load8_le(mem, 2225bv64) == 0bv8); - free requires (memory_load8_le(mem, 2226bv64) == 2bv8); - free requires (memory_load8_le(mem, 2227bv64) == 0bv8); - free requires (memory_load8_le(mem, 2228bv64) == 0bv8); - free requires (memory_load8_le(mem, 2229bv64) == 0bv8); - free requires (memory_load8_le(mem, 2230bv64) == 0bv8); - free requires (memory_load8_le(mem, 2231bv64) == 0bv8); - free requires (memory_load8_le(mem, 2232bv64) == 84bv8); - free requires (memory_load8_le(mem, 2233bv64) == 104bv8); - free requires (memory_load8_le(mem, 2234bv64) == 101bv8); - free requires (memory_load8_le(mem, 2235bv64) == 32bv8); - free requires (memory_load8_le(mem, 2236bv64) == 99bv8); - free requires (memory_load8_le(mem, 2237bv64) == 104bv8); - free requires (memory_load8_le(mem, 2238bv64) == 97bv8); - free requires (memory_load8_le(mem, 2239bv64) == 114bv8); - free requires (memory_load8_le(mem, 2240bv64) == 32bv8); - free requires (memory_load8_le(mem, 2241bv64) == 105bv8); - free requires (memory_load8_le(mem, 2242bv64) == 115bv8); - free requires (memory_load8_le(mem, 2243bv64) == 58bv8); - free requires (memory_load8_le(mem, 2244bv64) == 32bv8); - free requires (memory_load8_le(mem, 2245bv64) == 37bv8); - free requires (memory_load8_le(mem, 2246bv64) == 99bv8); - free requires (memory_load8_le(mem, 2247bv64) == 10bv8); - free requires (memory_load8_le(mem, 2248bv64) == 0bv8); - free requires (memory_load8_le(mem, 2249bv64) == 0bv8); - free requires (memory_load8_le(mem, 2250bv64) == 0bv8); - free requires (memory_load8_le(mem, 2251bv64) == 0bv8); - free requires (memory_load8_le(mem, 2252bv64) == 0bv8); - free requires (memory_load8_le(mem, 2253bv64) == 0bv8); - free requires (memory_load8_le(mem, 2254bv64) == 0bv8); - free requires (memory_load8_le(mem, 2255bv64) == 0bv8); - free requires (memory_load8_le(mem, 2256bv64) == 84bv8); - free requires (memory_load8_le(mem, 2257bv64) == 104bv8); - free requires (memory_load8_le(mem, 2258bv64) == 101bv8); - free requires (memory_load8_le(mem, 2259bv64) == 32bv8); - free requires (memory_load8_le(mem, 2260bv64) == 105bv8); - free requires (memory_load8_le(mem, 2261bv64) == 110bv8); - free requires (memory_load8_le(mem, 2262bv64) == 116bv8); - free requires (memory_load8_le(mem, 2263bv64) == 32bv8); - free requires (memory_load8_le(mem, 2264bv64) == 105bv8); - free requires (memory_load8_le(mem, 2265bv64) == 115bv8); - free requires (memory_load8_le(mem, 2266bv64) == 58bv8); - free requires (memory_load8_le(mem, 2267bv64) == 32bv8); - free requires (memory_load8_le(mem, 2268bv64) == 37bv8); - free requires (memory_load8_le(mem, 2269bv64) == 100bv8); - free requires (memory_load8_le(mem, 2270bv64) == 10bv8); - free requires (memory_load8_le(mem, 2271bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 16bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 192bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 8bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free requires (memory_load64_le(mem, 2224bv64) == 131073bv64); + free requires (memory_load64_le(mem, 2232bv64) == 8241983568019286100bv64); + free requires (memory_load64_le(mem, 2240bv64) == 748482783423457568bv64); + free requires (memory_load64_le(mem, 2248bv64) == 0bv64); + free requires (memory_load64_le(mem, 2256bv64) == 2338615504306268244bv64); + free requires (memory_load64_le(mem, 2264bv64) == 2924860384375657bv64); + free requires (memory_load64_le(mem, 68992bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); free ensures (R31 == old(R31)); - free ensures (memory_load8_le(mem, 2224bv64) == 1bv8); - free ensures (memory_load8_le(mem, 2225bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2226bv64) == 2bv8); - free ensures (memory_load8_le(mem, 2227bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2228bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2229bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2230bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2231bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2232bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2233bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2234bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2235bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2236bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2237bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2238bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2239bv64) == 114bv8); - free ensures (memory_load8_le(mem, 2240bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2241bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2242bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2243bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2244bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2245bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2246bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2247bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2248bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2249bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2250bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2251bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2252bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2253bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2254bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2255bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2256bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2257bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2258bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2259bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2260bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2261bv64) == 110bv8); - free ensures (memory_load8_le(mem, 2262bv64) == 116bv8); - free ensures (memory_load8_le(mem, 2263bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2264bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2265bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2266bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2267bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2268bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2269bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2270bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2271bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 2224bv64) == 131073bv64); + free ensures (memory_load64_le(mem, 2232bv64) == 8241983568019286100bv64); + free ensures (memory_load64_le(mem, 2240bv64) == 748482783423457568bv64); + free ensures (memory_load64_le(mem, 2248bv64) == 0bv64); + free ensures (memory_load64_le(mem, 2256bv64) == 2338615504306268244bv64); + free ensures (memory_load64_le(mem, 2264bv64) == 2924860384375657bv64); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv64; var Gamma_#4: bool; @@ -600,326 +240,47 @@ procedure main() procedure malloc(); modifies Gamma_R16, Gamma_R17, R16, R17; - free requires (memory_load8_le(mem, 2224bv64) == 1bv8); - free requires (memory_load8_le(mem, 2225bv64) == 0bv8); - free requires (memory_load8_le(mem, 2226bv64) == 2bv8); - free requires (memory_load8_le(mem, 2227bv64) == 0bv8); - free requires (memory_load8_le(mem, 2228bv64) == 0bv8); - free requires (memory_load8_le(mem, 2229bv64) == 0bv8); - free requires (memory_load8_le(mem, 2230bv64) == 0bv8); - free requires (memory_load8_le(mem, 2231bv64) == 0bv8); - free requires (memory_load8_le(mem, 2232bv64) == 84bv8); - free requires (memory_load8_le(mem, 2233bv64) == 104bv8); - free requires (memory_load8_le(mem, 2234bv64) == 101bv8); - free requires (memory_load8_le(mem, 2235bv64) == 32bv8); - free requires (memory_load8_le(mem, 2236bv64) == 99bv8); - free requires (memory_load8_le(mem, 2237bv64) == 104bv8); - free requires (memory_load8_le(mem, 2238bv64) == 97bv8); - free requires (memory_load8_le(mem, 2239bv64) == 114bv8); - free requires (memory_load8_le(mem, 2240bv64) == 32bv8); - free requires (memory_load8_le(mem, 2241bv64) == 105bv8); - free requires (memory_load8_le(mem, 2242bv64) == 115bv8); - free requires (memory_load8_le(mem, 2243bv64) == 58bv8); - free requires (memory_load8_le(mem, 2244bv64) == 32bv8); - free requires (memory_load8_le(mem, 2245bv64) == 37bv8); - free requires (memory_load8_le(mem, 2246bv64) == 99bv8); - free requires (memory_load8_le(mem, 2247bv64) == 10bv8); - free requires (memory_load8_le(mem, 2248bv64) == 0bv8); - free requires (memory_load8_le(mem, 2249bv64) == 0bv8); - free requires (memory_load8_le(mem, 2250bv64) == 0bv8); - free requires (memory_load8_le(mem, 2251bv64) == 0bv8); - free requires (memory_load8_le(mem, 2252bv64) == 0bv8); - free requires (memory_load8_le(mem, 2253bv64) == 0bv8); - free requires (memory_load8_le(mem, 2254bv64) == 0bv8); - free requires (memory_load8_le(mem, 2255bv64) == 0bv8); - free requires (memory_load8_le(mem, 2256bv64) == 84bv8); - free requires (memory_load8_le(mem, 2257bv64) == 104bv8); - free requires (memory_load8_le(mem, 2258bv64) == 101bv8); - free requires (memory_load8_le(mem, 2259bv64) == 32bv8); - free requires (memory_load8_le(mem, 2260bv64) == 105bv8); - free requires (memory_load8_le(mem, 2261bv64) == 110bv8); - free requires (memory_load8_le(mem, 2262bv64) == 116bv8); - free requires (memory_load8_le(mem, 2263bv64) == 32bv8); - free requires (memory_load8_le(mem, 2264bv64) == 105bv8); - free requires (memory_load8_le(mem, 2265bv64) == 115bv8); - free requires (memory_load8_le(mem, 2266bv64) == 58bv8); - free requires (memory_load8_le(mem, 2267bv64) == 32bv8); - free requires (memory_load8_le(mem, 2268bv64) == 37bv8); - free requires (memory_load8_le(mem, 2269bv64) == 100bv8); - free requires (memory_load8_le(mem, 2270bv64) == 10bv8); - free requires (memory_load8_le(mem, 2271bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 16bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 192bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 8bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2224bv64) == 1bv8); - free ensures (memory_load8_le(mem, 2225bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2226bv64) == 2bv8); - free ensures (memory_load8_le(mem, 2227bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2228bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2229bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2230bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2231bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2232bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2233bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2234bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2235bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2236bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2237bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2238bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2239bv64) == 114bv8); - free ensures (memory_load8_le(mem, 2240bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2241bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2242bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2243bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2244bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2245bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2246bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2247bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2248bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2249bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2250bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2251bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2252bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2253bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2254bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2255bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2256bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2257bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2258bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2259bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2260bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2261bv64) == 110bv8); - free ensures (memory_load8_le(mem, 2262bv64) == 116bv8); - free ensures (memory_load8_le(mem, 2263bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2264bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2265bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2266bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2267bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2268bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2269bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2270bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2271bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 2224bv64) == 131073bv64); + free requires (memory_load64_le(mem, 2232bv64) == 8241983568019286100bv64); + free requires (memory_load64_le(mem, 2240bv64) == 748482783423457568bv64); + free requires (memory_load64_le(mem, 2248bv64) == 0bv64); + free requires (memory_load64_le(mem, 2256bv64) == 2338615504306268244bv64); + free requires (memory_load64_le(mem, 2264bv64) == 2924860384375657bv64); + free requires (memory_load64_le(mem, 68992bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 2224bv64) == 131073bv64); + free ensures (memory_load64_le(mem, 2232bv64) == 8241983568019286100bv64); + free ensures (memory_load64_le(mem, 2240bv64) == 748482783423457568bv64); + free ensures (memory_load64_le(mem, 2248bv64) == 0bv64); + free ensures (memory_load64_le(mem, 2256bv64) == 2338615504306268244bv64); + free ensures (memory_load64_le(mem, 2264bv64) == 2924860384375657bv64); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); procedure printf(); modifies Gamma_R16, Gamma_R17, R16, R17; - free requires (memory_load8_le(mem, 2224bv64) == 1bv8); - free requires (memory_load8_le(mem, 2225bv64) == 0bv8); - free requires (memory_load8_le(mem, 2226bv64) == 2bv8); - free requires (memory_load8_le(mem, 2227bv64) == 0bv8); - free requires (memory_load8_le(mem, 2228bv64) == 0bv8); - free requires (memory_load8_le(mem, 2229bv64) == 0bv8); - free requires (memory_load8_le(mem, 2230bv64) == 0bv8); - free requires (memory_load8_le(mem, 2231bv64) == 0bv8); - free requires (memory_load8_le(mem, 2232bv64) == 84bv8); - free requires (memory_load8_le(mem, 2233bv64) == 104bv8); - free requires (memory_load8_le(mem, 2234bv64) == 101bv8); - free requires (memory_load8_le(mem, 2235bv64) == 32bv8); - free requires (memory_load8_le(mem, 2236bv64) == 99bv8); - free requires (memory_load8_le(mem, 2237bv64) == 104bv8); - free requires (memory_load8_le(mem, 2238bv64) == 97bv8); - free requires (memory_load8_le(mem, 2239bv64) == 114bv8); - free requires (memory_load8_le(mem, 2240bv64) == 32bv8); - free requires (memory_load8_le(mem, 2241bv64) == 105bv8); - free requires (memory_load8_le(mem, 2242bv64) == 115bv8); - free requires (memory_load8_le(mem, 2243bv64) == 58bv8); - free requires (memory_load8_le(mem, 2244bv64) == 32bv8); - free requires (memory_load8_le(mem, 2245bv64) == 37bv8); - free requires (memory_load8_le(mem, 2246bv64) == 99bv8); - free requires (memory_load8_le(mem, 2247bv64) == 10bv8); - free requires (memory_load8_le(mem, 2248bv64) == 0bv8); - free requires (memory_load8_le(mem, 2249bv64) == 0bv8); - free requires (memory_load8_le(mem, 2250bv64) == 0bv8); - free requires (memory_load8_le(mem, 2251bv64) == 0bv8); - free requires (memory_load8_le(mem, 2252bv64) == 0bv8); - free requires (memory_load8_le(mem, 2253bv64) == 0bv8); - free requires (memory_load8_le(mem, 2254bv64) == 0bv8); - free requires (memory_load8_le(mem, 2255bv64) == 0bv8); - free requires (memory_load8_le(mem, 2256bv64) == 84bv8); - free requires (memory_load8_le(mem, 2257bv64) == 104bv8); - free requires (memory_load8_le(mem, 2258bv64) == 101bv8); - free requires (memory_load8_le(mem, 2259bv64) == 32bv8); - free requires (memory_load8_le(mem, 2260bv64) == 105bv8); - free requires (memory_load8_le(mem, 2261bv64) == 110bv8); - free requires (memory_load8_le(mem, 2262bv64) == 116bv8); - free requires (memory_load8_le(mem, 2263bv64) == 32bv8); - free requires (memory_load8_le(mem, 2264bv64) == 105bv8); - free requires (memory_load8_le(mem, 2265bv64) == 115bv8); - free requires (memory_load8_le(mem, 2266bv64) == 58bv8); - free requires (memory_load8_le(mem, 2267bv64) == 32bv8); - free requires (memory_load8_le(mem, 2268bv64) == 37bv8); - free requires (memory_load8_le(mem, 2269bv64) == 100bv8); - free requires (memory_load8_le(mem, 2270bv64) == 10bv8); - free requires (memory_load8_le(mem, 2271bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 16bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 192bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 8bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2224bv64) == 1bv8); - free ensures (memory_load8_le(mem, 2225bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2226bv64) == 2bv8); - free ensures (memory_load8_le(mem, 2227bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2228bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2229bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2230bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2231bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2232bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2233bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2234bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2235bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2236bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2237bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2238bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2239bv64) == 114bv8); - free ensures (memory_load8_le(mem, 2240bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2241bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2242bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2243bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2244bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2245bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2246bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2247bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2248bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2249bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2250bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2251bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2252bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2253bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2254bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2255bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2256bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2257bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2258bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2259bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2260bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2261bv64) == 110bv8); - free ensures (memory_load8_le(mem, 2262bv64) == 116bv8); - free ensures (memory_load8_le(mem, 2263bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2264bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2265bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2266bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2267bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2268bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2269bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2270bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2271bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 2224bv64) == 131073bv64); + free requires (memory_load64_le(mem, 2232bv64) == 8241983568019286100bv64); + free requires (memory_load64_le(mem, 2240bv64) == 748482783423457568bv64); + free requires (memory_load64_le(mem, 2248bv64) == 0bv64); + free requires (memory_load64_le(mem, 2256bv64) == 2338615504306268244bv64); + free requires (memory_load64_le(mem, 2264bv64) == 2924860384375657bv64); + free requires (memory_load64_le(mem, 68992bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 2224bv64) == 131073bv64); + free ensures (memory_load64_le(mem, 2232bv64) == 8241983568019286100bv64); + free ensures (memory_load64_le(mem, 2240bv64) == 748482783423457568bv64); + free ensures (memory_load64_le(mem, 2248bv64) == 0bv64); + free ensures (memory_load64_le(mem, 2256bv64) == 2338615504306268244bv64); + free ensures (memory_load64_le(mem, 2264bv64) == 2924860384375657bv64); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + diff --git a/src/test/correct/multi_malloc/gcc_pic/multi_malloc.expected b/src/test/correct/multi_malloc/gcc_pic/multi_malloc.expected index 417806157..a81608960 100644 --- a/src/test/correct/multi_malloc/gcc_pic/multi_malloc.expected +++ b/src/test/correct/multi_malloc/gcc_pic/multi_malloc.expected @@ -77,91 +77,23 @@ procedure {:extern} rely(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); - free ensures (memory_load8_le(mem, 2224bv64) == 1bv8); - free ensures (memory_load8_le(mem, 2225bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2226bv64) == 2bv8); - free ensures (memory_load8_le(mem, 2227bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2228bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2229bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2230bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2231bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2232bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2233bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2234bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2235bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2236bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2237bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2238bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2239bv64) == 114bv8); - free ensures (memory_load8_le(mem, 2240bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2241bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2242bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2243bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2244bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2245bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2246bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2247bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2248bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2249bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2250bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2251bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2252bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2253bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2254bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2255bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2256bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2257bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2258bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2259bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2260bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2261bv64) == 110bv8); - free ensures (memory_load8_le(mem, 2262bv64) == 116bv8); - free ensures (memory_load8_le(mem, 2263bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2264bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2265bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2266bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2267bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2268bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2269bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2270bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2271bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 2224bv64) == 131073bv64); + free ensures (memory_load64_le(mem, 2232bv64) == 8241983568019286100bv64); + free ensures (memory_load64_le(mem, 2240bv64) == 748482783423457568bv64); + free ensures (memory_load64_le(mem, 2248bv64) == 0bv64); + free ensures (memory_load64_le(mem, 2256bv64) == 2338615504306268244bv64); + free ensures (memory_load64_le(mem, 2264bv64) == 2924860384375657bv64); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -174,349 +106,57 @@ procedure {:extern} guarantee_reflexive(); procedure #free(); modifies Gamma_R16, Gamma_R17, R16, R17; - free requires (memory_load8_le(mem, 2224bv64) == 1bv8); - free requires (memory_load8_le(mem, 2225bv64) == 0bv8); - free requires (memory_load8_le(mem, 2226bv64) == 2bv8); - free requires (memory_load8_le(mem, 2227bv64) == 0bv8); - free requires (memory_load8_le(mem, 2228bv64) == 0bv8); - free requires (memory_load8_le(mem, 2229bv64) == 0bv8); - free requires (memory_load8_le(mem, 2230bv64) == 0bv8); - free requires (memory_load8_le(mem, 2231bv64) == 0bv8); - free requires (memory_load8_le(mem, 2232bv64) == 84bv8); - free requires (memory_load8_le(mem, 2233bv64) == 104bv8); - free requires (memory_load8_le(mem, 2234bv64) == 101bv8); - free requires (memory_load8_le(mem, 2235bv64) == 32bv8); - free requires (memory_load8_le(mem, 2236bv64) == 99bv8); - free requires (memory_load8_le(mem, 2237bv64) == 104bv8); - free requires (memory_load8_le(mem, 2238bv64) == 97bv8); - free requires (memory_load8_le(mem, 2239bv64) == 114bv8); - free requires (memory_load8_le(mem, 2240bv64) == 32bv8); - free requires (memory_load8_le(mem, 2241bv64) == 105bv8); - free requires (memory_load8_le(mem, 2242bv64) == 115bv8); - free requires (memory_load8_le(mem, 2243bv64) == 58bv8); - free requires (memory_load8_le(mem, 2244bv64) == 32bv8); - free requires (memory_load8_le(mem, 2245bv64) == 37bv8); - free requires (memory_load8_le(mem, 2246bv64) == 99bv8); - free requires (memory_load8_le(mem, 2247bv64) == 10bv8); - free requires (memory_load8_le(mem, 2248bv64) == 0bv8); - free requires (memory_load8_le(mem, 2249bv64) == 0bv8); - free requires (memory_load8_le(mem, 2250bv64) == 0bv8); - free requires (memory_load8_le(mem, 2251bv64) == 0bv8); - free requires (memory_load8_le(mem, 2252bv64) == 0bv8); - free requires (memory_load8_le(mem, 2253bv64) == 0bv8); - free requires (memory_load8_le(mem, 2254bv64) == 0bv8); - free requires (memory_load8_le(mem, 2255bv64) == 0bv8); - free requires (memory_load8_le(mem, 2256bv64) == 84bv8); - free requires (memory_load8_le(mem, 2257bv64) == 104bv8); - free requires (memory_load8_le(mem, 2258bv64) == 101bv8); - free requires (memory_load8_le(mem, 2259bv64) == 32bv8); - free requires (memory_load8_le(mem, 2260bv64) == 105bv8); - free requires (memory_load8_le(mem, 2261bv64) == 110bv8); - free requires (memory_load8_le(mem, 2262bv64) == 116bv8); - free requires (memory_load8_le(mem, 2263bv64) == 32bv8); - free requires (memory_load8_le(mem, 2264bv64) == 105bv8); - free requires (memory_load8_le(mem, 2265bv64) == 115bv8); - free requires (memory_load8_le(mem, 2266bv64) == 58bv8); - free requires (memory_load8_le(mem, 2267bv64) == 32bv8); - free requires (memory_load8_le(mem, 2268bv64) == 37bv8); - free requires (memory_load8_le(mem, 2269bv64) == 100bv8); - free requires (memory_load8_le(mem, 2270bv64) == 10bv8); - free requires (memory_load8_le(mem, 2271bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 16bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 192bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 8bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2224bv64) == 1bv8); - free ensures (memory_load8_le(mem, 2225bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2226bv64) == 2bv8); - free ensures (memory_load8_le(mem, 2227bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2228bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2229bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2230bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2231bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2232bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2233bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2234bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2235bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2236bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2237bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2238bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2239bv64) == 114bv8); - free ensures (memory_load8_le(mem, 2240bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2241bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2242bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2243bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2244bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2245bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2246bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2247bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2248bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2249bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2250bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2251bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2252bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2253bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2254bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2255bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2256bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2257bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2258bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2259bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2260bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2261bv64) == 110bv8); - free ensures (memory_load8_le(mem, 2262bv64) == 116bv8); - free ensures (memory_load8_le(mem, 2263bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2264bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2265bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2266bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2267bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2268bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2269bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2270bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2271bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 2224bv64) == 131073bv64); + free requires (memory_load64_le(mem, 2232bv64) == 8241983568019286100bv64); + free requires (memory_load64_le(mem, 2240bv64) == 748482783423457568bv64); + free requires (memory_load64_le(mem, 2248bv64) == 0bv64); + free requires (memory_load64_le(mem, 2256bv64) == 2338615504306268244bv64); + free requires (memory_load64_le(mem, 2264bv64) == 2924860384375657bv64); + free requires (memory_load64_le(mem, 68992bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 2224bv64) == 131073bv64); + free ensures (memory_load64_le(mem, 2232bv64) == 8241983568019286100bv64); + free ensures (memory_load64_le(mem, 2240bv64) == 748482783423457568bv64); + free ensures (memory_load64_le(mem, 2248bv64) == 0bv64); + free ensures (memory_load64_le(mem, 2256bv64) == 2338615504306268244bv64); + free ensures (memory_load64_le(mem, 2264bv64) == 2924860384375657bv64); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R16, Gamma_R17, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R16, R17, R29, R30, R31, mem, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free requires (memory_load8_le(mem, 2224bv64) == 1bv8); - free requires (memory_load8_le(mem, 2225bv64) == 0bv8); - free requires (memory_load8_le(mem, 2226bv64) == 2bv8); - free requires (memory_load8_le(mem, 2227bv64) == 0bv8); - free requires (memory_load8_le(mem, 2228bv64) == 0bv8); - free requires (memory_load8_le(mem, 2229bv64) == 0bv8); - free requires (memory_load8_le(mem, 2230bv64) == 0bv8); - free requires (memory_load8_le(mem, 2231bv64) == 0bv8); - free requires (memory_load8_le(mem, 2232bv64) == 84bv8); - free requires (memory_load8_le(mem, 2233bv64) == 104bv8); - free requires (memory_load8_le(mem, 2234bv64) == 101bv8); - free requires (memory_load8_le(mem, 2235bv64) == 32bv8); - free requires (memory_load8_le(mem, 2236bv64) == 99bv8); - free requires (memory_load8_le(mem, 2237bv64) == 104bv8); - free requires (memory_load8_le(mem, 2238bv64) == 97bv8); - free requires (memory_load8_le(mem, 2239bv64) == 114bv8); - free requires (memory_load8_le(mem, 2240bv64) == 32bv8); - free requires (memory_load8_le(mem, 2241bv64) == 105bv8); - free requires (memory_load8_le(mem, 2242bv64) == 115bv8); - free requires (memory_load8_le(mem, 2243bv64) == 58bv8); - free requires (memory_load8_le(mem, 2244bv64) == 32bv8); - free requires (memory_load8_le(mem, 2245bv64) == 37bv8); - free requires (memory_load8_le(mem, 2246bv64) == 99bv8); - free requires (memory_load8_le(mem, 2247bv64) == 10bv8); - free requires (memory_load8_le(mem, 2248bv64) == 0bv8); - free requires (memory_load8_le(mem, 2249bv64) == 0bv8); - free requires (memory_load8_le(mem, 2250bv64) == 0bv8); - free requires (memory_load8_le(mem, 2251bv64) == 0bv8); - free requires (memory_load8_le(mem, 2252bv64) == 0bv8); - free requires (memory_load8_le(mem, 2253bv64) == 0bv8); - free requires (memory_load8_le(mem, 2254bv64) == 0bv8); - free requires (memory_load8_le(mem, 2255bv64) == 0bv8); - free requires (memory_load8_le(mem, 2256bv64) == 84bv8); - free requires (memory_load8_le(mem, 2257bv64) == 104bv8); - free requires (memory_load8_le(mem, 2258bv64) == 101bv8); - free requires (memory_load8_le(mem, 2259bv64) == 32bv8); - free requires (memory_load8_le(mem, 2260bv64) == 105bv8); - free requires (memory_load8_le(mem, 2261bv64) == 110bv8); - free requires (memory_load8_le(mem, 2262bv64) == 116bv8); - free requires (memory_load8_le(mem, 2263bv64) == 32bv8); - free requires (memory_load8_le(mem, 2264bv64) == 105bv8); - free requires (memory_load8_le(mem, 2265bv64) == 115bv8); - free requires (memory_load8_le(mem, 2266bv64) == 58bv8); - free requires (memory_load8_le(mem, 2267bv64) == 32bv8); - free requires (memory_load8_le(mem, 2268bv64) == 37bv8); - free requires (memory_load8_le(mem, 2269bv64) == 100bv8); - free requires (memory_load8_le(mem, 2270bv64) == 10bv8); - free requires (memory_load8_le(mem, 2271bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 16bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 192bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 8bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free requires (memory_load64_le(mem, 2224bv64) == 131073bv64); + free requires (memory_load64_le(mem, 2232bv64) == 8241983568019286100bv64); + free requires (memory_load64_le(mem, 2240bv64) == 748482783423457568bv64); + free requires (memory_load64_le(mem, 2248bv64) == 0bv64); + free requires (memory_load64_le(mem, 2256bv64) == 2338615504306268244bv64); + free requires (memory_load64_le(mem, 2264bv64) == 2924860384375657bv64); + free requires (memory_load64_le(mem, 68992bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); free ensures (R31 == old(R31)); - free ensures (memory_load8_le(mem, 2224bv64) == 1bv8); - free ensures (memory_load8_le(mem, 2225bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2226bv64) == 2bv8); - free ensures (memory_load8_le(mem, 2227bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2228bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2229bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2230bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2231bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2232bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2233bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2234bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2235bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2236bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2237bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2238bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2239bv64) == 114bv8); - free ensures (memory_load8_le(mem, 2240bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2241bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2242bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2243bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2244bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2245bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2246bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2247bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2248bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2249bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2250bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2251bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2252bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2253bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2254bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2255bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2256bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2257bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2258bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2259bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2260bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2261bv64) == 110bv8); - free ensures (memory_load8_le(mem, 2262bv64) == 116bv8); - free ensures (memory_load8_le(mem, 2263bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2264bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2265bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2266bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2267bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2268bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2269bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2270bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2271bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 2224bv64) == 131073bv64); + free ensures (memory_load64_le(mem, 2232bv64) == 8241983568019286100bv64); + free ensures (memory_load64_le(mem, 2240bv64) == 748482783423457568bv64); + free ensures (memory_load64_le(mem, 2248bv64) == 0bv64); + free ensures (memory_load64_le(mem, 2256bv64) == 2338615504306268244bv64); + free ensures (memory_load64_le(mem, 2264bv64) == 2924860384375657bv64); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv64; var Gamma_#4: bool; @@ -600,326 +240,47 @@ procedure main() procedure malloc(); modifies Gamma_R16, Gamma_R17, R16, R17; - free requires (memory_load8_le(mem, 2224bv64) == 1bv8); - free requires (memory_load8_le(mem, 2225bv64) == 0bv8); - free requires (memory_load8_le(mem, 2226bv64) == 2bv8); - free requires (memory_load8_le(mem, 2227bv64) == 0bv8); - free requires (memory_load8_le(mem, 2228bv64) == 0bv8); - free requires (memory_load8_le(mem, 2229bv64) == 0bv8); - free requires (memory_load8_le(mem, 2230bv64) == 0bv8); - free requires (memory_load8_le(mem, 2231bv64) == 0bv8); - free requires (memory_load8_le(mem, 2232bv64) == 84bv8); - free requires (memory_load8_le(mem, 2233bv64) == 104bv8); - free requires (memory_load8_le(mem, 2234bv64) == 101bv8); - free requires (memory_load8_le(mem, 2235bv64) == 32bv8); - free requires (memory_load8_le(mem, 2236bv64) == 99bv8); - free requires (memory_load8_le(mem, 2237bv64) == 104bv8); - free requires (memory_load8_le(mem, 2238bv64) == 97bv8); - free requires (memory_load8_le(mem, 2239bv64) == 114bv8); - free requires (memory_load8_le(mem, 2240bv64) == 32bv8); - free requires (memory_load8_le(mem, 2241bv64) == 105bv8); - free requires (memory_load8_le(mem, 2242bv64) == 115bv8); - free requires (memory_load8_le(mem, 2243bv64) == 58bv8); - free requires (memory_load8_le(mem, 2244bv64) == 32bv8); - free requires (memory_load8_le(mem, 2245bv64) == 37bv8); - free requires (memory_load8_le(mem, 2246bv64) == 99bv8); - free requires (memory_load8_le(mem, 2247bv64) == 10bv8); - free requires (memory_load8_le(mem, 2248bv64) == 0bv8); - free requires (memory_load8_le(mem, 2249bv64) == 0bv8); - free requires (memory_load8_le(mem, 2250bv64) == 0bv8); - free requires (memory_load8_le(mem, 2251bv64) == 0bv8); - free requires (memory_load8_le(mem, 2252bv64) == 0bv8); - free requires (memory_load8_le(mem, 2253bv64) == 0bv8); - free requires (memory_load8_le(mem, 2254bv64) == 0bv8); - free requires (memory_load8_le(mem, 2255bv64) == 0bv8); - free requires (memory_load8_le(mem, 2256bv64) == 84bv8); - free requires (memory_load8_le(mem, 2257bv64) == 104bv8); - free requires (memory_load8_le(mem, 2258bv64) == 101bv8); - free requires (memory_load8_le(mem, 2259bv64) == 32bv8); - free requires (memory_load8_le(mem, 2260bv64) == 105bv8); - free requires (memory_load8_le(mem, 2261bv64) == 110bv8); - free requires (memory_load8_le(mem, 2262bv64) == 116bv8); - free requires (memory_load8_le(mem, 2263bv64) == 32bv8); - free requires (memory_load8_le(mem, 2264bv64) == 105bv8); - free requires (memory_load8_le(mem, 2265bv64) == 115bv8); - free requires (memory_load8_le(mem, 2266bv64) == 58bv8); - free requires (memory_load8_le(mem, 2267bv64) == 32bv8); - free requires (memory_load8_le(mem, 2268bv64) == 37bv8); - free requires (memory_load8_le(mem, 2269bv64) == 100bv8); - free requires (memory_load8_le(mem, 2270bv64) == 10bv8); - free requires (memory_load8_le(mem, 2271bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 16bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 192bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 8bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2224bv64) == 1bv8); - free ensures (memory_load8_le(mem, 2225bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2226bv64) == 2bv8); - free ensures (memory_load8_le(mem, 2227bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2228bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2229bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2230bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2231bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2232bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2233bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2234bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2235bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2236bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2237bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2238bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2239bv64) == 114bv8); - free ensures (memory_load8_le(mem, 2240bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2241bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2242bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2243bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2244bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2245bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2246bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2247bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2248bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2249bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2250bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2251bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2252bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2253bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2254bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2255bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2256bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2257bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2258bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2259bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2260bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2261bv64) == 110bv8); - free ensures (memory_load8_le(mem, 2262bv64) == 116bv8); - free ensures (memory_load8_le(mem, 2263bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2264bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2265bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2266bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2267bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2268bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2269bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2270bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2271bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 2224bv64) == 131073bv64); + free requires (memory_load64_le(mem, 2232bv64) == 8241983568019286100bv64); + free requires (memory_load64_le(mem, 2240bv64) == 748482783423457568bv64); + free requires (memory_load64_le(mem, 2248bv64) == 0bv64); + free requires (memory_load64_le(mem, 2256bv64) == 2338615504306268244bv64); + free requires (memory_load64_le(mem, 2264bv64) == 2924860384375657bv64); + free requires (memory_load64_le(mem, 68992bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 2224bv64) == 131073bv64); + free ensures (memory_load64_le(mem, 2232bv64) == 8241983568019286100bv64); + free ensures (memory_load64_le(mem, 2240bv64) == 748482783423457568bv64); + free ensures (memory_load64_le(mem, 2248bv64) == 0bv64); + free ensures (memory_load64_le(mem, 2256bv64) == 2338615504306268244bv64); + free ensures (memory_load64_le(mem, 2264bv64) == 2924860384375657bv64); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); procedure printf(); modifies Gamma_R16, Gamma_R17, R16, R17; - free requires (memory_load8_le(mem, 2224bv64) == 1bv8); - free requires (memory_load8_le(mem, 2225bv64) == 0bv8); - free requires (memory_load8_le(mem, 2226bv64) == 2bv8); - free requires (memory_load8_le(mem, 2227bv64) == 0bv8); - free requires (memory_load8_le(mem, 2228bv64) == 0bv8); - free requires (memory_load8_le(mem, 2229bv64) == 0bv8); - free requires (memory_load8_le(mem, 2230bv64) == 0bv8); - free requires (memory_load8_le(mem, 2231bv64) == 0bv8); - free requires (memory_load8_le(mem, 2232bv64) == 84bv8); - free requires (memory_load8_le(mem, 2233bv64) == 104bv8); - free requires (memory_load8_le(mem, 2234bv64) == 101bv8); - free requires (memory_load8_le(mem, 2235bv64) == 32bv8); - free requires (memory_load8_le(mem, 2236bv64) == 99bv8); - free requires (memory_load8_le(mem, 2237bv64) == 104bv8); - free requires (memory_load8_le(mem, 2238bv64) == 97bv8); - free requires (memory_load8_le(mem, 2239bv64) == 114bv8); - free requires (memory_load8_le(mem, 2240bv64) == 32bv8); - free requires (memory_load8_le(mem, 2241bv64) == 105bv8); - free requires (memory_load8_le(mem, 2242bv64) == 115bv8); - free requires (memory_load8_le(mem, 2243bv64) == 58bv8); - free requires (memory_load8_le(mem, 2244bv64) == 32bv8); - free requires (memory_load8_le(mem, 2245bv64) == 37bv8); - free requires (memory_load8_le(mem, 2246bv64) == 99bv8); - free requires (memory_load8_le(mem, 2247bv64) == 10bv8); - free requires (memory_load8_le(mem, 2248bv64) == 0bv8); - free requires (memory_load8_le(mem, 2249bv64) == 0bv8); - free requires (memory_load8_le(mem, 2250bv64) == 0bv8); - free requires (memory_load8_le(mem, 2251bv64) == 0bv8); - free requires (memory_load8_le(mem, 2252bv64) == 0bv8); - free requires (memory_load8_le(mem, 2253bv64) == 0bv8); - free requires (memory_load8_le(mem, 2254bv64) == 0bv8); - free requires (memory_load8_le(mem, 2255bv64) == 0bv8); - free requires (memory_load8_le(mem, 2256bv64) == 84bv8); - free requires (memory_load8_le(mem, 2257bv64) == 104bv8); - free requires (memory_load8_le(mem, 2258bv64) == 101bv8); - free requires (memory_load8_le(mem, 2259bv64) == 32bv8); - free requires (memory_load8_le(mem, 2260bv64) == 105bv8); - free requires (memory_load8_le(mem, 2261bv64) == 110bv8); - free requires (memory_load8_le(mem, 2262bv64) == 116bv8); - free requires (memory_load8_le(mem, 2263bv64) == 32bv8); - free requires (memory_load8_le(mem, 2264bv64) == 105bv8); - free requires (memory_load8_le(mem, 2265bv64) == 115bv8); - free requires (memory_load8_le(mem, 2266bv64) == 58bv8); - free requires (memory_load8_le(mem, 2267bv64) == 32bv8); - free requires (memory_load8_le(mem, 2268bv64) == 37bv8); - free requires (memory_load8_le(mem, 2269bv64) == 100bv8); - free requires (memory_load8_le(mem, 2270bv64) == 10bv8); - free requires (memory_load8_le(mem, 2271bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 16bv8); - free requires (memory_load8_le(mem, 68993bv64) == 8bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 192bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 8bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2224bv64) == 1bv8); - free ensures (memory_load8_le(mem, 2225bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2226bv64) == 2bv8); - free ensures (memory_load8_le(mem, 2227bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2228bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2229bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2230bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2231bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2232bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2233bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2234bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2235bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2236bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2237bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2238bv64) == 97bv8); - free ensures (memory_load8_le(mem, 2239bv64) == 114bv8); - free ensures (memory_load8_le(mem, 2240bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2241bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2242bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2243bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2244bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2245bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2246bv64) == 99bv8); - free ensures (memory_load8_le(mem, 2247bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2248bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2249bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2250bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2251bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2252bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2253bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2254bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2255bv64) == 0bv8); - free ensures (memory_load8_le(mem, 2256bv64) == 84bv8); - free ensures (memory_load8_le(mem, 2257bv64) == 104bv8); - free ensures (memory_load8_le(mem, 2258bv64) == 101bv8); - free ensures (memory_load8_le(mem, 2259bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2260bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2261bv64) == 110bv8); - free ensures (memory_load8_le(mem, 2262bv64) == 116bv8); - free ensures (memory_load8_le(mem, 2263bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2264bv64) == 105bv8); - free ensures (memory_load8_le(mem, 2265bv64) == 115bv8); - free ensures (memory_load8_le(mem, 2266bv64) == 58bv8); - free ensures (memory_load8_le(mem, 2267bv64) == 32bv8); - free ensures (memory_load8_le(mem, 2268bv64) == 37bv8); - free ensures (memory_load8_le(mem, 2269bv64) == 100bv8); - free ensures (memory_load8_le(mem, 2270bv64) == 10bv8); - free ensures (memory_load8_le(mem, 2271bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 16bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 8bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 2224bv64) == 131073bv64); + free requires (memory_load64_le(mem, 2232bv64) == 8241983568019286100bv64); + free requires (memory_load64_le(mem, 2240bv64) == 748482783423457568bv64); + free requires (memory_load64_le(mem, 2248bv64) == 0bv64); + free requires (memory_load64_le(mem, 2256bv64) == 2338615504306268244bv64); + free requires (memory_load64_le(mem, 2264bv64) == 2924860384375657bv64); + free requires (memory_load64_le(mem, 68992bv64) == 2064bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1984bv64); + free requires (memory_load64_le(mem, 69616bv64) == 2068bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 2224bv64) == 131073bv64); + free ensures (memory_load64_le(mem, 2232bv64) == 8241983568019286100bv64); + free ensures (memory_load64_le(mem, 2240bv64) == 748482783423457568bv64); + free ensures (memory_load64_le(mem, 2248bv64) == 0bv64); + free ensures (memory_load64_le(mem, 2256bv64) == 2338615504306268244bv64); + free ensures (memory_load64_le(mem, 2264bv64) == 2924860384375657bv64); + free ensures (memory_load64_le(mem, 68992bv64) == 2064bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1984bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 2068bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + diff --git a/src/test/correct/nestedif/clang/nestedif.expected b/src/test/correct/nestedif/clang/nestedif.expected index cc4c39950..3a508ccb9 100644 --- a/src/test/correct/nestedif/clang/nestedif.expected +++ b/src/test/correct/nestedif/clang/nestedif.expected @@ -29,6 +29,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -48,43 +52,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1969bv64) == 0bv8); free ensures (memory_load8_le(mem, 1970bv64) == 2bv8); free ensures (memory_load8_le(mem, 1971bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -95,98 +73,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_stack, R0, R31, R8, stack; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1968bv64) == 1bv8); free requires (memory_load8_le(mem, 1969bv64) == 0bv8); free requires (memory_load8_le(mem, 1970bv64) == 2bv8); free requires (memory_load8_le(mem, 1971bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1968bv64) == 1bv8); free ensures (memory_load8_le(mem, 1969bv64) == 0bv8); free ensures (memory_load8_le(mem, 1970bv64) == 2bv8); free ensures (memory_load8_le(mem, 1971bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var #4: bv32; var #5: bv32; @@ -366,3 +276,4 @@ procedure main() assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l00000418; } + diff --git a/src/test/correct/nestedif/clang_O2/nestedif.expected b/src/test/correct/nestedif/clang_O2/nestedif.expected index b904c03a5..93df8d220 100644 --- a/src/test/correct/nestedif/clang_O2/nestedif.expected +++ b/src/test/correct/nestedif/clang_O2/nestedif.expected @@ -4,6 +4,11 @@ var {:extern} R0: bv64; var {:extern} mem: [bv64]bv8; const {:extern} $_IO_stdin_used_addr: bv64; axiom ($_IO_stdin_used_addr == 1840bv64); +function {:extern} {:bvbuiltin "bvadd"} bvadd64(bv64, bv64) returns (bv64); +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -16,43 +21,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1841bv64) == 0bv8); free ensures (memory_load8_le(mem, 1842bv64) == 2bv8); free ensures (memory_load8_le(mem, 1843bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -63,99 +42,32 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, R0; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1840bv64) == 1bv8); free requires (memory_load8_le(mem, 1841bv64) == 0bv8); free requires (memory_load8_le(mem, 1842bv64) == 2bv8); free requires (memory_load8_le(mem, 1843bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (memory_load8_le(mem, 1840bv64) == 1bv8); free ensures (memory_load8_le(mem, 1841bv64) == 0bv8); free ensures (memory_load8_le(mem, 1842bv64) == 2bv8); free ensures (memory_load8_le(mem, 1843bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/nestedif/clang_no_plt_no_pic/nestedif.expected b/src/test/correct/nestedif/clang_no_plt_no_pic/nestedif.expected index 6e883b1f1..5c184bca5 100644 --- a/src/test/correct/nestedif/clang_no_plt_no_pic/nestedif.expected +++ b/src/test/correct/nestedif/clang_no_plt_no_pic/nestedif.expected @@ -29,6 +29,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -48,43 +52,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1969bv64) == 0bv8); free ensures (memory_load8_le(mem, 1970bv64) == 2bv8); free ensures (memory_load8_le(mem, 1971bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -95,98 +73,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_stack, R0, R31, R8, stack; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1968bv64) == 1bv8); free requires (memory_load8_le(mem, 1969bv64) == 0bv8); free requires (memory_load8_le(mem, 1970bv64) == 2bv8); free requires (memory_load8_le(mem, 1971bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1968bv64) == 1bv8); free ensures (memory_load8_le(mem, 1969bv64) == 0bv8); free ensures (memory_load8_le(mem, 1970bv64) == 2bv8); free ensures (memory_load8_le(mem, 1971bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var #4: bv32; var #5: bv32; @@ -366,3 +276,4 @@ procedure main() assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l00000b49; } + diff --git a/src/test/correct/nestedif/clang_pic/nestedif.expected b/src/test/correct/nestedif/clang_pic/nestedif.expected index 6e883b1f1..5c184bca5 100644 --- a/src/test/correct/nestedif/clang_pic/nestedif.expected +++ b/src/test/correct/nestedif/clang_pic/nestedif.expected @@ -29,6 +29,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -48,43 +52,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1969bv64) == 0bv8); free ensures (memory_load8_le(mem, 1970bv64) == 2bv8); free ensures (memory_load8_le(mem, 1971bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -95,98 +73,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_stack, R0, R31, R8, stack; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1968bv64) == 1bv8); free requires (memory_load8_le(mem, 1969bv64) == 0bv8); free requires (memory_load8_le(mem, 1970bv64) == 2bv8); free requires (memory_load8_le(mem, 1971bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1968bv64) == 1bv8); free ensures (memory_load8_le(mem, 1969bv64) == 0bv8); free ensures (memory_load8_le(mem, 1970bv64) == 2bv8); free ensures (memory_load8_le(mem, 1971bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var #4: bv32; var #5: bv32; @@ -366,3 +276,4 @@ procedure main() assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l00000b49; } + diff --git a/src/test/correct/nestedif/gcc/nestedif.expected b/src/test/correct/nestedif/gcc/nestedif.expected index 66735fb03..5fea255ff 100644 --- a/src/test/correct/nestedif/gcc/nestedif.expected +++ b/src/test/correct/nestedif/gcc/nestedif.expected @@ -27,6 +27,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -46,43 +50,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1929bv64) == 0bv8); free ensures (memory_load8_le(mem, 1930bv64) == 2bv8); free ensures (memory_load8_le(mem, 1931bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -93,98 +71,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_stack, R0, R31, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1928bv64) == 1bv8); free requires (memory_load8_le(mem, 1929bv64) == 0bv8); free requires (memory_load8_le(mem, 1930bv64) == 2bv8); free requires (memory_load8_le(mem, 1931bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1928bv64) == 1bv8); free ensures (memory_load8_le(mem, 1929bv64) == 0bv8); free ensures (memory_load8_le(mem, 1930bv64) == 2bv8); free ensures (memory_load8_le(mem, 1931bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv32; var #5: bv32; @@ -284,3 +194,4 @@ procedure main() assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l000003a6; } + diff --git a/src/test/correct/nestedif/gcc_O2/nestedif.expected b/src/test/correct/nestedif/gcc_O2/nestedif.expected index 306991d20..657d807d3 100644 --- a/src/test/correct/nestedif/gcc_O2/nestedif.expected +++ b/src/test/correct/nestedif/gcc_O2/nestedif.expected @@ -4,6 +4,11 @@ var {:extern} R0: bv64; var {:extern} mem: [bv64]bv8; const {:extern} $_IO_stdin_used_addr: bv64; axiom ($_IO_stdin_used_addr == 1896bv64); +function {:extern} {:bvbuiltin "bvadd"} bvadd64(bv64, bv64) returns (bv64); +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -16,43 +21,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -63,99 +42,32 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, R0; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1896bv64) == 1bv8); free requires (memory_load8_le(mem, 1897bv64) == 0bv8); free requires (memory_load8_le(mem, 1898bv64) == 2bv8); free requires (memory_load8_le(mem, 1899bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 80bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 0bv8); - free requires (memory_load8_le(mem, 69025bv64) == 7bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 0bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1536bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1896bv64) == 1bv8); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/nestedif/gcc_no_plt_no_pic/nestedif.expected b/src/test/correct/nestedif/gcc_no_plt_no_pic/nestedif.expected index 10003d950..9d14fb9bb 100644 --- a/src/test/correct/nestedif/gcc_no_plt_no_pic/nestedif.expected +++ b/src/test/correct/nestedif/gcc_no_plt_no_pic/nestedif.expected @@ -27,6 +27,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -46,43 +50,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1929bv64) == 0bv8); free ensures (memory_load8_le(mem, 1930bv64) == 2bv8); free ensures (memory_load8_le(mem, 1931bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -93,98 +71,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_stack, R0, R31, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1928bv64) == 1bv8); free requires (memory_load8_le(mem, 1929bv64) == 0bv8); free requires (memory_load8_le(mem, 1930bv64) == 2bv8); free requires (memory_load8_le(mem, 1931bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1928bv64) == 1bv8); free ensures (memory_load8_le(mem, 1929bv64) == 0bv8); free ensures (memory_load8_le(mem, 1930bv64) == 2bv8); free ensures (memory_load8_le(mem, 1931bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv32; var #5: bv32; @@ -284,3 +194,4 @@ procedure main() assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l00000a42; } + diff --git a/src/test/correct/nestedif/gcc_pic/nestedif.expected b/src/test/correct/nestedif/gcc_pic/nestedif.expected index 10003d950..9d14fb9bb 100644 --- a/src/test/correct/nestedif/gcc_pic/nestedif.expected +++ b/src/test/correct/nestedif/gcc_pic/nestedif.expected @@ -27,6 +27,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -46,43 +50,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1929bv64) == 0bv8); free ensures (memory_load8_le(mem, 1930bv64) == 2bv8); free ensures (memory_load8_le(mem, 1931bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -93,98 +71,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_stack, R0, R31, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1928bv64) == 1bv8); free requires (memory_load8_le(mem, 1929bv64) == 0bv8); free requires (memory_load8_le(mem, 1930bv64) == 2bv8); free requires (memory_load8_le(mem, 1931bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1928bv64) == 1bv8); free ensures (memory_load8_le(mem, 1929bv64) == 0bv8); free ensures (memory_load8_le(mem, 1930bv64) == 2bv8); free ensures (memory_load8_le(mem, 1931bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv32; var #5: bv32; @@ -284,3 +194,4 @@ procedure main() assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l00000a42; } + diff --git a/src/test/correct/no_interference_update_x/clang/no_interference_update_x.expected b/src/test/correct/no_interference_update_x/clang/no_interference_update_x.expected index 7a6a27fd0..cc5f1a6cc 100644 --- a/src/test/correct/no_interference_update_x/clang/no_interference_update_x.expected +++ b/src/test/correct/no_interference_update_x/clang/no_interference_update_x.expected @@ -23,6 +23,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -39,149 +43,59 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1853bv64) == 0bv8); free ensures (memory_load8_le(mem, 1854bv64) == 2bv8); free ensures (memory_load8_le(mem, 1855bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (memory_load32_le(mem, $y_addr) == memory_load32_le(mem, $y_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R8, Gamma_R9, Gamma_mem, R0, R8, R9, mem; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1852bv64) == 1bv8); free requires (memory_load8_le(mem, 1853bv64) == 0bv8); free requires (memory_load8_le(mem, 1854bv64) == 2bv8); free requires (memory_load8_le(mem, 1855bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); ensures (memory_load32_le(mem, $x_addr) == 1bv32); free ensures (memory_load8_le(mem, 1852bv64) == 1bv8); free ensures (memory_load8_le(mem, 1853bv64) == 0bv8); free ensures (memory_load8_le(mem, 1854bv64) == 2bv8); free ensures (memory_load8_le(mem, 1855bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var y_old: bv32; lmain: @@ -197,3 +111,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/no_interference_update_x/clang_O2/no_interference_update_x.expected b/src/test/correct/no_interference_update_x/clang_O2/no_interference_update_x.expected index 740a585c8..90771f992 100644 --- a/src/test/correct/no_interference_update_x/clang_O2/no_interference_update_x.expected +++ b/src/test/correct/no_interference_update_x/clang_O2/no_interference_update_x.expected @@ -23,6 +23,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -39,149 +43,59 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1853bv64) == 0bv8); free ensures (memory_load8_le(mem, 1854bv64) == 2bv8); free ensures (memory_load8_le(mem, 1855bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (memory_load32_le(mem, $y_addr) == memory_load32_le(mem, $y_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R8, Gamma_R9, Gamma_mem, R0, R8, R9, mem; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1852bv64) == 1bv8); free requires (memory_load8_le(mem, 1853bv64) == 0bv8); free requires (memory_load8_le(mem, 1854bv64) == 2bv8); free requires (memory_load8_le(mem, 1855bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); ensures (memory_load32_le(mem, $x_addr) == 1bv32); free ensures (memory_load8_le(mem, 1852bv64) == 1bv8); free ensures (memory_load8_le(mem, 1853bv64) == 0bv8); free ensures (memory_load8_le(mem, 1854bv64) == 2bv8); free ensures (memory_load8_le(mem, 1855bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var y_old: bv32; lmain: @@ -197,3 +111,4 @@ procedure main() assume {:captureState "%000002d3"} true; return; } + diff --git a/src/test/correct/no_interference_update_x/clang_no_plt_no_pic/no_interference_update_x.expected b/src/test/correct/no_interference_update_x/clang_no_plt_no_pic/no_interference_update_x.expected index 293d1dbc9..33769ca91 100644 --- a/src/test/correct/no_interference_update_x/clang_no_plt_no_pic/no_interference_update_x.expected +++ b/src/test/correct/no_interference_update_x/clang_no_plt_no_pic/no_interference_update_x.expected @@ -23,6 +23,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -39,149 +43,59 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1853bv64) == 0bv8); free ensures (memory_load8_le(mem, 1854bv64) == 2bv8); free ensures (memory_load8_le(mem, 1855bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (memory_load32_le(mem, $y_addr) == memory_load32_le(mem, $y_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R8, Gamma_R9, Gamma_mem, R0, R8, R9, mem; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1852bv64) == 1bv8); free requires (memory_load8_le(mem, 1853bv64) == 0bv8); free requires (memory_load8_le(mem, 1854bv64) == 2bv8); free requires (memory_load8_le(mem, 1855bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); ensures (memory_load32_le(mem, $x_addr) == 1bv32); free ensures (memory_load8_le(mem, 1852bv64) == 1bv8); free ensures (memory_load8_le(mem, 1853bv64) == 0bv8); free ensures (memory_load8_le(mem, 1854bv64) == 2bv8); free ensures (memory_load8_le(mem, 1855bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var y_old: bv32; lmain: @@ -197,3 +111,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/no_interference_update_x/clang_pic/no_interference_update_x.expected b/src/test/correct/no_interference_update_x/clang_pic/no_interference_update_x.expected index a5a054cf9..3ad575555 100644 --- a/src/test/correct/no_interference_update_x/clang_pic/no_interference_update_x.expected +++ b/src/test/correct/no_interference_update_x/clang_pic/no_interference_update_x.expected @@ -47,173 +47,62 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1921bv64) == 0bv8); free ensures (memory_load8_le(mem, 1922bv64) == 2bv8); free ensures (memory_load8_le(mem, 1923bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69576bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69577bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69578bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69579bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69580bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69581bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69582bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69583bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69576bv64) == 69684bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69064bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (memory_load32_le(mem, $y_addr) == memory_load32_le(mem, $y_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R8, Gamma_R9, Gamma_mem, R0, R8, R9, mem; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1920bv64) == 1bv8); free requires (memory_load8_le(mem, 1921bv64) == 0bv8); free requires (memory_load8_le(mem, 1922bv64) == 2bv8); free requires (memory_load8_le(mem, 1923bv64) == 0bv8); - free requires (memory_load8_le(mem, 69576bv64) == 52bv8); - free requires (memory_load8_le(mem, 69577bv64) == 16bv8); - free requires (memory_load8_le(mem, 69578bv64) == 1bv8); - free requires (memory_load8_le(mem, 69579bv64) == 0bv8); - free requires (memory_load8_le(mem, 69580bv64) == 0bv8); - free requires (memory_load8_le(mem, 69581bv64) == 0bv8); - free requires (memory_load8_le(mem, 69582bv64) == 0bv8); - free requires (memory_load8_le(mem, 69583bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); - free requires (memory_load8_le(mem, 69056bv64) == 80bv8); - free requires (memory_load8_le(mem, 69057bv64) == 7bv8); - free requires (memory_load8_le(mem, 69058bv64) == 0bv8); - free requires (memory_load8_le(mem, 69059bv64) == 0bv8); - free requires (memory_load8_le(mem, 69060bv64) == 0bv8); - free requires (memory_load8_le(mem, 69061bv64) == 0bv8); - free requires (memory_load8_le(mem, 69062bv64) == 0bv8); - free requires (memory_load8_le(mem, 69063bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 0bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 84bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); + free requires (memory_load64_le(mem, 69576bv64) == 69684bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); + free requires (memory_load64_le(mem, 69056bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69064bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1876bv64); ensures (memory_load32_le(mem, $x_addr) == 1bv32); free ensures (memory_load8_le(mem, 1920bv64) == 1bv8); free ensures (memory_load8_le(mem, 1921bv64) == 0bv8); free ensures (memory_load8_le(mem, 1922bv64) == 2bv8); free ensures (memory_load8_le(mem, 1923bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69576bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69577bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69578bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69579bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69580bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69581bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69582bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69583bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69576bv64) == 69684bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69064bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + +implementation main() { var y_old: bv32; lmain: @@ -231,3 +120,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/no_interference_update_x/gcc/no_interference_update_x.expected b/src/test/correct/no_interference_update_x/gcc/no_interference_update_x.expected index 48ecd68b7..96cd9c8ba 100644 --- a/src/test/correct/no_interference_update_x/gcc/no_interference_update_x.expected +++ b/src/test/correct/no_interference_update_x/gcc/no_interference_update_x.expected @@ -21,6 +21,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -37,149 +41,59 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1857bv64) == 0bv8); free ensures (memory_load8_le(mem, 1858bv64) == 2bv8); free ensures (memory_load8_le(mem, 1859bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (memory_load32_le(mem, $y_addr) == memory_load32_le(mem, $y_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1856bv64) == 1bv8); free requires (memory_load8_le(mem, 1857bv64) == 0bv8); free requires (memory_load8_le(mem, 1858bv64) == 2bv8); free requires (memory_load8_le(mem, 1859bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); ensures (memory_load32_le(mem, $x_addr) == 1bv32); free ensures (memory_load8_le(mem, 1856bv64) == 1bv8); free ensures (memory_load8_le(mem, 1857bv64) == 0bv8); free ensures (memory_load8_le(mem, 1858bv64) == 2bv8); free ensures (memory_load8_le(mem, 1859bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var y_old: bv32; lmain: @@ -196,3 +110,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/no_interference_update_x/gcc_O2/no_interference_update_x.expected b/src/test/correct/no_interference_update_x/gcc_O2/no_interference_update_x.expected index ef1344e1e..811d0683e 100644 --- a/src/test/correct/no_interference_update_x/gcc_O2/no_interference_update_x.expected +++ b/src/test/correct/no_interference_update_x/gcc_O2/no_interference_update_x.expected @@ -23,6 +23,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -39,149 +43,59 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (memory_load32_le(mem, $y_addr) == memory_load32_le(mem, $y_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R2, Gamma_mem, R0, R1, R2, mem; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1896bv64) == 1bv8); free requires (memory_load8_le(mem, 1897bv64) == 0bv8); free requires (memory_load8_le(mem, 1898bv64) == 2bv8); free requires (memory_load8_le(mem, 1899bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 80bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 0bv8); - free requires (memory_load8_le(mem, 69025bv64) == 7bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 0bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1536bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); ensures (memory_load32_le(mem, $x_addr) == 1bv32); free ensures (memory_load8_le(mem, 1896bv64) == 1bv8); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var y_old: bv32; lmain: @@ -197,3 +111,4 @@ procedure main() assume {:captureState "%000001bd"} true; return; } + diff --git a/src/test/correct/no_interference_update_x/gcc_no_plt_no_pic/no_interference_update_x.expected b/src/test/correct/no_interference_update_x/gcc_no_plt_no_pic/no_interference_update_x.expected index 09a38ab49..f485b88b2 100644 --- a/src/test/correct/no_interference_update_x/gcc_no_plt_no_pic/no_interference_update_x.expected +++ b/src/test/correct/no_interference_update_x/gcc_no_plt_no_pic/no_interference_update_x.expected @@ -21,6 +21,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -37,149 +41,59 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1857bv64) == 0bv8); free ensures (memory_load8_le(mem, 1858bv64) == 2bv8); free ensures (memory_load8_le(mem, 1859bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (memory_load32_le(mem, $y_addr) == memory_load32_le(mem, $y_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1856bv64) == 1bv8); free requires (memory_load8_le(mem, 1857bv64) == 0bv8); free requires (memory_load8_le(mem, 1858bv64) == 2bv8); free requires (memory_load8_le(mem, 1859bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); ensures (memory_load32_le(mem, $x_addr) == 1bv32); free ensures (memory_load8_le(mem, 1856bv64) == 1bv8); free ensures (memory_load8_le(mem, 1857bv64) == 0bv8); free ensures (memory_load8_le(mem, 1858bv64) == 2bv8); free ensures (memory_load8_le(mem, 1859bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var y_old: bv32; lmain: @@ -196,3 +110,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/no_interference_update_x/gcc_pic/no_interference_update_x.expected b/src/test/correct/no_interference_update_x/gcc_pic/no_interference_update_x.expected index b07082212..bf4c0d23b 100644 --- a/src/test/correct/no_interference_update_x/gcc_pic/no_interference_update_x.expected +++ b/src/test/correct/no_interference_update_x/gcc_pic/no_interference_update_x.expected @@ -45,173 +45,62 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1921bv64) == 0bv8); free ensures (memory_load8_le(mem, 1922bv64) == 2bv8); free ensures (memory_load8_le(mem, 1923bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69600bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69601bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69602bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69603bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69604bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69605bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69606bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69607bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69600bv64) == 69652bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1872bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (memory_load32_le(mem, $y_addr) == memory_load32_le(mem, $y_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1920bv64) == 1bv8); free requires (memory_load8_le(mem, 1921bv64) == 0bv8); free requires (memory_load8_le(mem, 1922bv64) == 2bv8); free requires (memory_load8_le(mem, 1923bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 84bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 0bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69600bv64) == 20bv8); - free requires (memory_load8_le(mem, 69601bv64) == 16bv8); - free requires (memory_load8_le(mem, 69602bv64) == 1bv8); - free requires (memory_load8_le(mem, 69603bv64) == 0bv8); - free requires (memory_load8_le(mem, 69604bv64) == 0bv8); - free requires (memory_load8_le(mem, 69605bv64) == 0bv8); - free requires (memory_load8_le(mem, 69606bv64) == 0bv8); - free requires (memory_load8_le(mem, 69607bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 80bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69016bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69600bv64) == 69652bv64); + free requires (memory_load64_le(mem, 69008bv64) == 1872bv64); ensures (memory_load32_le(mem, $x_addr) == 1bv32); free ensures (memory_load8_le(mem, 1920bv64) == 1bv8); free ensures (memory_load8_le(mem, 1921bv64) == 0bv8); free ensures (memory_load8_le(mem, 1922bv64) == 2bv8); free ensures (memory_load8_le(mem, 1923bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69600bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69601bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69602bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69603bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69604bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69605bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69606bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69607bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69600bv64) == 69652bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1872bv64); + +implementation main() { var y_old: bv32; lmain: @@ -229,3 +118,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/no_interference_update_y/clang/no_interference_update_y.expected b/src/test/correct/no_interference_update_y/clang/no_interference_update_y.expected index 2bb856649..7830f3c2e 100644 --- a/src/test/correct/no_interference_update_y/clang/no_interference_update_y.expected +++ b/src/test/correct/no_interference_update_y/clang/no_interference_update_y.expected @@ -23,6 +23,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -39,149 +43,59 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1853bv64) == 0bv8); free ensures (memory_load8_le(mem, 1854bv64) == 2bv8); free ensures (memory_load8_le(mem, 1855bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $y_addr) == old(memory_load32_le(mem, $y_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $y_addr) == memory_load32_le(mem, $y_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R8, Gamma_R9, Gamma_mem, R0, R8, R9, mem; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1852bv64) == 1bv8); free requires (memory_load8_le(mem, 1853bv64) == 0bv8); free requires (memory_load8_le(mem, 1854bv64) == 2bv8); free requires (memory_load8_le(mem, 1855bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); ensures (memory_load32_le(mem, $y_addr) == 1bv32); free ensures (memory_load8_le(mem, 1852bv64) == 1bv8); free ensures (memory_load8_le(mem, 1853bv64) == 0bv8); free ensures (memory_load8_le(mem, 1854bv64) == 2bv8); free ensures (memory_load8_le(mem, 1855bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var x_old: bv32; lmain: @@ -197,3 +111,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/no_interference_update_y/clang_O2/no_interference_update_y.expected b/src/test/correct/no_interference_update_y/clang_O2/no_interference_update_y.expected index 81e2f7c66..88de4ed43 100644 --- a/src/test/correct/no_interference_update_y/clang_O2/no_interference_update_y.expected +++ b/src/test/correct/no_interference_update_y/clang_O2/no_interference_update_y.expected @@ -23,6 +23,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -39,149 +43,59 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1853bv64) == 0bv8); free ensures (memory_load8_le(mem, 1854bv64) == 2bv8); free ensures (memory_load8_le(mem, 1855bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $y_addr) == old(memory_load32_le(mem, $y_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $y_addr) == memory_load32_le(mem, $y_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R8, Gamma_R9, Gamma_mem, R0, R8, R9, mem; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1852bv64) == 1bv8); free requires (memory_load8_le(mem, 1853bv64) == 0bv8); free requires (memory_load8_le(mem, 1854bv64) == 2bv8); free requires (memory_load8_le(mem, 1855bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); ensures (memory_load32_le(mem, $y_addr) == 1bv32); free ensures (memory_load8_le(mem, 1852bv64) == 1bv8); free ensures (memory_load8_le(mem, 1853bv64) == 0bv8); free ensures (memory_load8_le(mem, 1854bv64) == 2bv8); free ensures (memory_load8_le(mem, 1855bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var x_old: bv32; lmain: @@ -197,3 +111,4 @@ procedure main() assume {:captureState "%000002d3"} true; return; } + diff --git a/src/test/correct/no_interference_update_y/clang_no_plt_no_pic/no_interference_update_y.expected b/src/test/correct/no_interference_update_y/clang_no_plt_no_pic/no_interference_update_y.expected index ac0a8d545..cb22929dc 100644 --- a/src/test/correct/no_interference_update_y/clang_no_plt_no_pic/no_interference_update_y.expected +++ b/src/test/correct/no_interference_update_y/clang_no_plt_no_pic/no_interference_update_y.expected @@ -23,6 +23,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -39,149 +43,59 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1853bv64) == 0bv8); free ensures (memory_load8_le(mem, 1854bv64) == 2bv8); free ensures (memory_load8_le(mem, 1855bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $y_addr) == old(memory_load32_le(mem, $y_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $y_addr) == memory_load32_le(mem, $y_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R8, Gamma_R9, Gamma_mem, R0, R8, R9, mem; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1852bv64) == 1bv8); free requires (memory_load8_le(mem, 1853bv64) == 0bv8); free requires (memory_load8_le(mem, 1854bv64) == 2bv8); free requires (memory_load8_le(mem, 1855bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); ensures (memory_load32_le(mem, $y_addr) == 1bv32); free ensures (memory_load8_le(mem, 1852bv64) == 1bv8); free ensures (memory_load8_le(mem, 1853bv64) == 0bv8); free ensures (memory_load8_le(mem, 1854bv64) == 2bv8); free ensures (memory_load8_le(mem, 1855bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var x_old: bv32; lmain: @@ -197,3 +111,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/no_interference_update_y/clang_pic/no_interference_update_y.expected b/src/test/correct/no_interference_update_y/clang_pic/no_interference_update_y.expected index 963551bd0..1c4931e1a 100644 --- a/src/test/correct/no_interference_update_y/clang_pic/no_interference_update_y.expected +++ b/src/test/correct/no_interference_update_y/clang_pic/no_interference_update_y.expected @@ -47,173 +47,62 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1921bv64) == 0bv8); free ensures (memory_load8_le(mem, 1922bv64) == 2bv8); free ensures (memory_load8_le(mem, 1923bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69584bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69585bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69586bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69587bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69588bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69589bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69590bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69591bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69584bv64) == 69684bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69064bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $y_addr) == old(memory_load32_le(mem, $y_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $y_addr) == memory_load32_le(mem, $y_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R8, Gamma_R9, Gamma_mem, R0, R8, R9, mem; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1920bv64) == 1bv8); free requires (memory_load8_le(mem, 1921bv64) == 0bv8); free requires (memory_load8_le(mem, 1922bv64) == 2bv8); free requires (memory_load8_le(mem, 1923bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); - free requires (memory_load8_le(mem, 69584bv64) == 52bv8); - free requires (memory_load8_le(mem, 69585bv64) == 16bv8); - free requires (memory_load8_le(mem, 69586bv64) == 1bv8); - free requires (memory_load8_le(mem, 69587bv64) == 0bv8); - free requires (memory_load8_le(mem, 69588bv64) == 0bv8); - free requires (memory_load8_le(mem, 69589bv64) == 0bv8); - free requires (memory_load8_le(mem, 69590bv64) == 0bv8); - free requires (memory_load8_le(mem, 69591bv64) == 0bv8); - free requires (memory_load8_le(mem, 69056bv64) == 80bv8); - free requires (memory_load8_le(mem, 69057bv64) == 7bv8); - free requires (memory_load8_le(mem, 69058bv64) == 0bv8); - free requires (memory_load8_le(mem, 69059bv64) == 0bv8); - free requires (memory_load8_le(mem, 69060bv64) == 0bv8); - free requires (memory_load8_le(mem, 69061bv64) == 0bv8); - free requires (memory_load8_le(mem, 69062bv64) == 0bv8); - free requires (memory_load8_le(mem, 69063bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 0bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 84bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); + free requires (memory_load64_le(mem, 69584bv64) == 69684bv64); + free requires (memory_load64_le(mem, 69056bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69064bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1876bv64); ensures (memory_load32_le(mem, $y_addr) == 1bv32); free ensures (memory_load8_le(mem, 1920bv64) == 1bv8); free ensures (memory_load8_le(mem, 1921bv64) == 0bv8); free ensures (memory_load8_le(mem, 1922bv64) == 2bv8); free ensures (memory_load8_le(mem, 1923bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69584bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69585bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69586bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69587bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69588bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69589bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69590bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69591bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69584bv64) == 69684bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69064bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + +implementation main() { var x_old: bv32; lmain: @@ -231,3 +120,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/no_interference_update_y/gcc/no_interference_update_y.expected b/src/test/correct/no_interference_update_y/gcc/no_interference_update_y.expected index 20a7bf882..4417a9539 100644 --- a/src/test/correct/no_interference_update_y/gcc/no_interference_update_y.expected +++ b/src/test/correct/no_interference_update_y/gcc/no_interference_update_y.expected @@ -21,6 +21,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -37,149 +41,59 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1857bv64) == 0bv8); free ensures (memory_load8_le(mem, 1858bv64) == 2bv8); free ensures (memory_load8_le(mem, 1859bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $y_addr) == old(memory_load32_le(mem, $y_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $y_addr) == memory_load32_le(mem, $y_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1856bv64) == 1bv8); free requires (memory_load8_le(mem, 1857bv64) == 0bv8); free requires (memory_load8_le(mem, 1858bv64) == 2bv8); free requires (memory_load8_le(mem, 1859bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); ensures (memory_load32_le(mem, $y_addr) == 1bv32); free ensures (memory_load8_le(mem, 1856bv64) == 1bv8); free ensures (memory_load8_le(mem, 1857bv64) == 0bv8); free ensures (memory_load8_le(mem, 1858bv64) == 2bv8); free ensures (memory_load8_le(mem, 1859bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var x_old: bv32; lmain: @@ -196,3 +110,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/no_interference_update_y/gcc_O2/no_interference_update_y.expected b/src/test/correct/no_interference_update_y/gcc_O2/no_interference_update_y.expected index 01c79156a..2a6a9c6db 100644 --- a/src/test/correct/no_interference_update_y/gcc_O2/no_interference_update_y.expected +++ b/src/test/correct/no_interference_update_y/gcc_O2/no_interference_update_y.expected @@ -23,6 +23,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -39,149 +43,59 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $y_addr) == old(memory_load32_le(mem, $y_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $y_addr) == memory_load32_le(mem, $y_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R2, Gamma_mem, R0, R1, R2, mem; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1896bv64) == 1bv8); free requires (memory_load8_le(mem, 1897bv64) == 0bv8); free requires (memory_load8_le(mem, 1898bv64) == 2bv8); free requires (memory_load8_le(mem, 1899bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 80bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 0bv8); - free requires (memory_load8_le(mem, 69025bv64) == 7bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 0bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1536bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); ensures (memory_load32_le(mem, $y_addr) == 1bv32); free ensures (memory_load8_le(mem, 1896bv64) == 1bv8); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var x_old: bv32; lmain: @@ -197,3 +111,4 @@ procedure main() assume {:captureState "%000001bd"} true; return; } + diff --git a/src/test/correct/no_interference_update_y/gcc_no_plt_no_pic/no_interference_update_y.expected b/src/test/correct/no_interference_update_y/gcc_no_plt_no_pic/no_interference_update_y.expected index 658b4eb22..82e4dc546 100644 --- a/src/test/correct/no_interference_update_y/gcc_no_plt_no_pic/no_interference_update_y.expected +++ b/src/test/correct/no_interference_update_y/gcc_no_plt_no_pic/no_interference_update_y.expected @@ -21,6 +21,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -37,149 +41,59 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1857bv64) == 0bv8); free ensures (memory_load8_le(mem, 1858bv64) == 2bv8); free ensures (memory_load8_le(mem, 1859bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $y_addr) == old(memory_load32_le(mem, $y_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $y_addr) == memory_load32_le(mem, $y_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1856bv64) == 1bv8); free requires (memory_load8_le(mem, 1857bv64) == 0bv8); free requires (memory_load8_le(mem, 1858bv64) == 2bv8); free requires (memory_load8_le(mem, 1859bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); ensures (memory_load32_le(mem, $y_addr) == 1bv32); free ensures (memory_load8_le(mem, 1856bv64) == 1bv8); free ensures (memory_load8_le(mem, 1857bv64) == 0bv8); free ensures (memory_load8_le(mem, 1858bv64) == 2bv8); free ensures (memory_load8_le(mem, 1859bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var x_old: bv32; lmain: @@ -196,3 +110,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/no_interference_update_y/gcc_pic/no_interference_update_y.expected b/src/test/correct/no_interference_update_y/gcc_pic/no_interference_update_y.expected index 0cd4b1423..d4e29c9a8 100644 --- a/src/test/correct/no_interference_update_y/gcc_pic/no_interference_update_y.expected +++ b/src/test/correct/no_interference_update_y/gcc_pic/no_interference_update_y.expected @@ -45,173 +45,62 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1921bv64) == 0bv8); free ensures (memory_load8_le(mem, 1922bv64) == 2bv8); free ensures (memory_load8_le(mem, 1923bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69608bv64) == 24bv8); - free ensures (memory_load8_le(mem, 69609bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69610bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69611bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69612bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69613bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69614bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69615bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69608bv64) == 69656bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1872bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $y_addr) == old(memory_load32_le(mem, $y_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $y_addr) == memory_load32_le(mem, $y_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1920bv64) == 1bv8); free requires (memory_load8_le(mem, 1921bv64) == 0bv8); free requires (memory_load8_le(mem, 1922bv64) == 2bv8); free requires (memory_load8_le(mem, 1923bv64) == 0bv8); - free requires (memory_load8_le(mem, 69608bv64) == 24bv8); - free requires (memory_load8_le(mem, 69609bv64) == 16bv8); - free requires (memory_load8_le(mem, 69610bv64) == 1bv8); - free requires (memory_load8_le(mem, 69611bv64) == 0bv8); - free requires (memory_load8_le(mem, 69612bv64) == 0bv8); - free requires (memory_load8_le(mem, 69613bv64) == 0bv8); - free requires (memory_load8_le(mem, 69614bv64) == 0bv8); - free requires (memory_load8_le(mem, 69615bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 84bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 0bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 80bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); + free requires (memory_load64_le(mem, 69608bv64) == 69656bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69016bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69008bv64) == 1872bv64); ensures (memory_load32_le(mem, $y_addr) == 1bv32); free ensures (memory_load8_le(mem, 1920bv64) == 1bv8); free ensures (memory_load8_le(mem, 1921bv64) == 0bv8); free ensures (memory_load8_le(mem, 1922bv64) == 2bv8); free ensures (memory_load8_le(mem, 1923bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69608bv64) == 24bv8); - free ensures (memory_load8_le(mem, 69609bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69610bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69611bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69612bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69613bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69614bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69615bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69608bv64) == 69656bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1872bv64); + +implementation main() { var x_old: bv32; lmain: @@ -229,3 +118,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/secret_write/clang/secret_write.expected b/src/test/correct/secret_write/clang/secret_write.expected index 731e47319..42fcdbd2f 100644 --- a/src/test/correct/secret_write/clang/secret_write.expected +++ b/src/test/correct/secret_write/clang/secret_write.expected @@ -34,6 +34,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -52,154 +56,64 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1893bv64) == 0bv8); free ensures (memory_load8_le(mem, 1894bv64) == 2bv8); free ensures (memory_load8_le(mem, 1895bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $z_addr) == old(memory_load32_le(mem, $z_addr))); ensures (old(gamma_load32(Gamma_mem, $x_addr)) ==> gamma_load32(Gamma_mem, $x_addr)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)); assert (gamma_load32(Gamma_mem, $x_addr) ==> gamma_load32(Gamma_mem, $x_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert bvsge32(memory_load32_le(mem, $z_addr), memory_load32_le(mem, $z_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R10, Gamma_R8, Gamma_R9, Gamma_mem, R0, R10, R8, R9, mem; requires (gamma_load32(Gamma_mem, $x_addr) == true); requires (gamma_load32(Gamma_mem, $z_addr) == true); requires (gamma_load32(Gamma_mem, $secret_addr) == false); requires (memory_load32_le(mem, $z_addr) == 0bv32); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1892bv64) == 1bv8); free requires (memory_load8_le(mem, 1893bv64) == 0bv8); free requires (memory_load8_le(mem, 1894bv64) == 2bv8); free requires (memory_load8_le(mem, 1895bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (memory_load8_le(mem, 1892bv64) == 1bv8); free ensures (memory_load8_le(mem, 1893bv64) == 0bv8); free ensures (memory_load8_le(mem, 1894bv64) == 2bv8); free ensures (memory_load8_le(mem, 1895bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var Gamma_x_old: bool; var z_old: bv32; @@ -259,3 +173,4 @@ procedure main() assume {:captureState "%0000033f"} true; return; } + diff --git a/src/test/correct/secret_write/clang_O2/secret_write.expected b/src/test/correct/secret_write/clang_O2/secret_write.expected index 0adc7d048..1b77f7aa7 100644 --- a/src/test/correct/secret_write/clang_O2/secret_write.expected +++ b/src/test/correct/secret_write/clang_O2/secret_write.expected @@ -33,6 +33,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -50,154 +54,64 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1861bv64) == 0bv8); free ensures (memory_load8_le(mem, 1862bv64) == 2bv8); free ensures (memory_load8_le(mem, 1863bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $z_addr) == old(memory_load32_le(mem, $z_addr))); ensures (old(gamma_load32(Gamma_mem, $x_addr)) ==> gamma_load32(Gamma_mem, $x_addr)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)); assert (gamma_load32(Gamma_mem, $x_addr) ==> gamma_load32(Gamma_mem, $x_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert bvsge32(memory_load32_le(mem, $z_addr), memory_load32_le(mem, $z_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R10, Gamma_R8, Gamma_R9, Gamma_mem, R0, R10, R8, R9, mem; requires (gamma_load32(Gamma_mem, $x_addr) == true); requires (gamma_load32(Gamma_mem, $z_addr) == true); requires (gamma_load32(Gamma_mem, $secret_addr) == false); requires (memory_load32_le(mem, $z_addr) == 0bv32); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1860bv64) == 1bv8); free requires (memory_load8_le(mem, 1861bv64) == 0bv8); free requires (memory_load8_le(mem, 1862bv64) == 2bv8); free requires (memory_load8_le(mem, 1863bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (memory_load8_le(mem, 1860bv64) == 1bv8); free ensures (memory_load8_le(mem, 1861bv64) == 0bv8); free ensures (memory_load8_le(mem, 1862bv64) == 2bv8); free ensures (memory_load8_le(mem, 1863bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var Gamma_x_old: bool; var z_old: bv32; @@ -225,3 +139,4 @@ procedure main() assume {:captureState "%000002e7"} true; return; } + diff --git a/src/test/correct/secret_write/clang_no_plt_no_pic/secret_write.expected b/src/test/correct/secret_write/clang_no_plt_no_pic/secret_write.expected index 2e4c0f4d2..524b7b30d 100644 --- a/src/test/correct/secret_write/clang_no_plt_no_pic/secret_write.expected +++ b/src/test/correct/secret_write/clang_no_plt_no_pic/secret_write.expected @@ -34,6 +34,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -52,154 +56,64 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1893bv64) == 0bv8); free ensures (memory_load8_le(mem, 1894bv64) == 2bv8); free ensures (memory_load8_le(mem, 1895bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $z_addr) == old(memory_load32_le(mem, $z_addr))); ensures (old(gamma_load32(Gamma_mem, $x_addr)) ==> gamma_load32(Gamma_mem, $x_addr)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)); assert (gamma_load32(Gamma_mem, $x_addr) ==> gamma_load32(Gamma_mem, $x_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert bvsge32(memory_load32_le(mem, $z_addr), memory_load32_le(mem, $z_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R10, Gamma_R8, Gamma_R9, Gamma_mem, R0, R10, R8, R9, mem; requires (gamma_load32(Gamma_mem, $x_addr) == true); requires (gamma_load32(Gamma_mem, $z_addr) == true); requires (gamma_load32(Gamma_mem, $secret_addr) == false); requires (memory_load32_le(mem, $z_addr) == 0bv32); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1892bv64) == 1bv8); free requires (memory_load8_le(mem, 1893bv64) == 0bv8); free requires (memory_load8_le(mem, 1894bv64) == 2bv8); free requires (memory_load8_le(mem, 1895bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (memory_load8_le(mem, 1892bv64) == 1bv8); free ensures (memory_load8_le(mem, 1893bv64) == 0bv8); free ensures (memory_load8_le(mem, 1894bv64) == 2bv8); free ensures (memory_load8_le(mem, 1895bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var Gamma_x_old: bool; var z_old: bv32; @@ -259,3 +173,4 @@ procedure main() assume {:captureState "%00000936"} true; return; } + diff --git a/src/test/correct/secret_write/clang_pic/secret_write.expected b/src/test/correct/secret_write/clang_pic/secret_write.expected index 53c9b519b..6558e00dd 100644 --- a/src/test/correct/secret_write/clang_pic/secret_write.expected +++ b/src/test/correct/secret_write/clang_pic/secret_write.expected @@ -60,226 +60,73 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1969bv64) == 0bv8); free ensures (memory_load8_le(mem, 1970bv64) == 2bv8); free ensures (memory_load8_le(mem, 1971bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69584bv64) == 56bv8); - free ensures (memory_load8_le(mem, 69585bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69586bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69587bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69588bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69589bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69590bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69591bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69048bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69049bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69050bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69051bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69052bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69053bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69054bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69055bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69040bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69041bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69042bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69043bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69044bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69045bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69046bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69047bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69568bv64) == 60bv8); - free ensures (memory_load8_le(mem, 69569bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69570bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69571bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69572bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69573bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69574bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69575bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69560bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69561bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69562bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69563bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69564bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69565bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69566bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69567bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69584bv64) == 69688bv64); + free ensures (memory_load64_le(mem, 69048bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69040bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69568bv64) == 69692bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69560bv64) == 69684bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $z_addr) == old(memory_load32_le(mem, $z_addr))); ensures (old(gamma_load32(Gamma_mem, $x_addr)) ==> gamma_load32(Gamma_mem, $x_addr)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)); assert (gamma_load32(Gamma_mem, $x_addr) ==> gamma_load32(Gamma_mem, $x_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert bvsge32(memory_load32_le(mem, $z_addr), memory_load32_le(mem, $z_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R10, Gamma_R8, Gamma_R9, Gamma_mem, R0, R10, R8, R9, mem; requires (gamma_load32(Gamma_mem, $x_addr) == true); requires (gamma_load32(Gamma_mem, $z_addr) == true); requires (gamma_load32(Gamma_mem, $secret_addr) == false); requires (memory_load32_le(mem, $z_addr) == 0bv32); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1968bv64) == 1bv8); free requires (memory_load8_le(mem, 1969bv64) == 0bv8); free requires (memory_load8_le(mem, 1970bv64) == 2bv8); free requires (memory_load8_le(mem, 1971bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); - free requires (memory_load8_le(mem, 69584bv64) == 56bv8); - free requires (memory_load8_le(mem, 69585bv64) == 16bv8); - free requires (memory_load8_le(mem, 69586bv64) == 1bv8); - free requires (memory_load8_le(mem, 69587bv64) == 0bv8); - free requires (memory_load8_le(mem, 69588bv64) == 0bv8); - free requires (memory_load8_le(mem, 69589bv64) == 0bv8); - free requires (memory_load8_le(mem, 69590bv64) == 0bv8); - free requires (memory_load8_le(mem, 69591bv64) == 0bv8); - free requires (memory_load8_le(mem, 69048bv64) == 0bv8); - free requires (memory_load8_le(mem, 69049bv64) == 7bv8); - free requires (memory_load8_le(mem, 69050bv64) == 0bv8); - free requires (memory_load8_le(mem, 69051bv64) == 0bv8); - free requires (memory_load8_le(mem, 69052bv64) == 0bv8); - free requires (memory_load8_le(mem, 69053bv64) == 0bv8); - free requires (memory_load8_le(mem, 69054bv64) == 0bv8); - free requires (memory_load8_le(mem, 69055bv64) == 0bv8); - free requires (memory_load8_le(mem, 69040bv64) == 80bv8); - free requires (memory_load8_le(mem, 69041bv64) == 7bv8); - free requires (memory_load8_le(mem, 69042bv64) == 0bv8); - free requires (memory_load8_le(mem, 69043bv64) == 0bv8); - free requires (memory_load8_le(mem, 69044bv64) == 0bv8); - free requires (memory_load8_le(mem, 69045bv64) == 0bv8); - free requires (memory_load8_le(mem, 69046bv64) == 0bv8); - free requires (memory_load8_le(mem, 69047bv64) == 0bv8); - free requires (memory_load8_le(mem, 69568bv64) == 60bv8); - free requires (memory_load8_le(mem, 69569bv64) == 16bv8); - free requires (memory_load8_le(mem, 69570bv64) == 1bv8); - free requires (memory_load8_le(mem, 69571bv64) == 0bv8); - free requires (memory_load8_le(mem, 69572bv64) == 0bv8); - free requires (memory_load8_le(mem, 69573bv64) == 0bv8); - free requires (memory_load8_le(mem, 69574bv64) == 0bv8); - free requires (memory_load8_le(mem, 69575bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 84bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69560bv64) == 52bv8); - free requires (memory_load8_le(mem, 69561bv64) == 16bv8); - free requires (memory_load8_le(mem, 69562bv64) == 1bv8); - free requires (memory_load8_le(mem, 69563bv64) == 0bv8); - free requires (memory_load8_le(mem, 69564bv64) == 0bv8); - free requires (memory_load8_le(mem, 69565bv64) == 0bv8); - free requires (memory_load8_le(mem, 69566bv64) == 0bv8); - free requires (memory_load8_le(mem, 69567bv64) == 0bv8); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); + free requires (memory_load64_le(mem, 69584bv64) == 69688bv64); + free requires (memory_load64_le(mem, 69048bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69040bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69568bv64) == 69692bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69560bv64) == 69684bv64); free ensures (memory_load8_le(mem, 1968bv64) == 1bv8); free ensures (memory_load8_le(mem, 1969bv64) == 0bv8); free ensures (memory_load8_le(mem, 1970bv64) == 2bv8); free ensures (memory_load8_le(mem, 1971bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69584bv64) == 56bv8); - free ensures (memory_load8_le(mem, 69585bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69586bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69587bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69588bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69589bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69590bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69591bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69048bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69049bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69050bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69051bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69052bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69053bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69054bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69055bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69040bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69041bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69042bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69043bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69044bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69045bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69046bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69047bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69568bv64) == 60bv8); - free ensures (memory_load8_le(mem, 69569bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69570bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69571bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69572bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69573bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69574bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69575bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69560bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69561bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69562bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69563bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69564bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69565bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69566bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69567bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69584bv64) == 69688bv64); + free ensures (memory_load64_le(mem, 69048bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69040bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69568bv64) == 69692bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69560bv64) == 69684bv64); + +implementation main() { var Gamma_x_old: bool; var z_old: bv32; @@ -345,3 +192,4 @@ procedure main() assume {:captureState "%00000360"} true; return; } + diff --git a/src/test/correct/secret_write/gcc/secret_write.expected b/src/test/correct/secret_write/gcc/secret_write.expected index fbb8b7faf..829ea2006 100644 --- a/src/test/correct/secret_write/gcc/secret_write.expected +++ b/src/test/correct/secret_write/gcc/secret_write.expected @@ -30,6 +30,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -48,154 +52,64 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1945bv64) == 0bv8); free ensures (memory_load8_le(mem, 1946bv64) == 2bv8); free ensures (memory_load8_le(mem, 1947bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $z_addr) == old(memory_load32_le(mem, $z_addr))); ensures (old(gamma_load32(Gamma_mem, $x_addr)) ==> gamma_load32(Gamma_mem, $x_addr)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)); assert (gamma_load32(Gamma_mem, $x_addr) ==> gamma_load32(Gamma_mem, $x_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert bvsge32(memory_load32_le(mem, $z_addr), memory_load32_le(mem, $z_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; requires (gamma_load32(Gamma_mem, $x_addr) == true); requires (gamma_load32(Gamma_mem, $z_addr) == true); requires (gamma_load32(Gamma_mem, $secret_addr) == false); requires (memory_load32_le(mem, $z_addr) == 0bv32); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1944bv64) == 1bv8); free requires (memory_load8_le(mem, 1945bv64) == 0bv8); free requires (memory_load8_le(mem, 1946bv64) == 2bv8); free requires (memory_load8_le(mem, 1947bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1944bv64) == 1bv8); free ensures (memory_load8_le(mem, 1945bv64) == 0bv8); free ensures (memory_load8_le(mem, 1946bv64) == 2bv8); free ensures (memory_load8_le(mem, 1947bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var Gamma_x_old: bool; var z_old: bv32; @@ -268,3 +182,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/secret_write/gcc_O2/secret_write.expected b/src/test/correct/secret_write/gcc_O2/secret_write.expected index 393a51bf6..79f363dce 100644 --- a/src/test/correct/secret_write/gcc_O2/secret_write.expected +++ b/src/test/correct/secret_write/gcc_O2/secret_write.expected @@ -33,6 +33,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -50,154 +54,64 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $z_addr) == old(memory_load32_le(mem, $z_addr))); ensures (old(gamma_load32(Gamma_mem, $x_addr)) ==> gamma_load32(Gamma_mem, $x_addr)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)); assert (gamma_load32(Gamma_mem, $x_addr) ==> gamma_load32(Gamma_mem, $x_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert bvsge32(memory_load32_le(mem, $z_addr), memory_load32_le(mem, $z_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R2, Gamma_R3, Gamma_mem, R0, R1, R2, R3, mem; requires (gamma_load32(Gamma_mem, $x_addr) == true); requires (gamma_load32(Gamma_mem, $z_addr) == true); requires (gamma_load32(Gamma_mem, $secret_addr) == false); requires (memory_load32_le(mem, $z_addr) == 0bv32); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1896bv64) == 1bv8); free requires (memory_load8_le(mem, 1897bv64) == 0bv8); free requires (memory_load8_le(mem, 1898bv64) == 2bv8); free requires (memory_load8_le(mem, 1899bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 80bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 0bv8); - free requires (memory_load8_le(mem, 69025bv64) == 7bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 0bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1536bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1896bv64) == 1bv8); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var Gamma_x_old: bool; var z_old: bv32; @@ -225,3 +139,4 @@ procedure main() assume {:captureState "%000001ca"} true; return; } + diff --git a/src/test/correct/secret_write/gcc_no_plt_no_pic/secret_write.expected b/src/test/correct/secret_write/gcc_no_plt_no_pic/secret_write.expected index 9d6a27f3f..102265249 100644 --- a/src/test/correct/secret_write/gcc_no_plt_no_pic/secret_write.expected +++ b/src/test/correct/secret_write/gcc_no_plt_no_pic/secret_write.expected @@ -30,6 +30,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -48,154 +52,64 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1945bv64) == 0bv8); free ensures (memory_load8_le(mem, 1946bv64) == 2bv8); free ensures (memory_load8_le(mem, 1947bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $z_addr) == old(memory_load32_le(mem, $z_addr))); ensures (old(gamma_load32(Gamma_mem, $x_addr)) ==> gamma_load32(Gamma_mem, $x_addr)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)); assert (gamma_load32(Gamma_mem, $x_addr) ==> gamma_load32(Gamma_mem, $x_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert bvsge32(memory_load32_le(mem, $z_addr), memory_load32_le(mem, $z_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; requires (gamma_load32(Gamma_mem, $x_addr) == true); requires (gamma_load32(Gamma_mem, $z_addr) == true); requires (gamma_load32(Gamma_mem, $secret_addr) == false); requires (memory_load32_le(mem, $z_addr) == 0bv32); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1944bv64) == 1bv8); free requires (memory_load8_le(mem, 1945bv64) == 0bv8); free requires (memory_load8_le(mem, 1946bv64) == 2bv8); free requires (memory_load8_le(mem, 1947bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1944bv64) == 1bv8); free ensures (memory_load8_le(mem, 1945bv64) == 0bv8); free ensures (memory_load8_le(mem, 1946bv64) == 2bv8); free ensures (memory_load8_le(mem, 1947bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var Gamma_x_old: bool; var z_old: bv32; @@ -268,3 +182,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/secret_write/gcc_pic/secret_write.expected b/src/test/correct/secret_write/gcc_pic/secret_write.expected index 2275cb362..2c42ee32d 100644 --- a/src/test/correct/secret_write/gcc_pic/secret_write.expected +++ b/src/test/correct/secret_write/gcc_pic/secret_write.expected @@ -56,226 +56,73 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 2009bv64) == 0bv8); free ensures (memory_load8_le(mem, 2010bv64) == 2bv8); free ensures (memory_load8_le(mem, 2011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69608bv64) == 28bv8); - free ensures (memory_load8_le(mem, 69609bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69610bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69611bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69612bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69613bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69614bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69615bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69584bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69585bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69586bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69587bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69588bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69589bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69590bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69591bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 24bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 80bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 7bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69608bv64) == 69660bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69584bv64) == 69652bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 69656bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 68992bv64) == 1872bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $z_addr) == old(memory_load32_le(mem, $z_addr))); ensures (old(gamma_load32(Gamma_mem, $x_addr)) ==> gamma_load32(Gamma_mem, $x_addr)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr)); assert (gamma_load32(Gamma_mem, $x_addr) ==> gamma_load32(Gamma_mem, $x_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert bvsge32(memory_load32_le(mem, $z_addr), memory_load32_le(mem, $z_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; requires (gamma_load32(Gamma_mem, $x_addr) == true); requires (gamma_load32(Gamma_mem, $z_addr) == true); requires (gamma_load32(Gamma_mem, $secret_addr) == false); requires (memory_load32_le(mem, $z_addr) == 0bv32); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 2008bv64) == 1bv8); free requires (memory_load8_le(mem, 2009bv64) == 0bv8); free requires (memory_load8_le(mem, 2010bv64) == 2bv8); free requires (memory_load8_le(mem, 2011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69608bv64) == 28bv8); - free requires (memory_load8_le(mem, 69609bv64) == 16bv8); - free requires (memory_load8_le(mem, 69610bv64) == 1bv8); - free requires (memory_load8_le(mem, 69611bv64) == 0bv8); - free requires (memory_load8_le(mem, 69612bv64) == 0bv8); - free requires (memory_load8_le(mem, 69613bv64) == 0bv8); - free requires (memory_load8_le(mem, 69614bv64) == 0bv8); - free requires (memory_load8_le(mem, 69615bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 84bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69584bv64) == 20bv8); - free requires (memory_load8_le(mem, 69585bv64) == 16bv8); - free requires (memory_load8_le(mem, 69586bv64) == 1bv8); - free requires (memory_load8_le(mem, 69587bv64) == 0bv8); - free requires (memory_load8_le(mem, 69588bv64) == 0bv8); - free requires (memory_load8_le(mem, 69589bv64) == 0bv8); - free requires (memory_load8_le(mem, 69590bv64) == 0bv8); - free requires (memory_load8_le(mem, 69591bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 24bv8); - free requires (memory_load8_le(mem, 69593bv64) == 16bv8); - free requires (memory_load8_le(mem, 69594bv64) == 1bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 0bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 80bv8); - free requires (memory_load8_le(mem, 68993bv64) == 7bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); + free requires (memory_load64_le(mem, 69608bv64) == 69660bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69584bv64) == 69652bv64); + free requires (memory_load64_le(mem, 69592bv64) == 69656bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1792bv64); + free requires (memory_load64_le(mem, 68992bv64) == 1872bv64); free ensures (memory_load8_le(mem, 2008bv64) == 1bv8); free ensures (memory_load8_le(mem, 2009bv64) == 0bv8); free ensures (memory_load8_le(mem, 2010bv64) == 2bv8); free ensures (memory_load8_le(mem, 2011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69608bv64) == 28bv8); - free ensures (memory_load8_le(mem, 69609bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69610bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69611bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69612bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69613bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69614bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69615bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69584bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69585bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69586bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69587bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69588bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69589bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69590bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69591bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 24bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 80bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 7bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69608bv64) == 69660bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69584bv64) == 69652bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 69656bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 68992bv64) == 1872bv64); + +implementation main() { var Gamma_x_old: bool; var z_old: bv32; @@ -356,3 +203,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/simple_jump/clang/simple_jump.expected b/src/test/correct/simple_jump/clang/simple_jump.expected index 8ae879c7e..f03fbfe30 100644 --- a/src/test/correct/simple_jump/clang/simple_jump.expected +++ b/src/test/correct/simple_jump/clang/simple_jump.expected @@ -29,6 +29,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -48,43 +52,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1893bv64) == 0bv8); free ensures (memory_load8_le(mem, 1894bv64) == 2bv8); free ensures (memory_load8_le(mem, 1895bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -95,98 +73,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_stack, R0, R31, R8, stack; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1892bv64) == 1bv8); free requires (memory_load8_le(mem, 1893bv64) == 0bv8); free requires (memory_load8_le(mem, 1894bv64) == 2bv8); free requires (memory_load8_le(mem, 1895bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1892bv64) == 1bv8); free ensures (memory_load8_le(mem, 1893bv64) == 0bv8); free ensures (memory_load8_le(mem, 1894bv64) == 2bv8); free ensures (memory_load8_le(mem, 1895bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -258,3 +168,4 @@ procedure main() assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l0000034b; } + diff --git a/src/test/correct/simple_jump/clang_O2/simple_jump.expected b/src/test/correct/simple_jump/clang_O2/simple_jump.expected index b904c03a5..93df8d220 100644 --- a/src/test/correct/simple_jump/clang_O2/simple_jump.expected +++ b/src/test/correct/simple_jump/clang_O2/simple_jump.expected @@ -4,6 +4,11 @@ var {:extern} R0: bv64; var {:extern} mem: [bv64]bv8; const {:extern} $_IO_stdin_used_addr: bv64; axiom ($_IO_stdin_used_addr == 1840bv64); +function {:extern} {:bvbuiltin "bvadd"} bvadd64(bv64, bv64) returns (bv64); +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -16,43 +21,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1841bv64) == 0bv8); free ensures (memory_load8_le(mem, 1842bv64) == 2bv8); free ensures (memory_load8_le(mem, 1843bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -63,99 +42,32 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, R0; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1840bv64) == 1bv8); free requires (memory_load8_le(mem, 1841bv64) == 0bv8); free requires (memory_load8_le(mem, 1842bv64) == 2bv8); free requires (memory_load8_le(mem, 1843bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (memory_load8_le(mem, 1840bv64) == 1bv8); free ensures (memory_load8_le(mem, 1841bv64) == 0bv8); free ensures (memory_load8_le(mem, 1842bv64) == 2bv8); free ensures (memory_load8_le(mem, 1843bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/simple_jump/clang_no_plt_no_pic/simple_jump.expected b/src/test/correct/simple_jump/clang_no_plt_no_pic/simple_jump.expected index 7d5b217e6..10b0b4c7e 100644 --- a/src/test/correct/simple_jump/clang_no_plt_no_pic/simple_jump.expected +++ b/src/test/correct/simple_jump/clang_no_plt_no_pic/simple_jump.expected @@ -29,6 +29,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -48,43 +52,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1893bv64) == 0bv8); free ensures (memory_load8_le(mem, 1894bv64) == 2bv8); free ensures (memory_load8_le(mem, 1895bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -95,98 +73,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_stack, R0, R31, R8, stack; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1892bv64) == 1bv8); free requires (memory_load8_le(mem, 1893bv64) == 0bv8); free requires (memory_load8_le(mem, 1894bv64) == 2bv8); free requires (memory_load8_le(mem, 1895bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1892bv64) == 1bv8); free ensures (memory_load8_le(mem, 1893bv64) == 0bv8); free ensures (memory_load8_le(mem, 1894bv64) == 2bv8); free ensures (memory_load8_le(mem, 1895bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -258,3 +168,4 @@ procedure main() assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l0000095d; } + diff --git a/src/test/correct/simple_jump/clang_pic/simple_jump.expected b/src/test/correct/simple_jump/clang_pic/simple_jump.expected index 7d5b217e6..10b0b4c7e 100644 --- a/src/test/correct/simple_jump/clang_pic/simple_jump.expected +++ b/src/test/correct/simple_jump/clang_pic/simple_jump.expected @@ -29,6 +29,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -48,43 +52,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1893bv64) == 0bv8); free ensures (memory_load8_le(mem, 1894bv64) == 2bv8); free ensures (memory_load8_le(mem, 1895bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -95,98 +73,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_stack, R0, R31, R8, stack; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1892bv64) == 1bv8); free requires (memory_load8_le(mem, 1893bv64) == 0bv8); free requires (memory_load8_le(mem, 1894bv64) == 2bv8); free requires (memory_load8_le(mem, 1895bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1892bv64) == 1bv8); free ensures (memory_load8_le(mem, 1893bv64) == 0bv8); free ensures (memory_load8_le(mem, 1894bv64) == 2bv8); free ensures (memory_load8_le(mem, 1895bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -258,3 +168,4 @@ procedure main() assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l0000095d; } + diff --git a/src/test/correct/simple_jump/gcc/simple_jump.expected b/src/test/correct/simple_jump/gcc/simple_jump.expected index 90f4f92e4..afb8cef39 100644 --- a/src/test/correct/simple_jump/gcc/simple_jump.expected +++ b/src/test/correct/simple_jump/gcc/simple_jump.expected @@ -27,6 +27,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -46,43 +50,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1877bv64) == 0bv8); free ensures (memory_load8_le(mem, 1878bv64) == 2bv8); free ensures (memory_load8_le(mem, 1879bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -93,98 +71,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_stack, R0, R31, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1876bv64) == 1bv8); free requires (memory_load8_le(mem, 1877bv64) == 0bv8); free requires (memory_load8_le(mem, 1878bv64) == 2bv8); free requires (memory_load8_le(mem, 1879bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1876bv64) == 1bv8); free ensures (memory_load8_le(mem, 1877bv64) == 0bv8); free ensures (memory_load8_le(mem, 1878bv64) == 2bv8); free ensures (memory_load8_le(mem, 1879bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -230,3 +140,4 @@ procedure main() assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l0000031f; } + diff --git a/src/test/correct/simple_jump/gcc_O2/simple_jump.expected b/src/test/correct/simple_jump/gcc_O2/simple_jump.expected index 306991d20..657d807d3 100644 --- a/src/test/correct/simple_jump/gcc_O2/simple_jump.expected +++ b/src/test/correct/simple_jump/gcc_O2/simple_jump.expected @@ -4,6 +4,11 @@ var {:extern} R0: bv64; var {:extern} mem: [bv64]bv8; const {:extern} $_IO_stdin_used_addr: bv64; axiom ($_IO_stdin_used_addr == 1896bv64); +function {:extern} {:bvbuiltin "bvadd"} bvadd64(bv64, bv64) returns (bv64); +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -16,43 +21,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -63,99 +42,32 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, R0; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1896bv64) == 1bv8); free requires (memory_load8_le(mem, 1897bv64) == 0bv8); free requires (memory_load8_le(mem, 1898bv64) == 2bv8); free requires (memory_load8_le(mem, 1899bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 80bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 0bv8); - free requires (memory_load8_le(mem, 69025bv64) == 7bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 0bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1536bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1896bv64) == 1bv8); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/simple_jump/gcc_no_plt_no_pic/simple_jump.expected b/src/test/correct/simple_jump/gcc_no_plt_no_pic/simple_jump.expected index fca2ea8b1..39653851f 100644 --- a/src/test/correct/simple_jump/gcc_no_plt_no_pic/simple_jump.expected +++ b/src/test/correct/simple_jump/gcc_no_plt_no_pic/simple_jump.expected @@ -27,6 +27,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -46,43 +50,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1877bv64) == 0bv8); free ensures (memory_load8_le(mem, 1878bv64) == 2bv8); free ensures (memory_load8_le(mem, 1879bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -93,98 +71,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_stack, R0, R31, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1876bv64) == 1bv8); free requires (memory_load8_le(mem, 1877bv64) == 0bv8); free requires (memory_load8_le(mem, 1878bv64) == 2bv8); free requires (memory_load8_le(mem, 1879bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1876bv64) == 1bv8); free ensures (memory_load8_le(mem, 1877bv64) == 0bv8); free ensures (memory_load8_le(mem, 1878bv64) == 2bv8); free ensures (memory_load8_le(mem, 1879bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -230,3 +140,4 @@ procedure main() assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l000008f6; } + diff --git a/src/test/correct/simple_jump/gcc_pic/simple_jump.expected b/src/test/correct/simple_jump/gcc_pic/simple_jump.expected index fca2ea8b1..39653851f 100644 --- a/src/test/correct/simple_jump/gcc_pic/simple_jump.expected +++ b/src/test/correct/simple_jump/gcc_pic/simple_jump.expected @@ -27,6 +27,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -46,43 +50,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1877bv64) == 0bv8); free ensures (memory_load8_le(mem, 1878bv64) == 2bv8); free ensures (memory_load8_le(mem, 1879bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -93,98 +71,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_stack, R0, R31, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1876bv64) == 1bv8); free requires (memory_load8_le(mem, 1877bv64) == 0bv8); free requires (memory_load8_le(mem, 1878bv64) == 2bv8); free requires (memory_load8_le(mem, 1879bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1876bv64) == 1bv8); free ensures (memory_load8_le(mem, 1877bv64) == 0bv8); free ensures (memory_load8_le(mem, 1878bv64) == 2bv8); free ensures (memory_load8_le(mem, 1879bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -230,3 +140,4 @@ procedure main() assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l000008f6; } + diff --git a/src/test/correct/switch/clang/switch.expected b/src/test/correct/switch/clang/switch.expected index b33b54140..37dffcd06 100644 --- a/src/test/correct/switch/clang/switch.expected +++ b/src/test/correct/switch/clang/switch.expected @@ -27,6 +27,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -46,43 +50,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1937bv64) == 0bv8); free ensures (memory_load8_le(mem, 1938bv64) == 2bv8); free ensures (memory_load8_le(mem, 1939bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -93,98 +71,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R31, Gamma_R8, Gamma_stack, R31, R8, stack; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1936bv64) == 1bv8); free requires (memory_load8_le(mem, 1937bv64) == 0bv8); free requires (memory_load8_le(mem, 1938bv64) == 2bv8); free requires (memory_load8_le(mem, 1939bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1936bv64) == 1bv8); free ensures (memory_load8_le(mem, 1937bv64) == 0bv8); free ensures (memory_load8_le(mem, 1938bv64) == 2bv8); free ensures (memory_load8_le(mem, 1939bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var #4: bv32; var #5: bv32; @@ -313,3 +223,4 @@ procedure main() assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l000003d7; } + diff --git a/src/test/correct/switch/clang_O2/switch.expected b/src/test/correct/switch/clang_O2/switch.expected index ae43ad872..658b3ad9b 100644 --- a/src/test/correct/switch/clang_O2/switch.expected +++ b/src/test/correct/switch/clang_O2/switch.expected @@ -2,6 +2,11 @@ var {:extern} Gamma_mem: [bv64]bool; var {:extern} mem: [bv64]bv8; const {:extern} $_IO_stdin_used_addr: bv64; axiom ($_IO_stdin_used_addr == 1836bv64); +function {:extern} {:bvbuiltin "bvadd"} bvadd64(bv64, bv64) returns (bv64); +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -14,43 +19,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1837bv64) == 0bv8); free ensures (memory_load8_le(mem, 1838bv64) == 2bv8); free ensures (memory_load8_le(mem, 1839bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -61,97 +40,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); +procedure main(); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1836bv64) == 1bv8); free requires (memory_load8_le(mem, 1837bv64) == 0bv8); free requires (memory_load8_le(mem, 1838bv64) == 2bv8); free requires (memory_load8_le(mem, 1839bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (memory_load8_le(mem, 1836bv64) == 1bv8); free ensures (memory_load8_le(mem, 1837bv64) == 0bv8); free ensures (memory_load8_le(mem, 1838bv64) == 2bv8); free ensures (memory_load8_le(mem, 1839bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; return; } + diff --git a/src/test/correct/switch/clang_no_plt_no_pic/switch.expected b/src/test/correct/switch/clang_no_plt_no_pic/switch.expected index 198585344..aaecc750f 100644 --- a/src/test/correct/switch/clang_no_plt_no_pic/switch.expected +++ b/src/test/correct/switch/clang_no_plt_no_pic/switch.expected @@ -27,6 +27,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -46,43 +50,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1937bv64) == 0bv8); free ensures (memory_load8_le(mem, 1938bv64) == 2bv8); free ensures (memory_load8_le(mem, 1939bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -93,98 +71,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R31, Gamma_R8, Gamma_stack, R31, R8, stack; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1936bv64) == 1bv8); free requires (memory_load8_le(mem, 1937bv64) == 0bv8); free requires (memory_load8_le(mem, 1938bv64) == 2bv8); free requires (memory_load8_le(mem, 1939bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1936bv64) == 1bv8); free ensures (memory_load8_le(mem, 1937bv64) == 0bv8); free ensures (memory_load8_le(mem, 1938bv64) == 2bv8); free ensures (memory_load8_le(mem, 1939bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var #4: bv32; var #5: bv32; @@ -313,3 +223,4 @@ procedure main() assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l00000a8c; } + diff --git a/src/test/correct/switch/clang_pic/switch.expected b/src/test/correct/switch/clang_pic/switch.expected index 198585344..aaecc750f 100644 --- a/src/test/correct/switch/clang_pic/switch.expected +++ b/src/test/correct/switch/clang_pic/switch.expected @@ -27,6 +27,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -46,43 +50,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1937bv64) == 0bv8); free ensures (memory_load8_le(mem, 1938bv64) == 2bv8); free ensures (memory_load8_le(mem, 1939bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -93,98 +71,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R31, Gamma_R8, Gamma_stack, R31, R8, stack; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1936bv64) == 1bv8); free requires (memory_load8_le(mem, 1937bv64) == 0bv8); free requires (memory_load8_le(mem, 1938bv64) == 2bv8); free requires (memory_load8_le(mem, 1939bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1936bv64) == 1bv8); free ensures (memory_load8_le(mem, 1937bv64) == 0bv8); free ensures (memory_load8_le(mem, 1938bv64) == 2bv8); free ensures (memory_load8_le(mem, 1939bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var #4: bv32; var #5: bv32; @@ -313,3 +223,4 @@ procedure main() assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l00000a8c; } + diff --git a/src/test/correct/switch/gcc/switch.expected b/src/test/correct/switch/gcc/switch.expected index 355bb8743..d0ab53b49 100644 --- a/src/test/correct/switch/gcc/switch.expected +++ b/src/test/correct/switch/gcc/switch.expected @@ -27,6 +27,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -46,43 +50,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1917bv64) == 0bv8); free ensures (memory_load8_le(mem, 1918bv64) == 2bv8); free ensures (memory_load8_le(mem, 1919bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -93,98 +71,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_stack, R0, R31, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1916bv64) == 1bv8); free requires (memory_load8_le(mem, 1917bv64) == 0bv8); free requires (memory_load8_le(mem, 1918bv64) == 2bv8); free requires (memory_load8_le(mem, 1919bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1916bv64) == 1bv8); free ensures (memory_load8_le(mem, 1917bv64) == 0bv8); free ensures (memory_load8_le(mem, 1918bv64) == 2bv8); free ensures (memory_load8_le(mem, 1919bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv32; var #5: bv32; @@ -263,3 +173,4 @@ procedure main() assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l00000391; } + diff --git a/src/test/correct/switch/gcc_O2/switch.expected b/src/test/correct/switch/gcc_O2/switch.expected index f96261171..628d250a1 100644 --- a/src/test/correct/switch/gcc_O2/switch.expected +++ b/src/test/correct/switch/gcc_O2/switch.expected @@ -2,6 +2,11 @@ var {:extern} Gamma_mem: [bv64]bool; var {:extern} mem: [bv64]bv8; const {:extern} $_IO_stdin_used_addr: bv64; axiom ($_IO_stdin_used_addr == 1896bv64); +function {:extern} {:bvbuiltin "bvadd"} bvadd64(bv64, bv64) returns (bv64); +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -14,43 +19,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -61,97 +40,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); +procedure main(); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1896bv64) == 1bv8); free requires (memory_load8_le(mem, 1897bv64) == 0bv8); free requires (memory_load8_le(mem, 1898bv64) == 2bv8); free requires (memory_load8_le(mem, 1899bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 80bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 0bv8); - free requires (memory_load8_le(mem, 69025bv64) == 7bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 0bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1536bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1896bv64) == 1bv8); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; return; } + diff --git a/src/test/correct/switch/gcc_no_plt_no_pic/switch.expected b/src/test/correct/switch/gcc_no_plt_no_pic/switch.expected index 6e21b2c50..e9ad9301f 100644 --- a/src/test/correct/switch/gcc_no_plt_no_pic/switch.expected +++ b/src/test/correct/switch/gcc_no_plt_no_pic/switch.expected @@ -27,6 +27,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -46,43 +50,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1917bv64) == 0bv8); free ensures (memory_load8_le(mem, 1918bv64) == 2bv8); free ensures (memory_load8_le(mem, 1919bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -93,98 +71,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_stack, R0, R31, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1916bv64) == 1bv8); free requires (memory_load8_le(mem, 1917bv64) == 0bv8); free requires (memory_load8_le(mem, 1918bv64) == 2bv8); free requires (memory_load8_le(mem, 1919bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1916bv64) == 1bv8); free ensures (memory_load8_le(mem, 1917bv64) == 0bv8); free ensures (memory_load8_le(mem, 1918bv64) == 2bv8); free ensures (memory_load8_le(mem, 1919bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv32; var #5: bv32; @@ -263,3 +173,4 @@ procedure main() assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l000009f0; } + diff --git a/src/test/correct/switch/gcc_pic/switch.expected b/src/test/correct/switch/gcc_pic/switch.expected index 6e21b2c50..e9ad9301f 100644 --- a/src/test/correct/switch/gcc_pic/switch.expected +++ b/src/test/correct/switch/gcc_pic/switch.expected @@ -27,6 +27,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -46,43 +50,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1917bv64) == 0bv8); free ensures (memory_load8_le(mem, 1918bv64) == 2bv8); free ensures (memory_load8_le(mem, 1919bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -93,98 +71,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_stack, R0, R31, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1916bv64) == 1bv8); free requires (memory_load8_le(mem, 1917bv64) == 0bv8); free requires (memory_load8_le(mem, 1918bv64) == 2bv8); free requires (memory_load8_le(mem, 1919bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1916bv64) == 1bv8); free ensures (memory_load8_le(mem, 1917bv64) == 0bv8); free ensures (memory_load8_le(mem, 1918bv64) == 2bv8); free ensures (memory_load8_le(mem, 1919bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv32; var #5: bv32; @@ -263,3 +173,4 @@ procedure main() assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l000009f0; } + diff --git a/src/test/correct/switch2/clang_O2/switch2.expected b/src/test/correct/switch2/clang_O2/switch2.expected index 9083f1e41..03b9b58a2 100644 --- a/src/test/correct/switch2/clang_O2/switch2.expected +++ b/src/test/correct/switch2/clang_O2/switch2.expected @@ -1,6 +1,11 @@ var {:extern} Gamma_R0: bool; var {:extern} Gamma_mem: [bv64]bool; var {:extern} mem: [bv64]bv8; +function {:extern} {:bvbuiltin "bvadd"} bvadd64(bv64, bv64) returns (bv64); +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -13,43 +18,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1845bv64) == 0bv8); free ensures (memory_load8_le(mem, 1846bv64) == 2bv8); free ensures (memory_load8_le(mem, 1847bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 28bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1820bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -60,98 +39,31 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); requires (Gamma_R0 == true); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1844bv64) == 1bv8); free requires (memory_load8_le(mem, 1845bv64) == 0bv8); free requires (memory_load8_le(mem, 1846bv64) == 2bv8); free requires (memory_load8_le(mem, 1847bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 28bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1820bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (memory_load8_le(mem, 1844bv64) == 1bv8); free ensures (memory_load8_le(mem, 1845bv64) == 0bv8); free ensures (memory_load8_le(mem, 1846bv64) == 2bv8); free ensures (memory_load8_le(mem, 1847bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 28bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1820bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; return; } + diff --git a/src/test/correct/switch2/gcc/switch2.expected b/src/test/correct/switch2/gcc/switch2.expected index 317bf93c9..4fe6e5b69 100644 --- a/src/test/correct/switch2/gcc/switch2.expected +++ b/src/test/correct/switch2/gcc/switch2.expected @@ -67,43 +67,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 2033bv64) == 0bv8); free ensures (memory_load8_le(mem, 2034bv64) == 2bv8); free ensures (memory_load8_le(mem, 2035bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 28bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1820bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -114,61 +88,19 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_stack, R0, R29, R30, R31, stack; requires (Gamma_R0 == true); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 2032bv64) == 1bv8); free requires (memory_load8_le(mem, 2033bv64) == 0bv8); free requires (memory_load8_le(mem, 2034bv64) == 2bv8); free requires (memory_load8_le(mem, 2035bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 28bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1820bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -177,38 +109,12 @@ procedure main() free ensures (memory_load8_le(mem, 2033bv64) == 0bv8); free ensures (memory_load8_le(mem, 2034bv64) == 2bv8); free ensures (memory_load8_le(mem, 2035bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 28bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1820bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #10: bv32; var #11: bv32; @@ -444,83 +350,30 @@ procedure main() goto l00000556; } -procedure r() +procedure r(); modifies Gamma_R0, R0; free requires (memory_load8_le(mem, 2032bv64) == 1bv8); free requires (memory_load8_le(mem, 2033bv64) == 0bv8); free requires (memory_load8_le(mem, 2034bv64) == 2bv8); free requires (memory_load8_le(mem, 2035bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 28bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1820bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2032bv64) == 1bv8); free ensures (memory_load8_le(mem, 2033bv64) == 0bv8); free ensures (memory_load8_le(mem, 2034bv64) == 2bv8); free ensures (memory_load8_le(mem, 2035bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 28bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1820bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation r() { lr: assume {:captureState "lr"} true; R0, Gamma_R0 := 1bv64, true; return; } + diff --git a/src/test/correct/switch2/gcc_O2/switch2.expected b/src/test/correct/switch2/gcc_O2/switch2.expected index 8dd64e5d7..d51a51b6c 100644 --- a/src/test/correct/switch2/gcc_O2/switch2.expected +++ b/src/test/correct/switch2/gcc_O2/switch2.expected @@ -1,6 +1,11 @@ var {:extern} Gamma_R0: bool; var {:extern} Gamma_mem: [bv64]bool; var {:extern} mem: [bv64]bv8; +function {:extern} {:bvbuiltin "bvadd"} bvadd64(bv64, bv64) returns (bv64); +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -13,43 +18,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1917bv64) == 0bv8); free ensures (memory_load8_le(mem, 1918bv64) == 2bv8); free ensures (memory_load8_le(mem, 1919bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -60,98 +39,31 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); requires (Gamma_R0 == true); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1916bv64) == 1bv8); free requires (memory_load8_le(mem, 1917bv64) == 0bv8); free requires (memory_load8_le(mem, 1918bv64) == 2bv8); free requires (memory_load8_le(mem, 1919bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 80bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 0bv8); - free requires (memory_load8_le(mem, 69025bv64) == 7bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 0bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1536bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1916bv64) == 1bv8); free ensures (memory_load8_le(mem, 1917bv64) == 0bv8); free ensures (memory_load8_le(mem, 1918bv64) == 2bv8); free ensures (memory_load8_le(mem, 1919bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; return; } + diff --git a/src/test/correct/switch2/gcc_no_plt_no_pic/switch2.expected b/src/test/correct/switch2/gcc_no_plt_no_pic/switch2.expected index 6f0e32d47..11744cb51 100644 --- a/src/test/correct/switch2/gcc_no_plt_no_pic/switch2.expected +++ b/src/test/correct/switch2/gcc_no_plt_no_pic/switch2.expected @@ -67,43 +67,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 2033bv64) == 0bv8); free ensures (memory_load8_le(mem, 2034bv64) == 2bv8); free ensures (memory_load8_le(mem, 2035bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 28bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1820bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -114,61 +88,19 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_stack, R0, R29, R30, R31, stack; requires (Gamma_R0 == true); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 2032bv64) == 1bv8); free requires (memory_load8_le(mem, 2033bv64) == 0bv8); free requires (memory_load8_le(mem, 2034bv64) == 2bv8); free requires (memory_load8_le(mem, 2035bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 28bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1820bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -177,38 +109,12 @@ procedure main() free ensures (memory_load8_le(mem, 2033bv64) == 0bv8); free ensures (memory_load8_le(mem, 2034bv64) == 2bv8); free ensures (memory_load8_le(mem, 2035bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 28bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1820bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #10: bv32; var #11: bv32; @@ -444,83 +350,30 @@ procedure main() goto l00000db5; } -procedure r() +procedure r(); modifies Gamma_R0, R0; free requires (memory_load8_le(mem, 2032bv64) == 1bv8); free requires (memory_load8_le(mem, 2033bv64) == 0bv8); free requires (memory_load8_le(mem, 2034bv64) == 2bv8); free requires (memory_load8_le(mem, 2035bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 28bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1820bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2032bv64) == 1bv8); free ensures (memory_load8_le(mem, 2033bv64) == 0bv8); free ensures (memory_load8_le(mem, 2034bv64) == 2bv8); free ensures (memory_load8_le(mem, 2035bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 28bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1820bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation r() { lr: assume {:captureState "lr"} true; R0, Gamma_R0 := 1bv64, true; return; } + diff --git a/src/test/correct/switch2/gcc_pic/switch2.expected b/src/test/correct/switch2/gcc_pic/switch2.expected index 6f0e32d47..11744cb51 100644 --- a/src/test/correct/switch2/gcc_pic/switch2.expected +++ b/src/test/correct/switch2/gcc_pic/switch2.expected @@ -67,43 +67,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 2033bv64) == 0bv8); free ensures (memory_load8_le(mem, 2034bv64) == 2bv8); free ensures (memory_load8_le(mem, 2035bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 28bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1820bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -114,61 +88,19 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_stack, R0, R29, R30, R31, stack; requires (Gamma_R0 == true); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 2032bv64) == 1bv8); free requires (memory_load8_le(mem, 2033bv64) == 0bv8); free requires (memory_load8_le(mem, 2034bv64) == 2bv8); free requires (memory_load8_le(mem, 2035bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 28bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1820bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -177,38 +109,12 @@ procedure main() free ensures (memory_load8_le(mem, 2033bv64) == 0bv8); free ensures (memory_load8_le(mem, 2034bv64) == 2bv8); free ensures (memory_load8_le(mem, 2035bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 28bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1820bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #10: bv32; var #11: bv32; @@ -444,83 +350,30 @@ procedure main() goto l00000db5; } -procedure r() +procedure r(); modifies Gamma_R0, R0; free requires (memory_load8_le(mem, 2032bv64) == 1bv8); free requires (memory_load8_le(mem, 2033bv64) == 0bv8); free requires (memory_load8_le(mem, 2034bv64) == 2bv8); free requires (memory_load8_le(mem, 2035bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 28bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1820bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 2032bv64) == 1bv8); free ensures (memory_load8_le(mem, 2033bv64) == 0bv8); free ensures (memory_load8_le(mem, 2034bv64) == 2bv8); free ensures (memory_load8_le(mem, 2035bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 28bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1820bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation r() { lr: assume {:captureState "lr"} true; R0, Gamma_R0 := 1bv64, true; return; } + diff --git a/src/test/correct/syscall/clang/syscall.expected b/src/test/correct/syscall/clang/syscall.expected index 5c23cb30f..0175f2f8e 100644 --- a/src/test/correct/syscall/clang/syscall.expected +++ b/src/test/correct/syscall/clang/syscall.expected @@ -64,43 +64,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1945bv64) == 0bv8); free ensures (memory_load8_le(mem, 1946bv64) == 2bv8); free ensures (memory_load8_le(mem, 1947bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69680bv64) == 48bv8); - free ensures (memory_load8_le(mem, 69681bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69682bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69683bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69684bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69685bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69686bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69687bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69680bv64) == 69680bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -117,129 +91,31 @@ procedure fork(); free requires (memory_load8_le(mem, 1945bv64) == 0bv8); free requires (memory_load8_le(mem, 1946bv64) == 2bv8); free requires (memory_load8_le(mem, 1947bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 80bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 0bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 84bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69680bv64) == 48bv8); - free requires (memory_load8_le(mem, 69681bv64) == 16bv8); - free requires (memory_load8_le(mem, 69682bv64) == 1bv8); - free requires (memory_load8_le(mem, 69683bv64) == 0bv8); - free requires (memory_load8_le(mem, 69684bv64) == 0bv8); - free requires (memory_load8_le(mem, 69685bv64) == 0bv8); - free requires (memory_load8_le(mem, 69686bv64) == 0bv8); - free requires (memory_load8_le(mem, 69687bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69680bv64) == 69680bv64); free ensures (memory_load8_le(mem, 1944bv64) == 1bv8); free ensures (memory_load8_le(mem, 1945bv64) == 0bv8); free ensures (memory_load8_le(mem, 1946bv64) == 2bv8); free ensures (memory_load8_le(mem, 1947bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69680bv64) == 48bv8); - free ensures (memory_load8_le(mem, 69681bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69682bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69683bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69684bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69685bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69686bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69687bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69680bv64) == 69680bv64); -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R16, Gamma_R17, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_stack, R0, R16, R17, R29, R30, R31, stack; - free requires (memory_load8_le(mem, 69672bv64) == 0bv8); - free requires (memory_load8_le(mem, 69673bv64) == 0bv8); - free requires (memory_load8_le(mem, 69674bv64) == 0bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); - free requires (memory_load8_le(mem, 69680bv64) == 48bv8); - free requires (memory_load8_le(mem, 69681bv64) == 16bv8); - free requires (memory_load8_le(mem, 69682bv64) == 1bv8); - free requires (memory_load8_le(mem, 69683bv64) == 0bv8); - free requires (memory_load8_le(mem, 69684bv64) == 0bv8); - free requires (memory_load8_le(mem, 69685bv64) == 0bv8); - free requires (memory_load8_le(mem, 69686bv64) == 0bv8); - free requires (memory_load8_le(mem, 69687bv64) == 0bv8); + free requires (memory_load64_le(mem, 69672bv64) == 0bv64); + free requires (memory_load64_le(mem, 69680bv64) == 69680bv64); free requires (memory_load8_le(mem, 1944bv64) == 1bv8); free requires (memory_load8_le(mem, 1945bv64) == 0bv8); free requires (memory_load8_le(mem, 1946bv64) == 2bv8); free requires (memory_load8_le(mem, 1947bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 80bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 0bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 84bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69680bv64) == 48bv8); - free requires (memory_load8_le(mem, 69681bv64) == 16bv8); - free requires (memory_load8_le(mem, 69682bv64) == 1bv8); - free requires (memory_load8_le(mem, 69683bv64) == 0bv8); - free requires (memory_load8_le(mem, 69684bv64) == 0bv8); - free requires (memory_load8_le(mem, 69685bv64) == 0bv8); - free requires (memory_load8_le(mem, 69686bv64) == 0bv8); - free requires (memory_load8_le(mem, 69687bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69680bv64) == 69680bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -248,38 +124,12 @@ procedure main() free ensures (memory_load8_le(mem, 1945bv64) == 0bv8); free ensures (memory_load8_le(mem, 1946bv64) == 2bv8); free ensures (memory_load8_le(mem, 1947bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69680bv64) == 48bv8); - free ensures (memory_load8_le(mem, 69681bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69682bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69683bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69684bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69685bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69686bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69687bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69680bv64) == 69680bv64); + +implementation main() { var #4: bv64; var #5: bv64; @@ -314,3 +164,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 48bv64), Gamma_R31; return; } + diff --git a/src/test/correct/syscall/clang_no_plt_no_pic/syscall.expected b/src/test/correct/syscall/clang_no_plt_no_pic/syscall.expected index d0efb46c8..90781988c 100644 --- a/src/test/correct/syscall/clang_no_plt_no_pic/syscall.expected +++ b/src/test/correct/syscall/clang_no_plt_no_pic/syscall.expected @@ -64,43 +64,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1945bv64) == 0bv8); free ensures (memory_load8_le(mem, 1946bv64) == 2bv8); free ensures (memory_load8_le(mem, 1947bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69680bv64) == 48bv8); - free ensures (memory_load8_le(mem, 69681bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69682bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69683bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69684bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69685bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69686bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69687bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69680bv64) == 69680bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -117,129 +91,31 @@ procedure fork(); free requires (memory_load8_le(mem, 1945bv64) == 0bv8); free requires (memory_load8_le(mem, 1946bv64) == 2bv8); free requires (memory_load8_le(mem, 1947bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 80bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 0bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 84bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69680bv64) == 48bv8); - free requires (memory_load8_le(mem, 69681bv64) == 16bv8); - free requires (memory_load8_le(mem, 69682bv64) == 1bv8); - free requires (memory_load8_le(mem, 69683bv64) == 0bv8); - free requires (memory_load8_le(mem, 69684bv64) == 0bv8); - free requires (memory_load8_le(mem, 69685bv64) == 0bv8); - free requires (memory_load8_le(mem, 69686bv64) == 0bv8); - free requires (memory_load8_le(mem, 69687bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69680bv64) == 69680bv64); free ensures (memory_load8_le(mem, 1944bv64) == 1bv8); free ensures (memory_load8_le(mem, 1945bv64) == 0bv8); free ensures (memory_load8_le(mem, 1946bv64) == 2bv8); free ensures (memory_load8_le(mem, 1947bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69680bv64) == 48bv8); - free ensures (memory_load8_le(mem, 69681bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69682bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69683bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69684bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69685bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69686bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69687bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69680bv64) == 69680bv64); -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R16, Gamma_R17, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_stack, R0, R16, R17, R29, R30, R31, stack; - free requires (memory_load8_le(mem, 69672bv64) == 0bv8); - free requires (memory_load8_le(mem, 69673bv64) == 0bv8); - free requires (memory_load8_le(mem, 69674bv64) == 0bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); - free requires (memory_load8_le(mem, 69680bv64) == 48bv8); - free requires (memory_load8_le(mem, 69681bv64) == 16bv8); - free requires (memory_load8_le(mem, 69682bv64) == 1bv8); - free requires (memory_load8_le(mem, 69683bv64) == 0bv8); - free requires (memory_load8_le(mem, 69684bv64) == 0bv8); - free requires (memory_load8_le(mem, 69685bv64) == 0bv8); - free requires (memory_load8_le(mem, 69686bv64) == 0bv8); - free requires (memory_load8_le(mem, 69687bv64) == 0bv8); + free requires (memory_load64_le(mem, 69672bv64) == 0bv64); + free requires (memory_load64_le(mem, 69680bv64) == 69680bv64); free requires (memory_load8_le(mem, 1944bv64) == 1bv8); free requires (memory_load8_le(mem, 1945bv64) == 0bv8); free requires (memory_load8_le(mem, 1946bv64) == 2bv8); free requires (memory_load8_le(mem, 1947bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 80bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 0bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 84bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69680bv64) == 48bv8); - free requires (memory_load8_le(mem, 69681bv64) == 16bv8); - free requires (memory_load8_le(mem, 69682bv64) == 1bv8); - free requires (memory_load8_le(mem, 69683bv64) == 0bv8); - free requires (memory_load8_le(mem, 69684bv64) == 0bv8); - free requires (memory_load8_le(mem, 69685bv64) == 0bv8); - free requires (memory_load8_le(mem, 69686bv64) == 0bv8); - free requires (memory_load8_le(mem, 69687bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69680bv64) == 69680bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -248,38 +124,12 @@ procedure main() free ensures (memory_load8_le(mem, 1945bv64) == 0bv8); free ensures (memory_load8_le(mem, 1946bv64) == 2bv8); free ensures (memory_load8_le(mem, 1947bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69680bv64) == 48bv8); - free ensures (memory_load8_le(mem, 69681bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69682bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69683bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69684bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69685bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69686bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69687bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69680bv64) == 69680bv64); + +implementation main() { var #4: bv64; var #5: bv64; @@ -314,3 +164,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 48bv64), Gamma_R31; return; } + diff --git a/src/test/correct/syscall/clang_pic/syscall.expected b/src/test/correct/syscall/clang_pic/syscall.expected index d0efb46c8..90781988c 100644 --- a/src/test/correct/syscall/clang_pic/syscall.expected +++ b/src/test/correct/syscall/clang_pic/syscall.expected @@ -64,43 +64,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1945bv64) == 0bv8); free ensures (memory_load8_le(mem, 1946bv64) == 2bv8); free ensures (memory_load8_le(mem, 1947bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69680bv64) == 48bv8); - free ensures (memory_load8_le(mem, 69681bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69682bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69683bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69684bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69685bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69686bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69687bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69680bv64) == 69680bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -117,129 +91,31 @@ procedure fork(); free requires (memory_load8_le(mem, 1945bv64) == 0bv8); free requires (memory_load8_le(mem, 1946bv64) == 2bv8); free requires (memory_load8_le(mem, 1947bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 80bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 0bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 84bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69680bv64) == 48bv8); - free requires (memory_load8_le(mem, 69681bv64) == 16bv8); - free requires (memory_load8_le(mem, 69682bv64) == 1bv8); - free requires (memory_load8_le(mem, 69683bv64) == 0bv8); - free requires (memory_load8_le(mem, 69684bv64) == 0bv8); - free requires (memory_load8_le(mem, 69685bv64) == 0bv8); - free requires (memory_load8_le(mem, 69686bv64) == 0bv8); - free requires (memory_load8_le(mem, 69687bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69680bv64) == 69680bv64); free ensures (memory_load8_le(mem, 1944bv64) == 1bv8); free ensures (memory_load8_le(mem, 1945bv64) == 0bv8); free ensures (memory_load8_le(mem, 1946bv64) == 2bv8); free ensures (memory_load8_le(mem, 1947bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69680bv64) == 48bv8); - free ensures (memory_load8_le(mem, 69681bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69682bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69683bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69684bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69685bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69686bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69687bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69680bv64) == 69680bv64); -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R16, Gamma_R17, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_stack, R0, R16, R17, R29, R30, R31, stack; - free requires (memory_load8_le(mem, 69672bv64) == 0bv8); - free requires (memory_load8_le(mem, 69673bv64) == 0bv8); - free requires (memory_load8_le(mem, 69674bv64) == 0bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); - free requires (memory_load8_le(mem, 69680bv64) == 48bv8); - free requires (memory_load8_le(mem, 69681bv64) == 16bv8); - free requires (memory_load8_le(mem, 69682bv64) == 1bv8); - free requires (memory_load8_le(mem, 69683bv64) == 0bv8); - free requires (memory_load8_le(mem, 69684bv64) == 0bv8); - free requires (memory_load8_le(mem, 69685bv64) == 0bv8); - free requires (memory_load8_le(mem, 69686bv64) == 0bv8); - free requires (memory_load8_le(mem, 69687bv64) == 0bv8); + free requires (memory_load64_le(mem, 69672bv64) == 0bv64); + free requires (memory_load64_le(mem, 69680bv64) == 69680bv64); free requires (memory_load8_le(mem, 1944bv64) == 1bv8); free requires (memory_load8_le(mem, 1945bv64) == 0bv8); free requires (memory_load8_le(mem, 1946bv64) == 2bv8); free requires (memory_load8_le(mem, 1947bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 80bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 0bv8); - free requires (memory_load8_le(mem, 69073bv64) == 7bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 84bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69680bv64) == 48bv8); - free requires (memory_load8_le(mem, 69681bv64) == 16bv8); - free requires (memory_load8_le(mem, 69682bv64) == 1bv8); - free requires (memory_load8_le(mem, 69683bv64) == 0bv8); - free requires (memory_load8_le(mem, 69684bv64) == 0bv8); - free requires (memory_load8_le(mem, 69685bv64) == 0bv8); - free requires (memory_load8_le(mem, 69686bv64) == 0bv8); - free requires (memory_load8_le(mem, 69687bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69680bv64) == 69680bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -248,38 +124,12 @@ procedure main() free ensures (memory_load8_le(mem, 1945bv64) == 0bv8); free ensures (memory_load8_le(mem, 1946bv64) == 2bv8); free ensures (memory_load8_le(mem, 1947bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69680bv64) == 48bv8); - free ensures (memory_load8_le(mem, 69681bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69682bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69683bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69684bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69685bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69686bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69687bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69680bv64) == 69680bv64); + +implementation main() { var #4: bv64; var #5: bv64; @@ -314,3 +164,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 48bv64), Gamma_R31; return; } + diff --git a/src/test/correct/syscall/gcc/syscall.expected b/src/test/correct/syscall/gcc/syscall.expected index d10405962..7c763b860 100644 --- a/src/test/correct/syscall/gcc/syscall.expected +++ b/src/test/correct/syscall/gcc/syscall.expected @@ -64,43 +64,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1933bv64) == 0bv8); free ensures (memory_load8_le(mem, 1934bv64) == 2bv8); free ensures (memory_load8_le(mem, 1935bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69008bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -117,129 +91,31 @@ procedure fork(); free requires (memory_load8_le(mem, 1933bv64) == 0bv8); free requires (memory_load8_le(mem, 1934bv64) == 2bv8); free requires (memory_load8_le(mem, 1935bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 80bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 0bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 84bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69008bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69016bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1932bv64) == 1bv8); free ensures (memory_load8_le(mem, 1933bv64) == 0bv8); free ensures (memory_load8_le(mem, 1934bv64) == 2bv8); free ensures (memory_load8_le(mem, 1935bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69008bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R16, Gamma_R17, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_stack, R0, R16, R17, R29, R30, R31, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1932bv64) == 1bv8); free requires (memory_load8_le(mem, 1933bv64) == 0bv8); free requires (memory_load8_le(mem, 1934bv64) == 2bv8); free requires (memory_load8_le(mem, 1935bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 80bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 0bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 84bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69008bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69016bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -248,38 +124,12 @@ procedure main() free ensures (memory_load8_le(mem, 1933bv64) == 0bv8); free ensures (memory_load8_le(mem, 1934bv64) == 2bv8); free ensures (memory_load8_le(mem, 1935bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69008bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv64; var Gamma_#4: bool; @@ -309,3 +159,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 48bv64), Gamma_R31; return; } + diff --git a/src/test/correct/syscall/gcc_O2/syscall.expected b/src/test/correct/syscall/gcc_O2/syscall.expected index 757903692..fcb66403d 100644 --- a/src/test/correct/syscall/gcc_O2/syscall.expected +++ b/src/test/correct/syscall/gcc_O2/syscall.expected @@ -6,6 +6,11 @@ var {:extern} R17: bv64; var {:extern} mem: [bv64]bv8; const {:extern} $_IO_stdin_used_addr: bv64; axiom ($_IO_stdin_used_addr == 1960bv64); +function {:extern} {:bvbuiltin "bvadd"} bvadd64(bv64, bv64) returns (bv64); +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -18,43 +23,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1961bv64) == 0bv8); free ensures (memory_load8_le(mem, 1962bv64) == 2bv8); free ensures (memory_load8_le(mem, 1963bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 144bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69008bv64) == 1936bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1856bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1600bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -67,91 +46,22 @@ procedure {:extern} guarantee_reflexive(); procedure fork(); modifies Gamma_R16, Gamma_R17, R16, R17; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1960bv64) == 1bv8); free requires (memory_load8_le(mem, 1961bv64) == 0bv8); free requires (memory_load8_le(mem, 1962bv64) == 2bv8); free requires (memory_load8_le(mem, 1963bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 144bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 64bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 64bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69008bv64) == 1936bv64); + free requires (memory_load64_le(mem, 69016bv64) == 1856bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1600bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1960bv64) == 1bv8); free ensures (memory_load8_le(mem, 1961bv64) == 0bv8); free ensures (memory_load8_le(mem, 1962bv64) == 2bv8); free ensures (memory_load8_le(mem, 1963bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 144bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69008bv64) == 1936bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1856bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1600bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + diff --git a/src/test/correct/syscall/gcc_no_plt_no_pic/syscall.expected b/src/test/correct/syscall/gcc_no_plt_no_pic/syscall.expected index 712177c54..0af6d545b 100644 --- a/src/test/correct/syscall/gcc_no_plt_no_pic/syscall.expected +++ b/src/test/correct/syscall/gcc_no_plt_no_pic/syscall.expected @@ -64,43 +64,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1933bv64) == 0bv8); free ensures (memory_load8_le(mem, 1934bv64) == 2bv8); free ensures (memory_load8_le(mem, 1935bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69008bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -117,129 +91,31 @@ procedure fork(); free requires (memory_load8_le(mem, 1933bv64) == 0bv8); free requires (memory_load8_le(mem, 1934bv64) == 2bv8); free requires (memory_load8_le(mem, 1935bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 80bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 0bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 84bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69008bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69016bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1932bv64) == 1bv8); free ensures (memory_load8_le(mem, 1933bv64) == 0bv8); free ensures (memory_load8_le(mem, 1934bv64) == 2bv8); free ensures (memory_load8_le(mem, 1935bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69008bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R16, Gamma_R17, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_stack, R0, R16, R17, R29, R30, R31, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1932bv64) == 1bv8); free requires (memory_load8_le(mem, 1933bv64) == 0bv8); free requires (memory_load8_le(mem, 1934bv64) == 2bv8); free requires (memory_load8_le(mem, 1935bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 80bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 0bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 84bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69008bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69016bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -248,38 +124,12 @@ procedure main() free ensures (memory_load8_le(mem, 1933bv64) == 0bv8); free ensures (memory_load8_le(mem, 1934bv64) == 2bv8); free ensures (memory_load8_le(mem, 1935bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69008bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv64; var Gamma_#4: bool; @@ -309,3 +159,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 48bv64), Gamma_R31; return; } + diff --git a/src/test/correct/syscall/gcc_pic/syscall.expected b/src/test/correct/syscall/gcc_pic/syscall.expected index 712177c54..0af6d545b 100644 --- a/src/test/correct/syscall/gcc_pic/syscall.expected +++ b/src/test/correct/syscall/gcc_pic/syscall.expected @@ -64,43 +64,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1933bv64) == 0bv8); free ensures (memory_load8_le(mem, 1934bv64) == 2bv8); free ensures (memory_load8_le(mem, 1935bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69008bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -117,129 +91,31 @@ procedure fork(); free requires (memory_load8_le(mem, 1933bv64) == 0bv8); free requires (memory_load8_le(mem, 1934bv64) == 2bv8); free requires (memory_load8_le(mem, 1935bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 80bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 0bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 84bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69008bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69016bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1932bv64) == 1bv8); free ensures (memory_load8_le(mem, 1933bv64) == 0bv8); free ensures (memory_load8_le(mem, 1934bv64) == 2bv8); free ensures (memory_load8_le(mem, 1935bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69008bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R16, Gamma_R17, Gamma_R29, Gamma_R30, Gamma_R31, Gamma_stack, R0, R16, R17, R29, R30, R31, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1932bv64) == 1bv8); free requires (memory_load8_le(mem, 1933bv64) == 0bv8); free requires (memory_load8_le(mem, 1934bv64) == 2bv8); free requires (memory_load8_le(mem, 1935bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 80bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 0bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 84bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69008bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69016bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R29 == old(Gamma_R29)); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R29 == old(R29)); @@ -248,38 +124,12 @@ procedure main() free ensures (memory_load8_le(mem, 1933bv64) == 0bv8); free ensures (memory_load8_le(mem, 1934bv64) == 2bv8); free ensures (memory_load8_le(mem, 1935bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69008bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv64; var Gamma_#4: bool; @@ -309,3 +159,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 48bv64), Gamma_R31; return; } + diff --git a/src/test/correct/using_gamma_conditional/clang/using_gamma_conditional.expected b/src/test/correct/using_gamma_conditional/clang/using_gamma_conditional.expected index b1773a812..4c987715b 100644 --- a/src/test/correct/using_gamma_conditional/clang/using_gamma_conditional.expected +++ b/src/test/correct/using_gamma_conditional/clang/using_gamma_conditional.expected @@ -35,6 +35,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -54,151 +58,61 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (old(gamma_load32(Gamma_mem, $x_addr)) ==> gamma_load32(Gamma_mem, $x_addr)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (gamma_load32(Gamma_mem, $x_addr) ==> gamma_load32(Gamma_mem, $x_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) && (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_mem, Gamma_stack, R0, R31, R8, mem, stack; requires (gamma_load32(Gamma_mem, $x_addr) == true); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1896bv64) == 1bv8); free requires (memory_load8_le(mem, 1897bv64) == 0bv8); free requires (memory_load8_le(mem, 1898bv64) == 2bv8); free requires (memory_load8_le(mem, 1899bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1896bv64) == 1bv8); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -274,3 +188,4 @@ procedure main() assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l00000358; } + diff --git a/src/test/correct/using_gamma_conditional/clang_O2/using_gamma_conditional.expected b/src/test/correct/using_gamma_conditional/clang_O2/using_gamma_conditional.expected index 3b7e9dc9d..2e22216b9 100644 --- a/src/test/correct/using_gamma_conditional/clang_O2/using_gamma_conditional.expected +++ b/src/test/correct/using_gamma_conditional/clang_O2/using_gamma_conditional.expected @@ -27,6 +27,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -42,149 +46,59 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1853bv64) == 0bv8); free ensures (memory_load8_le(mem, 1854bv64) == 2bv8); free ensures (memory_load8_le(mem, 1855bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (old(gamma_load32(Gamma_mem, $x_addr)) ==> gamma_load32(Gamma_mem, $x_addr)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (gamma_load32(Gamma_mem, $x_addr) ==> gamma_load32(Gamma_mem, $x_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) && (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R8, Gamma_mem, R0, R8, mem; requires (gamma_load32(Gamma_mem, $x_addr) == true); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1852bv64) == 1bv8); free requires (memory_load8_le(mem, 1853bv64) == 0bv8); free requires (memory_load8_le(mem, 1854bv64) == 2bv8); free requires (memory_load8_le(mem, 1855bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (memory_load8_le(mem, 1852bv64) == 1bv8); free ensures (memory_load8_le(mem, 1853bv64) == 0bv8); free ensures (memory_load8_le(mem, 1854bv64) == 2bv8); free ensures (memory_load8_le(mem, 1855bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -228,3 +142,4 @@ procedure main() assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l000002e8; } + diff --git a/src/test/correct/using_gamma_conditional/clang_no_plt_no_pic/using_gamma_conditional.expected b/src/test/correct/using_gamma_conditional/clang_no_plt_no_pic/using_gamma_conditional.expected index bb9a9caa9..53d1fb153 100644 --- a/src/test/correct/using_gamma_conditional/clang_no_plt_no_pic/using_gamma_conditional.expected +++ b/src/test/correct/using_gamma_conditional/clang_no_plt_no_pic/using_gamma_conditional.expected @@ -35,6 +35,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -54,151 +58,61 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (old(gamma_load32(Gamma_mem, $x_addr)) ==> gamma_load32(Gamma_mem, $x_addr)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (gamma_load32(Gamma_mem, $x_addr) ==> gamma_load32(Gamma_mem, $x_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) && (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_mem, Gamma_stack, R0, R31, R8, mem, stack; requires (gamma_load32(Gamma_mem, $x_addr) == true); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1896bv64) == 1bv8); free requires (memory_load8_le(mem, 1897bv64) == 0bv8); free requires (memory_load8_le(mem, 1898bv64) == 2bv8); free requires (memory_load8_le(mem, 1899bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1896bv64) == 1bv8); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -274,3 +188,4 @@ procedure main() assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l00000973; } + diff --git a/src/test/correct/using_gamma_conditional/clang_pic/using_gamma_conditional.expected b/src/test/correct/using_gamma_conditional/clang_pic/using_gamma_conditional.expected index 022cc6fb7..e0851a5c3 100644 --- a/src/test/correct/using_gamma_conditional/clang_pic/using_gamma_conditional.expected +++ b/src/test/correct/using_gamma_conditional/clang_pic/using_gamma_conditional.expected @@ -62,175 +62,64 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1965bv64) == 0bv8); free ensures (memory_load8_le(mem, 1966bv64) == 2bv8); free ensures (memory_load8_le(mem, 1967bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69576bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69577bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69578bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69579bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69580bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69581bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69582bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69583bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69576bv64) == 69684bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69064bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (old(gamma_load32(Gamma_mem, $x_addr)) ==> gamma_load32(Gamma_mem, $x_addr)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (gamma_load32(Gamma_mem, $x_addr) ==> gamma_load32(Gamma_mem, $x_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) && (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_mem, Gamma_stack, R0, R31, R8, mem, stack; requires (gamma_load32(Gamma_mem, $x_addr) == true); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1964bv64) == 1bv8); free requires (memory_load8_le(mem, 1965bv64) == 0bv8); free requires (memory_load8_le(mem, 1966bv64) == 2bv8); free requires (memory_load8_le(mem, 1967bv64) == 0bv8); - free requires (memory_load8_le(mem, 69576bv64) == 52bv8); - free requires (memory_load8_le(mem, 69577bv64) == 16bv8); - free requires (memory_load8_le(mem, 69578bv64) == 1bv8); - free requires (memory_load8_le(mem, 69579bv64) == 0bv8); - free requires (memory_load8_le(mem, 69580bv64) == 0bv8); - free requires (memory_load8_le(mem, 69581bv64) == 0bv8); - free requires (memory_load8_le(mem, 69582bv64) == 0bv8); - free requires (memory_load8_le(mem, 69583bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); - free requires (memory_load8_le(mem, 69056bv64) == 80bv8); - free requires (memory_load8_le(mem, 69057bv64) == 7bv8); - free requires (memory_load8_le(mem, 69058bv64) == 0bv8); - free requires (memory_load8_le(mem, 69059bv64) == 0bv8); - free requires (memory_load8_le(mem, 69060bv64) == 0bv8); - free requires (memory_load8_le(mem, 69061bv64) == 0bv8); - free requires (memory_load8_le(mem, 69062bv64) == 0bv8); - free requires (memory_load8_le(mem, 69063bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 0bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 84bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); + free requires (memory_load64_le(mem, 69576bv64) == 69684bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); + free requires (memory_load64_le(mem, 69056bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69064bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1876bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1964bv64) == 1bv8); free ensures (memory_load8_le(mem, 1965bv64) == 0bv8); free ensures (memory_load8_le(mem, 1966bv64) == 2bv8); free ensures (memory_load8_le(mem, 1967bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69576bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69577bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69578bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69579bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69580bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69581bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69582bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69583bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69576bv64) == 69684bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69064bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -308,3 +197,4 @@ procedure main() assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l00000363; } + diff --git a/src/test/correct/using_gamma_conditional/gcc/using_gamma_conditional.expected b/src/test/correct/using_gamma_conditional/gcc/using_gamma_conditional.expected index a078d99f9..042817109 100644 --- a/src/test/correct/using_gamma_conditional/gcc/using_gamma_conditional.expected +++ b/src/test/correct/using_gamma_conditional/gcc/using_gamma_conditional.expected @@ -25,6 +25,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -40,149 +44,59 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1869bv64) == 0bv8); free ensures (memory_load8_le(mem, 1870bv64) == 2bv8); free ensures (memory_load8_le(mem, 1871bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (old(gamma_load32(Gamma_mem, $x_addr)) ==> gamma_load32(Gamma_mem, $x_addr)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (gamma_load32(Gamma_mem, $x_addr) ==> gamma_load32(Gamma_mem, $x_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) && (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_mem, R0, mem; requires (gamma_load32(Gamma_mem, $x_addr) == true); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1868bv64) == 1bv8); free requires (memory_load8_le(mem, 1869bv64) == 0bv8); free requires (memory_load8_le(mem, 1870bv64) == 2bv8); free requires (memory_load8_le(mem, 1871bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1868bv64) == 1bv8); free ensures (memory_load8_le(mem, 1869bv64) == 0bv8); free ensures (memory_load8_le(mem, 1870bv64) == 2bv8); free ensures (memory_load8_le(mem, 1871bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -227,3 +141,4 @@ procedure main() assume (bvcomp1(ZF, 1bv1) == 0bv1); goto l00000309; } + diff --git a/src/test/correct/using_gamma_conditional/gcc_O2/using_gamma_conditional.expected b/src/test/correct/using_gamma_conditional/gcc_O2/using_gamma_conditional.expected index 62ead8320..cc3f785b6 100644 --- a/src/test/correct/using_gamma_conditional/gcc_O2/using_gamma_conditional.expected +++ b/src/test/correct/using_gamma_conditional/gcc_O2/using_gamma_conditional.expected @@ -25,6 +25,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -40,149 +44,59 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (old(gamma_load32(Gamma_mem, $x_addr)) ==> gamma_load32(Gamma_mem, $x_addr)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (gamma_load32(Gamma_mem, $x_addr) ==> gamma_load32(Gamma_mem, $x_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) && (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_mem, R0, mem; requires (gamma_load32(Gamma_mem, $x_addr) == true); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1896bv64) == 1bv8); free requires (memory_load8_le(mem, 1897bv64) == 0bv8); free requires (memory_load8_le(mem, 1898bv64) == 2bv8); free requires (memory_load8_le(mem, 1899bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 80bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 0bv8); - free requires (memory_load8_le(mem, 69025bv64) == 7bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 0bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1536bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1896bv64) == 1bv8); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #1: bv32; var CF: bv1; @@ -226,3 +140,4 @@ procedure main() assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l000001d2; } + diff --git a/src/test/correct/using_gamma_conditional/gcc_no_plt_no_pic/using_gamma_conditional.expected b/src/test/correct/using_gamma_conditional/gcc_no_plt_no_pic/using_gamma_conditional.expected index 1eb9759f1..a899e0a02 100644 --- a/src/test/correct/using_gamma_conditional/gcc_no_plt_no_pic/using_gamma_conditional.expected +++ b/src/test/correct/using_gamma_conditional/gcc_no_plt_no_pic/using_gamma_conditional.expected @@ -25,6 +25,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -40,149 +44,59 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1869bv64) == 0bv8); free ensures (memory_load8_le(mem, 1870bv64) == 2bv8); free ensures (memory_load8_le(mem, 1871bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (old(gamma_load32(Gamma_mem, $x_addr)) ==> gamma_load32(Gamma_mem, $x_addr)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (gamma_load32(Gamma_mem, $x_addr) ==> gamma_load32(Gamma_mem, $x_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) && (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_mem, R0, mem; requires (gamma_load32(Gamma_mem, $x_addr) == true); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1868bv64) == 1bv8); free requires (memory_load8_le(mem, 1869bv64) == 0bv8); free requires (memory_load8_le(mem, 1870bv64) == 2bv8); free requires (memory_load8_le(mem, 1871bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1868bv64) == 1bv8); free ensures (memory_load8_le(mem, 1869bv64) == 0bv8); free ensures (memory_load8_le(mem, 1870bv64) == 2bv8); free ensures (memory_load8_le(mem, 1871bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -227,3 +141,4 @@ procedure main() assume (bvcomp1(ZF, 1bv1) == 0bv1); goto l000008c2; } + diff --git a/src/test/correct/using_gamma_conditional/gcc_pic/using_gamma_conditional.expected b/src/test/correct/using_gamma_conditional/gcc_pic/using_gamma_conditional.expected index 661b64502..c6db86754 100644 --- a/src/test/correct/using_gamma_conditional/gcc_pic/using_gamma_conditional.expected +++ b/src/test/correct/using_gamma_conditional/gcc_pic/using_gamma_conditional.expected @@ -48,173 +48,62 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1933bv64) == 0bv8); free ensures (memory_load8_le(mem, 1934bv64) == 2bv8); free ensures (memory_load8_le(mem, 1935bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69600bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69601bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69602bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69603bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69604bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69605bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69606bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69607bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69600bv64) == 69652bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1872bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (old(gamma_load32(Gamma_mem, $x_addr)) ==> gamma_load32(Gamma_mem, $x_addr)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (gamma_load32(Gamma_mem, $x_addr) ==> gamma_load32(Gamma_mem, $x_addr)); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) && (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr))); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_mem, R0, mem; requires (gamma_load32(Gamma_mem, $x_addr) == true); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1932bv64) == 1bv8); free requires (memory_load8_le(mem, 1933bv64) == 0bv8); free requires (memory_load8_le(mem, 1934bv64) == 2bv8); free requires (memory_load8_le(mem, 1935bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 84bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 0bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69600bv64) == 20bv8); - free requires (memory_load8_le(mem, 69601bv64) == 16bv8); - free requires (memory_load8_le(mem, 69602bv64) == 1bv8); - free requires (memory_load8_le(mem, 69603bv64) == 0bv8); - free requires (memory_load8_le(mem, 69604bv64) == 0bv8); - free requires (memory_load8_le(mem, 69605bv64) == 0bv8); - free requires (memory_load8_le(mem, 69606bv64) == 0bv8); - free requires (memory_load8_le(mem, 69607bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 80bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69016bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69600bv64) == 69652bv64); + free requires (memory_load64_le(mem, 69008bv64) == 1872bv64); free ensures (memory_load8_le(mem, 1932bv64) == 1bv8); free ensures (memory_load8_le(mem, 1933bv64) == 0bv8); free ensures (memory_load8_le(mem, 1934bv64) == 2bv8); free ensures (memory_load8_le(mem, 1935bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69600bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69601bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69602bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69603bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69604bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69605bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69606bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69607bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69600bv64) == 69652bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1872bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -260,3 +149,4 @@ procedure main() assume (bvcomp1(ZF, 1bv1) == 0bv1); goto l0000030a; } + diff --git a/src/test/correct/using_gamma_write_z/clang/using_gamma_write_z.expected b/src/test/correct/using_gamma_write_z/clang/using_gamma_write_z.expected index 5ab807fea..05d75cf8e 100644 --- a/src/test/correct/using_gamma_write_z/clang/using_gamma_write_z.expected +++ b/src/test/correct/using_gamma_write_z/clang/using_gamma_write_z.expected @@ -27,6 +27,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -43,149 +47,59 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1853bv64) == 0bv8); free ensures (memory_load8_le(mem, 1854bv64) == 2bv8); free ensures (memory_load8_le(mem, 1855bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((old(memory_load32_le(mem, $x_addr)) == memory_load32_le(mem, $x_addr)) && (old(memory_load32_le(mem, $z_addr)) == memory_load32_le(mem, $z_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) && (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (gamma_load32(Gamma_mem, $x_addr) ==> gamma_load32(Gamma_mem, $x_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R8, Gamma_R9, Gamma_mem, R0, R8, R9, mem; requires ((memory_load32_le(mem, $z_addr) == 0bv32) ==> gamma_load32(Gamma_mem, $x_addr)); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1852bv64) == 1bv8); free requires (memory_load8_le(mem, 1853bv64) == 0bv8); free requires (memory_load8_le(mem, 1854bv64) == 2bv8); free requires (memory_load8_le(mem, 1855bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (memory_load8_le(mem, 1852bv64) == 1bv8); free ensures (memory_load8_le(mem, 1853bv64) == 0bv8); free ensures (memory_load8_le(mem, 1854bv64) == 2bv8); free ensures (memory_load8_le(mem, 1855bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var Gamma_x_old: bool; lmain: @@ -202,3 +116,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/using_gamma_write_z/clang_O2/using_gamma_write_z.expected b/src/test/correct/using_gamma_write_z/clang_O2/using_gamma_write_z.expected index ba7a07752..9af1fc2c4 100644 --- a/src/test/correct/using_gamma_write_z/clang_O2/using_gamma_write_z.expected +++ b/src/test/correct/using_gamma_write_z/clang_O2/using_gamma_write_z.expected @@ -27,6 +27,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -43,149 +47,59 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1853bv64) == 0bv8); free ensures (memory_load8_le(mem, 1854bv64) == 2bv8); free ensures (memory_load8_le(mem, 1855bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((old(memory_load32_le(mem, $x_addr)) == memory_load32_le(mem, $x_addr)) && (old(memory_load32_le(mem, $z_addr)) == memory_load32_le(mem, $z_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) && (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (gamma_load32(Gamma_mem, $x_addr) ==> gamma_load32(Gamma_mem, $x_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R8, Gamma_R9, Gamma_mem, R0, R8, R9, mem; requires ((memory_load32_le(mem, $z_addr) == 0bv32) ==> gamma_load32(Gamma_mem, $x_addr)); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1852bv64) == 1bv8); free requires (memory_load8_le(mem, 1853bv64) == 0bv8); free requires (memory_load8_le(mem, 1854bv64) == 2bv8); free requires (memory_load8_le(mem, 1855bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (memory_load8_le(mem, 1852bv64) == 1bv8); free ensures (memory_load8_le(mem, 1853bv64) == 0bv8); free ensures (memory_load8_le(mem, 1854bv64) == 2bv8); free ensures (memory_load8_le(mem, 1855bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var Gamma_x_old: bool; lmain: @@ -202,3 +116,4 @@ procedure main() assume {:captureState "%000002d3"} true; return; } + diff --git a/src/test/correct/using_gamma_write_z/clang_no_plt_no_pic/using_gamma_write_z.expected b/src/test/correct/using_gamma_write_z/clang_no_plt_no_pic/using_gamma_write_z.expected index 121f49afb..e4ccca552 100644 --- a/src/test/correct/using_gamma_write_z/clang_no_plt_no_pic/using_gamma_write_z.expected +++ b/src/test/correct/using_gamma_write_z/clang_no_plt_no_pic/using_gamma_write_z.expected @@ -27,6 +27,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -43,149 +47,59 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1853bv64) == 0bv8); free ensures (memory_load8_le(mem, 1854bv64) == 2bv8); free ensures (memory_load8_le(mem, 1855bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((old(memory_load32_le(mem, $x_addr)) == memory_load32_le(mem, $x_addr)) && (old(memory_load32_le(mem, $z_addr)) == memory_load32_le(mem, $z_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) && (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (gamma_load32(Gamma_mem, $x_addr) ==> gamma_load32(Gamma_mem, $x_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R8, Gamma_R9, Gamma_mem, R0, R8, R9, mem; requires ((memory_load32_le(mem, $z_addr) == 0bv32) ==> gamma_load32(Gamma_mem, $x_addr)); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1852bv64) == 1bv8); free requires (memory_load8_le(mem, 1853bv64) == 0bv8); free requires (memory_load8_le(mem, 1854bv64) == 2bv8); free requires (memory_load8_le(mem, 1855bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (memory_load8_le(mem, 1852bv64) == 1bv8); free ensures (memory_load8_le(mem, 1853bv64) == 0bv8); free ensures (memory_load8_le(mem, 1854bv64) == 2bv8); free ensures (memory_load8_le(mem, 1855bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var Gamma_x_old: bool; lmain: @@ -202,3 +116,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/using_gamma_write_z/clang_pic/using_gamma_write_z.expected b/src/test/correct/using_gamma_write_z/clang_pic/using_gamma_write_z.expected index c05386840..ac6b61b78 100644 --- a/src/test/correct/using_gamma_write_z/clang_pic/using_gamma_write_z.expected +++ b/src/test/correct/using_gamma_write_z/clang_pic/using_gamma_write_z.expected @@ -51,173 +51,62 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1921bv64) == 0bv8); free ensures (memory_load8_le(mem, 1922bv64) == 2bv8); free ensures (memory_load8_le(mem, 1923bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69576bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69577bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69578bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69579bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69580bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69581bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69582bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69583bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69576bv64) == 69684bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69064bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((old(memory_load32_le(mem, $x_addr)) == memory_load32_le(mem, $x_addr)) && (old(memory_load32_le(mem, $z_addr)) == memory_load32_le(mem, $z_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) && (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (gamma_load32(Gamma_mem, $x_addr) ==> gamma_load32(Gamma_mem, $x_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R8, Gamma_R9, Gamma_mem, R0, R8, R9, mem; requires ((memory_load32_le(mem, $z_addr) == 0bv32) ==> gamma_load32(Gamma_mem, $x_addr)); - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1920bv64) == 1bv8); free requires (memory_load8_le(mem, 1921bv64) == 0bv8); free requires (memory_load8_le(mem, 1922bv64) == 2bv8); free requires (memory_load8_le(mem, 1923bv64) == 0bv8); - free requires (memory_load8_le(mem, 69576bv64) == 52bv8); - free requires (memory_load8_le(mem, 69577bv64) == 16bv8); - free requires (memory_load8_le(mem, 69578bv64) == 1bv8); - free requires (memory_load8_le(mem, 69579bv64) == 0bv8); - free requires (memory_load8_le(mem, 69580bv64) == 0bv8); - free requires (memory_load8_le(mem, 69581bv64) == 0bv8); - free requires (memory_load8_le(mem, 69582bv64) == 0bv8); - free requires (memory_load8_le(mem, 69583bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); - free requires (memory_load8_le(mem, 69056bv64) == 80bv8); - free requires (memory_load8_le(mem, 69057bv64) == 7bv8); - free requires (memory_load8_le(mem, 69058bv64) == 0bv8); - free requires (memory_load8_le(mem, 69059bv64) == 0bv8); - free requires (memory_load8_le(mem, 69060bv64) == 0bv8); - free requires (memory_load8_le(mem, 69061bv64) == 0bv8); - free requires (memory_load8_le(mem, 69062bv64) == 0bv8); - free requires (memory_load8_le(mem, 69063bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 0bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 84bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); + free requires (memory_load64_le(mem, 69576bv64) == 69684bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); + free requires (memory_load64_le(mem, 69056bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69064bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1876bv64); free ensures (memory_load8_le(mem, 1920bv64) == 1bv8); free ensures (memory_load8_le(mem, 1921bv64) == 0bv8); free ensures (memory_load8_le(mem, 1922bv64) == 2bv8); free ensures (memory_load8_le(mem, 1923bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69576bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69577bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69578bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69579bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69580bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69581bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69582bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69583bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69576bv64) == 69684bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69064bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + +implementation main() { var Gamma_x_old: bool; lmain: @@ -236,3 +125,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/using_gamma_write_z/gcc/using_gamma_write_z.expected b/src/test/correct/using_gamma_write_z/gcc/using_gamma_write_z.expected index 195161608..0a1ec6d9b 100644 --- a/src/test/correct/using_gamma_write_z/gcc/using_gamma_write_z.expected +++ b/src/test/correct/using_gamma_write_z/gcc/using_gamma_write_z.expected @@ -25,6 +25,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -41,149 +45,59 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1857bv64) == 0bv8); free ensures (memory_load8_le(mem, 1858bv64) == 2bv8); free ensures (memory_load8_le(mem, 1859bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((old(memory_load32_le(mem, $x_addr)) == memory_load32_le(mem, $x_addr)) && (old(memory_load32_le(mem, $z_addr)) == memory_load32_le(mem, $z_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) && (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (gamma_load32(Gamma_mem, $x_addr) ==> gamma_load32(Gamma_mem, $x_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; requires ((memory_load32_le(mem, $z_addr) == 0bv32) ==> gamma_load32(Gamma_mem, $x_addr)); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1856bv64) == 1bv8); free requires (memory_load8_le(mem, 1857bv64) == 0bv8); free requires (memory_load8_le(mem, 1858bv64) == 2bv8); free requires (memory_load8_le(mem, 1859bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1856bv64) == 1bv8); free ensures (memory_load8_le(mem, 1857bv64) == 0bv8); free ensures (memory_load8_le(mem, 1858bv64) == 2bv8); free ensures (memory_load8_le(mem, 1859bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var Gamma_x_old: bool; lmain: @@ -201,3 +115,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/using_gamma_write_z/gcc_O2/using_gamma_write_z.expected b/src/test/correct/using_gamma_write_z/gcc_O2/using_gamma_write_z.expected index 6e3d75bef..556ad567e 100644 --- a/src/test/correct/using_gamma_write_z/gcc_O2/using_gamma_write_z.expected +++ b/src/test/correct/using_gamma_write_z/gcc_O2/using_gamma_write_z.expected @@ -27,6 +27,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -43,149 +47,59 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((old(memory_load32_le(mem, $x_addr)) == memory_load32_le(mem, $x_addr)) && (old(memory_load32_le(mem, $z_addr)) == memory_load32_le(mem, $z_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) && (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (gamma_load32(Gamma_mem, $x_addr) ==> gamma_load32(Gamma_mem, $x_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R2, Gamma_mem, R0, R1, R2, mem; requires ((memory_load32_le(mem, $z_addr) == 0bv32) ==> gamma_load32(Gamma_mem, $x_addr)); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1896bv64) == 1bv8); free requires (memory_load8_le(mem, 1897bv64) == 0bv8); free requires (memory_load8_le(mem, 1898bv64) == 2bv8); free requires (memory_load8_le(mem, 1899bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 80bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 0bv8); - free requires (memory_load8_le(mem, 69025bv64) == 7bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 0bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1536bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1896bv64) == 1bv8); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var Gamma_x_old: bool; lmain: @@ -202,3 +116,4 @@ procedure main() assume {:captureState "%000001bd"} true; return; } + diff --git a/src/test/correct/using_gamma_write_z/gcc_no_plt_no_pic/using_gamma_write_z.expected b/src/test/correct/using_gamma_write_z/gcc_no_plt_no_pic/using_gamma_write_z.expected index 8bf981db5..053ed1d56 100644 --- a/src/test/correct/using_gamma_write_z/gcc_no_plt_no_pic/using_gamma_write_z.expected +++ b/src/test/correct/using_gamma_write_z/gcc_no_plt_no_pic/using_gamma_write_z.expected @@ -25,6 +25,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -41,149 +45,59 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1857bv64) == 0bv8); free ensures (memory_load8_le(mem, 1858bv64) == 2bv8); free ensures (memory_load8_le(mem, 1859bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((old(memory_load32_le(mem, $x_addr)) == memory_load32_le(mem, $x_addr)) && (old(memory_load32_le(mem, $z_addr)) == memory_load32_le(mem, $z_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) && (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (gamma_load32(Gamma_mem, $x_addr) ==> gamma_load32(Gamma_mem, $x_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; requires ((memory_load32_le(mem, $z_addr) == 0bv32) ==> gamma_load32(Gamma_mem, $x_addr)); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1856bv64) == 1bv8); free requires (memory_load8_le(mem, 1857bv64) == 0bv8); free requires (memory_load8_le(mem, 1858bv64) == 2bv8); free requires (memory_load8_le(mem, 1859bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1856bv64) == 1bv8); free ensures (memory_load8_le(mem, 1857bv64) == 0bv8); free ensures (memory_load8_le(mem, 1858bv64) == 2bv8); free ensures (memory_load8_le(mem, 1859bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var Gamma_x_old: bool; lmain: @@ -201,3 +115,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/correct/using_gamma_write_z/gcc_pic/using_gamma_write_z.expected b/src/test/correct/using_gamma_write_z/gcc_pic/using_gamma_write_z.expected index 3ffffbcfb..c02957a55 100644 --- a/src/test/correct/using_gamma_write_z/gcc_pic/using_gamma_write_z.expected +++ b/src/test/correct/using_gamma_write_z/gcc_pic/using_gamma_write_z.expected @@ -49,173 +49,62 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1921bv64) == 0bv8); free ensures (memory_load8_le(mem, 1922bv64) == 2bv8); free ensures (memory_load8_le(mem, 1923bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69600bv64) == 24bv8); - free ensures (memory_load8_le(mem, 69601bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69602bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69603bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69604bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69605bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69606bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69607bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - -procedure {:extern} rely_transitive() + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69600bv64) == 69656bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1872bv64); + +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures ((old(memory_load32_le(mem, $x_addr)) == memory_load32_le(mem, $x_addr)) && (old(memory_load32_le(mem, $z_addr)) == memory_load32_le(mem, $z_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert ((memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)) && (memory_load32_le(mem, $z_addr) == memory_load32_le(mem, $z_addr))); } -procedure {:extern} guarantee_reflexive() +procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; + +implementation {:extern} guarantee_reflexive() { assert (gamma_load32(Gamma_mem, $x_addr) ==> gamma_load32(Gamma_mem, $x_addr)); } -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; requires ((memory_load32_le(mem, $z_addr) == 0bv32) ==> gamma_load32(Gamma_mem, $x_addr)); - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1920bv64) == 1bv8); free requires (memory_load8_le(mem, 1921bv64) == 0bv8); free requires (memory_load8_le(mem, 1922bv64) == 2bv8); free requires (memory_load8_le(mem, 1923bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 84bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 0bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69600bv64) == 24bv8); - free requires (memory_load8_le(mem, 69601bv64) == 16bv8); - free requires (memory_load8_le(mem, 69602bv64) == 1bv8); - free requires (memory_load8_le(mem, 69603bv64) == 0bv8); - free requires (memory_load8_le(mem, 69604bv64) == 0bv8); - free requires (memory_load8_le(mem, 69605bv64) == 0bv8); - free requires (memory_load8_le(mem, 69606bv64) == 0bv8); - free requires (memory_load8_le(mem, 69607bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 80bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69016bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69600bv64) == 69656bv64); + free requires (memory_load64_le(mem, 69008bv64) == 1872bv64); free ensures (memory_load8_le(mem, 1920bv64) == 1bv8); free ensures (memory_load8_le(mem, 1921bv64) == 0bv8); free ensures (memory_load8_le(mem, 1922bv64) == 2bv8); free ensures (memory_load8_le(mem, 1923bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69600bv64) == 24bv8); - free ensures (memory_load8_le(mem, 69601bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69602bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69603bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69604bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69605bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69606bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69607bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69016bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69600bv64) == 69656bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1872bv64); + +implementation main() { var Gamma_x_old: bool; lmain: @@ -234,3 +123,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/incorrect/basicassign/clang/basicassign.expected b/src/test/incorrect/basicassign/clang/basicassign.expected index 122d69a08..9ab8a7062 100644 --- a/src/test/incorrect/basicassign/clang/basicassign.expected +++ b/src/test/incorrect/basicassign/clang/basicassign.expected @@ -33,6 +33,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -50,48 +54,24 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1889bv64) == 0bv8); free ensures (memory_load8_le(mem, 1890bv64) == 2bv8); free ensures (memory_load8_le(mem, 1891bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)); } @@ -99,96 +79,28 @@ procedure {:extern} rely_reflexive() procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R10, Gamma_R11, Gamma_R8, Gamma_R9, Gamma_mem, R0, R10, R11, R8, R9, mem; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1888bv64) == 1bv8); free requires (memory_load8_le(mem, 1889bv64) == 0bv8); free requires (memory_load8_le(mem, 1890bv64) == 2bv8); free requires (memory_load8_le(mem, 1891bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (memory_load8_le(mem, 1888bv64) == 1bv8); free ensures (memory_load8_le(mem, 1889bv64) == 0bv8); free ensures (memory_load8_le(mem, 1890bv64) == 2bv8); free ensures (memory_load8_le(mem, 1891bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -226,3 +138,4 @@ procedure main() assume {:captureState "%00000337"} true; return; } + diff --git a/src/test/incorrect/basicassign/clang_O2/basicassign.expected b/src/test/incorrect/basicassign/clang_O2/basicassign.expected index e3a318276..04f35a1f3 100644 --- a/src/test/incorrect/basicassign/clang_O2/basicassign.expected +++ b/src/test/incorrect/basicassign/clang_O2/basicassign.expected @@ -31,6 +31,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -48,48 +52,24 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1865bv64) == 0bv8); free ensures (memory_load8_le(mem, 1866bv64) == 2bv8); free ensures (memory_load8_le(mem, 1867bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)); } @@ -97,96 +77,28 @@ procedure {:extern} rely_reflexive() procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R10, Gamma_R8, Gamma_R9, Gamma_mem, R0, R10, R8, R9, mem; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1864bv64) == 1bv8); free requires (memory_load8_le(mem, 1865bv64) == 0bv8); free requires (memory_load8_le(mem, 1866bv64) == 2bv8); free requires (memory_load8_le(mem, 1867bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (memory_load8_le(mem, 1864bv64) == 1bv8); free ensures (memory_load8_le(mem, 1865bv64) == 0bv8); free ensures (memory_load8_le(mem, 1866bv64) == 2bv8); free ensures (memory_load8_le(mem, 1867bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -206,3 +118,4 @@ procedure main() assume {:captureState "%000002f3"} true; return; } + diff --git a/src/test/incorrect/basicassign/clang_no_plt_no_pic/basicassign.expected b/src/test/incorrect/basicassign/clang_no_plt_no_pic/basicassign.expected index 3250d4cce..135a1f478 100644 --- a/src/test/incorrect/basicassign/clang_no_plt_no_pic/basicassign.expected +++ b/src/test/incorrect/basicassign/clang_no_plt_no_pic/basicassign.expected @@ -33,6 +33,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -50,48 +54,24 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1889bv64) == 0bv8); free ensures (memory_load8_le(mem, 1890bv64) == 2bv8); free ensures (memory_load8_le(mem, 1891bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)); } @@ -99,96 +79,28 @@ procedure {:extern} rely_reflexive() procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R10, Gamma_R11, Gamma_R8, Gamma_R9, Gamma_mem, R0, R10, R11, R8, R9, mem; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1888bv64) == 1bv8); free requires (memory_load8_le(mem, 1889bv64) == 0bv8); free requires (memory_load8_le(mem, 1890bv64) == 2bv8); free requires (memory_load8_le(mem, 1891bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (memory_load8_le(mem, 1888bv64) == 1bv8); free ensures (memory_load8_le(mem, 1889bv64) == 0bv8); free ensures (memory_load8_le(mem, 1890bv64) == 2bv8); free ensures (memory_load8_le(mem, 1891bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -226,3 +138,4 @@ procedure main() assume {:captureState "%00000924"} true; return; } + diff --git a/src/test/incorrect/basicassign/clang_pic/basicassign.expected b/src/test/incorrect/basicassign/clang_pic/basicassign.expected index ac86f966b..570f828e1 100644 --- a/src/test/incorrect/basicassign/clang_pic/basicassign.expected +++ b/src/test/incorrect/basicassign/clang_pic/basicassign.expected @@ -58,72 +58,27 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1965bv64) == 0bv8); free ensures (memory_load8_le(mem, 1966bv64) == 2bv8); free ensures (memory_load8_le(mem, 1967bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69584bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69585bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69586bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69587bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69588bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69589bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69590bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69591bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69048bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69049bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69050bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69051bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69052bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69053bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69054bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69055bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69040bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69041bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69042bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69043bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69044bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69045bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69046bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69047bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69568bv64) == 56bv8); - free ensures (memory_load8_le(mem, 69569bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69570bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69571bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69572bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69573bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69574bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69575bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69560bv64) == 60bv8); - free ensures (memory_load8_le(mem, 69561bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69562bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69563bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69564bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69565bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69566bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69567bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69584bv64) == 69684bv64); + free ensures (memory_load64_le(mem, 69048bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69040bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69568bv64) == 69688bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69560bv64) == 69692bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)); } @@ -131,144 +86,34 @@ procedure {:extern} rely_reflexive() procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R10, Gamma_R11, Gamma_R8, Gamma_R9, Gamma_mem, R0, R10, R11, R8, R9, mem; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1964bv64) == 1bv8); free requires (memory_load8_le(mem, 1965bv64) == 0bv8); free requires (memory_load8_le(mem, 1966bv64) == 2bv8); free requires (memory_load8_le(mem, 1967bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); - free requires (memory_load8_le(mem, 69584bv64) == 52bv8); - free requires (memory_load8_le(mem, 69585bv64) == 16bv8); - free requires (memory_load8_le(mem, 69586bv64) == 1bv8); - free requires (memory_load8_le(mem, 69587bv64) == 0bv8); - free requires (memory_load8_le(mem, 69588bv64) == 0bv8); - free requires (memory_load8_le(mem, 69589bv64) == 0bv8); - free requires (memory_load8_le(mem, 69590bv64) == 0bv8); - free requires (memory_load8_le(mem, 69591bv64) == 0bv8); - free requires (memory_load8_le(mem, 69048bv64) == 0bv8); - free requires (memory_load8_le(mem, 69049bv64) == 7bv8); - free requires (memory_load8_le(mem, 69050bv64) == 0bv8); - free requires (memory_load8_le(mem, 69051bv64) == 0bv8); - free requires (memory_load8_le(mem, 69052bv64) == 0bv8); - free requires (memory_load8_le(mem, 69053bv64) == 0bv8); - free requires (memory_load8_le(mem, 69054bv64) == 0bv8); - free requires (memory_load8_le(mem, 69055bv64) == 0bv8); - free requires (memory_load8_le(mem, 69040bv64) == 80bv8); - free requires (memory_load8_le(mem, 69041bv64) == 7bv8); - free requires (memory_load8_le(mem, 69042bv64) == 0bv8); - free requires (memory_load8_le(mem, 69043bv64) == 0bv8); - free requires (memory_load8_le(mem, 69044bv64) == 0bv8); - free requires (memory_load8_le(mem, 69045bv64) == 0bv8); - free requires (memory_load8_le(mem, 69046bv64) == 0bv8); - free requires (memory_load8_le(mem, 69047bv64) == 0bv8); - free requires (memory_load8_le(mem, 69568bv64) == 56bv8); - free requires (memory_load8_le(mem, 69569bv64) == 16bv8); - free requires (memory_load8_le(mem, 69570bv64) == 1bv8); - free requires (memory_load8_le(mem, 69571bv64) == 0bv8); - free requires (memory_load8_le(mem, 69572bv64) == 0bv8); - free requires (memory_load8_le(mem, 69573bv64) == 0bv8); - free requires (memory_load8_le(mem, 69574bv64) == 0bv8); - free requires (memory_load8_le(mem, 69575bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 84bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69560bv64) == 60bv8); - free requires (memory_load8_le(mem, 69561bv64) == 16bv8); - free requires (memory_load8_le(mem, 69562bv64) == 1bv8); - free requires (memory_load8_le(mem, 69563bv64) == 0bv8); - free requires (memory_load8_le(mem, 69564bv64) == 0bv8); - free requires (memory_load8_le(mem, 69565bv64) == 0bv8); - free requires (memory_load8_le(mem, 69566bv64) == 0bv8); - free requires (memory_load8_le(mem, 69567bv64) == 0bv8); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); + free requires (memory_load64_le(mem, 69584bv64) == 69684bv64); + free requires (memory_load64_le(mem, 69048bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69040bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69568bv64) == 69688bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69560bv64) == 69692bv64); free ensures (memory_load8_le(mem, 1964bv64) == 1bv8); free ensures (memory_load8_le(mem, 1965bv64) == 0bv8); free ensures (memory_load8_le(mem, 1966bv64) == 2bv8); free ensures (memory_load8_le(mem, 1967bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69584bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69585bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69586bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69587bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69588bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69589bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69590bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69591bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69048bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69049bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69050bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69051bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69052bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69053bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69054bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69055bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69040bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69041bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69042bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69043bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69044bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69045bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69046bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69047bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69568bv64) == 56bv8); - free ensures (memory_load8_le(mem, 69569bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69570bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69571bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69572bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69573bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69574bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69575bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69560bv64) == 60bv8); - free ensures (memory_load8_le(mem, 69561bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69562bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69563bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69564bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69565bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69566bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69567bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69584bv64) == 69684bv64); + free ensures (memory_load64_le(mem, 69048bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69040bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69568bv64) == 69688bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69560bv64) == 69692bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -312,3 +157,4 @@ procedure main() assume {:captureState "%00000358"} true; return; } + diff --git a/src/test/incorrect/basicassign/gcc/basicassign.expected b/src/test/incorrect/basicassign/gcc/basicassign.expected index 121167794..67c9fd8ee 100644 --- a/src/test/incorrect/basicassign/gcc/basicassign.expected +++ b/src/test/incorrect/basicassign/gcc/basicassign.expected @@ -27,6 +27,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -44,48 +48,24 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1949bv64) == 0bv8); free ensures (memory_load8_le(mem, 1950bv64) == 2bv8); free ensures (memory_load8_le(mem, 1951bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)); } @@ -93,96 +73,28 @@ procedure {:extern} rely_reflexive() procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1948bv64) == 1bv8); free requires (memory_load8_le(mem, 1949bv64) == 0bv8); free requires (memory_load8_le(mem, 1950bv64) == 2bv8); free requires (memory_load8_le(mem, 1951bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1948bv64) == 1bv8); free ensures (memory_load8_le(mem, 1949bv64) == 0bv8); free ensures (memory_load8_le(mem, 1950bv64) == 2bv8); free ensures (memory_load8_le(mem, 1951bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -235,3 +147,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/incorrect/basicassign/gcc_O2/basicassign.expected b/src/test/incorrect/basicassign/gcc_O2/basicassign.expected index 42773c210..bfa1cf91d 100644 --- a/src/test/incorrect/basicassign/gcc_O2/basicassign.expected +++ b/src/test/incorrect/basicassign/gcc_O2/basicassign.expected @@ -29,6 +29,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -46,48 +50,24 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)); } @@ -95,96 +75,28 @@ procedure {:extern} rely_reflexive() procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R2, Gamma_mem, R0, R1, R2, mem; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1896bv64) == 1bv8); free requires (memory_load8_le(mem, 1897bv64) == 0bv8); free requires (memory_load8_le(mem, 1898bv64) == 2bv8); free requires (memory_load8_le(mem, 1899bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 80bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 0bv8); - free requires (memory_load8_le(mem, 69025bv64) == 7bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 0bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1536bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1896bv64) == 1bv8); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #1: bv64; var Gamma_#1: bool; @@ -206,3 +118,4 @@ procedure main() assume {:captureState "%000001cf"} true; return; } + diff --git a/src/test/incorrect/basicassign/gcc_no_plt_no_pic/basicassign.expected b/src/test/incorrect/basicassign/gcc_no_plt_no_pic/basicassign.expected index 499b391fd..bbebca37e 100644 --- a/src/test/incorrect/basicassign/gcc_no_plt_no_pic/basicassign.expected +++ b/src/test/incorrect/basicassign/gcc_no_plt_no_pic/basicassign.expected @@ -27,6 +27,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -44,48 +48,24 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1949bv64) == 0bv8); free ensures (memory_load8_le(mem, 1950bv64) == 2bv8); free ensures (memory_load8_le(mem, 1951bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)); } @@ -93,96 +73,28 @@ procedure {:extern} rely_reflexive() procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1948bv64) == 1bv8); free requires (memory_load8_le(mem, 1949bv64) == 0bv8); free requires (memory_load8_le(mem, 1950bv64) == 2bv8); free requires (memory_load8_le(mem, 1951bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1948bv64) == 1bv8); free ensures (memory_load8_le(mem, 1949bv64) == 0bv8); free ensures (memory_load8_le(mem, 1950bv64) == 2bv8); free ensures (memory_load8_le(mem, 1951bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -235,3 +147,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/incorrect/basicassign/gcc_pic/basicassign.expected b/src/test/incorrect/basicassign/gcc_pic/basicassign.expected index e67a10bdf..d0cdbad3c 100644 --- a/src/test/incorrect/basicassign/gcc_pic/basicassign.expected +++ b/src/test/incorrect/basicassign/gcc_pic/basicassign.expected @@ -52,72 +52,27 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 2013bv64) == 0bv8); free ensures (memory_load8_le(mem, 2014bv64) == 2bv8); free ensures (memory_load8_le(mem, 2015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69608bv64) == 28bv8); - free ensures (memory_load8_le(mem, 69609bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69610bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69611bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69612bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69613bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69614bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69615bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69584bv64) == 24bv8); - free ensures (memory_load8_le(mem, 69585bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69586bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69587bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69588bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69589bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69590bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69591bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 80bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 7bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69608bv64) == 69660bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69584bv64) == 69656bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 69652bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 68992bv64) == 1872bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (memory_load32_le(mem, $x_addr) == old(memory_load32_le(mem, $x_addr))); + +implementation {:extern} rely_transitive() { call rely(); call rely(); } -procedure {:extern} rely_reflexive() +procedure {:extern} rely_reflexive(); + +implementation {:extern} rely_reflexive() { assert (memory_load32_le(mem, $x_addr) == memory_load32_le(mem, $x_addr)); } @@ -125,144 +80,34 @@ procedure {:extern} rely_reflexive() procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_mem, R0, R1, mem; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 2012bv64) == 1bv8); free requires (memory_load8_le(mem, 2013bv64) == 0bv8); free requires (memory_load8_le(mem, 2014bv64) == 2bv8); free requires (memory_load8_le(mem, 2015bv64) == 0bv8); - free requires (memory_load8_le(mem, 69608bv64) == 28bv8); - free requires (memory_load8_le(mem, 69609bv64) == 16bv8); - free requires (memory_load8_le(mem, 69610bv64) == 1bv8); - free requires (memory_load8_le(mem, 69611bv64) == 0bv8); - free requires (memory_load8_le(mem, 69612bv64) == 0bv8); - free requires (memory_load8_le(mem, 69613bv64) == 0bv8); - free requires (memory_load8_le(mem, 69614bv64) == 0bv8); - free requires (memory_load8_le(mem, 69615bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 84bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69584bv64) == 24bv8); - free requires (memory_load8_le(mem, 69585bv64) == 16bv8); - free requires (memory_load8_le(mem, 69586bv64) == 1bv8); - free requires (memory_load8_le(mem, 69587bv64) == 0bv8); - free requires (memory_load8_le(mem, 69588bv64) == 0bv8); - free requires (memory_load8_le(mem, 69589bv64) == 0bv8); - free requires (memory_load8_le(mem, 69590bv64) == 0bv8); - free requires (memory_load8_le(mem, 69591bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 16bv8); - free requires (memory_load8_le(mem, 69594bv64) == 1bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 0bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); - free requires (memory_load8_le(mem, 68992bv64) == 80bv8); - free requires (memory_load8_le(mem, 68993bv64) == 7bv8); - free requires (memory_load8_le(mem, 68994bv64) == 0bv8); - free requires (memory_load8_le(mem, 68995bv64) == 0bv8); - free requires (memory_load8_le(mem, 68996bv64) == 0bv8); - free requires (memory_load8_le(mem, 68997bv64) == 0bv8); - free requires (memory_load8_le(mem, 68998bv64) == 0bv8); - free requires (memory_load8_le(mem, 68999bv64) == 0bv8); + free requires (memory_load64_le(mem, 69608bv64) == 69660bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69584bv64) == 69656bv64); + free requires (memory_load64_le(mem, 69592bv64) == 69652bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1792bv64); + free requires (memory_load64_le(mem, 68992bv64) == 1872bv64); free ensures (memory_load8_le(mem, 2012bv64) == 1bv8); free ensures (memory_load8_le(mem, 2013bv64) == 0bv8); free ensures (memory_load8_le(mem, 2014bv64) == 2bv8); free ensures (memory_load8_le(mem, 2015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69608bv64) == 28bv8); - free ensures (memory_load8_le(mem, 69609bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69610bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69611bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69612bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69613bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69614bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69615bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69584bv64) == 24bv8); - free ensures (memory_load8_le(mem, 69585bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69586bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69587bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69588bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69589bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69590bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69591bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68992bv64) == 80bv8); - free ensures (memory_load8_le(mem, 68993bv64) == 7bv8); - free ensures (memory_load8_le(mem, 68994bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68995bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68996bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68997bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68998bv64) == 0bv8); - free ensures (memory_load8_le(mem, 68999bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69608bv64) == 69660bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69584bv64) == 69656bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 69652bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 68992bv64) == 1872bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -324,3 +169,4 @@ procedure main() R0, Gamma_R0 := 0bv64, true; return; } + diff --git a/src/test/incorrect/basicassign1/clang/basicassign1.expected b/src/test/incorrect/basicassign1/clang/basicassign1.expected index bd0fa29fe..7b7067e55 100644 --- a/src/test/incorrect/basicassign1/clang/basicassign1.expected +++ b/src/test/incorrect/basicassign1/clang/basicassign1.expected @@ -31,6 +31,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -48,43 +52,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1893bv64) == 0bv8); free ensures (memory_load8_le(mem, 1894bv64) == 2bv8); free ensures (memory_load8_le(mem, 1895bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -95,98 +73,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R10, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R10, R31, R8, R9, mem, stack; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1892bv64) == 1bv8); free requires (memory_load8_le(mem, 1893bv64) == 0bv8); free requires (memory_load8_le(mem, 1894bv64) == 2bv8); free requires (memory_load8_le(mem, 1895bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1892bv64) == 1bv8); free ensures (memory_load8_le(mem, 1893bv64) == 0bv8); free ensures (memory_load8_le(mem, 1894bv64) == 2bv8); free ensures (memory_load8_le(mem, 1895bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -217,3 +127,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/incorrect/basicassign1/clang_O2/basicassign1.expected b/src/test/incorrect/basicassign1/clang_O2/basicassign1.expected index 54cfefaed..a49f74f09 100644 --- a/src/test/incorrect/basicassign1/clang_O2/basicassign1.expected +++ b/src/test/incorrect/basicassign1/clang_O2/basicassign1.expected @@ -25,6 +25,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -42,43 +46,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1857bv64) == 0bv8); free ensures (memory_load8_le(mem, 1858bv64) == 2bv8); free ensures (memory_load8_le(mem, 1859bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -89,96 +67,28 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R8, Gamma_R9, Gamma_mem, R0, R8, R9, mem; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1856bv64) == 1bv8); free requires (memory_load8_le(mem, 1857bv64) == 0bv8); free requires (memory_load8_le(mem, 1858bv64) == 2bv8); free requires (memory_load8_le(mem, 1859bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (memory_load8_le(mem, 1856bv64) == 1bv8); free ensures (memory_load8_le(mem, 1857bv64) == 0bv8); free ensures (memory_load8_le(mem, 1858bv64) == 2bv8); free ensures (memory_load8_le(mem, 1859bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -193,3 +103,4 @@ procedure main() assume {:captureState "%000002de"} true; return; } + diff --git a/src/test/incorrect/basicassign1/clang_no_plt_no_pic/basicassign1.expected b/src/test/incorrect/basicassign1/clang_no_plt_no_pic/basicassign1.expected index 05e7e5e2f..c1153b7f3 100644 --- a/src/test/incorrect/basicassign1/clang_no_plt_no_pic/basicassign1.expected +++ b/src/test/incorrect/basicassign1/clang_no_plt_no_pic/basicassign1.expected @@ -31,6 +31,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -48,43 +52,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1893bv64) == 0bv8); free ensures (memory_load8_le(mem, 1894bv64) == 2bv8); free ensures (memory_load8_le(mem, 1895bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -95,98 +73,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R10, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R10, R31, R8, R9, mem, stack; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1892bv64) == 1bv8); free requires (memory_load8_le(mem, 1893bv64) == 0bv8); free requires (memory_load8_le(mem, 1894bv64) == 2bv8); free requires (memory_load8_le(mem, 1895bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1892bv64) == 1bv8); free ensures (memory_load8_le(mem, 1893bv64) == 0bv8); free ensures (memory_load8_le(mem, 1894bv64) == 2bv8); free ensures (memory_load8_le(mem, 1895bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -217,3 +127,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/incorrect/basicassign1/clang_pic/basicassign1.expected b/src/test/incorrect/basicassign1/clang_pic/basicassign1.expected index dc205cce6..3e1253cd2 100644 --- a/src/test/incorrect/basicassign1/clang_pic/basicassign1.expected +++ b/src/test/incorrect/basicassign1/clang_pic/basicassign1.expected @@ -56,59 +56,19 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1965bv64) == 0bv8); free ensures (memory_load8_le(mem, 1966bv64) == 2bv8); free ensures (memory_load8_le(mem, 1967bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69584bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69585bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69586bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69587bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69588bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69589bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69590bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69591bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69048bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69049bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69050bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69051bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69052bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69053bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69054bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69055bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69568bv64) == 56bv8); - free ensures (memory_load8_le(mem, 69569bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69570bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69571bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69572bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69573bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69574bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69575bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69584bv64) == 69684bv64); + free ensures (memory_load64_le(mem, 69048bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69568bv64) == 69688bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1792bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -119,130 +79,34 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R10, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R10, R31, R8, R9, mem, stack; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1964bv64) == 1bv8); free requires (memory_load8_le(mem, 1965bv64) == 0bv8); free requires (memory_load8_le(mem, 1966bv64) == 2bv8); free requires (memory_load8_le(mem, 1967bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); - free requires (memory_load8_le(mem, 69584bv64) == 52bv8); - free requires (memory_load8_le(mem, 69585bv64) == 16bv8); - free requires (memory_load8_le(mem, 69586bv64) == 1bv8); - free requires (memory_load8_le(mem, 69587bv64) == 0bv8); - free requires (memory_load8_le(mem, 69588bv64) == 0bv8); - free requires (memory_load8_le(mem, 69589bv64) == 0bv8); - free requires (memory_load8_le(mem, 69590bv64) == 0bv8); - free requires (memory_load8_le(mem, 69591bv64) == 0bv8); - free requires (memory_load8_le(mem, 69048bv64) == 80bv8); - free requires (memory_load8_le(mem, 69049bv64) == 7bv8); - free requires (memory_load8_le(mem, 69050bv64) == 0bv8); - free requires (memory_load8_le(mem, 69051bv64) == 0bv8); - free requires (memory_load8_le(mem, 69052bv64) == 0bv8); - free requires (memory_load8_le(mem, 69053bv64) == 0bv8); - free requires (memory_load8_le(mem, 69054bv64) == 0bv8); - free requires (memory_load8_le(mem, 69055bv64) == 0bv8); - free requires (memory_load8_le(mem, 69568bv64) == 56bv8); - free requires (memory_load8_le(mem, 69569bv64) == 16bv8); - free requires (memory_load8_le(mem, 69570bv64) == 1bv8); - free requires (memory_load8_le(mem, 69571bv64) == 0bv8); - free requires (memory_load8_le(mem, 69572bv64) == 0bv8); - free requires (memory_load8_le(mem, 69573bv64) == 0bv8); - free requires (memory_load8_le(mem, 69574bv64) == 0bv8); - free requires (memory_load8_le(mem, 69575bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 84bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69056bv64) == 0bv8); - free requires (memory_load8_le(mem, 69057bv64) == 7bv8); - free requires (memory_load8_le(mem, 69058bv64) == 0bv8); - free requires (memory_load8_le(mem, 69059bv64) == 0bv8); - free requires (memory_load8_le(mem, 69060bv64) == 0bv8); - free requires (memory_load8_le(mem, 69061bv64) == 0bv8); - free requires (memory_load8_le(mem, 69062bv64) == 0bv8); - free requires (memory_load8_le(mem, 69063bv64) == 0bv8); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); + free requires (memory_load64_le(mem, 69584bv64) == 69684bv64); + free requires (memory_load64_le(mem, 69048bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69568bv64) == 69688bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69056bv64) == 1792bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1964bv64) == 1bv8); free ensures (memory_load8_le(mem, 1965bv64) == 0bv8); free ensures (memory_load8_le(mem, 1966bv64) == 2bv8); free ensures (memory_load8_le(mem, 1967bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69584bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69585bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69586bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69587bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69588bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69589bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69590bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69591bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69048bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69049bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69050bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69051bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69052bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69053bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69054bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69055bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69568bv64) == 56bv8); - free ensures (memory_load8_le(mem, 69569bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69570bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69571bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69572bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69573bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69574bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69575bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69584bv64) == 69684bv64); + free ensures (memory_load64_le(mem, 69048bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69568bv64) == 69688bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1792bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -277,3 +141,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/incorrect/basicassign1/gcc/basicassign1.expected b/src/test/incorrect/basicassign1/gcc/basicassign1.expected index ea9681d89..572c9f872 100644 --- a/src/test/incorrect/basicassign1/gcc/basicassign1.expected +++ b/src/test/incorrect/basicassign1/gcc/basicassign1.expected @@ -27,6 +27,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -44,43 +48,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1917bv64) == 0bv8); free ensures (memory_load8_le(mem, 1918bv64) == 2bv8); free ensures (memory_load8_le(mem, 1919bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -91,98 +69,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R31, mem, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1916bv64) == 1bv8); free requires (memory_load8_le(mem, 1917bv64) == 0bv8); free requires (memory_load8_le(mem, 1918bv64) == 2bv8); free requires (memory_load8_le(mem, 1919bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1916bv64) == 1bv8); free ensures (memory_load8_le(mem, 1917bv64) == 0bv8); free ensures (memory_load8_le(mem, 1918bv64) == 2bv8); free ensures (memory_load8_le(mem, 1919bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -219,3 +129,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/incorrect/basicassign1/gcc_O2/basicassign1.expected b/src/test/incorrect/basicassign1/gcc_O2/basicassign1.expected index 0414017cb..25f2cc8d9 100644 --- a/src/test/incorrect/basicassign1/gcc_O2/basicassign1.expected +++ b/src/test/incorrect/basicassign1/gcc_O2/basicassign1.expected @@ -25,6 +25,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -42,43 +46,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -89,96 +67,28 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R2, Gamma_mem, R0, R1, R2, mem; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1896bv64) == 1bv8); free requires (memory_load8_le(mem, 1897bv64) == 0bv8); free requires (memory_load8_le(mem, 1898bv64) == 2bv8); free requires (memory_load8_le(mem, 1899bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 80bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 0bv8); - free requires (memory_load8_le(mem, 69025bv64) == 7bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 0bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1536bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1896bv64) == 1bv8); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -193,3 +103,4 @@ procedure main() assume {:captureState "%000001c5"} true; return; } + diff --git a/src/test/incorrect/basicassign1/gcc_no_plt_no_pic/basicassign1.expected b/src/test/incorrect/basicassign1/gcc_no_plt_no_pic/basicassign1.expected index fdcbd7147..abc753acb 100644 --- a/src/test/incorrect/basicassign1/gcc_no_plt_no_pic/basicassign1.expected +++ b/src/test/incorrect/basicassign1/gcc_no_plt_no_pic/basicassign1.expected @@ -27,6 +27,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -44,43 +48,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1917bv64) == 0bv8); free ensures (memory_load8_le(mem, 1918bv64) == 2bv8); free ensures (memory_load8_le(mem, 1919bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -91,98 +69,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R31, mem, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1916bv64) == 1bv8); free requires (memory_load8_le(mem, 1917bv64) == 0bv8); free requires (memory_load8_le(mem, 1918bv64) == 2bv8); free requires (memory_load8_le(mem, 1919bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1916bv64) == 1bv8); free ensures (memory_load8_le(mem, 1917bv64) == 0bv8); free ensures (memory_load8_le(mem, 1918bv64) == 2bv8); free ensures (memory_load8_le(mem, 1919bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -219,3 +129,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/incorrect/basicassign1/gcc_pic/basicassign1.expected b/src/test/incorrect/basicassign1/gcc_pic/basicassign1.expected index 91a64b3f4..7824e9e95 100644 --- a/src/test/incorrect/basicassign1/gcc_pic/basicassign1.expected +++ b/src/test/incorrect/basicassign1/gcc_pic/basicassign1.expected @@ -52,59 +52,19 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1981bv64) == 0bv8); free ensures (memory_load8_le(mem, 1982bv64) == 2bv8); free ensures (memory_load8_le(mem, 1983bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69608bv64) == 24bv8); - free ensures (memory_load8_le(mem, 69609bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69610bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69611bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69612bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69613bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69614bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69615bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69608bv64) == 69656bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 69652bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1872bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -115,130 +75,34 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R31, mem, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1980bv64) == 1bv8); free requires (memory_load8_le(mem, 1981bv64) == 0bv8); free requires (memory_load8_le(mem, 1982bv64) == 2bv8); free requires (memory_load8_le(mem, 1983bv64) == 0bv8); - free requires (memory_load8_le(mem, 69608bv64) == 24bv8); - free requires (memory_load8_le(mem, 69609bv64) == 16bv8); - free requires (memory_load8_le(mem, 69610bv64) == 1bv8); - free requires (memory_load8_le(mem, 69611bv64) == 0bv8); - free requires (memory_load8_le(mem, 69612bv64) == 0bv8); - free requires (memory_load8_le(mem, 69613bv64) == 0bv8); - free requires (memory_load8_le(mem, 69614bv64) == 0bv8); - free requires (memory_load8_le(mem, 69615bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 84bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 0bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 16bv8); - free requires (memory_load8_le(mem, 69594bv64) == 1bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 80bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); + free requires (memory_load64_le(mem, 69608bv64) == 69656bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69008bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69592bv64) == 69652bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1872bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1980bv64) == 1bv8); free ensures (memory_load8_le(mem, 1981bv64) == 0bv8); free ensures (memory_load8_le(mem, 1982bv64) == 2bv8); free ensures (memory_load8_le(mem, 1983bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69608bv64) == 24bv8); - free ensures (memory_load8_le(mem, 69609bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69610bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69611bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69612bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69613bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69614bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69615bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69608bv64) == 69656bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 69652bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1872bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -279,3 +143,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/incorrect/basicassign2/clang/basicassign2.expected b/src/test/incorrect/basicassign2/clang/basicassign2.expected index 471ecc76c..e06a514ac 100644 --- a/src/test/incorrect/basicassign2/clang/basicassign2.expected +++ b/src/test/incorrect/basicassign2/clang/basicassign2.expected @@ -49,43 +49,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1893bv64) == 0bv8); free ensures (memory_load8_le(mem, 1894bv64) == 2bv8); free ensures (memory_load8_le(mem, 1895bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -96,98 +70,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R10, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R10, R31, R8, R9, mem, stack; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1892bv64) == 1bv8); free requires (memory_load8_le(mem, 1893bv64) == 0bv8); free requires (memory_load8_le(mem, 1894bv64) == 2bv8); free requires (memory_load8_le(mem, 1895bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1892bv64) == 1bv8); free ensures (memory_load8_le(mem, 1893bv64) == 0bv8); free ensures (memory_load8_le(mem, 1894bv64) == 2bv8); free ensures (memory_load8_le(mem, 1895bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -218,3 +124,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/incorrect/basicassign2/clang_O2/basicassign2.expected b/src/test/incorrect/basicassign2/clang_O2/basicassign2.expected index 1443e9789..551197251 100644 --- a/src/test/incorrect/basicassign2/clang_O2/basicassign2.expected +++ b/src/test/incorrect/basicassign2/clang_O2/basicassign2.expected @@ -43,43 +43,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1857bv64) == 0bv8); free ensures (memory_load8_le(mem, 1858bv64) == 2bv8); free ensures (memory_load8_le(mem, 1859bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -90,96 +64,28 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R8, Gamma_R9, Gamma_mem, R0, R8, R9, mem; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1856bv64) == 1bv8); free requires (memory_load8_le(mem, 1857bv64) == 0bv8); free requires (memory_load8_le(mem, 1858bv64) == 2bv8); free requires (memory_load8_le(mem, 1859bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (memory_load8_le(mem, 1856bv64) == 1bv8); free ensures (memory_load8_le(mem, 1857bv64) == 0bv8); free ensures (memory_load8_le(mem, 1858bv64) == 2bv8); free ensures (memory_load8_le(mem, 1859bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -194,3 +100,4 @@ procedure main() assume {:captureState "%000002de"} true; return; } + diff --git a/src/test/incorrect/basicassign2/clang_no_plt_no_pic/basicassign2.expected b/src/test/incorrect/basicassign2/clang_no_plt_no_pic/basicassign2.expected index 911ce67bd..5755fb3bf 100644 --- a/src/test/incorrect/basicassign2/clang_no_plt_no_pic/basicassign2.expected +++ b/src/test/incorrect/basicassign2/clang_no_plt_no_pic/basicassign2.expected @@ -49,43 +49,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1893bv64) == 0bv8); free ensures (memory_load8_le(mem, 1894bv64) == 2bv8); free ensures (memory_load8_le(mem, 1895bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -96,98 +70,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R10, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R10, R31, R8, R9, mem, stack; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1892bv64) == 1bv8); free requires (memory_load8_le(mem, 1893bv64) == 0bv8); free requires (memory_load8_le(mem, 1894bv64) == 2bv8); free requires (memory_load8_le(mem, 1895bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1892bv64) == 1bv8); free ensures (memory_load8_le(mem, 1893bv64) == 0bv8); free ensures (memory_load8_le(mem, 1894bv64) == 2bv8); free ensures (memory_load8_le(mem, 1895bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -218,3 +124,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/incorrect/basicassign2/clang_pic/basicassign2.expected b/src/test/incorrect/basicassign2/clang_pic/basicassign2.expected index bb901dc08..34024cf4c 100644 --- a/src/test/incorrect/basicassign2/clang_pic/basicassign2.expected +++ b/src/test/incorrect/basicassign2/clang_pic/basicassign2.expected @@ -49,59 +49,19 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1965bv64) == 0bv8); free ensures (memory_load8_le(mem, 1966bv64) == 2bv8); free ensures (memory_load8_le(mem, 1967bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69584bv64) == 56bv8); - free ensures (memory_load8_le(mem, 69585bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69586bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69587bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69588bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69589bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69590bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69591bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69048bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69049bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69050bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69051bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69052bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69053bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69054bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69055bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69568bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69569bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69570bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69571bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69572bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69573bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69574bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69575bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69584bv64) == 69688bv64); + free ensures (memory_load64_le(mem, 69048bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69568bv64) == 69696bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1792bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -112,130 +72,34 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R10, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R10, R31, R8, R9, mem, stack; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1964bv64) == 1bv8); free requires (memory_load8_le(mem, 1965bv64) == 0bv8); free requires (memory_load8_le(mem, 1966bv64) == 2bv8); free requires (memory_load8_le(mem, 1967bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); - free requires (memory_load8_le(mem, 69584bv64) == 56bv8); - free requires (memory_load8_le(mem, 69585bv64) == 16bv8); - free requires (memory_load8_le(mem, 69586bv64) == 1bv8); - free requires (memory_load8_le(mem, 69587bv64) == 0bv8); - free requires (memory_load8_le(mem, 69588bv64) == 0bv8); - free requires (memory_load8_le(mem, 69589bv64) == 0bv8); - free requires (memory_load8_le(mem, 69590bv64) == 0bv8); - free requires (memory_load8_le(mem, 69591bv64) == 0bv8); - free requires (memory_load8_le(mem, 69048bv64) == 80bv8); - free requires (memory_load8_le(mem, 69049bv64) == 7bv8); - free requires (memory_load8_le(mem, 69050bv64) == 0bv8); - free requires (memory_load8_le(mem, 69051bv64) == 0bv8); - free requires (memory_load8_le(mem, 69052bv64) == 0bv8); - free requires (memory_load8_le(mem, 69053bv64) == 0bv8); - free requires (memory_load8_le(mem, 69054bv64) == 0bv8); - free requires (memory_load8_le(mem, 69055bv64) == 0bv8); - free requires (memory_load8_le(mem, 69568bv64) == 64bv8); - free requires (memory_load8_le(mem, 69569bv64) == 16bv8); - free requires (memory_load8_le(mem, 69570bv64) == 1bv8); - free requires (memory_load8_le(mem, 69571bv64) == 0bv8); - free requires (memory_load8_le(mem, 69572bv64) == 0bv8); - free requires (memory_load8_le(mem, 69573bv64) == 0bv8); - free requires (memory_load8_le(mem, 69574bv64) == 0bv8); - free requires (memory_load8_le(mem, 69575bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 84bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69056bv64) == 0bv8); - free requires (memory_load8_le(mem, 69057bv64) == 7bv8); - free requires (memory_load8_le(mem, 69058bv64) == 0bv8); - free requires (memory_load8_le(mem, 69059bv64) == 0bv8); - free requires (memory_load8_le(mem, 69060bv64) == 0bv8); - free requires (memory_load8_le(mem, 69061bv64) == 0bv8); - free requires (memory_load8_le(mem, 69062bv64) == 0bv8); - free requires (memory_load8_le(mem, 69063bv64) == 0bv8); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); + free requires (memory_load64_le(mem, 69584bv64) == 69688bv64); + free requires (memory_load64_le(mem, 69048bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69568bv64) == 69696bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69056bv64) == 1792bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1964bv64) == 1bv8); free ensures (memory_load8_le(mem, 1965bv64) == 0bv8); free ensures (memory_load8_le(mem, 1966bv64) == 2bv8); free ensures (memory_load8_le(mem, 1967bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69584bv64) == 56bv8); - free ensures (memory_load8_le(mem, 69585bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69586bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69587bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69588bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69589bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69590bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69591bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69048bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69049bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69050bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69051bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69052bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69053bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69054bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69055bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69568bv64) == 64bv8); - free ensures (memory_load8_le(mem, 69569bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69570bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69571bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69572bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69573bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69574bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69575bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69584bv64) == 69688bv64); + free ensures (memory_load64_le(mem, 69048bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69568bv64) == 69696bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1792bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -270,3 +134,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/incorrect/basicassign2/gcc/basicassign2.expected b/src/test/incorrect/basicassign2/gcc/basicassign2.expected index 95f92fbdc..480c1d306 100644 --- a/src/test/incorrect/basicassign2/gcc/basicassign2.expected +++ b/src/test/incorrect/basicassign2/gcc/basicassign2.expected @@ -45,43 +45,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1917bv64) == 0bv8); free ensures (memory_load8_le(mem, 1918bv64) == 2bv8); free ensures (memory_load8_le(mem, 1919bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -92,98 +66,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R31, mem, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1916bv64) == 1bv8); free requires (memory_load8_le(mem, 1917bv64) == 0bv8); free requires (memory_load8_le(mem, 1918bv64) == 2bv8); free requires (memory_load8_le(mem, 1919bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1916bv64) == 1bv8); free ensures (memory_load8_le(mem, 1917bv64) == 0bv8); free ensures (memory_load8_le(mem, 1918bv64) == 2bv8); free ensures (memory_load8_le(mem, 1919bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -220,3 +126,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/incorrect/basicassign2/gcc_O2/basicassign2.expected b/src/test/incorrect/basicassign2/gcc_O2/basicassign2.expected index 2116e0774..4b88b7423 100644 --- a/src/test/incorrect/basicassign2/gcc_O2/basicassign2.expected +++ b/src/test/incorrect/basicassign2/gcc_O2/basicassign2.expected @@ -43,43 +43,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -90,96 +64,28 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R2, Gamma_mem, R0, R1, R2, mem; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1896bv64) == 1bv8); free requires (memory_load8_le(mem, 1897bv64) == 0bv8); free requires (memory_load8_le(mem, 1898bv64) == 2bv8); free requires (memory_load8_le(mem, 1899bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 80bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 0bv8); - free requires (memory_load8_le(mem, 69025bv64) == 7bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 0bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1536bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1896bv64) == 1bv8); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -194,3 +100,4 @@ procedure main() assume {:captureState "%000001c5"} true; return; } + diff --git a/src/test/incorrect/basicassign2/gcc_no_plt_no_pic/basicassign2.expected b/src/test/incorrect/basicassign2/gcc_no_plt_no_pic/basicassign2.expected index 190af2f08..1711ce3d2 100644 --- a/src/test/incorrect/basicassign2/gcc_no_plt_no_pic/basicassign2.expected +++ b/src/test/incorrect/basicassign2/gcc_no_plt_no_pic/basicassign2.expected @@ -45,43 +45,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1917bv64) == 0bv8); free ensures (memory_load8_le(mem, 1918bv64) == 2bv8); free ensures (memory_load8_le(mem, 1919bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -92,98 +66,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R31, mem, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1916bv64) == 1bv8); free requires (memory_load8_le(mem, 1917bv64) == 0bv8); free requires (memory_load8_le(mem, 1918bv64) == 2bv8); free requires (memory_load8_le(mem, 1919bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1916bv64) == 1bv8); free ensures (memory_load8_le(mem, 1917bv64) == 0bv8); free ensures (memory_load8_le(mem, 1918bv64) == 2bv8); free ensures (memory_load8_le(mem, 1919bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -220,3 +126,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/incorrect/basicassign2/gcc_pic/basicassign2.expected b/src/test/incorrect/basicassign2/gcc_pic/basicassign2.expected index 1c35793fc..366d025b8 100644 --- a/src/test/incorrect/basicassign2/gcc_pic/basicassign2.expected +++ b/src/test/incorrect/basicassign2/gcc_pic/basicassign2.expected @@ -45,59 +45,19 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1981bv64) == 0bv8); free ensures (memory_load8_le(mem, 1982bv64) == 2bv8); free ensures (memory_load8_le(mem, 1983bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69608bv64) == 32bv8); - free ensures (memory_load8_le(mem, 69609bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69610bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69611bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69612bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69613bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69614bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69615bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 24bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69608bv64) == 69664bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 69656bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1872bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -108,130 +68,34 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R31, mem, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1980bv64) == 1bv8); free requires (memory_load8_le(mem, 1981bv64) == 0bv8); free requires (memory_load8_le(mem, 1982bv64) == 2bv8); free requires (memory_load8_le(mem, 1983bv64) == 0bv8); - free requires (memory_load8_le(mem, 69608bv64) == 32bv8); - free requires (memory_load8_le(mem, 69609bv64) == 16bv8); - free requires (memory_load8_le(mem, 69610bv64) == 1bv8); - free requires (memory_load8_le(mem, 69611bv64) == 0bv8); - free requires (memory_load8_le(mem, 69612bv64) == 0bv8); - free requires (memory_load8_le(mem, 69613bv64) == 0bv8); - free requires (memory_load8_le(mem, 69614bv64) == 0bv8); - free requires (memory_load8_le(mem, 69615bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 84bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 0bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 24bv8); - free requires (memory_load8_le(mem, 69593bv64) == 16bv8); - free requires (memory_load8_le(mem, 69594bv64) == 1bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 80bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); + free requires (memory_load64_le(mem, 69608bv64) == 69664bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69008bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69592bv64) == 69656bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1872bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1980bv64) == 1bv8); free ensures (memory_load8_le(mem, 1981bv64) == 0bv8); free ensures (memory_load8_le(mem, 1982bv64) == 2bv8); free ensures (memory_load8_le(mem, 1983bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69608bv64) == 32bv8); - free ensures (memory_load8_le(mem, 69609bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69610bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69611bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69612bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69613bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69614bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69615bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 24bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69608bv64) == 69664bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 69656bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1872bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -272,3 +136,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/incorrect/basicassign3/clang/basicassign3.expected b/src/test/incorrect/basicassign3/clang/basicassign3.expected index 75800d54a..ef1c38d25 100644 --- a/src/test/incorrect/basicassign3/clang/basicassign3.expected +++ b/src/test/incorrect/basicassign3/clang/basicassign3.expected @@ -29,6 +29,10 @@ function {:extern} gamma_store8(gammaMap: [bv64]bool, index: bv64, value: bool) gammaMap[index := value] } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -46,43 +50,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1893bv64) == 0bv8); free ensures (memory_load8_le(mem, 1894bv64) == 2bv8); free ensures (memory_load8_le(mem, 1895bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -93,98 +71,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R10, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R10, R31, R8, R9, mem, stack; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1892bv64) == 1bv8); free requires (memory_load8_le(mem, 1893bv64) == 0bv8); free requires (memory_load8_le(mem, 1894bv64) == 2bv8); free requires (memory_load8_le(mem, 1895bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1892bv64) == 1bv8); free ensures (memory_load8_le(mem, 1893bv64) == 0bv8); free ensures (memory_load8_le(mem, 1894bv64) == 2bv8); free ensures (memory_load8_le(mem, 1895bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -215,3 +125,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/incorrect/basicassign3/clang_O2/basicassign3.expected b/src/test/incorrect/basicassign3/clang_O2/basicassign3.expected index 96cc417da..5a813d070 100644 --- a/src/test/incorrect/basicassign3/clang_O2/basicassign3.expected +++ b/src/test/incorrect/basicassign3/clang_O2/basicassign3.expected @@ -23,6 +23,10 @@ function {:extern} gamma_store8(gammaMap: [bv64]bool, index: bv64, value: bool) gammaMap[index := value] } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -40,43 +44,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1857bv64) == 0bv8); free ensures (memory_load8_le(mem, 1858bv64) == 2bv8); free ensures (memory_load8_le(mem, 1859bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -87,96 +65,28 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R8, Gamma_R9, Gamma_mem, R0, R8, R9, mem; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1856bv64) == 1bv8); free requires (memory_load8_le(mem, 1857bv64) == 0bv8); free requires (memory_load8_le(mem, 1858bv64) == 2bv8); free requires (memory_load8_le(mem, 1859bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (memory_load8_le(mem, 1856bv64) == 1bv8); free ensures (memory_load8_le(mem, 1857bv64) == 0bv8); free ensures (memory_load8_le(mem, 1858bv64) == 2bv8); free ensures (memory_load8_le(mem, 1859bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -191,3 +101,4 @@ procedure main() assume {:captureState "%000002de"} true; return; } + diff --git a/src/test/incorrect/basicassign3/clang_no_plt_no_pic/basicassign3.expected b/src/test/incorrect/basicassign3/clang_no_plt_no_pic/basicassign3.expected index 75b959513..7db9fa80d 100644 --- a/src/test/incorrect/basicassign3/clang_no_plt_no_pic/basicassign3.expected +++ b/src/test/incorrect/basicassign3/clang_no_plt_no_pic/basicassign3.expected @@ -29,6 +29,10 @@ function {:extern} gamma_store8(gammaMap: [bv64]bool, index: bv64, value: bool) gammaMap[index := value] } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -46,43 +50,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1893bv64) == 0bv8); free ensures (memory_load8_le(mem, 1894bv64) == 2bv8); free ensures (memory_load8_le(mem, 1895bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -93,98 +71,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R10, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R10, R31, R8, R9, mem, stack; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1892bv64) == 1bv8); free requires (memory_load8_le(mem, 1893bv64) == 0bv8); free requires (memory_load8_le(mem, 1894bv64) == 2bv8); free requires (memory_load8_le(mem, 1895bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1892bv64) == 1bv8); free ensures (memory_load8_le(mem, 1893bv64) == 0bv8); free ensures (memory_load8_le(mem, 1894bv64) == 2bv8); free ensures (memory_load8_le(mem, 1895bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -215,3 +125,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/incorrect/basicassign3/clang_pic/basicassign3.expected b/src/test/incorrect/basicassign3/clang_pic/basicassign3.expected index 7a4df88f4..11bbf80c3 100644 --- a/src/test/incorrect/basicassign3/clang_pic/basicassign3.expected +++ b/src/test/incorrect/basicassign3/clang_pic/basicassign3.expected @@ -54,59 +54,19 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1965bv64) == 0bv8); free ensures (memory_load8_le(mem, 1966bv64) == 2bv8); free ensures (memory_load8_le(mem, 1967bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69584bv64) == 49bv8); - free ensures (memory_load8_le(mem, 69585bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69586bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69587bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69588bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69589bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69590bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69591bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69048bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69049bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69050bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69051bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69052bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69053bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69054bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69055bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69568bv64) == 50bv8); - free ensures (memory_load8_le(mem, 69569bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69570bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69571bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69572bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69573bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69574bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69575bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69584bv64) == 69681bv64); + free ensures (memory_load64_le(mem, 69048bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69568bv64) == 69682bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1792bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -117,130 +77,34 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R10, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R10, R31, R8, R9, mem, stack; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1964bv64) == 1bv8); free requires (memory_load8_le(mem, 1965bv64) == 0bv8); free requires (memory_load8_le(mem, 1966bv64) == 2bv8); free requires (memory_load8_le(mem, 1967bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); - free requires (memory_load8_le(mem, 69584bv64) == 49bv8); - free requires (memory_load8_le(mem, 69585bv64) == 16bv8); - free requires (memory_load8_le(mem, 69586bv64) == 1bv8); - free requires (memory_load8_le(mem, 69587bv64) == 0bv8); - free requires (memory_load8_le(mem, 69588bv64) == 0bv8); - free requires (memory_load8_le(mem, 69589bv64) == 0bv8); - free requires (memory_load8_le(mem, 69590bv64) == 0bv8); - free requires (memory_load8_le(mem, 69591bv64) == 0bv8); - free requires (memory_load8_le(mem, 69048bv64) == 80bv8); - free requires (memory_load8_le(mem, 69049bv64) == 7bv8); - free requires (memory_load8_le(mem, 69050bv64) == 0bv8); - free requires (memory_load8_le(mem, 69051bv64) == 0bv8); - free requires (memory_load8_le(mem, 69052bv64) == 0bv8); - free requires (memory_load8_le(mem, 69053bv64) == 0bv8); - free requires (memory_load8_le(mem, 69054bv64) == 0bv8); - free requires (memory_load8_le(mem, 69055bv64) == 0bv8); - free requires (memory_load8_le(mem, 69568bv64) == 50bv8); - free requires (memory_load8_le(mem, 69569bv64) == 16bv8); - free requires (memory_load8_le(mem, 69570bv64) == 1bv8); - free requires (memory_load8_le(mem, 69571bv64) == 0bv8); - free requires (memory_load8_le(mem, 69572bv64) == 0bv8); - free requires (memory_load8_le(mem, 69573bv64) == 0bv8); - free requires (memory_load8_le(mem, 69574bv64) == 0bv8); - free requires (memory_load8_le(mem, 69575bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 84bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69056bv64) == 0bv8); - free requires (memory_load8_le(mem, 69057bv64) == 7bv8); - free requires (memory_load8_le(mem, 69058bv64) == 0bv8); - free requires (memory_load8_le(mem, 69059bv64) == 0bv8); - free requires (memory_load8_le(mem, 69060bv64) == 0bv8); - free requires (memory_load8_le(mem, 69061bv64) == 0bv8); - free requires (memory_load8_le(mem, 69062bv64) == 0bv8); - free requires (memory_load8_le(mem, 69063bv64) == 0bv8); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); + free requires (memory_load64_le(mem, 69584bv64) == 69681bv64); + free requires (memory_load64_le(mem, 69048bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69568bv64) == 69682bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69056bv64) == 1792bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1964bv64) == 1bv8); free ensures (memory_load8_le(mem, 1965bv64) == 0bv8); free ensures (memory_load8_le(mem, 1966bv64) == 2bv8); free ensures (memory_load8_le(mem, 1967bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69584bv64) == 49bv8); - free ensures (memory_load8_le(mem, 69585bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69586bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69587bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69588bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69589bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69590bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69591bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69048bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69049bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69050bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69051bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69052bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69053bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69054bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69055bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69568bv64) == 50bv8); - free ensures (memory_load8_le(mem, 69569bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69570bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69571bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69572bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69573bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69574bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69575bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69584bv64) == 69681bv64); + free ensures (memory_load64_le(mem, 69048bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69568bv64) == 69682bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1792bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -275,3 +139,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/incorrect/basicassign3/gcc/basicassign3.expected b/src/test/incorrect/basicassign3/gcc/basicassign3.expected index a3c547bb3..6ac5ac301 100644 --- a/src/test/incorrect/basicassign3/gcc/basicassign3.expected +++ b/src/test/incorrect/basicassign3/gcc/basicassign3.expected @@ -25,6 +25,10 @@ function {:extern} gamma_store8(gammaMap: [bv64]bool, index: bv64, value: bool) gammaMap[index := value] } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -42,43 +46,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1917bv64) == 0bv8); free ensures (memory_load8_le(mem, 1918bv64) == 2bv8); free ensures (memory_load8_le(mem, 1919bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -89,98 +67,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R31, mem, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1916bv64) == 1bv8); free requires (memory_load8_le(mem, 1917bv64) == 0bv8); free requires (memory_load8_le(mem, 1918bv64) == 2bv8); free requires (memory_load8_le(mem, 1919bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1916bv64) == 1bv8); free ensures (memory_load8_le(mem, 1917bv64) == 0bv8); free ensures (memory_load8_le(mem, 1918bv64) == 2bv8); free ensures (memory_load8_le(mem, 1919bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -217,3 +127,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/incorrect/basicassign3/gcc_O2/basicassign3.expected b/src/test/incorrect/basicassign3/gcc_O2/basicassign3.expected index 62c8377ad..ee12b7189 100644 --- a/src/test/incorrect/basicassign3/gcc_O2/basicassign3.expected +++ b/src/test/incorrect/basicassign3/gcc_O2/basicassign3.expected @@ -23,6 +23,10 @@ function {:extern} gamma_store8(gammaMap: [bv64]bool, index: bv64, value: bool) gammaMap[index := value] } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -40,43 +44,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -87,96 +65,28 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R2, Gamma_mem, R0, R1, R2, mem; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1896bv64) == 1bv8); free requires (memory_load8_le(mem, 1897bv64) == 0bv8); free requires (memory_load8_le(mem, 1898bv64) == 2bv8); free requires (memory_load8_le(mem, 1899bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 80bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 0bv8); - free requires (memory_load8_le(mem, 69025bv64) == 7bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 0bv8); - free requires (memory_load8_le(mem, 69617bv64) == 6bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1536bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (memory_load8_le(mem, 1896bv64) == 1bv8); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1536bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -191,3 +101,4 @@ procedure main() assume {:captureState "%000001c5"} true; return; } + diff --git a/src/test/incorrect/basicassign3/gcc_no_plt_no_pic/basicassign3.expected b/src/test/incorrect/basicassign3/gcc_no_plt_no_pic/basicassign3.expected index ea6ea1a7b..9081fc963 100644 --- a/src/test/incorrect/basicassign3/gcc_no_plt_no_pic/basicassign3.expected +++ b/src/test/incorrect/basicassign3/gcc_no_plt_no_pic/basicassign3.expected @@ -25,6 +25,10 @@ function {:extern} gamma_store8(gammaMap: [bv64]bool, index: bv64, value: bool) gammaMap[index := value] } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -42,43 +46,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1917bv64) == 0bv8); free ensures (memory_load8_le(mem, 1918bv64) == 2bv8); free ensures (memory_load8_le(mem, 1919bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -89,98 +67,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R31, mem, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1916bv64) == 1bv8); free requires (memory_load8_le(mem, 1917bv64) == 0bv8); free requires (memory_load8_le(mem, 1918bv64) == 2bv8); free requires (memory_load8_le(mem, 1919bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1916bv64) == 1bv8); free ensures (memory_load8_le(mem, 1917bv64) == 0bv8); free ensures (memory_load8_le(mem, 1918bv64) == 2bv8); free ensures (memory_load8_le(mem, 1919bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -217,3 +127,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/incorrect/basicassign3/gcc_pic/basicassign3.expected b/src/test/incorrect/basicassign3/gcc_pic/basicassign3.expected index 7e6204c20..dc7cd4e60 100644 --- a/src/test/incorrect/basicassign3/gcc_pic/basicassign3.expected +++ b/src/test/incorrect/basicassign3/gcc_pic/basicassign3.expected @@ -50,59 +50,19 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1981bv64) == 0bv8); free ensures (memory_load8_le(mem, 1982bv64) == 2bv8); free ensures (memory_load8_le(mem, 1983bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69608bv64) == 18bv8); - free ensures (memory_load8_le(mem, 69609bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69610bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69611bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69612bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69613bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69614bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69615bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 17bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69608bv64) == 69650bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 69649bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1872bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -113,130 +73,34 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R31, mem, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1980bv64) == 1bv8); free requires (memory_load8_le(mem, 1981bv64) == 0bv8); free requires (memory_load8_le(mem, 1982bv64) == 2bv8); free requires (memory_load8_le(mem, 1983bv64) == 0bv8); - free requires (memory_load8_le(mem, 69608bv64) == 18bv8); - free requires (memory_load8_le(mem, 69609bv64) == 16bv8); - free requires (memory_load8_le(mem, 69610bv64) == 1bv8); - free requires (memory_load8_le(mem, 69611bv64) == 0bv8); - free requires (memory_load8_le(mem, 69612bv64) == 0bv8); - free requires (memory_load8_le(mem, 69613bv64) == 0bv8); - free requires (memory_load8_le(mem, 69614bv64) == 0bv8); - free requires (memory_load8_le(mem, 69615bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 84bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 0bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 17bv8); - free requires (memory_load8_le(mem, 69593bv64) == 16bv8); - free requires (memory_load8_le(mem, 69594bv64) == 1bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 80bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); + free requires (memory_load64_le(mem, 69608bv64) == 69650bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69008bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69592bv64) == 69649bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1872bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1980bv64) == 1bv8); free ensures (memory_load8_le(mem, 1981bv64) == 0bv8); free ensures (memory_load8_le(mem, 1982bv64) == 2bv8); free ensures (memory_load8_le(mem, 1983bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69608bv64) == 18bv8); - free ensures (memory_load8_le(mem, 69609bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69610bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69611bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69612bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69613bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69614bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69615bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 17bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69608bv64) == 69650bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 69649bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1872bv64); + +implementation main() { lmain: assume {:captureState "lmain"} true; @@ -277,3 +141,4 @@ procedure main() R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; } + diff --git a/src/test/incorrect/iflocal/clang/iflocal.expected b/src/test/incorrect/iflocal/clang/iflocal.expected index f90233011..51ff8ac39 100644 --- a/src/test/incorrect/iflocal/clang/iflocal.expected +++ b/src/test/incorrect/iflocal/clang/iflocal.expected @@ -27,6 +27,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -46,43 +50,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -93,98 +71,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_stack, R0, R31, R8, stack; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1896bv64) == 1bv8); free requires (memory_load8_le(mem, 1897bv64) == 0bv8); free requires (memory_load8_le(mem, 1898bv64) == 2bv8); free requires (memory_load8_le(mem, 1899bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1896bv64) == 1bv8); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -258,3 +168,4 @@ procedure main() assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l00000359; } + diff --git a/src/test/incorrect/iflocal/clang_no_plt_no_pic/iflocal.expected b/src/test/incorrect/iflocal/clang_no_plt_no_pic/iflocal.expected index 72e0f9841..49930b245 100644 --- a/src/test/incorrect/iflocal/clang_no_plt_no_pic/iflocal.expected +++ b/src/test/incorrect/iflocal/clang_no_plt_no_pic/iflocal.expected @@ -27,6 +27,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -46,43 +50,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -93,98 +71,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_stack, R0, R31, R8, stack; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1896bv64) == 1bv8); free requires (memory_load8_le(mem, 1897bv64) == 0bv8); free requires (memory_load8_le(mem, 1898bv64) == 2bv8); free requires (memory_load8_le(mem, 1899bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1896bv64) == 1bv8); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -258,3 +168,4 @@ procedure main() assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l0000097b; } + diff --git a/src/test/incorrect/iflocal/clang_pic/iflocal.expected b/src/test/incorrect/iflocal/clang_pic/iflocal.expected index 72e0f9841..49930b245 100644 --- a/src/test/incorrect/iflocal/clang_pic/iflocal.expected +++ b/src/test/incorrect/iflocal/clang_pic/iflocal.expected @@ -27,6 +27,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -46,43 +50,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -93,98 +71,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_stack, R0, R31, R8, stack; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1896bv64) == 1bv8); free requires (memory_load8_le(mem, 1897bv64) == 0bv8); free requires (memory_load8_le(mem, 1898bv64) == 2bv8); free requires (memory_load8_le(mem, 1899bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1896bv64) == 1bv8); free ensures (memory_load8_le(mem, 1897bv64) == 0bv8); free ensures (memory_load8_le(mem, 1898bv64) == 2bv8); free ensures (memory_load8_le(mem, 1899bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -258,3 +168,4 @@ procedure main() assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l0000097b; } + diff --git a/src/test/incorrect/iflocal/gcc/iflocal.expected b/src/test/incorrect/iflocal/gcc/iflocal.expected index 448aac10d..605b66fa7 100644 --- a/src/test/incorrect/iflocal/gcc/iflocal.expected +++ b/src/test/incorrect/iflocal/gcc/iflocal.expected @@ -25,6 +25,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -44,43 +48,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1881bv64) == 0bv8); free ensures (memory_load8_le(mem, 1882bv64) == 2bv8); free ensures (memory_load8_le(mem, 1883bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -91,98 +69,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_stack, R0, R31, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1880bv64) == 1bv8); free requires (memory_load8_le(mem, 1881bv64) == 0bv8); free requires (memory_load8_le(mem, 1882bv64) == 2bv8); free requires (memory_load8_le(mem, 1883bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1880bv64) == 1bv8); free ensures (memory_load8_le(mem, 1881bv64) == 0bv8); free ensures (memory_load8_le(mem, 1882bv64) == 2bv8); free ensures (memory_load8_le(mem, 1883bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -230,3 +140,4 @@ procedure main() assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l0000032d; } + diff --git a/src/test/incorrect/iflocal/gcc_no_plt_no_pic/iflocal.expected b/src/test/incorrect/iflocal/gcc_no_plt_no_pic/iflocal.expected index 2eb140e57..4bf716667 100644 --- a/src/test/incorrect/iflocal/gcc_no_plt_no_pic/iflocal.expected +++ b/src/test/incorrect/iflocal/gcc_no_plt_no_pic/iflocal.expected @@ -25,6 +25,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -44,43 +48,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1881bv64) == 0bv8); free ensures (memory_load8_le(mem, 1882bv64) == 2bv8); free ensures (memory_load8_le(mem, 1883bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -91,98 +69,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_stack, R0, R31, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1880bv64) == 1bv8); free requires (memory_load8_le(mem, 1881bv64) == 0bv8); free requires (memory_load8_le(mem, 1882bv64) == 2bv8); free requires (memory_load8_le(mem, 1883bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1880bv64) == 1bv8); free ensures (memory_load8_le(mem, 1881bv64) == 0bv8); free ensures (memory_load8_le(mem, 1882bv64) == 2bv8); free ensures (memory_load8_le(mem, 1883bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -230,3 +140,4 @@ procedure main() assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l00000914; } + diff --git a/src/test/incorrect/iflocal/gcc_pic/iflocal.expected b/src/test/incorrect/iflocal/gcc_pic/iflocal.expected index 2eb140e57..4bf716667 100644 --- a/src/test/incorrect/iflocal/gcc_pic/iflocal.expected +++ b/src/test/incorrect/iflocal/gcc_pic/iflocal.expected @@ -25,6 +25,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -44,43 +48,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1881bv64) == 0bv8); free ensures (memory_load8_le(mem, 1882bv64) == 2bv8); free ensures (memory_load8_le(mem, 1883bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -91,98 +69,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_stack, R0, R31, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1880bv64) == 1bv8); free requires (memory_load8_le(mem, 1881bv64) == 0bv8); free requires (memory_load8_le(mem, 1882bv64) == 2bv8); free requires (memory_load8_le(mem, 1883bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1880bv64) == 1bv8); free ensures (memory_load8_le(mem, 1881bv64) == 0bv8); free ensures (memory_load8_le(mem, 1882bv64) == 2bv8); free ensures (memory_load8_le(mem, 1883bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv32; var CF: bv1; @@ -230,3 +140,4 @@ procedure main() assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l00000914; } + diff --git a/src/test/incorrect/nestedifglobal/clang/nestedifglobal.expected b/src/test/incorrect/nestedifglobal/clang/nestedifglobal.expected index 87cfa4dab..e9595727d 100644 --- a/src/test/incorrect/nestedifglobal/clang/nestedifglobal.expected +++ b/src/test/incorrect/nestedifglobal/clang/nestedifglobal.expected @@ -33,6 +33,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -52,43 +56,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1977bv64) == 0bv8); free ensures (memory_load8_le(mem, 1978bv64) == 2bv8); free ensures (memory_load8_le(mem, 1979bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -99,98 +77,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R31, R8, R9, mem, stack; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1976bv64) == 1bv8); free requires (memory_load8_le(mem, 1977bv64) == 0bv8); free requires (memory_load8_le(mem, 1978bv64) == 2bv8); free requires (memory_load8_le(mem, 1979bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1976bv64) == 1bv8); free ensures (memory_load8_le(mem, 1977bv64) == 0bv8); free ensures (memory_load8_le(mem, 1978bv64) == 2bv8); free ensures (memory_load8_le(mem, 1979bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var #4: bv32; var #5: bv32; @@ -374,3 +284,4 @@ procedure main() assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l0000042c; } + diff --git a/src/test/incorrect/nestedifglobal/clang_no_plt_no_pic/nestedifglobal.expected b/src/test/incorrect/nestedifglobal/clang_no_plt_no_pic/nestedifglobal.expected index bd4cadff9..fb1393842 100644 --- a/src/test/incorrect/nestedifglobal/clang_no_plt_no_pic/nestedifglobal.expected +++ b/src/test/incorrect/nestedifglobal/clang_no_plt_no_pic/nestedifglobal.expected @@ -33,6 +33,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -52,43 +56,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1977bv64) == 0bv8); free ensures (memory_load8_le(mem, 1978bv64) == 2bv8); free ensures (memory_load8_le(mem, 1979bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -99,98 +77,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R31, R8, R9, mem, stack; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 1976bv64) == 1bv8); free requires (memory_load8_le(mem, 1977bv64) == 0bv8); free requires (memory_load8_le(mem, 1978bv64) == 2bv8); free requires (memory_load8_le(mem, 1979bv64) == 0bv8); - free requires (memory_load8_le(mem, 69064bv64) == 16bv8); - free requires (memory_load8_le(mem, 69065bv64) == 7bv8); - free requires (memory_load8_le(mem, 69066bv64) == 0bv8); - free requires (memory_load8_le(mem, 69067bv64) == 0bv8); - free requires (memory_load8_le(mem, 69068bv64) == 0bv8); - free requires (memory_load8_le(mem, 69069bv64) == 0bv8); - free requires (memory_load8_le(mem, 69070bv64) == 0bv8); - free requires (memory_load8_le(mem, 69071bv64) == 0bv8); - free requires (memory_load8_le(mem, 69072bv64) == 192bv8); - free requires (memory_load8_le(mem, 69073bv64) == 6bv8); - free requires (memory_load8_le(mem, 69074bv64) == 0bv8); - free requires (memory_load8_le(mem, 69075bv64) == 0bv8); - free requires (memory_load8_le(mem, 69076bv64) == 0bv8); - free requires (memory_load8_le(mem, 69077bv64) == 0bv8); - free requires (memory_load8_le(mem, 69078bv64) == 0bv8); - free requires (memory_load8_le(mem, 69079bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 20bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69064bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69072bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1976bv64) == 1bv8); free ensures (memory_load8_le(mem, 1977bv64) == 0bv8); free ensures (memory_load8_le(mem, 1978bv64) == 2bv8); free ensures (memory_load8_le(mem, 1979bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69064bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69065bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69066bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69067bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69068bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69069bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69070bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69071bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69072bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69073bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69074bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69075bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69076bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69077bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69078bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69079bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69064bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69072bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + +implementation main() { var #4: bv32; var #5: bv32; @@ -374,3 +284,4 @@ procedure main() assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l00000b7c; } + diff --git a/src/test/incorrect/nestedifglobal/clang_pic/nestedifglobal.expected b/src/test/incorrect/nestedifglobal/clang_pic/nestedifglobal.expected index e3f54f47c..21323328b 100644 --- a/src/test/incorrect/nestedifglobal/clang_pic/nestedifglobal.expected +++ b/src/test/incorrect/nestedifglobal/clang_pic/nestedifglobal.expected @@ -68,59 +68,19 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 2053bv64) == 0bv8); free ensures (memory_load8_le(mem, 2054bv64) == 2bv8); free ensures (memory_load8_le(mem, 2055bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69576bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69577bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69578bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69579bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69580bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69581bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69582bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69583bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69048bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69049bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69050bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69051bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69052bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69053bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69054bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69055bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69568bv64) == 56bv8); - free ensures (memory_load8_le(mem, 69569bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69570bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69571bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69572bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69573bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69574bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69575bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69576bv64) == 69684bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69048bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69568bv64) == 69688bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1792bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -131,130 +91,34 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R31, Gamma_R8, Gamma_R9, Gamma_mem, Gamma_stack, R0, R31, R8, R9, mem, stack; - free requires (memory_load8_le(mem, 69664bv64) == 0bv8); - free requires (memory_load8_le(mem, 69665bv64) == 0bv8); - free requires (memory_load8_le(mem, 69666bv64) == 0bv8); - free requires (memory_load8_le(mem, 69667bv64) == 0bv8); - free requires (memory_load8_le(mem, 69668bv64) == 0bv8); - free requires (memory_load8_le(mem, 69669bv64) == 0bv8); - free requires (memory_load8_le(mem, 69670bv64) == 0bv8); - free requires (memory_load8_le(mem, 69671bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); + free requires (memory_load64_le(mem, 69664bv64) == 0bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); free requires (memory_load8_le(mem, 2052bv64) == 1bv8); free requires (memory_load8_le(mem, 2053bv64) == 0bv8); free requires (memory_load8_le(mem, 2054bv64) == 2bv8); free requires (memory_load8_le(mem, 2055bv64) == 0bv8); - free requires (memory_load8_le(mem, 69576bv64) == 52bv8); - free requires (memory_load8_le(mem, 69577bv64) == 16bv8); - free requires (memory_load8_le(mem, 69578bv64) == 1bv8); - free requires (memory_load8_le(mem, 69579bv64) == 0bv8); - free requires (memory_load8_le(mem, 69580bv64) == 0bv8); - free requires (memory_load8_le(mem, 69581bv64) == 0bv8); - free requires (memory_load8_le(mem, 69582bv64) == 0bv8); - free requires (memory_load8_le(mem, 69583bv64) == 0bv8); - free requires (memory_load8_le(mem, 69672bv64) == 40bv8); - free requires (memory_load8_le(mem, 69673bv64) == 16bv8); - free requires (memory_load8_le(mem, 69674bv64) == 1bv8); - free requires (memory_load8_le(mem, 69675bv64) == 0bv8); - free requires (memory_load8_le(mem, 69676bv64) == 0bv8); - free requires (memory_load8_le(mem, 69677bv64) == 0bv8); - free requires (memory_load8_le(mem, 69678bv64) == 0bv8); - free requires (memory_load8_le(mem, 69679bv64) == 0bv8); - free requires (memory_load8_le(mem, 69048bv64) == 80bv8); - free requires (memory_load8_le(mem, 69049bv64) == 7bv8); - free requires (memory_load8_le(mem, 69050bv64) == 0bv8); - free requires (memory_load8_le(mem, 69051bv64) == 0bv8); - free requires (memory_load8_le(mem, 69052bv64) == 0bv8); - free requires (memory_load8_le(mem, 69053bv64) == 0bv8); - free requires (memory_load8_le(mem, 69054bv64) == 0bv8); - free requires (memory_load8_le(mem, 69055bv64) == 0bv8); - free requires (memory_load8_le(mem, 69568bv64) == 56bv8); - free requires (memory_load8_le(mem, 69569bv64) == 16bv8); - free requires (memory_load8_le(mem, 69570bv64) == 1bv8); - free requires (memory_load8_le(mem, 69571bv64) == 0bv8); - free requires (memory_load8_le(mem, 69572bv64) == 0bv8); - free requires (memory_load8_le(mem, 69573bv64) == 0bv8); - free requires (memory_load8_le(mem, 69574bv64) == 0bv8); - free requires (memory_load8_le(mem, 69575bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 84bv8); - free requires (memory_load8_le(mem, 69593bv64) == 7bv8); - free requires (memory_load8_le(mem, 69594bv64) == 0bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69056bv64) == 0bv8); - free requires (memory_load8_le(mem, 69057bv64) == 7bv8); - free requires (memory_load8_le(mem, 69058bv64) == 0bv8); - free requires (memory_load8_le(mem, 69059bv64) == 0bv8); - free requires (memory_load8_le(mem, 69060bv64) == 0bv8); - free requires (memory_load8_le(mem, 69061bv64) == 0bv8); - free requires (memory_load8_le(mem, 69062bv64) == 0bv8); - free requires (memory_load8_le(mem, 69063bv64) == 0bv8); + free requires (memory_load64_le(mem, 69576bv64) == 69684bv64); + free requires (memory_load64_le(mem, 69672bv64) == 69672bv64); + free requires (memory_load64_le(mem, 69048bv64) == 1872bv64); + free requires (memory_load64_le(mem, 69568bv64) == 69688bv64); + free requires (memory_load64_le(mem, 69592bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69056bv64) == 1792bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 2052bv64) == 1bv8); free ensures (memory_load8_le(mem, 2053bv64) == 0bv8); free ensures (memory_load8_le(mem, 2054bv64) == 2bv8); free ensures (memory_load8_le(mem, 2055bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69576bv64) == 52bv8); - free ensures (memory_load8_le(mem, 69577bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69578bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69579bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69580bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69581bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69582bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69583bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69672bv64) == 40bv8); - free ensures (memory_load8_le(mem, 69673bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69674bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69675bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69676bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69677bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69678bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69679bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69048bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69049bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69050bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69051bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69052bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69053bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69054bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69055bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69568bv64) == 56bv8); - free ensures (memory_load8_le(mem, 69569bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69570bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69571bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69572bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69573bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69574bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69575bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69056bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69057bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69058bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69059bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69060bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69061bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69062bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69063bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69576bv64) == 69684bv64); + free ensures (memory_load64_le(mem, 69672bv64) == 69672bv64); + free ensures (memory_load64_le(mem, 69048bv64) == 1872bv64); + free ensures (memory_load64_le(mem, 69568bv64) == 69688bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69056bv64) == 1792bv64); + +implementation main() { var #4: bv32; var #5: bv32; @@ -444,3 +308,4 @@ procedure main() assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); goto l00000449; } + diff --git a/src/test/incorrect/nestedifglobal/gcc/nestedifglobal.expected b/src/test/incorrect/nestedifglobal/gcc/nestedifglobal.expected index fa0a032fa..6ce2aa734 100644 --- a/src/test/incorrect/nestedifglobal/gcc/nestedifglobal.expected +++ b/src/test/incorrect/nestedifglobal/gcc/nestedifglobal.expected @@ -31,6 +31,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -50,43 +54,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1957bv64) == 0bv8); free ensures (memory_load8_le(mem, 1958bv64) == 2bv8); free ensures (memory_load8_le(mem, 1959bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -97,98 +75,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R31, mem, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1956bv64) == 1bv8); free requires (memory_load8_le(mem, 1957bv64) == 0bv8); free requires (memory_load8_le(mem, 1958bv64) == 2bv8); free requires (memory_load8_le(mem, 1959bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1956bv64) == 1bv8); free ensures (memory_load8_le(mem, 1957bv64) == 0bv8); free ensures (memory_load8_le(mem, 1958bv64) == 2bv8); free ensures (memory_load8_le(mem, 1959bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv32; var #5: bv32; @@ -303,3 +213,4 @@ procedure main() assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l000003ed; } + diff --git a/src/test/incorrect/nestedifglobal/gcc_no_plt_no_pic/nestedifglobal.expected b/src/test/incorrect/nestedifglobal/gcc_no_plt_no_pic/nestedifglobal.expected index ccd235a1c..7fb79cb20 100644 --- a/src/test/incorrect/nestedifglobal/gcc_no_plt_no_pic/nestedifglobal.expected +++ b/src/test/incorrect/nestedifglobal/gcc_no_plt_no_pic/nestedifglobal.expected @@ -31,6 +31,10 @@ function {:extern} memory_load32_le(memory: [bv64]bv8, index: bv64) returns (bv3 (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))) } +function {:extern} memory_load64_le(memory: [bv64]bv8, index: bv64) returns (bv64) { + (memory[bvadd64(index, 7bv64)] ++ (memory[bvadd64(index, 6bv64)] ++ (memory[bvadd64(index, 5bv64)] ++ (memory[bvadd64(index, 4bv64)] ++ (memory[bvadd64(index, 3bv64)] ++ (memory[bvadd64(index, 2bv64)] ++ (memory[bvadd64(index, 1bv64)] ++ memory[index]))))))) +} + function {:extern} memory_load8_le(memory: [bv64]bv8, index: bv64) returns (bv8) { memory[index] } @@ -50,43 +54,17 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 1957bv64) == 0bv8); free ensures (memory_load8_le(mem, 1958bv64) == 2bv8); free ensures (memory_load8_le(mem, 1959bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -97,98 +75,30 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R31, mem, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 1956bv64) == 1bv8); free requires (memory_load8_le(mem, 1957bv64) == 0bv8); free requires (memory_load8_le(mem, 1958bv64) == 2bv8); free requires (memory_load8_le(mem, 1959bv64) == 0bv8); - free requires (memory_load8_le(mem, 69016bv64) == 16bv8); - free requires (memory_load8_le(mem, 69017bv64) == 7bv8); - free requires (memory_load8_le(mem, 69018bv64) == 0bv8); - free requires (memory_load8_le(mem, 69019bv64) == 0bv8); - free requires (memory_load8_le(mem, 69020bv64) == 0bv8); - free requires (memory_load8_le(mem, 69021bv64) == 0bv8); - free requires (memory_load8_le(mem, 69022bv64) == 0bv8); - free requires (memory_load8_le(mem, 69023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69024bv64) == 192bv8); - free requires (memory_load8_le(mem, 69025bv64) == 6bv8); - free requires (memory_load8_le(mem, 69026bv64) == 0bv8); - free requires (memory_load8_le(mem, 69027bv64) == 0bv8); - free requires (memory_load8_le(mem, 69028bv64) == 0bv8); - free requires (memory_load8_le(mem, 69029bv64) == 0bv8); - free requires (memory_load8_le(mem, 69030bv64) == 0bv8); - free requires (memory_load8_le(mem, 69031bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 20bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69016bv64) == 1808bv64); + free requires (memory_load64_le(mem, 69024bv64) == 1728bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1812bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 1956bv64) == 1bv8); free ensures (memory_load8_le(mem, 1957bv64) == 0bv8); free ensures (memory_load8_le(mem, 1958bv64) == 2bv8); free ensures (memory_load8_le(mem, 1959bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69016bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69017bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69018bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69019bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69020bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69021bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69022bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69024bv64) == 192bv8); - free ensures (memory_load8_le(mem, 69025bv64) == 6bv8); - free ensures (memory_load8_le(mem, 69026bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69027bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69028bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69029bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69030bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69031bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69016bv64) == 1808bv64); + free ensures (memory_load64_le(mem, 69024bv64) == 1728bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1812bv64); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + +implementation main() { var #4: bv32; var #5: bv32; @@ -303,3 +213,4 @@ procedure main() assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l00000ae5; } + diff --git a/src/test/incorrect/nestedifglobal/gcc_pic/nestedifglobal.expected b/src/test/incorrect/nestedifglobal/gcc_pic/nestedifglobal.expected index f2b82be6a..9caf56473 100644 --- a/src/test/incorrect/nestedifglobal/gcc_pic/nestedifglobal.expected +++ b/src/test/incorrect/nestedifglobal/gcc_pic/nestedifglobal.expected @@ -58,59 +58,19 @@ procedure {:extern} rely(); free ensures (memory_load8_le(mem, 2021bv64) == 0bv8); free ensures (memory_load8_le(mem, 2022bv64) == 2bv8); free ensures (memory_load8_le(mem, 2023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69600bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69601bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69602bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69603bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69604bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69605bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69606bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69607bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 24bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69600bv64) == 69652bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 69656bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1872bv64); -procedure {:extern} rely_transitive() +procedure {:extern} rely_transitive(); modifies Gamma_mem, mem; ensures (mem == old(mem)); ensures (Gamma_mem == old(Gamma_mem)); + +implementation {:extern} rely_transitive() { call rely(); call rely(); @@ -121,130 +81,34 @@ procedure {:extern} rely_reflexive(); procedure {:extern} guarantee_reflexive(); modifies Gamma_mem, mem; -procedure main() +procedure main(); modifies Gamma_R0, Gamma_R1, Gamma_R31, Gamma_mem, Gamma_stack, R0, R1, R31, mem, stack; - free requires (memory_load8_le(mem, 69632bv64) == 0bv8); - free requires (memory_load8_le(mem, 69633bv64) == 0bv8); - free requires (memory_load8_le(mem, 69634bv64) == 0bv8); - free requires (memory_load8_le(mem, 69635bv64) == 0bv8); - free requires (memory_load8_le(mem, 69636bv64) == 0bv8); - free requires (memory_load8_le(mem, 69637bv64) == 0bv8); - free requires (memory_load8_le(mem, 69638bv64) == 0bv8); - free requires (memory_load8_le(mem, 69639bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); + free requires (memory_load64_le(mem, 69632bv64) == 0bv64); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); free requires (memory_load8_le(mem, 2020bv64) == 1bv8); free requires (memory_load8_le(mem, 2021bv64) == 0bv8); free requires (memory_load8_le(mem, 2022bv64) == 2bv8); free requires (memory_load8_le(mem, 2023bv64) == 0bv8); - free requires (memory_load8_le(mem, 69640bv64) == 8bv8); - free requires (memory_load8_le(mem, 69641bv64) == 16bv8); - free requires (memory_load8_le(mem, 69642bv64) == 1bv8); - free requires (memory_load8_le(mem, 69643bv64) == 0bv8); - free requires (memory_load8_le(mem, 69644bv64) == 0bv8); - free requires (memory_load8_le(mem, 69645bv64) == 0bv8); - free requires (memory_load8_le(mem, 69646bv64) == 0bv8); - free requires (memory_load8_le(mem, 69647bv64) == 0bv8); - free requires (memory_load8_le(mem, 69616bv64) == 84bv8); - free requires (memory_load8_le(mem, 69617bv64) == 7bv8); - free requires (memory_load8_le(mem, 69618bv64) == 0bv8); - free requires (memory_load8_le(mem, 69619bv64) == 0bv8); - free requires (memory_load8_le(mem, 69620bv64) == 0bv8); - free requires (memory_load8_le(mem, 69621bv64) == 0bv8); - free requires (memory_load8_le(mem, 69622bv64) == 0bv8); - free requires (memory_load8_le(mem, 69623bv64) == 0bv8); - free requires (memory_load8_le(mem, 69600bv64) == 20bv8); - free requires (memory_load8_le(mem, 69601bv64) == 16bv8); - free requires (memory_load8_le(mem, 69602bv64) == 1bv8); - free requires (memory_load8_le(mem, 69603bv64) == 0bv8); - free requires (memory_load8_le(mem, 69604bv64) == 0bv8); - free requires (memory_load8_le(mem, 69605bv64) == 0bv8); - free requires (memory_load8_le(mem, 69606bv64) == 0bv8); - free requires (memory_load8_le(mem, 69607bv64) == 0bv8); - free requires (memory_load8_le(mem, 69008bv64) == 0bv8); - free requires (memory_load8_le(mem, 69009bv64) == 7bv8); - free requires (memory_load8_le(mem, 69010bv64) == 0bv8); - free requires (memory_load8_le(mem, 69011bv64) == 0bv8); - free requires (memory_load8_le(mem, 69012bv64) == 0bv8); - free requires (memory_load8_le(mem, 69013bv64) == 0bv8); - free requires (memory_load8_le(mem, 69014bv64) == 0bv8); - free requires (memory_load8_le(mem, 69015bv64) == 0bv8); - free requires (memory_load8_le(mem, 69592bv64) == 24bv8); - free requires (memory_load8_le(mem, 69593bv64) == 16bv8); - free requires (memory_load8_le(mem, 69594bv64) == 1bv8); - free requires (memory_load8_le(mem, 69595bv64) == 0bv8); - free requires (memory_load8_le(mem, 69596bv64) == 0bv8); - free requires (memory_load8_le(mem, 69597bv64) == 0bv8); - free requires (memory_load8_le(mem, 69598bv64) == 0bv8); - free requires (memory_load8_le(mem, 69599bv64) == 0bv8); - free requires (memory_load8_le(mem, 69000bv64) == 80bv8); - free requires (memory_load8_le(mem, 69001bv64) == 7bv8); - free requires (memory_load8_le(mem, 69002bv64) == 0bv8); - free requires (memory_load8_le(mem, 69003bv64) == 0bv8); - free requires (memory_load8_le(mem, 69004bv64) == 0bv8); - free requires (memory_load8_le(mem, 69005bv64) == 0bv8); - free requires (memory_load8_le(mem, 69006bv64) == 0bv8); - free requires (memory_load8_le(mem, 69007bv64) == 0bv8); + free requires (memory_load64_le(mem, 69640bv64) == 69640bv64); + free requires (memory_load64_le(mem, 69616bv64) == 1876bv64); + free requires (memory_load64_le(mem, 69600bv64) == 69652bv64); + free requires (memory_load64_le(mem, 69008bv64) == 1792bv64); + free requires (memory_load64_le(mem, 69592bv64) == 69656bv64); + free requires (memory_load64_le(mem, 69000bv64) == 1872bv64); free ensures (Gamma_R31 == old(Gamma_R31)); free ensures (R31 == old(R31)); free ensures (memory_load8_le(mem, 2020bv64) == 1bv8); free ensures (memory_load8_le(mem, 2021bv64) == 0bv8); free ensures (memory_load8_le(mem, 2022bv64) == 2bv8); free ensures (memory_load8_le(mem, 2023bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69640bv64) == 8bv8); - free ensures (memory_load8_le(mem, 69641bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69642bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69643bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69644bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69645bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69646bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69647bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69616bv64) == 84bv8); - free ensures (memory_load8_le(mem, 69617bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69618bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69619bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69620bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69621bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69622bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69623bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69600bv64) == 20bv8); - free ensures (memory_load8_le(mem, 69601bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69602bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69603bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69604bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69605bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69606bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69607bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69008bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69009bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69010bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69011bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69012bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69013bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69014bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69015bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69592bv64) == 24bv8); - free ensures (memory_load8_le(mem, 69593bv64) == 16bv8); - free ensures (memory_load8_le(mem, 69594bv64) == 1bv8); - free ensures (memory_load8_le(mem, 69595bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69596bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69597bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69598bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69599bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69000bv64) == 80bv8); - free ensures (memory_load8_le(mem, 69001bv64) == 7bv8); - free ensures (memory_load8_le(mem, 69002bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69003bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69004bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69005bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69006bv64) == 0bv8); - free ensures (memory_load8_le(mem, 69007bv64) == 0bv8); + free ensures (memory_load64_le(mem, 69640bv64) == 69640bv64); + free ensures (memory_load64_le(mem, 69616bv64) == 1876bv64); + free ensures (memory_load64_le(mem, 69600bv64) == 69652bv64); + free ensures (memory_load64_le(mem, 69008bv64) == 1792bv64); + free ensures (memory_load64_le(mem, 69592bv64) == 69656bv64); + free ensures (memory_load64_le(mem, 69000bv64) == 1872bv64); + +implementation main() { var #4: bv32; var #5: bv32; @@ -363,3 +227,4 @@ procedure main() assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); goto l000003f0; } + diff --git a/src/test/scala/MemoryRegionAnalysisMiscTest.scala b/src/test/scala/MemoryRegionAnalysisMiscTest.scala index a25061293..8a71355f4 100644 --- a/src/test/scala/MemoryRegionAnalysisMiscTest.scala +++ b/src/test/scala/MemoryRegionAnalysisMiscTest.scala @@ -23,6 +23,7 @@ class MemoryRegionAnalysisMiscTest extends AnyFunSuite with OneInstancePerTest { relfFile = examplesPath + s"$name/$name.relf", specFile = None, dumpIL = None, + mainProcedureName = "main", ), runInterpret = false, staticAnalysis = Some(StaticAnalysisConfig()), diff --git a/src/test/scala/ir/InterpreterTests.scala b/src/test/scala/ir/InterpreterTests.scala index dc30b32a6..1fd17e823 100644 --- a/src/test/scala/ir/InterpreterTests.scala +++ b/src/test/scala/ir/InterpreterTests.scala @@ -7,6 +7,7 @@ import specification.SpecGlobal import translating.BAPToIR import util.{LogLevel, Logger} import util.RunUtils.{loadBAP, loadReadELF} +import util.ILLoadingConfig class InterpreterTests extends AnyFunSuite with BeforeAndAfter { @@ -14,8 +15,18 @@ class InterpreterTests extends AnyFunSuite with BeforeAndAfter { Logger.setLevel(LogLevel.DEBUG) def getProgram(name: String): (Program, Set[SpecGlobal]) = { - val bapProgram = loadBAP(s"examples/$name/$name.adt") - val (externalFunctions, globals, _, mainAddress) = loadReadELF(s"examples/$name/$name.relf") + + + val loading = ILLoadingConfig( + adtFile = s"examples/$name/$name.adt", + relfFile = s"examples/$name/$name.relf", + specFile = None, + dumpIL = None, + mainProcedureName = "main", + ) + + val bapProgram = loadBAP(loading.adtFile) + val (externalFunctions, globals, _, mainAddress) = loadReadELF(loading.relfFile, loading) val IRTranslator = BAPToIR(bapProgram, mainAddress) var IRProgram = IRTranslator.translate IRProgram = ExternalRemover(externalFunctions.map(e => e.name)).visitProgram(IRProgram)