OverviewWritten by Pavol Durisek
Published: 18 September 2013
This website provides an implementation of the NARS system based on Wang’s NAL specification, written in C++ and built as a shared library (nars.dll/libnars.so/libnars.dylib - depending on OS). Should be portable to any system having appropriate compiler (supporting a subset of C++11 standard). Also, there is a very simple developer tool, a minimalist IDE, called NarsDevelop. This IDE can be helpful to write, edit and debug some Narsese code for the NARS library. Narsese is the language of the NARS system used for internal representation as well as for external communication.
So far I implemented NAL1-NAL6 and a very limited subset of NAL7. I tried to conform to the original work as much as possible, although there could be still some minor differences or some limitation (the number of variables in a sentence, or the number of terms for some rules which will be extended on the future version).
Mainly for readability and clarity reason, I decided to use a syntax of Narsese very similar to one used in most of Wang’s publications and it is different from the one used in his implementation of the system, the OpenNars. To be able to use mathematical and special symbols, it must be encoded in Unicode. Currently, the library and IDE support UTF-8 encoding. Symbols can be directly typed in NarsDevelop using special shortcuts designed for them.
Here is a short incomplete list of features the NarsDevelop IDE currently supports:
- Editing Narsese code with syntax highlighter
- Run the whole or just the highlighted part of code or trace by line
- nars library can detect syntax errors, an together with
⋙ testcommand, conformity of the result with the expected answer, in terms of syntax or truth value
- shows actual memory divided logically into three categories: words, compounds, statements
- show question derivation of the last question (how the result were derived from the source question, by recursively generating sub questions)
- same as above, but show inferences and rules which led to a conclusion
- both, inferences and question derivation are generated as an SVG image, which can be saved on the computer
- showing additional information, such as:
- answers for the sub-questions (internal questions)
- elapsed time
- number of inference cycles used till conclusion are found