文件名称:HPL: Vol. IV: Functional and Logic Programming Languages
文件大小:659KB
文件格式:CHM
更新时间:2012-08-09 15:11:32
programming language
HPL: Vol. IV: Functional and Logic Programming Languages by Peter Salus Macmillan Technical Publishing, Macmillan Computer Publishing ISBN: 1578700116 Pub Date: 06/11/98 Foreword to the Handbook of Programming Languages About the Authors Part 1—Lisp Chapter 1—The LISP Language Chapter 2—Emacs Lisp: A Short Description 2.1. GNU Emacs and Emacs Lisp 2.2. Lisp Lists 2.2.1. Parts of Lisp 2.3. Example: Two Plus Two 2.4. Evaluation 2.5. A Function Definition 2.5.1. An Example of a Search Within a Buffer 2.5.2. An Example: multiply-by-seven 2.6. Variables 2.7. A Chest of Drawers 2.8. Functions 2.9. The read-eval-print Loop and Side Effects 2.10. Types of Variables 2.10.1. defvar and defconst 2.10.2. setq 2.10.3. Passing an Argument 2.10.4. A let Expression 2.10.5. Buffer-Local Variables 2.11. Sequencing 2.12. Conditionals 2.12.1. and, or, and not 2.13. while Loops and Recursion 2.13.1. while 2.13.2. car, cdr, cons: Fundamental Functions 2.13.3. while, Continued 2.13.4. Recursion 2.14. Macros 2.14.1. The list Built-in Function 2.14.2. Backquote 2.15. Property Lists 2.16. Keymaps 2.17. Editing Lisp 2.18. Help 2.19. Debugging 2.19.1. The Built-in Debugger 2.19.2. Edebug 2.20. Backups and Auto-Saving 2.21. Evaluating or Loading a Whole File 2.22. Byte Compilation 2.23. Your .emacs Initialization File Part II—Scheme Chapter 3—Scheme 3.1. Who Uses Scheme? 3.2. Scheme as a Dialect of Lisp 3.2.1. Expressions 3.2.2. Uniform Syntax 3.2.3. Automatic Storage Management 3.2.4. High-Level Data Types 3.2.5. Untyped Variables 3.3. Scheme as a Dialect of Algol 3.3.1. Internal Definitions 3.3.2. Lexical Scope 3.4. Innovations in Scheme 3.4.1. First-Class Data 3.4.2. Tail Call Elimination 3.4.3. First-Class Continuations 3.4.4. Lexical Scoping Rules for Macros 3.5. Functional Programming in Scheme 3.6. Object-Oriented Programming in Scheme 3.7. Common Problems for Beginning Scheme Programmers 3.7.1. Function Composition Problems 3.7.2. Attempted Sequential Results 3.7.3. Expressions Don’t Print 3.7.4. No Variable Reassignment 3.7.5. Scheme Isn’t English 3.7.6. Incomplete Expression Problems 3.7.7. Recursion Problems 3.7.8. cons Problems 3.8. References Part III—Guile Chapter 4—Guile: An Interpreter Core for Complete Applications 4.1. Pure Guile 4.2. The Guile Library 4.3. Domain-Specific Languages 4.4. Specializing Guile 4.4.1. Adding Functions to Guile 4.4.2. Adding Types to Guile 4.5. Cooperation Between Scheme and C 4.6. Hints for Using Guile 4.7. Related Work 4.8. Obtaining Guile and Other Packages Part IV—CLOS Chapter 5—A History and Description of CLOS 5.1. A Quick History of CLOS 5.2. An Introduction to CLOS 5.3. Components of CLOS 5.3.1. Classes and Instances 5.3.2. Class Inheritance 5.3.3. Classes and Operations 5.3.4. Multiple Argument Dispatch 5.3.5. Structure Encapsulation and Slots 5.3.6. Standard Method Combination 5.3.7. The Metaobject Protocol 5.4. Programming in CLOS 5.4.1. Slot Properties 5.4.2. Accessors and slot-value 5.4.3. Multiple Inheritance: Using Mix-ins to Get Modularity 5.4.4. Inheritance Rules: Precedence 5.4.5. Methods and Generic Functions 5.4.6. Before, After, and Around Methods 5.4.7. Operator Method Combination 5.4.8. Redefining Classes and Changing the Class of Instances 5.4.9. Extending CLOS Using the Metaobject Protocol 5.4.10. Performance Considerations 5.4.11. Summary of CLOS Operators Part V—Prolog Chapter 6—Prolog: Programming in Logic 6.1. History and Background 6.1.1. The Early Days 6.1.2. Progress on Prolog 6.1.3. Myths and Problems of Prolog 6.1.4. Prolog Resources 6.1.5. The Structure of This Chapter 6.2. Basic Prolog Programming 6.2.1. Hello World 6.2.2. The Genealogy Program 6.2.3. A Grammatical Summary 6.2.4. Equality and Variables 6.2.5. Lists 6.2.6. Predicates on Lists 6.2.7. Complex Terms in Heads of Clauses 6.2.8. How Prolog Does It 6.3. More Advanced Features 6.3.1. Negation 6.3.2. The Cut Literal 6.3.3. Multi-Arity Predicates 6.3.4. More About Terms 6.3.5. Input and Output 6.3.6. Other Logic and Control Constructs 6.3.7. Finding All Solutions 6.3.8. The Four-Port Debugger 6.3.9. Definite Clause Grammars 6.3.10. assert and retract 6.3.11. Operator Declarations 6.4. Tips and Traps 6.4.1. Style 6.4.2. Overusing assert and retract 6.4.3. The Singleton Warning and Anonymous Variables 6.4.4. Infinite Terms and the Occurs Check 6.4.5. The Transitive Closure Problem 6.4.6. Tail Recursion Optimization 6.4.7. First Argument Indexing 6.4.8. Reading Clauses from the Terminal 6.4.9. Using the Dash in a Symbol 6.5. Examples 6.5.1. A Balanced Tree Package 6.5.2. Eratosthenes’ Sieve 6.5.3. A C Leak Checker 6.5.4. The Game of Life 6.5.5. A Simple Lisp Interpreter 6.6. Acknowledgments 6.7. References Index -------------------------------------------------------------------------------- Copyright © Macmillan Computer Publishing, Inc.