daikon
Class DaikonSimple

Object
  extended by DaikonSimple

public class DaikonSimple
extends Object

DaikonSimple reads a declaration file and trace file and outputs a list of likely invariants using the simple incremental algorithm. Its methods parallel those of Daikon but oftentimes certain checks are eliminated from DaikonSimple's methods because there is less filtering of invariants and variables. DaikonSimple was written to check the implementation of the optimizations in Daikon. DaikonSimple does not use an optimizations, and its processing will produce a complete set of true invariants. Daikon does have flags to "turn off" some of its optimizations but there are some optimizations are built into the way Daikon processes the samples (e.g. variable hierarchy and bottom up processing). In addition, we want to check the optimizations, so we don't want to bypass them. In Daikon, code was written to "undo" the optimizations, so we could recover the invariants that were previously filtered out or not created (see Daikon.dkconfig_undo_opts flag). By comparing the output from the two, we can find problems with the optimization implementation by tracking the cause of the differences.


Nested Class Summary
static class DaikonSimple.SimpleProcessor
          The SimpleProcessor class processes each sample in the dtrace file.
 
Field Summary
static PptMap all_ppts
           
static Logger debug
           
static Logger debug_detail
           
 
Constructor Summary
DaikonSimple()
           
 
Method Summary
static void instantiate_views_and_invariants(PptTopLevel ppt)
          Install views and the invariants.
static boolean is_slice_ok(VarInfo v1, VarInfo v2)
          Returns whether or not the specified binary slice should be created.
static boolean is_slice_ok(VarInfo v1, VarInfo v2, VarInfo v3)
          Returns whether or not the specified ternary slice should be created.
static boolean is_var_ok(VarInfo var)
           
static void main(String[] args)
           
static void mainHelper(String[] args)
          This does the work of main, but it never calls System.exit, so it is appropriate to be called progrmmatically.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debug

public static final Logger debug

debug_detail

public static final Logger debug_detail

all_ppts

public static PptMap all_ppts
Constructor Detail

DaikonSimple

public DaikonSimple()
Method Detail

main

public static void main(String[] args)
                 throws IOException,
                        FileNotFoundException
Throws:
IOException
FileNotFoundException

mainHelper

public static void mainHelper(String[] args)
                       throws IOException,
                              FileNotFoundException
This does the work of main, but it never calls System.exit, so it is appropriate to be called progrmmatically. Termination of the program with a message to the user is indicated by throwing Daikon.TerminationMessage. Difference from Daikon's mainHelper: turn off optimization flags (equality, dynamic constants, NIS suppression).

Throws:
IOException
FileNotFoundException
See Also:
main(String[]), Daikon.TerminationMessage, Daikon.mainHelper(String[])

instantiate_views_and_invariants

public static void instantiate_views_and_invariants(PptTopLevel ppt)
Install views and the invariants. Duplicated from PptTopLevel's version because DaikonSimple needs to use its own version of slice checking code. Difference from PptTopLevel's version: 1. canonical (leader of equality set) check of variables is turned off because every variable is in its own equality set 2. debugging information turned off because DaikonSimple's code is more contained 3. less constraints on the slices

See Also:
PptTopLevel.instantiate_views_and_invariants()

is_var_ok

public static boolean is_var_ok(VarInfo var)

is_slice_ok

public static boolean is_slice_ok(VarInfo v1,
                                  VarInfo v2)
Returns whether or not the specified binary slice should be created. The slice should not be created if the vars not compatible. Since we are trying to create all of the invariants, the variables does not have to be a leader and can be a constant. Note that the always missing check is only applicable when the dynamic constants optimization is turned on (so we do not do the check here).

See Also:
PptTopLevel.is_slice_ok(VarInfo, VarInfo)

is_slice_ok

public static boolean is_slice_ok(VarInfo v1,
                                  VarInfo v2,
                                  VarInfo v3)
Returns whether or not the specified ternary slice should be created. The slice should not be created if any of the following are true - Any var is an array - Any of the vars are not compatible with the others - Any var is not (integral or float) Since we are trying to create all of the invariants, the variables does not have to be a leader and can be a constant. Note that the always missing check is only applicable when the dynamic constants optimization is turned on (so we do not do the check here). In addition, we do want to create the reflexive ones and partially reflexive invariants.

See Also:
PptTopLevel.is_slice_ok(VarInfo, VarInfo, VarInfo)