chc.app.CStmt module

Base class and subclasses

chc.app.CStmt.CStmt(parent, xnode)

Superclass of all control flow components in a function.

chc.app.CStmt.CFunctionBody(cfun, xnode)

chc.app.CStmt.CIfStmt(parent, xnode)

chc.app.CStmt.CLoopStmt(parent, xnode)

chc.app.CStmt.CSwitchStmt(parent, xnode)

chc.app.CStmt.CBreakStmt(parent, xnode)

chc.app.CStmt.CContinueStmt(parent, xnode)

chc.app.CStmt.CGotoStmt(parent, xnode)

chc.app.CStmt.CReturnStmt(parent, xnode)

Function return.

chc.app.CStmt.CInstrsStmt(parent, xnode)

Sequence of instructions without control flow.

Control flow element in a function.

class chc.app.CStmt.CBlock(parent: Optional[chc.app.CStmt.CStmt], xnode: xml.etree.ElementTree.Element)[source]

Bases: chc.app.CStmt.CStmt

property block_count: int
property is_block_stmt: bool
property stmts: Dict[int, chc.app.CStmt.CStmt]
class chc.app.CStmt.CBreakStmt(parent: chc.app.CStmt.CStmt, xnode: xml.etree.ElementTree.Element)[source]

Bases: chc.app.CStmt.CStmt

class chc.app.CStmt.CContinueStmt(parent: chc.app.CStmt.CStmt, xnode: xml.etree.ElementTree.Element)[source]

Bases: chc.app.CStmt.CStmt

class chc.app.CStmt.CFunctionBody(cfun: CFunction, xnode: xml.etree.ElementTree.Element)[source]

Bases: chc.app.CStmt.CBlock

property cfun: CFunction
property is_function_body: bool
class chc.app.CStmt.CGotoStmt(parent: chc.app.CStmt.CStmt, xnode: xml.etree.ElementTree.Element)[source]

Bases: chc.app.CStmt.CStmt

class chc.app.CStmt.CIfStmt(parent: chc.app.CStmt.CStmt, xnode: xml.etree.ElementTree.Element)[source]

Bases: chc.app.CStmt.CStmt

property condition: CExp
get_variable_uses(vid: int) int[source]
property is_if_stmt: bool
property stmts: Dict[int, chc.app.CStmt.CStmt]
property strings: List[str]
class chc.app.CStmt.CInstrsStmt(parent: chc.app.CStmt.CStmt, xnode: xml.etree.ElementTree.Element)[source]

Bases: chc.app.CStmt.CStmt

Sequence of instructions without control flow.

property call_instrs: List[chc.app.CInstr.CCallInstr]
property instrs: List[chc.app.CInstr.CInstr]
property is_instrs_stmt: bool
class chc.app.CStmt.CLoopStmt(parent: chc.app.CStmt.CStmt, xnode: xml.etree.ElementTree.Element)[source]

Bases: chc.app.CStmt.CStmt

property stmts: Dict[int, chc.app.CStmt.CStmt]
class chc.app.CStmt.CReturnStmt(parent: chc.app.CStmt.CStmt, xnode: xml.etree.ElementTree.Element)[source]

Bases: chc.app.CStmt.CStmt

Function return.

class chc.app.CStmt.CStmt(parent: Optional[chc.app.CStmt.CStmt], xnode: xml.etree.ElementTree.Element)[source]

Bases: object

Superclass of all control flow components in a function.

property block_count: int
property call_instrs: List[chc.app.CInstr.CCallInstr]
property cdictionary: CFileDictionary
property cfile: CFile
property cfun: CFunction
get_variable_uses(vid: int) int[source]
property instr_count: int
property is_block_stmt: bool
property is_function_body: bool
property is_if_stmt: bool
property is_instrs_stmt: bool
iter_stmts(f: Callable[[chc.app.CStmt.CStmt], None]) None[source]
property kind: str
property parent: Optional[chc.app.CStmt.CStmt]
property preds: List[int]
property sid: int
property stmt_count: int
property stmts: Dict[int, chc.app.CStmt.CStmt]
property strings: List[str]
property succs: List[int]
property xskind: xml.etree.ElementTree.Element
class chc.app.CStmt.CSwitchStmt(parent: chc.app.CStmt.CStmt, xnode: xml.etree.ElementTree.Element)[source]

Bases: chc.app.CStmt.CStmt

property stmts: Dict[int, chc.app.CStmt.CStmt]
chc.app.CStmt.get_statement(parent: chc.app.CStmt.CStmt, xnode: xml.etree.ElementTree.Element) chc.app.CStmt.CStmt[source]

Return the appropriate kind of CStmt dependent on the stmt kind.