src/HOL/Tools/Nitpick/nitpick_kodkod.ML
changeset 35179 4b198af5beb5
parent 35178 29a0e3be0be1
child 35185 9b8f351cced6
equal deleted inserted replaced
35178:29a0e3be0be1 35179:4b198af5beb5
   316            if R2 = Formula Neut then
   316            if R2 = Formula Neut then
   317              [ts] |> not exclusive ? cons (KK.TupleSet [])
   317              [ts] |> not exclusive ? cons (KK.TupleSet [])
   318            else
   318            else
   319              [KK.TupleSet [],
   319              [KK.TupleSet [],
   320               if T1 = T2 andalso epsilon > delta andalso
   320               if T1 = T2 andalso epsilon > delta andalso
   321                  not (datatype_spec dtypes T1 |> the |> #co) then
   321                  (datatype_spec dtypes T1 |> the |> pairf #co #standard)
       
   322                  = (false, true) then
   322                 index_seq delta (epsilon - delta)
   323                 index_seq delta (epsilon - delta)
   323                 |> map (fn j =>
   324                 |> map (fn j =>
   324                            KK.TupleProduct (KK.TupleSet [Kodkod.Tuple [j + j0]],
   325                            KK.TupleProduct (KK.TupleSet [Kodkod.Tuple [j + j0]],
   325                                             KK.TupleAtomSeq (j, j0)))
   326                                             KK.TupleAtomSeq (j, j0)))
   326                 |> foldl1 KK.TupleUnion
   327                 |> foldl1 KK.TupleUnion
   761   maps (nfa_transitions_for_sel hol_ctxt kk rel_table dtypes x)
   762   maps (nfa_transitions_for_sel hol_ctxt kk rel_table dtypes x)
   762        (index_seq 0 (num_sels_for_constr_type T))
   763        (index_seq 0 (num_sels_for_constr_type T))
   763 (* hol_context -> kodkod_constrs -> nut NameTable.table -> dtype_spec list
   764 (* hol_context -> kodkod_constrs -> nut NameTable.table -> dtype_spec list
   764    -> dtype_spec -> nfa_entry option *)
   765    -> dtype_spec -> nfa_entry option *)
   765 fun nfa_entry_for_datatype _ _ _ _ ({co = true, ...} : dtype_spec) = NONE
   766 fun nfa_entry_for_datatype _ _ _ _ ({co = true, ...} : dtype_spec) = NONE
       
   767   | nfa_entry_for_datatype _ _ _ _ {standard = false, ...} = NONE
   766   | nfa_entry_for_datatype _ _ _ _ {deep = false, ...} = NONE
   768   | nfa_entry_for_datatype _ _ _ _ {deep = false, ...} = NONE
   767   | nfa_entry_for_datatype hol_ctxt kk rel_table dtypes {typ, constrs, ...} =
   769   | nfa_entry_for_datatype hol_ctxt kk rel_table dtypes {typ, constrs, ...} =
   768     SOME (typ, maps (nfa_transitions_for_constr hol_ctxt kk rel_table dtypes
   770     SOME (typ, maps (nfa_transitions_for_constr hol_ctxt kk rel_table dtypes
   769                      o #const) constrs)
   771                      o #const) constrs)
   770 
   772