scale.score
Class PureFunctionAnalyser

java.lang.Object
  extended by scale.score.PureFunctionAnalyser

public class PureFunctionAnalyser
extends java.lang.Object

This class adds purity level information to RoutineDecls.

$Id: PureFunctionAnalyser.java,v 1.31 2007-10-04 19:58:19 burrill Exp $

Copyright 2008 by the Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.

This logic fails on the conservative side. For example, if there is an address argument such as char *s and s is used only to read and not write, this logic will still specify that the function changes values through its arguments. If no purity level information is found for a function called by this function, no purity level information is added to this function.

See Also:
RoutineDecl

Field Summary
static boolean classTrace
          True if traces are to be performed.
 
Constructor Summary
PureFunctionAnalyser(Suite suite)
          Mark the purity level of all the function specified by the Suite..
 
Method Summary
static int pfal0()
          Return the count of functions marked as not pure.
static int pfal1()
          Return the count of functions marked as PUREARGS.
static int pfal2()
          Return the count of functions marked as PUREGV.
static int pfal3()
          Return the count of functions marked as PUREGV & PUREARGS.
static int pfal4()
          Return the count of functions marked as PURESE.
static int pfal5()
          Return the count of functions marked as PURESE & PUREARGS.
static int pfal6()
          Return the count of functions marked as PURESE & PUREGV.
static int pfal7()
          Return the count of functions marked as PURE.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

classTrace

public static boolean classTrace
True if traces are to be performed.

Constructor Detail

PureFunctionAnalyser

public PureFunctionAnalyser(Suite suite)
Mark the purity level of all the function specified by the Suite..

Method Detail

pfal0

public static int pfal0()
Return the count of functions marked as not pure.


pfal1

public static int pfal1()
Return the count of functions marked as PUREARGS.


pfal2

public static int pfal2()
Return the count of functions marked as PUREGV.


pfal3

public static int pfal3()
Return the count of functions marked as PUREGV & PUREARGS.


pfal4

public static int pfal4()
Return the count of functions marked as PURESE.


pfal5

public static int pfal5()
Return the count of functions marked as PURESE & PUREARGS.


pfal6

public static int pfal6()
Return the count of functions marked as PURESE & PUREGV.


pfal7

public static int pfal7()
Return the count of functions marked as PURE.