summaryrefslogtreecommitdiff
path: root/Binaries/DafnyPrelude.bpl
diff options
context:
space:
mode:
authorGravatar Rustan Leino <unknown>2014-06-10 18:15:59 -0700
committerGravatar Rustan Leino <unknown>2014-06-10 18:15:59 -0700
commit92991242c8ea361b8da5a83bd19462b216387618 (patch)
treeb4fc209784850986f05bfcdf7e80957e520ad819 /Binaries/DafnyPrelude.bpl
parent2dcb445f1addae38aff40d5a153952ee7b4130e5 (diff)
Specialized Lit function for int and real (leaving all other cases polymorphic). This reduces the number of int<->U conversions that Boogie adds, which avoids a looping problem in Z3.
(Regrettably, the test suite seems to have become rather unstable. Sometimes everything verifies and sometimes there is some looping forever.)
Diffstat (limited to 'Binaries/DafnyPrelude.bpl')
-rw-r--r--Binaries/DafnyPrelude.bpl4
1 files changed, 4 insertions, 0 deletions
diff --git a/Binaries/DafnyPrelude.bpl b/Binaries/DafnyPrelude.bpl
index 3d993797..3f508c81 100644
--- a/Binaries/DafnyPrelude.bpl
+++ b/Binaries/DafnyPrelude.bpl
@@ -10,6 +10,10 @@ axiom $$Language$Dafny; // coming from a Dafny program.
// ---------------------------------------------------------------
// -- Literals ---------------------------------------------------
// ---------------------------------------------------------------
+function {:identity} LitInt(x: int): int { x }
+axiom (forall x: int :: { $Box(LitInt(x)) } $Box(LitInt(x)) == Lit($Box(x)) );
+function {:identity} LitReal(x: real): real { x }
+axiom (forall x: real :: { $Box(LitReal(x)) } $Box(LitReal(x)) == Lit($Box(x)) );
function {:identity} Lit<T>(x: T): T { x }
axiom (forall<T> x: T :: { $Box(Lit(x)) } $Box(Lit(x)) == Lit($Box(x)) );