Tiger Var Escapes

Tiger in Stratego -- Compilation by Program Transformation
TigerVarEscapes is a component of the TigerCompiler in the TigerTrans package.

The component transforms programs in TigerAbstractSyntax format such that all variable declarations are annotated to indicate whether or not the variable escapes. The annotation takes the form of one of the constructors Reg or Stack applied to the identifier of the declaration.

Thus a local variable declaration for a variable "x" that escapes becomes:

   VarDec(Stack("x"), None, e)
while a formal parameter "y" that does not escape becomes
   FArg(Reg("y"), Tid("string"))

Remark: Once Stratego supports TermAnnotation this might be done more elegantly using an annotation.

Tiger-VarEscape.r

The implementation of escaping variables analysis that comes with the distribution of the TigerTrans package is conservative and indicates every variable as escaping.

Moved Permanently

The document has moved here.


Apache/2.2.8 (Unix) DAV/2 mod_ssl/2.2.8 OpenSSL?/0.9.8g mod_python/3.3.1 Python/2.4.4 PHP/5.2.6 SVN/1.4.6 Server at www.stratego-language.org Port 80


CompilerComponent