Copyright (c)  1994, 1995, 2002  Timothy Rue (

  Permission is granted to copy, distribute and/or modify this document
  under the terms of the GNU Free Documentation License, Version 1.2
  or any later version published by the Free Software Foundation; with no
  Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.

  A copy of the license is included in the file fdl.html

***THIS TEXT IS NOT CURRENT - Provided only for historical reference.


                        (KE) KEy  (or Knowledge Enable)

             KE - constrain access and use of definitions

    (KE) KEy - The concept of KEy is best described as using keys to
             open doors to knowledge and parts usage. It allows "IQ/ID"
             knowledge constraints to be applied and has the trade off
             of search time. More constrained, faster search. Keys can
             be created, changed and removed from the current KE file
             through "KE". The current KE file can be created, changed
             or removed through "PK". Keys can have teeth and a master
             key can exist in the PK file.

             Keyholes and Keys - pattern matching

             KE flags are to allow changing the rules on keyhole usage
             within the IQ/ID files. This will allow different formated
             knowledge to be used. Also for constraining IQ/ID search
             to a standard grep type search. This needs to be worked out.

             File keyholes - When a file keyhole is encountered the
             following sequence happens:

             1) A matching file-key is looked for in the current KE
                file. If not found, skips file. If found goes to #2.

             2) The file-key teeth and master-key teeth are comparied
                with the file, that keyhole points to, keychain (a
                commented header that contains a list of all non-word
                key-teeth in the file, including the blank-key for
                definitions without a definition-key). If there is not
                a fit, skips the file. If there is a fit goes to #3.

             3) The internal IQ/ID "searched file list" is searched for
                a matching "path:filename:date/time" of the file to
                open. If not found, add the file to the top of the
                IQ/ID stack and internal list, and continues the search
                in this file. If found then goes to #4.

             4) PKs IQ/ID line/stack is searched for the filename and if
                found, moves it to the top of the stack and continues
                the search in this file on the line where it left off.
                If not found, skips the file because it has already
                been searched.

On key-holes:

    The word-keyhole is pattern-matched with the IQ word arguement or
        variable value.

    The file-keyhole is pattern-matched with keys in the KE-file.

    The definition-keyhole is pattern-matched with keys in the KE-file.

    The class-x pattern is checked to see if it is either a
        parent/ansestor, child, or self ; with the class-x tag given
        in the OI-file, looking at the KE-file for the relationships.

    The *CLASS* keyhole checks to see if the variable class-x exist
        anywhere in the KE-file.

 "KE" files

file-key ;; key-tooth , key-tooth , ...




definition-key ;;


class ;; child-class , child-class , ...

class ; parent-class ; child-class , child-class , ...

class ; parent-class


               To be used by IQ and ID mainly.

     KE                             returns PK KE line.

     KE -?                          help on KE.

     KE -ke                         returns current keychain list w/values.

     KE keyname                     returns value of keyname if exist.

     KE -c keyname                  cancels keyname.

     KE -c keyname key-teeth        creates or changes keyname.

KE - "keyname : key-teeth/-p@name (to compare w/file-comment) :level-check"

     user definable but defaults/examples are:

                            -t = text
                            -e = executable calls
                            -s = shell script code
                            -ed = education
                            -ref = referance
                            -appl = application