You may have an idea about Knowledge Base Systems,
You may have an idea about Knowledge Base Systems,
or Knowledge \emph{Based} Systems, from college textbooks or corporate marketing propaganda, and found the
or Knowledge \emph{Based} Systems, from college textbooks or corporate marketing
concept too broad to be of practical use. Or you may have heard jabs at the
literature, and concluded that the concepts were too broad to be of
pretentious-sounding name, ``Knowledge-based Engineering,'' as in: ``you mean as opposed to \index{Ignorance-based Engineering}Ignorance-based Engineering?''
practical use. Or you may have heard criticisms of the
pretentious-sounding name, ``Knowledge-based Engineering,'' as in:
``you mean as opposed to \index{Ignorance-based Engineering}Ignorance-based Engineering?''
To provide a clearer picture, we hope you will agree that our concept
To provide a clearer picture, we hope you will agree that our concept
of a KB system is simple and practical, and in this tutorial our goal
of a KB system is straightforward, relatively uncomplicated, and
is to make you comfortable and excited about the ideas we have
practical. In this manual our goal is to make you comfortable
implemented in our flagship system, GenDL (or ``Gendl''
and motivated to explore the ideas we have implemented in our flagship
system, Genworks GDL.
Our informal definition of a \emph{\index{Knowledge Base System}Knowledge Base System} is an object-oriented programming environment which implements the features of \emph{\index{Caching}Caching} and \emph{\index{Dependency tracking}Dependency tracking}. Caching means that once the KB has computed something, it might not need to repeat
Our definition of a \emph{\index{Knowledge Base System}Knowledge Base System} is an object-oriented programming environment which implements the features of \emph{\index{Caching}Caching} and \emph{\index{Dependency tracking}Dependency tracking}. Caching means that once the KB has computed something, it might not need to repeat
that computation if the same question is asked again. Dependency tracking is the flip side
that computation if the same question is asked again. Dependency tracking is the flip side
of that coin --- it ensures that if a cached result is \emph{stale}, the result will be recomputed the next time it is \emph{demanded}, so as to give a fresh result.
of that coin --- it ensures that if a cached result is \emph{stale}, the result will be recomputed the next time it is \emph{demanded}, so as to give a fresh result.
\section{Goals for this Tutorial}
\section{Classic Definition of Knowledge Based Engineering (KBE)}
\underline{BLT} is available at \texttt{http://www.franz.com/resources/educational\_resources/cooper.book.pdf}}, which was prepared by the author of this tutorial.
\underline{BLT} is available at \texttt{http://www.franz.com/resources/educational\_resources/cooper.book.pdf}}, which was prepared by the author.
\section{What is GenDL?}
\section{What is GDL?}
\label{sec:whatisgendl?}
\label{sec:whatisgdl?}
GenDL (or Gendl to be a bit more relaxed) is an acronym for
GDL is an acronym for
``General-purpose Declarative Language.''
``General-purpose Declarative Language.''
GenDL is a superset of ANSI Common Lisp, and consists mainly of
GDL is a superset of ANSI Common Lisp, and consists largely of
automatic code-expanding extensions to Common Lisp implemented in the
automatic code-expanding extensions to Common Lisp implemented in the
form of macros. When you write, let's say, 20 lines in GenDL, you
form of macros. When you write, for example, 20 lines in GDL, you
might be writing the equivalent of 200 lines of Common Lisp. Of
might be writing the equivalent of 200 lines of Common Lisp. Of
course, since GenDL is a superset of Common Lisp, you still have the
course, since GDL is a superset of Common Lisp, you still have the
full power of the CL language at your fingertips whenever you are
full power of the CL language at your disposal whenever you are
working in GenDL.
working in GDL.
\index{compiled language!benefits of}\index{macros!code-expanding}Since GDL expands into CL, everything you write in GDL will be
\index{compiled language!benefits of}\index{macros!code-expanding}Since GDL expands into CL, everything you write in GDL will be
compiled ``down to the metal'' to machine code with all the
compiled ``down to the metal'' to machine code with all the
optimizations and safety that the tested-and-true CL compiler
optimizations and safety that the tested-and-true CL compiler provides
provides. This is an important distinction as contrasted to some other
[this is an important distinction as contrasted to some other
so-called KB systems on the market, which are really nothing more than
so-called KB systems on the market, which are essentially nothing more
interpreted scripting languages which often impose arbitrary limits on
than interpreted \emph{scripting languages} which often impose arbitrary limits on
the size and complexity of your application.
the size and complexity of the application.
GenDL is also a true \emph{\index{declarative}declarative} language. When you put together a GDL application, you write and think mainly
GDL is also a \emph{\index{declarative}declarative} language in the fullest sense. When you put together a GDL application, you write and think mainly
in terms of objects and their properties, and how they depend on one another in a direct
in terms of objects and their properties, and how they depend on one another in a direct
sense. You do not have to track in your mind explicitly how one object or property will ``call''
sense. You do not have to track in your mind explicitly how one object or property will ``call''
another object or propery, in what order this will happen, etc. Those details are
another object or propery, in what order this will happen, etc. Those details are
...
@@ -159,14 +315,17 @@ from an object-oriented language, such as
...
@@ -159,14 +315,17 @@ from an object-oriented language, such as
\item The ability for one object to ``inherit'' from others
\item The ability for one object to ``inherit'' from others
\item The ability to ``use'' an object without concern for its ``under-the-hood'' implementation
\item The ability to ``use'' an object without concern for
its ``under-the-hood'' complexities
\end{itemize}
\end{itemize}
\index{object-orientation!message-passing}\index{object-orientation!generic-function}GDL supports the ``message-passing'' paradigm of object orientation, with some extensions. Since
\index{object-orientation!message-passing}\index{object-orientation!generic-function}GDL supports the ``message-passing'' paradigm of object
full-blown ANSI CLOS (Common Lisp Object System) is always available as well, the Generic Function paradigm
orientation, with some extensions. Since full-blown ANSI CLOS (Common
is supported as well. Do not be concerned at this point if you are not fully aware of the differences
Lisp Object System) is always available as well, the Generic Function
between these two paradigms\footnote{See Paul Graham's
paradigm is supported as well. Do not be concerned at this point if
you are not fully aware of the differences between these two
paradigms\footnote{See Paul Graham's
\underline{ANSI Common Lisp}, page 192, for an excellent discussion of the Two Models
\underline{ANSI Common Lisp}, page 192, for an excellent discussion of the Two Models
of Object-oriented Programming.}.
of Object-oriented Programming.}.
...
@@ -209,8 +368,9 @@ and solid geometric objects.
...
@@ -209,8 +368,9 @@ and solid geometric objects.
\item A drawing program (although it may operate on and/or generate geometric entities);
\item A drawing program (although it may operate on and/or generate geometric entities);
\item An Artificial Intelligence system (although it is an excellent environment for developing
\item An Artificial Intelligence system (although it is an
capabilities which could be considered as such);
excellent environment for developing capabilities which could be
considered as such);
\item An Expert System Shell (although one could be easily embedded within it).
\item An Expert System Shell (although one could be easily embedded within it).
...
@@ -223,19 +383,20 @@ Without further ado, then, let's turn the page and get started with some hands-o
...
@@ -223,19 +383,20 @@ Without further ado, then, let's turn the page and get started with some hands-o
\label{chap:installation}
\label{chap:installation}
Follow Section
Follow Section
\ref{sec:installationofpre-packagedgendl} if your email address is registered with Genworks and you will
\ref{sec:installationofpre-packagedgdl} if your email address is registered with Genworks and you will
install a pre-packaged Gendl distribution including its own Common
install a pre-packaged Genworks GDL distribution including its own
Lisp engine. Gendl is also available as open-source software\footnote{http://github.com/genworks/Genworks-GDL}; if you
Common Lisp engine. The foundation of Genworks GDL is also available
want to use that version, then please refer to Section
as open-source software through The Gendl Project\footnote{http://github.com/genworks/gendl}; if you want to use that version, then please refer to Section
\ref{sec:installationofopen-sourcegendl}.
\ref{sec:installationofopen-sourcegendl}.
\section{Installation of pre-packaged Gendl}
\section{Installation of pre-packaged GDL}
\label{sec:installationofpre-packagedgendl}
\label{sec:installationofpre-packagedgdl}
This section will take you through the installation of Gendl
This section will take you through the installation of
from a prepackaged distribution with the Allegro CL Common Lisp engine
Genworks GDL from a prepackaged distribution with the Allegro CL or
and the Slime IDE (based on Gnu Emacs).
LispWorks commercial Common Lisp engine and the Slime IDE (based on
Gnu Emacs).
\subsection{Download the Software and retrieve a license key}
\subsection{Download the Software and retrieve a license key}
...
@@ -245,11 +406,13 @@ and the Slime IDE (based on Gnu Emacs).
...
@@ -245,11 +406,13 @@ and the Slime IDE (based on Gnu Emacs).
\begin{enumerate}
\begin{enumerate}
\item Visit the Downloads section of the \href{http://genworks.com/newsite}{Genworks Newsite}
\item Visit the Downloads section of the \href{http://genworks.com}{Genworks Website}
\item Enter your email address\footnote{if your address is not on file, send mail to licensing@genworks.com}.
\item Enter your email address\footnote{if your address is not on file, send mail to licensing@genworks.com}.
\item Download the latest Payload and gpl.zip for Windows\footnote{If you already have a gpl.zip from a previous Gendl installation, it is not necessary to download a new one.}
\item Download the latest Payload for Windows, Linux, or Mac\footnote{Gnu Emacs is included with the download. The source code for this
is available at http://downloads.genworks.com/emacs-windows-24.3.zip. Gnu Ghostscript
is also included; please contact Genworks if you need the source code for this.}
\item Click to receive license key file by email.
\item Click to receive license key file by email.
...
@@ -261,60 +424,17 @@ and the Slime IDE (based on Gnu Emacs).
...
@@ -261,60 +424,17 @@ and the Slime IDE (based on Gnu Emacs).
\label{subsec:unpackthedistribution}
\label{subsec:unpackthedistribution}
GenDL is currently distributed for all the platforms as a
Genworks GDL is currently distributed as an setup executable for Windows,
self-contained ``zip'' file which does not require official
a ``dmg'' application bundle for Mac, and a self-contained zip file for Linux.
administrator installation. What follows are general instructions; more up-to-date details
\ul{
may be found in the email which accompanies the license key file. A five-minute installation video
\item Run the installation executable. Accept the defaults when prompted.\footnote{For Linux, you have to install emacs and ghostscript yourself. Please use your distribution's package manager to complete this installation.}
is also available in the Documentation section of the \href{http://genworks.com/newsite}{Genworks Newsite}.
\begin{enumerate}
\item Unzip the gdl1581... zipfile into a location where you have write permissions
\item Unzip the gpl.zip file at the same level as the gdl payload
\item Copy the license key file as gdl.lic (for Trial,
\item Copy the license key file as gdl.lic (for Trial,
Student, Professional editions), or devel.lic (for Enterprise edition) into the \texttt{program/} directory within the gdl1581.../ directory.
Student, Professional editions), or devel.lic (for Enterprise edition) into the \texttt{program/} directory within the
\textt{gdl/gdl/program/} directory.
\end{enumerate}
\item Launch the application by finding the Genworks program group in the Start menu (Windows), or by double-clicking the application icon (Mac), or by running the \texttt{run-gdl} script (Linux).