next up previous contents index
Next: Demonstration Up: Dreams Previous: Glossary   Contents   Index



Advertised Interface

{ word1 ...wordn } ( cfa )
This word compiles a colon definition from word1 ...wordn and compiles a literal holding the execution token of that colon definition. Thus an unnamed colon definition is produced. This is similar to the lambda special form of Lisp.

2VAR[ v1 ... vn ] ( size1 cfa1 ... sizen cfan )
This word is like VAR[ except that it is used for 2VARIABLEs.

AFTER ( after-cfa method-cfa essence )
Attaches an after method to the main method specified in the understanding of the dream specified by the essence pointer.

BEFORE ( before-cfa method-cfa essence )
Attaches a before method to the main method specified in the understanding of the dream specified by the essence pointer.

COMA ( guzintas... thought guzoutas... )
This is the null vision. It is a vision of zero dreams. It is an object like any other vision. It may be used as a place holder in a set of multiply nested visions, or wherever an empty vision is needed.

Copy-Essence ( old-essence new-essence )
This word takes a pointer to the essence of a dream and makes a copy of that essence, returning a pointer to the new copy.

DEJA-VU ( guzintas... thought guzoutas... )
Lifts the current understanding back to the previous vision a vision at a time. Like REGRESS, only works on visions instead of dreams.

DID ( pfa )
This word executes a colon definition when given its pfa, in much the same fashion that EXECUTE executes a colon definition when given its cfa. This word is used in conjunction with REALLY to execute the definition of a colon definition that was visable during compilation instead of during dynamic execution.

DREAM name ( NIL sizen cfan ... size1 cfa1 )
This is the defining word for a dream. It takes a NIL-terminated list of size/cfa pairs on the stack. The cfa's specify words to which the dream is to attach local meaning, and the size's specify how much private storage is to be allocated to the parameter field of each word.

EARLY ( word-cfa essence word-pfa )
Compiles the compile-time binding of word-cfa in the understanding of essence. This permits early binding to the understanding of a dream other than the one that is executing while the compilation is occuring.

ESSENCE dream ( essence )
This word is a macro to extract the essence of a dream. It reads the next source stream input token, and assuming that this is the name of a dream, it returns a pointer to the data structure for that dream.

FANTASY ( vision dream )
Converts a vision into a dream that has identical bindings, except that variables will have new pfa's.

IMAGINE ( new-cfa old-cfa essence )
This word is used to modify a dream's understanding of a word local to that dream. The word whose name is given by old-cfa will cause the action given by new-cfa when pondered in the dream given by essence.

Make-Essence ( NIL sizen cfan ... size1 cfa1 essence )
This word takes a NIL-terminated list of objects to be made local to a dream, together with each of their types, represented by the object's size, and allocates storage for and initializes a data structure for the essence of a dream. A pointer to this data structure is returned on the stack.

make-vision ( NIL essence1 ... essencen vision )
This word makes a vision from a NIL-terminated list of dream essence pointers, and returns a pointer to it on the stack.

MILIEU ( essence )
This word returns the essence of the currently active dream. It is the self-referential dream.

NIL ( null-pointer/false )
This word returns a pointer to nowhere, which is also interpreted as a false logical value. Thus in ANS-Forth, it is zero.

PONDER ( guzintas... thought essence guzoutas... )
This word causes a thought to be pondered in the understanding of a dream. It takes a pointer to the essence of the dream, a thought, and any input parameters to that thought. It returns the result of applying that thought in the understanding of the dream to the input parameters.

REALITY ( guzintas... thought guzoutas... )
This word ponders a thought in reality by regressing repeatedly until the true understanding of reality is reached.

REALLY word ( pfa )
This word compiles a literal containing the pfa of the word whose name follows the word REALLY in the input stream. It is used to force early binding to words that would otherwise have a dynamically bound local definition.

REF[ name1 ... namen ] ( size1 cfa1 ... sizen cfan )
This word is a macro like VAR[ and 2VAR[ only it is used for reference bindings. These are used for colon definitions and other words that do not have a modifiable data storage area associated with them.

REGRESS ( guzintas... thought guzoutas... )
This word is used to cause a thought to be pondered in the understanding in which the current dream was invoked. It causes the understanding of the current dream to be lifted, or undone, thereby making the understanding in which that dream was invoked again visible. After the thought has been pondered, the current dream's understanding is restored.

RELAPSE new-dream ( essence )
This defining word creates a new named copy of a dream whose essence is passed to it. It reads the next source stream input token and creates a dictionary entry for that name as a dream which is a copy of the original dream.

SEE ( guzintas... thought vision guzoutas... )
This word causes a thought to be seen in a vision the same way that PONDER causes a thought to be pondered in a dream. It may also be used to ponder a thought in a dream, since a dream is an atomic vision; or equivalently, visions are molecules formed of dreams.

STUPOR ( guzintas... thought guzoutas... )
This word is a dream with no local meanings. It may be used to cause a thought to be pondered in the current understanding. Its essence may be manipulated exactly like any other dream. It is the milieu of reality.

THOUGHT ( cfa )
This is a defining word that is used to give a name to a thought. When that name is later used, it returns the associated thought as an execution token, or cfa.

TRANCE name ( NIL sizen cfan ... size1 cfa1 )
This is a meta-defining word. It is used to create a word that creates dreams with similar essences. TRANCE reads the next source stream input token and creates a word of that name which is itself a defining word. When the offspring word is used, it reads a token from the input stream and creates a dream of that name with the local objects specified to the trance. In conventional object oriented parlance, TRANCE is a class defining word.

VAR[ var1 ... varn ] ( size1 cfa1 ... sizen cfan )
This word is a macro to ease coding and improve readability. It is used to build a list of variables for Make-Essence. The syntax of its use is as follows: VAR[ var1 ... varn ]. See the example session for an example of its use.

VISION name ( NIL essence1 ... essencen )
This is the defining word for a vision. The essences of the dreams comprising the vision are passed on the stack, with the dominant dream pushed first.

VISION[ dream1 ... dreamn ] name ( )
This is a macro for declaring visions at compile time. It takes a list of dream names from the source stream and builds a vision with the specified name.

[EARLY] word dream ( )
Compiles the compile-time early binding of word in the understanding of dream.


next up previous contents index
Next: Demonstration Up: Dreams Previous: Glossary   Contents   Index
Robert J. Brown
1999-09-26