ESC/Java2
© 2003,2004,2005,2006 David Cok and Joseph Kiniry
© 2005,2006 UCD Dublin
© 2003,2004 Radboud University Nijmegen
© 1999,2000 Compaq Computer Corporation
© 1997,1998,1999 Digital Equipment Corporation
All Rights Reserved

escjava.translate
Class DefGCmd

java.lang.Object
  extended byescjava.translate.DefGCmd

public class DefGCmd
extends java.lang.Object

Class DefGCmd implements the definedness guarded commands for the requires clauses. The functionality is invoced by adding the -idc option to escj. Supported functionality: - div and mod operators generate CHKARITHMETIC checks - Conditional&& and or operators generate ifcmd guarded commands. - Dereferrencing is partially supported. Still working on this. Usage: - DefGCmd defGCmd=new DefGCmd(); - defGCmd.trAndGen(expr); // expr is an untranslated expression. - GuardedCmd gc=defGCmd.popFromCode(); NOTE: This is work inprogress and its fairly experimental, so bear with us for the time being :). Use at your own risk.

Version:
1.0
Author:
George Karabotsos

Field Summary
private  StackVector code
          code is the StackVector instance and is used to hold the definednes guarded commands for each method.
static boolean debug
          debug is a central and convinient way of turning on/off debug messages.
 
Constructor Summary
DefGCmd()
          Creates a new DefGCmd instance.
 
Method Summary
private  java.util.Hashtable minHMap4Tr()
           
private  void notImpl(Expr e)
           
 GuardedCmd popFromCode()
          Convenient shorthand for the command in the return statement.
private  java.lang.String traceMethod()
           
 Expr trAndGen(Expr e)
          (new trAndGent)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

code

private StackVector code
code is the StackVector instance and is used to hold the definednes guarded commands for each method.


debug

public static boolean debug
debug is a central and convinient way of turning on/off debug messages.

Constructor Detail

DefGCmd

public DefGCmd()
Creates a new DefGCmd instance.

Method Detail

popFromCode

public GuardedCmd popFromCode()
Convenient shorthand for the command in the return statement.

Returns:
a GuardedCmd value

trAndGen

public Expr trAndGen(Expr e)
(new trAndGent)


notImpl

private void notImpl(Expr e)

minHMap4Tr

private java.util.Hashtable minHMap4Tr()

traceMethod

private java.lang.String traceMethod()

ESC/Java2
© 2003,2004,2005,2006 David Cok and Joseph Kiniry
© 2005,2006 UCD Dublin
© 2003,2004 Radboud University Nijmegen
© 1999,2000 Compaq Computer Corporation
© 1997,1998,1999 Digital Equipment Corporation
All Rights Reserved

The ESC/Java2 Project Homepage