Commit b5ff7fcf authored by Andrei Paskevich's avatar Andrei Paskevich

properly format the transformation descriptions

parent 5e93e6d7
......@@ -406,9 +406,6 @@ let list_transforms () =
let list_transforms_l () =
Hstr.fold (fun k (desc,_) acc -> (k, desc)::acc) transforms_l []
(** transformations with arguments *)
type naming_table = {
......
......@@ -124,8 +124,8 @@ let () = try
(Pp.print_list Pp.newline2 print_trans_desc)
(List.sort sort_pair (Trans.list_transforms_l ()));
let list_transform_with_arg =
Trans.list_transforms_with_args () @ Trans.list_transforms_with_args_l ()
in
Trans.list_transforms_with_args () @
Trans.list_transforms_with_args_l () in
printf "@[<hov 2>Known transformations with arguments:@\n%a@]@\n@."
(Pp.print_list Pp.newline2 print_trans_desc)
(List.sort sort_pair list_transform_with_arg)
......
......@@ -34,4 +34,5 @@ let elim_less (d:decl) =
let () =
Trans.register_transform "abstract_quantifiers" (Trans.decl elim_less None)
~desc:"abstract@ quantifiers@ in@ the@ axioms@ of@ the@ context and the goals@."
~desc:"Abstract@ quantifiers@ in@ the@ axioms@ of@ the@ context \
and@ the@ goals."
......@@ -518,29 +518,51 @@ let unfold unf hl =
| _ -> [d]) None
let () = wrap_and_register ~desc:"sort declarations"
"sort"
(Ttrans) sort
let () = wrap_and_register ~desc:"unfold ls [in] pr: unfold logic symbol ls in list of hypothesis pr. The argument in is optional: by default unfold in the goal." (* TODO *)
"unfold"
(Tlsymbol (Topt ("in", Tprlist Ttrans))) unfold
let () = wrap_and_register ~desc:"Sort@ declarations." "sort" Ttrans sort
let () = wrap_and_register
~desc:"unfold <ls> [in] <name list>@ \
unfolds@ logical@ symbol@ <ls> in@ the@ given@ \
list@ of@ premises.@ If@ no@ list@ is@ given,@ \
unfold@ in@ the@ goal."
"unfold"
(Tlsymbol (Topt ("in", Tprlist Ttrans)))
unfold
let () = wrap_and_register
~desc:"replace <term1> <term2> [in] <name list> replaces occcurences of term1 by term2 in prop name. If no list is given, replace in the goal."
"replace"
(Tterm (Tterm (Topt ("in", Tprlist Ttrans_l)))) replace
~desc:"replace <term1> <term2> [in] <name list>@ \
replaces@ occcurences@ of@ <term1>@ by@ <term2>@ in@ \
the@ given@ list@ of@ premises.@ If@ no@ list@ is@ given,@ \
replace@ in@ the@ goal."
"replace"
(Tterm (Tterm (Topt ("in", Tprlist Ttrans_l))))
replace
let _ = wrap_and_register
~desc:"rewrite [<-] <name> [in] <name2> [with] <list term> rewrites equality defined in name into name2 using exactly all terms of the list as instance for what cannot be deduced directly" "rewrite"
(Toptbool ("<-",(Tprsymbol (Topt ("in", Tprsymbol (Topt ("with", Ttermlist Ttrans_l))))))) (fun rev h h1opt term_list -> rewrite term_list rev h h1opt)
~desc:"rewrite [<-] <name> [in] <name2> [with] <term list>@ \
rewrites@ equality@ defined@ in@ <name>@ into@ <name2>@ \
using@ exactly@ all@ terms@ in@ the@ list@ as@ instances@ \
for@ what@ cannot@ be@ deduced@ directly."
"rewrite"
(Toptbool ("<-",(Tprsymbol (Topt ("in",
Tprsymbol (Topt ("with", Ttermlist Ttrans_l)))))))
(fun rev h h1opt term_list -> rewrite term_list rev h h1opt)
let _ = wrap_and_register
~desc:"rewrite_list [<-] <list name> [?] [in] <name2> rewrites equalities defined in <list name> into name2. If [?] is set, each of the rewrites is optional." "rewrite_list"
(Toptbool ("<-", (Tprlist (Toptbool ("?", Topt ("in", Tprsymbol Ttrans_l)))))) (fun rev hl opt h1opt -> rewrite_list rev opt hl h1opt)
~desc:"rewrite_list [<-] <name list> [?] [in] <name2>@ \
rewrites@ equalities@ defined@ in@ the@ given@ list@ \
of@ premises@ into@ <name2>.@ If@ [?]@ is@ set,@ each@ \
of@ the@ rewrites@ is@ optional."
"rewrite_list"
(Toptbool ("<-", (Tprlist (Toptbool ("?",
Topt ("in", Tprsymbol Ttrans_l))))))
(fun rev hl opt h1opt -> rewrite_list rev opt hl h1opt)
let () = wrap_and_register
~desc:"apply <prop> [with] <list term> applies prop to the goal and \
uses the list of terms to instantiate the variables that are not found." "apply"
(Tprsymbol (Topt ("with", Ttermlist Ttrans_l))) (fun x y -> apply x y)
~desc:"apply <prop> [with] <term list>@ \
applies@ premise@ <prop>@ to@ the@ goal@ and@ uses@ the@ \
list@ of@ terms@ to@ instantiate@ the@ variables@ that@ \
are@ not@ found."
"apply"
(Tprsymbol (Topt ("with", Ttermlist Ttrans_l)))
apply
......@@ -152,27 +152,36 @@ let introduce_premises n = Trans.goal (intros (create_list n))
let intros_list l = Trans.goal (intros l)
let () = wrap_and_register
~desc:"case <term> [name] generates hypothesis 'name: term' in a first goal and 'name: ~ term' in a second one."
~desc:"case <term> [name]@ generates@ hypothesis@ 'name: term'@ \
in@ a@ first@ goal@ and@ 'name: ~ term'@ in@ a@ second@ one."
"case"
(Tformula (Topt ("as",Tstring Ttrans_l))) case
let () = wrap_and_register ~desc:"left transform a disjunctive goal A \\/ B into A"
let () = wrap_and_register
~desc:"left@ transforms@ a@ disjunctive@ goal@ A \\/ B@ into@ A."
"left"
(Ttrans) (or_intro true)
let () = wrap_and_register ~desc:"right transform a disjunctive goal A \\/ B into B"
let () = wrap_and_register
~desc:"right@ transforms@ a@ disjunctive@ goal@ A \\/ B@ into@ B."
"right"
(Ttrans) (or_intro false)
let () = wrap_and_register
~desc:"exists <term> substitutes the existentially quantified variable with the given term"
~desc:"exists <term>@ substitutes@ the@ top-most@ existentially@ \
quantified@ variable@ with@ the@ given@ term."
"exists"
(Tterm Ttrans) exists
let () = wrap_and_register ~desc:"intros n introduces the first n quantified variables and hypotheses"
let () = wrap_and_register
~desc:"intros <n>@ introduces@ the@ first@ <n>@ quantified@ \
variables@ and@ hypotheses."
"intros_n"
(Tint Ttrans) introduce_premises
let () = wrap_and_register ~desc:"intros id1,id2,...,idk introduces quantified variables and hypotheses using the given identifiers names"
let () = wrap_and_register
~desc:"intros <id1>,<id2>,...,<idk>@ \
introduces@ quantified@ variables@ and@ hypotheses@ under@ \
the\ given@ names."
"intros"
(Tidentlist Ttrans) intros_list
......@@ -22,7 +22,7 @@ let meta_rewrite_def = Theory.register_meta "rewrite_def" [Theory.MTlsymbol]
let meta_compute_max_steps = Theory.register_meta_excl "compute_max_steps"
[Theory.MTint]
~desc:"Maximal@ number@ of@ reduction@ steps@ done@ by@ compute@ \
~desc:"Maximal@ number@ of@ reduction@ steps@ done@ by@ the@ 'compute'@ \
transformation"
let compute_max_steps = ref 1024
......@@ -116,12 +116,13 @@ let normalize_goal_transf_few env =
let () =
Trans.register_env_transform_l "compute_in_goal" normalize_goal_transf_all
~desc:"Performs@ possible@ computations@ in@ goal, including@ by@ \
declared@ rewrite@ rules"
~desc:"Perform@ computations@ in@ the@ goal,@ also@ using@ \
the@ automatically@ derived@ rules)."
let () =
Trans.register_env_transform_l "compute_specified" normalize_goal_transf_few
~desc:"Rewrite@ goal@ using@ specified@ rules"
~desc:"Perform@ computations@ in@ the@ goal,@ only@ using@ \
the@ user-specified@ rules)."
let normalize_hyp step_limit pr_norm env =
let p = { compute_defs = true;
......@@ -130,19 +131,24 @@ let normalize_hyp step_limit pr_norm env =
} in
normalize_goal_transf ?pr_norm ?step_limit p env
let () = wrap_and_register ~desc:"experimental: Takes a prsymbol and reduce \
one \"elementary\" step."
let () = wrap_and_register
~desc:"step [in] <name>@ performs@ one@ \"elementary\"@ \
reduction@ step@ in@ the@ given@ premise@ (experimental)."
"step"
(Topt ("in", Tprsymbol Tenvtrans_l)) (normalize_hyp (Some 1))
(Topt ("in", Tprsymbol Tenvtrans_l))
(normalize_hyp (Some 1))
let () = wrap_and_register ~desc:"experimental: Same as step except that it \
reduces the given number of steps."
let () = wrap_and_register
~desc:"steps <n> [in] <name>@ performs@ <n>@ \"elementary\"@ \
reduction@ steps@ in@ the@ given@ premise@ (experimental)."
"steps"
(Tint (Topt ("in", Tprsymbol Tenvtrans_l))) (fun n -> normalize_hyp (Some n))
(Tint (Topt ("in", Tprsymbol Tenvtrans_l)))
(fun n -> normalize_hyp (Some n))
let () = wrap_and_register ~desc:"Performs@ possible@ computations@ in@ given \
hypothesis@ including@ by@ declared@ rewrite@ rules"
let () = wrap_and_register
~desc:"compute_hyp [in] <name>@ performs@ computations@ \
in@ the@ given@ premise, also@ using@ the@ automatically@ \
derived@ rules."
"compute_hyp"
(Topt ("in", Tprsymbol Tenvtrans_l)) (normalize_hyp None)
......@@ -153,8 +159,9 @@ let normalize_hyp_few step_limit pr_norm env =
} in
normalize_goal_transf ?pr_norm ?step_limit p env
let () = wrap_and_register ~desc:"Performs@ possible@ computations@ in@ given \
hypothesis@ using@ specified@ rules"
let () = wrap_and_register
~desc:"compute_hyp_specified [in] <name>@ performs@ computations@ \
in@ the@ given@ premise, only@ using@ the@ user-specified@ rules."
"compute_hyp_specified"
(Topt ("in", Tprsymbol Tenvtrans_l)) (normalize_hyp_few None)
......
......@@ -178,43 +178,53 @@ let hide (clear: bool) (name: string) (t: term) =
Trans.bind_comp (pose clear name t)
(fun (hyp,new_constant,ls_term) -> replace_all hyp new_constant ls_term)
let () = wrap_and_register ~desc:"clear all axioms but the hypothesis argument"
let () = wrap_and_register
~desc:"clear_but <name list>@ \
clears@ all@ premises@ except@ the@ listed@ ones."
"clear_but"
(Tprlist Ttrans) clear_but
let () = wrap_and_register
~desc:"cut <term> [name] makes a cut with hypothesis 'name: term'"
~desc:"cut <term> [name]@ \
makes@ a@ cut@ with@ a@ hypothesis@ 'name: term'."
"cut"
(Tformula (Topt ("as",Tstring Ttrans_l))) cut
let () = wrap_and_register
~desc:"cut <term> [name] makes an assert with hypothesis 'name: term'"
~desc:"assert <term> [name]@ \
makes@ an@ assertion@ with@ a@ hypothesis@ 'name: term'."
"assert"
(Tformula (Topt ("as",Tstring Ttrans_l))) assert_tac
let () = wrap_and_register
~desc:"remove <prop list>: removes a list of hypothesis given by their names separated with ','. Example: remove_list a,b,c "
~desc:"remove <name list>@ removes@ the@ listed@ premises."
"remove"
(Tlist Ttrans) (fun l -> remove_list l)
(Tlist Ttrans) (fun l -> remove_list l)
let () = wrap_and_register
~desc:"use_th <theory> imports the theory" "use_th"
~desc:"use_th <theory>@ imports@ the@ given@ theory."
"use_th"
(Ttheory Ttrans) use_th
let pose (name: string) (t: term) =
Trans.bind (pose false name t) (fun (_, task) -> Trans.store (fun _ -> task))
let () = wrap_and_register
~desc:"pose <name> <term> adds a new constant <name> equal to <term>"
~desc:"pose <name> <term>@ \
adds@ a@ new@ constant@ <name>@ equal@ to@ <term>."
"pose"
(Tstring (Tterm Ttrans)) pose
let () = wrap_and_register
~desc:"hide <name> <term> adds a new constant <name> equal to <term> and replace everywhere the term with the new constant."
~desc:"hide <name> <term>@ \
adds@ a@ new@ constant@ <name>@ equal@ to@ <term>@ \
and@ replaces@ everywhere@ the@ term@ with@ the@ new@ constant."
"hide"
(Tstring (Tterm Ttrans)) (hide false)
let () = wrap_and_register
~desc:"hide and clear <name> <term> adds a new constant <name> which replaces all occurences of <term>."
~desc:"hide_and_clear <name> <term>@ \
adds@ a@ new constant@ <name>@ which@ replaces@ all@ \
occurences@ of@ <term>."
"hide_and_clear"
(Tstring (Tterm Ttrans)) (hide true)
......@@ -414,25 +414,50 @@ let instantiate ~rem (pr: Decl.prsymbol) lt =
| _ -> [d]) None
let () = wrap_and_register
~desc:"instantiate <prop> <term list> generates a new hypothesis with quantified variables of prop replaced with terms"
~desc:"instantiate <prop> <term list>@ \
generates@ a@ new@ hypothesis@ with@ quantified@ variables@ \
of@ <prop>@ replaced@ with@ the@ given@ terms."
"instantiate"
(Tprsymbol (Ttermlist Ttrans)) (instantiate ~rem:false)
let () = wrap_and_register
~desc:"instantiate <prop> <term list> generates a new hypothesis with quantified variables of prop replaced with terms. Also remove the old hypothesis."
~desc:"instantiate <prop> <term list>@ \
generates@ a@ new@ hypothesis@ with@ quantified@ variables@ \
of@ <prop>@ replaced@ with@ then@ given@ terms.@ \
Also@ removes@ the@ old@ hypothesis."
"inst_rem"
(Tprsymbol (Ttermlist Ttrans)) (instantiate ~rem:true)
let () = wrap_and_register ~desc:"destruct <name> destructs the head logic constructor of hypothesis name (/\\, \\/, -> or <->).\nTo destruct a literal of algebraic type, use destruct_term."
let () = wrap_and_register
~desc:"destruct <name>@ \
destructs@ the@ top-most@ propositional@ connector@ \
(/\\,@ \\/,@ ->@ or@ <->)@ of@ the@ given@ hypothesis.@ \
To@ destruct@ a@ literal@ of@ an@ algebraic@ type,@ \
use@ 'destruct_term'."
"destruct" (Tprsymbol Ttrans_l) (destruct ~recursive:false)
let () = wrap_and_register ~desc:"destruct <name> recursively destructs the head logic constructor of hypothesis name (/\\, \\/, -> or <->).\nTo destruct a literal of algebraic type, use destruct_term."
let () = wrap_and_register
~desc:"destruct_rec <name>@ \
recursively@ destructs@ the@ top@ propositional@ connectors@ \
(/\\,@ \\/,@ ->@ or@ <->)@ of@ the@ given@ hypothesis.@ \
To@ destruct@ a@ literal@ of@ an@ algebraic@ type,@ \
use@ 'destruct_term'."
"destruct_rec" (Tprsymbol Ttrans_l) (destruct ~recursive:true)
let () = wrap_and_register ~desc:"destruct <name> as an algebraic type. Option using can be used to name elements created by destruct_term"
let () = wrap_and_register
~desc:"destruct_term <term> [using] <id list>@ \
destructs@ the@ given@ term@ of@ an@ algebraic@ type.@ \
Option@ 'using'@ can@ be@ used@ to@ name@ the@ elements@ \
created@ by@ 'destruct_term'."
"destruct_term" (Tterm (Topt ("using", Tidentlist Ttrans_l)))
(fun t names -> destruct_term ?names false t)
let () = wrap_and_register ~desc:"destruct <name> as an algebraic type and substitute the definition if an lsymbol was provided. Option using can be used to name elements created by destruct_term_subst"
let () = wrap_and_register
~desc:"destruct_term_subst <term> [using] <id list>@ \
destructs@ the@ given@ term@ of@ an@ algebraic@ type@ \
and@ substitutes@ the@ definition@ if@ the@ term@ is@ \
a@ constant@ function@ symbol.@ \
Option@ 'using'@ can@ be@ used@ to@ name@ the@ elements@ \
created@ by@ 'destruct_term_subst'."
"destruct_term_subst" (Tterm (Topt ("using", Tidentlist Ttrans_l)))
(fun t names -> destruct_term ?names true t)
......@@ -141,7 +141,7 @@ let eliminate_if = Trans.compose eliminate_if_term eliminate_if_fmla
let () =
Trans.register_transform "eliminate_if_term" eliminate_if_term
~desc:"Replaces@ terms@ of@ the@ form@ [if f1 then t2 else t3]@ by@ \
~desc:"Replace@ terms@ of@ the@ form@ [if f1 then t2 else t3]@ by@ \
lifting@ them@ at@ the@ level@ of@ formulas.";
Trans.register_transform "eliminate_if_fmla" eliminate_if_fmla
~desc:"Eliminate@ formulas@ of@ the@ form@ [if f1 then f2 else f3].";
......
......@@ -96,4 +96,4 @@ let remove_types =
let () =
Trans.register_transform "eliminate_unknown_types" remove_types
~desc:"Remove@ types@ unknown@ to@ the@ prover@ and@ terms@ referring@ to@ them@."
~desc:"Remove@ types@ unknown@ to@ the@ prover@ and@ terms@ referring@ to@ them."
......@@ -74,7 +74,8 @@ let encoding_smt env = Trans.seq [
Libencoding.monomorphise_goal;
select_kept def_enco_select_smt env;
Trans.print_meta Libencoding.debug Libencoding.meta_kept;
Trans.trace_goal "meta_enco_kept" (Trans.on_flag meta_enco_kept ft_enco_kept def_enco_kept_smt env);
Trans.trace_goal "meta_enco_kept"
(Trans.on_flag meta_enco_kept ft_enco_kept def_enco_kept_smt env);
Trans.on_flag meta_enco_poly ft_enco_poly def_enco_poly_smt env]
let encoding_tptp env = Trans.seq [
......@@ -100,7 +101,7 @@ let encoding_smt_if_poly env =
let () =
Trans.register_env_transform "encoding_smt_if_poly"
encoding_smt_if_poly
~desc:"Same@ as@ encoding_smt@ but@ only@ if@ polymorphism@ appear."
~desc:"Same@ as@ encoding_smt@ but@ only@ in@ presence@ of@ polymorphism."
let encoding_tptp_if_poly env =
Trans.on_meta Detect_polymorphism.meta_monomorphic_types_only
......@@ -111,4 +112,4 @@ let encoding_tptp_if_poly env =
let () =
Trans.register_env_transform "encoding_tptp_if_poly"
encoding_tptp_if_poly
~desc:"Same@ as@ encoding_tptp@ but@ only@ if@ polymorphism@ appear."
~desc:"Same@ as@ encoding_tptp@ but@ only@ in@ presence@ of@ polymorphism."
......@@ -301,11 +301,15 @@ let induction x bound env =
Trans.par [init_trans; rec_trans]
let () = wrap_and_register
~desc:"induction <term1> [from] <term2> performs a strong induction on int term1 from int term2. term2 is optional and default to 0."
~desc:"induction <term1> [from] <term2>@ \
performs@ a@ strong@ induction@ on@ the@ integer@ <term1>@ \
starting@ from@ the@ integer@ <term2>.@ <term2>@ is@ optional@ \
and@ defaults@ to@ 0."
"induction"
(Tterm (Topt ("from", Tterm Tenvtrans_l))) induction
let () = wrap_and_register
~desc:"revert <list> puts list back in the goal."
~desc:"revert <id list>@ \
puts@ the@ given@ identifiers@ back@ in@ the@ goal."
"revert"
(Tlist Ttrans) revert_tr_symbol
......@@ -352,7 +352,8 @@ let induction_on_hyp ls =
(Trans.store induction_ty_lex)
let () = wrap_and_register
~desc:"induction_arg_ty_lex <ls> performs induction_ty_lex on ls."
~desc:"induction_arg_ty_lex <id>@ \
performs@ 'induction_ty_lex'@ on@ the@ given@ logical@ symbol."
"induction_arg_ty_lex"
(Tlsymbol Ttrans_l) induction_on_hyp
......
......@@ -219,7 +219,8 @@ let induction_l attr induct task = match task with
| Some { task_decl ={ td_node = Decl { d_node = Dprop (Pgoal, pr, f) } };
task_prev = prev;
task_known = kn } ->
begin try List.map (add_prop_decl prev Pgoal pr) (induction_l attr induct kn f)
begin try List.map (add_prop_decl prev Pgoal pr)
(induction_l attr induct kn f)
with Ind_not_found -> [task] end
| _ -> assert false
......@@ -228,26 +229,24 @@ let induction_on_hyp attr b h =
(Trans.store (induction_l attr b))
let () = wrap_and_register
~desc:"induction_arg_pr <pr> performs induction_pr on pr."
~desc:"induction_arg_pr <name>@ \
performs@ 'induction_pr'@ on@ the@ given@ premise."
"induction_arg_pr"
(Tprsymbol Ttrans_l) (induction_on_hyp attr_ind true)
let () = wrap_and_register
~desc:"induction_arg_pr <pr> performs inversion_pr on pr."
~desc:"inversion_arg_pr <name>@ \
performs@ 'inversion_pr'@ on@ the@ given@ premise."
"inversion_arg_pr"
(Tprsymbol Ttrans_l) (induction_on_hyp attr_inv false)
let () =
Trans.register_transform_l "induction_pr" (Trans.store (induction_l attr_ind true))
~desc:"Generate@ induction@ hypotheses@ for@ goals@ over@ inductive@ predicates."
Trans.register_transform_l "induction_pr"
(Trans.store (induction_l attr_ind true))
~desc:"Generate@ induction@ hypotheses@ \
for@ goals@ over@ inductive@ predicates."
let () =
Trans.register_transform_l "inversion_pr" (Trans.store (induction_l attr_inv false))
Trans.register_transform_l "inversion_pr"
(Trans.store (induction_l attr_inv false))
~desc:"Invert@ inductive@ predicate."
(*
Local Variables:
compile-command: "unset LANG; make -C ../.. bin/why3.byte"
End:
*)
......@@ -150,4 +150,4 @@ let () =
~desc:"Same@ as@ 'inline_all', but@ only@ inline in@ goals.";
Trans.register_transform "inline_trivial" trivial
~desc:"Inline@ trivial@ definitions@ like@ @[f(x,y) = g(y,x,0)@]. \
Add@ the@ \"inline:trivial\"@ attribute@ to@ force@ inlining."
Add@ the@ [@@inline:trivial]@ attribute@ to@ force@ inlining."
......@@ -231,5 +231,5 @@ let () = Trans.register_env_transform "intro_projections_counterexmp"
intro_projections_counterexmp
~desc:"For@ each@ declared@ abstract@ function@ and@ predicate@ p@ \
with@ attribute@ [%@model_projected]@ and@ projecting@ f@ \
for@ p@ creates@ declaration@ of@ new@ constant@ c@ with@ \
for@ p,@ create@ declaration@ of@ new@ constant@ c@ with@ \
attribute@ [%@model]@ and@ an@ axiom@ c = f p."
......@@ -34,6 +34,6 @@ let prepare_for_counterexmp env = Trans.store (prepare_for_counterexmp2 env)
let () = Trans.register_env_transform "prepare_for_counterexmp"
prepare_for_counterexmp
~desc:"Transformation@ that@ prepares@ the@ task@ for@ querying@ for@ \
~desc:"Prepare@ the@ task@ for@ querying@ for@ \
the@ counter-example@ model.@ This@ transformation@ does@ so@ only@ \
when@ the@ solver@ will@ be@ asked@ for@ the@ counter-example."
......@@ -718,21 +718,24 @@ let reflection_by_function do_trans s env = Trans.store (fun task ->
[Task.add_decl prev df] )
let () = wrap_and_register
~desc:"reflection_l <prop> attempts to prove the goal by reflection using the lemma prop"
~desc:"reflection_l <prop>@ \
attempts@ to@ prove@ the@ goal@ by@ reflection@ \
using@ the@ lemma@ <prop>."
"reflection_l"
(Tprsymbol Tenvtrans_l) reflection_by_lemma
let () = wrap_and_register
~desc:"reflection_f <f> attempts to prove the goal by reflection using the contract of the program function f"
~desc:"reflection_f <f>@ \
attempts@ to@ prove@ the@ goal@ by@ reflection@ \
using@ the@ contract@ of@ the@ program@ function@ <f>."
"reflection_f"
(Tstring Tenvtrans_l) (reflection_by_function true)
let () = wrap_and_register
~desc:"reflection_f <f> attempts to prove the goal by reflection using the contract of the program function f, does not automatically perform transformations afterward. Use for debugging."
~desc:"reflection_f <f>@ \
attempts@ to@ prove@ the@ goal@ by@ reflection@ \
using@ the@ contract@ of@ the@ program@ function@ <f>.@ \
Does@ not@ automatically@ perform@ transformations@ \
afterwards.@ Use@ for@ debugging."
"reflection_f_nt"
(Tstring Tenvtrans_l) (reflection_by_function false)
(*
Local Variables:
compile-command: "unset LANG; make -C ../.."
End:
*)
......@@ -267,7 +267,9 @@ let subst_filtered ~subst_proxy filter =
let subst_all = subst_filtered ~subst_proxy:false (fun _ -> true)
let () =
wrap_and_register ~desc:"substitutes with all equalities between a constant and a term"
wrap_and_register
~desc:"Substitute@ with@ all@ equalities@ between@ \
a@ constant@ and@ a@ term."
"subst_all"
(Ttrans) subst_all
......@@ -282,7 +284,10 @@ let subst tl =
subst_filtered ~subst_proxy:true (fun ls -> Sls.mem ls to_subst)
let () =
wrap_and_register ~desc:"substitutes with all equalities involving one of the given constants"
wrap_and_register
~desc:"subst <constant list>@ \
substitutes@ with@ all@ equalities@ involving@ \
one@ of@ the@ given@ constants."
"subst"
(Ttermlist Ttrans) subst
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment