AdaControl A free ASIS based tool J-P. Rosen Adalog.

Slides:



Advertisements
Similar presentations
Automating Software Module Testing for FAA Certification Usha Santhanam The Boeing Company.
Advertisements

Building Bug-Free O-O Software: An Introduction to Design By Contract A presentation about Design By Contract and the Eiffel software development tool.
Modules Program is built out of components. Each component defines a set of logically related entities (strong internal coupling) A component has a public.
SYSTEM PROGRAMMING & SYSTEM ADMINISTRATION
1 Copyright © 1998 by Addison Wesley Longman, Inc. Chapter 13 In a language without exception handling: When an exception occurs, control goes to the operating.
Introduction to JavaScript Module 1 Client Side JS Programming M-GO Sponsored By
Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Component Patterns Architecture and Applications with EJB JavaForum.
Chapter 11 Exception Handling and Event Handling.
Reasons to study concepts of PL
Chapter 3 Program translation1 Chapt. 3 Language Translation Syntax and Semantics Translation phases Formal translation models.
Guide To UNIX Using Linux Third Edition
CMSC 104, Version 8/061L18Functions1.ppt Functions, Part 1 of 4 Topics Using Predefined Functions Programmer-Defined Functions Using Input Parameters Function.
© 2003 G. Drew Kessler and William M. Pottenger1 Subroutines (Part 1) CSE 262, Spring 2003.
Ranga Rodrigo. Class is central to object oriented programming.
Language Evaluation Criteria
Starting Chapter 4 Starting. 1 Course Outline* Covered in first half until Dr. Li takes over. JAVA and OO: Review what is Object Oriented Programming.
Classes Mark Hennessy Dept. Computer Science NUI Maynooth C++ Workshop 18 th – 22 nd Spetember 2006.
REFACTORING Lecture 4. Definition Refactoring is a process of changing the internal structure of the program, not affecting its external behavior and.
1 Exception Handling Introduction to Exception Handling Exception Handling in PLs –Ada –C++ –Java Sebesta Chapter 14.
Planning for the Solution
Types for Programs and Proofs Lecture 1. What are types? int, float, char, …, arrays types of procedures, functions, references, records, objects,...
Programming Language C++ Xulong Peng CSC415 Programming Languages.
INTRODUCTION TO JAVASCRIPT AND DOM Internet Engineering Spring 2012.
Program documentation Using the Doxygen tool Program documentation1.
Lesson 3 McManus COP  You have to tell them ◦ what to do ◦ what to use ◦ in what order to do itand ◦ what to do if your user does not do what.
Testing. 2 Overview Testing and debugging are important activities in software development. Techniques and tools are introduced. Material borrowed here.
Cohesion and Coupling CS 4311
Basic Semantics Associating meaning with language entities.
XHTML By Trevor Adams. Topics Covered XHTML eXtensible HyperText Mark-up Language The beginning – HTML Web Standards Concept and syntax Elements (tags)
Current Assignments Homework 2 is available and is due in three days (June 19th). Project 1 due in 6 days (June 23 rd ) Write a binomial root solver using.
Chapter 0 Getting Started. Objectives Understand the basic structure of a C++ program including: – Comments – Preprocessor instructions – Main function.
Introducing Python CS 4320, SPRING Lexical Structure Two aspects of Python syntax may be challenging to Java programmers Indenting ◦Indenting is.
Chapter 7 The Practices: dX. 2 Outline Iterative Development Iterative Development Planning Planning Organizing the Iterations into Management Phases.
Introduction to c++ programming - object oriented programming concepts - Structured Vs OOP. Classes and objects - class definition - Objects - class scope.
Introduction to Object-Oriented Programming Lesson 2.
ANU COMP2110 Software Design in 2003 Lecture 10Slide 1 COMP2110 Software Design in 2004 Lecture 12 Documenting Detailed Design How to write down detailed.
1 The Software Development Process ► Systems analysis ► Systems design ► Implementation ► Testing ► Documentation ► Evaluation ► Maintenance.
JavaScript Introduction and Background. 2 Web languages Three formal languages HTML JavaScript CSS Three different tasks Document description Client-side.
Ada, Scheme, R Emory Wingard. Ada History Department of Defense in search of high level language around Requirements drafted for the language.
Chapter 1: Preliminaries Lecture # 2. Chapter 1: Preliminaries Reasons for Studying Concepts of Programming Languages Programming Domains Language Evaluation.
Coupling and Cohesion Schach, S, R. Object-Oriented and Classical Software Engineering. McGraw-Hill, 2002.
Refactoring Tools – Proparse, Prorefactor, Prolint etc. Steven Lichtenberg Sr. Technologist Jenark Business Systems, Inc.
J-P. Rosen Adalog J-P. Rosen Adalog The contract model of Ada 2012.
Secure Coding Rules for C++ Copyright © 2016 Curt Hill
Introduction to.
Compiler Design (40-414) Main Text Book:
Zuse’s Plankalkül – 1945 Never implemented Problems Zuse Solved
Chapter 6 CS 3370 – C++ Functions.
Data Virtualization Tutorial: Introduction to SQL Script
Types for Programs and Proofs
Coupling and Cohesion 1.
Development Changes in Dynamics 365 for Finance and Operations
Exception Handling and Event Handling
Introduction Enosis Learning.
Application Development Theory
CS212: Object Oriented Analysis and Design
Introduction Enosis Learning.
JavaScript an introduction.
Using ASIS to Generate C++ Bindings
Easy Ada tooling with Libadalang Raphaël Amiard.
Easy Ada tooling with Libadalang Raphaël Amiard
CSC 533: Programming Languages Spring 2015
Object Oriented Programming
Exception Handling In Text: Chapter 14.
Chapter 7 Writing the Programs Shari L. Pfleeger Joann M. Atlee 4th Edition.
Chapter 7 –Implementation Issues
Manipulating Pictures, Arrays, and Loops
CSC 533: Programming Languages Spring 2018
CSC 533: Programming Languages Spring 2019
Chengyu Sun California State University, Los Angeles
Presentation transcript:

AdaControl A free ASIS based tool J-P. Rosen Adalog

Origin Initial development sponsored by Eurocontrol  Organization that manages air traffic over the whole (geographical) Europe.  1,1 MSloc Ada  Not life critical, but business critical  Need to automate programming rules checking More rules sponsored by Belgocontrol  Other industrials interested Decision by Eurocontrol to make it free  No interest in marketing the product  Benefit from improvements provided by the community  GMGPL: everything can be reused in any context Based on ASIS

Why Asis? Ada is a very rich language and very difficult to compile Syntax alone doesn't tell much: A (B)  A procedure call (and overloading resolution is needed to tell which one)  A type conversion  An array indexing You don't want to rewrite half a compiler with each tool!

What is ASIS ? The Ada Semantic Interface Specification is an interface between an Ada environment and any tool requiring information from it. ASIS is an open and published (ISO/IEC 15291:1999) callable interface. ASIS has been designed to be independent of underlying Ada environment implementations.  Implemented by (almost) every compiler

An interface to the Ada compiler Ada Source Code Ada Compiler ASIS Interface Application System CASE Tool or Application CompileLink Proprietar y or custom interface Standard Interface

API to walk-through and query the decorated syntactic tree of an Ada program. A semantic interface if I=3 then … else … end if; I : Integer; Corresponding_Name_Declaration if then path else path expression "=" I 3              

Why bother with checking rules? A language provides facilities for all possible programs  In a given program, you don't need everything  Some useful features in one context are dangerous in other contexts Common style helps readability, understandability, maintenance  The one who writes the code is never the one who reads it. Projects have special requirements A rule without enforcement is worth nothing

Current rules (development version) 91 possible checks…and still growing!

Some rules are simple... Textual rules  Max line length  No tabs  Special comments (-- TBSL) Use of special constructs  goto  tasking  pointers Use of Ada entities Some very simple rules are extremely useful!

begin... exception when Data_Error => Report ("Bad data"); when Device_Error => raise Failure; end; procedure Merge (Left : in out Element; Right : in out Element); X : array (1..10) of Element; Y : Element renames X (3); begin Merge (X (3), Y); -- Certain Merge (X (I), Y); -- Possible procedure Call_Back; pragma Export (C, Call_Back); procedure Call_Back is... begin no exception handler end Call_Back; case I is when 1 =>... when 2 =>... when 3 =>... when others =>... end case; Some are sophisticated Programming style  if for case  reduceable scope Special patterns  silent exceptions  unsafe paired calls Safe programming  Parameter aliasing  Exception propagation  Potentially blocking operations if I = 1 then... elsif I = 2 then... elsif I = 3 then... else... end if; type Counter is range ; procedure Counting is -- Counter used only here begin... end Counting; declare My_Lock : Lock_Type; begin P (My_Lock); -- Do something V (My_Lock); exception when others => V (My_Lock); -- handle exception end; protected Lock is procedure P; end Lock; protected body Lock is procedure P is begin Put_Line ("In P");... end P; end Lock;

Command Language Rules' syntax  [name:] Search|Check|Count [( )]; Naming entities  all My_Func  My_Package.My_Func  My_Package.My_Func {Integer return Float} Other commands  Go, Quit, Help  Message  Clear  Inhibit  Set (Output, flags)

Other features Rules derogation  Global, single rule, named rule  Over block of source or single line  Possibility to ignore derogations Inhibition  "Unplugging" a rule for a given unit Interactive mode Using Emacs (.adp) projects files  Not (yet) GPS (.gpr) projects Integration into GPS Return codes

AdaControl's structure Framework. Rules_Manager Framework. Reports Framework Rules.Pragmas Rules.Attributes Rules Thick_Queries Utilities

Documentation User's Guide  How to use AdaControl Programmer's Guide  How to write new rules Formats:  Texinfo source  Info  HTML  PDF

Business with AdaControl AdaControl is a commercial product of Adalog  Not opposed to free! Adalog services  Product maintenance  Development of new rules  Help in designing coding rules  Help in checking rules

Lessons learned Increases visibility of company Show case of Adalog's know-how  Clients asked for custom development of ASIS-based tools. The "consortium effect" Sponsoring free software is good  For the client who gets more than was paid for  For the company whose business increases