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 procedure is represented as a set of program points.
Language Module Support: Internal representation for points is available for C/C++ and binary analyses only. For C# and Java analyses, plug-ins that rely on point properties and relationships will generally not produce useful information.
Each point has some local properties:
The CodeSonar API provides access to the local information for each point.
Program points are categorized by kind. The following table contains information about the different point kinds.
| Point Kind | Description |
|---|---|
| actual-in | Actual parameter in a function call. |
| actual-out | Return value of a non-void function call. |
| auxiliary** | [CodeSurfer only] Used for factoring the representation of dependences. |
| body** | Generated "first point" of a function body. |
| call-site | Direct call to a function. |
| control-point | If, switch, while, do-while, or for. |
| declaration | [CodeSurfer only] Declaration for a variable or formal parameter. |
| entry | Entry point of a function. |
| exceptional-exit | [CodeSurfer only] At the end of a function, a point corresponding to exceptional exit from that function. (Used for exception handling). |
| exceptional-return | [CodeSurfer only] In a calling function, a point corresponding to exceptional return from a called function. (Used for exception handling) |
| exit | Final point of procedure. Some analyses may not traverse this point. The preexit point is available for use in such cases. |
| expression | Expression or assignment statement. |
| formal-in | Formal parameter of a function definition. |
| formal-out | Return value of a non-void function definition. |
| global-actual-in | [CodeSurfer only] Generated actual parameter representing a set of non-local variables used or modified in a function immediately or transitively. |
| global-actual-out | [CodeSurfer only] Generated actual parameter representing a set of non-local variables modified in a function immediately or transitively. |
| global-formal-in | [CodeSurfer only] Generated formal parameter representing a set of globals used or modified in a function immediately or transitively. |
| global-formal-out | [CodeSurfer only] Generated formal parameter representing a set of globals modified in a function immediately or transitively. |
| hammock-header | [CodeSurfer only] Artificial pre-entry vertex for a hammock. |
| hammock-exit | [CodeSurfer only] Artifical exit vertex for a hammock. |
| indirect-call | Indirect call to a function via a function pointer. |
| jump | Goto, break, or continue. |
| label | Label. |
| normal-exit | [CodeSurfer only] At the end of a function, a point corresponding to normal exit from that function. (Used for exception handling) |
| normal-return | [CodeSurfer only] In a calling function, the point corresponding to normal return from a called function. (Used for exception handling) |
| phi | [CodeSurfer only] Generated f function when using static single assignment. |
| pi | [CodeSurfer only] Generated p function when pi nodes are enabled. |
| preexit | Common point to which all returns branch before the procedure returns. Available for use in analyses that do not traverse the exit point |
| return | Return statement. |
| switch-case | Case or default. |
| unavailable | Unsupported language extension. |
| unknown** | Internal use. |
| variable-initialization | Initialization of a global variable, a static variable, or a string constant. |
**These kinds have technical or internal use. They are rarely observable and can typically be ignored.
For information about ASTs associated with program points, see AST Grammars.
A point's associated point syntax kind and point syntax element provide additional information about the source code statement from which the point was generated.
The point syntax kind associated with a program point indicates the kind of source code statement from which the point was generated. The "bodies" of code keywords do not have point syntax kinds: only conditions, expressions, etc.
| Point Syntax Kind | Description |
|---|---|
| ASM | An asm statement. |
| BREAK | A break statement. |
| CASE | A case label (in a switch statement). |
| CATCH | The formal parameter of a catch clause. |
| CONTINUE | A continue statement. |
| DO | The controlling expression of a do-while statement. |
| ELSE | An else label. |
| FOR | An element of a for loop header: initialization clause, termination condition, or step clause. |
| GOTO | A goto statement. |
| IF | An if condition. |
| LABEL | A statement label. |
| RETURN | A return statement or expression. |
| SWITCH | The controlling expression of a switch statement. |
| THROW | A throw expression. |
| TRY | A try block header. |
| WHILE | The controlling expression of a while statement. |
| NONE | All other program points. |
The point syntax element associated with a program point indicates the element of source code statement from which the point was generated.
| Point Syntax Element | Description |
|---|---|
| COND | A condition: for loop termination condition (kind FOR), if condition (kind IF), controlling expression of a while or do-while statement (kind WHILE, DO, respectively). |
| EXPR | A return expression (kind RETURN), controlling expression of a switch statement (kind SWITCH), case label (kind CASE), or throw expression (kind THROW). |
| INCR | A for loop step clause (kind FOR). |
| INIT | A for loop initialization clause (kind FOR) or catch clause formal parameter (kind CATCH). |
| NONE | All other program points. |
In the code:
for (i = 0; i < 10; ++i)
j = i;
The syntax kinds and elements are as follows.
| point | point syntax kind | point syntax element |
|---|---|---|
| i = 0 | FOR | INIT |
| i < 10 | FOR | COND |
| ++i | FOR | INCR |
| j = 1 | NONE | NONE |
By API implementation:
| Language | Point Functionality/Types Provided By | Types | |||
|---|---|---|---|---|---|
| Point | Point Kind | Point Syntax Kind | Point Syntax Element | ||
| C++ | class point | class point | class point_kind | class point_syntax_kind | class point_syntax_element |
| Python | class point | class point | class point_kind | class point_syntax_kind | class point_syntax_element |
| C | Header cs_pdg_vertex.h | typedef cs_pdg_vertex | enum cs_vertex_kind | enum cs_vertex_syntax_kind | enum cs_vertex_syntax_element |
See also:
To report problems with this documentation, please visit https://support.codesecure.com/.