src/HOL/Tools/Nitpick/nitpick_kodkod.ML
changeset 55888 cac1add157e8
parent 54632 7a14f831d02d
child 55889 6bfbec3dff62
equal deleted inserted replaced
55887:25bd4745ee38 55888:cac1add157e8
    53 
    53 
    54 structure KK = Kodkod
    54 structure KK = Kodkod
    55 
    55 
    56 fun pull x xs = x :: filter_out (curry (op =) x) xs
    56 fun pull x xs = x :: filter_out (curry (op =) x) xs
    57 
    57 
    58 fun is_datatype_acyclic ({co = false, standard = true, deep = true, ...}
    58 fun is_datatype_acyclic ({co = false, deep = true, ...} : datatype_spec) = true
    59                          : datatype_spec) = true
       
    60   | is_datatype_acyclic _ = false
    59   | is_datatype_acyclic _ = false
    61 
    60 
    62 fun flip_nums n = index_seq 1 n @ [0] |> map KK.Num
    61 fun flip_nums n = index_seq 1 n @ [0] |> map KK.Num
    63 
    62 
    64 fun univ_card nat_card int_card main_j0 bounds formula =
    63 fun univ_card nat_card int_card main_j0 bounds formula =
  1497 fun nfa_transitions_for_constr hol_ctxt binarize kk rel_table dtypes
  1496 fun nfa_transitions_for_constr hol_ctxt binarize kk rel_table dtypes
  1498                                (x as (_, T)) =
  1497                                (x as (_, T)) =
  1499   maps (nfa_transitions_for_sel hol_ctxt binarize kk rel_table dtypes x)
  1498   maps (nfa_transitions_for_sel hol_ctxt binarize kk rel_table dtypes x)
  1500        (index_seq 0 (num_sels_for_constr_type T))
  1499        (index_seq 0 (num_sels_for_constr_type T))
  1501 fun nfa_entry_for_datatype _ _ _ _ _ ({co = true, ...} : datatype_spec) = NONE
  1500 fun nfa_entry_for_datatype _ _ _ _ _ ({co = true, ...} : datatype_spec) = NONE
  1502   | nfa_entry_for_datatype _ _ _ _ _ {standard = false, ...} = NONE
       
  1503   | nfa_entry_for_datatype _ _ _ _ _ {deep = false, ...} = NONE
  1501   | nfa_entry_for_datatype _ _ _ _ _ {deep = false, ...} = NONE
  1504   | nfa_entry_for_datatype hol_ctxt binarize kk rel_table dtypes
  1502   | nfa_entry_for_datatype hol_ctxt binarize kk rel_table dtypes
  1505                            {typ, constrs, ...} =
  1503                            {typ, constrs, ...} =
  1506     SOME (typ, maps (nfa_transitions_for_constr hol_ctxt binarize kk rel_table
  1504     SOME (typ, maps (nfa_transitions_for_constr hol_ctxt binarize kk rel_table
  1507                                                 dtypes o #const) constrs)
  1505                                                 dtypes o #const) constrs)