Amzi! Logic Server User's Guide & Reference
Contents Index
Contents and Purpose
Contents
Purpose
Overview
Overview
Prolog Logicbases
Architecture
Logic Server Engine and LSAPI
Extending Prolog
Supported Environments
Programmer's Guide
Programmer's Guide
Main Entry Points
Engine ID Parameter
Logic Server Return Codes
TF/Term-Success/Failure Return Codes
RC-Error Checking Return Codes
Prolog Terms
Internals of Complex Terms
String Passing Interface
Calling Prolog with a String Query
Converting Terms to Strings
Backtracking through Multiple Answers
Putting it All Togther
Examples
Scope of Logic Server Terms
Safe Scoping Answer
Nested Scoping Answer
Implementing a Simple Prolog Listener
Calling Terms
Mapping Prolog Arguments to Host Variables
Example
Making Simple Terms
Handling Varying Prolog Types
Manipulating Structures
Manipulating Lists
Asserting and Retracting Dynamic Clauses
Consulting Prolog Source Code
Multiple Engines
Writing Extended Predicates
Defining Extended Predicates
Initializing the Extended Predicates
Example
Extended Predicate Libraries (LSXs)
Using LSXs
Example
Capturing Prolog I/O
I/O Functions
Connecting Your Functions
Making Stream 3 the Default
Redirecting I/O Streams Example
Error Handling
Prolog Error Handling
LSAPI Error Handling
Class Error Handling
Break Handling
Return Codes
Miscellaneous Functions
LSAPI Introduction
LSAPI Introduction
Libraries
Getting Started
Reference Sections
Hello Prolog
Hello Prolog
Prolog Side of Hello Prolog
Compiling and Linking
Host Language Side of Hello Prolog
LSAPI Reference
LSAPI Reference
Main entry points to set up Prolog environment (LogicServer Class)
Calling Prolog from the host language (LogicServer Class)
Logicbase asserting and retracting (LogicServer Class)
String/Term conversion functions (LogicServer Class)
Making Prolog types (LogicServer Class)
Getting values from Prolog terms (LogicServer Class)
Structure manipulation functions (LogicServer Class)
List manipulation functions (LogicServer Class)
Parameter manipulating functions for building extended predicates (LogicServer Class)
Stream I/O functions (LogicServer Class)
Miscellaneous functions (LogicServer Class)
Error handling (LSException Class)
LSAPI Data Types
Return Values
TF
RC
Prolog Term Types
Environment Data Types
Prolog Exeception Types
Prolog Stream Values
LSAPI Function/Method Parameter Types
ARITY
BYTEptr
CELL
double
ENGid
ExtPred
int
intC
intCH
STRING
TERM
TERMptr
uintC
uintCH
VOIDptr
LSAPI Function/Method Descriptions
AddLSX
AddPred
Asserta
AssertaStr
Assertz
AssertzStr
Call
CallStr
ClearCall
Close
ErrRaise *
Exec
ExecStr
GetArg
GetArgType
GetArity
GetExceptCallStack (LSException) GetCallStack
GetExceptMsg (LSException) GetMsg (LSException) GetMessage
GetExceptReadBuffer (LSException) GetReadBuffer
GetExceptReadFileName (LSException) GetReadFileName
GetExceptReadLineno (LSException) GetReadLineno
GetExceptType (LSException) GetType
GetExceptRC (LSException) GetRC
GetFA *
GetFloatArg
GetFloatHead
GetFloatParm
GetFloatTerm
GetFunctor
GetHead
GetIntArg
GetIntHead
GetIntParm
GetIntTerm
GetParm
GetParmType
GetStrArg
GetStrHead
GetStrParm
GetStrTerm
GetStream *
GetTail
GetTerm *
GetTermType
GetVersion
Init
Init2
InitLSX
InitPreds *
Load
LoadFromMemory (URL)
Main
MakeAddr *
MakeAtom
MakeFA
MakeFloat
MakeInt
MakeList
MakeStr
PopList *
PushList
Redo
Reset
Retract
RetractStr
SetCommandArgs *
SetInput *
SetIOArg
SetOutput
SetStream
StrArgLen
StrParmLen
StrTermLen
StrToTerm
TermToStr
TermToStrQ
Unify *
UnifyArg *
UnifyAtomArg
UnifyAtomParm
UnifyFloatArg
UnifyFloatParm
UnifyIntArg
UnifyIntParm
UnifyParm
UnifyStrArg
UnifyStrParm
C Interface
C Interface
Hello Prolog
Unicode Support
C ++ Class
C ++ Class
Hello Prolog
Encapsulating Prolog Services
Multiple LogicServers
Implementing Extended Predicates
Unicode Support
Delphi Component
Delphi Component
Installation
Hello Prolog
Overview
Using the Component
Implementing Extended Predicates
Reference
Logic Server Types
Logic Server Set-Up
Extended Predicates
Calling Prolog
Dynamic Clauses in Logicbase
Converting Strings/Terms
Making/Getting Prolog Types
Manipulating Structures
Manipulating Lists
Prolog Stream I/O
Miscellaneous Functions
.NET
.NET Wrapper Class
Where to Learn About.NET
Installation
Pets Callback Samples
Overview
Object Oriented
Representing Prolog Terms
Issuing Prolog Queries
String Conversion
Exceptions
Multi-Threaded
Using the.NET Class
Implementing Extended Predicates
Examples
Calling from ASP.NET, JSP and Java Servlets
Calling from ASP.NET, JSP and Java Servlets
ASP.NET
JSP and Java Servlets
Java Class
Java Class
Where to Learn About Java
Installation
Hello Prolog
Overview
Object Oriented
Representing Prolog Terms
Issuing Prolog Queries
String Conversion
Exceptions
Multi-Threaded
Using the Java Class
Implementing Extended Predicates
Controlling the JNI Environment Pointer for Extended Predicates
Converting Prolog Lists to Java Types
Examples
Visual Basic Module
Visual Basic Module
Hello Prolog
Overview
Using the Module
Implementing Extended Predicates
Reference
Logic Server Constants
Logic Server Set-Up
Extended Predicates
Calling Prolog
Dynamic Clauses in the Logicbase
Converting Strings/Terms
Making/Getting Prolog Types
Manipulating Structures
Manipulating Lists
Miscellaneous Functions
Examples
Callling from MS-Office
Calling from MS-Office
CGI Interface
CGI Interface
Introduction
Architecture
Using the CGI Interface with Various Web Servers
Implementation
Building the C Program
Writing the Prolog Script
CGI Variables
CGI Predicates
LSX Introduction
LSX Introduction
ODBC Support
ODBC Support
Prolog Interface
Prolog Interface Example
Extended Predicates
Sockets LSX
Sockets LSX
Executables
Source Code
Examples
Extended Predicates
Startup/Shutdown Predicates
Conversion Predicates
Database Predicates
Socket Predicates
Tcl/Tk Support
Tcl/Tk Support
Overview
Calling Tcl/Tk from a logicbase
Making logicbase queries from Tcl/Tk
Error Handling
Distribution
Tutorial Example
Implementation
References
O.S. Specific Predicates
O.S. Specific Predicates
Delphi GUI Predicates
Delphi GUI Predicates
Using DelGUI
Flow of Control Issue
Extended Predicates
Prolog Predicates
Sample
Command-Line Runtime Shell
Command-Line Runtime Shell