This Article 
 Bibliographic References 
 Add to: 
Specifying Ada Server Tasks with Executable Formal Grammars
July 1990 (vol. 16 no. 7)
pp. 741-754

The author shows how a class of concurrent programming problems can be specified with formal grammars. These grammars, more powerful than path expressions, translate readily into Ada server tasks using the rendezvous and select-statement, though they may also be applied to other synchronization constructs. The grammars may be used to clarify informal specifications, to compare different specifications, and to analyze the behavior of implementations of such specifications. They may also be easily converted into Prolog programs that can be executed to generate the strings of events accepted by a grammar or by the Ada task being modeled. The automated translation from Ada to such grammars, and from grammatical specifications to Ada is discussed. The former facilitates the analysis of Ada programs; the latter yields Ada code of high quality.

[1] S. Andler, "Predicate path expressions," inProc. 6th ACM Symp. Principles of Programming Languages, 1979, pp. 226-236.
[2] P. Brinch Hansen, "A comparison of two synchronizing concepts,"Acta Inform., vol. 1, pp. 190-199, 1972.
[3] P. Brinch Hansen, "A reply to comments on "A comparison of two synchronizing concepts,"Acta Inform., vol. 2, pp. 189-190, 1973.
[4] P. B. Hansen, "Distributed processes: A concurrent programming concept,"Commun. ACM, vol. 21, no. 11, pp. 934-941, Nov. 1987.
[5] A. Burns,Concurrent Programming in Ada. Cambridge, UK: Cambridge University Press, 1985.
[6] R. H. Campbell and A. N. Habermann. "The specification of process synchronization by path expressions." inLecture Notes in Computer Science vol. 16, Operating Systems, Apr. 1974, pp. 89-102.
[7] P. J. Courtois, F. Heymans, and D. L. Parnas, "Concurrent control with readers and writers,"Commun. ACM, vol. 14, no. 2, pp. 667- 668, Oct. 1971.
[8] P. J. Courtois, F. Heymans, and D. L. Parnas, "Comments on 'A comparison of two synchronizing concepts',"Acta Inform., vol. 1, pp. 375-376, 1972.
[9] P. J. Denning, J. B. Dennis, and J. E. Qualitz,Machines, Languages and Computation. Englewood Cliffs, NJ: Prentice-Hall, 1978.
[10] R. D. Dixon, "Control paths, process synchronization, and reader-writer problems," Dep. Comput. Sci., Wright State Univ., Dayton, OH, Tech. Rep. WSUCS-6, 1976.
[11] L. Flon and A. N. Habermann, "Towards the construction of verifiable software systems,"SIGPLAN Notices (Proc. ACM Conf. Data), vol. 8, pp. 141-148, Mar. 1976.
[12] N. Gehani,Ada Concurrent Programming. Englewood Cliffs, NJ: Prentice-Hall, 1984, p. 65.
[13] S. J. Goldsack and T. Moreton, "Ada package specifications: Path expressions and monitors,"Proc. IEE, vol. 129, no. 2, pp. 49-54.
[14] A. N. Habermann. "Path expressions," Dep. Comput. Sci., Carnegie-Mellon Univ., Pittsburgh, PA, 1975.
[15] C. A. R. Hoare, "Monitors: an operating system structuring concept,"Commun. ACM, vol. 17, no. 10, pp. 549-557, Oct. 1974.
[16] C.A.R. Hoare,Communicating Sequential Processes, Prentice Hall, Englewood, N.J., 1985.
[17] J.E. Hopcroft and J.D. Ullman,Introduction to Automata Theory, Languages, and Computation, Addison-Wesley, Reading, Mass., 1979.
[18] J. D. Ichbiahet al., "Rationale for the design of the Ada programming language,"SIGPLAN Notices, vol. 14, (Tech. Rep. 6), pt. B, June 1979.
[19] R. B. Kieburtz and A. Silberschatz, "Acces-right expressions,"ACM Trans. Prog. Lang. and Syst., vol. 5, Jan. 1983.
[20] D. E. Knuth, "Semantics of context-free languages"Math. Syst. Theory, vol. 2, pp. 127-145, 1968.
[21] P. E. Lauer and R. H. Campbell, "Formal semantics of a class of high level primitives for coordinating concurrent processes,"Acta Inform., vol. 5, pp. 297-332, 1975.
[22] P. E. Lauer, P. Torrigiani, and M. W. Shields, "COSY--A system specification language based on paths and processes,"Acta Inform., vol. 9, pp. 109-158, 1979.
[23] L. Y. Liu and P. Weiner, "An infinite hierarehy of intersections of context-free languages,"Math. Syst. Theory, vol. 7, no. 2, pp. 185- 192, 1973.
[24] B. L. Lomet, "A formalization of transition diagram systems,"J. ACM, vol. 20, pp. 235-257, Apr. 1973.
[25] A. Schiper and R. Simon, "Traps using the COUNT attribute in the readers-writers problem,"Ada Lett., vol. 9, no. 5, pp. 123-138, July/ Aug. 1989.
[26] M. W. Shields, "Adequate path expressions" inSemantics of Concurrent Computations (Lecture Notes in Computer Science, vol. 70). New York: Springer, 1980, pp. 249-265.
[27] J. Van Tassel and D. Hemmendinger, "Specifying and automatically generating Ada tasks in Prolog," inProc. 18th Annu. ACM Computer Science Conf., 1990, pp. 121-128.

Index Terms:
Ada server tasks specification; executable formal grammars; concurrent programming problems; synchronization constructs; Prolog programs; Ada; formal specification; grammars; parallel programming.
D. Hemmendinger, "Specifying Ada Server Tasks with Executable Formal Grammars," IEEE Transactions on Software Engineering, vol. 16, no. 7, pp. 741-754, July 1990, doi:10.1109/32.56100
Usage of this product signifies your acceptance of the Terms of Use.