## Ctrl-D ## {#ctrld} Terminates the input and exit from the interpreter. ## `! ` ## {#commandexec} On Unix only, forks a shell and executes the given ``. ## `#define := .` ## {#sharp-define} Defines to be , that is, when appers in term, it is expanded to and then parsed. ## `**`, `**>` ## {#starstar} Starts a comment which extends to the end of the line. With the additional `>` the comment is displayed while evaluated by the interpreter. Related: [comments](#comments), [`--`](#starstar) ## `--`, `-->` ## {#dashdash} Starts a comment which extends to the end of the line. With the additional `>` the comment is displayed while evaluated by the interpreter. Related: [comments](#comments), [`**`](#starstar) ## `.` ## {#dotsep} Input separator ## `=` ## {#axeq} The syntax element `=` introduces an axiom of the equational theory, and is different from `==` which specifies an equality based on rewriting. Related: [`eq`](#eq), [`==`](#equality) ## `=(n)=>`, `=(n,m)=>`, `=()=>` ## {#searchpredsymb} See [`search predicates`](#searchpredicate) ## `=*=` ## {#bequality} The predicate for behavioral equivalence, written `=*=`, is a binary operator defined on each hidden sort. ## `=/=` ## {#notequal} Negation of the predicate `==`. Related: [`==`](#equality) ## `==` ## {#equality} The predicate `==` is a binary operator defined for each visible sort and is defined in terms of evaluation. That is, for ground terms `t` and `t'` of the same sort, `t == t'` evaluates to `true` iff terms reduce to a common term. This is different from the equational `=` which specifies the equality of the theory. ## `==>` ## {#transrel} This binary predicate is defined on each visible sort, and defines the transition relation, which is reflexive, transitive, and closed under operator application. It expresses the fact that two states (terms) are connected via transitions. Related: [search predicates](#searchpredicate), [`trans`](#trans) ## `? []` ## {#help} Without any argument, shows the brief guide of online help system. With argument gives the reference manual description of `term`. In addition to this, many commands allow for passing `?` as argument to obtain further help. In case examples are provided for the ``, they can be displayed using `?ex `. In this case the normal help output will also contain an informational message that examples are available. When called as ?? both documentation and examples are shown. ## `?apropos [ ...]` ## {#apropos} Searches all available online docs for the terms passed. Terms are separated by white space. Each term is tested independently and all terms have to match. Testing is done either by simple sub-string search, or, if the term looks like a regular expression (Perl style), by regex matching. In case a regex-like term cannot be parsed as regular expression, it is used in normal sub-string search mode. Note: Fancy quoting with single and double quotes might lead to unexpected problems. ### Example ### ````` CafeOBJ> ?ap prec oper ````` will search for all entries that contain both `prec` and `oper` as sub-strings. Matching is done as simple sub-string match. ````` CafeOBJ> ?ap foo att[er] ````` will search for entries that contain the string `foo` as well as either the string `atte` or `attr`. ## `?com [ ]` ## {#help-commands} List commands or declarations categorized by the key . is one of 'decl', 'module', 'parse', 'rewrite', 'inspect', 'switch', 'proof', 'system', 'inspect', 'library', 'help', 'io' or 'misc'. If is omitted, the list of available will be printed. ## `[` ## {#sortsymbol} Starts a sort declaration. See [sort declaration](#sort) for details. ## `accept =*= proof` switch ## {#switch-accept} accept system's automatic proof of congruency of `=*=` ## `all axioms` switch ## {#switch-all-axioms} Controls whether axioms from included modules are shown during a `show` invocation. Related: [`show`](#show) ## `always memo` switch ## {#switch-always-memo} Turns on memorization of computation also for operators without the [`memo`](#opattr) operator attribute. Related: [operator attributes](#opattr), [`memo`](#switch-memo) ## `:apply ( ...) [to ]` ## {#citp-apply} Apply the list of tactics given within parenthesis to either the current goal, or the goal given as ``. Related: [`citp`](#citp) ## `apply [ ] ` ## {#apply} Applies one of the following actions `reduce`, `exec`, `print`, or a rewrite rule to the term in focus. `reduce`, `exec`, `print` ~ the operation acts on the (sub)term specified by `` and ``. rewrite rule ~ in this case a rewrite rule spec has to be given in the following form: `[+|-][].` where `` is the name of a module, and `` either a number n - in which case the n. equation in the current module is used, or the label of an equation. If the `` is not given, the equations of the current module are considered. If the leading `+` or no leading character is given, the equation is applied left-to-right, which with a leading `-` the equation is applied right-to-left. The `` is of the form `with { = } +,` and is used when applying a rewrite rule. In this case the variables in the rule are bound to the given term. `` is either `within` or `at`. In the former case the action is applied at or inside the (sub)term specified by the following selection. In the later case it means exactly at the (sub)term. Finally, the `` is an expression ` { of } *` where each `` is one of `top`, `term` ~ Selects the whole term `subterm` ~ Selects the pre-chosen subterm (see [`choose`](#choose)) `( )` ~ A list of numbers separated by blanks as in `(2 1)` indicates a subterm by tree search. `(2 1)` means the first argument of the second argument. `[ .. ]` ~ This selector can only be used with associative operators. It indicates a subterm in a flattened structure and selects the subterm between and including the two numbers given. `[n .. n]` can be abbreviated to `[n]`. Example: If the term is `a * b * c * d * e`, then the expression `[2 .. 4]` selects the subterm `b * c * d`. `{ }` ~ This selector can only be used with associative and commutative operators. It indicates a subterm in a multiset structure obtained from selecting the subterms at position given by the numbers. Example: If the operator `_*_` is declared as associative and commutative, and the current term is `b * c * d * c * e`, then then the expression `{2, 4, 5}` selects the subterm `c * c * e`. Related: [`start`](#start), [`choose`](#choose) ## `:auto` ## {#citp-auto} Applies the following set of tactics: `(SI CA TC IP RD)`. Related: [`citp`](#citp) ## `auto context` switch ## {#switch-auto-context} Possible values: `on` or `off`, default is `off`. If this switch is `on`, the context will automatically switch to the most recent module, i.e., defining a module or inspecting a module's content will switch the current module. ## `autoload ` ## {#autoload} When evaluating a and found that it is not yet declared, the system read in then retries the evaluation. Related: [`no autoload`](#no-autoload) ## `ax [ ] = ` . ## {#ax} (pignose) ## `axioms { }` ## {#axioms} Block enclosing declarations of variables, equations, and transitions. Other statements are not allowed within the `axioms` block. Optional structuring of the statements in a module. Related: [`trans`](#trans), [`eq`](#eq), [`var`](#var), [`imports`](#imports), [`signature`](#signature) ## `:backward equation|rule` ## {#citp-backward} Like [`:equation`](#citp-equation) and [`:rule`](#citp-rule), but exchange the left and right side. Related: [`:rule`](#citp-rule), [`:equation`](#citp-equation), [`:cp`](#citp-cp), [`citp`](#citp) ## `bax [ ] = ` . ## {#bax} (pignose) ## `bceq [ ] = if .` ## {#bceq} Defines a behavioral conditional equation. For details see [`ceq`](#ceq). Related: [`beq`](#beq), [`ceq`](#ceq), [`eq`](#eq) ## `bcrule [ ] => if .` ## {#bcrule} Synonym of [`bctrans`](#bctrans) Related: [`bctrans`](#bctrans) ## `bctrans [ ] => if .` ## {#bctrans} Defines a behavioral conditional transition. For details see [`ctrans`](#ctrans). Related: [`btrans`](#btrans), [`ctrans`](#ctrans), [`trans`](#trans) ## `beq [ ] = .` ## {#beq} Defines a behavioral equation. For details see [`eq`](#eq). Related: [`bceq`](#bceq), [`ceq`](#ceq), [`eq`](#eq) ## `bgoal .` ## {#bgoal} (pignose) ## `bgrind [in :] .` ## {#bgrind} Print given boolean term in 'grind'ed manner after computes its xor-and normal form. ## `:bgrind [in :] .` ## {#citp-bgrind} Used diring [CITP](#citp) proofs instead of [`bgrind`](#bgrind) ## `{bguess | :bguess} {imply|and|or} [ with ]` ## {#bguess} Try to find true/false assignments which satisfies the Bool term specified by 'binspect' or ':binspect'. ## `binspect [in :] .` ## {#binspect} Start an inspection of a Boolean term, that is, and abstracted form of the Boolean term is constructed. The abstracted term is shown (like calling [`bshow`](#bshow). ### Example ### ~~~~~ CafeOBJ> module BTE { [S] preds p1 p2 p3 p4 p5 p6 p7 : S ops a b c : -> S . } CafeOBJ> binspect in BTE : (p1(X:S) or p2(X)) and p3(Y:S) or (p4(Y) and p1(Y)) . ... --> ((p4(Y:S) and p1(Y)) xor ((p3(Y) and p1(X:S)) xor ((p2(X) and (p3(Y) and p1(X))) xor ((p3(Y) and p2(X)) xor ((p3(Y) and (p2(X) and (p4(Y) and p1(Y)))) xor ((p3(Y) and (p2(X) and (p1(X) and (p1(Y) and p4(Y))))) xor (p1(X) and (p3(Y) and (p1(Y) and p4(Y)))))))))) ... ~~~~~ ## `:binspect [in :] .` ## {#citp-binspect} Used during [CITP](#citp) proofs instead of [`binspect`](#binspect) ## `bop : -> ` ## {#bop} Defines a behavioral operator by its domain, co-domain, and the term construct. `` is a space separated list of sort names containing *exactly* one hidden sort. `` is a single sort name. For `` see the explanations of [`op`](#op). Related: [`op`](#op) ## `bpred : ` ## {#bpred} Short hand for `op : -> Bool` defining a behavioral predicate. Related: [`pred`](#pred), [`bop`](#bop), [`op`](#op) ## `breduce [ in : ] .` ## {#breduce} Reduce the given term in the given module, if `` is given, otherwise in the current module. For `breduce` equations, possibly conditional, possibly behavioral, are taken into account for reduction. Related: [`reduce`](#reduce), [`execute`](#execute) ## `{bresolve | :bresolve} [] [all]` ## {#bresolve} Computes all possible variable assignments that render an abstracted term `true`. The variant with leading colon is for usage during a [CITP](#citp) proof. If an optional argument 'all' is specified, all solutions will be searched. Optional specifies maximal number of variable combination, i.e. if there are 3 variables v1, v2, and v3, and is 2, the following cases are examined: (1) v1 : true/false (2) v2 : true/false (3) v3 : true/false (4) v1/v2 : combinations of true/false of two variables (5) v1/v3 : combinations of true/false of two variables (6) v2/v3 : combinations of true/false of two variables ### Example ### ~~~~~ CafeOBJ> bresolve 2 all ** (1) The following assignment(s) makes the term to be 'true'. [1] { P-3:Bool |-> true } where p-3 = P4(Y:S) [2] { P-4:Bool |-> true } where p-4 = P1(X:S) ** (2) The following assignment(s) makes the term to be 'true'. [1] { P-1:Bool |-> true, P-2:Bool |-> true } where p-1 = P3(Y:S) p-2 = P2(X:S) ... ~~~~~ ## `brule [ ] => .` ## {#brule} Synonym of [`btrans`](#btrans). Related: [`btrans`](#btrans) ## `{bshow | :bshow} [{ tree | grind }]` ## {#bshow} Shows the abstracted Boolean term computed by [`binspect`](#binspect). If the argument `tree` is given, prints out a the abstracted term in tree form. The variant with leading colon is for usage during a [CITP](#citp) proof. ### Example ### ~~~~~ CafeOBJ> bshow ((P-1:Bool and (P-2:Bool and (P-3:Bool and P-4:Bool))) xor ((P-1 and (P-2 and (P-4 and (P-5:Bool and P-3)))) xor ((P-2 and (P-1 and (P-5 and P-3))) xor ((P-5 and P-3) xor ((P-4 and (P-3 and P-5)) xor ((P-4 and P-3) xor (P-2 and P-1))))))) where P-1:Bool |-> p4(Y:S) P-2:Bool |-> p1(Y:S) P-3:Bool |-> p3(Y:S) P-4:Bool |-> p1(X:S) P-5:Bool |-> p2(X:S) ~~~~~ ## `bsort token-predicate creater printer term-predicate` ## {#bsort} Defines a built-in sort. Internal use only. ## `btrans [ ] => .` ## {#btrans} Defines a behavioral transition. For details see [`trans`](#trans). Related: [`bctrans`](#bctrans), [`ctrans`](#ctrans), [`trans`](#trans) ## `cbred [ in :] .` ## {#cbred} circular coinductive reduction: see _Goguen, Lin, Rosu: Circular Coinductive Rewriting_ (Proceedings of Automated Software Engineering 2000) for details. ## `cd ` ## {#cd} Change the current working directory, like the Unix counterpart. The argument is necessary. No kind of expansion or substitution is done. Related: [`ls`](#ls), [`pwd`](#pwd) ## `ceq [ ] = if .` ## {#ceq} Defines a conditional equation. Spaces around the `if` are obligatory. `` needs to be a Boolean term. For other requirements see [`eq`](#eq). Related: [`bceq`](#bceq), [`beq`](#beq), [`eq`](#eq) ## `check ` ## {#check} This command allows for checking of certain properties of modules and operators. `check regularity ` ~ Checks whether the module given by the module expression `` is regular. `check compatibility ` ~ Checks whether term rewriting system of the module given by the module expression `` is compatible, i.e., every application of every rewrite rule to every well-formed term results in a well-formed term. (This is not necessarily the case in order-sorted rewriting!) `check laziness ` ~ Checks whether the given operator can be evaluated lazily. If not `` is given, all operators of the current module are checked. Related: [`regularize`](#regularize) ## `check ` switch ## {#switch-check} These switches turn on automatic checking of certain properties: `check coherency` ~ check whether transitions and equations are coherent `check compatibility` ~ see the [`check`](#check) command `check import` ~ check conflicting importing mode of submodules `check regularity` ~ see the [`check`](#check) command `check sensible` ~ check whether a signature is sensible ## `choose ` ## {#choose} Chooses a subterm by the given ``. See [`apply`](#apply) for details on ``. Related: [`strat` in operator attributes](#opattr), [`start`](#start), [`apply`](#apply) ## CITP ## {#citp} Constructor Based Induction Theorem Prover The sub-system provides a certain level of automatization for theorem proving. Please see the accompanying manual for CITP for details. Related: [`:attr`](#target_not_found), [`:reset`](#citp-reset), [`:embed`](#citp-embed), [`:use`](#citp-use), [`:ord`](#citp-order), [`:imp`](#citp-imply), [`:def`](#citp-def), [`:ctf-`](#citp-ctf-), [`:ctf`](#citp-ctf), [`:csp-`](#citp-csp-), [`:csp`](#citp-csp), [`:red`](#citp-red), [`:select`](#citp-select), [`:backward`](#citp-backward), [`:rule`](#citp-rule), [`:equation`](#citp-equation), [`:cp`](#citp-cp), [`:init`](#citp-init), [`:roll`](#citp-roll), [`:auto`](#citp-auto), [`:ind`](#citp-ind), [`:apply`](#citp-apply), [`:goal`](#citp-goal) ## `clause .` ## {#clause} (pignose) ## `clean memo` ## {#cleanmemo} Resets (clears) the memo storage of the system. Memorized computations are forgotten. Related: [clean memo switch](#switch-clean-memo) ## `clean memo` switch ## {#switch-clean-memo} Possible values: `on`, `off`, default `off`. tells the system to be forgetful. ## `close` ## {#close} This command closes a modification of a module started by [`open`](#open). Related: [`open`](#open) ## `commands` ## {#comshelp} Print outs the list of main toplevel commands. ## comments ## {#comments} The interpreter accepts the following strings as start of a comment that extends to the end of the line: `--`, `-->`, `**`, `**>`. The difference in the variants with `>` is that the comment is displayed when run through the interpreter. Related: [`--`](#starstar), [`**`](#starstar) ## `cond limit` switch ## {#switch-cond-limit} Setting maximal number of evaluation of condition part of an axiom. This is useful for detecting a kind of inifinite loop of rewriting. ## `cont` ## {#cont} In [step mode](#switch-step), continues the reduction until a [stop pattern](#switch-stop-pattern) has been found. ## `:cp { "["