Since demodulation is not a reduction kind, I changed it to a normal tactic.
Moreover, since the ~pattern was unused, I have temporarily removed it.
Doc changed accordingly.
| Type of UriManager.uri * int
type 'lazy_term reduction =
- [ `Demodulate
- | `Normalize
+ [ `Normalize
| `Reduce
| `Simpl
| `Unfold of 'lazy_term option
| Contradiction of loc
| Cut of loc * 'ident option * 'term
| Decompose of loc * ('term, 'ident) type_spec list * 'ident option * 'ident list
+ | Demodulate of loc
| Discriminate of loc * 'term
| Elim of loc * 'term * 'term option * int option * 'ident list
| ElimType of loc * 'term * 'term option * int option * 'ident list
let pp_idents idents = "[" ^ String.concat "; " idents ^ "]"
let pp_reduction_kind ~term_pp = function
- | `Demodulate -> "demodulate"
| `Normalize -> "normalize"
| `Reduce -> "reduce"
| `Simpl -> "simplify"
in
let types = List.rev_map to_ident types in
sprintf "decompose %s %s%s" (pp_idents types) (opt_string_pp what) (pp_intros_specs (None, names))
+ | Demodulate _ -> "demodulate"
| Discriminate (_, term) -> "discriminate " ^ term_pp term
| Elim (_, term, using, num, idents) ->
sprintf "elim " ^ term_pp term ^
let dbd = LibraryDb.instance () in
let mk_fresh_name_callback = namer_of names in
Tactics.decompose ~mk_fresh_name_callback ~dbd ~user_types ?what
+ | GrafiteAst.Demodulate _ -> Tactics.demodulate ~dbd:(LibraryDb.instance ())
| GrafiteAst.Discriminate (_,term) -> Tactics.discriminate term
| GrafiteAst.Elim (_, what, using, depth, names) ->
Tactics.elim_intros ?using ?depth ~mk_fresh_name_callback:(namer_of names)
| GrafiteAst.Fold (_, reduction_kind, term, pattern) ->
let reduction =
match reduction_kind with
- | `Demodulate ->
- GrafiteTypes.command_error "demodulation can't be folded"
| `Normalize ->
PET.const_lazy_reduction
(CicReduction.normalize ~delta:false ~subst:[])
Tactics.letin term ~mk_fresh_name_callback:(namer_of [name])
| GrafiteAst.Reduce (_, reduction_kind, pattern) ->
(match reduction_kind with
- | `Demodulate -> Tactics.demodulate ~dbd:(LibraryDb.instance ()) ~pattern
| `Normalize -> Tactics.normalize ~pattern
| `Reduce -> Tactics.reduce ~pattern
| `Simpl -> Tactics.simpl ~pattern
| `Unfold (Some t) ->
let t = disambiguate_lazy_term text prefix_len lexicon_status_ref t in
`Unfold (Some t)
- | `Demodulate
| `Normalize
| `Reduce
| `Simpl
List.fold_left disambiguate (metasenv,[]) types
in
metasenv,GrafiteAst.Decompose (loc, types, what, names)
+ | GrafiteAst.Demodulate loc ->
+ metasenv,GrafiteAst.Demodulate loc
| GrafiteAst.Discriminate (loc,term) ->
let metasenv,term = disambiguate_term context metasenv term in
metasenv,GrafiteAst.Discriminate(loc,term)
[ tactic_terms = LIST1 tactic_term SEP SYMBOL "," -> tactic_terms ]
];
reduction_kind: [
- [ IDENT "demodulate" -> `Demodulate
- | IDENT "normalize" -> `Normalize
+ [ IDENT "normalize" -> `Normalize
| IDENT "reduce" -> `Reduce
| IDENT "simplify" -> `Simpl
| IDENT "unfold"; t = OPT tactic_term -> `Unfold t
let idents = match idents with None -> [] | Some idents -> idents in
let to_spec id = GrafiteAst.Ident id in
GrafiteAst.Decompose (loc, List.rev_map to_spec types, what, idents)
+ | IDENT "demodulate" -> GrafiteAst.Demodulate loc
| IDENT "discriminate"; t = tactic_term ->
GrafiteAst.Discriminate (loc, t)
| IDENT "elim"; what = tactic_term; using = using;
paramodulation/equality.cmi
paramodulation/saturation.cmi: proofEngineTypes.cmi
variousTactics.cmi: proofEngineTypes.cmi
-autoTactic.cmi: proofEngineTypes.cmi
introductionTactics.cmi: proofEngineTypes.cmi
eliminationTactics.cmi: proofEngineTypes.cmi
negationTactics.cmi: proofEngineTypes.cmi
equalityTactics.cmi: proofEngineTypes.cmi
+autoTactic.cmi: proofEngineTypes.cmi
discriminationTactics.cmi: proofEngineTypes.cmi
inversion.cmi: proofEngineTypes.cmi
ring.cmi: proofEngineTypes.cmi
variousTactics.cmx: tacticals.cmx proofEngineTypes.cmx \
proofEngineReduction.cmx proofEngineHelpers.cmx primitiveTactics.cmx \
variousTactics.cmi
-autoTactic.cmo: paramodulation/saturation.cmi proofEngineTypes.cmi \
- proofEngineHelpers.cmi primitiveTactics.cmi metadataQuery.cmi \
- paramodulation/equality.cmi autoTactic.cmi
-autoTactic.cmx: paramodulation/saturation.cmx proofEngineTypes.cmx \
- proofEngineHelpers.cmx primitiveTactics.cmx metadataQuery.cmx \
- paramodulation/equality.cmx autoTactic.cmi
introductionTactics.cmo: proofEngineTypes.cmi primitiveTactics.cmi \
introductionTactics.cmi
introductionTactics.cmx: proofEngineTypes.cmx primitiveTactics.cmx \
proofEngineStructuralRules.cmx proofEngineReduction.cmx \
proofEngineHelpers.cmx primitiveTactics.cmx introductionTactics.cmx \
equalityTactics.cmi
+autoTactic.cmo: tacticals.cmi paramodulation/saturation.cmi \
+ proofEngineTypes.cmi proofEngineHelpers.cmi primitiveTactics.cmi \
+ metadataQuery.cmi equalityTactics.cmi paramodulation/equality.cmi \
+ autoTactic.cmi
+autoTactic.cmx: tacticals.cmx paramodulation/saturation.cmx \
+ proofEngineTypes.cmx proofEngineHelpers.cmx primitiveTactics.cmx \
+ metadataQuery.cmx equalityTactics.cmx paramodulation/equality.cmx \
+ autoTactic.cmi
discriminationTactics.cmo: tacticals.cmi reductionTactics.cmi \
proofEngineTypes.cmi primitiveTactics.cmi introductionTactics.cmi \
equalityTactics.cmi eliminationTactics.cmi discriminationTactics.cmi
primitiveTactics.cmi equalityTactics.cmi eliminationTactics.cmi ring.cmi
ring.cmx: tacticals.cmx proofEngineTypes.cmx proofEngineStructuralRules.cmx \
primitiveTactics.cmx equalityTactics.cmx eliminationTactics.cmx ring.cmi
+setoids.cmo: proofEngineTypes.cmi setoids.cmi
+setoids.cmx: proofEngineTypes.cmx setoids.cmi
fourier.cmo: fourier.cmi
fourier.cmx: fourier.cmi
fourierR.cmo: tacticals.cmi ring.cmi reductionTactics.cmi \
*)
;;
-let demodulate_tac ~dbd ~pattern ((proof,goal)(*s initialstatus*)) =
+let demodulate_tac ~dbd ((proof,goal)(*s initialstatus*)) =
let curi,metasenv,pbo,pty = proof in
let metano,context,ty = CicUtil.lookup_meta goal metasenv in
let eq_uri = eq_of_goal ty in
else (* if newty = ty then *)
raise (ProofEngineTypes.Fail (lazy "no progress"))
(*else ProofEngineTypes.apply_tactic
- (ReductionTactics.simpl_tac ~pattern)
- initialstatus*)
+ (ReductionTactics.simpl_tac
+ ~pattern:(ProofEngineTypes.conclusion_pattern None)) initialstatus*)
;;
-let demodulate_tac ~dbd ~pattern =
- ProofEngineTypes.mk_tactic (demodulate_tac ~dbd ~pattern)
-;;
+let demodulate_tac ~dbd = ProofEngineTypes.mk_tactic (demodulate_tac ~dbd);;
let rec find_in_ctx i name = function
| [] -> raise (ProofEngineTypes.Fail (lazy ("Hypothesis not found: " ^ name)))
Cic.term -> Cic.conjecture list -> CicUniv.universe_graph -> unit
val main: HMysql.dbd ->
bool -> Cic.term -> Cic.conjecture list -> CicUniv.universe_graph -> unit
-val demodulate_tac:
- dbd:HMysql.dbd ->
- pattern:ProofEngineTypes.lazy_pattern -> ProofEngineTypes.tactic
+val demodulate_tac: dbd:HMysql.dbd -> ProofEngineTypes.tactic
val superposition_tac:
target:string -> table:string -> subterms_only:bool ->
?mk_fresh_name_callback:ProofEngineTypes.mk_fresh_name_type ->
?user_types:(UriManager.uri * int) list ->
?what:string -> dbd:HMysql.dbd -> ProofEngineTypes.tactic
-val demodulate :
- dbd:HMysql.dbd ->
- pattern:ProofEngineTypes.lazy_pattern -> ProofEngineTypes.tactic
+val demodulate : dbd:HMysql.dbd -> ProofEngineTypes.tactic
val discriminate : term:Cic.term -> ProofEngineTypes.tactic
val elim_intros :
?mk_fresh_name_callback:ProofEngineTypes.mk_fresh_name_type ->
</variablelist>
</para>
</sect1>
- <sect1 id="tac_demodulation">
- <title>demodulation</title>
- <titleabbrev>demodulation</titleabbrev>
- <para><userinput>demodulation patt</userinput></para>
+ <sect1 id="tac_demodulate">
+ <title>demodulate</title>
+ <titleabbrev>demodulate</titleabbrev>
+ <para><userinput>demodulate</userinput></para>
<para>
<variablelist>
<varlistentry role="tactic.synopsis">
<term>Synopsis:</term>
<listitem>
- <para><emphasis role="bold">demodulation</emphasis> &pattern;</para>
+ <para><emphasis role="bold">demodulate</emphasis></para>
</listitem>
</varlistentry>
<varlistentry>
<row>
<entry id="grammar.reduction-kind">&reduction-kind;</entry>
<entry>::=</entry>
- <entry><emphasis role="bold">demodulate</emphasis></entry>
- </row>
- <row>
- <entry/>
- <entry>|</entry>
<entry><emphasis role="bold">normalize</emphasis></entry>
<entry>Computes the βδιζ-normal form</entry>
</row>
</para>
</listitem>
<listitem>
- <para><link linkend="tac_demodulation"><emphasis role="bold">demodulation</emphasis></link> <emphasis><link linkend="grammar.pattern">pattern</link></emphasis></para>
+ <para>
+ <link linkend="tac_demodulate">
+ <emphasis role="bold">demodulate</emphasis>
+ </link>
+ </para>
</listitem>
<listitem>
<para><link linkend="tac_discriminate"><emphasis role="bold">discriminate</emphasis></link> <emphasis><link linkend="grammar.sterm">sterm</link></emphasis></para>