Structured programming with limited private types in Ada: nesting if for the soaring eagles

Many traditional styles of programming cannot cope with the limitations of Ada limited private types. We present a style of programming that enables structured programming in Ada with limited private types. The problem of "finalization" is safely and cleanly handled through the use of a generic package which guarantees that a variable of the limited private type will be finalized even in the presence of exceptions.Finalization is often desired in order to perform automatic garbage collection, whether by reference counting or by marking. We have proved our structured technique by developing a garbage-collected Lisp system in Ada in which the Lisp values are instances of a limited private type. The Ada code was so highly structured, that it was generated automatically using a simple compiler. The garbage collector in this system was easily and safely implemented, and different garbage collection techniques were tested without affecting user code.

[1]  Henry G. Baker,et al.  CONS should not CONS its arguments, or, a lazy alloc is a smart alloc , 1992, SIGP.

[2]  Keshav Pingali,et al.  I-structures: data structures for parallel computing , 1986, Graph Reduction.

[3]  D. Douglas Smith Alexi — a case study in design issues for LISP capabilities in Ada , 1988, WADAS '88.

[4]  Alfred V. Aho,et al.  Compilers: Principles, Techniques, and Tools , 1986, Addison-Wesley series in computer science / World student series edition.

[5]  John Barnes,et al.  Programming in ADA , 1989 .

[6]  Juris Hartmanis,et al.  The Programming Language Ada Reference Manual American National Standards Institute, Inc. ANSI/MIL-STD-1815A-1983 , 1983, Lecture Notes in Computer Science.

[7]  S. L. Graham,et al.  List Processing in Real Time on a Serial Computer , 1978 .

[8]  Mitchell Wand A semantic prototyping system , 1984, SIGPLAN '84.

[9]  Robin Milner,et al.  The definition of standard ML, Version 3 , 1988 .

[10]  F. Hosch,et al.  Generic instantiations as closures , 1990, ALET.

[11]  Bjarne Stroustrup,et al.  C++ Programming Language , 1986, IEEE Softw..

[12]  Mike Yen Adapting an AI-based application from its LISP environment into a real-time embedded system , 1989 .

[13]  Guy L. Steele,et al.  A compiler for scheme (a study in compiler optimization) , 1978 .

[14]  S. Tucker Taft,et al.  Portable and efficient dynamic storage management in Ada , 1987, SIGAda '87.

[15]  Robin Milner,et al.  Definition of standard ML , 1990 .

[16]  John W. Backus,et al.  Can programming be liberated from the von Neumann style?: a functional style and its algebra of programs , 1978, CACM.

[17]  E. Perez,et al.  Simulating inheritance with Ada , 1988, ALET.

[18]  Henry Ledgard,et al.  Reference Manual for the ADA® Programming Language , 1983, Springer New York.

[19]  Michael J. Fischer,et al.  Lambda-calculus schemata , 1993, LISP Symb. Comput..

[20]  Ellis S. Cohen Updating elements of a collection in place , 1986, ALET.

[21]  Geoffrey O. Mendal Storage reclamation models for Ada programs , 1987, SIGAda '87.

[22]  Christopher J. Thompson,et al.  Using the re-export paradigm to build composable Ada software components , 1988, ALET.

[23]  John B. Goodenough On defining "=" in Ada , 1985, ALET.

[24]  Jr. Guy L. Steele,et al.  Common LISP: the language (2nd ed.) , 1990 .

[25]  Jr. Guy L. Steele,et al.  Rabbit: A Compiler for Scheme , 1978 .

[26]  Robin Milner,et al.  Standard ML: Report ECS-LFCS-86-2 , 1986 .

[27]  P. Collard Object-oriented programming techniques with Ada: an example , 1989, ALET.

[28]  Steven M. Rosen Controlling dynamic objects in large Ada systems , 1987, ALET.

[29]  Daniel P. Friedman,et al.  Embedding continuations in procedural objects , 1987, TOPL.

[30]  Robin Milner,et al.  The definition of standard ML Version 2: LFCS report ECS-LFCS-88-62 , 1988 .

[31]  P. M. Melliar-Smith,et al.  On the Suitability of ADA for Artificial Intelligence Applications , 1980 .

[32]  L. Clarke,et al.  Nesting in Ada programs is for the birds , 1980, SIGPLAN '80.

[33]  Henry G. Baker,et al.  Equal rights for functional objects or, the more things change, the more they are the same , 1993, OOPS.