Official release date: May 30, 2007.
This release of CodeSurfer introduces some major new features and some very significant improvements to the storage of intermediate representations. The GrammaTech Path Inspector installer is now incorporated with CodeSurfer. The Scheme API has been substantially renovated and the C API has been completely replaced. Also, a number of fairly minor improvements and bug fixes have been made.
| New Option | Description |
|---|---|
| -abnormal-exit-filename | Specifies a file that lists functions to be treated as abnormal exits. |
| -decl-vertices | Specifies whether CodeSurfer will create declaration vertices. |
| -error-limit | Specifies the number of parse errors allowed in a compilation before the compilation is excluded from the build. |
| -handle-abnormal-exits | Specifies whether CodeSurfer will build the control-flow graph to include edges and program points for abnormal exits. |
| -handle-exceptions | Specifies whether CodeSurfer will build the control-flow graph to include edges and program points for exceptions. |
| -managed-objects-io-buffer-capacity | Specifies the I/O buffer capacity for managing objects in core. |
| -managed-objects-resident-limit | Specifies an upper limit on the total amount of space that can be used by objects in core. |
| -min-ok-percent | Specifies the minimum percentage of the compilations that has to be included for the build to proceed. |
| -new-failure-behavior | Specifies how CodeSurfer should treat a failure of C++ command new. |
| -verbose | Now takes an integer argument in the range [ 0 .. 9 ] rather than a simple yes/no. Higher values cause more reporting is carried out by CodeSurfer during the compilation process. |
There have been a large number of changes to the CodeSurfer API. The most significant of these are described below. If you have written scripts for previous versions of CodeSurfer, and they no longer work with this version, then please feel free to contact us for assistance on adapting them.
| Type | Removed Function | Use Instead |
|---|---|---|
| ABS_LOC | ||
| abs-loc-primary-declarations | abs-loc-primary-declaration | |
| abs-loc-heap-type | abs-loc-type | |
| abs-loc-ast-list | ||
| abs-loc-extern-only? | ||
| abs-loc-global-map-traverse | abs-loc-for-each with abs-loc-global? | |
| abs-loc-heap-map-traverse | abs-loc-for-each with abs-loc-heap? | |
| abs-loc-string-map-traverse | abs-loc-for-each with abs-loc-string? | |
| abs-loc-file-static-map-traverse | abs-loc-for-each with abs-loc-file-static? | |
| abs-loc-local-static-map-traverse | abs-loc-for-each with abs-loc-local-static? | |
| abs-loc-local-map-traverse | abs-loc-for-each with abs-loc-local? | |
| AST | ||
| ast-dig* | Coercion is no longer available. | |
| ast-explode** | Coercion is no longer available. | |
| INT_PAIR_SET | ||
| ips-to-pdgvs-mapping-close | map will be garbage-collected automatically when it goes out of scope | |
| ips-to-pdgvs-mapping-open | ips-to-pdgvs-map-open | |
| ips-to-pdgvs-mapping-lookup | ips-to-pdgvs-map-lookup | |
| PDG_CALL all functions removed | ||
| pdg-call? | pdg-vertex-kind | |
| pdg-call-vertex | no longer need to correlate PDG_CALL to PDG_VERTEX | |
| pdg-call-actuals-in | pdg-vertex-actuals-in | |
| pdg-call-actuals-in-as-list | pdg-vertex-actuals-in-as-list | |
| pdg-call-actuals-out | pdg-vertex-actuals-out | |
| pdg-call-pdg | pdg-vertex-callee | |
| PDG_VERTEX | ||
| pdg-vertex-ast | pdg-vertex-asts | |
| pdg-vertex-basic-block-first-vertex | pdg-vertex-basic-block, then basic-block-first-vertex | |
| pdg-vertex-basic-block-last-vertex | pdg-vertex-basic-block, then basic-block-last-vertex | |
| pdg-vertex-previous-basic-blocks | pdg-vertex-basic-block, then basic-block-predecessors | |
| pdg-vertex-next-basic-blocks | pdg-vertex-basic-block, then basic-block-successors | |
| pdg-vertex-same-basic-block | pdg-vertex-basic-block, then basic-block-vertices, then pdg-vertex-set-member? | |
| PDG_VERTEX_SET | ||
| pdg-vertex-set-intersect-size | pdg-vertex-set-intersect, then pdg-vertex-set-cardinality | |
| Source Files | ||
| file-get-sfid | ||
| Type | Modified Function | Modification |
|---|---|---|
| ABS_LOC | ||
| abs-loc-kind | Return value change: can now return #f | |
| abs-loc-name | Parameter change: now takes an additional, optional argument indicating the maximum string length. When this argument is missing, maximum length is unbounded. | |
| abs-loc-represented-string | Parameter change: now takes an additional, optional argument indicating the maximum string length. When this argument is missing, maximum length is unbounded. | |
| abs-loc-for-each | Behavior change: now halts the traversal when the passed closure returns #f (previously it halted when the closure returned anything other than #f ). | |
| abs-loc-represented-string | Behavior change: no longer appends "..." to strings that have been truncated. | |
| PDG | ||
| pdg-call-sites | Return value change: now returns a list of PDG_VERTEX. | |
| PDG_VERTEX | ||
| pdg-vertex-rank | Return value change: can now return #f | |
| pdg-vertex-characters | Parameter change: now takes an additional, optional argument indicating the maximum string length. When this argument is missing, maximum length is unbounded. | |
| Behavior change: no longer appends "..." to strings that have been truncated. | ||
| PDG_VERTEX_SET | ||
| pdg-vertex-set-to-int-pair-set | Parameter change: there is no longer a BOOLEAN second argument. | |
| SDG | ||
| sdg-error-count | Parameter change: now takes one boolean argument including-dropped. | |
| Return value change: now returns the number of errors if known, 'unknown-positive if the warning count is an indefinite positive number, or 'unknown if the warning count is completely unknown. | ||
| sdg-warning-count | Parameter change: now takes one boolean argument including-dropped. | |
| Return value change: now returns the number of errors if known, 'unknown-positive if the warning count is an indefinite positive number, or 'unknown if the warning count is completely unknown. | ||
| SET_NATURAL | ||
| set-natural-first-non-elmt | Return value change: can now return a natural number that cannot be stored in the set. | |
| set-natural-next-non-elmt | Return value change: can now return a natural number that cannot be stored in the set (never returns #f). | |
| Source Files | ||
| file-get-linecount | Parameter change: now takes an SFID (not a UID). | |
| file-get-include-pos-name | Return value change: now returns a list of SFID values. | |
| file-warning-count | Return value change: now returns the number of errors if known, 'unknown-positive if the warning count is an indefinite positive number, or 'unknown if the warning count is completely unknown. | |
| file-error-count | Return value change: now returns the number of errors if known, 'unknown-positive if the warning count is an indefinite positive number, or 'unknown if the warning count is completely unknown. | |
| file-get-characters | Parameter change: now takes an SFID as its first argument (not a FILE_PATH). | |
| Parameter change: now takes an additional, optional argument indicating the maximum string length. When this argument is missing, maximum length is unbounded. | ||
| Type | New Functions |
|---|---|
| ABS_LOC |
|
| ABS_LOC_SET |
|
| AST | no new functions |
| AST_CLASS | no new functions |
| BASIC_BLOCK |
|
| BASIC_BLOCK_CFG_EDGE_SET |
|
| BASIC_BLOCK_SET |
|
| Bitwise Operators | no new functions |
| CFG_EDGE_SET |
|
| INT_PAIR_SET |
|
| Interest Sets | no new functions |
| Miscellaneous |
|
| PDG |
|
| PDG_VERTEX |
|
| PDG_VERTEX_SET |
|
| Printing | no new functions |
| SDG |
|
| SET_NATURAL | no new functions |
| Serialization | no new functions |
| Set Expressions | no new functions |
| Source Files |
|
| Variable-Mode Queries | no new functions |
Some kinds of sets may be either mutable or immutable.
The C API for CodeSurfer has been completely rewritten.