Skip to content
Snippets Groups Projects
Commit 46aae11d authored by Philippe Suter's avatar Philippe Suter
Browse files

minor

parent b5e7a59f
Branches
Tags
No related merge requests found
package funcheck
object Utils {
sealed class IsValid(val property : Boolean) {
def holds : Boolean = {
assert(property)
property
}
}
implicit def any2IsValid(x: Boolean) : IsValid = new IsValid(x)
}
package purescala
import Common._
import Definitions._
import Trees._
import TypeTrees._
class PartialEvaluator(val program: Program) {
val reporter = Settings.reporter
// Simplifies by partially evaluating.
// Of course, I still have to decide what 'simplified' means.
def apply(expression: Expr) : Expr = {
def rec(expr: Expr, letMap: Map[Identifier,Expr]) : Expr = {
expr
}
rec(expression, Map.empty)
}
}
import funcheck.Utils._
object Viktor {
def transitive(x: Boolean, y: Boolean, z: Boolean) : Boolean = {
!(x == y && y == z) || x == z
} holds
def doesNotHold1(x: Int, y: Int) : Boolean = {
x + 2 > y * 2
} holds
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment