This documentation is not maintained. Please refer to doc.castsoftware.com/technologies to find the latest updates.


Summary: This document provides information about the extension providing Fortran support.

What's new?

Please see Fortran 1.0 - What's new  for more information.

Description

This extension provides support for applications written using Fortran languages.

Although this extension is officially supported by CAST, please note that it has been developed within the technical constraints of the CAST Universal Analyzer technology and to some extent adapted to meet specific customer needs. Therefore the extension may not address all of the coding techniques and patterns that exist for the target technology and may not produce the same level of analysis and precision regarding e.g. quality measurement and/or function point counts that are typically produced by other CAST AIP analyzers.

In what situation should you install this extension?

If your application contains source code written using Fortran and you want to view these object types and their links with other objects, then you should install this extension.

Supported Fortran versions

This version of the extension provides support for:

FortranSupported

Fortran 77

(tick)

Fortran 90

(tick)

Fortran 2003

(tick)

Function Point, Quality and Sizing support

This extension provides the following support:

  • Function Points (transactions): a green tick indicates that OMG Function Point counting and Transaction Risk Index are supported
  • Quality and Sizing: a green tick indicates that CAST can measure size and that a minimum set of Quality Rules exist
Function Points
(transactions)
(tick)
Quality and Sizing(tick)

CAST AIP compatibility

This extension is compatible with:

CAST AIP release

Extension release

Supported

8.3.x

≥ 1.0.1(tick)
8.2.x≥ 1.0.1(tick)
8.1.x≥ 1.0.1(tick)
8.0.x≥ 1.0.1(tick)
7.3.x≥ 1.0.1(tick)

Supported DBMS servers

This extension is compatible with the following DBMS servers:

DBMSSupported
CSS(tick)
Oracle(tick)
Microsoft SQL Server(error)

Prerequisites

(tick)An installation of any compatible release of CAST AIP (see table above)

Download and installation instructions

Please see:

The latest release status of this extension can be seen when downloading it from the CAST Extend server.

CAST Transaction Configuration Center (TCC) configuration

A set of Fortran Transaction Entry Points for use in the CAST Transaction Configuration Center is delivered in the extension via a .TCCSetup file. Therefore If you are using:

  • with CAST AIP ≥ 8.3.x, there is nothing for you to do: these entry points will be automatically imported during the extension installation and will be available in the CAST Transaction Configuration Center.
  • with CAST AIP ≤ 8.2.x, you can manually import the file %PROGRAMDATA%\CAST\CAST\Extensions\com.castsoftware.fortran.<version>\Configuration\TCC\Base_Fortran.TCCSetup to obtain your entry/end points (see instructions below).

Manual import action for CAST AIP ≤ 8.2.x

Click here to expand...
  • Locate the .TCCSetup file in the extension folder: %PROGRAMDATA%\CAST\CAST\Extensions\com.castsoftware.fortran.<version>\Configuration\TCC\Base_Fortran.TCCSetup

  • In the CAST Transaction Configuration Center, ensure you have selected the Templates node:

  • This .TCCSetup file is to be imported into the CAST Transaction Calibration Center using either the:

    • File > Import Configuration menu option:

    • Or right clicking on the Template node and selecting Import Configuration:

  • The import of the "Base_Fortran.TCCSetup" file will provide you with a sample Transaction Entry points
  • Now right click the "Standard Entry Point" item and select copy:

  • Paste the item into the equivalent node under the Application, for example, below we have copied it into the Application MEUDON:

  • Repeat for any additional items or generic sets that have been imported from the .TCCSetup file.

Prepare and deliver the source code

Once the extension is downloaded and installed, you can now package your source code and run an analysis. The process of preparing and delivering your source code is described below:

Source code preparation

  • Only files with following extensions will be analyzed :
    • *.for
    • *.FOR
    • *.inc
    • *.INC
    • *.pfo
    • *.PFO
    • *.f
    • *.F
    • *.f03
    • *.F03
    • *.f90
    • *.F90
    • *.f77
    • *.F77
    • *.h (In Fortran we can have .h file as include files...but mostly the *.inc are used as include files) 
  • Below is the list of extensions that will enable you to tell whether the source code is a Fortran-90 or a Fortran-77 program:

Fortran version

Extension

Fortran 2003

*.f03

*.F03

Fortran 90

*.f90
*.F90
*.g90
*.f95
*.F95
*.g95

Fortran 77

*.f77
*.F77
*.g77

All others

*.f
*.F
*.for
*.FOR

Source code preprocessing

Fortran source code needs to be preprocessed so that CAST can understand it and analyze it correctly. In previous releases of the extension, this preprocessing was a manual action that needed to be completed before the code was analyzed. However, in this release and all future releases, the code preprocessing is actioned automatically when an analysis is launched or a snapshot is generated (the code is preprocessed before the analysis starts). In other words you only need to package, deliver and launch an analysis/generate a snapshot for the preprocessing to be completed.

Note that the CAST Management Studio will use the LISA folder to analyze the preprocessed files (see CAST Management Studio help for more information about this folder).

Deliver the source code

Using the CAST Delivery Manager Tool:

  • create a new Version
  • create a new Package for your source code using the Files on your file system option and choose the location of your source code:

Click to enlarge

  • Run the Package action.
  • Before delivering the source code, check the packaging results.

Analysis configuration and execution

Refer to Analysis Configuration and Execution for more information.

Logging mechanism

Analysis log files

Analysis logs are stored in the default locations used by the CAST Management Studio.

Fortran Preprocessor

Fortran Preprocessor log files (the preprocessor is launched automatically during an analysis) are stored in the following locations:

CAST AIP releaseLocationLog file name
8.2.x

%PROGRAMDATA%\CAST\CAST\Extensions\<extension_name>\Configuration\Languages\Fortran\prepro

Note that the above location is the default, however, if you have modified the CAST_PLUGINS_ROOT_PATH variable in the CastGlobalSettings.ini file, this location may be different.
com.castsoftware.fortran.<extension_major_version.extension_minor_version.extension_maintenance_version>.prepro_<YYYYMMDDHHMMSS>.log
8.3.xDefault location is set to C:\castms\log\<unique_application_id>\, but this location can be configured at will in the CAST Management Studio "Preferences".

What results can you expect?

Objects

IconMetamodel description

Fortran Do Construct

Fortran External Function / Fortran Internal Function

Fortran External Subroutine / Fortran Internal Subroutine

Fortran IF Construct

Fortran Interface

Fortran IOSTAT Variable / Fortran STAT Variable

Fortran Module

Fortran Program

Fortran Project

Fortran Select Case

Structural Rules

The following structural rules are provided:

You can also find a global list here:

https://technologies.castsoftware.com/rules?sec=t_1006000&ref=||

Exceptions

The following rules/metrics are not triggered during a Fortran analysis:

  • Class Fan-in distribution
  • Class Fan-out distribution
  • Class Complexity distribution
  • SQL Complexity distribution
  • OO Complexity distribution
  • Copy/Paste metrics
  • Other generic diagnostics present in CAST AIP