root/tags/lgt2302/QUICK_START.txt

Revision 3758, 4.8 KB (checked in by pmoura, 17 months ago)

Updated release number to 2.30.2.

  • 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.30.2
4
5Copyright (c) 1998-2007 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 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  SICStus Prolog: sicstuslgt
36  SWI-Prolog:     swilgt
37  XSB:            xsblgt        (first run must use sudo)
38  YAP:            yaplgt
39
40On Windows systems, shortcuts for running Logtalk with selected back-end
41Prolog compilers are created on the "Start Menu/Programs/Logtalk" menu.
42If you get an unexpected failure when using one of the Prolog integration
43scripts, consult the "configs/NOTES.txt" file for compatibility notes.
44
452. Open the "manuals/index.html" file with a web browser.
46
473. Select the "Tutorial" link. This will provide you with a basic
48understanding of the main Logtalk concepts.
49
504. Go back to the "index.html" file, select the "User Manual" link,
51then the "Installing Logtalk" and "Running and debugging Logtalk
52programs" links. This will provide you with a basic understanding of
53how to start Logtalk as well as how to compile and load Logtalk code.
54
55
56In case a manual installation is necessary, and assuming that Logtalk
57supports your Prolog compiler, apply the following steps:
58
591. Read the "NOTES.txt" file in the "configs" sub-directory to check if
60any patch or workaround is needed for your compiler.
61
622. Start your Prolog compiler.
63
643. Change the current working directory of your Prolog session to the
65Logtalk installation directory. If you don't know which predicate to
66use, check the "configs/NOTES.txt" file or your Prolog compiler reference
67manual.
68
694. Compile and load the config file for your Prolog compiler.
70
715. Compile and load the Logtalk compiler/runtime found on the "compiler"
72sub-directory.
73
746. Adapt, if needed, the file "libpaths/libpaths.pl" to match your Logtalk
75installation, Prolog compiler, operating-system, and then compile and
76load it.
77
78Note that both the configuration files, the compiler/runtime files, and the
79library paths file are Prolog files. The predicate used to load these files
80depends on your Prolog compiler (consult your Prolog compiler documentation
81or take a look at the definition of the predicate '$lgt_load_prolog_code'/1
82in the config file. For most command-line compilers, you could type at the
83Prolog prompt something like:
84
85    | ?- ['configs/foo.config', 'compiler/logtalk.pl', 'libpaths/libpaths.pl'].
86
87Replace the file name "foo.config" with the appropriate config file name for
88your compiler.
89
90
91Running the examples
92--------------------
93
94You may now try some of the provided examples:
95
961. Open the "examples" sub-directory. There you find several sub-directories
97with ready to run examples and a "NOTES.txt" file containing general
98instructions and a brief description of each example. Select and open one
99of the examples sub-directory.
100
1012. Read the example "NOTES.txt" file for a description of the example.
102
1033. Open the "SCRIPT.txt" file for instructions on how to load the example
104and for sample queries that you may try by copying-and-pasting them to
105your Prolog interpreter top-level.
106
107
108Writing your own programs
109_________________________
110
111Ready to start writing your own programs?
112
1131. Read the User Manual sections on "Programming in Logtalk" and "Running
114and debugging Logtalk programs".
115
1162. Take a look at the "wenv" sub-directory. There you will find syntax
117configuration files for popular text editors which enable syntax coloring
118and other text services when editing Logtalk source files.
119
1203. Create a sub-directory with a suitable name to hold all the files of
121your application. You may want to add the directory path to the "libpaths.pl"
122file mentioned above in order to easily load your application.
123
1244. Copy to this sub-directory a loader file from one of the example
125directories and modify it to load your own source files.
126
1275. Have fun!
Note: See TracBrowser for help on using the browser.