author | Walther Neuper <walther.neuper@jku.at> |
Tue, 05 May 2020 13:33:23 +0200 | |
changeset 59942 | d6261de56fb0 |
parent 59940 | acfad421e656 |
child 59947 | 3df8a1d00a24 |
permissions | -rw-r--r-- |
walther@59938 | 1 |
(* Title: Specify/o-model.sml |
walther@59938 | 2 |
Author: Walther Neuper 110226 |
walther@59938 | 3 |
(c) due to copyright terms |
walther@59938 | 4 |
*) |
walther@59938 | 5 |
|
walther@59938 | 6 |
signature ORIGINAL_MODEL = |
walther@59938 | 7 |
sig |
walther@59942 | 8 |
(* vats*) |
walther@59940 | 9 |
type variants = Model_Def.variants |
walther@59942 | 10 |
(* ori list*) |
walther@59940 | 11 |
type T = Model_Def.o_model |
walther@59942 | 12 |
(* ori *) |
walther@59940 | 13 |
type single = Model_Def.o_model_single |
walther@59942 | 14 |
(* oris2str*) |
walther@59940 | 15 |
val to_string: T -> string |
walther@59942 | 16 |
(* e_ori*) |
walther@59940 | 17 |
val single_empty: single |
walther@59939 | 18 |
|
walther@59942 | 19 |
(*/------- to O_Model from Model 1 -------\*) |
walther@59942 | 20 |
type preori |
walther@59942 | 21 |
(*\------- to O_Model from Model 1 -------/*) |
walther@59942 | 22 |
|
walther@59938 | 23 |
(* ---- for tests only: shifted from below to remove the Warning "unused" at fun.def. --------- *) |
walther@59942 | 24 |
val preoris2str : preori list -> string |
walther@59938 | 25 |
(*/-------------------------------------------------------- ! aktivate for Test_Isac BEGIN ---\* ) |
walther@59938 | 26 |
(* NONE *) |
walther@59938 | 27 |
( *\--- ! aktivate for Test_Isac END ----------------------------------------------------------/*) |
walther@59938 | 28 |
end |
walther@59938 | 29 |
|
walther@59938 | 30 |
structure O_Model(**) : ORIGINAL_MODEL(**) = |
walther@59938 | 31 |
struct |
walther@59938 | 32 |
|
walther@59940 | 33 |
type variants = Model_Def.variants; |
walther@59938 | 34 |
|
walther@59940 | 35 |
type T = Model_Def.o_model; |
walther@59940 | 36 |
type single = Model_Def.o_model_single |
walther@59940 | 37 |
val single_empty = Model_Def.o_model_empty; |
walther@59940 | 38 |
val to_string = Model_Def.o_model_to_string; |
walther@59940 | 39 |
|
walther@59942 | 40 |
(*/------- to O_Model from Model 1 -------\*) |
walther@59942 | 41 |
(* an or without leading integer *) |
walther@59942 | 42 |
type preori = (variants * string * term * term list); |
walther@59942 | 43 |
fun preori2str (vs, fi, t, ts) = |
walther@59942 | 44 |
"(" ^ (strs2str o (map string_of_int)) vs ^ ", " ^ fi ^ ", " ^ |
walther@59942 | 45 |
UnparseC.term t ^ ", " ^ (strs2str o (map UnparseC.term)) ts ^ ")"; |
walther@59942 | 46 |
val preoris2str = (strs2str' o (map (linefeed o preori2str))); |
walther@59942 | 47 |
(*\------- to O_Model from Model 1 -------/*) |
walther@59942 | 48 |
|
walther@59938 | 49 |
|
walther@59938 | 50 |
(**)end(**); |