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=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!attcan!uunet!husc6!bbn!uwmcsd1!ig!agate!ucbvax!grebyn.COM!karl From: karl@grebyn.COM (Karl A. Nyberg) Newsgroups: comp.lang.ada Subject: Re: Typing Ada Message-ID: <8805201251.AA13119@grebyn.com> Date: 20 May 88 12:51:17 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: Grebyn Corporation List-Id: [Ed - forwarded. Hopefuly this won't have gone out twice!] -- Karl -- Date: Thu, 19 May 88 20:56:40 EDT From: umd5!mitre-bedford.ARPA!sdl (Litvintchouk) To: munck@mitre-bedford.arpa, INFO-ADA-REQUEST@ajpo.sei.cmu.edu Subject: Re: Typing Ada > I'd like to think that most programmers are using some kind of > Ada-aware editor, but I fear it isn't so. I'd appreciate an e-mail > note describing what you do and what other programmers in your > company/institution do. (People who read Ada-Info are apt to be an > unrepresentative sample.) I wish I had a really "Ada-aware" editor, but I've managed to tailor GNU Emacs on our Suns into something I (and a few fellow programmers) can live with. Currently the libraries I have added include: 1. VADS modes: Invoke most of the Verdix Ada tools with a single key each. 2. Code idioms: To get a "blocking queue" (in the Hibbard sense), type M-x adt-active (i.e. "active abstract data type"), at the prompt type QUEUE, and a skeleton of the package spec and body are inserted. (It includes the private part refined as a record type with a task component, etc.) I currently have a few code idioms for various kinds of abstract data types and selective waits (i.e. prioritized with guards), and am open to suggestions for more. 3. Suntools menu interface: Context sensitive Sun popup menus for these and other GNUEmacs modes I would like to add a VADS library browsing mode (which would work similar to Emacs' Buffer Menu mode), but I haven't had the time (yet). GNU Emacs already has dynamic abbrevs (i.e. can complete a name based on others already entered in the buffer), and hiding of indented structure (replaced by "...") deeper than a user-settable threshold. Together with the interface to a.tags I added, browsing of Ada code isn't too hard. One of my major gripes is that there appear to be no Ada prettyprinters that can work on code *fragments*. They all seem to work only on entire Ada compilation units; I don't even know of any ones which can recover from syntax errors in the Ada code and continue prettyprinting. Such restrictions make prettyprinters largely useless during the editing process. If a prettyprinter existed which could work on a code fragment, then one could easily create an Emacs "prettyprint-region" command by invoking the prettyprinter as an inferior process with the region as input. Bob Munck's suggestion of "outliner" like facilities for Ada is a good one. However, I thought that most document outliners assume that the document is tree-structured. But Ada's static semantics make Ada code a network, not a pure tree. (For instance, if you do something to a private type declaration, then the refinement in the private part may change, as well as references in the body, etc.) So an Ada "outliner" would need to be network structured, and deal with Ada syntax and static semantics. The commercial failure of DIANA has made attainment of this dream unlikely for those of us who cannot afford a Rational as our personal plaything. By the way, I believe that COMPASS is working on a smart interface to editing Ada source code, which eventually will include handling of network-like dependencies. If anyone from COMPASS is reading this, could you please enlighten us? Steven Litvintchouk MITRE Corporation Burlington Road Bedford, MA 01730 (617)271-7753 ARPA: sdl@mitre-bedford.arpa UUCP: ...{cbosgd,decvax,genrad,ll-xn,mit-eddie,philabs,utzoo}!linus!sdl "Those who will be able to conquer software will be able to conquer the world." -- Tadahiro Sekimoto, president, NEC Corp.