summaryrefslogtreecommitdiff
path: root/Test/dafny0/Include.dfy
diff options
context:
space:
mode:
authorGravatar Bryan Parno <parno@microsoft.com>2013-12-10 13:41:50 -0800
committerGravatar Bryan Parno <parno@microsoft.com>2013-12-10 13:41:50 -0800
commit195097dc1353946f524f2518453bd356a09f6681 (patch)
treeffeb46c86abb50fa8f2df26dddd9526880f39bd1 /Test/dafny0/Include.dfy
parent982e64871949040b3d766c4d36f9ccdf5f506f7a (diff)
Add support for the "include" keyword, which accepts a (possibly relative) path
to another Dafny file. That file's functions and methods are included but not checked. This is intended to support incremental verification on a per-file basis.
Diffstat (limited to 'Test/dafny0/Include.dfy')
-rw-r--r--Test/dafny0/Include.dfy12
1 files changed, 12 insertions, 0 deletions
diff --git a/Test/dafny0/Include.dfy b/Test/dafny0/Include.dfy
new file mode 100644
index 00000000..a228194f
--- /dev/null
+++ b/Test/dafny0/Include.dfy
@@ -0,0 +1,12 @@
+
+include "Includee.dfy"
+
+method test_include(z:int)
+{
+ // Make sure we can still see function bodies
+ assert forall y :: f(y) == 2*y;
+
+ // Use an unverified method
+ var w := m_unproven(z);
+ assert w == 2*z;
+}