debug (3)
Examine a Complex Concept in the Context
Brainhat comes with a basic vocabulary and grammars. An individual knowledge entity is called a "concept." A concept is similar to a vocabulary word. For example, "dog" is a concept: >> dog dog. When we combine two or more concepts, we create a "complex concept" or CC: >> dog is happy happy dog is happy. >> dog dog is happy. Enter debug to examine concepts and CCs When the program starts, all concepts are clean, which means that none have been modified.
Entering and exiting debug
From the Brainhat commandline, you can enter debug at any time. Debug has no side-effects; you can execute any commands with causing a change in the context. To enter debug, enter one of "debug" or "break" at the ">>" prompt: $ ./run make: 'data' is up to date. Initializing >> debug Break in debug at the start: debug> help Commands: debug symbol [ location] -or- debug symbol [ location] -or- set symbol [ location] Increment debug count for routine/process/flag, and optionally stop…
Setting Flags
Brainhat maintains a collection of around 260 state flags. Some are for debug. Others are for other purposes. You can see which flags are set under debug: $ ./run make: 'data' is up to date. Initializing >> debug Break in debug at the start: debug> flags Global match level = 1 Match level = 1 creditspkr verbatim repeat debug, start debug> The same flag may be set multiple times. It is only "unset" when there are no copies of the flag left…