root/tags/lgt2372/QUICK_START.txt

Revision 5003, 5.7 KB (checked in by pmoura, 9 months ago)

Updated version number to 2.37.2 in preparation for the next stable release.

  • 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.37.2
4
5Copyright (c) 1998-2009 Paulo Moura.        All Rights Reserved.
6Logtalk is free software.  You can redistribute it and/or modify
7it under the terms of the "Artistic License 2.0" as published by
8The Perl Foundation. Consult the "LICENSE.txt" file for details.
9================================================================
10
11
12Quick start
13===========
14
15
16Starting up Logtalk
17-------------------
18
191. Install Logtalk by using either the installer provided for your
20operating-system (when available) or by following the instructions
21on the "INSTALL.txt" file. Depending on your operating-system, working
22environment, and favorite back-end Prolog compiler, you may already have
23a script or a shortcut installed for easily running Logtalk with your
24favorite Prolog compiler. In this case, skip the instructions below
25for starting up Logtalk and go straight to the instructions on running
26the examples.
27
28On POSIX operating-systems, the following shell scripts are installed
29by default for running Logtalk with selected back-end Prolog compilers
30(which must be up-to-date and properly installed for running the scripts!):
31
32* B-Prolog:       bplgt
33* Ciao:           ciaolgt    (first run must use sudo)
34* CxProlog:       cxlgt
35* ECLiPSe:        eclipselgt
36* GNU Prolog:     gplgt
37* K-Prolog:       plclgt
38* Qu-Prolog:      qplgt
39* Quintus Prolog  quintuslgt (requires patching Logtalk)
40* SICStus Prolog: sicstuslgt
41* SWI-Prolog:     swilgt
42* XSB:            xsblgt     (first run must use sudo)
43* XSB 64 bits:    xsb64lgt   (first run must use sudo)
44* XSB MT:         xsbmtlgt   (first run must use sudo)
45* XSB MT 64 bits: xsbmt64lgt (first run must use sudo)
46* YAP:            yaplgt
47
48Integration with Quintus Prolog requires manual patches that render
49Logtalk incompatible with all the other compilers.
50
51On Windows systems, shortcuts for running Logtalk with selected back-end
52Prolog compilers are created on the "Start Menu/Programs/Logtalk" menu.
53If you get an unexpected failure when using one of the Prolog integration
54scripts, consult the "configs/NOTES.txt" file for compatibility notes.
55
56On MacOS X systems, shortcuts for running Logtalk with selected back-end
57Prolog compilers are available on the "scripts/macosx/command_files" folder
58on the Logtalk installation folder (by default, /opt/local/share/logtalk).
59If you get an unexpected failure when using one of the Prolog integration
60scripts, consult the "configs/NOTES.txt" file for compatibility notes.
61
622. Open the "manuals/index.html" file with a web browser.
63
643. Select the "Tutorial" link. This will provide you with a basic
65understanding of the main Logtalk concepts.
66
674. Go back to the "index.html" file, select the "User Manual" link, then
68the "Installing Logtalk" and "Writing, Running, and Debugging Logtalk
69Programs" links. This will provide you with a basic understanding of
70how to start Logtalk as well as how to compile and load Logtalk code.
71
72
73In case a manual installation is necessary, and assuming that Logtalk
74supports your Prolog compiler, apply the following steps:
75
761. Read the "NOTES.txt" file in the "configs" sub-directory to check if
77any patch or workaround is needed for your compiler.
78
792. Start your Prolog compiler.
80
813. Change the current working directory of your Prolog session to the
82Logtalk installation directory. If you don't know which predicate to
83use, check the "configs/NOTES.txt" file or your Prolog compiler reference
84manual.
85
864. Compile and load the config file for your Prolog compiler.
87
885. Compile and load the Logtalk compiler/runtime found on the "compiler"
89sub-directory.
90
916. Adapt, if needed, the file "libpaths/libpaths.pl" to match your Logtalk
92installation, Prolog compiler, operating-system, and then compile and
93load it.
94
95Note that both the configuration files, the compiler/runtime files, and the
96library paths file are Prolog files. The predicate used to load these files
97depends on your Prolog compiler (consult your Prolog compiler documentation
98or take a look at the definition of the predicate '$lgt_load_prolog_code'/3
99in the config file. For most command-line compilers, you could type at the
100Prolog prompt something like:
101
102    | ?- ['configs/foo.pl', 'compiler/logtalk.pl', 'libpaths/libpaths.pl'].
103
104Replace the file name "foo.pl" with the appropriate config file name for
105your compiler.
106
107
108Running the examples
109--------------------
110
111You may now try some of the provided examples:
112
1131. Open the "examples" sub-directory. There you find several sub-directories
114with ready to run examples and a "NOTES.txt" file containing general
115instructions and a brief description of each example. Select and open one
116of the examples sub-directory.
117
1182. Read the example "NOTES.txt" file for a description of the example.
119
1203. Open the "SCRIPT.txt" file for instructions on how to load the example
121and for sample queries that you may try by copying-and-pasting them to
122your Prolog interpreter top-level.
123
124
125Writing your own programs
126_________________________
127
128Ready to start writing your own programs?
129
1301. Read the User Manual sections on "Programming in Logtalk" and "Running
131and debugging Logtalk programs".
132
1332. Take a look at the "wenv" sub-directory. There you will find syntax
134configuration files for popular text editors which enable syntax coloring
135and other text services when editing Logtalk source files.
136
1373. Create a sub-directory with a suitable name to hold all the files of
138your application. You may want to add the directory path to the "libpaths.pl"
139file mentioned above in order to easily load your application.
140
1414. Copy to this sub-directory a loader file from one of the example
142directories and modify it to load your own source files.
143
1445. Have fun!
Note: See TracBrowser for help on using the browser.