Ada Semantic Interface Specification

Last updated
Ada Semantic Interface Specification (ASIS)
Developer(s) Language Lawyers, Ada Lovelace
Target platform(s) Ada Programming Language Applications and Static Analysis
StatusActive
LicenseProprietary

The Ada Semantic Interface Specification (ASIS) is a layered, open architecture providing vendor-independent access to the Ada Library Environment. It allows for the static analysis of Ada programs and libraries. It is an open, published interface library that consists of the Ada environment and their tools and applications.

Contents

As explained by the ASIS Working Group:

“ASIS is an interface between an Ada environment as defined by ISO/IEC 8652:1995 (the Ada Reference Manual) and any tool requiring information from this environment” (SIGAda, 2020)

It is exclusively used for programming language applications and static analysis on Ada programs, therefore giving the relevant information and access to Computer-aided software engineering (CASE) and applicable developers. ASIS also has the ability in utilizing the relevant software engineering tools whilst also embodying an easy understanding of the complexities of an Ada environment display. In addition, it provides procedures, functions and relevant information that can be significantly used to access exclusive information found in reference manuals and the Abstract Syntax Tree (AST). Which in return will advance ASIS to the capability of being portable to transport and retain information and terminology of Ada tools. [1]

“ASIS consists of 21 packages, 2 are optional and within these packages define 349 queries”. [2] ASIS will also consist of a package which within it includes child packages that include “Errors Compilation units, Ada environments, implementation, exceptions, elements, iterator, declarations, expressions, clauses, definitions, statements, text and Ids”. [3]

Overall ASIS is simply a straightforward way to collect data from an ADA program and increases any of the Ada tools portability.

Ada Programming/All Chapters. Vol.1 of 3 volume set. The basis of ASIS Ada Programming.pdf
Ada Programming/All Chapters. Vol.1 of 3 volume set. The basis of ASIS

Features of ASIS

Ada Semantic Interphase Specification under the ISO/IEC 8652 Ada 95 Reference Manual (Ada Language Referencing Manual, 1994) is defined as an interface amidst an Aria environment and other tools requiring information from the Aria environment.

Features of ASIS based tools could include: [4]

ASIS also provides limited approaches to the structural and semantic information that are found in the Ada library, it aims to provide and produce information that is similar if not the exact same semantic level as the definition of Ada. This will greatly assist in providing the exact same definitions and information of the Reference Manual for the Ada Programming Language (LRM) to interested individuals and clients (Ehrenfried).

Main abstractions

In ASIS, there are 3 main abstractions that exist in the Ada 'private' types. This consists of Context, Compilation_Unit and Element. [5] While there are additional types of abstractions also involved but the 3 mentioned are the fundamentals.

Context

The Context abstraction of ASIS consists of the definitions, terms and conditions that are available in ASIS enquiries. It is also used as a way and logical handle for the Ada environment. [4]

Compilation_Unit

The Compilation Unit is also a logical handle for the Ada environment. This abstraction also defines the properties and characteristics which are further seen in the Ada Reference Manual. It uses Ada's programming language implementation to convey compilation units through ASIS. As said by Adacore;

"An ASIS Compilation_Unit provides the ‘black-box’ view of a compilation unit, considering the unit as a whole. It may be decomposed into ASIS Elementand then analyzed in ‘white-box’ fashion." [4]

Examplies of these properties given can include:

  1. Time of last update
  2. Name of object containing unit's source text
Element

Comparably the Element abstraction is also a logical handle to the Compilation Unit discussed above, this can either be explicit or implicit.

Structure of ASIS

The ASIS application structure can be categorized into 3 categories; Setup ASIS Analysis, Process Compilation Units and Complete ASIS Analysis. This structure is to help in supporting various code analysis programs that appear in the Ada programming language. [3]

Setup ASIS analysis

The first step to the structure of ASIS analysis is to set it up efficiently. During this step, various tasks and programs are initialised and established. For example, as identified by William Colket (1999), this step is when the ASIS program initializes ASIS, establishes ASIS context and state object, associates the ASIS Context with the analysis, opens the ASIS context, and performs any pre-processing needed to support the ASIS analysis. The first step is generally to get the ASIS analysis up and running and be ready to use efficiently and effectively.

Process compilation units

The setup is then followed by "processing compilation units", during this time is when elements are sampled and analysed to fit into the ASIS Context that had been opened and associated with at the beginning of the ASIS structure. During this step, it mainly processes most of the ASIS application elements in correlation with the ASIS context, it also has the added capability to perform compilation units before and after processing has been done.

Complete ASIS analysis

The last and final stage of the ASIS structure is the completion of ASIS analysis. This is where everything is finalised and reviewed to perform any post processing to the ASIS analysis. The ASIS context is also closed and disassociated and ASIS is eventually finalised.

Design criteria

As ASIS continues to evolve similarly so does the evolution of its design criteria. The criteria for how ASIS can be designed can be sorted into 9 different categories; wide acceptance, transportability, uniformity and cohesiveness, implementability, state of technology, extensibility, ada terminology and style, performance and minimal set of interfaces. [6]

1. Wide acceptance

It must be designed according to this criterion so that a wide variety of tools can be used for ASIS. Designing it with this allows the interface library to be more flexible and available for tools across other platforms, Ada vendor implementations. It also allows for it to reduce training time for tool users and developers.

2. Transportability

ASIS must also be designed so it has the capability to be transferred from one computer to another computer or another environment to another.

3. Uniformity and cohesiveness

It should also be consistent in properties, concepts, types and operations but also be kept as a simple and coherent operation.

4. Implementability

ASIS is also criticised so that it is "implementable by any Ada Compiler Vendor with a reasonable effort". [4] As well as maintaining consistency throughout the whole program.

5. State of technology

The state of technology must always be updated and advanced to ensure no issues take place. Additionally, it should be ensured that all possible variations and versions of ASIS will be coherent and efficient.

6. Extensibility

"It should not preclude extensions that will make use of the ASIS design model and abstractions." [4]

7. Ada terminology and style

ASIS should also adapt to the terms and conditions of style and definitions to the Ada Reference Manual.

8. Performance

"ASIS design must allow for efficiency from both the client view and implementation view" [4]

9. Minimal set of interfaces

"It should allow clients to implement additional layered interfaces using the primitive operations provided."

Uses of ASIS

ASIS for GNAT

ASIS has been used by Adacore to implement an ASIS standard in the utilisation of ASIS-for-GNAT applications. ASIS can be used for GNAT through typical applications such as: “Static Analysis (property verification), Code instrumentation, Design and document generation tools, Metric testing or timing tools, Dependency Tree Analysis Tools, Type Dictionary Generators, Coding standards Enforcement Tools, Language Translators, Quality Assessment Tools, Source Browsers and Formatters and Syntax Directed Editors” (ASIS for GNAT).

This methodology has also been used to develop numerous tools with the assistance of ASIS including;

  1. gnatelim
  2. gnatstub
  3. gnatcheck
  4. gnatpp
  5. gnatmetric.

ASIS as insulator

Pace Drury (1999) utilises ASIS to create a code for his project named ‘SIDPERS-3’ where the code is used to identify intimate details and variations seen in Commercial Off the Shelf (COTS) generated from data base interaction Drury used ASIS for his project where ASIS created a new layer of Ada code which successfully insulated the software developer from the same generated Ada code specifics. [7]

Having written such a difficult code called ‘generate_db_support_code’ which majorly consisted of Ada code, the aim of it were to open 2 files, examine contents and create two new files based on the prior 2 files. ASIS had been used to examine the structure of the code efficiently, making it easier to store and link to a list containing Ada language. ASIS coherently completes what is asked to do and successfully gains constant and secure access to the data base information which meets the project’s needs.

AdaControl

AdaControl is a free (GMGPL) tool that detects the use of various kinds of constructs in Ada programs. Its uses include checking of coding standards, exploring the use of Ada features, making statistics, and more. It exploits all the power of ASIS, and can be considered as the most typical ASIS application.

Related Research Articles

<span class="mw-page-title-main">Ada (programming language)</span> High-level programming language first released in 1980

Ada is a structured, statically typed, imperative, and object-oriented high-level programming language, inspired by Pascal and other languages. It has built-in language support for design by contract (DbC), extremely strong typing, explicit concurrency, tasks, synchronous message passing, protected objects, and non-determinism. Ada improves code safety and maintainability by using the compiler to find errors in favor of runtime errors. Ada is an international technical standard, jointly defined by the International Organization for Standardization (ISO), and the International Electrotechnical Commission (IEC). As of May 2023, the standard, called Ada 2022 informally, is ISO/IEC 8652:2023.

In computing, a compiler is a computer program that translates computer code written in one programming language into another language. The name "compiler" is primarily used for programs that translate source code from a high-level programming language to a low-level programming language to create an executable program.

In object-oriented programming, a class is an extensible program-code-template for creating objects, providing initial values for state and implementations of behavior.

An integrated development environment (IDE) is a software application that provides comprehensive facilities for software development. An IDE normally consists of at least a source-code editor, build automation tools, and a debugger. Some IDEs, such as IntelliJ IDEA, Eclipse and Lazarus contain the necessary compiler, interpreter or both; others, such as SharpDevelop and NetBeans, do not.

Mesa is a programming language developed in the mid 1970s at the Xerox Palo Alto Research Center in Palo Alto, California, United States. The language name was a pun based upon the programming language catchphrases of the time, because Mesa is a "high level" programming language.

In computer science, static program analysis is the analysis of computer programs performed without executing them, in contrast with dynamic program analysis, which is performed on programs during their execution.

<span class="mw-page-title-main">Design by contract</span> Approach for designing software

Design by contract (DbC), also known as contract programming, programming by contract and design-by-contract programming, is an approach for designing software.

A programming tool or software development tool is a computer program that software developers use to create, debug, maintain, or otherwise support other programs and applications. The term usually refers to relatively simple programs, that can be combined to accomplish a task, much as one might use multiple hands to fix a physical object. The most basic tools are a source code editor and a compiler or interpreter, which are used ubiquitously and continuously. Other tools are used more or less depending on the language, development methodology, and individual engineer, often used for a discrete task, like a debugger or profiler. Tools may be discrete programs, executed separately – often from the command line – or may be parts of a single large program, called an integrated development environment (IDE). In many cases, particularly for simpler use, simple ad hoc techniques are used instead of a tool, such as print debugging instead of using a debugger, manual timing instead of a profiler, or tracking bugs in a text file or spreadsheet instead of a bug tracking system.

<span class="mw-page-title-main">Data modeling</span> Creating a model of the data in a system

Data modeling in software engineering is the process of creating a data model for an information system by applying certain formal techniques. It may be applied as part of broader Model-driven engineering (MDD) concept.

Modular programming is a software design technique that emphasizes separating the functionality of a program into independent, interchangeable modules, such that each contains everything necessary to execute only one aspect of the desired functionality.

Software prototyping is the activity of creating prototypes of software applications, i.e., incomplete versions of the software program being developed. It is an activity that can occur in software development and is comparable to prototyping as known from other fields, such as mechanical engineering or manufacturing.

The Ada Conformity Assessment Test Suite (ACATS) is the test suite used for Ada processor conformity testing. A prior test suite was known as the Ada Compiler Validation Capability (ACVC).

In software engineering, profiling is a form of dynamic program analysis that measures, for example, the space (memory) or time complexity of a program, the usage of particular instructions, or the frequency and duration of function calls. Most commonly, profiling information serves to aid program optimization, and more specifically, performance engineering.

Knowledge Discovery Metamodel (KDM) is a publicly available specification from the Object Management Group (OMG). KDM is a common intermediate representation for existing software systems and their operating environments, that defines common metadata required for deep semantic integration of Application Lifecycle Management tools. KDM was designed as the OMG's foundation for software modernization, IT portfolio management and software assurance. KDM uses OMG's Meta-Object Facility to define an XMI interchange format between tools that work with existing software as well as an abstract interface (API) for the next-generation assurance and modernization tools. KDM standardizes existing approaches to knowledge discovery in software engineering artifacts, also known as software mining.

DIANA is an intermediate language used to represent the semantics of an Ada program.

<span class="mw-page-title-main">Semantic data model</span> Database model

A semantic data model (SDM) is a high-level semantics-based database description and structuring formalism for databases. This database model is designed to capture more of the meaning of an application environment than is possible with contemporary database models. An SDM specification describes a database in terms of the kinds of entities that exist in the application environment, the classifications and groupings of those entities, and the structural interconnections among them. SDM provides a collection of high-level modeling primitives to capture the semantics of an application environment. By accommodating derived information in a database structural specification, SDM allows the same information to be viewed in several ways; this makes it possible to directly accommodate the variety of needs and processing requirements typically present in database applications. The design of the present SDM is based on our experience in using a preliminary version of it. SDM is designed to enhance the effectiveness and usability of database systems. An SDM database description can serve as a formal specification and documentation tool for a database; it can provide a basis for supporting a variety of powerful user interface facilities, it can serve as a conceptual database model in the database design process; and, it can be used as the database model for a new kind of database management system.

GrammaTech is a cybersecurity research services company based in Ithaca, New York. The company was founded in 1988 as a technology spin-off of Cornell University. GrammaTech software research services include the following; software analysis, vulnerability detection and mitigation, binary transformation and hardening, and autonomous computing. In September 2023, Battery Ventures acquired GrammaTech's software products division, including the CodeSonar and CodeSentry product lines. Thus establishing a new, independent entity that will operate under the CodeSecure, Inc. name and be headquartered in Bethesda, Maryland.

<span class="mw-page-title-main">API</span> Software interface between computer programs

An application programming interface (API) is a way for two or more computer programs or components to communicate with each other. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how to build or use such a connection or interface is called an API specification. A computer system that meets this standard is said to implement or expose an API. The term API may refer either to the specification or to the implementation. Whereas a system's user interface dictates how its end-users interact with the system in question, its API dictates how to write code that takes advantage of that system's capabilities.

DDC-I, Inc. is a privately held company providing software development of real-time operating systems, software development tools, and software services for safety-critical embedded applications, headquartered in Phoenix, Arizona. It was first created in 1985 as the Danish firm DDC International A/S, a commercial outgrowth of Dansk Datamatik Center, a Danish software research and development organization of the 1980s. The American subsidiary was created in 1986. For many years, the firm specialized in language compilers for the programming language Ada.

<span class="mw-page-title-main">Device driver synthesis and verification</span>

Device drivers are programs which allow software or higher-level computer programs to interact with a hardware device. These software components act as a link between the devices and the operating systems, communicating with each of these systems and executing commands. They provide an abstraction layer for the software above and also mediate the communication between the operating system kernel and the devices below.

References

  1. Sward, Ricky E.; Chamillard, A. T. (2004). "Re-engineering global variables in Ada". Proceedings of the 2004 annual ACM SIGAda international conference on Ada: The engineering of correct and reliable software for real-time & distributed systems using Ada and related technologies. Vol. XXIV. Atlanta, Georgia, USA: ACM Press. pp. 29–34. doi:10.1145/1032297.1032303. ISBN   978-1-58113-906-8. S2CID   31415676.
  2. Strohmeier, Alfred; Fofanov, Vasiliy; Rybin, Sergey; Barbey, Stéphane (1998). "Quality-for-ASIS: A portable testing facility for ASIS". In Asplund, Lars (ed.). Reliable Software Technologies — Ada-Europe. Lecture Notes in Computer Science. Vol. 1411. Berlin, Heidelberg: Springer. pp. 163–175. doi:10.1007/BFb0055003. ISBN   978-3-540-69802-9.
  3. 1 2 Colket, William Currie (September 1999). "Code analysis of saftey-critical [sic] and real-time software using ASIS". ACM SIGAda Ada Letters. XIX (3): 67–76. doi: 10.1145/319295.319306 . ISSN   1094-3641.
  4. 1 2 3 4 5 6 et.al
  5. "4. ASIS Overview — ASIS-for-GNAT User's Guide 22.0w documentation". docs.adacore.com. Retrieved 2020-11-20.
  6. Bladen, James B.; Spenhoff, David; Blake, Steven J. (1991). "Ada semantic interface specification (ASIS)". Proceedings of the conference on TRI-Ada '91 today's accomplishments; tomorrow's expectations - TRI-Ada '91. New York, New York, USA: ACM Press. pp. 6–15. doi:10.1145/126551.126552. ISBN   0-89791-445-7. S2CID   19422485.
  7. Drury, Pace (March 1999). "Using ASIS for data base insulation". ACM SIGAda Ada Letters. XIX (1): 64–65. doi:10.1145/311457.311486. ISSN   1094-3641. S2CID   37063586.

Additional

  1. ISO/IEC 15291: Information technology — Programming languages — Ada Semantic Interface Specification (ASIS)
  2. Ada Language Reference Manual. Version 6.0 21 December 1994. Copyright (C) 1992, 1993, 1994, 1995 Intermetrics, Inc.
  3. ASIS 2.0 specification