Edit | History | Changes Home page | Site map | Recent changes | Help

How To Run Actress
Instrcutions for running the Actress system at DAIMI Documents

How to use the microSpecimen example in AG (at DAIMI)

To use AG (Actioneer generator) follow these steps

Now you are ready to try the example language specifications (or your own language specification). The example 'microSpecimen' can be found at '/users/jive/COMPGENS/ACTRESS/ag/examples/microSpecimen'. The directory contains three subdirectories: the parser, some programs and the semantic specification.

First you should make your own copy of the directory. The semantic specification consist of the following files:

microSpecimen.ast.sml : Abstract syntax
microSpecimen.dyn : Semantic functions and other definitions
microSpecimen.plus.sml : Additional definitions

To compile the the Actioneer for 'microSpecimen', shift to the subdirectory 'microSpecimen/semantics' then just type

% ag microSpecimen

(the directory already contains a compiled version in the files microSpecimen.dyn.sml and microSpecimen.sort.sml).

To translate a program written in microSpecimen to actions you should follow these steps (let us say that your program can be found in factorial.s):


The parser consists of two files 'microSpecimen.grm' and 'miroSpecimen.lex'. The parser also uses the abstract syntax so you should copy the file microSpecimen.ast.sml from the semantics directory. To print the result it uses the file displayAST.sml, so you should also change that file when you add something to the language. Compile the files following these steps (your working directory should be the parser directory):

% /users/cpn/SML/93/ml-lex/sml-lex microSpecimen.lex

% /users/cpn/SML/93/ml-yacc/sml-yacc microSpecimen.grm

% /users/cpn/SML/93/bin/NJsml.sol2 < parser.sml

Now the directory should contain the parser 'parse'.


Adding new features to the microSpecimen language can be done by changing the two files the parser is build from (and displayAST.sml) and changing the three files in which the actioneer generator is written. After changing the files you should follow the steps described in this file.

So if you want to add a repeat-until statement to the language you should edit these files:

parser/microSpecimen.lex
parser/microSpecimen.grm
parser/displayAST.sml

semantics/microSpecimen.ast.sml (remember to copy it into the parser directory)
semantics/microSpecimen.dyn

NOTICE: It's important that the lex-file doesn't contain any tabs so if your using emacs try marking everything and call the command 'M-x untabify' before saving the document.


Send comments/questions to jive@daimi.au.dk
DAIMI, April 2001
Latest update: 25th of April 2001
Version 1, Wed 25 Apr 2001 16:34:15 [jive]

Edit | History | Changes Home page | Site map | Recent changes | Help