The joeq system has a lot of
state and has many very complex internal dependencies. The joeq.Main.Helper class hides all of these complexities and
requirements behind a very simple interface. In fact, there are only two method
names you need to know.
jq_Type load(String name): This routine takes a class name
specified by the argument and searches the classpath for a class of that
name. If such a class exists, it loads it into a jq_Class object and returns it; otherwise, it
throws a NoClassDefFoundError. For our purposes, it will always work to downcast the returned jq_Type to a jq_Class. void runpass (target, pass): This is actually a family of
functions, but you do not ordinarily need to worry about that. The target is a chunk of code: a jq_Class, a jq_Method, a ControlFlowGraph, a BasicBlock, or a Quad. The pass is a relevant visitor: a jq_TypeVisitor, a jq_MethodVisitor, a ControlFlowGraphVisitor, a BasicBlockVisitor, or a QuadVisitor. You may run a pass on a target if
the target is at least as fine-grained as the pass; so, for instance, a BasicBlock can recieve a BasicBlockVisitor or a QuadVisitor, but a jq_Class can recieve any kind of pass. For an example of these routines
in use, see the guide to writing a compiler pass.