Prolog


Introduction

1 Presentation of Prolog
  1.1 What is a Prolog program
      1.1.1 The Program
      1.1.2 The Query

2 The Facts
  2.1 Simple facts
  2.2 Facts with arguments
  2.3 How to query

3 Variables and Unification
  3.1 Simple unifications
  3.2 Variables unification example

4 Rules
  4.1 Rules
  4.2 How to add a rule with a program
      4.2.1 The instructions
      4.2.2 Example

5 Backtracking
  5.1 Fail
  5.2 Cut
  5.3 Not

6 Recursion
  6.1 What is recursion
  6.2 Examples of Recursion
      6.2.1 Example of the ancestors
      6.2.2 Factorial

7 Lists
  7.1 What is a list in Prolog
  7.2 How to manipulate list

8 Others Elements of Prolog
  8.1 Operators
  8.2 Arithmetic

9 Input and Output
  9.1 Input Output commands
  9.2 Read and Write
  9.3 Examples
      9.3.1 Calculating the cube of an integer
      9.3.2 Treating the terms of a file
      9.3.3 ASCII characters
      9.3.4 Using Another Program

10 SWI-Prolog
  10.1 What is SWI-Prolog
  10.2 Author
  10.3 Platforms
  10.4 FTP Sites


Appendix

A Meta Logical Constructs

B Input and Output
  B.1 input
  B.2 Output

C Some Others usefull predicats
  C.1 True
  C.2 Repeat
  C.3 Call
  C.4 Setof
  C.5 Bagof

D Comparison Operators
  D.1 Arithmetic Comparison Operators
  D.2 Term Comparison


This Report in LaTeX
About us
Links

10   SWI-Prolog

10.1   What is SWI-Prolog

If you want to use Prolog you need a compiler. There are many compiler downloadables on internet. For this report we used SWI-Prolog. SWI-Prolog is free Prolog compiler licenced under the GPL, targeting primaly the research and education.

10.2   Author

SWI-Prolog is designed and implemented by Jan Wielemaker from the University of Amsterdam, department of Social Science Informatics (SWI).

10.3   Platforms

SWI-Prolog is written in ANSI C and should configure for most Unix machines having an ANSI C Compiler.
Ports have been made for :
  1. MS Win32
  2. MS Win3.1
  3. MS DOS
  4. OS/2

10.4   FTP Sites

The main ftp-site to download SWI-Prolog is :
ftp://swi.psy.uva.nl/pub/SWI-Prolog/

Latest version of the sources :
ftp://swi.psy.uva.nl/pub/SWI-Prolog/pl.tar.gz

Latest binary for use with with Win32 :
ftp://swi.psy.uva.nl/pub/SWI-Prolog/w32pl.exe

You can obtain more informations about SWI-Prolog by visiting the site :
http://www.swi.psy.uva.nl/projects/SWI-Prolog/




-
Meta Logical Constructs -->