NarsDevelop User Manual
Written by Pavol Durisek- Details
-
Category: Software
-
Published: 17 March 2014
-
Hits: 7634
Overview
NarsDevelop can be a very handy tool to develop and debug a small Narsese project or parts of a large one, for applications using the NARS library, which can be used separately without using any GUI.NarsDevelop contain an editor with multiple tabs, supporting UTF-8 encoding and a simple syntax highlighter for Narsese language. Special Narsese symbols can be inserted directly using a keyboard.
Beside, NarsDevelop can run and debug entire code, or just the highlighted one, highlights syntax errors and other types of errors, display and save system's memory (which can be reloaded). In debug mode can show question derivation tree, which shows how question were derived from the external question, until the conclusion were found and a history of inference rules used to get an answer for the last question. Also displays information such as elapsed time and number of inference cycle, which can be handy while using temporary statements (temporal statements with present tense are valid just for a limited time, so the computation must fit into that time to get useful results from those statements).
Working with files
- File > New (Ctrl+N) - create a new tab for editing Narsese code.
- File > Open (Ctrl+O) - open a file for editing.
- File > Close (Ctrl+W) - close current file.
- File > Close All (Ctrl+Sift+W) - close all opened file.
- File > Save (Ctrl+S) - save current file.
- File > Save As ... - save current file, with options.
- File > Save All (Ctrl+Sift+S) - save all opened files.
- File > Print (Ctrl+P) - print current file.
- File > Print to pdf ... (Ctrl+Shift+P) - print current file into a pdf document keeping document formatting and colours.
- File > Recent Files ▶ - show a list of recent opened files.
- File > Exit (Ctrl+Q) - close this application.
Editing
- Edit > Undo (Ctrl+Z) - undo last single change in the current document.
- Edit > Redo (Ctrl+Y) - apply last single change in the current document.
- Edit > Cut (Ctrl+X) - cut highlighted code.
- Edit > Copy (Ctrl+C) - copy highlighted code.
- Edit > Paste (Ctrl+V) - paste code in the current cursor position.
- Edit > Clear - clear highlighted code.
- Edit > Sellect All (Ctrl+A) - select all in current document.
- Edit > Find and Replace (Ctrl+F) - open file and replace dialogue.
Debugging
- Debug > Run (F5) - send entire or selected Narsese code into the NARS system.
- Debug > Step Forward (F10) - send current Narsese code into the system and move text cursor to the next line.
- Debug > Words - get words from the system's memory and display it into "Words" output window.
- Debug > Compounds - get compound terms from the system's memory and display it into "Compounds" output window.
- Debug > Statements - get statements from the system's memory and display it into "Compounds" output window.
- Debug > Inference - show information about inference processes for the last external question.
- Debug > Question Derivation - show information about question derivation and a path, that led to the conclusion of the last external question.
- Debug > Clear Memory - clear internal memory.
- Debug > Clear Output - clear output window.
- Debug > Save Memory ... (Ctrl+M) - save internal memory of the system in form of Narsese sentences so could be saved an reloaded.
- Debug > Time - show elapsed time of inference process and number of inference cycles.
- Debug > Internal Question - show output from internal (derived) questions.
- Debug > Debug - turn debug mode on to be able to retrieve some information from the system (e.g. - inferences and question derivation - which are by default turned off for performance reason).
Error reporting
The library has also some error reporting features. Beside syntax errors it can also detect errors regarding to the expected output while using test
command.
Output
Output window shows:
- Narsese output from the system.
- if Time button is turned on - time information about the last result (from external question).
- if Internal Question button is on - result from internal questions.
- output from
test
command.
Internal system's memory can be displayed in windows - Word, Compounds and Statements, after pressing their respective buttons from the menu or tool-bar.
Finally, to see details about question derivations and inference processes for the last external question, system must be turned on in debug mode and after by pressing Inference and Question Derivation. The output should appear in their corresponding output windows. Output from these are in a form of SVG images which can be saved on the computer by right clicking on the image with the mouse.
NarsDevelop - last inference processes
NarsDevelop - last question derivations