We consider a language of operations which pass parameters by means of a stack. An algebra over the set of type signatures is introduced, which allows the type signature of a program to be obtained from the type signatures of its constituent operations.
Although the theories apply in principle to any stack based language, they have been evolved with particular regard to the proposed ANSI Standard Forth language, which is currently implemented in a type free manner. We hope this work will stimulate an interest in Forth amongst those applying algebraic techniques in software engineering, and we hope to lay the theoretical foundations for implementing practical type checkers to support Forth.
KeywordsFormal aspects Stack based languages Semantic model language Algebras Type inference Forth
Unable to display preview. Download preview PDF.
- [ANS91]ANS ACS X3/X3J14 Programming Languages: Forth, Draft Standard, 1st Revision, American National Standards Institute, 1991.Google Scholar
- [Bro87]Brodie, L.:Starting Forth, 2nd Edition, Prentice Hall International, 1987.Google Scholar
- [NiP70]Nivat, M. and Perrot, J. F.: Une generalisation du monoid bicyclique,C.R. Acad Sci., Paris, 271A, 1970, pp. 824–827.Google Scholar
- [Pöi90a]Pöial, J.: The Algebraic Specification of Stack Effects for Forth Programs,Proc. Euro-Forml90 Conf., Southampton, UK, October, 1990.Google Scholar
- [Pöi90b]Pöial, J.: Letter to the authors, 1990.Google Scholar
- [Pöi91]Pöial, J.: Multiple Stack Effects of Forth Programs,Proc. EuroForml91 Conf., Marianbad, Czechoslovakia, October, 1991.Google Scholar
- [Wic88]Wickes, W. C.: RPL: A Mathematical Control Language,Proc. 1988 Rochester Forth Conf., Rochester, NY, USA, 1988.Google Scholar