|How To Run Actress||ascg-01|
|Instrcutions for running the Actress system at DAIMI||Documents|
To use AG (Actioneer generator) follow these steps
First you should make your own copy of the directory. The semantic specification consist of the following files:
microSpecimen.ast.sml : Abstract syntaxTo compile the the Actioneer for 'microSpecimen', shift to the subdirectory 'microSpecimen/semantics' then just type
microSpecimen.dyn : Semantic functions and other definitions
microSpecimen.plus.sml : Additional definitions
% 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):
% ../parser/parse factorial.s
this generates the file factorial.s.sml. (more about the parser later)
- use "microSpecimen.dyn.sml";
and load the abstract syntax tree for factorial.s
- use "../programs/factorial.s.sml";
finally generate the action
- write (run factorial) "factorial";
Exit from SML by control-D.
The semantics directory should now contain a file named "factorial.an" containing the action.
% ani factorial
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.lexNow the directory should contain the parser 'parse'.
% /users/cpn/SML/93/ml-yacc/sml-yacc microSpecimen.grm
% /users/cpn/SML/93/bin/NJsml.sol2 < parser.sml
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.lexNOTICE: 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.
semantics/microSpecimen.ast.sml (remember to copy it into the parser directory)