comp.lang.ada
 help / color / mirror / Atom feed
* Ada 83 pretty printers
@ 1999-08-26  0:00 Tony Vincent
  1999-08-26  0:00 ` Larry Kilgallen
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Tony Vincent @ 1999-08-26  0:00 UTC (permalink / raw)


Hi there, and thanks for reading my first posting.

I'm sure this is something which has cropped up before, but I am
currently working on a project which BADLY needs an Ada source code
formatter for Ada 83 code.  Can anybody point me in the direction of a
formatter with the following properties...?

1. Must be supplied as source code - it will be used on a secure system,
hence no downloaded executables allowed.  We use the Dec Ada compiler,
so Ada'83 only, but also have the Dec Pascal compiler available.
Gnat is not available due to restrictions on the source of executables
on our secure network.

2. Must have the ability to be customised, because some of the coding
standards on this project are a little odd.
e.g.
     if <expression>                  
     then  
        <code>                            
     end if;

or 
     type <type_mark> is
     record
        <component> : <component_type>
     end record;

Also, parameters, record components, "in out" etc. must align
vertically.

3. Must be able to handle the full language.  All of the ones I've
managed to get working so far fail in some area, usually instantiations
of generics, where they try to indent following a declaration such as 
       package MY_MATH is new MATH_LIB(float);




The most promising one I've found so far is the USAF ADAFMT2 (written in
Pascal!) but this mucks up the indentation following the instantiation
of generic packages, doesn't like representation clauses, and only
splits expressions (gobbled symbols) over lines if it can't fit them
onto a single line - hence no vertical alignment of parameters etc.
If I can't find anything better in the Ada world then I might just have
to start brushing up on my Pascal.

There appear to be some good formatters for Gnat, but I can't install
the gnat compiler because of the restrictions on the use of downloaded
executables.  Others I've tried include Napp, FORMAT2, a couple from the
Walnut Creek cdrom site, and one from Stuttgart university which proved
to be incomplete.


Any help will be greatly appreciated.
-- 
Tony V




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Ada 83 pretty printers
  1999-08-26  0:00 Ada 83 pretty printers Tony Vincent
@ 1999-08-26  0:00 ` Larry Kilgallen
  1999-08-26  0:00 ` Marin David Condic
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: Larry Kilgallen @ 1999-08-26  0:00 UTC (permalink / raw)


In article <NilaNAAFpax3Ewu6@avies.demon.co.uk>, Tony Vincent <tony@avies.demon.co.uk> writes:

> Gnat is not available due to restrictions on the source of executables
> on our secure network.

> There appear to be some good formatters for Gnat, but I can't install
> the gnat compiler because of the restrictions on the use of downloaded
> executables.  Others I've tried include Napp, FORMAT2, a couple from the
> Walnut Creek cdrom site, and one from Stuttgart university which proved
> to be incomplete.

GNAT is available by purchasing CDROMs from Walnut Creek,
or did you mean that your Walnut Creek experiments were
not on the secure network?

With some amount of work, it would also be possible to build
GNAT from source on your machine (if it is an Alpha), if that
is allowed by your particular security policy.

Larry Kilgallen




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Ada 83 pretty printers
  1999-08-26  0:00 Ada 83 pretty printers Tony Vincent
  1999-08-26  0:00 ` Larry Kilgallen
@ 1999-08-26  0:00 ` Marin David Condic
  1999-08-26  0:00 ` David C. Hoos, Sr.
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: Marin David Condic @ 1999-08-26  0:00 UTC (permalink / raw)


Tony Vincent wrote:

> Hi there, and thanks for reading my first posting.
>
> I'm sure this is something which has cropped up before, but I am
> currently working on a project which BADLY needs an Ada source code
> formatter for Ada 83 code.  Can anybody point me in the direction of a
> formatter with the following properties...?
>

I have an Ada pretty printer which I wrote a *very* long time ago and over
the years it has undergone some mods. It only does Ada83 code, but it was
compiled under DEC Ada for the Vax/Alpha/VMS system. I've run it through
GNAT for the Alpha/VMS system and it seems to be O.K. (after a couple of
minor mods for 1 Ada83/95 incompatibility and one GNAT/DEC-Ada
incompatibility) It has some system dependencies because of shortcomings of
Ada83 (getting command line parameters) but they should be minor if you want
to take it somewhere other than VMS.

I'll post it on my web site tonight. Let me know how it works out for you.

MDC
--
Marin David Condic
Real Time & Embedded Systems, Propulsion Systems Analysis
United Technologies, Pratt & Whitney, Large Military Engines
M/S 731-95, P.O.B. 109600, West Palm Beach, FL, 33410-9600
***To reply, remove "bogon" from the domain name.***

Visit my web page at: http://www.mcondic.com/






^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Ada 83 pretty printers
  1999-08-26  0:00 Ada 83 pretty printers Tony Vincent
  1999-08-26  0:00 ` Larry Kilgallen
  1999-08-26  0:00 ` Marin David Condic
@ 1999-08-26  0:00 ` David C. Hoos, Sr.
  1999-09-02  0:00   ` Tony Vincent
  1999-08-27  0:00 ` Simon Wright
  1999-09-03  0:00 ` Robert Dewar
  4 siblings, 1 reply; 11+ messages in thread
From: David C. Hoos, Sr. @ 1999-08-26  0:00 UTC (permalink / raw)



Tony Vincent <tony@avies.demon.co.uk> wrote in message
news:NilaNAAFpax3Ewu6@avies.demon.co.uk...
> Hi there, and thanks for reading my first posting.
>
> I'm sure this is something which has cropped up before, but I am
> currently working on a project which BADLY needs an Ada source code
> formatter for Ada 83 code.  Can anybody point me in the direction of a
> formatter with the following properties...?
>
Have you considered Ada Assured from
http://www.grammatech.com/products/ada/ada-products.html






^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Ada 83 pretty printers
  1999-08-26  0:00 Ada 83 pretty printers Tony Vincent
                   ` (2 preceding siblings ...)
  1999-08-26  0:00 ` David C. Hoos, Sr.
@ 1999-08-27  0:00 ` Simon Wright
  1999-09-03  0:00   ` Robert Dewar
  1999-09-03  0:00 ` Robert Dewar
  4 siblings, 1 reply; 11+ messages in thread
From: Simon Wright @ 1999-08-27  0:00 UTC (permalink / raw)


Tony Vincent <tony@avies.demon.co.uk> writes:

> Gnat is not available due to restrictions on the source of executables
> on our secure network.

Tail wags dog, perhaps?

If you get a support contract from ACT they will supply you GNAT and
tools on CD (well, they did for one of our support contracts ..)

I had been going to suggest Emacs ada-mode, but no doubt your security
droids would get all retentive about that too .. perhaps Emacs is on
the ACT CD too? can't remember ..




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Ada 83 pretty printers
  1999-08-26  0:00 ` David C. Hoos, Sr.
@ 1999-09-02  0:00   ` Tony Vincent
  1999-09-02  0:00     ` Tucker Taft
  1999-09-02  0:00     ` Larry Kilgallen
  0 siblings, 2 replies; 11+ messages in thread
From: Tony Vincent @ 1999-09-02  0:00 UTC (permalink / raw)


In article <7q4fhm$qhn@hobbes.crc.com>, David C. Hoos, Sr.
<david.c.hoos.sr@ada95.com> writes
>
>Tony Vincent <tony@avies.demon.co.uk> wrote in message
>news:NilaNAAFpax3Ewu6@avies.demon.co.uk...
>> Hi there, and thanks for reading my first posting.
>>
>> I'm sure this is something which has cropped up before, but I am
>> currently working on a project which BADLY needs an Ada source code
>> formatter for Ada 83 code.  Can anybody point me in the direction of a
>> formatter with the following properties...?
>>
>Have you considered Ada Assured from
>http://www.grammatech.com/products/ada/ada-products.html
>
>
Thanks for all the useful responses.

I had a look around the Grammatech website some time ago.  The tool
looks better than ideal, but unfortunately does not appear to be
supported on Vax/VMS.



I have taken a copy of Marin Condic's pretty printer source, and will
try it and post results shortly.



The problem with installing GNAT (or any other) executables is simply
that the supplier is not on the list of known software sources
maintained by the security guys (they don't get out much).
It's a knee-jerk reaction to anything unknown.

If GNAT could be built from source then it would be OK - the source
could be checked and system calls investigated (not that they ever are).
How would Gnat be built from source?  I guess you would need to compile
GNAT source written in Ada'83 through DEC-Ada to produce the Gnat '95
executables.

-- 
Tony V




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Ada 83 pretty printers
  1999-09-02  0:00   ` Tony Vincent
  1999-09-02  0:00     ` Tucker Taft
@ 1999-09-02  0:00     ` Larry Kilgallen
  1999-09-03  0:00       ` Robert Dewar
  1 sibling, 1 reply; 11+ messages in thread
From: Larry Kilgallen @ 1999-09-02  0:00 UTC (permalink / raw)


In article <pmVdOJAtmkz3Ew7W@avies.demon.co.uk>, Tony Vincent <tony@avies.demon.co.uk> writes:

> If GNAT could be built from source then it would be OK - the source
> could be checked and system calls investigated (not that they ever are).
> How would Gnat be built from source?  I guess you would need to compile
> GNAT source written in Ada'83 through DEC-Ada to produce the Gnat '95
> executables.

No, reports in this group are that you actually need to use GNAT
to build GNAT, but if your outfit would even consider building
software from source for security purposes I presume they have
a "scratch" machine.

Failing that, being the security conscious sort, I presume you
have lots of removable disks and you can install a scratch copy
of VMS to build using the possibly-tainted GNAT executable.

As a last resort, do what I do on Macintosh and dismount all the
"real" disks before running the unblessed software.  Macintosh
lacks an easy Mount command for non-removable disks, but to get
the same effect (security-wise) on VMS, you can demonstrate the
joys of turning on audits for the Mount operation (to prove that
the binary copy of GNAT you run to build from source does not have
any secret calls to the SYS$MOUNT system service).  Or point out
the security folks that Ken Thompson does not do Ada.

Larry Kilgallen




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Ada 83 pretty printers
  1999-09-02  0:00   ` Tony Vincent
@ 1999-09-02  0:00     ` Tucker Taft
  1999-09-02  0:00     ` Larry Kilgallen
  1 sibling, 0 replies; 11+ messages in thread
From: Tucker Taft @ 1999-09-02  0:00 UTC (permalink / raw)


Tony Vincent wrote:

> The problem with installing GNAT (or any other) executables is simply
> that the supplier is not on the list of known software sources
> maintained by the security guys (they don't get out much).
> It's a knee-jerk reaction to anything unknown.
> 
> If GNAT could be built from source then it would be OK - the source
> could be checked and system calls investigated (not that they ever are).
> How would Gnat be built from source?  I guess you would need to compile
> GNAT source written in Ada'83 through DEC-Ada to produce the Gnat '95
> executables.

For what it is worth, we have an Ada95 compiler that generates
optimized ANSI C as its intermediate.  You could perhaps run
whatever program you have written in Ada (83 or 95) through this front end,
and then run the generated C code by the security guys and gals.

Let me know if you want to investigate this.  Note that running all of
GNAT sources through this compiler is probably not practical, 
as GNAT source presumably uses some GNAT-specific pragmas, attributes, etc.

We are also amenable to making this compiler itself available on Vax/VMS.
Please let us know if you are interested.

> --
> Tony V

-- 
-Tucker Taft   stt@averstar.com   http://www.averstar.com/~stt/
Technical Director, Distributed IT Solutions  (www.averstar.com/tools)
AverStar (formerly Intermetrics, Inc.)   Burlington, MA  USA




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Ada 83 pretty printers
  1999-09-02  0:00     ` Larry Kilgallen
@ 1999-09-03  0:00       ` Robert Dewar
  0 siblings, 0 replies; 11+ messages in thread
From: Robert Dewar @ 1999-09-03  0:00 UTC (permalink / raw)



> In article <pmVdOJAtmkz3Ew7W@avies.demon.co.uk>, Tony Vincent
<tony@avies.demon.co.uk> writes:
>
> > If GNAT could be built from source then it would be OK - the
source
> > could be checked and system calls investigated (not that
they ever are).
> > How would Gnat be built from source?  I guess you would need
to compile
> > GNAT source written in Ada'83 through DEC-Ada to produce the
Gnat '95
> > executables.


The original version of GNAT was bootstrapped using Alsys Ada
on a Sun, but at this stage it would be an essentially hopeless
cause to build GNAT by any other path than bootstrapping it.

You can of course build GNAT from source, by starting with a
binary version of GNAT and then using it to compile GNAT.


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Ada 83 pretty printers
  1999-08-26  0:00 Ada 83 pretty printers Tony Vincent
                   ` (3 preceding siblings ...)
  1999-08-27  0:00 ` Simon Wright
@ 1999-09-03  0:00 ` Robert Dewar
  4 siblings, 0 replies; 11+ messages in thread
From: Robert Dewar @ 1999-09-03  0:00 UTC (permalink / raw)


In article <NilaNAAFpax3Ewu6@avies.demon.co.uk>,
  Tony Vincent <tony@avies.demon.co.uk> wrote:

> Gnat is not available due to restrictions on the source of
> executables on our secure network.

I am curious. I certainly see that you would not download
the public version of GNAT, and we don't recommend that anyone
do this for any mission critical project, let alone one that
is in a secure network environment, since indeed downloading
from public sites is a risk, you have no way of knowing what
is there for sure.

However, I fail to see why any distinction should be drawn
between DEC Ada, a commercial product of Compaq, and GNAT
Professional, a commercial product of Ada Core Technologies.

Indeed the fact that you can actually see what is in the sources
of GNAT should give you *more* confidence that there is nothing
potentially damaging.

Robert Dewar
Ada Core Technologies


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Ada 83 pretty printers
  1999-08-27  0:00 ` Simon Wright
@ 1999-09-03  0:00   ` Robert Dewar
  0 siblings, 0 replies; 11+ messages in thread
From: Robert Dewar @ 1999-09-03  0:00 UTC (permalink / raw)


In article <x7vbtbt4vik.fsf@pogner.moho>,
  Simon Wright <simon@pogner.demon.co.uk> wrote:
> I had been going to suggest Emacs ada-mode, but no doubt your
> security droids would get all retentive about that too ..
> perhaps Emacs is on the ACT CD too? can't remember ..

Our latest technology releases do include our complete EMACS
based integrated development environment, and yes, this can
be made available on CD ROM.

Robert Dewar
Ada Core Technologies


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.




^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~1999-09-03  0:00 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-08-26  0:00 Ada 83 pretty printers Tony Vincent
1999-08-26  0:00 ` Larry Kilgallen
1999-08-26  0:00 ` Marin David Condic
1999-08-26  0:00 ` David C. Hoos, Sr.
1999-09-02  0:00   ` Tony Vincent
1999-09-02  0:00     ` Tucker Taft
1999-09-02  0:00     ` Larry Kilgallen
1999-09-03  0:00       ` Robert Dewar
1999-08-27  0:00 ` Simon Wright
1999-09-03  0:00   ` Robert Dewar
1999-09-03  0:00 ` Robert Dewar

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