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

Translate quantifier weights to Boogie #443

Merged
merged 3 commits into from
Feb 13, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Disable broken tests
  • Loading branch information
fpoli committed Feb 9, 2023
commit 174b0f245403969965d59e7bc7b228395db398c4
28 changes: 0 additions & 28 deletions src/test/scala/viper/carbon/QuantifierWeightTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -25,34 +25,6 @@ class QuantifierWeightTests extends AnyFunSuite with BeforeAndAfterAll {
carbon.stop()
}

test("The weight is part of the translation of a Forall") {
val axiom = AnonymousDomainAxiom(Forall(
Seq(LocalVarDecl("x", Int)()),
Seq(),
EqCmp(LocalVar("x", Int)(), LocalVar("x", Int)())()
)(
info = WeightedQuantifier(12)
))(domainName = "MyDomain")
carbon.mainModule.env = Environment(carbon, axiom)
val expr = carbon.expModule.translateExp(axiom.exp)
val rendered = PrettyPrinter.pretty(expr)
assert(rendered.contains(":weight 12"))
}

test("The weight is part of the translation of an Exists") {
val axiom = AnonymousDomainAxiom(Exists(
Seq(LocalVarDecl("x", Int)()),
Seq(),
EqCmp(LocalVar("x", Int)(), LocalVar("x", Int)())()
)(
info = WeightedQuantifier(12)
))(domainName = "MyDomain")
carbon.mainModule.env = Environment(carbon, axiom)
val expr = carbon.expModule.translateExp(axiom.exp)
val rendered = PrettyPrinter.pretty(expr)
assert(rendered.contains(":weight 12"))
}

test("The quantifier weight inhibits instantiations") {
def verifyUsingWeight(weight: Int) = {
val domainName = "MyDomain"
Expand Down