Contents
Chapter 1 Introduction
Chapter 2 Calling ECL
i
PS
e
from C++
2.1 To get started
2.1.1 Directories
2.1.2 Definitions
2.1.3 Compiling, linking and running on Unix/Linux
2.1.4 Compiling, linking and running on Windows
2.2 Creating an ECL
i
PS
e
context
2.2.1 Initialisation
2.3 Control flow
2.3.1 Control flow and search
2.3.2 Asynchronous events
2.3.3 The yield-resume model
2.3.4 Summary of EC_resume() arguments
Chapter 3 Managing Data and Memory in Mixed-Language Applications
3.1 Constructing ECL
i
PS
e
data
3.1.1 ECL
i
PS
e
atoms and functors
3.1.2 Building ECL
i
PS
e
terms
3.1.3 Building atomic ECL
i
PS
e
terms
3.1.4 Building ECL
i
PS
e
lists
3.1.5 Building ECL
i
PS
e
structures
3.2 Converting ECL
i
PS
e
data to C data
3.2.1 Converting simple ECL
i
PS
e
terms to C data types
3.2.2 Decomposing ECL
i
PS
e
terms
3.3 Referring to ECL
i
PS
e
terms
3.4 Passing generic C or C++ data to ECL
i
PS
e
3.4.1 Wrapping and unwrapping external data in an ECL
i
PS
e
term
3.4.2 The method table
Chapter 4 External Predicates in C and C++
4.1 Coding External Predicates
4.2 Compiling and loading
4.3 Restrictions and Recommendations
Chapter 5 Embedding into Tcl/Tk
5.1 Loading the interface
5.2 Initialising the ECL
i
PS
e
Subsystem
5.3 Shutting down the ECL
i
PS
e
Subsystem
5.4 Passing Goals and Control to ECL
i
PS
e
5.5 Communication via Queues
5.5.1 From-ECL
i
PS
e
to Tcl
5.5.2 To-ECL
i
PS
e
from Tcl
5.6 Attaching Handlers to Queues
5.6.1 Tcl handlers
5.6.2 ECL
i
PS
e
handlers
5.7 Obtaining the Interface Type
5.8 Type conversion between Tcl and ECL
i
PS
e
5.9 Incompatible and obsolete commands
Chapter 6 Remote Tcl Interface
6.1 Basic Concepts of the Interface
6.2 Loading the Interface
6.3 Attaching and Initialising the Interface
6.3.1 A Note on Security
6.4 Type Conversion Between Tcl and ECL
i
PS
e
6.5 Executing an ECL
i
PS
e
Goal From Tcl
6.6 Communication via Queues
6.6.1 Queue Data Handlers
6.6.2 Synchronous Queues
6.6.3 Asynchronous Queues
6.6.4 Reusable Queue Names
6.6.5 Translating the Queue Names
6.7 Additional Control and Support
6.7.1 Initialisation During Attachment
6.7.2 Disconnection and Control Transfer Support
6.8 Example
6.9 Differences From the Tcl Embedding Interface
Chapter 7 Tcl Peer Multitasking Interface
7.1 Introduction
7.2 Loading the interface
7.3 Overview
7.3.1 Summary of Tcl Commands
7.4 Example
Chapter 8 Using the Java-ECL
i
PS
e
Interface
8.1 Getting Started
8.1.1 Check your Java SDK version
8.1.2 Make the
com.parctechnologies.eclipse
package available in your class path
8.1.3 Compile and run
QuickTest.java
8.2 Functionality overview: A closer look at
QuickTest.java
8.3 Java representation of ECL
i
PS
e
data
8.3.1 General correspondence between ECL
i
PS
e
and Java data types
8.3.2 Atoms and compound terms
8.3.3 Lists
8.3.4 Floats and Doubles
8.3.5 Integers
8.3.6 Variables
8.3.7 The
equals()
method
8.4 Executing an ECL
i
PS
e
goal from Java and processing the result
8.4.1 Passing the goal parameter to
rpc
8.4.2 Retrieving the results of an
rpc
goal execution
8.4.3 More details about
rpc
goal execution
8.5 Communicating between Java and ECL
i
PS
e
using queues
8.5.1 Opening, using and closing queues
8.5.2 Writing and reading ECL
i
PS
e
terms on queues
8.5.3 Using the
QueueListener
interface
8.5.4 Access to ECL
i
PS
e
’s standard streams
8.6 Asynchronous Communicating between Java and ECL
i
PS
e
8.6.1 Opening and closing asynchronous queues
8.6.2 Writing and reading ECL
i
PS
e
terms on queues
8.7 Managing connections to ECL
i
PS
e
8.7.1 A unified ECL
i
PS
e
-side interface to Java : the ‘peer’ concept
8.7.2 Creating and managing ECL
i
PS
e
engines from Java
8.7.3 Connecting to an existing ECL
i
PS
e
engine using
RemoteEclipse
8.7.4 Comparison of different Java-ECL
i
PS
e
connection techniques
Chapter 9 EXDR Data Interchange Format
9.1 ECL
i
PS
e
primitives to read/write EXDR terms
9.2 Serialized representation of EXDR terms
Chapter 10 The Remote Interface Protocol
10.1 Introduction
10.2 Basics
10.3 Attachment
10.3.1 Attachment Protocol
10.3.2 An example
10.4 Remote Peer Queues
10.4.1 Synchronous peer queues
10.4.2 Asynchronous peer queues
10.5 Control Messages
10.5.1 Messages from ECL
i
PS
e
side to remote side
10.5.2 Messages from remote side to ECL
i
PS
e
side
10.5.3 The disconnection protocol
10.6 Support for the Remote Interface
Chapter 11 DBI: ECL
i
PS
e
SQL Database Interface
11.1 Introduction
11.2 Using the SQL database interface
11.3 Data Templates
11.3.1 Conversion between ECL
i
PS
e
and database types
11.3.2 Specifying buffer sizes in templates
11.4 Built-Ins
11.4.1 Sessions
11.4.2 Database Updates
11.4.3 Database Queries
11.4.4 Parametrised Database Queries
Appendix A Parameters for Initialising an ECL
i
PS
e
engine
Appendix B Summary of C++ Interface Functions
B.1 Constructing ECL
i
PS
e
terms in C++
B.1.1 Class EC_atom and EC_functor
B.1.2 Class EC_word
B.2 Decomposing ECL
i
PS
e
terms in C++
B.3 Referring to ECL
i
PS
e
terms from C++
B.4 Passing Data to and from External Predicates in C++
B.5 Operations on ECL
i
PS
e
Data
B.6 Initialising and Shutting Down the ECL
i
PS
e
Subsystem
B.7 Passing Control and Data to ECL
i
PS
e
from C++
Appendix C Summary of C Interface Functions
C.1 Constructing ECL
i
PS
e
terms in C
C.2 Decomposing ECL
i
PS
e
terms in C
C.3 Referring to ECL
i
PS
e
terms from C
C.4 Passing Data to and from External Predicates in C
C.5 Operations on ECL
i
PS
e
Data
C.6 Initialising and Shutting Down the ECL
i
PS
e
Subsystem
C.7 Creating External Predicates in C
C.8 Passing Control and Data to ECL
i
PS
e
from C
C.9 Communication via ECL
i
PS
e
Streams
C.10 Miscellaneous
Appendix D Foreign C Interface