The Template-Based OE tool (or "TOE") harnesses the Cyc® inference engine to enable users to do batch KE operations. By formulating a query in the syntax of CycL (see The Syntax of CycL) on the TOE, a user can produce a list of CycL terms that can be passed through an OE template, thereby generating a batch of "kill", "assert", "unassert", or "blast" operations.
To use the TOE, the user first formulates a query on the "Query Specification" page of the TOE. The bindings returned by this query can be passed through one of the OE templates that are available from the TOE.
The "Query Specification" page of the TOE works in a manner that is very similar to the way the Ask tool works (see the Ask a Query help page) -- the TOE query specification is formulated in exactly the same way a Ask tool query specification is formulated, and a TOE query specification is handed to the Cyc inference engine with query parameters set to 0 backchains, a number cutoff of "get everything", a time cutoff of "run forever", and a depth cutoff of "infinite depth".
To formulate a query specification for the TOE, the user enters the microtheory in which the query is to run in the "Mt:" window. It doesn't matter whether the Mt name is typed with or without "#$" before it. The CycL query to be run is entered into the "Formula" input window. In this window, constant names require their "#$" prefixes. The [Cyclify] button adds "#$" before each valid constant name in the window. Pressing the [Complete] button next to either the Mt or Formula window finishes a partially typed constant name in the respective window. (In the Formula window, Complete works only on the last term in the window.) If the typed string has multiple completions, Complete displays a list of possible choices in a separate Completions window.
Once the user has formulated a query and entered the name of the microtheory in which the query is to be asked, there are 5 options: the user can press [Run Query], or the user can choose from among the "Available Templates:" buttons, which are [Assert], [Unassert], [Blast], [Kill].
Query Results 3 Answers ?X [Explain #1] Dog [Explain #2] (FemaleFn Dog) [Explain #3] (JuvenileFn Dog) [Examine the inference tree]If these are the bindings the user expects, then the user should return to the "Query Specification" page of the TOE in order to to use one of the available templates.
Resulting Forms Current query in BaseKB : (genls ?X Dog) [Add Forms to Agenda] Operations: OK? (KE-KILL (JuvenileFn Dog)) [x] (KE-KILL (FemaleFn Dog)) [x] (KE-KILL Dog) [x]The user can add all of the selected operations to the agenda by pressing [Add Forms to Agenda]. An operation counts as "selected" if the box in its row under "OK?" is clicked. By default, all of the operations are selected.
Once the assertion specification has been entered, the user presses the [Run Template Assert] button. Pressing this button causes Cyc to run the query that was entered at the "Query Specification" page and then to insert the bindings that are returned in the matching variable-slots of the assertion specification. Thus, if the query is of the form (predicate1 bound-argument ?X) and the assert template is of the form (predicate2 bound-argument ?X) in the microtheory mt, each binding returned by the query will be inserted as a replacement for X in an OE template of the form: (KE-ASSERT '(predicate2 bound-argument X) 'mt ':DEFAULT ':FORWARD). Thus, if the user asks for all the specializations of #$Dog that are known in the #$BaseKB by entering "#$BaseKB" in the "Mt:" window and "(#$genls ?X #$Dog)" in the "Query Specification:" window and pressing the [Assert] template button, then enters "#$BaseKB" and "(genls ?X #$Thing)" on the "Assert Specification" page, the user will be taken to a new page that looks like this:
Resulting Forms Current query in BaseKB : (genls ?X Dog) Current Assert Template in BaseKB : (genls ?X Thing) Operations: OK? (KE-ASSERT '(genls (JuvenileFn Dog) Thing) 'BaseKB ':DEFAULT ':FORWARD) [x] (KE-ASSERT '(genls (FemaleFn Dog) Thing) 'BaseKB ':DEFAULT ':FORWARD) [x] (KE-ASSERT '(genls Dog Thing) 'BaseKB ':DEFAULT ':FORWARD) [x]The user can add all of the selected operations to the agenda by pressing [Add Forms to Agenda]. An operation counts as "selected" if the checkbox in its row under "OK?" is checked. By default, all of the operations are selected.
Resulting Forms Current query in BaseKB : (genls ?X Dog) Current Unassert Template in BaseKB : (genls ?X Dog) Operations: OK? (KE-UNASSERT '(genls (JuvenileFn Dog) Dog) 'BaseKB) [x] (KE-UNASSERT '(genls (FemaleFn Dog) Dog) 'BaseKB) [x] (KE-UNASSERT '(genls Dog Dog) 'BaseKB) [x]The user can add all of the selected operations to the agenda by pressing [Add Forms to Agenda]. An operation counts as "selected" if the box in its row under "OK?" is clicked. By default, all of the operations are selected.
Thus, if the query entered on the "Query Specification" page is of the form (predicate1 bound-argument ?X) and the blast template entered on the "Blast Specification" page the is of the form (predicate2 bound-argument ?X) in the microtheory mt, each binding returned by the query will be inserted as a replacement for X in an OE template of the form: (FI-BLAST '(predicate2 bound-argument X) 'mt). Thus, if the user asks for all the specializations of #$Dog that are known in the #$BaseKB by entering "#$BaseKB" in the "Mt:" window and "(#$genls ?X #$Dog)" in the "Query Specification:" window and pressing the [Blast] template button, then enters "#$BaseKB" and "(genls ?X #$Dog)" on the "Blast Specification" page, the user will be taken to a new page that looks like this:
Resulting Forms Current query in BaseKB : (genls ?X Dog) Current Unassert Template in BaseKB : (genls ?X Dog) Operations: OK? (FI-BLAST '(genls (JuvenileFn Dog) Dog) 'BaseKB) [x] (FI-BLAST '(genls (FemaleFn Dog) Dog) 'BaseKB) [x] (FI-BLAST '(genls Dog Dog) 'BaseKB) [x]The user can add all of the selected operations to the agenda by pressing [Add Forms to Agenda]. An operation counts as "selected" if the checkbox in its row under "OK?" is checked. By default, all of the operations are selected.