chc.app.CFile module
C-file main access point.
- class chc.app.CFile.CFile(capp: CApplication, index: int, cfilename: str, cfilepath: Optional[str])[source]
Bases:
objectC File main access point.
- property assigndictionary: chc.app.CFileAssignmentDictionary.CFileAssignmentDictionary
- property capp: CApplication
- property cfileglobals: chc.app.CFileGlobals.CFileGlobals
- property cfilename: str
Returns base filename (without extension).
- property cfilepath: Optional[str]
Returns path relative to project directory or None if at toplevel.
- collect_post_assumes() None[source]
Collect callsite postconditions from callee’s contracts and add as assume.
- property contextdictionary: chc.app.CContextDictionary.CContextDictionary
- property contractpath: str
- property contracts: chc.api.CFileContracts.CFileContracts
- property declarations: chc.app.CFileDeclarations.CFileDeclarations
- property dictionary: chc.app.CFileDictionary.CFileDictionary
- property functioncount: int
- property functionnames: List[str]
- property functions: Dict[int, chc.app.CFunction.CFunction]
- property functionxref: Dict[str, int]
Returns a map from function names to vid’s.
- property gcomptagdecls: Dict[int, chc.app.CFileGlobals.CGCompTag]
- property gcomptagdefs: Dict[int, chc.app.CFileGlobals.CGCompTag]
- property genumtagdecls: Dict[str, chc.app.CFileGlobals.CGEnumTag]
- property genumtagdefs: Dict[str, chc.app.CFileGlobals.CGEnumTag]
- get_fn_spos(fname: str) List[chc.proof.CFunctionPO.CFunctionPO][source]
- get_function_by_index(index: int) chc.app.CFunction.CFunction[source]
- get_function_by_name(fnname: str) chc.app.CFunction.CFunction[source]
- get_function_contract(name: str) Optional[chc.api.CFunctionContract.CFunctionContract][source]
- get_functions() Iterable[chc.app.CFunction.CFunction][source]
- get_open_ppos() List[chc.proof.CFunctionPO.CFunctionPO][source]
Returns a list of open primary proof obligations.
- get_ppos() List[chc.proof.CFunctionPO.CFunctionPO][source]
- get_ppos_delegated() List[chc.proof.CFunctionPO.CFunctionPO][source]
Returns a list of primary proof obligations delegated.
- get_ppos_violated() List[chc.proof.CFunctionPO.CFunctionPO][source]
Returns a list of primary proof obligations violated.
- get_spos() List[chc.proof.CFunctionPO.CFunctionPO][source]
- get_variable_uses(vid: int) Dict[str, int][source]
Returns a mapping from function name to a count of variable refs.
function name -> number of references with a given vid.
- property gfunctions: Dict[int, chc.app.CFileGlobals.CGFunction]
- property gtypes: Dict[str, chc.app.CFileGlobals.CGType]
- property gvardecls: Dict[int, chc.app.CFileGlobals.CGVarDecl]
- property gvardefs: Dict[int, chc.app.CFileGlobals.CGVarDef]
- has_outstanding_fn_api_requests() bool[source]
Returns true if any of this file’s functions posted a request.
- property index: int
- property interfacedictionary: chc.api.InterfaceDictionary.InterfaceDictionary
- iter_functions(f: Callable[[chc.app.CFunction.CFunction], None]) None[source]
- property name: str
Returns the full name relative to the project directory.
Note: the filename is without extension
- property predicatedictionary: chc.proof.CFilePredicateDictionary.CFilePredicateDictionary
- property projectname: str
- property sourcefile: chc.source.CSrcFile.CSrcFile
- property targetpath: str
- exception chc.app.CFile.CFunctionNotFoundException(cfile: chc.app.CFile.CFile, functionname: str)[source]
Bases:
Exception