Skip to content

Latest commit

 

History

History
103 lines (87 loc) · 5.13 KB

README.md

File metadata and controls

103 lines (87 loc) · 5.13 KB

Renaissance-Ada

The Renaissance-Ada project develops tooling for analysis and manipulation of Ada software. The Renaissance-Ada project builds on top of LibAdalang and includes the following functionality

Examples

The image below shows the dependencies of Find-related subprograms of the Rejuvenation Library as extracted by the Dependency Graph Extractor and queried using Neo4J. Dependencies of Find-related subprograms of the Rejuvenation Library

Snippets from diff made with Code Reviewer

   function Release_Only (Mode : Operation_Mode) return Boolean is
-     (case Mode is when Release_Size_Mode | Release_Speed_Mode => True, when others => False);
+     (Mode in Release_Size_Mode | Release_Speed_Mode);
- if Valid then
-    Add (Value, 0, 0, 0);
- else
-    Add ("", 0, 0, 0);
- end if;
+ Add ((if Valid then Value else ""), 0, 0, 0);
- for Acf of Acfs loop
-    if Acf = null then
-       return False;
-    end if;
- end loop;
- return True;
+ return (for all Acf of Acfs => Acf /= null);

Example based on aws code

-   Max_Overhead : Stream_Element_Count range 0 .. 2**15 := 81 with Atomic;
-   for Max_Overhead'Size use 16;
+   Max_Overhead : Stream_Element_Count range 0 .. 2**15 := 81 with
+      Atomic,
+      Size => 16;

Used by Industry

Nexperia described during the AdaCore Tech Days how they benefit from the Renaissance-Ada tooling.

Renaissance History

The Renaissance approach to legacy software was initially developed by ESI in public-private research projects together with Thermo Fisher and Philips.

Enhance insight and reduce complexity

The Renaissance approach is an interative process of two steps that strengthen each other

  • enhance insight by analysis and
  • reduce complexity by manipulation.

For more info, see e.g. the Bits & Chips article, Ada User Journal article (starting on page 165), and ESI's research on model-based software transformation or listen to Tom van de Ven interviewing Pierre van de Laar on Renaissance-Ada

The development of Renaissance tooling to target Ada software started in Bright, a public-private research project together with ITEC, an independent subsidiary of Nexperia.

Clone archive

Use

git clone --recurse-submodules https://github.com/TNO/Renaissance-Ada.git

Related technologies

  • HayStack-Ada is a GNATStudio plug-in for AST-based Find and Replace. HayStack-Ada uses a re-implementation of the rejuvenation library in python.
  • OpenRewrite is a semantic code search and transformation ecosystem for Java and other source code.
  • Rascal MPL is a metaprogramming language that integrates source code analysis, transformation, and generation primitives on the language level. The Ada-Air project aims to add support for Ada to Rascal MPL.
  • Spoofax is a language designer's workbench. Spoofax supports concrete syntax to specify code transformations. Unfortunately, Spoofax still lacks support for Ada.