LARA

Mode Analysis

Determine which parameters used as inputs, which as outputs

  • if some parameter is always output, it can be handled more efficiently

Constraint-based mode analysis of mercury by David Overton, Zoltan Somogyi, Peter J. Stuckey (pdf)

More generally, semantic simplification analyses:

  • mode analysis - prove that invertibility is not needed
  • strictness analysis - prove that lazy evaluation is not needed
  • side effect analysis - prove certain function do not modify or depend on heap
  • call graph analysis - prove that dynamic dispatch has a bounded form