comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeff Burns" <Duke0657@aol.com>
Subject: Re: Ada95 Pretty-Printers
Date: 1997/06/12
Date: 1997-06-12T00:00:00+00:00	[thread overview]
Message-ID: <5np59j$bb4$1@client3.news.psi.net> (raw)
In-Reply-To: 339C58A6.4D5A@sprintmail.com



Wes, thanks for mentioning Ada-ASSURED.  I'm glad you think so highly of it.

Ada-ASSURED may be a good solution for John Volan:

> Apex is frustrating because it actively reformats
> almost every syntactic structure in Ada to suit Rational's coding style.
> This style is based on the LRM, but it does certain things that are
> fairly intrusive.

Ada-ASSURED also formats every syntactic structure, but the 
formatting is apparently higher quality and easier to customize.  
In both examples that you describe, Ada-ASSURED will print the 
code as desired:

>   procedure Operation
>     (This  : in     This_Type;
>      That  : in     That_Type;
>      Other :    out Other_Type);
> 

This is done automatically by the pretty-printer and can be
customized.

>   if Very_Long_Conditional_Expression
>      Spanning_Multiple_Lines
>   then
>     First_Sequence_Of_Statements;
>     ...
>   elsif Short_One_Line_Conditional

We provide a couple options for the above example: the user can choose to
either align the "then" with the "if", or to leave the "then" on the same
line as the "if".  Once the customization is set, all occurrences of
"if-then" will be formatted according to the choice.

> Apex does a lot of this sort of thing (I don't _even_ want to begin on
> how it mangles long expressions), but it doesn't provide very many hooks
> to control this behavior. 

Ada-ASSURED has a long list of ways to change the pretty-printing according
to a user's requirements. However, there are cases in which the
pretty-printing cannot be easily customized [how meaningful would
standardization really be if everything is customized by end-users?].

> 
> Are there any batch pretty-printers out there (commercial or free) that
> can do syntax-level indenting while still respecting the user's
> line-breaks? Or even better, are there any pretty-printers that can
> actively reformat, but which are customizable, maybe using syntax
> templates? 

GrammaTech has two tools to choose from:  Ada-ASSURED and, soon to be
released, Ada-Utilities.  Both can actively reformat code according to user
settings of the pretty-printing parameters.  Batch processing is an option
with Ada-ASSURED and a standard feature with Ada-Utilities.

Ada-ASSURED is for sites that want an advanced language-sensitive editor for
ensuring coding standards are followed as the code is being written.

Ada-Utilities is for sites working with existing code that don't need or
want a language-sensitive editor. It provides code analysis for identifying
problem areas and a set of tools for correcting those problems, including a
high quality pretty printer and language-sensitive code transformations. 
Ada-Utilities is intended to be used for QA and IV&V.

Here are brief descriptions of both products:

Ada-ASSURED (AA) is similar to the Apex editor, but it can be easily
integrated with other tools and your choice of compilers (and it's much less
expensive).  AA checks for syntax errors, monitors/automates coding style,
provides context-sensitive templates and a browser, and includes the option
of structural editing in addition to conventional textual editing. 

AA formats code automatically or on-demand.  One of its coolest features is
dynamic formatting.  In automatic mode AA formats your code as you're typing
it in.  If you change your window width, the formatting will adjust
automatically so your code is still readable. This way you can have multiple
windows of various sizes open at once and they'll all be easy to read.  Of
course, when you go to print your code Ada-ASSURED will print it at the
standard 80 column width (or whatever you set it at, such as 132 or even
"two up") with or without line number margins.

AA does true syntax coloring, not just lexical coloring like Emacs (there is
a difference). Pretty printing looks best when printed through a standard or
color PostScript printer. 

In August we plan to release a new toolset called Ada-Utilities, which will
include the same batch pretty-printing facilities as Ada-ASSURED.  The other
utilities it will include are:

Ada-Audit: a programmable tool for monitoring compliance with coding
standards. Creates reports viewable on web browsers with HTML links to
coding errors and HTML cross-references to appropriate sections of the SPC
AQ&S and the LRM.

Ada-Grep: a structured find utility with an additional argument to narrow
the search to a particular Ada structure, such as a name, an expression or a
statement.

Ada-Transform:  imagine a language-sensitive version of awk, sed, or perl. 
This tool helps you precisely locate and modify, if you wish, any fragment
of code locally or globally.

Ada 95 and Ada 83 are supported by Ada-ASSURED and Ada-Utilities.  Both
include a Scheme-based scripting language providing access to the structure
of your code and additional customizability.

-----------------------------
Jeff Burns, Director of Marketing
GrammaTech, Inc.
One Hopkins Place
Ithaca, NY  14850
ph: 607-273-7340
fax: 607-273-8752
e-mail:  jeff@grammatech.com
www:  http://www.grammatech.com
Team Ada
==============================
Ada-ASSURED
	LSE
	Style Standards Enforcer
	Browser
	QA Tool
	Code Transformer
"Cure for the Common Code"
==============================





      parent reply	other threads:[~1997-06-12  0:00 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <339C58A6.4D5A@sprintmail.com>
1997-06-10  0:00 ` Ada95 Pretty-Printers Anonymous
1997-06-10  0:00   ` John G. Volan
1997-06-10  0:00 ` Samuel Mize
1997-06-10  0:00   ` John G. Volan
1997-06-10  0:00     ` Spam Hater
1997-06-10  0:00       ` Spam Hater
1997-06-16  0:00     ` Greg Gicca @pulsar
1997-06-10  0:00   ` John G. Volan
1997-06-11  0:00     ` Samuel Mize
1997-06-12  0:00     ` John G. Volan
1997-06-13  0:00       ` Samuel Mize
1997-06-14  0:00         ` Tom Phinney
1997-06-14  0:00         ` Robert Dewar
1997-06-14  0:00           ` Samuel Mize
1997-06-14  0:00             ` Robert Dewar
1997-06-12  0:00     ` Robert Dewar
1997-06-10  0:00   ` stuman
1997-06-11  0:00 ` Rolf Ebert
1997-06-11  0:00   ` John G. Volan
1997-06-11  0:00 ` Matthew Heaney
1997-06-12  0:00 ` Jeff Burns [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox