Skip to main content
Log in

The calculus of context relations

  • Published:
Acta Informatica Aims and scope Submit manuscript

Abstract

We present the theory of context relations. Context relations are a method for incremental semantic analysis in language-specific editors, which is able to handle incomplete program fragments. The algorithm is generated from the definition of a language's static semantics and is based on inference rules and order-sorted unification. The paper presents the underlying mathematical theory, optimal incremental analysis algorithms, handling of user-defined polymorphism and overloading, and implementation issues. It is intended as the concluding report on a by now mature concept, which has successfully been used to generate efficient incremental type inferencers for languages like ADA and Fortran 8x.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Institutional subscriptions

Similar content being viewed by others

References

  1. Reference manual for the ADA programming language. Department of Defense, ANSI-MIL-STD 1815A, 1983

  2. Aho, A.V., Sethi, R., Ullman, J.D.: Compilers: principles, techniques and tools. Reading, MA: Addison-Wesley 1986

    Google Scholar 

  3. Ait-Kaci, H., Nasr, R.: Integrating logic and functional programming. Lisp Sym. Comput.2(1), 51–90 (1989)

    Google Scholar 

  4. Bahlke, R., Snelting, G.: The PSG system: From formal language definitions to interactive programming environments. ACM Trans. Program. Lang. Syst.8(4), 547–576 (1986)

    Google Scholar 

  5. Borras, P., Clément, D., Despeyroux, Th., Incerpi, J., Kahn, G., Lang, B., Pascual, V.: CENTAUR: The system. In: Proceedings of the ACM SIGSOFT/SIGPLAN Software Engineering Symposium on Practical Software Development Environents, vol. 13(5) of SIGSOFT Software Engineering Notes, pp. 14–24, Boston, November 1988.

  6. Boyer, R.S., Moore, J.S.: The sharing of structure in theorem-proving programs. Math. Intell.7, 101–116 (1972)

    Google Scholar 

  7. Clément, D., Despeyroux, J., Despeyroux, T., Kahn, G.: A simple applicative language: Mini-ML. In: Proceedings of the 1986 ACM conference on LISP and functional programming, pp. 13–27 (1986)

  8. Cohen, J.: Constraint logic programming languages. Commun. ACM33(7), 52–68 (1990)

    Google Scholar 

  9. Damas, L., Milner, R.: Principal type schemes for functional programs. In: Conference record of the 9th annual ACM symposium on principles of programming languages, pp. 207–212, January 1982

  10. Despereux, T.: Executable specification of static semantics. In: Kahn, G. (ed) Semantics of data types (Lect. Notes Comput. Sci., vol. 173, pp. 215–233). Berlin Heidelberg New York: Springer 1984

    Google Scholar 

  11. Fages, F.: Associative-commutative unification. In: Shostak, R.E. (ed.) 7th International conference on automated deduction (Lect. Notes Comput. Sci., vol. 170, pp. 194–208). Berlin Heidelberg New York: Springer 1984

    Google Scholar 

  12. Grosch, F.J., Snelting, G.: Interence-based overloading resolution for ADA. In: Deransart, P. (ed.) 2nd Conf. on programming language implementation and logic programming (Lect. Notes Comput. Sci., vol. 456, pp. 30–44). Berlin Heidelberg New York: Springer 1990

    Google Scholar 

  13. Henhapl, W.: Context conditions in program fragments. Technical Report PU-R1/80, TH Darmstadt, Praktische Informatik, D-6100 Darmstadt, 1980

  14. Hoover, R.: Incremental graph evaluation. PhD thesis, Cornell University, Computer Science Department 1987

  15. Huet, G.: A unification algorithm for typed λ-calculus. Theor. Comput. Sci.1, 27–57 (1975)

    Google Scholar 

  16. Hussmann, H.: Unification in conditional-equational theories. In: Caviness, B.F. (ed.) Proc. EUROCAL 1985 (Lect. Notes Comput. Sci., vol. 204, pp. 543–553). Berlin Heidelberg New York: Springer 1985

    Google Scholar 

  17. Jaffar, J., Lassez, J-L.: Constraint logic programming. In: Conferene record of the 14th annual ACM symposium on principles of programming languages, pp. 111–119. Munich, West Germany, January 1987

  18. Johnson, G. Fisher, Ch.: Non-syntactic attribute flow in language-based editors. In: Conference record of the 9th annual ACM symposium on principles of programming languages, pp. 185–195, January 1982

  19. Jones, C.: Systematic software development using VDM. Englewood Cliffs, NJ: Prentice-Hall 1986

    Google Scholar 

  20. Kaes, S.: Parametic overloading in polymorphic programming languages. In: Ganzinger, H. (ed.) ESOP'88, 2nd European symposium on programming (Lect. Notes Comput. Sci., vol. 300, pp. 131–144). Berlin Heidelberg New York: Springer 1988

    Google Scholar 

  21. Kahn, G.: Natural semantics. In: Brandenburg, F. (ed) STACS 1987 (Lect. Notes Comput. Sci., vol. 247). Berlin Heidelberg New York: Springer 1987

    Google Scholar 

  22. Kastens, U.: Ordered attribute grammars. Acta Inf.13(3), 229–256 (1980)

    Google Scholar 

  23. Kay, M.: Unification grammar. Technical report, Xerox Palo Alto Research Center 1983

  24. Maier, D.: The theory of relational databases. Oxford New York: Computer Science Press 1983

    Google Scholar 

  25. Martin, U., Nipkow, T.: Boolean unification-the story so far. J. Symb. Comput.7, 275–293 (1989)

    Google Scholar 

  26. Meseguer, J., Goguen, J., Smolka, G.: Order-sorted unification. J. Symb. Comput. (to appear)

  27. Milner, R.: A theory of type polymorphism in programming. J. Comput. Syst. Sci.17(3), 348–375 (1978)

    Google Scholar 

  28. Nikhil, R.: Practical polymorphism. In: Jouannaud, J.P. (ed.) Functional programming languages and computer architecture (Lect. Notes Comput. Sci., vol 201, pp. 319–333). Berlin Heidelberg New York: Springer 1985

    Google Scholar 

  29. Reps, T.: Optimal-time incremental semantic analysis for syntax-directed editors. In: Conference record of the 9th annual ACM symposium on principles of programming languages, pp. 169–176, 1982

  30. Schek, H., Scholl, M.: The relational model with relation-valued attributes. Inf. Syst.11(2), 137–147 (1986)

    Google Scholar 

  31. Schmidt-Schauß, M.: Computational aspects of an order-sorted logic with term declarations (Lect. Notes Comput. Sci., vol. 395). Berlin Heidelberg New York: Springer 1989

    Google Scholar 

  32. Schroeder, U., Schütz, D.: Incremental name resolution for programming environments. Master's thesis, TH Darmstadt, Praktische Informatik, December 1987 (in German)

  33. Shieber, S.: An introduction to unification-based approaches to grammar. Chicago, IL: University of Chicago Press 1986

    Google Scholar 

  34. Smolka, G.: A feature logic with subsorts. Technical Report LILOG report 33. IBM Stuttgart, 1988

  35. Snelting, G.: Inkrementelle semantische Analyse in unvollständigen Programmfragmenten. PhD Thesis, TH Darmstadt, Facbereich Informatik, March 1986 (in German)

  36. Snelting, G., Bahlke, R.: PSG: A theory-based environment generator. In: Proc. International Conference on System Development Environments & Factories, pp. 131–140. London: Pitnam 1990

    Google Scholar 

  37. Toyn, I., Dix, A., Runciman, C.: Performance polymorphism. In: Kahn, G. (ed) Functional programming languages and computer architecture (Lect. Notes Comput. Sci., vol. 274, pp. 325–346). Berlin Heidelberg New York: Springer 1987

    Google Scholar 

  38. Wadler, Ph., Blott, S.: How to make ad-hoc polymorphism less ad-hoc. In: Conference Record of the 16th annual ACM symposium on principles of programming languages, pp. 60–76, January 1989

  39. Walther, Ch.: Many-sorted unification. J. ACM35(1), 1–17 (1988)

    Google Scholar 

  40. Yeh, D.: On incremental evaluation of ordered attribute grammars. BIT23, 308–320 (1983)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

About this article

Cite this article

Snelting, G. The calculus of context relations. Acta Informatica 28, 411–445 (1991). https://doi.org/10.1007/BF01178581

Download citation

  • Received:

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF01178581

Keywords

Navigation