JavaScript is not currently enabled, but is required for full CodeSonar manual search and browse functionality.
If you are viewing this file in your hub's Web GUI, enable JavaScript in your browser: you will also need it for GUI functionality.
If you opened this file directly from disk, your browser may be directly suppressing JavaScript functionality: certain browsers perform this suppression on local files (but not files delivered by web servers) for security reasons.
| CodeSonar® 9.2p0 | CONFIDENTIAL | CodeSecure Inc |
Each user-defined procedure in a project is represented as a procedure dependence graph (PDG). There are also several other kinds of PDGs generated by CodeSonar for technical purposes.
The C++ and Python API implementations name the corresponding type procedure. The C implementation names it cs_pdg. The discussion in this section will generally refer to the abstraction as a PDG in order to avoid confusion with the concrete notion of a procedure, since the two are not always in 1-1 correspondence.
Language Module Support: Internal representation for procedures is available for C/C++, binary, C#, and Java analyses.
The API provides access to various aspects of a PDG:
The PDG kinds are:
| Kind | Identifier | Description |
|---|---|---|
| user-defined | name as given in source code | CodeSonar creates a PDG of this kind for each function defined in a project's source files. |
| generated-indirect | #Indirect~i | CodeSonar creates a PDG of this kind for each non-singleton set of functions that may be the target of an indirect function call. |
| undefined | name as given in source code | CodeSonar creates a PDG of this kind for each function that is called in the project but not defined, CodeSonar. |
| library | . |
A function PDG is given kind library if the preprocessor symbol
__CSURF_MARKER_LIBRARY_FUNCTION__ is
defined when the open curly brace of the function is
encountered. There is one exception: member functions defined
inside classes are marked as library functions only if the
preprocessor symbol is defined when the closing colon of the
class definition is encountered.
All library models shipped with CodeSonar are marked as library functions. |
| system-initialization | #System_Initialization | The #System_Initialization PDG acts as a project's true main procedure, i.e., the procedure called by the operating system. This PDG calls the file-initialization procedures of each file that contains initialized global or static variables, and then calls main. #System_Initialization is associated with the file that contains the program's main procedure. |
| file-initialization |
|
Each file that contains initialized global or static variables
has at least one of these procedures. The initialization for
each such variable occurs in one of these PDGs. These functions
are called before main is
called, and they are called in the following order:
|
|
Each file that contains global or static variables that have to
be destroyed before the program terminates has at least one of
these procedures. The destruction for each such variable is
contained in one of these PDGs; exactly which PDG contains the
destruction depends on the language and the front end.
These functions are called after main returns, and they are called in the following order:
|
|
| objc-load | #Objc_Loads1 |
A PDG containing a chain of calls to Objective C +load functions in the order in which they
need to be called.
CodeSonar will generate one of these for every project that contains at least one Objective C compilation unit, called from #System_Initialization. |
| objc-initialize | #Objc_Initialize1 |
A PDG containing chain of calls to Objective C +initialize functions in the order in
which they need to be called.
CodeSonar will generate one of these for every project that contains at least one Objective C compilation unit, called from #System_Initialization. |
| hammock-generated | . | For internal use only. Should never be encountered during normal usage. |
| unknown | . | Internal error. |
By API implementation:
| Language | Procedure (PDG) Functionality and Types Provided By | Procedure (PDG) Type | PDG Kind Type |
|---|---|---|---|
| C++ | class procedure | class procedure | class procedure_kind |
| Python | class procedure | class procedure | class procedure_kind |
| C | Header cs_pdg.h | typedef cs_pdg | typedef cs_pdg_kind |
See also:
To report problems with this documentation, please visit https://support.codesecure.com/.