The bound-unbound-vars component of the Stratego optimizer annotates variables with one of the annotations "bound", "unbound", or "(un)bound", with the following meanings:

  • ="bound=" : the variable has been bound in a previous match
  • ="unbound=" : the variable has been declared in a scope, but is not yet bound in a match
  • "(un)bound" : the variable may or may not be bound

Variables are bound in matches, used in builds, and refreshed in scopes. Choice operators may lead to a variable being bound in one path, but not in the other. Such variables are annotated with "(un)bound".

This analysis is used in the StrategoFrontEnd for use def analysis?, in the optimizer for dead variable elimination, and in the back-end to avoid run time checks on variables.

-- EelcoVisser - 17 Aug 2003

Revision: r1.1 - 17 Aug 2003 - 13:21 - EelcoVisser
Stratego > StrategoCompiler > StrategoOptimizer > BoundUnboundVariableAnalysis
Copyright © 1999-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback