Download pdf format
Transcript
5 Embedding into Tcl/Tk 5.1 Loading the interface . . . . . . . . . . . . . 5.2 Initialising the ECLi PSe Subsystem . . . . 5.3 Passing Goals and Control to ECLi PSe . . . 5.4 Communication via Queues . . . . . . . . . 5.4.1 From-ECLi PSe to Tcl . . . . . . . . 5.4.2 To-ECLi PSe from Tcl . . . . . . . . 5.5 Attaching Handlers to Queues . . . . . . . . 5.5.1 Tcl handlers . . . . . . . . . . . . . 5.5.2 ECLi PSe handlers . . . . . . . . . . 5.6 Obtaining the Interface Type . . . . . . . . 5.7 Type conversion between Tcl and ECLi PSe 5.8 Incompatible and obsolete commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 21 21 22 23 24 25 25 26 27 27 27 28 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 ECLi PSe . . . . . 6.5 Executing an ECLi PSe 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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 31 32 32 33 34 34 35 36 36 42 46 47 48 48 48 50 51 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Using the Java-ECLi PSe Interface 7.1 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.1.1 Check your Java SDK version . . . . . . . . . . . . . . . . . . . . . . . . . 7.1.2 Make the com.parctechnologies.eclipse package available in your class path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.1.3 Compile and run QuickTest.java . . . . . . . . . . . . . . . . . . . . . . 7.2 Functionality overview: A closer look at QuickTest.java . . . . . . . . . . . . . 7.3 Java representation of ECLi PSe data . . . . . . . . . . . . . . . . . . . . . . . . . 7.3.1 General correspondence between ECLi PSe and Java data types . . . . . . 7.3.2 Atoms and compound terms . . . . . . . . . . . . . . . . . . . . . . . . . . 7.3.3 Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.3.4 Floats and Doubles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.3.5 Integers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.3.6 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ii 55 55 56 56 56 56 58 58 59 59 60 60 60