src/HOL/TPTP/mash_export.ML
changeset 57005 33f3d2ea803d
parent 55212 5832470d956e
child 57055 df3a26987a8d
equal deleted inserted replaced
57004:c8288ce9676a 57005:33f3d2ea803d
    73     fun do_fact ((_, stature), th) =
    73     fun do_fact ((_, stature), th) =
    74       let
    74       let
    75         val name = nickname_of_thm th
    75         val name = nickname_of_thm th
    76         val feats =
    76         val feats =
    77           features_of ctxt (theory_of_thm th) 0 Symtab.empty stature false [prop_of th] |> map fst
    77           features_of ctxt (theory_of_thm th) 0 Symtab.empty stature false [prop_of th] |> map fst
    78         val s = encode_str name ^ ": " ^ encode_plain_features (sort_wrt hd feats) ^ "\n"
    78         val s = encode_str name ^ ": " ^ encode_unweighted_features (sort_wrt hd feats) ^ "\n"
    79       in File.append path s end
    79       in File.append path s end
    80   in List.app do_fact facts end
    80   in List.app do_fact facts end
    81 
    81 
    82 val prover_marker = "$a"
    82 val prover_marker = "$a"
    83 val isar_marker = "$i"
    83 val isar_marker = "$i"
   192             features_of ctxt (theory_of_thm th) (num_old_facts + j) const_tab stature false
   192             features_of ctxt (theory_of_thm th) (num_old_facts + j) const_tab stature false
   193               [prop_of th]
   193               [prop_of th]
   194             |> map fst |> sort_wrt hd
   194             |> map fst |> sort_wrt hd
   195           val update =
   195           val update =
   196             "! " ^ encode_str name ^ ": " ^ encode_strs parents ^ "; " ^
   196             "! " ^ encode_str name ^ ": " ^ encode_strs parents ^ "; " ^
   197             encode_plain_features nongoal_feats ^ "; " ^ marker ^ " " ^
   197             encode_unweighted_features nongoal_feats ^ "; " ^ marker ^ " " ^ encode_strs deps ^ "\n"
   198             encode_strs deps ^ "\n"
       
   199         in query ^ update end
   198         in query ^ update end
   200       else
   199       else
   201         ""
   200         ""
   202     val new_facts =
   201     val new_facts =
   203       new_facts |> attach_parents_to_facts old_facts
   202       new_facts |> attach_parents_to_facts old_facts