1 / 22

ASIS Workshop ‘99

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.

chin
Télécharger la présentation

ASIS Workshop ‘99

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 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

  2. Expanding ASISSteve BlakeAonix An Interface to the Ada 95 Compilation Environment • What is ASIS? • The ASIS Toolkit • The ASIS Extensions • Guidelines • Functionality • Components for Integrated Tools • Integrated Suite Demonstration

  3. Ada Environment A P P L I C A T I O N S Y S T E M ASIS Interface proprietary interface standard interface Static Analysis Tools What is ASIS? Ada Source Code Compile Link

  4. Object Object Declaration A B 0.0 Latitude : := List of Identifiers Subtype Indication Initial Expression Syntactic Information 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 category Of the 367 ASIS Queries, most support syntactic tree analysis

  5. Object Object Declaration A B 0.0 Latitude : := List of Identifiers Subtype Indication Initial Expression Semantic Information Full Type Declaration Ada semantics are provided via mechanisms such as Corresponding_: Corresponding_Type_Declaration, Corresponding_Name_Definition, Corresponding_Called_Function, Corresponding_Called_Entity, Corresponding_Type, Corresponding_Body, Corresponding_Entry, etc. Type Type Definition Real Type Definition Floating Point Definition Digits 8 Latitude Range Defining Identifier Static Expression Real Range Specification -90.0 +90.0 Corresponding_Expression_Type Corresponding_ Name_Declaration Static Simple Expressions Corresponding_Name_Declaration A := A + B; These mechanisms allow ASIS to traverse the syntactic tree like Hypertext allows one to traverse a document

  6. Examples of Tools Built on ASIS Tools portable to Ada environments supporting ASIS Interface Code Restructuring Tools Code Browsing and Navigation Tools Coding Style and Standards Compliance Tools Cross Reference Tools Data Flow Analysis Tools Dependency Tree Analysis Tools Design Tools Document Generation Tools Invocation (Call) Tree Analysis Tools Language-sensitive Editing and Prettyprinting Tools Language Translation Tools Quality Assessment Tools Reverse Engineering Tools Re-Engineering Tools Safety & Security Compliance Tools Static Correctness Verifiers Tasking Analysis Tools Test-case Generation & Coverage Analysis Tools Usage, Quality, & Complexity Metrics Tools ASIS Interface Ada Environment

  7. 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

  8. 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

  9. The ASIS Toolkit Higher level, abstract, secondary queries built from ASIS primitives and other portable services ASIS.Toolkit Layer ASIS Interface Ada Environment

  10. The ASIS Extensions Higher level, abstract, secondary queries built from implementation, host, or target dependent services. Can use Toolkit layer. ASIS.Extensions Layer ASIS.Toolkit Layer ASIS Interface Ada Environment Host or Target

  11. 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

  12. Guidelines Make it Possible • Add ONLYTWO 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

  13. 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.

  14. 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

  15. 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

  16. 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

  17. 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;

  18. 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

  19. 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.

  20. 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.

  21. Integrated Tool Output with Navigation Links Call Tree Report Testprofiler | 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 * Profiler Report Elapsed 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

  22. How to Get ASIS Artifacts(including Toolkit interfaces) ASIS Home Page => http://www.acm.org/sigada/WG/asiswg 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) Also available are tutorials, papers, examples, bibliography

More Related