Algernon Tutorial 2.c
These exercises and examples use the newspaper project included
in the examples folder of your Protege installation.
:DATE - retrieve the current date and time
((:date ?date ?time))
:PRINT and :PRINTLN
Notes: These don't currently print to the Algernon
tab output window. You must run Algernon from the
command line to see the output.
(:SUBCLASS Author ?a)
(:PRINTLN ?a " is a type of author on " ?date))
- Bonus: What might change in the output if you swap the first two clauses?
Note: this does not currently print to the Algernon tab output window.
:TRACE is used for debugging and sets a global trace level. Trace levels are:
((:trace :verbose) (:subclass Author ?a) (:trace :normal))
((:trace :verbose) (:subclass Newspaper ?n) (:trace :normal))
:NEQ - not equal
:NEQ can be used to generate combinations of a set of objects:
- :NEQ is used to compare any two things for equality.
- Should work for frames, numbers, strings, etc.
- ((:subclass Author ?a1) (:subclass Author ?a2) (:neq ?a1 ?a2))
- Try that with :TRACE set to :VERBOSE
Author: Micheal Hewett
Last Updated: Monday, June 06, 2005