From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,2ca464c92c72e0e9 X-Google-Attributes: gid103376,public From: "Samuel T. Harris" Subject: Re: Ada grammar Date: 2000/05/12 Message-ID: <391C4223.2391F9ED@Raytheon.com>#1/1 X-Deja-AN: 622640316 Content-Transfer-Encoding: 7bit References: <07a73f60.478cecce@usw-ex0102-015.remarq.com> <8euivq$qso$1@nnrp1.deja.com> <004d942d.2e326cd2@usw-ex0104-026.remarq.com> <3919D285.E046DC9F@acenet.com.au> <391B6BC1.5F9A0982@acenet.com.au> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: Raytheon Aerospace Engineering Services Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 2000-05-12T00:00:00+00:00 List-Id: Ray Blaak wrote: > > Geoff Bull writes: > > I don't see how you can extend this experience to reject the use > > of ASIS out of hand. ASIS was specifically designed for tools > > such as the originally poster had in mind. > > It is not that I am rejecting ASIS so much as defending the position that > writing a custom parser is not unreasonable, especially for a tool that > already has parse engines for other languages and wants to add a new language > parser with minimal impact. > > I actually like the idea of ASIS. My knowledge of it is about 8 years out of > date though. Some questions: > > 01. What is the interface to it? I was understanding it was a collection of > Ada packages. Are there foreign-language bindings to it? I am guessing, for > example that the original poster's reverse engineering tool is not written in > Ada. The interface is a collection of packages which provide semantic queries concerning a particular element of code as well as traversal routines to move up and down the semantic tree and iterators to cover all elements in a tree. Interfacing ASIS to foreign languages is the same problem as interfacing any Ada package to a foreign language. You can either process the data in Ada and provide the expected data to the reverse engineering tool or wrap up ASIS with another layer providing exports for the needed queries. I believe the first option is usually easier. > > 02. Is perfect source reconstruction possible? At the Tri-Ada'92 session I > attended, this was still an eventual goal. There are ASIS queries to get the original text file from which the unit was compiled, the span of text an particular semantic element within that text file, and the actual text of that element. These queries are optional and their is a test to see if these facilities are supported by a particular ASIS implementation. White space and blank lines can be inferred from the holes. I don't know about spaces on the end of a line. > > -- > Cheers, The Rhythm is around me, > The Rhythm has control. > Ray Blaak The Rhythm is inside me, > blaak@infomatch.com The Rhythm has my soul. DISCLAIMER: My replies above are limited to my extensive experience with ASIS for Ada 83 as implemented by Rational Apex. I have looked at GNAT's implementation of ASIS for Ada 95 and see that there are some differences but most of what I have seen is nearly identical to what I am used to. -- Samuel T. Harris, Principal Engineer Raytheon, Aerospace Engineering Services "If you can make it, We can fake it!"