diff --git a/MOF.sml b/MOF.sml deleted file mode 100644 index 61b787d..0000000 --- a/MOF.sml +++ /dev/null @@ -1,71 +0,0 @@ -structure MOF : sig - type 'a equal - type num - type 'a rexp - type char - type attribute_types - type class_hierarchy - val mt : class_hierarchy - val classes : class_hierarchy -> string list - val all_entities : - class_hierarchy -> ((string * (string * string) rexp) list) list - val all_attributes : class_hierarchy -> ((string * attribute_types) list) list - val remove_overrides : 'b equal -> ('a -> 'b) -> 'a list -> 'a list -end = struct - -type 'a equal = {equal : 'a -> 'a -> bool}; -val equal = #equal : 'a equal -> 'a -> 'a -> bool; - -datatype int = Int_of_integer of IntInf.int; - -datatype num = One | Bit0 of num | Bit1 of num; - -datatype 'a rexp = Empty | Atom of 'a | Alt of 'a rexp * 'a rexp | - Conc of 'a rexp * 'a rexp | Star of 'a rexp; - -datatype char = Zero_char | Char of num; - -datatype attribute_types = File_T of string | Image_file_T of string | - Thms_T of string list | Int_T of int | Bool_T of bool | String_T of string | - Text_T of string | Range_T of int * int option | Enum_T of string list; - -datatype class_hierarchy = - Class_T of - string * class_hierarchy list * (string * attribute_types) list * - (string * (string * string) rexp) list; - -fun eq A_ a b = equal A_ a b; - -fun maps f [] = [] - | maps f (x :: xs) = f x @ maps f xs; - -fun implode _ = raise Fail "String.implode"; - -val mt : class_hierarchy = - Class_T (implode [Char (Bit1 (Bit1 (Bit1 (Bit1 (Bit0 One)))))], [], [], []); - -fun member A_ [] y = false - | member A_ (x :: xs) y = eq A_ x y orelse member A_ xs y; - -fun map f [] = [] - | map f (x21 :: x22) = f x21 :: map f x22; - -fun classes (Class_T (name, sub_classes, attr, comps)) = - name :: maps classes sub_classes; - -fun entities (Class_T (x1, x2, x3, x4)) = x4; - -fun all_entities (Class_T (name, sub_classes, attr, comps)) = - comps :: map entities sub_classes; - -fun attributes (Class_T (x1, x2, x3, x4)) = x3; - -fun all_attributes (Class_T (name, sub_classes, attr, comps)) = - attr :: map attributes sub_classes; - -fun remove_overrides B_ f [] = [] - | remove_overrides B_ f (a :: r) = - (if member B_ (map f r) (f a) then remove_overrides B_ f r - else a :: remove_overrides B_ f r); - -end; (*struct MOF*) diff --git a/examples/math_exam/FormSheet.pdf b/examples/math_exam/FormSheet.pdf new file mode 100644 index 0000000..a628ff7 Binary files /dev/null and b/examples/math_exam/FormSheet.pdf differ diff --git a/examples/math_exam/FormSheet.tex b/examples/math_exam/FormSheet.tex new file mode 100644 index 0000000..501d1b6 --- /dev/null +++ b/examples/math_exam/FormSheet.tex @@ -0,0 +1,22 @@ +\documentclass{article} + +\usepackage{hyperref} + +\begin{document} + +\begin{Form}[action={http://your-web-server.com/path/receiveform.cgi}] +\begin{tabular}{l} + \TextField{From } \\\\ + \TextField{have 1} \\\\ + \TextField{have 2} \\\\ + \TextField{have 3} \\\\ + \TextField{finally show} \\\\ + \CheckBox[width=1em]{Has the polynomial as many solutions as its degree ? } \\\\ + \Submit{Submit}\\ +\end{tabular} +\end{Form} + + + +\end{document} + diff --git a/examples/simple/MathExam.thy b/examples/math_exam/MathExam.thy similarity index 100% rename from examples/simple/MathExam.thy rename to examples/math_exam/MathExam.thy diff --git a/examples/simple/Article.thy b/examples/scholarly/Article.thy similarity index 100% rename from examples/simple/Article.thy rename to examples/scholarly/Article.thy