Advertisement

Type-checking Revisited: Modular Error-handling

  • T. B. Dinesh
Conference paper
Part of the Workshops in Computing book series (WORKSHOPS COMP.)

Abstract

Static-semantics determines the validity of a program, while a type-checker provides more specific type error information. Type-checkers are specified based on the static semantics specification, for the purpose of identifying and presenting type errors in invalid programs.

We discuss a style of algebraically specifying the static semantics of a language which facilitates automatic generation of a type-checker and a language specific error reporter. Such a specification can also be extended in a modular manner to yield human-readable error messages.

Keywords

Type Error Error Message Source Program Static Semantic Partial Algebra 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. [1]
    J.A. Bergstra, J. Heering, and P. Klint, editors. Algebraic Specification. ACM Press Frontier Series. The ACM Press in co-operation with Addison-Wesley, 1989.MATHGoogle Scholar
  2. [2]
    A. van Deursen. An algebraic specification for the static semantics of Pascal. Report CS-R9129, Centrum voor Wiskunde en Informatica (CWI), Amsterdam, 1991. Extended abstract in: Conference Proceedings of Computing Science in the Netherlands CSN’91, pages 150–164. Available by ftp from http://ftp.cwi.nl:/pub/gipe as Deu9l.ps.Z.
  3. [3]
    A. van Deursen. Origin tracking in primitive recursive schemes. Technical report, Centrum voor Wiskunde en Informatica (CWI), 1993. To appear.Google Scholar
  4. [4]
    A. van Deursen and T. B. Dinesh. Origin-tracking for higher-order term rewriting systems. In An International Workshop on Higher-Order Algebra, Logic and Term Rewriting, 1993.Google Scholar
  5. [5]
    A. van Deursen, P. Klint, and F. Tip. Origin tracking. Journal of Symbolic Computation,15:523–545, 1993. Special Issue on Automatic Programming.Google Scholar
  6. [6]
    T. B. Dinesh. Interactive specification of static semantics from dynamic semantics. Technical report, Centrum voor Wiskunde en Informatica (CWI), 1994. To Appear.Google Scholar
  7. [7]
    T.B. Dinesh and F. Tip. Animators and error reporters for generated programming environments. Report CS-R9253, Centrum voor Wiskunde en Informatica (CWI), Amsterdam, 1992. Available by ftp from http://ftp.cwi.nl:/pub/gipe as DT92.ps.Z.
  8. [8]
    J. Goguen, C. Kirchner, H. Kirchner, A. Mégrelis, J. Meseguer, and T. Winkler. An introduction to OBJ3. In S. Kaplan and J.-P. Jouannaud, editors, Proceedings of the First International Workshop on Conditional Term Rewriting Systems, volume 308 of Lecture Notes in Computer Science, pages 258–263. Springer-Verlag, 1988.Google Scholar
  9. [9]
    J. A. Goguen. Abstract errors for abstract data types. In E.J. Neuhold, editor, Formal descriptions of programming concepts, pages 491–525. North-Holland, 1978.Google Scholar
  10. [10]
    J. Heering. Second-order algebraic specification of static semantics. Report CS-R9254, Centrum voor Wiskunde en Informatica (CWI), Amsterdam, 1992. Available by ftp from http://ftp.cwi.nl:/pub/gipe as Hee92b.ps.Z.
  11. [11]
    J. Heering, P.R.H. Hendriks, P. Klint, and J. Rekers. The syntax definition formalism SDF–reference manual. SIGPLAN Notices, 24 (11): 43–75, 1989.CrossRefGoogle Scholar
  12. [12]
    P. Klint. Error handling in algebraic specifications. Unpublished, April 1991.Google Scholar
  13. [13]
    P. Klint. A meta-environment for generating programming environments. ACM Transactions on Software Engineering Methodology, 2 (2): 176–201, 1993.CrossRefGoogle Scholar
  14. [14]
    P. Naur. Checking of operand types in algol compilers. BIT, 5: 151–163, 1965.CrossRefGoogle Scholar
  15. [15]
    R. Stallman. GNU Emacs Manual. Free Software Foundation, 675 Mass Ave., Cambridge, MA, USA, emacs version 18 edition, 1991. For unix users.Google Scholar

Copyright information

© British Computer Society 1994

Authors and Affiliations

  • T. B. Dinesh
    • 1
  1. 1.Department of Software TechnologyCWIAmsterdamThe Netherlands

Personalised recommendations