Skip to main content

module lang::php::analysis::evaluators::AlgebraicSimplification

rascal-0.40.17
php-analysis-0.2.4

Usage

import lang::php::analysis::evaluators::AlgebraicSimplification;

Source code

http://github.com/cwi-swat/php-analysis/blob/main/src/main/rascal/lang/php/analysis/evaluators/AlgebraicSimplification.rsc

Dependencies

import lang::php::ast::AbstractSyntax;
import Set;
import List;
import String;

function concatScalars

Scalar concatScalars(Scalar sc1:string(str s1), Scalar sc2:string(str s2))

Scalar concatScalars(Scalar sc1:string(str s1), Scalar sc2:integer(int i1))

Scalar concatScalars(Scalar sc1:integer(int i1), Scalar sc2:string(str s2))

Scalar concatScalars(Scalar sc1:integer(int i1), Scalar sc2:integer(int i2))

Scalar concatScalars(Scalar sc1:string(str s1), Scalar sc2:float(real r1))

Scalar concatScalars(Scalar sc1:float(real r1), Scalar sc2:string(str s2))

Scalar concatScalars(Scalar sc1:float(real r1), Scalar sc2:float(real r2))

function algebraicSimplification

Script algebraicSimplification(Script scr)

Expr algebraicSimplification(Expr expr)

Perform algebraic simplification over operations formed just with scalars. We could also simplify expressions like 0 * e, but would risk discarding any side effects caused by e.