Distributed Computing

, Volume 6, Issue 1, pp 39–63 | Cite as

Specifying modules to satisfy interfaces: A state transition system approach

  • Simon S. Lam
  • A. Udaya Shankar
Article

Summary

We defineinterface, module and the meaning ofM offers I, whereM denotes a module andI an interface. For a moduleM and disjoint interfacesU andL, the meaning ofM using L offers U is also defined. For a linear hierarchy of modules and interfaces,M1, I1, M2, I2, ...,Mn, In, we present the following composition theorem: IfM1 offersI1 and, fori=2, ...,n, Mi usingIi−1 offersIi, then the hierarchy of modules offersIn.

Our theory is applied to solve a problem posed by Leslie Lamport at the 1987 Lake Arrowhead Workshop. We first present a formal specification of a serializable database interface. We then provide specifications of two modules, one based upon two-phase locking and the other multi-version timestamps; the two-phase locking module uses an interface offered by a physical database. We prove that each module offers the serializable interface.

Key words

Interface Module Specification Verification Composition 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Abadi M, Lamport L: The existence of refinement mappings. Research Report 29, Digital Systems Research Center, Palo Alto, CA 94301, August 1988Google Scholar
  2. 2.
    Abadi M, Lamport L: Composing specifications. In: de Bakker, JW, de Roever W-P, Rozenberg G (eds) Stepwise refinement of distributed systems. LNCS vol 430. Springer, Berlin Heidelberg New York 1990Google Scholar
  3. 3.
    Bernstein PA, Hadzilacos V, Goodman N: Concurrency control and recovery in database systems. Addison-Wesley, Reading, Massachusetts 1987Google Scholar
  4. 4.
    Chandy KM, Misra J: A foundation of parallel program design. Addison-Wesley, Reading, Massachusetts 1988Google Scholar
  5. 5.
    Hoare CAR: Communicating sequential processes. Prentice-Hall, Englewood Cliffs, NJ 1985Google Scholar
  6. 6.
    Jonsson B: On decomposing and refining specifications of distributed systems. In: de Bakker JW, de Roever W-P, Rozenberg G (eds) Stepwise refinement of distributed systems. LNCS vol 430. Springer, Berlin Heidelberg New York 1990Google Scholar
  7. 7.
    Lam SS, Shankar AU: Protocol verification via projections. IEEE Trans. Software Eng. Vol. SE-10, 10: 325–342 (1984)Google Scholar
  8. 8.
    Lam SS, Shankar AU: Specifying an implementation to satisfy interface specifications: a state transition approach. 26th Lake Arrowhead Workshop on how will we specify concurrent systems in the year 2000. September 1987Google Scholar
  9. 9.
    Lam SS, Shankar AU: A relational notation for state transition systems. IEEE Trans. Software Eng 16 (7):755–775 (1990) (an abbreviated version entitled Refinement and Projection of Relational Specifications. In: de Bakker W, de Roever W-P, Rozenberg G (eds) Stepwise refinement of distributed systems) LNCS vol 430. Springer, Berlin Heidelberg New York 1990Google Scholar
  10. 10.
    Lam SS, Shankar AU: A theory of interfaces and modules, part I and part II. Technical reports, Department of Computer Sciences, University of Texas at Austin, 1992. An abbreviated version of part I entitledUnderstanding Interfaces. In: Proceedings IFIP Fourth International Conference on Formal Description Techniques (FORTE), Sydney, Australia, November 1991Google Scholar
  11. 11.
    Lamport L: An assertional correctness proof of a distributed algorithm. Sci Comput Program 2: 175–206 (1982)Google Scholar
  12. 12.
    Lamport L: What it means for a concurrent program to satisfy a specification: why no one has specified priority. Proceedings 12th ACM Symposium on Principles of Programming Languages. New Orleans 1985Google Scholar
  13. 13.
    Lamport L: A serializable database interface. 26th Lake Arrow-head Workshop on how will we specify concurrent systems in the year 2000. September 1987Google Scholar
  14. 14.
    Lamport L: A simple approach to specifying concurrent systems. Comm ACM 32 (1):32–45 (1989)Google Scholar
  15. 15.
    Lynch N, Tuttle M: Hierarchical correctness proofs for distributed algorithms. Proceedings of the ACM Symposium on Principles of Distributed Computing, Vancouver, B.C., August 1987Google Scholar
  16. 16.
    Lynch N, Merritt M, Weihl W, Fekete A: A theory of atomic transactions. Technical Report MIT/LCS/TM-362, Laboratory for Computer Science, M.I.T, June 1988Google Scholar
  17. 17.
    Manna Z, Pnueli A: Adequate proof principles for invariance and liveness properties of concurrent programs. Sci Comput Program 4:257–289 (1984)Google Scholar
  18. 18.
    Misra J, Chandy KM: Proofs of networks of processes. IEEE Trans Software Eng. Vol. SE-7, 4: 417–426 (1981)Google Scholar
  19. 19.
    Murphy SL, Shankar AU: Service specification and protocol construction for the transport layer, CS-TR-2033, UMIACS-TR-88-38, Computer Science Department University of Maryland, May 1988; an abbreviated version appears in Proc. ACM SIGCOMM '88 Symposium, August 1988Google Scholar
  20. 20.
    Owicki S, Gries D: An axiomatic proof technique for parallel programs I. Acta Inf 6: 319–340 (1976)Google Scholar
  21. 21.
    Owicki S, Lamport L: Proving liveness properties of concurrent systems. ACM TOPLAS 4(3):455–495 (1982)Google Scholar
  22. 22.
    Pnueli A: In transition from global to modular temporal reasoning about programs. NATO ASI Series. In: Logics and models of concurrent systems. Apt KR (ed) vol F13, Springer, Berlin Heidelberg New York 1984. pp 123–144Google Scholar
  23. 23.
    Shankar AU, Lam SS: An HDLC protocol specification and its verification using image protocols. ACM Trans Comput Syst. Vol. 1, 4: 331–368 (1983)Google Scholar
  24. 24.
    Shankar AU, Lam SS: A stepwise refinement heuristic for protocol construction. To appear in ACM TOPLAS; an abbreviated version entitled Construction of Network Protocols by Stepwise Refinement. In: de Bakker JW, de Roever W, Rozenberg G (eds): Stepwise refinement of distributed systems. LNCS vol 430. Springer, Berlin Heidelberg New York 1990Google Scholar

Copyright information

© Springer-Verlag 1992

Authors and Affiliations

  • Simon S. Lam
    • 1
    • 2
  • A. Udaya Shankar
    • 1
    • 2
  1. 1.Department of Computer SciencesThe University of Texas at AustinAustinUSA
  2. 2.Department of Computer Science and Institute for Advanced Computer StudiesUniversity of MarylandCollege ParkUSA

Personalised recommendations