Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapting to Silver change #526

Merged
merged 2 commits into from
Sep 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ with DefinednessComponent with ExhaleComponent with InhaleComponent {

val triggers = if (locationAccess.exists(lvds.toSet)) Seq(Trigger(Seq(locationAccess1,locationAccess2))) else Seq() // TODO: we could (also in general) raise an error/warning if the tools fail to find triggers

val res = CommentedDecl("Function used for framing of quantified permission " + qp.toString() + " in " + originalName,
val res = CommentedDecl("Function used for framing of quantified permission " + qp.toString + " in " + originalName,
condFunc ++
Axiom(
Forall(heap1 ++ heap2 ++ origArgs, Seq(Trigger(Seq(funApp1, funApp2, heapModule.successorHeapState(heap1,heap2)))),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -328,13 +328,13 @@ DefaultWandModule(val verifier: Verifier) extends WandModule with StmtComponent
UNIONState = OPS
val StateSetup(usedState, initStmt) = createAndSetState(None)
tempCurState = usedState
Comment("Translating exec of non-ghost operation" + e.toString()) ++
Comment("Translating exec of non-ghost operation" + e.toString) ++
initStmt ++ exhaleExt(ops :: states, usedState,e,ops.boolVar&&allStateAssms, RHS = true, mainError)
}
}

override def exhaleExt(statesObj: List[Any], usedObj:Any, e: sil.Exp, allStateAssms: Exp, RHS: Boolean = false, error: PartialVerificationError, havocHeap: Boolean):Stmt = {
Comment("exhale_ext of " + e.toString())
Comment("exhale_ext of " + e.toString)
val states = statesObj.asInstanceOf[List[StateRep]]
val used = usedObj.asInstanceOf[StateRep]
e match {
Expand Down Expand Up @@ -391,7 +391,7 @@ def transferMain(states: List[StateRep], used:StateRep, e: sil.Exp, allStateAssm

val unionStmt = updateUnion()

MaybeCommentBlock("Transfer of " + e.toString(), stmt ++ unionStmt)
MaybeCommentBlock("Transfer of " + e.toString, stmt ++ unionStmt)

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -611,9 +611,9 @@ class QuantifiedPermModule(val verifier: Verifier)
MaybeComment("wild card assumptions", stmts ++
wildcardAssms) ++
CommentBlock("check that the permission amount is positive", permPositive) ++
CommentBlock("check if receiver " + recv.toString() + " is injective",injectiveAssertion) ++
CommentBlock("check if receiver " + recv.toString + " is injective",injectiveAssertion) ++
CommentBlock("check if sufficient permission is held", enoughPerm) ++
CommentBlock("assumptions for inverse of receiver " + recv.toString(), Assume(invAssm1)++ Assume(invAssm2)) ++
CommentBlock("assumptions for inverse of receiver " + recv.toString, Assume(invAssm1)++ Assume(invAssm2)) ++
CommentBlock("assume permission updates for field " + f.name, Assume(Forall(obj,triggersForPermissionUpdateAxiom, condTrueLocations && condFalseLocations ))) ++
CommentBlock("assume permission updates for independent locations", independentLocations) ++
(mask := qpMask)
Expand Down Expand Up @@ -803,9 +803,9 @@ class QuantifiedPermModule(val verifier: Verifier)
MaybeComment("wildcard assumptions", stmts ++
wildcardAssms) ++
CommentBlock("check that the permission amount is positive", permPositive) ++
CommentBlock("check if receiver " + accPred.toString() + " is injective",injectiveAssertion) ++
CommentBlock("check if receiver " + accPred.toString + " is injective",injectiveAssertion) ++
CommentBlock("check if sufficient permission is held", enoughPerm) ++
CommentBlock("assumptions for inverse of receiver " + accPred.toString(), Assume(invAssm1)++ Assume(invAssm2)) ++
CommentBlock("assumptions for inverse of receiver " + accPred.toString, Assume(invAssm1)++ Assume(invAssm2)) ++
CommentBlock("assume permission updates", permissionsMap ++
independentResource) ++
CommentBlock("assume permission updates for independent locations ", independentLocations) ++
Expand Down Expand Up @@ -1349,7 +1349,7 @@ class QuantifiedPermModule(val verifier: Verifier)

val res1 = Havoc(qpMask) ++
stmts ++
(if (!verifier.assumeInjectivityOnInhale) CommentBlock("check if receiver " + accPred.toString() + " is injective",injectiveAssertion)
(if (!verifier.assumeInjectivityOnInhale) CommentBlock("check if receiver " + accPred.toString + " is injective",injectiveAssertion)
else Nil) ++
CommentBlock("Define Inverse Function", Assume(invAssm1) ++
Assume(invAssm2)) ++
Expand Down
Loading