test/Tools/isac/BaseDefinitions/calcelems.sml
changeset 59890 ba0757da0dc8
parent 59887 4616b145b1cd
child 59897 8cba439d0454
equal deleted inserted replaced
59889:e794e1fbe6da 59890:ba0757da0dc8
   118 
   118 
   119 "-------- fun update_ptyps --------------------------------------------------";
   119 "-------- fun update_ptyps --------------------------------------------------";
   120 "-------- fun update_ptyps --------------------------------------------------";
   120 "-------- fun update_ptyps --------------------------------------------------";
   121 "-------- fun update_ptyps --------------------------------------------------";
   121 "-------- fun update_ptyps --------------------------------------------------";
   122 val pty = [
   122 val pty = [
   123   Celem1.Ptyp ("aaa", [1], [
   123   Store.Ptyp ("aaa", [1], [
   124     Celem1.Ptyp ("aaa-1", [11], [])]),
   124     Store.Ptyp ("aaa-1", [11], [])]),
   125   Celem1.Ptyp ("bbb", [2], [
   125   Store.Ptyp ("bbb", [2], [
   126     Celem1.Ptyp ("bbb-1", [21], []),
   126     Store.Ptyp ("bbb-1", [21], []),
   127     Celem1.Ptyp ("bbb-2", [22], [
   127     Store.Ptyp ("bbb-2", [22], [
   128       Celem1.Ptyp ("bbb-21", [221], []),
   128       Store.Ptyp ("bbb-21", [221], []),
   129       Celem1.Ptyp ("bbb-22", [222], [])])]),
   129       Store.Ptyp ("bbb-22", [222], [])])]),
   130   Celem1.Ptyp ("ccc", [3], [])] : int Celem1.ptyp list
   130   Store.Ptyp ("ccc", [3], [])] : int Store.ptyp list
   131 
   131 
   132 val ID = ["ddd"];
   132 val ID = ["ddd"];
   133 (*update_ptyps ID ID 99999 pty; ERROR update_ptyps: [aaa] does not exist*)
   133 (*update_ptyps ID ID 99999 pty; ERROR update_ptyps: [aaa] does not exist*)
   134 
   134 
   135 val ID = ["ccc"];
   135 val ID = ["ccc"];
   136 if update_ptyps ID ID 99999 pty = 
   136 if update_ptyps ID ID 99999 pty = 
   137   [Celem1.Ptyp ("aaa", [1], [Celem1.Ptyp ("aaa-1", [11], [])]), 
   137   [Store.Ptyp ("aaa", [1], [Store.Ptyp ("aaa-1", [11], [])]), 
   138   Celem1.Ptyp ("bbb", [2], [Celem1.Ptyp ("bbb-1", [21], []), 
   138   Store.Ptyp ("bbb", [2], [Store.Ptyp ("bbb-1", [21], []), 
   139     Celem1.Ptyp ("bbb-2", [22], [Celem1.Ptyp ("bbb-21", [221], []), Celem1.Ptyp ("bbb-22", [222], [])])]),
   139     Store.Ptyp ("bbb-2", [22], [Store.Ptyp ("bbb-21", [221], []), Store.Ptyp ("bbb-22", [222], [])])]),
   140   Celem1.Ptyp ("ccc", [99999], [])] 
   140   Store.Ptyp ("ccc", [99999], [])] 
   141   then () else error "update_ptyps has changed 1";
   141   then () else error "update_ptyps has changed 1";
   142                                       
   142                                       
   143 val ID = ["aaa"];
   143 val ID = ["aaa"];
   144 (*update_ptyps ID ID 99999 pty; ERROR update_ptyps: [aaa] has descendants*)
   144 (*update_ptyps ID ID 99999 pty; ERROR update_ptyps: [aaa] has descendants*)
   145 
   145 
   146 val ID = ["bbb", "bbb-2", "bbb-21"];
   146 val ID = ["bbb", "bbb-2", "bbb-21"];
   147 if update_ptyps ID ID 99999 pty = 
   147 if update_ptyps ID ID 99999 pty = 
   148   [Celem1.Ptyp ("aaa", [1], [Celem1.Ptyp ("aaa-1", [11], [])]), 
   148   [Store.Ptyp ("aaa", [1], [Store.Ptyp ("aaa-1", [11], [])]), 
   149   Celem1.Ptyp ("bbb", [2], [Celem1.Ptyp ("bbb-1", [21], []), Celem1.Ptyp ("bbb-2", [22], 
   149   Store.Ptyp ("bbb", [2], [Store.Ptyp ("bbb-1", [21], []), Store.Ptyp ("bbb-2", [22], 
   150     [Celem1.Ptyp ("bbb-21", [99999], []), Celem1.Ptyp ("bbb-22", [222], [])])]), 
   150     [Store.Ptyp ("bbb-21", [99999], []), Store.Ptyp ("bbb-22", [222], [])])]), 
   151   Celem1.Ptyp ("ccc", [3], [])] 
   151   Store.Ptyp ("ccc", [3], [])] 
   152 then () else error "update_ptyps has changed 2";
   152 then () else error "update_ptyps has changed 2";
   153 
   153 
   154 val ID = ["bbb", "bbb-2", "bbb-22"];
   154 val ID = ["bbb", "bbb-2", "bbb-22"];
   155 if update_ptyps ID ID 99999 pty = 
   155 if update_ptyps ID ID 99999 pty = 
   156   [Celem1.Ptyp ("aaa", [1], [Celem1.Ptyp ("aaa-1", [11], [])]), 
   156   [Store.Ptyp ("aaa", [1], [Store.Ptyp ("aaa-1", [11], [])]), 
   157   Celem1.Ptyp ("bbb", [2], [Celem1.Ptyp ("bbb-1", [21], []), 
   157   Store.Ptyp ("bbb", [2], [Store.Ptyp ("bbb-1", [21], []), 
   158       Celem1.Ptyp ("bbb-2", [22], [Celem1.Ptyp ("bbb-21", [221], []), Celem1.Ptyp ("bbb-22", [99999], [])])]), 
   158       Store.Ptyp ("bbb-2", [22], [Store.Ptyp ("bbb-21", [221], []), Store.Ptyp ("bbb-22", [99999], [])])]), 
   159   Celem1.Ptyp ("ccc", [3], [])] 
   159   Store.Ptyp ("ccc", [3], [])] 
   160 then () else error "update_ptyps has changed 3";
   160 then () else error "update_ptyps has changed 3";
   161 
   161 
   162 "----------- fun subst2str' --------------------------------------------------------------------";
   162 "----------- fun subst2str' --------------------------------------------------------------------";
   163 "----------- fun subst2str' --------------------------------------------------------------------";
   163 "----------- fun subst2str' --------------------------------------------------------------------";
   164 "----------- fun subst2str' --------------------------------------------------------------------";
   164 "----------- fun subst2str' --------------------------------------------------------------------";