root/tags/lgt2311/QUICK_START.txt

Revision 4000, 4.9 KB (checked in by pmoura, 11 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
9Quick start
10===========
11
12
13Starting up Logtalk
14-------------------
15
161. Install Logtalk by using either the installer provided for your
17operating-system (when available) or by following the instructions
18on the "INSTALL.txt" file. Depending on your operating-system, working
19environment, and favorite Prolog compiler, you may already have a
20script or a shortcut installed for easily running Logtalk with your
21favorite Prolog compiler. In this case, skip the instructions below
22for starting up Logtalk and go straight to the instructions on running
23the examples.
24
25On POSIX operating-systems, the following shell scripts are installed
26by default for running Logtalk with selected back-end Prolog compilers
27(which must be updated and properly installed for running the scripts!):
28
29  B-Prolog:       bplgt       (first run must use sudo)
30  CIAO:           ciaolgt     (first run must use sudo)
31  CxProlog:       cxlgt
32  ECLiPSe:        eclipselgt
33  GNU Prolog:     gplgt
34  K-Prolog:       plclgt
35  Qu-Prolog:      qplgt"
36  SICStus Prolog: sicstuslgt
37  SWI-Prolog:     swilgt
38  XSB:            xsblgt      (first run must use sudo)
39  XSB MT:         xsbmtlgt    (first run must use sudo)"
40  YAP:            yaplgt
41
42On Windows systems, shortcuts for running Logtalk with selected back-end
43Prolog compilers are created on the "Start Menu/Programs/Logtalk" menu.
44If you get an unexpected failure when using one of the Prolog integration
45scripts, consult the "configs/NOTES.txt" file for compatibility notes.
46
472. Open the "manuals/index.html" file with a web browser.
48
493. Select the "Tutorial" link. This will provide you with a basic
50understanding of the main Logtalk concepts.
51
524. Go back to the "index.html" file, select the "User Manual" link,
53then the "Installing Logtalk" and "Running and debugging Logtalk
54programs" links. This will provide you with a basic understanding of
55how to start Logtalk as well as how to compile and load Logtalk code.
56
57
58In case a manual installation is necessary, and assuming that Logtalk
59supports your Prolog compiler, apply the following steps:
60
611. Read the "NOTES.txt" file in the "configs" sub-directory to check if
62any patch or workaround is needed for your compiler.
63
642. Start your Prolog compiler.
65
663. Change the current working directory of your Prolog session to the
67Logtalk installation directory. If you don't know which predicate to
68use, check the "configs/NOTES.txt" file or your Prolog compiler reference
69manual.
70
714. Compile and load the config file for your Prolog compiler.
72
735. Compile and load the Logtalk compiler/runtime found on the "compiler"
74sub-directory.
75
766. Adapt, if needed, the file "libpaths/libpaths.pl" to match your Logtalk
77installation, Prolog compiler, operating-system, and then compile and
78load it.
79
80Note that both the configuration files, the compiler/runtime files, and the
81library paths file are Prolog files. The predicate used to load these files
82depends on your Prolog compiler (consult your Prolog compiler documentation
83or take a look at the definition of the predicate '$lgt_load_prolog_code'/1
84in the config file. For most command-line compilers, you could type at the
85Prolog prompt something like:
86
87    | ?- ['configs/foo.config', 'compiler/logtalk.pl', 'libpaths/libpaths.pl'].
88
89Replace the file name "foo.config" with the appropriate config file name for
90your compiler.
91
92
93Running the examples
94--------------------
95
96You may now try some of the provided examples:
97
981. Open the "examples" sub-directory. There you find several sub-directories
99with ready to run examples and a "NOTES.txt" file containing general
100instructions and a brief description of each example. Select and open one
101of the examples sub-directory.
102
1032. Read the example "NOTES.txt" file for a description of the example.
104
1053. Open the "SCRIPT.txt" file for instructions on how to load the example
106and for sample queries that you may try by copying-and-pasting them to
107your Prolog interpreter top-level.
108
109
110Writing your own programs
111_________________________
112
113Ready to start writing your own programs?
114
1151. Read the User Manual sections on "Programming in Logtalk" and "Running
116and debugging Logtalk programs".
117
1182. Take a look at the "wenv" sub-directory. There you will find syntax
119configuration files for popular text editors which enable syntax coloring
120and other text services when editing Logtalk source files.
121
1223. Create a sub-directory with a suitable name to hold all the files of
123your application. You may want to add the directory path to the "libpaths.pl"
124file mentioned above in order to easily load your application.
125
1264. Copy to this sub-directory a loader file from one of the example
127directories and modify it to load your own source files.
128
1295. Have fun!
Note: See TracBrowser for help on using the browser.