root/tags/lgt2311/examples/NOTES.txt

Revision 4000, 6.4 KB (checked in by pmoura, 12 months ago)

Updated copyright string.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1================================================================
2Logtalk - Open source object-oriented logic programming language
3Release 2.31.1
4
5Copyright (c) 1998-2008 Paulo Moura.  All Rights Reserved.
6================================================================
7
8
9This folder contains several examples of Logtalk programs. A brief
10description of each example is included below.
11
12Each example folder contains a "NOTES.txt" file and a loader helper
13file that may be used to load all the example entities. In addition,
14most examples contain a "SCRIPT.txt" file with instructions on how to
15load the example and sample queries for your to try.
16
17Most of these examples need objects, protocols, and categories that
18are defined in the Logtalk standard library or in other examples. See
19the "NOTES.txt" files inside the library folder, plus the "NOTES.txt"
20and "SCRIPT.txt" files inside each example folder.
21
22Some examples may redefine objects already loaded from other examples.
23You may want to restart Logtalk after trying each example.
24
25Some of the examples have been adopted from public available Prolog
26code or from known Prolog text books and are copyrighted by the respective
27authors.
28
29These are programming examples, meaning that you should study the source
30files to fully understand them. However, note that some examples purpose
31is to illustrate general principles rather than being adequate, efficient
32solutions for deployment code.
33
34All examples are formatted using four spaces tabs.
35
36By default, compiling an example generates a XML documenting file for
37each compiled entity (object, category, or protocol). See the "xml"
38folder for instructions on how to browse the XML files for on-line
39reading or how to convert the files to a print-ready format such as PDF.
40
41
42Here is a short description of each included example:
43
44aliases
45    example of using the alias/3 predicate directive to provide
46    alternative names to inherited predicates in order to improve
47    readability or to solve multi-inheritance conflicts
48
49assignvars
50    example of using assignable variables in the context of parametric
51    objects in order to represent object state
52
53benchmarks
54    simple benchmarks for helping measuring performance of Logtalk
55    message sending between Prolog compilers and for comparing
56    performance of message sending calls with predicate calls in
57    plain Prolog
58
59birds
60    bird identification expert system
61    (example adopted from the Adventure in Prolog Amzi! book)
62
63bottles
64    99 bottles of beer on the wall! Sing along!
65
66bricks
67    example of representation and handling of relations using events;
68    illustrates how to use events to avoid breaking object encapsulation
69
70complements
71    example of using a category to explicitly complement an existing
72    object
73
74classvars
75    example of implementation of class variables
76    (as found in Smalltalk; i.e. shared instance variables)
77
78dcgs
79    examples of using DCG rules inside objects and categories
80
81diamonds
82    examples of problems and solutions for the "diamond problem"
83    (multi-inheritance conflicts and ambiguities)
84
85dynpred
86    example of using some of the built-in database handling methods
87    in order to implement dynamic object state
88
89encodings
90    very simple example of using the new, experimental encoding/1
91    directive (requires Logtalk to be run with the SWI-Prolog compiler)
92
93engines
94    example of category composition (importation of categories by
95    other categories) using car engines
96
97errors
98    example showing the Logtalk compiler warning and error reporting
99    for common programming errors
100
101hello_world
102    the unavoidable "hello world" programming example
103
104hooks
105    simple example of using compiler hook objects and predicates
106
107inheritance
108    examples of public, protected, and private inheritance using both
109    prototypes and classes/instances
110
111instmethods
112    example of instance defined methods; also illustrates the use of
113    "super calls" to call overridden method definitions
114
115lo
116    examples adopted from the Francis G. McCabe L&O system
117
118logic
119    example of a translator of first-order predicate logic propositions
120    to conjunctive normal form and to clausal form
121
122lpa
123    examples adopted from the LPA Prolog++ system
124
125metapredicates
126    example of using meta-predicates in Logtalk objects
127
128metainterpreters
129    some examples of simple meta-interpreters defined as categories
130    that can be imported by "database" objects
131
132mi
133    simple multi-inheritance examples
134
135miscellaneous
136    unsorted examples
137
138modules
139    simple example of compiling Prolog module files as objects
140
141msglog
142    example of using events and monitors for recording, replaying,
143    and printing user messages
144
145operators
146    example of using operators local to objects and categories
147
148parametric
149    simple example of parametric objects
150
151poem
152    examples adopted from the Ben Staveley-Taylor POEM system
153
154points
155    example adopted from SICStus Objects documentation; defines
156    a simple class hierarchy of points illustrating how to use
157    categories as object components
158
159polygons
160    example of representation and handling of relations using events
161
162profiling
163    examples of using of events and monitors to implement profilers
164
165proxies
166    example of using parametric object proxies for an efficient
167    representation of objects with read-only state
168
169puzzles
170    several examples of logical puzzles
171
172reflection
173    example of a simple class-based reflective system
174
175relations
176    objects implementing predicates for dealing with relations and
177    constrained relations between objects; used by other examples
178
179roots
180    objects, protocols, and categories needed by most of the other
181    examples; illustrates how you can define object creation and
182    abolishing methods, complete with initialization and termination
183    options
184
185searching
186    state-space searching framework
187    (example adopted from Ivan Bratko's "Prolog Programming for
188    Artificial Intelligence" book)
189
190shapes
191    simple geometric shapes implemented as both a prototype hierarchy
192    and a class hierarchy
193
194sicstus
195    examples adopted from SICStus Objects documentation
196
197symdiff
198    example of using parametric objects to implement symbolic
199    expression differentiation and simplification
200
201tabling
202    simple example of using tabling directives within objects
203
204testing
205    some examples of writing unit tests
206
207threads
208    several simple examples of multi-threading programming, some of
209    them intended only for benchmarking multi-threading Prolog compilers
210    (requires Logtalk to be run with either YAP, SWI-Prolog, or XSB)
211
212viewpoints
213    example on how to implement property sharing and value sharing
214    with prototypes
Note: See TracBrowser for help on using the browser.