Package bap :: Module bir
[hide private]
[frames] | no frames]

Module bir

source code

BIR - BAP Intermediate Representation

Classes [hide private]
  Annotation
Annotation(Region(beg,end), Attr(name,value))
  Arg
Arg(id,attrs,lhs,rhs,intent=None) - a subroutine argument
  Args
sequence of arguments
  Attr
Attribute is a pair of attribute name and value, both represented with str
  Attrs
A mapping from attribute names to attribute values
  Blk
Blk(id,attrs,(p1,..,pL),(d1,..,dM),(j1,..,jN)) A basic block is a sequence of phi-nodes, defintions and jumps.
  Blks
sequence of basic blocks
  Both
input/output argument
  Call
Call(id,attrs,(calee,returns)) a transfer of control flow to another subroutine
  Def
Def(id,attrs,lhs,rhs) - assignment
  Defs
sequence of definitions
  Direct
Direct(tid) a statically known target of a jump
  Exn
Exn(id,attrs,(number,next)) - CPU exception
  Goto
Goto(id,attrs,cond,target) control flow local to a subroutine
  In
input argument
  Indirect
Indirect(exp) indirect jump that is computed at runtime
  Intent
argument intention
  Jmp
Jmp(id,attrs,cond,target) base class for jump terms
  Jmps
sequence of jump terms
  Label
  Memmap
sequence of memory annotations
  Out
output argument
  Phi
Phi(id,attrs,lhs,Values(b1,..,bM))) a term whose value depends on chosen control flow path
  Phis
sequence of phi-nodes
  Program
Program(id,attrs,Subs(s1,s2,..,sN)) A program is a term that contains a set of subroutines.
  Project
A collection of data associated with a disassembled program
  Region
Region(beg,end) a pair of addresses, that denote a memory region
  Ret
Ret(id,attrs,label) - return from a call
  Section
A contiguous piece of memory in a process image
  Sections
a mapping from names to sections
  Sub
Sub(id,Attrs(...),name,Args(...),Blks(...)) A subroutine has a sequence of arguments and basic blocks
  Subs
a set of subroutines
  Term
Term(id,attrs,...) a program term.
  Tid
Tid(id,name=None) term unique identifier.
  Values
A set of possible values, taken by a phi-node.
Functions [hide private]
 
loads(s)
loads bir object from string
source code
 
parse_addr(str) source code
Variables [hide private]
  __package__ = 'bap'