| 1 |
;;; |
| 2 |
;;; CafeOBJ CITP like prover ============================================= |
| 3 |
;;; |
| 4 |
|
| 5 |
Here is a brief memo about new commands introduced for CITP like prover for CafeOBJ. |
| 6 |
Descriptions are given merged with with the output of '(help me.)' of Maude CITP. |
| 7 |
Please note that syntax of commands are not fixed, they might be changed |
| 8 |
reflecting feed backs. |
| 9 |
|
| 10 |
** Maude CITP: (goal ModuleName |- Equations/Rules/Memberships) |
| 11 |
|
| 12 |
In CafeOBJ we firstly set a context module by |
| 13 |
'select <Modexpr> .' or 'open <Modexpr> .', then do |
| 14 |
:goal { <axiom> . ... <axiom> .} |
| 15 |
|
| 16 |
** Maude CITP: (set ind on Vars .) -- specify the variables for induction |
| 17 |
|
| 18 |
:ind on ( <variable> ... <variable> ) |
| 19 |
ex. :set ind on (Var1:Sort-1 Var2:Sort2) |
| 20 |
|
| 21 |
** Maude CITP: (init LEMMA by V <- c .) -- initialize a lemma by substitution. |
| 22 |
'LEMMA' means label of an axiom or axiom form. |
| 23 |
In CafeOBJ, we specify LEMMA by "["<label>"]" or "(" <axiom> "." ")". |
| 24 |
|
| 25 |
:init [<label] by <Substitutions> |
| 26 |
:init ( <axiom> ) by <Substitutions> { <variable> <- <term> ; ... <variable> <- <term> ;} |
| 27 |
|
| 28 |
<Substitutions> (list of variable substitution) is given by |
| 29 |
"{" <variable> "<-" <term> ";" ... <variable> <- <term> ";" "}" |
| 30 |
|
| 31 |
** Maude CITP: (auto goal GoalID .) -- prove a subgoal |
| 32 |
Not directly implemented, but can obtain the same effect by: |
| 33 |
|
| 34 |
:select GoalID |
| 35 |
:auto |
| 36 |
|
| 37 |
NOTE: ':select <goal-name>' is CafeOBJ specific command and |
| 38 |
it sets the next default target goal to be proved. |
| 39 |
:apply or :auto will apply tactic(s) to this goal. |
| 40 |
If <goal-name> is '.' it reset the default goal to the next unproved |
| 41 |
goal. Here 'next' is the left-most inner-most unproved leaf of |
| 42 |
proof tree. |
| 43 |
|
| 44 |
** Maude CITP: (auto .) -- try to prove the current goal |
| 45 |
:auto |
| 46 |
|
| 47 |
** Maude CITP: (roll back .) -- go back to the previous goal |
| 48 |
:roll back |
| 49 |
|
| 50 |
More specifically, 'previous goal' is the parent goal of the |
| 51 |
current target goal. |
| 52 |
|
| 53 |
** Maude CITP: (apply RuleName .) -- apply a given rule to default goal |
| 54 |
:apply ( <rule-name> ... <rule-name>) |
| 55 |
|
| 56 |
where <rule-name> is one of SI, IP, CA, CS, TC, RD, CS. |
| 57 |
the tactic CS is not yet implemented, and will not be. |
| 58 |
|
| 59 |
** Maude CITP: (apply RuleName to GoalId .) -- apply a rule to a goal |
| 60 |
Not implemented directly. By combining with :select command |
| 61 |
we can get the same effect: |
| 62 |
|
| 63 |
:select GoalId |
| 64 |
:apply (RuleName RuleName ... RuleName) |
| 65 |
|
| 66 |
** Maude CITP: (cp EQ >< EQ) -- check critical pairs |
| 67 |
|
| 68 |
:cp (<axiom> >< <axiom> .) |
| 69 |
|
| 70 |
** Maude CITP: (cp Label >< Label .) -- check critical pairs |
| 71 |
:cp [<label>] >< [<label>] |
| 72 |
|
| 73 |
In CafeOBJ, :cp can be of a form ':cp [<label>] >< (<axiom> .)' or |
| 74 |
':cp (<axiom> . ) >< [<label>] |
| 75 |
|
| 76 |
** Maude CITP: (rule .) -- add a critical pair as a rule |
| 77 |
:rule |
| 78 |
|
| 79 |
** Maude CITP: (backward rule .) -- rule in inverse direction |
| 80 |
:backward rule |
| 81 |
|
| 82 |
** Maude CITP: (equation .) -- add a critical pair as an equation |
| 83 |
:equation |
| 84 |
|
| 85 |
** Maude CITP: (backward equation .) -- equation in inverse direction |
| 86 |
:bakward equation |
| 87 |
|
| 88 |
** Maude CITP: (show unproved goals .) -- show all unproved goals |
| 89 |
show unproved goals |
| 90 |
|
| 91 |
** Maude CITP: (show goal GoalID .) -- show a goal and set it as default |
| 92 |
show goal <goal-name> |
| 93 |
|
| 94 |
** Maude CITP: (show goal .) -- show the current goal |
| 95 |
show goal |
| 96 |
|
| 97 |
** Maude CITP: (show tactics .) -- show all tactics |
| 98 |
NOT YET |
| 99 |
|
| 100 |
** Maude CITP: (set tactic PROOF STRATEGY .) -- specify customized proof strategy |
| 101 |
NOT YET |
| 102 |
If we implement this, it will be of the form |
| 103 |
'set tactic to <strategy-name> ( <rule-name> ... <rule-name>)' |
| 104 |
|
| 105 |
** Maude CITP: (select tactic NAT .) -- to use customized proof strategy |
| 106 |
NOT YET |
| 107 |
|
| 108 |
** Maude CITP: (set module off .) -- only show added contents in module |
| 109 |
Will not be implemented. |
| 110 |
Context module can be seen by 'show <Context Module Name>' |
| 111 |
|
| 112 |
** Maude CITP: (set module on .) -- display all content in modules |
| 113 |
See above. |
| 114 |
|
| 115 |
** Maude CITP: (lred <Term> .) -- reduce term in current goal |
| 116 |
|
| 117 |
:lred <Term> . |
| 118 |
|
| 119 |
** Maude CITP: (help me .) -- show all commands |
| 120 |
NOT YET. |
| 121 |
|
| 122 |
---------- |
| 123 |
CafeOBJ also introduced the followings: |
| 124 |
|
| 125 |
'show proof' : displays the current proof tree. only shows nodes. |
| 126 |
'describe proof' : display the current proof tree with |
| 127 |
assumptions, proved axioms, target axioms. |
| 128 |
|
| 129 |
|