418 else error "new behaviour in test:refine.sml:miniscript with mini-subpb 2" |
418 else error "new behaviour in test:refine.sml:miniscript with mini-subpb 2" |
419 |
419 |
420 "----------- fun coll_guhs ---------------------------------------"; |
420 "----------- fun coll_guhs ---------------------------------------"; |
421 "----------- fun coll_guhs ---------------------------------------"; |
421 "----------- fun coll_guhs ---------------------------------------"; |
422 "----------- fun coll_guhs ---------------------------------------"; |
422 "----------- fun coll_guhs ---------------------------------------"; |
423 val n = e_pbt; |
423 val n = Probl_Def.empty; |
424 (#guh : pbt -> guh) e_pbt; |
424 (#guh : Problem.T -> Check_Unique.guh) Probl_Def.empty; |
425 |
425 |
426 fun XXXnode coll (Store.Node (_,[n],ns)) = |
426 fun XXXnode coll (Store.Node (_,[n],ns)) = |
427 [(#guh : pbt -> guh) n] |
427 [(#guh : Problem.T -> Check_Unique.guh) n] |
428 and XXXnodes coll [] = coll |
428 and XXXnodes coll [] = coll |
429 | XXXnodes coll (n::ns : pbt Store.T) = (XXXnode coll n) @ |
429 | XXXnodes coll (n::ns : Problem.T Store.T) = (XXXnode coll n) @ |
430 (XXXnodes coll ns); |
430 (XXXnodes coll ns); |
431 (*^^^ this works, but not this ... |
431 (*^^^ this works, but not this ... |
432 fun node coll (Store.Node (_,[n],ns)) = |
432 fun node coll (Store.Node (_,[n],ns)) = |
433 [(#guh : 'a -> guh) n] |
433 [(#guh : 'a -> Check_Unique.guh) n] |
434 and nodes coll [] = coll |
434 and nodes coll [] = coll |
435 | nodes coll (n::ns : 'a Store.T) = (node coll n) @ (nodes coll ns); |
435 | nodes coll (n::ns : 'a Store.T) = (node coll n) @ (nodes coll ns); |
436 |
436 |
437 Error: |
437 Error: |
438 Can't unify {guh: 'a, ...} with 'b (Cannot unify with explicit type variable) |
438 Can't unify {guh: 'a, ...} with 'b (Cannot unify with explicit type variable) |
439 Found near #guh : 'a -> guh |
439 Found near #guh : 'a -> Check_Unique.guh |
440 |
440 |
441 i.e. there is no common fun for pbls and mets ?!?*) |
441 i.e. there is no common fun for pbls and mets ?!?*) |
442 |
442 |
443 coll_pblguhs (get_ptyps ()); |
443 ((Check_Unique.collect (#guh : Probl_Def.T -> Check_Unique.guh))) (get_ptyps ()); |
444 sort string_ord (coll_pblguhs (get_ptyps ())); |
444 sort string_ord (((Check_Unique.collect (#guh : Probl_Def.T -> Check_Unique.guh))) (get_ptyps ())); |
445 show_pblguhs (); |
445 show_pblguhs (); |
446 sort_pblguhs (); |
446 sort_pblguhs (); |
447 |
447 |
448 "----------- fun guh2kestoreID -----------------------------------"; |
448 "----------- fun guh2kestoreID -----------------------------------"; |
449 "----------- fun guh2kestoreID -----------------------------------"; |
449 "----------- fun guh2kestoreID -----------------------------------"; |
450 "----------- fun guh2kestoreID -----------------------------------"; |
450 "----------- fun guh2kestoreID -----------------------------------"; |
451 "----- we assumed the problem-hierarchy containing 3 elements on toplevel"; |
451 "----- we assumed the problem-hierarchy containing 3 elements on toplevel"; |
452 (* ERROR: Exception Bind raised *) |
452 (* ERROR: Exception Bind raised *) |
453 val (Store.Node (id1,[n1 as {guh=guh1,...} : pbt], ns1):: |
453 val (Store.Node (id1,[n1 as {guh=guh1,...} : Problem.T], ns1):: |
454 Store.Node (id2,[n2 as {guh=guh2,...} : pbt], ns2):: _) = (get_ptyps ()); |
454 Store.Node (id2,[n2 as {guh=guh2,...} : Problem.T], ns2):: _) = (get_ptyps ()); |
455 |
455 |
456 (* |
456 (* |
457 nodes [] guh1 (get_ptyps ()); |
457 nodes [] guh1 (get_ptyps ()); |
458 nodes [] guh2 (get_ptyps ()); |
458 nodes [] guh2 (get_ptyps ()); |
459 *) |
459 *) |
460 val (Store.Node (id1,[n1 as {guh=guh1,...} : pbt], ns1) |
460 val (Store.Node (id1,[n1 as {guh=guh1,...} : Problem.T], ns1) |
461 :: |
461 :: |
462 Store.Node (id2,[n2 as {guh=guh2,...} : pbt], |
462 Store.Node (id2,[n2 as {guh=guh2,...} : Problem.T], |
463 (Store.Node (id21,[n21 as {guh=guh21,...} : pbt], ns21)) :: _ ) |
463 (Store.Node (id21,[n21 as {guh=guh21,...} : Problem.T], ns21)) :: _ ) |
464 :: |
464 :: |
465 Store.Node (id3,[n3 as {guh=guh3,...} : pbt], ns3) |
465 Store.Node (id3,[n3 as {guh=guh3,...} : Problem.T], ns3) |
466 :: |
466 :: |
467 _ ) = (get_ptyps ()); |
467 _ ) = (get_ptyps ()); |
468 (* |
468 (* |
469 nodes [] guh3 (get_ptyps ()); |
469 nodes [] guh3 (get_ptyps ()); |
470 nodes [] guh21 (get_ptyps ()); |
470 nodes [] guh21 (get_ptyps ()); |