Cradle Modules – SWE

Cradle-SWE Module

The Cradle SWE module provides reverse engineering and code generation to maintain consistency between a detailed system design and its software implementation.

Cradle SWE Module
Cradle Software Engineering SWE Module

Software Engineering

There are many contexts for software engineering, each using its own methods and languages. This module is intended for groups using functional methods to build software in C, Ada or Pascal.

Detailed software designs are represented using Structure Charts (STCs) with 3SL extensions to support:

  • Hierarchical descriptions of software into systems
  • Programs
  • Subsystems
  • Modules and source files
  • Representation of functions
  • Representation of basic data types

Software designs are described with diagrams, data definitions and module specifications that hold the pseudo code, descriptions or source code. This software design is cross referenced to architecture, design/analysis models, to requirements/test cases, and to all other data.

The initial design can be code generated to:

  • C, Ada and Pascal type definition header files (built from the model’s data definitions)
  • Source files that contain the call hierarchy from the STCs
  • Call arguments and local variable declarations
  • Content of the STC’s module specifications’ pseudo code or detailed design material.

Once algorithmic content is added to the generated code, the resulting completed source files can be reverse engineered back into the Cradle database, to update its design diagrams, and both the data definitions and module specifications of these diagrams’ symbols.

Reverse Engineering

Reverse engineering merges the actual source code into the design definitions and specifications. Each source file is subdivided into the individual routines. The component parts are then stored into separate frames in the module specification and data definition items in the database. Every line in each source file is stored in a frame of one of these items in the database.

The Code Generator can be run on the results of the reverse engineering to reconstruct the source files, either as they were, or including any changes made in the design model. In this case, the source code is generated using call interfaces built from the (possibly modified) STCs and the routines’ bodies are created from either the STC call hierarchy or the source code from the previous reverse engineer operation.

The process can start by reverse engineering legacy source code into an initial design model, recovering designs in situations where only the implementation currently exists.

As reverse engineering loads all source files into the database, the source files could be deleted, and instead configuration managed through the Cradle Configuration Management System as part of the design.

The diagrams, specifications and data definitions can contain any number of attributes, including URLs to reference the source code in a source code control system, such as Git or Subversion.

Format of Generated Code

The format of all generated code can be tailored to match your coding standards. Data definitions can be marked to be standard data types and generated into the source code. Header files can be produced from the composition specifications inside the data definitions to create record and variant structure declarations.


The reverse engineering tool supports any compiler programs and conditional compilation directives. It can distinguish application code, application libraries and standard library or operating system / runtime routines, and render the design diagrams accordingly. This uses any combination of regular expressions, and Cradle-supplied or user-defined library routine lists.

Reverse engineering can process one or more source files in one run, creating a hierarchy of design diagrams to represent the code structure beyond individual source files.

Full Traceability

Using the reverse engineering tool creates full traceability across the entire system lifecycle, from user needs to system requirements to analysis, architecture and design models, to test procedures, specifications and test cases, to the source code. Cradle’s transitive cross reference view facilities allow users to directly see the user requirements and acceptance criteria associated with each source code module, and vice versa.

Feature Summary

Feature Summary - SWE
Feature Summary – SWE

Please contact 3SL for further information about adding a Cradle SWE module to your existing system.