Skip to main content
Traditional formal methods of syntax description for programming languages (e.g. context free grammars) are not always convenient for practical applications. In some cases the language has quite weak syntactic structure and it is better... more
Traditional formal methods of syntax description for programming languages (e.g. context free grammars) are not always convenient for practical applications. In some cases the language has quite weak syntactic structure and it is better to describe the correct programs using semantics of operations instead. There exists a class of widespread languages in practice that use stack machines for interpretation of programs, the so called stack based languages (Java virtual machine language [2], Forth, Postscript, etc.). Semantics of stack operations determines the language of correct programs in sense of parameter passing through the stack (see [4], [5], [6], [7] and [8] for the details). This is one alternative method to define the syntax of a stack based language. The main question is whether there exists a better way of defining the same language. In this paper we investigate systems of syntactic equations (general rewriting rules) on sequences of stack operations. Stack operations hav...
Programming languages are often characterised proceeding from the paradigm they are intended to support -- imperative, functional, logic, object-oriented, parallel, real-time, distributed, event-driven etc. Independently from the paradigm... more
Programming languages are often characterised proceeding from the paradigm they are intended to support -- imperative, functional, logic, object-oriented, parallel, real-time, distributed, event-driven etc. Independently from the paradigm there exist some other important aspects of the language design and implementation like user interface of the system, choice of integrated tools, support to incremental development, whether the system is interpretive or compiles into some external representation (machine code, assembly language, higher level language), support to standalone application development (incl. GUI development), portability, extensibility, compatibility with different standards and platforms etc. These additional qualities may appear in concrete implementation but may also be a part of the language itself. This paper focuses on language extensibility that is the notion with wide range of interpretations. Authors opinions are based on experience of using and teaching the &...
Abstract. Many low-level runtime engines and virtual machines are stack based- instructions take parameters from the stack and leave their results on the stack. Stack language is a common name for several languages used to program stack... more
Abstract. Many low-level runtime engines and virtual machines are stack based- instructions take parameters from the stack and leave their results on the stack. Stack language is a common name for several languages used to program stack based (virtual) machines- like CLR, JVM, Forth, Postscript, etc. We chose the Forth language as an example to represent the class of stack languages, partially because this language is typeless, partially because there exists a big amount of industrial legacy Forth code that needs to be validated. Usually applications that take advantage of stack machines are minimalistic and designed to run on restricted environments like electronic devices, smartcards, embedded systems, etc. Sometimes these components are used to build safety critical systems where software errors are inadmissible. Type checking allows to locate possible errors of stack usage that most often occur in stack language programs. Limited resources give preference to a static solution- r...
There exists a class of widespread languages that use stack machines for interpretation of programs, the so called stack based languages (Java virtual machine language, Forth, Postscript, several intermediate program representation... more
There exists a class of widespread languages that use stack machines for interpretation of programs, the so called stack based languages (Java virtual machine language, Forth, Postscript, several intermediate program representation languages and low level languages in some embedded systems). Semantics of stack operations determines the language of correct programs in sense of parameter passing through the stack. This is one alternative method to de ne the syntax of a stack based language, the so called stack eect calculus. The other method is based on systems of syntactic equations (general rewriting rules for terminal sequences) on sequences of stack operations. Both methods seem to have better expression power for the stack based languages than traditional context free grammars.
Many low-level runtime engines and virtual machines are stack based instructions take parameters from the stack and leave their results on the stack. Stack language is a common name for several languages used to program stack based... more
Many low-level runtime engines and virtual machines are stack based instructions take parameters from the stack and leave their results on the stack. Stack language is a common name for several languages used to program stack based (virtual) machines like CLR, JVM, Forth, Postscript, etc. We chose the Forth language as an example to represent the class of stack languages, partially because this language is typeless, partially because there exists a big amount of industrial legacy Forth code that needs to be validated. Usually applications that take advantage of stack machines are minimalistic and designed to run on restricted environments like electronic devices, smartcards, embedded systems, etc. Sometimes these components are used to build safety critical systems where software errors are inadmissible. Type checking allows to locate possible errors of stack usage that most often occur in stack language programs. Limited resources give preference to a static solution run-time type ...
Traditional formal methods of syntax description for programming languages (e.g. context free grammars) are not always convenient for practical applications. In some cases the language has quite weak syntactic structure and it is better... more
Traditional formal methods of syntax description for programming languages (e.g. context free grammars) are not always convenient for practical applications. In some cases the language has quite weak syntactic structure and it is better to describe the correct programs using semantics of operations instead. There exists a class of widespread languages in practice that use stack machines for interpretation of programs , the so called stack based languages (Java virtual machine language 2], Forth, Postscript, etc.). Semantics of stack operations determines the language of correct programs in sense of parameter passing through the stack (see 4], 5], 6] and 7] for the details). This is one alternative method to deene the syntax of a stack based language. The main question is whether there exists a better way of deening the same language. In this paper we investigate systems of syntactic equations (general rewriting rules) on sequences of stack operations. Stack operations have certain eeect on the stack that can be described using input and output parameters. Stack eeect calculus allows to deene the language of correct sequences of stack operations (programs). It is important to know under which conditions the system of syntactic equations and the set of stack eeects deene the same language, because both methods seem to work better for stack based languages than context free grammars.
Research Interests:
Many low-level runtime engines and virtual machines are stack based-instructions take parameters from the stack and leave their results on the stack. Stack language is a common name for several languages used to program stack based... more
Many low-level runtime engines and virtual machines are stack based-instructions take parameters from the stack and leave their results on the stack. Stack language is a common name for several languages used to program stack based (virtual) machines-like CLR, JVM, Forth, Postscript, etc. We chose the Forth language as an example to represent the class of stack languages, partially because this language is typeless, partially because there exists a big amount of industrial legacy Forth code that needs to be validated. Usually applications that take advantage of stack machines are mini-malistic and designed to run on restricted environments like electronic devices, smartcards, embedded systems, etc. Sometimes these components are used to build safety critical systems where software errors are inadmissible. Type checking allows to locate possible errors of stack usage that most often occur in stack language programs. Limited resources give preference to a static solution-run-time type information is expensive to manage and quite useless in turnkey applications. Static type checking is based on a type system that is introduced here for originally typeless stack languages. This external type system is flexible enough to perform several tasks. Static program analysis can be used both for finding errors and performing useful transformations on programs (optimization, parallelization, etc.). In this paper a type system to perform the so called must-analysis is described that allows to locate the stack language code where the strong stack discipline is violated. Experimental implementation of the analysis framework is written in Java.
Research Interests:
Programming languages are often characterised proceeding from the paradigm they are intended to support { imperative, functional, logic, object-oriented, parallel , real-time, distributed, event-driven etc. Independently from the paradigm... more
Programming languages are often characterised proceeding from the paradigm they are intended to support { imperative, functional, logic, object-oriented, parallel , real-time, distributed, event-driven etc. Independently from the paradigm there exist some other important aspects of the language design and implementation like user interface of the system, choice of integrated tools, support to incremen-tal development, whether the system is interpretive or compiles into some external representation (machine code, assembly language, higher level language), support to standalone application development (incl. GUI development), portability, exten-sibility, compatibility with diierent standards and platforms etc. These additional qualities may appear in concrete implementation but may also be a part of the language itself. This paper focuses on language extensibility that is the notion with wide range of interpretations. Authors opinions are based on experience of using and teaching the "minor languages" Forth 2] and Tcl/Tk 6] as well as "traditional" ones 4]. The rst part gives a short overview about the evolution of diierent types of extensibility. The second part is devoted to the problems of implementation of extensible languages. The third part contains some remarks on programming in extensible languages. As a conclusion some similarities between extensible languages and the language of mathematics are outlined: Freedom to create abstractions and notations to express these abstractions. The language itself is not "high level" or "low level" { it is always on the level of the Creator.
Research Interests:
In [2] author introduces theoretical background for static analysis of Forth programs (definitions, basic operations, typing rules, etc.). This paper is direct continuation of the topic and describes implementation of basic blocks for... more
In [2] author introduces theoretical background for static analysis of Forth programs (definitions, basic operations, typing rules, etc.). This paper is direct continuation of the topic and describes implementation of basic blocks for writing software tools to support type checking of Forth programs. On small examples we try to explain problems and possible solutions. Author hopes that these ideas help to develop some useful tools. Prototype is written in Java that is quite universal and widespread object oriented platform for software development.
Research Interests: