This manual contains information to get you started using the software, and serves as an online reference for the various functions and variables you may invoke. Since this is in hypertext format, every highlighted term is a link to the information about that term.
Ontolingua consists of a KIF parser, tools for analyzing ontologies, and a set of translators for converting Ontolingua sources into forms acceptable to implemented knowledge representation systems. Currently supported target representation systems are:
(:EPIKIT :CLIPS :LOOM :GENERIC-FRAME :KIF)
A set of example ontologies may be found in the examples subdirectory of the Ontolingua release directory tree. On this machine, the directory is rooted at
All of the documented functions, macros, and variables are exported from the Ontolingua package (which has a nickname OL). For example, to get this message, one would type (ol:onto-help). We will omit the OL: prefix in documentation strings, so when ever we refer to the name of a function or variable, consider it accessable from the Ontolingua package.
------------ HOW TO USE ONTOLINGUA --------------
You should load ontologies into Ontolingua using ONTO-LOAD, which takes arguments just like ordinary Lisp load. Loading an ontology causes Ontolingua to parse the KIF forms, issue warnings, and translate the forms into the current target implementation. By default, the target implementation is :KIF, which produces the parsing and analysis but not much in the way of translation. It is a good target to give to external translators to KIF-like languages (e.g., kif-to-prolog).
1. WRITING ONTOLOGIES
See the example ontologies for style and content guides. The frame-ontology and bibliographic-data ontologies are well documented exemplars. It is best to use Ontolingua from the ontolingua-user package. That is, you might want to start out by typing
at your lisp listener and at the top of each ontology file.
2. ONTOLOGY ANALYSIS
You can analyze a loaded ontology with the function
This will do a two-pass cross reference of the ontology, pointing out problems with the definitions and generating a report on dependencies among theories. <theory-name> should be a symbol that is used in the DEFINE-THEORY form in the ontology.
Remember that Common Lisp packages are significant in symbols, so if your lisp listener is not currently in the ontolingua-user package you may name a theory with a form like 'ol-user::my-theory-name.
To use Ontolingua as an access layer on top of an implemented representation system, use
where <implementation> is one of the names of the implementation systems for which there are translators. The list of these names is kept on the variable *ALL-IMPLEMENTATIONS*. As stated above, the currently supported implementations are: (:EPIKIT :CLIPS :LOOM :GENERIC-FRAME :KIF)
The in-implementation form causes the subsequent Ontolingua evaluations to be directed at the specified implementation. Loading an ontology from a file or evaluating forms from an editor buffer will cause Ontolingua to call the implementation and modify its database. For example,
causes output from Ontolingua to go to Loom. Loading an ontology of Ontolingua forms will produce produce calls to Loom's functions that define concepts, relations, and do assertions.
See the documentation on *ONTO-TRACE* to control whether translated forms call the target implementation directly or just print to a stream.
Another way to translate entire files is the command
(TRANSLATE-FILE <file-name> [:implementation <implementation>])
which sends output to a file rather than calling the target system in memory. This which works even if the target representation system is not loaded.
(TRANSLATE-FILE "my-ontology.lisp" :implementation ':LOOM)
will create a file "my-ontology.loom" containing the Loom version of that ontology.
4. HYPERTEXT REPORTS
Once an ontology has been run through cross reference and debugged, one can generate a hypertext web of it for browsing. Since ontologies are richly connected with other ontologies and other files, the generation of hypertext webs is done on the basis of entire directory trees rather than individual files. The HTMLIFY-DIRECTORY takes a directory tree containing ontologies and documentation on the ontologies, and produces such a web (in HTML format, suitable for World Wide Web publication). See the documentation on htmlify-directory for details.
5. PROGRAMMING ENVIRONMENT AND DOCUMENTATION
If you use the ILISP interface from within GNU Emacs, you can get Ontolingua translations directly from your buffer containing the definitions. It's best to load the ontology file before examining individual definitions from emacs, to ensure that the required theories have been created. See the installation instructions (doc/installation.html) for more information on installing and using the ILISP commands in Ontolingua.
For more information, see the reference manual (or the documentation strings on Ontolingua functions and variables, which is the source for the manual). All documentation on Ontolingua is now available on the World Wide Web at
and with each build of a hypertext ontology web at your site.