summaryrefslogtreecommitdiff
path: root/Examples/ocaml/contract/example.i
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/ocaml/contract/example.i')
-rw-r--r--Examples/ocaml/contract/example.i18
1 files changed, 18 insertions, 0 deletions
diff --git a/Examples/ocaml/contract/example.i b/Examples/ocaml/contract/example.i
new file mode 100644
index 0000000..28d9dd7
--- /dev/null
+++ b/Examples/ocaml/contract/example.i
@@ -0,0 +1,18 @@
+%module example
+%{
+#include <math.h>
+%}
+
+/* File : example.i */
+%module example
+
+%contract cos(double d) {
+require:
+ d >= -3.14159265358979323845254338327950;
+ d < 3.14159265358979323846264338327950;
+ensure:
+ cos >= -1.0;
+ cos <= 1.0;
+}
+
+double cos(double d); \ No newline at end of file