org.apache.bcel.verifier.structurals

Class Pass3bVerifier

public final class Pass3bVerifier extends PassVerifier

This PassVerifier verifies a method of class file according to pass 3, so-called structural verification as described in The Java Virtual Machine Specification, 2nd edition. More detailed information is to be found at the do_verify() method's documentation.

Version: $Id: Pass3bVerifier.java 384759 2006-03-10 10:38:59Z tcurdt $

Author: Enver Haase

See Also: do_verify

Nested Class Summary
static classPass3bVerifier.InstructionContextQueue
An InstructionContextQueue is a utility class that holds (InstructionContext, ArrayList) pairs in a Queue data structure.
Field Summary
static booleanDEBUG
In DEBUG mode, the verification algorithm is not randomized.
intmethod_no
The method number to verify.
VerifiermyOwner
The Verifier that created this.
Constructor Summary
Pass3bVerifier(Verifier owner, int method_no)
This class should only be instantiated by a Verifier.
Method Summary
voidcirculationPump(ControlFlowGraph cfg, InstructionContext start, Frame vanillaFrame, InstConstraintVisitor icv, ExecutionVisitor ev)
Whenever the outgoing frame situation of an InstructionContext changes, all its successors are put [back] into the queue [as if they were unvisited].
VerificationResultdo_verify()
Pass 3b implements the data flow analysis as described in the Java Virtual Machine Specification, Second Edition.
intgetMethodNo()
Returns the method number as supplied when instantiating.

Field Detail

DEBUG

private static final boolean DEBUG
In DEBUG mode, the verification algorithm is not randomized.

method_no

private int method_no
The method number to verify.

myOwner

private Verifier myOwner
The Verifier that created this.

Constructor Detail

Pass3bVerifier

public Pass3bVerifier(Verifier owner, int method_no)
This class should only be instantiated by a Verifier.

See Also: Verifier

Method Detail

circulationPump

private void circulationPump(ControlFlowGraph cfg, InstructionContext start, Frame vanillaFrame, InstConstraintVisitor icv, ExecutionVisitor ev)
Whenever the outgoing frame situation of an InstructionContext changes, all its successors are put [back] into the queue [as if they were unvisited]. The proof of termination is about the existence of a fix point of frame merging.

do_verify

public VerificationResult do_verify()
Pass 3b implements the data flow analysis as described in the Java Virtual Machine Specification, Second Edition. Later versions will use LocalVariablesInfo objects to verify if the verifier-inferred types and the class file's debug information (LocalVariables attributes) match [TODO].

See Also: LocalVariablesInfo Pass2Verifier

getMethodNo

public int getMethodNo()
Returns the method number as supplied when instantiating.