src/HOL/Tools/Predicate_Compile/code_prolog.ML
changeset 80636 4041e7c8059d
parent 74561 8e6c973003c8
child 81519 cdc43c0fdbfc
equal deleted inserted replaced
80635:27d5452d20fc 80636:4041e7c8059d
   444     val moded_pred_table' = declare_moded_predicate moded_preds moded_pred_table
   444     val moded_pred_table' = declare_moded_predicate moded_preds moded_pred_table
   445     fun mk_literal pol derivation constant_table' t =
   445     fun mk_literal pol derivation constant_table' t =
   446       let
   446       let
   447         val (p, args) = strip_comb t
   447         val (p, args) = strip_comb t
   448         val mode = Predicate_Compile_Core.head_mode_of derivation
   448         val mode = Predicate_Compile_Core.head_mode_of derivation
   449         val name = fst (dest_Const p)
   449         val name = dest_Const_name p
   450 
   450 
   451         val p' = the (AList.lookup (op =) moded_pred_table' (name, (pol, mode)))
   451         val p' = the (AList.lookup (op =) moded_pred_table' (name, (pol, mode)))
   452         val args' = map (translate_term ctxt constant_table') args
   452         val args' = map (translate_term ctxt constant_table') args
   453       in
   453       in
   454         Rel (p', args')
   454         Rel (p', args')