Example: barber

User Manual - ECLiPSe

ECLi PSe user Manual Release Abderrahamane Aggoun (ECRC). David Chan (ECRC). Pierre Dufresne (ECRC). Eamon Falvey (ICL-ITC). Hugh Grant (ICL-ITC). Warwick Harvey (IC-Parc and crosscore ). Alexander Herold (ECRC). Geoffrey Macartney (ECRC). Micha Meier (ECRC). David Miller (ICL-ITC). Shyam Mudambi (ECRC). Stefano Novello (ECRC and IC-Parc). Bruno Perez (ECRC). Emmanuel van Rossum (ECRC). Joachim Schimpf (ECRC, IC-Parc, crosscore and Cisco). Kish Shen (IC-Parc, crosscore and Cisco). Periklis Andreas Tsahageas (ECRC). Dominique Henry de Villeneuve (ECRC). August 4, 2018.

ECLiPSe User Manual Release 7.0 Abderrahamane Aggoun (ECRC) David Chan (ECRC) Pierre Dufresne (ECRC) Eamon Falvey (ICL-ITC) Hugh Grant (ICL-ITC) Warwick Harvey (IC-Parc and CrossCore)

Tags:

  Manual, User, User manual, Crosscore

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Advertisement

Transcription of User Manual - ECLiPSe

1 ECLi PSe user Manual Release Abderrahamane Aggoun (ECRC). David Chan (ECRC). Pierre Dufresne (ECRC). Eamon Falvey (ICL-ITC). Hugh Grant (ICL-ITC). Warwick Harvey (IC-Parc and crosscore ). Alexander Herold (ECRC). Geoffrey Macartney (ECRC). Micha Meier (ECRC). David Miller (ICL-ITC). Shyam Mudambi (ECRC). Stefano Novello (ECRC and IC-Parc). Bruno Perez (ECRC). Emmanuel van Rossum (ECRC). Joachim Schimpf (ECRC, IC-Parc, crosscore and Cisco). Kish Shen (IC-Parc, crosscore and Cisco). Periklis Andreas Tsahageas (ECRC). Dominique Henry de Villeneuve (ECRC). August 4, 2018.

2 Trademarks UNIX is a trademark of AT&T Bell Laboratories. Quintus and Quintus Prolog are trademarks of Quintus Computer Systems, Incorporated. VAX is a trademark of Digital Equipment Corporation SUN-3 and SUN-4 are trademarks of Sun Microsystems, Inc. c 1990 2006 Cisco Systems, Inc. Contents Contents i 1 Introduction 1. What is ECLi PSe ? .. 1. Overview .. 1. Further Information .. 2. Reporting Problems .. 2. 2 Terminology 3. 3 Getting started with ECLi PSe 7. How do I install the ECLi PSe system? .. 7. How do I run my ECLi PSe programs? .. 7. How do I use TkECLi PSe ?

3 7. Getting started .. 7. How do I write an ECLi PSe program? .. 7. Compiling a program .. 8. Executing a query .. 8. Editing a file .. 9. Debugging a program .. 9. Getting help .. 10. Other tools .. 10. Preference Editor .. 12. How do I use ECLiPSe ? .. 12. Getting started .. 12. Interacting with the top level loop .. 12. Compiling a program .. 12. Entering a program from the terminal .. 13. Executing a query .. 13. Interrupting the execution .. 14. Debugging a program .. 15. The history mechanism .. 15. Getting help .. 15. How do I make things happen at compile time?

4 15. How do I use ECLi PSe libraries in my programs? .. 16. How do I make my programs run faster? .. 16. Other tips .. 17. i Initialization at start-up .. 17. Recommended file names .. 17. 4 The TkECLi PSe Development Tools 19. Display Matrix .. 19. Invoking display matrix tool interactively .. 21. Using the development tools in applications .. 21. Using the Development tools in the Tcl/Tk Embedding Interface .. 22. Using the Remote Development Tools .. 22. 5 ECLi PSe -specific Language Features 27. Structure Notation .. 27. Updating Structures .. 28.

5 Arity and Functor of Structures .. 28. Printing Structures .. 28. Inheritance .. 28. Visibility .. 29. Loop/Iterator Constructs .. 29. Examples .. 32. Array Notation .. 37. Implementation Note .. 38. The String Data Type .. 39. Choosing The Appropriate Data Type .. 39. Built-in Support for Strings .. 41. Matching Clauses .. 41. Soft Cut .. 42. 6 The Compiler 43. Summary .. 43. Compiler Invocation .. 43. Source Files .. 44. Main Compiler Options .. 45. Source Structure .. 46. Clauses and Predicates .. 46. Compilation and Modules .. 47. Incrementality.

6 47. Directives .. 47. Modules and Declarations .. 47. Conditional Compilation .. 48. Include Directives .. 48. Compiler Pragmas .. 48. Precompiled (ECO) Files .. 49. Making Precompiled Files .. 49. Restrictions .. 50. Loading Precompiled Files .. 50. Using the Compiler with a Makefile .. 51. Special Compiler Features .. 51. ii Compiling Non-Textual Source .. 51. Mode Declarations .. 51. Inlining .. 52. Clause Expansion .. 53. Writing Efficient Code .. 53. Implementation Notes .. 56. 7 Engines and Threads 57. 8 The Module System 59. Basics .. 59. Purpose of Modules.

7 59. What is under Visibility Control? .. 59. What Modules are There? .. 60. Getting Started .. 60. Creating a Module .. 60. Exporting .. 60. Importing .. 61. Definitions, Visibility and Accessibility .. 62. Advanced Topics .. 62. Solving Name Conflicts .. 62. Qualified Access via :/2 .. 63. Reexport - Making Modules from Modules .. 64. Modules and Source Files .. 64. Tools and Caller Modules .. 65. Lookup Module vs Caller Module .. 67. The Module Interface .. 67. Module-related Predicate Properties .. 67. Less Common Topics .. 67. Modules That Use Other Languages.

8 67. Creating and Erasing Modules at Runtime .. 68. Initialization and Finalization .. 68. Locking Modules .. 68. 9 Arithmetic Evaluation 71. Built-Ins to Evaluate Arithmetic Expressions .. 71. Arithmetic Evaluation vs Arithmetic Constraint Solving .. 71. Numeric Types and Type Conversions .. 72. Integers .. 72. Rationals .. 72. Floating Point Numbers .. 72. Bounded Real Numbers .. 73. Type Conversions .. 73. Arithmetic Functions .. 73. Predefined Arithmetic Functions .. 73. Evaluation Mechanism .. 75. user Defined Arithmetic Functions .. 75. iii Runtime Expressions.

9 76. Low Level Arithmetic Builtins .. 76. The Multi-Directional Arithmetic Predicates .. 77. Arithmetic and Coroutining .. 77. 10 Non-logical Storage and References 79. Introduction .. 79. Bags .. 79. Records .. 80. Shelves .. 81. Stores .. 81. Non-logical Variables .. 83. Non-logical Arrays .. 84. Global References .. 85. 11 Input and Output 87. Streams .. 87. Predefined Streams .. 87. Stream Handles and Aliases .. 88. Opening New Streams .. 89. Closing Streams .. 90. Redirecting Streams .. 91. Finding Streams .. 91. Stream Properties .. 91. Communication via Streams.

10 91. Character I/O .. 92. Token I/O .. 92. Term I/O .. 93. Newlines .. 93. General Parsing and Text Generation .. 94. Flushing .. 94. Prompting .. 94. Positioning .. 94. In-memory Streams .. 94. String Streams .. 95. Queue streams .. 95. Term Output Formats .. 96. Write term and Printf .. 96. Other Term Output Predicates .. 98. Default Output Options .. 98. 12 Dynamic Code 99. Compiling Procedures as Dynamic or Static .. 99. Altering programs at run time .. 101. Differences between static and dynamic code .. 101. iv 13 ECLi PSe Macros 103. Introduction.