2001-06-06 20:40:57 +01:00
|
|
|
=================================================================
|
|
|
|
Logtalk - Object oriented extension to Prolog
|
2006-03-26 18:31:34 +01:00
|
|
|
Release 2.27.1
|
2001-06-06 20:40:57 +01:00
|
|
|
|
2006-02-10 17:44:05 +00:00
|
|
|
Copyright (c) 1998-2006 Paulo Moura. All Rights Reserved.
|
2001-06-06 20:40:57 +01:00
|
|
|
=================================================================
|
|
|
|
|
|
|
|
|
|
|
|
Quick start
|
|
|
|
===========
|
|
|
|
|
|
|
|
|
2005-01-13 12:22:42 +00:00
|
|
|
1. Install Logtalk by following the instructions on the "INSTALL" file.
|
|
|
|
Depending on your operating-system, working environment, and favorite
|
2005-02-10 00:02:06 +00:00
|
|
|
Prolog compiler, you may already have a script or a shortcut installed
|
|
|
|
for easily running Logtalk with your favorite Prolog compiler. If so,
|
|
|
|
skip the instructions below for starting up Logtalk.
|
2001-06-06 20:40:57 +01:00
|
|
|
|
2004-11-29 20:36:31 +00:00
|
|
|
2. Open the "manuals/index.html" file with a web browser.
|
|
|
|
|
|
|
|
3. Select the "Tutorial" link. This will provide you with a basic understanding
|
2001-06-06 20:40:57 +01:00
|
|
|
of the main Logtalk concepts.
|
|
|
|
|
2004-11-29 20:36:31 +00:00
|
|
|
4. Go back to the "index.html" file and select the "User Manual" link and then
|
2004-06-13 19:04:28 +01:00
|
|
|
the Installing and running Logtalk links. This will provide you with a basic
|
2001-06-06 20:40:57 +01:00
|
|
|
understanding of how to start Logtalk and compile and load Logtalk code.
|
|
|
|
|
|
|
|
|
|
|
|
Assuming that Logtalk supports your Prolog compiler:
|
|
|
|
|
2004-11-29 20:36:31 +00:00
|
|
|
1. Read the "NOTES" file in the "configs" sub-directory to check if any patch
|
2001-06-06 20:40:57 +01:00
|
|
|
or workaround is needed for your compiler.
|
|
|
|
|
|
|
|
2. Start your Prolog compiler.
|
|
|
|
|
2004-06-13 19:04:28 +01:00
|
|
|
3. Change the current working directory of your Prolog session to the Logtalk
|
|
|
|
installation directory. If you don't know which predicate to use, check the
|
2004-11-29 20:36:31 +00:00
|
|
|
"configs/NOTES" file or your Prolog compiler reference manual.
|
2001-06-06 20:40:57 +01:00
|
|
|
|
2004-06-13 19:04:28 +01:00
|
|
|
4. Compile and load the config file for your Prolog compiler.
|
|
|
|
|
2004-11-29 20:36:31 +00:00
|
|
|
5. Compile and load the Logtalk compiler/runtime found on the "compiler"
|
2001-06-06 20:40:57 +01:00
|
|
|
sub-directory.
|
|
|
|
|
2004-11-29 20:36:31 +00:00
|
|
|
6. Adapt, if needed, the file "libpaths/libpaths.pl" to match your Logtalk
|
|
|
|
installation, Prolog compiler, and operating-system, and then compile and
|
|
|
|
load it.
|
|
|
|
|
|
|
|
Note that both the configuration files, the compiler/runtime files, and the
|
|
|
|
library paths file are Prolog files. The predicate used to load these files
|
|
|
|
depends on your Prolog compiler (consult your Prolog compiler documentation
|
|
|
|
or take a look at the definition of the predicate '$lgt_load_prolog_code'/1
|
|
|
|
in the config file. For most command-line compilers, you could type at the
|
|
|
|
Prolog prompt something like:
|
2004-06-13 19:04:28 +01:00
|
|
|
|
2004-11-29 20:36:31 +00:00
|
|
|
| ?- ['configs/foo.config', 'compiler/logtalk.pl', 'libpaths/libpaths.pl'].
|
2004-06-13 19:04:28 +01:00
|
|
|
|
|
|
|
Replace the file name foo.config with the appropriated config file name for
|
|
|
|
your compiler.
|
|
|
|
|
|
|
|
|
|
|
|
Now you may try some of the included examples:
|
2001-06-06 20:40:57 +01:00
|
|
|
|
2004-11-29 20:36:31 +00:00
|
|
|
1. Open the examples sub-directory. There you find several sub-directories
|
2004-06-13 19:04:28 +01:00
|
|
|
with ready to run examples and a NOTES file containing general instructions
|
|
|
|
and a brief description of each example. Select and open one of the examples
|
|
|
|
sub-directory.
|
2001-06-06 20:40:57 +01:00
|
|
|
|
2004-11-29 20:36:31 +00:00
|
|
|
2. Read the example NOTES file for a description of the example.
|
2001-06-06 20:40:57 +01:00
|
|
|
|
2005-12-24 18:00:21 +00:00
|
|
|
3. Open the SCRIPT file for instructions on how to load the example and for
|
|
|
|
sample queries that you may try by copying-and-pasting or dragging-and-droping
|
|
|
|
them on your Prolog interpreter top-level.
|
2002-05-28 12:29:37 +01:00
|
|
|
|
|
|
|
|
|
|
|
Ready to start writing your own programs?
|
|
|
|
|
2004-11-29 20:36:31 +00:00
|
|
|
1. Read the User Manual sections on "Programming in Logtalk" and "Running and
|
|
|
|
debugging Logtalk programs".
|
2004-06-13 19:04:28 +01:00
|
|
|
|
2004-11-29 20:36:31 +00:00
|
|
|
2. Take a look at the "wenv" sub-directory. There you will find syntax
|
2002-05-28 12:29:37 +01:00
|
|
|
configuration files for popular text editors that enable syntax coloring
|
2005-02-10 00:02:06 +00:00
|
|
|
and other goodies when editing Logtalk source files.
|
2002-05-28 12:29:37 +01:00
|
|
|
|
2004-06-13 19:04:28 +01:00
|
|
|
3. Create a sub-directory with a suitable name to hold all the files of your
|
2005-02-10 00:02:06 +00:00
|
|
|
application. You may want to add the directory path to the libpaths.pl file
|
|
|
|
mentioned above in order to easily load your application.
|
2002-05-28 12:29:37 +01:00
|
|
|
|
2005-08-08 13:13:45 +01:00
|
|
|
4. Copy to this sub-directory a loader file from one of the example directories
|
2004-06-13 19:04:28 +01:00
|
|
|
and modify it to load your own source files.
|
|
|
|
|
|
|
|
5. Have fun!
|