Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword or section
Like this
3Activity

Table Of Contents

Using This Manual
PART 1
Using the Environment
CHAPTER 17
Using the Visual Prolog Environment
What Needs to be Installed for This Book ?
Starting the Visual Prolog Environment
Opening an Editor Window
Running and Testing a Program
Loading Examples From Disk
Handling Errors
PART 2
Tutorial Chapters 20 -- 21: Learning Prolog2223Visual Prolog
CHAPTER 24
Prolog Fundamentals
PROgramming in LOGic
Sentences: Facts and Rules
Queries
Variables: General Sentences
Overview
From Natural Language to Prolog Programs
Clauses (Facts and Rules)
Predicates (Relations)
Variables (General Clauses)
Goals (Queries)
Comments
What Is a Match?
Summary
CHAPTER 32
Visual Prolog Programs
Visual Prolog's Basic Program Sections
The Clauses Section
The Predicates Section
The Domains Section
The Goal Section
A Closer Look at Declarations and Rules
Other Program Sections
The Facts Section
The Constants Section
The Global Sections
The Compiler Directives
CHAPTER 60
Unification and Backtracking
Matching Things Up: Unification
Backtracking
Visual Prolog's Relentless Search for Solutions
Controlling the Search for Solutions
Using the fail Predicate
Preventing Backtracking: The Cut
Prolog from a Procedural Perspective
How Rules and Facts Are Like Procedures
CHAPTER 81
Simple and Compound Objects
Simple Data Objects
Variables as Data Objects
Constants as Data Objects
Compound Data Objects and Functors
Unification of Compound Objects
Treating Several Items as One
Declaring Domains of Compound Objects
Compound Mixed-Domain Declarations
CHAPTER 92
Repetition and Recursion
Repetitive Processes
Backtracking Revisited
Implementing Backtracking with Loops
Recursive Procedures
Tail Recursion Optimisation
Using Arguments as Loop Variables
Recursive Data Structures
Trees as a Data Type
Binary Search Trees
CHAPTER 126
Lists and Recursion
What Is a List?
Declaring Lists
List Processing
Using Lists
Writing Lists
Counting List Elements
Tail Recursion Revisited
List Membership
Finding All the Solutions at Once
Compound Lists
Facts determiner-keywords
Saving a database of facts at runtime
Examples
CHAPTER 154
Arithmetic and Comparison
Arithmetic Expressions
Operations
Order of Evaluation
Functions and Predicates
Generating Random Numbers
Integer and Real Arithmetic
Comparisons
Equality and the equal (=) Predicate
Comparing Characters, Strings, and Symbols
CHAPTER 173
Classes and objects
Encapsulation
Objects and classes
Inheritance
Identity
Visual Prolog Classes
Class declarations
Class implementation
Class instances
Destroying Objects
Class Domains
Sub-classing and inheritance
Derived class access control
Formal definition for classes
CHAPTER 175
Advanced Topics
The Flow Analysis
Specifying Flowpatterns for Predicates
Controlling the Flow Analysis
Reference Variables
Declaring Domains as Reference
Reference Domains and the Trail Array
Using Reference Domains
Flow Patterns Revisited
Using Binary Trees with Reference Domains
Sorting with Reference Domains
Functions and Return Values
Determinism Monitoring in Visual Prolog
Visual Prologs determinism checking system
Predicates as Arguments
Predicate Domains
The Binary Domain
Implementation of binary terms
Text syntax of Binary Terms
Creating Binary Terms
Accessing Binary Terms
Unifying Binary Terms
Example
Converting Terms to Binary Terms
Errors and Exception Handling
Exception Handling and Error Trapping
Error reporting
Handling Errors from the Term Reader
Break Control (Textmode Only)
Manual Break and Signal Checking in UNIX
Critical Error Handling under DOS Textmode
Dynamic Cutting
Free Type Conversions
Programming Style
Rules for Efficient Programming
Determinism vs. Non-determinism: Setting the Cut
PART 3
Tutorial Chapters 208 -- 209: Using Visual Prolog.210211Visual Prolog
CHAPTER 212
Writing, Reading, and Files
Writing and Reading
Writing
Reading
Binary Block Transfer
Visual Prolog's File System
Opening and Closing Files
Redirecting Standard I/O
Working with Files
File Attributes
Basic String-Handling Predicates
Type Conversion
CHAPTER 249
The External Database System
External Databases in Visual Prolog
An Overview: What's in an External Database?
Chains
External Database Domains
Manipulating Whole External Databases
Manipulating Chains
Manipulating Terms
A Complete Program Example
B+ Trees
Pages, Order, and Keylength
Duplicate Keys
Multiple Scans
The B+ Tree Standard Predicates
Example: Accessing a Database via B+ Trees
External Database Programming
Scanning through a Database
Displaying the Contents of a Database
Implementing a Database That Won't Break Down
Updating the Database
Using Internal B+ Tree Pointers
Changing the Structure of a Database
Filesharing and the External Database
Filesharing Domains
Opening the Database in Sharemode
Programming with Filesharing
Implementing highlevel locking
A Complete Filesharing Example
Implementation Aspects of Visual Prolog Filesharing
Miscellaneous
CHAPTER 263
System-Level Programming
Access to the operating system
Timing Services
Bit-Level Operations
Access to the Hardware: Low-Level Support
CHAPTER 271
Example Prolog Programs
Building a Small Expert System
Prototyping: A Simple Routing Problem
Adventures in a Dangerous Cave
Hardware Simulation
Towers of Hanoi
Dividing Words into Syllables
The N Queens Problem
PART 4
Programmer’s Guide
CHAPTER 298
Elements of the Language
Names
Program Sections
The Facts/Database Section
Conditional Compilation
Including Files in Your Program
Compiler Directives
Visual Prolog Memory Management
Releasing Spare Memory Resources
Modular Programming
Global Declarations
CHAPTER 309
Interfacing with Other Languages
Using DLL’s
Calling Other Languages from Visual Prolog
Declaring External Predicates
Calling Conventions and Parameter Passing
Domain Implementation
Simple Domains
Complex Domains
Memory Considerations
Memory Alignment
Memory Allocation
List Handling
Index
0 of .
Results for:
No results containing your search query
P. 1
Language

Language

Ratings: (0)|Views: 87 |Likes:
Published by Mijal Segal

More info:

Published by: Mijal Segal on Nov 08, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

04/25/2012

pdf

text

original

You're Reading a Free Preview
Pages 10 to 180 are not shown in this preview.
You're Reading a Free Preview
Pages 190 to 215 are not shown in this preview.
You're Reading a Free Preview
Pages 225 to 303 are not shown in this preview.
You're Reading a Free Preview
Pages 318 to 481 are not shown in this preview.

Activity (3)

You've already reviewed this. Edit your review.
1 thousand reads
1 hundred reads
agigi9565313 liked this

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->