A lightweight tool is proposed to aid in the development of operational semantics. To use letos, an operational semantics must be expressed in its meta-language, which itself is a superset of Miranda. The letos compiler is smaller than comparable tools, yet letos is powerful enough to support publication quality rendering using LaTeX, fast enough to provide competitive execution and tracing using Miranda or Haskell, and versatile enough to support derivation tree browsing using Netscape. Letos has been applied to a Java Secure Processor, which is a version of the Java Virtual Machine intended to run on smart cards. Letos has also been used with subsets of various programming languages. Letos is unique in that it helps to check that a specification is operationally conservative.
The latest version of letos is described in detail in a paper, which is included with the program and some sample inputs in a gzipped tar file.
An older version of letos (called latos) is described in a technical report DSSE-TR-97-1, published by the Declarative Systems & Software Engineering Group Department of Electronics and Computer Science University of Southampton. technical report .
The paper referred to above provides a fairly abstract description of letos, the present web page describes some of the details that are necessary to actually use letos. The paper should be read first.
Only one of [-c|-m|-l|-p] must be selected.
-c-m-l-p[-d|-dd] or neither.
-d-dd[-t|-tt|-ttt] or neither.
-t-tt-tttletos.l letos.ymake.shsupport.msupport.texa4paper.texwhile.osmf.oscycle.osbpa.osbpa.oslambda.ossuccess.ostrans.osmake.sh calls lex, yacc and the gcc compiler
to create the letos binary. The script then runs letos, LaTeX and
Miranda on the *.os files. This has only been tried on Suns, under SunOS
and under Solaris.
The script generates various kinds of error messages, none of which are serious.
letos.l.
Everything else is fairly straightforward, although quite messy at times, in particular when generating appropriate where clauses to support premises for the rules.
The source dependency check does not know about the identifiers in the Miranda prelude, the support file and any other imported files. It errs on the side of caution.
The control over the layout in the generated LaTeX is primitive. Any
expression can be adorned with identity functions with conspicuous
names, such as \nltabtabid (see while.os),
but the non-expression parts of the input language cannot be treated in
this way. Currently it is possible to obtain a newline after the turn
style symbol and after the vertical bars separating alternatives in the
definition of an algebraic data type.
The translation of rules and axioms into Miranda is combined with the printing of the Miranda. This should have been separated so that it would be easier to generate code in another lazy functional language.
Letos has space leaks in the sense that parts of the parse tree that have become redundant during translations of rules and axioms are never reclaimed. Patterns are always reclaimed.
Letos restricts the number of type variables to four, but this can easily be increased.
An n-ary distfix construction should perhaps give rise to an n-ary LaTeX macro. Presently a separate macro is used for each of the constructors in the distfix-construction.
Letos relies on Miranda and LaTeX to detect most errors. The line numbers reported by these programs bear no relationship to the source line numbers in the letos document. Original letos input line numbers are embedded in the generated Miranda and LaTeX as comments.
Detailed traces and explicilty typed rules and axioms are incompatible because the addition of tracing changed the type of rules and axioms. The solution is to comment out any explict types on rules and axioms.