AdaTEST 95


Static Code Metrics

AdaTEST 95 Static Code Metrics capabilities can be used as standalone analysis, or integrated with AdaTEST 95 tests. They provide an automated objective measurement of code quality, maintainability and estimate of testing effort.

 

AdaTEST 95 Static Analysis makes it easier to:

Screenshot of AdaTEST Static Analysis Video Cover

What do AdaTEST 95 static metrics help me do?

DEFINE REQUIRED CODE METRICS

 

AdaTEST 95 produces over 100 static code metrics, on Ada 95 syntax (Ada Language Reference Manual) and industry standard metric sets. The selection of just the metrics desired is made simple through an analysis wizard and Static Analysis Rule Sets. 

 

These can define not only the required static code metrics, but also checks on acceptable values for each metric to be integrated with AdaTEST 95 dynamic tests.

AdaTEST 95 Static Code Metrics - Static Analysis - selection of deisred metrics - Ruleset selection screenshot
Montage of AdaTEST 95 Static Analysis Results overview - history of checks on enforcing values for static metrics for trend analysis

DIAGNOSE AND ENFORCE METRICS

 

Metrics are generated to .CSV files, List text files and presented in the HTML Results Viewer for comprehensive diagnosis.

 

The AdaTEST 95 HTML Results Overview presents a history of checks on enforcing values for static metrics for trend analysis.

 

Enforcement of static code metrics is fully automated through checks integrated into AdaTEST 95 test scripts, keeping dynamic and static testing completely synchronised.

 

AdaTEST 95 Static metrics are generated for all instrumented procedures, functions, protected subprograms/entries and tasks that have been executed. In addition, Metrics for package specifications and package bodies, in addition to procedure, function, and task bodies, are available for inspection in a list text file.

GENERATE REPORTS

 

In addition to the powerful diagnostics of code coverage results in the HTML Results Viewer and Overview, AdaTEST 95 generates safety standards certification ready ASCII text reports of compliance with coverage requirements.

 

Reports and certification evidence embed the integrated checks on the achievement of the required code coverage and static metric targets.

Screenshot of AdaTEST unit and integration testing tool results screen

How does AdaTEST 95 static analysis work?

Chart showing source code and code coverage options the AdaTEST 95 test exe has run - Static Analysis test process

AdaTEST 95 uses instrumentation on a copy of the source code, and static metrics data is recorded in both CSV and HTML files for diagnosis, and certification ready ASCII text list files and AdaTEST dynamic test results files evidence.  

 

Static analysis can be used integrated with AdaTEST 95 tests to check metric values within an acceptable range, and perform Control Flow and Data Flow analysis with path labels and dynamic assertions. 

 

Analysis is made simpler by coverage Rule Sets, which automate all the code instrumentation, data reporting and required metric checking.

Which code metrics does AdaTEST 95 provide?

AdaTEST 95 generates over 100 metrics on Ada 95 code syntax as defined in the Ada 95 Reference Manual Annex P. 

 

 

Static metrics are divided into three groups:

  • simple counted metrics
  • calculated metrics
  • informational metrics

Counted and calculated metrics are presented as floating point values, informational metrics are presented as string values.

In addition to counts of Ada 95 syntax, the following industry standard metric sets are provided:

  • McCabe’s Cyclomatic Complexity Measure
  • Myers’ extension to McCabe’s measure
  • Essential McCabe
  • Halstead’s Software Science
  • Hansen’s measure of Program Complexity by the Pair

 

The full set of AdaTEST 95 static code metrics is listed below: 

 

 

ABORT_STATEMENTS 

ACCEPT_STATEMENTS 

ACCESS_ATTRIBUTES 

ACCESS_DISCRIMINANTS 

ACCESS_TO_SUBPROGRAM_TYPES 

ADA_CODE_LINES 

ALIASED_OBJECT_DECLARATIONS 

ALLOCATORS 

ASSIGNMENT_STATEMENTS 

ASYNCHRONOUS_SELECTS 

BINARY_ADDING_OPERATORS 

BLANK_LINES 

BLOCK_DECLARATIVE_PARTS 

BLOCK_STATEMENTS 

BODY_STUBS 

CASE_ALTERNATIVES 

CASE_STATEMENTS 

CLASS_WIDE_TYPES 

CODE_STATEMENTS 

COMMENT_LINES 

COMMENTS 

COMPILATION_UNITS 

CONDITIONAL_ENTRY_CALLS 

CONTROLLED_TYPES 

DATA_ASSERTIONS 

DECLARATIVE_STATEMENTS 

DELAY_STATEMENTS 

DERIVED_TYPE_DEFINITIONS 

DYNAMIC_ASSERTIONS

FILE_CHECKSUM 

FOR_LOOPS 

GENERAL_ACCESS_TYPES 

GENERIC_DECLARATIONS 

GENERIC_INSTANTIATIONS 

GENERIC_SPECIFICATIONS 

GOTO_STATEMENTS 

HALSTEAD_DIFFICULTY 

 

 

 

HALSTEAD_EST_LEVEL_ABSTRACTION 

HALSTEAD_ESTIMATED_ERRORS 

HALSTEAD_EXPECTED_LENGTH 

HALSTEAD_INTELLIGENCE_CONTENT 

HALSTEAD_LANGUAGE_LEVEL 

HALSTEAD_LENGTH 

HALSTEAD_LEVEL_OF_ABSTRACTION 

HALSTEAD_NUM_UNIQUE_OPERANDS 

HALSTEAD_NUM_UNIQUE_OPERATORS 

HALSTEAD_POTENTIAL_VOLUME 

HALSTEAD_PROGRAM_EFFORT 

HALSTEAD_PURITY_RATIO 

HALSTEAD_TIME_ESTIMATE 

HALSTEAD_TOTAL_NUM_OPERANDS 

HALSTEAD_TOTAL_NUM_OPERATORS 

HALSTEAD_VOCABULARY 

HALSTEAD_VOLUME 

HANSEN_CYCLOMATIC_NUM 

HANSEN_OPERATOR_COUNT 

HIGHEST_PRECEDENCE_OPERATORS 

IF_STATEMENTS 

IGNORE_ON_SWITCHES 

INNER_USE_PACKAGE_CLAUSES 

LINES_IN_SOURCE_FILE 

LOGICAL_OPERATORS 

LOOP_STATEMENTS 

MAXIMUM_STATEMENT_NESTING 

MCCABE 

MEMBERSHIP_TESTS 

MULTIPLYING_OPERATORS 

MYERS_MCCABE_LOWER 

MYERS_MCCABE_UPPER 

OVERLOAD_COUNT 

PACKAGE_BODIES 

PACKAGE_SPECIFICATIONS 

PARAMETERS 

PRAGMAS 

 

 

PROCEDURE_ENTRY_CALL_STMTS  

PROTECTED_ENTRY_BODIES 

PROTECTED_OBJECT_DEFINITIONS 

PROTECTED_TYPE_DEFINITIONS

RAISE_STATEMENTS 

RELATIONAL_OPERATORS 

REPRESENTATION_CLAUSES 

REQUEUE_STATEMENTS 

REQUEUE_WITH_ABORTS 

RETURN_STATEMENTS

SELECT_STATEMENTS 

SELECTIVE_WAIT_ALTERNATIVES 

SELECTIVE_WAITS 

SHORT_CIRCUIT_CONTROL_FORMS 

SUBPROGRAM_BODIES 

SUBPROGRAM_SPECIFICATIONS 

SUBUNITS 

TAGGED_TYPES 

TERMINATES 

TEST_CODE_STMTS 

TIMED_ENTRY_CALLS 

TOTAL_LINES 

TOTAL_UNITS_IN_SOURCE_FILE 

TYPE_EXTENSIONS 

UNARY_ADDING_OPERATORS 

UNCHECKED_ACCESSES 

UNCHECKED_CONVERSIONS 

UNCHECKED_DEALLOCATIONS 

UNPROCESSED_BEXES 

UNREACHABLE_CODE 

USE_PACKAGE_CLAUSES 

USE_TYPE_CLAUSES 

USER_STRING (user defined) 

WHILE_LOOPS 

WITH_CLAUSES 

XOR_OPERATORS

Start
Trial
QA-Systems