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.0p0 Hot Tips | CONFIDENTIAL | CodeSecure Inc |
Defines a set of SDG operations for CodeSonar.
| #define CS_SDG_H |
| Definition | typedef const struct cs_filter_struct * cs_filter |
|---|---|
| Notes | Specifies how predecessor and sucessor queries traverse a dependence graph. |
| Definition | typedef enum {
|
||||||||
|---|---|---|---|---|---|---|---|---|---|
| Notes | Enumerated type for the vertex_mode array contained within the cs_filter type.
In traversals governed by a filter, the behavior at a PDG_VERTEX v in PDG p depends on two directives:
|
| Definition | typedef enum {
|
||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Notes | Enumerated type for the pdg_mode array contained within the cs_filter_struct type.
In traversals governed by a filter, the behavior at a PDG_VERTEX v in PDG p depends on two factors:
|
| struct cs_sdg_pdgs_iter |
| struct cs_pdglist_pair |
| struct cs_filter_struct |
| cs_result | cs_sdg_pdgs ( cs_pdg pdg_list[], cs_size_t capacity_bytes, cs_size_t * bytes_needed )
Retrieve a list of the cs_pdg objects defined in the SDG of the current project.
|
| cs_result | cs_sdg_pdgs_iter_first ( cs_pdg * pdg, cs_sdg_pdgs_iter * itr )
Get the first cs_pdg from the SDG of the current project.
|
| cs_result | cs_sdg_pdgs_iter_next ( cs_pdg * pdg, cs_sdg_pdgs_iter * itr )
Get the next cs_pdg from itr.
|
| cs_result | cs_sdg_pdgs_iter_close ( cs_sdg_pdgs_iter * itr )
Close a cs_sdg_pdgs_iter .
|
| cs_result | cs_filter_pdg_directive_name ( cs_filter_pdg_directive directive, cs_const_string * out_string )
Retrieve the name of a cs_filter_pdg_directive.
|
| cs_result | cs_filter_pdg_vertex_directive_name ( cs_filter_pdg_vertex_directive directive, cs_const_string * out_string )
Retrieve the name of a cs_filter_pdg_vertex_directive.
|
| cs_result | cs_sdg_uids ( cs_uid uid_list[], cs_size_t capacity_bytes, cs_size_t * bytes_needed )
Retrieve a list of the compilation units (cs_uid) contributing to the SDG of the current project.
|
| cs_result | cs_sdg_uids_iter_first ( cs_uid * uid, cs_sdg_uids_iter * itr )
Get the first compilation unit cs_uid from the SDG of the current project.
|
| cs_result | cs_sdg_uids_iter_next ( cs_uid * uid, cs_sdg_uids_iter * itr )
Get the next cs_uid from itr.
|
| cs_result | cs_sdg_uids_iter_close ( cs_sdg_uids_iter * itr )
Close a cs_sdg_uids_iter.
|
| cs_result | cs_sdg_sfs_iter_first ( cs_sf * sf, cs_sdg_sfs_iter * itr )
Get the first source file cs_sf from the SDG of the current project.
|
| cs_result | cs_sdg_sfs_iter_next ( cs_sf * sf, cs_sdg_sfs_iter * itr )
Get the next cs_sf from itr.
|
| cs_result | cs_sdg_sfs_iter_close ( cs_sdg_sfs_iter * itr )
Close a cs_sdg_sfs_iter.
|
| cs_result | cs_sdg_ignored_uids ( cs_uid uid_list[], cs_size_t capacity_bytes, cs_size_t * bytes_needed )
Retrieve a list of the compilation units (cs_uid) that are dropped from the build.
|
| cs_result | cs_sdg_compilation_units ( cs_file_path file_path_list[], cs_size_t capacity_bytes, cs_size_t * bytes_needed, cs_size_t * result_cardinality )
Retrieve a list of file-paths of the compilation units contributing to the SDG of the current project.
|
| cs_result | cs_sdg_retrieve_pdg ( csint64 pid, cs_pdg * out_pdg )
Retrieve the cs_pdg corresponding to a given procedure ID.
|
| cs_result | cs_sdg_error_count ( cs_boolean including_ignored, cs_size_t * out_i )
Retrieve the number of errors encountered in compiling the files in the SDG.
|
| cs_result | cs_sdg_warning_count ( cs_boolean including_ignored, cs_size_t * out_i )
Retrieve the number of warnings encountered in compiling the files in the SDG.
|
| cs_boolean | cs_sdg_is_loaded ( )
Check: is a project currently loaded?
|
| cs_boolean | cs_sdg_is_read_only ( )
Check: is the current project read-only?
|
| cs_result | cs_sdg_file_is_newer_than_build ( cs_const_file_path file, cs_boolean * out_b )
Determine if a file is newer than the rest of the project.
|
| cs_result | cs_sdg_retain_unnormalized_c_ast ( cs_boolean * out_b )
Determine whether any of cs_pdg_vertex_ast(), cs_abs_loc_ast(), cs_abs_loc_type(), cs_pdg_ast() or cs_file_ast() can successfully return a cs_ast whose cs_ast_family is csaf_c_unnormalized.
|
| cs_result | cs_project_name ( cs_string prj_name, cs_size_t capacity_bytes, cs_size_t * bytes_needed )
Get the name of the current project.
|
| cs_result | cs_prj_files_directory ( char * dst, cs_size_t capacity_bytes, cs_size_t * bytes_needed )
Get the absolute file system path for the project analysis directory (pfilesname.prj_files) of the currently loaded project.
|
| cs_result | cs_sdg_incremental_capable ( cs_boolean * out_b )
Check: was INCREMENTAL_BUILD=Yes specified in the configuration file?
|
| Parameters |
|
|||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Returns |
A cs_result:
|
|||||||||
| Time-Complexity | O(n), where n is the number of cs_pdg elements in the project. | |||||||||
| Notes | Call this function with pdg_list NULL and capacity_bytes 0 (zero) to determine the memory needed to hold all cs_pdg objects defined in the SDG of the current project. |
| Parameters |
|
||||||
|---|---|---|---|---|---|---|---|
| Returns |
A cs_result:
|
||||||
| Notes | This function opens itr, which is required by cs_sdg_pdgs_iter_next(). Use cs_sdg_pdgs_iter_close() to close itr. |
| Parameters |
|
||||||
|---|---|---|---|---|---|---|---|
| Returns |
|
| Parameters |
|
|||
|---|---|---|---|---|
| Returns |
|
| Parameters |
|
||||||
|---|---|---|---|---|---|---|---|
| Returns |
A cs_result:
|
| Parameters |
|
||||||
|---|---|---|---|---|---|---|---|
| Returns |
A cs_result:
|
| Parameters |
|
|||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Returns |
A cs_result:
|
|||||||||
| Time-Complexity | O(n), where n is the number of compilation units in the current project. | |||||||||
| Notes | Call this function with uid_list NULL and capacity_bytes 0 (zero) to determine the memory needed to hold the entire list. |
| Parameters |
|
||||||
|---|---|---|---|---|---|---|---|
| Returns |
A cs_result:
|
| Parameters |
|
||||||
|---|---|---|---|---|---|---|---|
| Returns |
A cs_result:
|
| Parameters |
|
|||
|---|---|---|---|---|
| Returns | CS_SUCCESS on successful closure. |
| Parameters |
|
||||||
|---|---|---|---|---|---|---|---|
| Returns |
A cs_result:
|
| Parameters |
|
||||||
|---|---|---|---|---|---|---|---|
| Returns |
A cs_result:
|
| Parameters |
|
|||
|---|---|---|---|---|
| Returns | CS_SUCCESS on successful closure. |
| Parameters |
|
|||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Returns |
A cs_result:
|
|||||||||
| Time-Complexity | O(n), where n is the number of compilation units in the current project. | |||||||||
| Notes | Call this function with uid_list NULL and capacity_bytes 0 (zero) to determine the memory needed to hold the entire list. |
| Parameters |
|
||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Returns |
A cs_result:
|
||||||||||||
| Time-Complexity | O(n), where n is the number of compilation units in the current project. | ||||||||||||
| Notes | Call this function with file_path_list NULL and capacity_bytes 0 (zero) to determine the memory needed to hold the entire list. |
| Parameters |
|
||||||
|---|---|---|---|---|---|---|---|
| Returns |
A cs_result:
|
||||||
| Notes | To get the unique identifier of a cs_pdg, use cs_pdg_procedure_id(). |
| Parameters |
|
||||||
|---|---|---|---|---|---|---|---|
| Returns |
A cs_result:
|
||||||
| Notes | out_i is populated with a lower bound on the number of errors that must have occurred even when CS_ERROR_COUNT_UNKNOWN_BUT_POSITIVE or CS_ERROR_COUNT_UNKNOWN is returned. |
| Parameters |
|
||||||
|---|---|---|---|---|---|---|---|
| Returns |
A cs_result:
|
||||||
| Notes | out_i is populated with a lower bound on the number of warnings that must have occurred even when CS_ERROR_COUNT_UNKNOWN_BUT_POSITIVE or CS_ERROR_COUNT_UNKNOWN is returned.
Note that this method retrieves the number of compiler warnings: it is not related to CodeSonar warnings. |
| Returns | cs_true if a project is loaded; cs_false if not. |
|---|
| Returns | cs_true if the current project is read-only; cs_false if not. |
|---|
| Parameters |
|
||||||
|---|---|---|---|---|---|---|---|
| Returns |
A cs_result:
|
| Parameters |
|
|||
|---|---|---|---|---|
| Returns |
A cs_result:
|
| Parameters |
|
|||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Returns |
A cs_result:
|
| Parameters |
|
|||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Returns |
A cs_result:
|
|||||||||
| Notes | If called from within a slave process of a distributed analysis, this function can return a file system path that only exists on the computer running the analysis master process (or daemon master process, if called after the analysis has transitioned to daemon mode to service hub requests). Even if the two processes are on the same machine, the slave may be running as a different user and may not have permission to access the directory. |
| Parameters |
|
|||
|---|---|---|---|---|
| Returns |
A cs_result:
|