3.6 loops.pl -- Properties of loops

author
Adrian Prantl <adrian@complang.tuwien.ac.at>
version
0.8.6-rc4
copyright
Copyright (C) 2008-2009 Adrian Prantl
license
See COPYING in the root folder of the SATIrE project
[semidet]is_const_val(+Term, -Val)
[nondet]is_const_val(-Term, +Val)
To be done
implement constant analysis result for VarRefExp
[semidet]isStepsize(+Term, -InductionVar, -Val)
[nondet]isStepsize(-Term, +InductionVar, +Val)
is_fortran_multicond_for_loop(+ForStatement, +I, ForInit, ForTest, ForStep, Body)
generate multiple ForTest on backtracking if multiple conditions are combined with logical and operators
is_fortran_for_loop(+ForStatement, -I, -ForInit, -ForTest, -ForStep, -Body)
[semidet]isSimpleForInit(+InitStatement, -InductionVar, -InitVal)
Extracts the induction variable and the initial value from InitStatement
[semidet]isEmptyForInit(+InitStatement)
[semidet]isForTestLE(+TestOp, -LeOp)
Any < test will be converted into a =<
[semidet]isForTestGE(+TestOp, -GeOp)
Any > test will be converted into a >=
[nondet]isForTestOp(+TestOp, -TestOp)
removes the sourrounding expression statement
[semidet]isWhileStatement(+WhileStmt, -Condition, -Var, -Body, -Annot, -Ai, -Fi)
[det]isWhileStatement(-WhileStmt, +Condition, +Var, +Body, +Annot, +Ai, +Fi)
FIXME rename this!
[semidet]isDoWhileStatement(+DoWhileStmt, -Condition, -Var, -Body, -Annot, -Ai, -Fi)
[det]isDoWhileStatement(-DoWhileStmt, +Condition, +Var, +Body, +Annot, +Ai, +Fi)
[semidet]isMin2Func(+MinFunc, -Expr1, -Expr2)
[det]isMin2Func(-MinFunc, +Expr1, +Expr2)
FIXME move to annot.pl
max_nesting_level(+Loop, -N)
return the maximum number of loops nested inside Loop