Obliq, a Language with Distributed Scope
Total Page:16
File Type:pdf, Size:1020Kb
Obliq A Language with Distributed Scope Luca Cardelli June 3, 1994 © Digital Equipment Corporation 1994 This work may not be copied or reproduced in whole or in part for any commercial purpose. Permis- sion to copy in whole or in part without payment of fee is granted for nonprofit educational and re- search purposes provided that all such whole or partial copies include the following: a notice that such copying is by permission of the Systems Research Center of Digital Equipment Corporation in Palo Alto, California; an acknowledgment of the authors and individual contributors to the work; and all applicable portions of the copyright notice. Copying, reproducing, or republishing for any other pur- pose shall require a license with payment of fee to the Systems Research Center. All rights reserved. Abstract Obliq is a lexically-scoped untyped interpreted language that supports distributed object-oriented computation. An Obliq computation may involve multiple threads of control within an address space, multiple address spaces on a machine, heterogeneous machines over a local network, and multiple net- works over the Internet. Obliq objects have state and are local to a site. Obliq computations can roam over the network, while maintaining network connections. Contents 1. Introduction ................................................................................................................................. 1 1.1 Language Overview ............................................................................................................. 1 1.2 Distributed Semantics ..........................................................................................................2 2. Local Objects ............................................................................................................................... 3 2.1 Objects and their Fields ........................................................................................................ 3 2.2 Object Operations ................................................................................................................ 4 2.3 Simple Examples .................................................................................................................. 6 3. Remote Objects ........................................................................................................................... 6 3.1 State ...................................................................................................................................... 7 3.2 Transmission ........................................................................................................................ 7 3.3 Distributed Computation ...................................................................................................... 8 3.4 Self-inflicted Operations ......................................................................................................9 3.5 Protected Objects.................................................................................................................. 9 3.6 Serialized Objects .............................................................................................................. 10 3.7 Name Servers ..................................................................................................................... 11 3.8 Execution Engines .............................................................................................................. 13 4. Local Techniques ...................................................................................................................... 13 4.1 Recursion and Iteration ...................................................................................................... 13 4.2 The Object-Oriented Numerals .......................................................................................... 14 4.3 The Prime Numbers Sieve ................................................................................................. 15 4.4 A Calculator ....................................................................................................................... 15 4.5 Surrogates........................................................................................................................... 17 5. Distributed Techniques.............................................................................................................. 17 5.1 A Serialized Queue............................................................................................................. 17 5.2 Compute Servers ................................................................................................................ 18 5.3 A Database Server .............................................................................................................. 19 5.4 Remote Agents ................................................................................................................... 20 5.5 Application Partitioning ..................................................................................................... 22 5.6 Agent Migration ................................................................................................................. 22 5.7 Object Migration ................................................................................................................ 22 5.8 Application Servers ............................................................................................................ 24 6. Syntax Overview ....................................................................................................................... 24 7. Conclusions ............................................................................................................................... 25 Related Work .................................................................................................................... 25 Status ................................................................................................................................. 26 Future Work ...................................................................................................................... 26 Acknowledgments ........................................................................................................................... 26 A. Language Reference .................................................................................................................. 27 A.1 Syntactic Structures ............................................................................................................ 27 A.1.1 Identifiers .................................................................................................................. 27 A.1.2 Definitions ................................................................................................................ 27 A.1.3 Terms ........................................................................................................................ 27 A.1.4 Term Sequences ........................................................................................................ 28 A.1.5 Built-In Operators ..................................................................................................... 28 A.1.6 Operator Precedence ................................................................................................. 28 A.2 Data Structures ................................................................................................................... 28 A.2.1 Value Identity ........................................................................................................... 28 A.2.2 Constants .................................................................................................................. 29 A.2.3 Operators .................................................................................................................. 29 A.2.4 Arrays ....................................................................................................................... 30 A.2.5 Options ..................................................................................................................... 30 A.2.6 Objects ...................................................................................................................... 30 A.2.7 Protection and Serialization ...................................................................................... 32 A.2.8 Object and Engine Servers........................................................................................ 32 A.2.9 Processor and File System Enablers ......................................................................... 33 A.3 Control Structures .............................................................................................................. 33 A.3.1 Definitions ................................................................................................................ 34 A.3.2 Assignment ............................................................................................................... 34 A.3.3 Sequencing ................................................................................................................ 34 A.3.4 Procedures and Methods........................................................................................... 34 A.3.5 Conditionals .............................................................................................................. 35 A.3.6 Case .........................................................................................................................