asis workshop ‘99

22
Copyright © 1999, Aonix 15.06.22 1 Aoni x ASIS Workshop ‘99 Overview What is holding ASIS back? Toolkit and Extensions Layers Guidelines Integrating tools Demonstration Brainstorming Data Decomposition Annex Tool Launchers Future Directions Promoting ASIS New Tools Other

Upload: chin

Post on 06-Jan-2016

53 views

Category:

Documents


0 download

DESCRIPTION

ASIS Workshop ‘99. Overview What is holding ASIS back? Toolkit and Extensions Layers Guidelines Integrating tools Demonstration Brainstorming Data Decomposition Annex Tool Launchers Future Directions Promoting ASIS New Tools Other. Expanding ASIS Steve Blake Aonix. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: ASIS Workshop ‘99

Copyright © 1999, Aonix 20.04.23 1 Aonix

ASIS Workshop ‘99• Overview

• What is holding ASIS back?

• Toolkit and Extensions Layers

• Guidelines

• Integrating tools

• Demonstration

• Brainstorming

• Data Decomposition Annex

• Tool Launchers

• Future Directions

• Promoting ASIS

• New Tools

• Other

Page 2: ASIS Workshop ‘99

Copyright © 1999, Aonix 20.04.23 2 Aonix

Expanding ASIS

Steve BlakeAonix• What is ASIS?

• The ASIS Toolkit• The ASIS Extensions• Guidelines• Functionality• Components for Integrated Tools• Integrated Suite Demonstration

An Interface to the Ada 95 Compilation Environment

Page 3: ASIS Workshop ‘99

Copyright © 1999, Aonix 20.04.23 3 Aonix

What is ASIS?

Ada Source Code Compile

Ada Environment

ASIS Interface

Static Analysis Tools

standard interface

proprietary interface

Link

APPLICAT ION

SYSTEM

Page 4: ASIS Workshop ‘99

Copyright © 1999, Aonix 20.04.23 4 Aonix

Syntactic Information

Object

Latitude 0.0A B :=:

List of Identifiers Subtype Indication Initial Expression

Object Declaration

Ada syntax is summarized in Ada 95 RM, Annex P as variant of Backus-Naur Form

For example:object_declaration ::== defining_identifier_list : [aliased] [constant] subtype_indication [:= expression]; | ...

For the Ada object declaration => A,B: Latitude := 0.0;

Syntactic Element Tree Representation =>

ASIS can extract desired syntactic information for every syntactic categoryOf the 367 ASIS Queries, most support syntactic tree analysis

Page 5: ASIS Workshop ‘99

Copyright © 1999, Aonix 20.04.23 5 Aonix

Semantic Information

These mechanisms allow ASIS to traverse the syntactic tree like Hypertext allows one to traverse a document

Type

Latitude

+90.0

Range

DefiningIdentifier

Static Simple Expressions

-90.0

Full Type Declaration

Real RangeSpecification

Type DefinitionReal Type DefinitionFloating Point Definition

Ada semantics are provided viamechanisms such as Corresponding_:

Corresponding_Type_Declaration, Corresponding_Name_Definition, Corresponding_Called_Function, Corresponding_Called_Entity,Corresponding_Type, Corresponding_Body, Corresponding_Entry, etc.

Object

Latitude 0.0A B :=:

List of Identifiers Subtype Indication Initial Expression

Object Declaration

Digits

8

Static Expression

Corresponding_Name_Declaration

A := A + B;

Corresponding_ Name_Declaration

Corresponding_Expression_Type

Page 6: ASIS Workshop ‘99

Copyright © 1999, Aonix 20.04.23 6 Aonix

Tools portable to Ada

environments supporting

ASIS Interface

Examples of Tools Built on ASIS

Ada Environment

Code Restructuring ToolsCode Browsing and Navigation ToolsCoding Style and Standards Compliance ToolsCross Reference ToolsData Flow Analysis ToolsDependency Tree Analysis ToolsDesign ToolsDocument Generation ToolsInvocation (Call) Tree Analysis ToolsLanguage-sensitive Editing and Prettyprinting ToolsLanguage Translation ToolsQuality Assessment ToolsReverse Engineering ToolsRe-Engineering ToolsSafety & Security Compliance ToolsStatic Correctness VerifiersTasking Analysis ToolsTest-case Generation & Coverage Analysis ToolsUsage, Quality, & Complexity Metrics Tools

ASIS Interface

Page 7: ASIS Workshop ‘99

Copyright © 1999, Aonix 20.04.23 7 Aonix

What is Holding ASIS Back?

• ASIS has a steep learning curve– Large interface with few examples

• ASIS is primitive– It takes a lot of queries to make a tool

• ASIS only covers static semantics– Does not address dynamic program attributes

• ASIS is not complete– There are “holes” in the standard

Page 8: ASIS Workshop ‘99

Copyright © 1999, Aonix 20.04.23 8 Aonix

What is the Solution?

• Expand ASIS in 2 directions– Toolkit query layer

• Serve as examples to reduce the learning curve

• Higher level abstractions do more with less

• Portable and interchangable with different vendors

– Extension layer• Can address dynamic semantics

• Fills holes and gaps

• Not as portable as the Tookit layer

Page 9: ASIS Workshop ‘99

Copyright © 1999, Aonix 20.04.23 9 Aonix

The ASIS Toolkit

Ada Environment

ASIS Interface

ASIS.Toolkit Layer

Higher level, abstract, secondary queries built from ASIS primitives and other portable services

Page 10: ASIS Workshop ‘99

Copyright © 1999, Aonix 20.04.23 10 Aonix

The ASIS Extensions

Ada Environment

ASIS Interface

ASIS.Toolkit Layer

Higher level, abstract, secondary queries built from implementation, host, or target dependent services. Can use Toolkit layer.

ASIS.Extensions Layer

Host or Target

Page 11: ASIS Workshop ‘99

Copyright © 1999, Aonix 20.04.23 11 Aonix

Guidelines Make it Possible

• They allow vendors to independently build Toolkit and Extensions to ASIS that will:– Promote portability for tools using the interfaces– Organize additions along clear paths– Expand easily while avoiding name collisions – Enhance understandability and usability– Mix and match with toolkits from other vendors– Provide the foundation for integrated tool sets

Page 12: ASIS Workshop ‘99

Copyright © 1999, Aonix 20.04.23 12 Aonix

Guidelines Make it Possible

• Add ONLY TWO new child packages to ASIS– Asis.Toolkit– Asis.Extensions

• Vendors identify themselves as children and then add unlimited descendents– Asis.Extensions.GNAT– Asis.Toolkit.ObjectAda.Call Trees– Asis.Toolkit.Apex.Expressions

Page 13: ASIS Workshop ‘99

Copyright © 1999, Aonix 20.04.23 13 Aonix

Guidelines Make it Possible

• Toolkit queries are implemented with ASIS primitives, other Toolkit queries, or common portable services and data structures.

• Extensions interfaces can make use of vendor specific, host or target dependent and other non-portable services. Can use Toolkit queries.

Page 14: ASIS Workshop ‘99

Copyright © 1999, Aonix 20.04.23 14 Aonix

Toolkit Functionality is Limitless

• Initialize and Finalize the environment and context

• Select compilation units (using filters, wild carding)

• Classify elements (Is_Package, Is_Task, Is_Global, …)

• Classify types (cut through derivations and privates)• Object Oriented queries (Controlling_Parameter, Corr_Tagged_Type)

• Provide Lists, Trees, Sorting and other utilities

• Offer generic report templates

• Build iterative structures like Call Trees, Dependency Graphs

• Perform Source Transformations

Page 15: ASIS Workshop ‘99

Copyright © 1999, Aonix 20.04.23 15 Aonix

Extension Functionality

Type and object sizes and alignments Record layout information: component positions,

first_bit, width Array ranges and component sizes Subprogram frame sizes and stack offsets of local objects Addresses of subprograms, tasks, data within a target

specific partition or program Filename, directory, or other host dependent functions

Page 16: ASIS Workshop ‘99

Copyright © 1999, Aonix 20.04.23 16 Aonix

An Integrated Tool Suite

• Toolkit and Extensions queries provide the building blocks for individual tools

• Asis.Extensions.ObjectAda.HTML is a simple interface that can glue individual tool output into an easily navigated set of reports

Page 17: ASIS Workshop ‘99

Copyright © 1999, Aonix 20.04.23 17 Aonix

package Asis.Extensions.ObjectAda.HTML is------------------------------------------------------------------- Operations to form HTML anchors and links.----------------------------------------------------------------- function Anchor (Declaration : in Asis.Declaration) return String;------------------------------------------------------------------- Returns an HTML anchor created for the Declaration.------------------------------------------------------------------- function Link (URL : in String; Anchor : in String; Image : in String) return String;

-- Returns an HTML link created from the Image to its URL and Anchor.------------------------------------------------------------------- function Link (Anchor : in Asis.Declaration; Image : in String) return String;

------------------------------------------------------------------- Returns an HTML link created from the Image to the Anchor.------------------------------------------------------------------- function Link (Expression : in Asis.Expression) return String;------------------------------------------------------------------- Returns an HTML link created from the Expression to its-- declaration.-------------------------------------------------------------------end Asis.Extensions.ObjectAda.HTML;

Page 18: ASIS Workshop ‘99

Copyright © 1999, Aonix 20.04.23 18 Aonix

Tool Suite: Source Navigator

• Transforms the original source into a browsable file with links connecting semantically related elements.– Names linked to declarations– Declarations linked to completions– Bodies linked to corresponding declarations

Page 19: ASIS Workshop ‘99

Copyright © 1999, Aonix 20.04.23 19 Aonix

Tool Suite: Profiler

• Creates compilable copy of the source and inserts a unique controlled object declaration in callable entities

• The controlled object’s Adjust and Finalize procedures are invoked whenever a callee’s scope is entered and exited.

• The callee’s count and timing information is collected and saved at runtime.

• A report tool constructs the profile report with links to the Navigator sources.

Page 20: ASIS Workshop ‘99

Copyright © 1999, Aonix 20.04.23 20 Aonix

Tool Suite: Call Tree Report

• Uses the Toolkit Call_Trees package to build a call tree of a main program

• Walks the Call_Tree using the generic traverse routine and generates the output report.

• The tool constructs the call tree report with local anchors and links to the Navigator sources.

Page 21: ASIS Workshop ‘99

Copyright © 1999, Aonix 20.04.23 21 Aonix

Integrated Tool Output with Navigation Links

Profiler ReportElapsed time: 30.7045 seconds.

ACCEPT Pack_is_a_prime.Task_is_prime.start Id 11 30 calls using 10.2778 seconds (% 33.4733)

TASK Main180.Calc Id 5 30 calls using 9.9629 seconds (% 32.4476)

TASK Pack_is_a_prime.Task_is_prime Id 10 30 calls using 9.9523 seconds (% 32.4132)

PROC Main180 Id 6 30 calls using 0.3799 seconds (% 1.2372)

TASK Testprofiler.Do_Main Id 7 2 calls using 0.0526 seconds (% 0.1711)

procedure Main180 IS Thread_1 : Task_factorial; Thread_2 : Task_factorial; Thread_3 : Task_is_prime; Factorial: Positive; Prime : Boolean;

task Calc is entry Go; end Calc;

task body Calc is separate;

begin

Calc.Go;

Thread_1.Finish( factorial ); -- Obtain result

with main180;with Ada.Text_IO;

procedure Testprofiler is

I : Integer;

task type Do_Main is entry Go; end Do_Main;

task body Do_Main is separate;

T1, T2: Do_Main;

separate(Main180) task body Calc is begin accept GO; Thread_1.Start(5); -- Start factorial calculation Thread_2.Start(7); -- Start factorial calculation delay 1.0; --### DEBUG Thread_3.Start(97); -- Start is_prime calculation end Calc;~ procedure Main180 IS

Call Tree ReportTestprofiler | entry T1.Go at line 45 | entry T2.Go at line 46 | procedure Proc1 at line 48 | | function "+" at line 30 | | function "<" at line 31 | | procedure Proc1 at line 32 * RECURSIVE * * REPEAT * | procedure Main180 at line 49 | | entry Calc.Go at line 22 | | entry Thread_1.finish at line 24 | | procedure Put at line 25 | | procedure Put at line 26 * REPEAT * | | function Positive at line 26 | | procedure New_Line at line 26 | | entry Thread_2.finish at line 28 | | procedure Put at line 29 * REPEAT * | | procedure Put at line 30 * REPEAT * | | function Positive at line 30 | | procedure New_Line at line 30 * REPEAT * | | entry Thread_3.finish at line 32 | | procedure Put at line 33 * REPEAT * | | procedure Put at line 34 * REPEAT * | | procedure Put at line 34 * REPEAT * | | procedure New_Line at line 34 * REPEAT * | procedure Proc1 at line 50 * REPEAT * | procedure Proc2 at line 51 | | procedure Proc1 at line 38 * REPEAT *

Page 22: ASIS Workshop ‘99

Copyright © 1999, Aonix 20.04.23 22 Aonix

How to Get ASIS Artifacts

(including Toolkit interfaces)

Also mirrored on sw-eng host for ftp on Internet =>

sw-eng.falls-church.va.us

ASIS 95 specification is complete and ready for use: (Microsoft Word, postscript, ASCII, & HTML)

ASIS is now available as ISO/IEC International Standard ISO/IEC 15291:1999 Information technology — Programming languages — Ada Semantic Interface Specification (ASIS)

ASIS Home Page =>

http://www.acm.org/sigada/WG/asiswg

Also available are tutorials, papers, examples, bibliography