skip to main content
10.1145/512644.512665acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
Article
Free Access

Unification in many-sorted algebras as a device for incremental semantic analysis

Published:01 January 1986Publication History

ABSTRACT

Language-specific editors for typed programming languages must contain a subsystem for semantic analysis in order to guarantee correctness of programs with respect to the context conditions of the language. As programs are usually incomplete during development, the semantic analysis must be able to cope with missing context information, e. g. incomplete variable declarations or calls to procedures imported from still missing modules. In this paper we present an algorithm for incremental semantic analysis, which guarantees immediate detection of semantic errors even in arbitrary incomplete program fragments. The algorithm is generated from the language's context conditions, which are described by inference rules. During editing, these rules are evaluated using a unification algorithm for many-sorted algebras with semi-lattice ordered subsorts and non-empty equational theories. The method has been implemented as part of the PSG system, which generates interactive programming environments from formal language definitions, and has been successfully used to generate an incremental semantic analysis for PASCAL and MODULA-2.

References

  1. /AhoB73/ Aho, A. V., Beeri, C., Ullman, J. D: The theory of joins in relational databases. ACM TODS 4 (1979), 3, pp. 297--314 Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. /Aust83/ Austermühl, B.: Ein relationaler Ansatz zur Beschreibung der statischen Semantik von Programmiersprachen. PhD thesis, Technische Hochschule Darmstadt 1983Google ScholarGoogle Scholar
  3. /BaSn85/ Bahlke, R. Snelting, G.: The PSG - Programming System Generator. Proc. ACM SIGPLAN 85, Language issues in programming environments. SIGPLAN notices 20 (1985), 7, pp. 28--33 Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. /JoFi82/ Johnson, G. F. Fisher, C. N.: Non-syntactic attribute flow in language-based editors. Proc. 9th ACM symposium on principles of programming languages, 1982, pp. 196--206 Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. /Hab82/ Habermann, N. et al: The second compendium of Gandalf documentation. Dept. of Computer science, Carnegie Mellon University 1982Google ScholarGoogle Scholar
  6. /HeSn84/ Henhapl, W., Snelting, G.: Context relations: a concept for incremental context analysis in program fragments. Proc. GI Fachtagung Programmiersprachen und Programmentwicklung, Springer Verlag 1984, Informatik Fachberichte 77, pp. 128--143 Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. /HuSc83/ Hunkel, M., Schmitt, H.: Ein System zur Bezeichneridentifikation und dessen Integration in ein strukturorientiertes Ediersystem. Diploma thesis, Technische Hochschule Darmstadt 1983.Google ScholarGoogle Scholar
  8. /Miln78/ Milner, R.: A theory of type polymorphism in programming. J. Computer and system sciences 17 (1978), pp. 348--375Google ScholarGoogle Scholar
  9. /PSG85/ Bahlke, R., Hunkel,M., Klung, M., Snelting, G.: Language definers guide to PSG. Report PU2R3/85, Technische Hochschule Darmstadt, 1985.Google ScholarGoogle Scholar
  10. /Plo72/ Plotkin, G.: Building in equational theories. Machine intelligence 7 (1972), pp. 73--90Google ScholarGoogle Scholar
  11. /Reps83/ Reps. T., Teitelbaum, T., Demers, A.: Incremental context-dependent analysis for language-based editors. ACM TOPLAS 5 (1983), 3, pp. 449--477 Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. /Robi65/ Robinson, J. A.: A machine oriented logic based on the resolution principle. JACM 12 (1965), 1, pp. 23--41. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. /Siek84/ Siekmann, J.: Universal unification. Proc. 7th international conference on automated deduction, Springer Verlag, LNCS 170, pp. 1--42 Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. /Snel85/ Snelting, G.: Inkrementelle semantische Analyse in unvollstandigen Programmfragmenten mit Kontextrelationen. PhD thesis. Technische Hochschule Darmstadt 1985.Google ScholarGoogle Scholar
  1. Unification in many-sorted algebras as a device for incremental semantic analysis

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • Published in

      cover image ACM Conferences
      POPL '86: Proceedings of the 13th ACM SIGACT-SIGPLAN symposium on Principles of programming languages
      January 1986
      326 pages
      ISBN:9781450373470
      DOI:10.1145/512644

      Copyright © 1986 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 1 January 1986

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • Article

      Acceptance Rates

      Overall Acceptance Rate824of4,130submissions,20%

      Upcoming Conference

      POPL '25

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader