[abc-users] CastShadowMatch

From: Amjad Nusayr <anusayr_at_cs.nmsu.edu>
Date: Thu, 14 Feb 2008 23:42:14 -0700

I was wondering if there is a way to place a shadow on every statement
in the program, I was looking at the CastShadowMatch code and observed
the following

/Stmt stmt = ((StmtMethodPosition) pos).getStmt();
if (!(stmt instanceof AssignStmt)) return null;
        Value rhs = ((AssignStmt) stmt).getRightOp();
if(!(rhs instanceof CastExpr)) return null;
        Type cast_to = ((CastExpr) rhs).getCastType();
return new CastShadowMatch(pos.getContainer(), stmt, cast_to);

/is it possible to do the following,

/Stmt stmt = ((StmtMethodPosition) pos).getStmt();
//if (!(stmt instanceof Stmt)) return null; //any statement
//return new CastShadowMatch(pos.getContainer(), stmt, null);

/I did a couple of tests and was not successful, has anyone got any idea?

Amjad Nusayr
Received on Fri Feb 15 2008 - 06:42:19 GMT

This archive was generated by hypermail 2.2.0 : Fri Feb 15 2008 - 13:40:11 GMT