next up previous contents index
Next: Abstractions Up: Editing Term Structure Previous: New Term Entry

Exploded Terms

 

A term constructor is exploded  when it is replaced by a special collection of terms, so arranged so that you can edit the structure of the term constructor; change its opid, change the number and kind of its parameters, or change its arity. Note that in practice, the only time you usually edit exploded terms is when you add or change the definition of an abstraction.

The commands for editing exploded terms are summarized in Table gif .

  
Table: Exploded Term Editing

To show how they are used, we walk through the entry of the term foo bar:s (A;x.B). Position a term cursor at an empty term slot and enter:

The highlighted term should look like:

Enter the opid:

to get:

EXPLODED<<foo

()>>

Click MOUSE-LEFT on the , and you should get a null width term cursor sitting on an empty term sequence for parameters.

EXPLODED<<foo

()>>

Enter C-O to add a new slot to the parameter sequence:

EXPLODED<<foo ()>>

Insert the string parameter with text bar:

to get:

EXPLODED<<foo bar :s ()>>

Click MOUSE-LEFT on the ) to get a null width term cursor sitting on an empty term sequence for bound terms:

EXPLODED<<foo bar:s ( )>>

Enter C-O C-O to make a two element sequence for bound terms, leaving the cursor on the left-most element.

EXPLODED<<foo bar:s

( ;.[term])>>

Click MOUSE-LEFT on the second . to get a null width term cursor sitting on an empty term sequence for binding variables:

EXPLODED<<foo bar:s

( .[term]; .[term])>>

Enter C-O

RETURN to open up a slot in the sequence, and enter a binding variable term:

EXPLODED<<foo bar:s

( [term]; [bvar].[term])>> Finally, click MOUSE-LEFT on any part of EXPLODED and then enter

to implode the exploded terms. You should now have the term:

You could now go ahead and fill in the binding variable, and subterm slots. In general, when imploding and exploding terms the parameter values, binding variable names, and subterms stay the same, so entering and/or editing them when a term is exploded has the same effect as when the term is imploded.



next up previous contents index
Next: Abstractions Up: Editing Term Structure Previous: New Term Entry



Karla Consroe
Wed Oct 23 13:48:45 EDT 1996