aboutsummaryrefslogtreecommitdiff
path: root/examples/tutch/checks.sig
diff options
context:
space:
mode:
authorRyan Kavanagh <rak@debian.org>2018-09-13 13:18:07 -0400
committerRyan Kavanagh <rak@debian.org>2018-09-13 13:49:21 -0400
commit465fb70bdcb0acd7a13f8b06c821e9d7496e2603 (patch)
treeddb483f51474bf5d104806912a91a10bb10ca75d /examples/tutch/checks.sig
parentImport autograder from 15-317 f17 (diff)
Imported tutch example
Diffstat (limited to '')
-rw-r--r--examples/tutch/checks.sig23
1 files changed, 23 insertions, 0 deletions
diff --git a/examples/tutch/checks.sig b/examples/tutch/checks.sig
new file mode 100644
index 0000000..6b0453c
--- /dev/null
+++ b/examples/tutch/checks.sig
@@ -0,0 +1,23 @@
+(* Copyright (C) 2017 Ryan Kavanagh <rkavanagh@cs.cmu.edu> *)
+(* Distributed under the ISC license, see COPYING for details. *)
+
+signature CHECKS =
+sig
+ (* checks are either: *)
+ (* Check (name, f): *)
+ (* f : checks some property, and can catastrophically abort *)
+ (* or raise some exception if something is not satisfied. *)
+ (* Useful for sanity checks like: do all desired files *)
+ (* exist? *)
+ (* Problem (name, f): *)
+ (* name : must be the same name as the autolab problem *)
+ (* that is being graded. *)
+ (* f : returns an integer, which is the score awarded for *)
+ (* problem "name". *)
+ datatype checks = Check of string * (unit -> unit)
+ | Problem of string * (unit -> real)
+
+ val checks : checks list
+
+ val scoreboard : (string * real) list -> int list option
+end