variables

File variables.str
Author unknown
Since unknown

Constant propogation for variables in PHP.




Statistics


General
Lines of code 330
Stratego
Module number 1 (100% documented)
Constructor number 0
Overlay number 0
Strategy number 30 (30% documented)
Rule number 9 (11% documented)
DynamicRule number 5 (0% documented)



Strategy summary


add-php-constant-rule n/a variables.str
add-php-constant-rule(Strategy put-valid) n/a variables.str
add-php-variable-identifier-rule n/a variables.str
add-php-variable-rule n/a variables.str
add-php-variable-rule(Strategy valid-put) n/a variables.str
array-access-on-array(Strategy main, Strategy get, Strategy set, Strategy valid-get) Special case for the GLOBALS array variables.str
array-access-on-other n/a variables.str
array-access-on-string n/a variables.str
generic-arrayaccess-value Generic array-acces for botht the special case for GLOBALS and the normal case variables.str
generic-arrayaccess-value(Strategy valid-get) n/a variables.str
get-php-value-identifier Makes a new identifier that is unique for each variable variables.str
get-php-value-identifier-pair n/a variables.str
get-php-value-identifier-pair(Strategy valid-get) n/a variables.str
is-globals-array n/a variables.str
php-constant-get-value n/a variables.str
php-constant-get-value(Strategy get-valid) n/a variables.str
php-constant-put-value(ATerm ident, ATerm val) n/a variables.str
php-get-raw-variable-name Extracts the name of a variable variables.str
php-val-id-add-rule(ATerm key, ATerm val) n/a variables.str
php-val-id-get-rule n/a variables.str
php-val-id-remove-rule(ATerm key) n/a variables.str
php-variable-value Get's the real value of an variable variables.str
php-variable-value(Strategy s) n/a variables.str
remove-php-variable-rule Removes the rule that maps a variable to a value variables.str
remove-php-variable-rule(Strategy valid-remove) n/a variables.str
variable-const-prop(Strategy main, Strategy set, Strategy get, Strategy get-valid) Variable-construct variables.str
variable-const-prop(Strategy main, Strategy set, Strategy get, Strategy get-valid) ConstantVariable-construct variables.str
variable-const-prop(Strategy main, Strategy set, Strategy get, Strategy get-valid) n/a variables.str
variable-const-prop(Strategy main, Strategy set, Strategy get, Strategy get-valid) n/a variables.str
variable-const-prop(Strategy main, Strategy set, Strategy get, Strategy get-valid, Strategy array-value, Strategy string-value, Strategy other-value) n/a variables.str

Rule summary


PHPSuperGlobalValue Rules that rewrite the value of a superglobal to an array-type variables.str
PHPSuperGlobalValue n/a variables.str
PHPSuperGlobalValue n/a variables.str
PHPSuperGlobalValue n/a variables.str
PHPSuperGlobalValue n/a variables.str
PHPSuperGlobalValue n/a variables.str
PHPSuperGlobalValue n/a variables.str
PHPSuperGlobalValue n/a variables.str
PHPSuperGlobalValue n/a variables.str



Strategy details


ATerm array-access-on-array(Strategy main, Strategy get, Strategy set, Strategy valid-get)
File variables.str
Author unknown
Since unknown
 

Special case for the GLOBALS array. This array holds all variables, sowe try to extract the value of that variable first. If this fails then wetry the integer value as a key.



 
ATerm generic-arrayaccess-value
File variables.str
Author unknown
Since unknown
 

Generic array-acces for botht the special case for GLOBALS and thenormal case.



 
ATerm get-php-value-identifier
File variables.str
Author unknown
Since unknown
 

Makes a new identifier that is unique for each variable.Reuses an old identifier if it exists, otherwise it uses thename of the variable, which should be unique in the program.


type name -> String

 
ATerm php-get-raw-variable-name
File variables.str
Author unknown
Since unknown
 

Extracts the name of a variable. This strategy handlesall the cases that can contain a variable name.


type Simple(_) OR Braced() -> String

 
ATerm php-variable-value
File variables.str
Author unknown
Since unknown
 

Get's the real value of an variable. This means applying the strategyEvalPHPVar twice. First getting the pointer to the value and then gettingthe real value.


type String -> PHPSimpleValue

 
ATerm remove-php-variable-rule
File variables.str
Author unknown
Since unknown
 

Removes the rule that maps a variable to a value.


type name -> name

 
ATerm variable-const-prop(Strategy main, Strategy set, Strategy get, Strategy get-valid)
File variables.str
Author unknown
Since unknown
 

Variable-construct



 
ATerm variable-const-prop(Strategy main, Strategy set, Strategy get, Strategy get-valid)
File variables.str
Author unknown
Since unknown
 

ConstantVariable-construct



 
ATerm variable-const-prop(Strategy main, Strategy set, Strategy get, Strategy get-valid)
File variables.str
Author unknown
Since unknown
 

No information available.


type IndirectReference(_) -> PHPSimpleValue

 

Rule details


ATerm PHPSuperGlobalValue
File variables.str
Author unknown
Since unknown
 

Rules that rewrite the value of a superglobal to an array-type.


type : String -> PHPArray(_)