types

File types.str
Author Eric Bouwers
Since unknown

Holds the decleration of the constructors and several usefulstrategies for PHP-types. This includes the getting of a simple value,the getting of a value of a specific type and the retrieving of a raw value.It also includes strategies for storing and retrieving array's.




Statistics


General
Lines of code 479
Stratego
Module number 1 (100% documented)
Constructor number 9 (0% documented)
Overlay number 0
Strategy number 36 (47% documented)
Rule number 20 (50% documented)
DynamicRule number 5 (0% documented)



Constructor summary


PHPArray(ATerm ) n/a types.str
PHPBoolean(ATerm ) n/a types.str
PHPBoolean(ATerm ) n/a types.str
PHPFloat(ATerm ) n/a types.str
PHPInteger(ATerm ) n/a types.str
PHPNull(ATerm ) n/a types.str
PHPObject(ATerm , ATerm ) n/a types.str
PHPSimpleValue(ATerm ) n/a types.str
PHPString(ATerm ) n/a types.str

Strategy summary


add-array-entry(ATerm key, ATerm value) Representation of an array types.str
add-array-entry(Strategy valid-put, ATerm key, ATerm value) n/a types.str
add-array-entry(ATerm value) Adds an entry to the ArrayId with only a value types.str
add-array-entry(Strategy valid-put, ATerm value) n/a types.str
add-array-entry-reference(ATerm key, ATerm value-identifier) n/a types.str
add-array-entry-reference(ATerm value-identifier) n/a types.str
copy-php-array Returns a cope of the array types.str
copy-php-array(Strategy valid-get, Strategy valid-put) n/a types.str
copy-php-array(Strategy valid-get, Strategy valid-put, ATerm newarray) n/a types.str
copy-php-array-value(Strategy valid-get, Strategy valid-put, ATerm from, ATerm to) Copies one entry from an array to an other types.str
get-array-entry(ATerm key) Retrieve an entry from the array types.str
get-array-entry(Strategy valid-get, ATerm key) n/a types.str
get-array-keys Returns a list with all keys of the array types.str
get-array-keys(Strategy valid-get) n/a types.str
get-array-values Returns a list with all values of the array types.str
get-array-values(Strategy valid-get) n/a types.str
get-new-php-array-id Generates an unique PHPArray(name) id that can be used to keep track of an array types.str
get-next-array-indice Get the array indice that should be given to a new entry without a key types.str
get-simple-raw-value(Strategy s) Get the simple value of a term types.str
get-simple-value(Strategy s) Get the simple value of a term types.str
has-php-array-value n/a types.str
has-php-boolean-value n/a types.str
has-php-float-value n/a types.str
has-php-integer-value n/a types.str
has-php-null-value n/a types.str
has-php-string-value Answers the question: Does this term has a value of this type? Succeeds if it does types.str
have-same-php-value Checks wheter both values of a tuple have the same value type types.str
increase-highest-array-index(ATerm amount) Increases the highest index value of this array with the given amount types.str
php-remove-all-eval-dynamic-rules n/a types.str
php-remove-all-eval-dynamic-rules(ATerm valid-name) n/a types.str
remove-all-array-entries Removes all entries from an array types.str
remove-all-array-entries(Strategy valid-remove) n/a types.str
remove-array-entry(ATerm key) Removes an entry from the array types.str
remove-array-entry(Strategy valid-remove, ATerm key) n/a types.str
remove-rules-from-ruleset(ATerm name) n/a types.str
set-next-array-indice(ATerm next) Sets the next array indice that should be given to a new entry without a key types.str

Rule summary


add-php-simple-value(ATerm val) n/a types.str
get-php-raw-value Extracts the raw value of a PHPPrimitive types.str
get-php-raw-value n/a types.str
get-php-raw-value n/a types.str
get-php-raw-value n/a types.str
get-php-raw-value n/a types.str
get-php-simple-value Extracts the PHPSimple-value of the annotations of a term types.str
get-simple-array-value n/a types.str
get-simple-boolean-value n/a types.str
get-simple-float-value n/a types.str
get-simple-integer-value n/a types.str
get-simple-raw-array-value n/a types.str
get-simple-raw-boolean-value n/a types.str
get-simple-raw-float-value n/a types.str
get-simple-raw-integer-value n/a types.str
get-simple-raw-string-value Extracts the simple raw string value of a term types.str
get-simple-raw-value n/a types.str
get-simple-string-value Extracts the simple string value of a term types.str
has-php-simple-value Checks wheter or not a term has a php simple value types.str
remove-php-simple-value Removes an PHPSimpleValue annotation from a term types.str



Strategy details


ATerm add-array-entry(ATerm key, ATerm value)
File types.str
Author unknown
Since unknown
 

Representation of an array. An Array is represented as a setof dynamic rules, each rule looks like:EvalPHPArray: (ArrayId, Key) -> Value



 
ATerm add-array-entry(ATerm value)
File types.str
Author unknown
Since unknown
 
Parameters
ATerm value value The value to add

Adds an entry to the ArrayId with only a value.


type PHPArrayId -> PHPArrayId

 
ATerm copy-php-array
File types.str
Author unknown
Since unknown
 

Returns a cope of the array. This makes a new set of dynamic ruleswith the a new id.


type PHPArrayId -> PHPArrayId

 
ATerm copy-php-array-value(Strategy valid-get, Strategy valid-put, ATerm from, ATerm to)
File types.str
Author unknown
Since unknown
 

Copies one entry from an array to an other. Must beapplied to a key.


type key -> PHPArrayId

 
ATerm get-array-entry(ATerm key)
File types.str
Author unknown
Since unknown
 
Parameters
ATerm key key The key of the value

Retrieve an entry from the array.


type PHPArrayId -> Value

 
ATerm get-array-keys
File types.str
Author unknown
Since unknown
 

Returns a list with all keys of the array.


type PHPArrayId -> List(a)

 
ATerm get-array-values
File types.str
Author unknown
Since unknown
 

Returns a list with all values of the array.


type PHPArrayId -> List(a)

 
ATerm get-new-php-array-id
File types.str
Author unknown
Since unknown
 

Generates an unique PHPArray(name) id that can beused to keep track of an array.


type _ -> PHPArray(uniquename)

 
ATerm get-next-array-indice
File types.str
Author unknown
Since unknown
 

Get the array indice that should be given to a new entrywithout a key.


type PHPArrayId -> Integer

 
ATerm get-simple-raw-value(Strategy s)
File types.str
Author unknown
Since unknown
 

Get the simple value of a term. Extracts the value and rewrites to raw value. The given strategy is applied beforeextracting the raw value.


type Term -> Real or Boolean or String or Null or Integer

 
ATerm get-simple-value(Strategy s)
File types.str
Author unknown
Since unknown
 

Get the simple value of a term.


type Term -> Real or Boolean or String or Null or Integer

 
ATerm has-php-string-value
File types.str
Author unknown
Since unknown
 

Answers the question: Does this term has a value of this type?Succeeds if it does.



 
ATerm have-same-php-value
File types.str
Author unknown
Since unknown
 

Checks wheter both values of a tuple have the same value type.Succeeds if they have the same value type.


type (term, term) -> (term,term)

 
ATerm increase-highest-array-index(ATerm amount)
File types.str
Author unknown
Since unknown
 
Parameters
ATerm amount amount The delta to add to the current highest index

Increases the highest index value of this array with the given amount.


type PHPArrayId -> PHPArrayId

 
ATerm remove-all-array-entries
File types.str
Author unknown
Since unknown
 

Removes all entries from an array. This does notinclude the resetting of the next-indice.


type ArrayId -> ArrayId

 
ATerm remove-array-entry(ATerm key)
File types.str
Author unknown
Since unknown
 
Parameters
ATerm key key The key of the value

Removes an entry from the array.


type PHPArrayId -> PHPArrayId

 
ATerm set-next-array-indice(ATerm next)
File types.str
Author unknown
Since unknown
 
Parameters
ATerm next current The current highest index

Sets the next array indice that should be given to a new entrywithout a key.


type PHPArrayId -> PHPArrayId

 

Rule details


ATerm get-php-raw-value
File types.str
Author unknown
Since unknown
 

Extracts the raw value of a PHPPrimitive.


type PHPPrimitive -> primitive value

 
ATerm get-php-simple-value
File types.str
Author unknown
Since unknown
 

Extracts the PHPSimple-value of the annotations of a term.It first evaluates the given term using main-analysis-const-prop


type Term -> PHPPrimitiveType

 
ATerm get-simple-array-value
File types.str
Author unknown
Since unknown
 

No information available.


type Term -> PHPArray

 
ATerm get-simple-boolean-value
File types.str
Author unknown
Since unknown
 

No information available.


type Term -> PHPBoolean

 
ATerm get-simple-float-value
File types.str
Author unknown
Since unknown
 

No information available.


type Term -> PHPFloat

 
ATerm get-simple-integer-value
File types.str
Author unknown
Since unknown
 

No information available.


type Term -> PHPInteger

 
ATerm get-simple-raw-string-value
File types.str
Author unknown
Since unknown
 

Extracts the simple raw string value of a term.


type Term -> String

 
ATerm get-simple-string-value
File types.str
Author unknown
Since unknown
 

Extracts the simple string value of a term.


type Term -> PHPString

 
ATerm has-php-simple-value
File types.str
Author unknown
Since unknown
 

Checks wheter or not a term has a php simple value


type Term -> Term

 
ATerm remove-php-simple-value
File types.str
Author unknown
Since unknown
 

Removes an PHPSimpleValue annotation from a term.


type Term -> Term