This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/Logtalk/QUICK_START
pmoura 80c28e1507 Logtalk 2.25.1 files.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1357 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2005-08-08 12:13:45 +00:00

93 lines
3.5 KiB
Plaintext

=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.25.1
Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved.
=================================================================
Quick start
===========
1. Install Logtalk by following the instructions on the "INSTALL" file.
Depending on your operating-system, working environment, and favorite
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.
2. Open the "manuals/index.html" file with a web browser.
3. Select the "Tutorial" link. This will provide you with a basic understanding
of the main Logtalk concepts.
4. Go back to the "index.html" file and select the "User Manual" link and then
the Installing and running Logtalk links. This will provide you with a basic
understanding of how to start Logtalk and compile and load Logtalk code.
Assuming that Logtalk supports your Prolog compiler:
1. Read the "NOTES" file in the "configs" sub-directory to check if any patch
or workaround is needed for your compiler.
2. Start your Prolog compiler.
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
"configs/NOTES" file or your Prolog compiler reference manual.
4. Compile and load the config file for your Prolog compiler.
5. Compile and load the Logtalk compiler/runtime found on the "compiler"
sub-directory.
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:
| ?- ['configs/foo.config', 'compiler/logtalk.pl', 'libpaths/libpaths.pl'].
Replace the file name foo.config with the appropriated config file name for
your compiler.
Now you may try some of the included examples:
1. Open the examples sub-directory. There you find several sub-directories
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.
2. Read the example NOTES file for a description of the example.
3. Open 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.
Ready to start writing your own programs?
1. Read the User Manual sections on "Programming in Logtalk" and "Running and
debugging Logtalk programs".
2. Take a look at the "wenv" sub-directory. There you will find syntax
configuration files for popular text editors that enable syntax coloring
and other goodies when editing Logtalk source files.
3. Create a sub-directory with a suitable name to hold all the files of your
application. You may want to add the directory path to the libpaths.pl file
mentioned above in order to easily load your application.
4. Copy to this sub-directory a loader file from one of the example directories
and modify it to load your own source files.
5. Have fun!