2001-05-21 19:39:55 +01:00
|
|
|
=================================================================
|
|
|
|
Logtalk - Object oriented extension to Prolog
|
2002-08-01 00:34:42 +01:00
|
|
|
Release 2.14.1
|
2001-05-21 19:39:55 +01:00
|
|
|
|
2002-01-08 00:05:10 +00:00
|
|
|
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
|
2001-05-21 19:39:55 +01:00
|
|
|
=================================================================
|
|
|
|
|
|
|
|
This folder contains several examples of Logtalk programs. Most of
|
2001-12-05 23:57:48 +00:00
|
|
|
these examples need objects, protocols, and categories that are
|
2001-05-21 19:39:55 +01:00
|
|
|
defined in the Logtalk standard library or in other examples, so
|
2002-06-15 14:18:34 +01:00
|
|
|
you should load them first (see the NOTES file inside the library
|
|
|
|
folder and inside each example folder).
|
2001-05-21 19:39:55 +01:00
|
|
|
|
|
|
|
Some examples may redefine objects already loaded from other examples.
|
|
|
|
You may want to restart Logtalk after trying each example.
|
|
|
|
|
|
|
|
Some of the examples code have been adopted from public available
|
|
|
|
Prolog code and from known Prolog text books and are copyrighted by
|
|
|
|
the respective authors.
|
|
|
|
|
2002-06-15 14:18:34 +01:00
|
|
|
These are programming examples, meaning that you should study the
|
2001-05-21 19:39:55 +01:00
|
|
|
source files to fully understand them.
|
|
|
|
|
|
|
|
All examples are formatted using four spaces tabs.
|
|
|
|
|
|
|
|
|
|
|
|
Here is a short description of each included example:
|
|
|
|
|
|
|
|
birds
|
|
|
|
bird identification expert system
|
|
|
|
example adopted from the Adventure in Prolog Amzi! book
|
|
|
|
|
|
|
|
bricks
|
|
|
|
example of representation and handling of relations using events
|
|
|
|
|
|
|
|
classvars
|
|
|
|
example of implementation of class variables (as found in Smalltalk)
|
|
|
|
|
2002-05-28 12:29:37 +01:00
|
|
|
dynpred
|
|
|
|
example of using some of the built-in database handling methods
|
|
|
|
|
2001-12-05 23:57:48 +00:00
|
|
|
errors
|
|
|
|
example showing the Logtalk compiler warning and error reporting
|
|
|
|
|
2001-05-21 19:39:55 +01:00
|
|
|
inheritance
|
|
|
|
examples of public, protected and private inheritance with both
|
|
|
|
prototypes and classes/instances
|
|
|
|
|
|
|
|
instmethods
|
|
|
|
example of instance defined methods
|
|
|
|
|
|
|
|
lo
|
|
|
|
examples adopted from the Francis G. McCabe L&O system
|
|
|
|
|
|
|
|
lpa
|
|
|
|
examples adopted from the LPA Prolog++ system
|
|
|
|
|
|
|
|
metapredicates
|
|
|
|
example of using metapredicates in Logtalk objects
|
|
|
|
|
|
|
|
mi
|
|
|
|
multi-inheritance examples
|
|
|
|
|
|
|
|
miscellaneous
|
|
|
|
unsorted examples
|
|
|
|
|
|
|
|
parametric
|
|
|
|
simple example of parametric objects
|
|
|
|
|
|
|
|
poem
|
|
|
|
examples adopted from the Ben Staveley-Taylor POEM system
|
|
|
|
|
|
|
|
points
|
|
|
|
example adopted from SICStus Objects documentation
|
|
|
|
|
|
|
|
polygons
|
|
|
|
example of representation and handling of relations using events
|
|
|
|
|
|
|
|
profiling
|
|
|
|
examples of using of events and monitors to implement profilers
|
|
|
|
|
|
|
|
reflection
|
|
|
|
example of a simple class-based reflective system
|
|
|
|
|
|
|
|
relations
|
|
|
|
objects implementing predicates for dealing with relations and
|
|
|
|
constrained relations between objects
|
|
|
|
|
|
|
|
roots
|
|
|
|
objects, protocols and categories needed by most of the other examples
|
|
|
|
|
|
|
|
searching
|
2001-12-05 23:57:48 +00:00
|
|
|
state-space searching framework
|
2001-05-21 19:39:55 +01:00
|
|
|
example adopted from Ivan Bratko's "Prolog Programming for Artificial
|
|
|
|
Intelligence" book
|
|
|
|
|
|
|
|
sicstus
|
|
|
|
examples adopted from SICStus Objects documentation
|
|
|
|
|
|
|
|
symdiff
|
|
|
|
example of using parametric objects to implement symbolic expression
|
2001-12-05 23:57:48 +00:00
|
|
|
differentiation and simplification
|
2001-05-21 19:39:55 +01:00
|
|
|
|
|
|
|
viewpoints
|
|
|
|
example on how to implement property and value sharing with prototypes
|