comp.lang.ada
 help / color / mirror / Atom feed
* Ada-smart diff tool
@ 1997-03-20  0:00 W. Wesley Groleau (Wes)
  1997-03-22  0:00 ` Robert Dewar
  0 siblings, 1 reply; 9+ messages in thread
From: W. Wesley Groleau (Wes) @ 1997-03-20  0:00 UTC (permalink / raw)



Anyone aware of a tool to compare Ada files for syntax differences?
In other words, will not show differences in comments, whitespace,
or character case, but WILL show a change in parameter mode, the
addition of a default for a discriminant, the loss of an identifier
after "end" etc.

Preferably not affected by line breaks either.

Finally (if wishes were horses) has to be "free" software...

Thanks

---------------------------------------------------------------------------
W. Wesley Groleau (Wes)                                Office: 219-429-4923
Hughes Defense Communications (MS 10-41)                 Home: 219-471-7206
Fort Wayne,  IN   46808                  (Unix): wwgrol@pseserv3.fw.hac.com
---------------------------------------------------------------------------




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

* Re: Ada-smart diff tool
@ 1997-03-20  0:00 W. Wesley Groleau (Wes)
  1997-03-22  0:00 ` James D. Veale
  1997-03-25  0:00 ` Tom Halliley
  0 siblings, 2 replies; 9+ messages in thread
From: W. Wesley Groleau (Wes) @ 1997-03-20  0:00 UTC (permalink / raw)



:> did you look at the unix diff command? it does some of things
:> you wanted.

I appreciate the suggestion, but diff and sdiff will not get the job done.

I'm looking for a tool that will ONLY show genuine differences in the Ada

diff -b   will say that  An_Array(I)  and  An_Array ( I )  are different
which is not true for my purposes.

diff -w will say that   A := new block   and   A := newblock   are the same
which is not true for my purposes.

diff -i will say that  Result := "AAA"  is the same as  Result := "aaa"
which is not true for my purposes.

And finally, I know of _no_ trick whereby  diff will recognize that

if This_Is_True then    is the same as       if This_Is_True
                                             then

I have to compare thousands of lines for "REAL" changes and am trying
to save the time of looking at changes that need not be made just to
determine that they need not be made!

But I can't just blindly install the "new" code, because I actually
need to ensure that such a "REAL" change is correct.

I can do tricks with awk/sed/perl and pretty printers to reformat the
Ada before diff-ing it, but I was checking to see if I could find a tool
with the features already coded....

---------------------------------------------------------------------------
W. Wesley Groleau (Wes)                                Office: 219-429-4923
Hughes Defense Communications (MS 10-41)                 Home: 219-471-7206
Fort Wayne,  IN   46808                  (Unix): wwgrol@pseserv3.fw.hac.com
---------------------------------------------------------------------------




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

* Re: Ada-smart diff tool
  1997-03-20  0:00 Ada-smart diff tool W. Wesley Groleau (Wes)
@ 1997-03-22  0:00 ` Robert Dewar
  1997-03-25  0:00   ` Nick Roberts
  0 siblings, 1 reply; 9+ messages in thread
From: Robert Dewar @ 1997-03-22  0:00 UTC (permalink / raw)



Wes said about the comparison tool he wants:

<<Finally (if wishes were horses) has to be "free" software.>>

I assume that the quotes around free here mean that you are not really
saying that it has to be free software (i.e. freely distributable, as
defined by RMS), but rather that you do not want to pay anything for
it (Hughes apparently not being in the business of paying for software :-) :0)

If so, a better term is freeware. 

There are two issues here.

1) You are quite happy to pay something for this software, but it is 
important to you to have sources, and the rights for unfettered
redistribution.

2) You don't want to pay a dime, but you don't want sources, and don't need
to be able to redistribute it.

These are quite separate concepts. The term Free Software (as referenced
in the FSF) refers specifically to 1, and not to 2. Note that it is possible
for free software to also be available without paying a dime, but that is
not the main emphasis.

The term freeware seems to have come into pretty general use to describe 2.





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

* Re: Ada-smart diff tool
  1997-03-20  0:00 W. Wesley Groleau (Wes)
@ 1997-03-22  0:00 ` James D. Veale
  1997-03-24  0:00   ` Jeff
  1997-03-25  0:00 ` Tom Halliley
  1 sibling, 1 reply; 9+ messages in thread
From: James D. Veale @ 1997-03-22  0:00 UTC (permalink / raw)




Dear Mr. Groleau,

   I sell a DOS based tool,  COMPLITE,  which will do most of what you
desire.  You can find a demonstration version at:

   http://world.std.com/~jdveale

Sincerely yours,

   Jim Veale
----------------------------------------------------------------------------

On Thu, 20 Mar 1997, W. Wesley Groleau wrote:
> diff -b   will say that  An_Array(I)  and  An_Array ( I )  are different
> which is not true for my purposes.

  Complite's PGM comparison mode handles this.  The parentheses are
recognized as delimiters.

> diff -w will say that   A := new block   and   A := newblock   are the same
> which is not true for my purposes.

  Complite performs a word-by-word comparison.  So these are different.

> diff -i will say that  Result := "AAA"  is the same as  Result := "aaa"
> which is not true for my purposes.

  Can't help on this one. 

> And finally, I know of _no_ trick whereby  diff will recognize that
> 
> if This_Is_True then    is the same as       if This_Is_True
>                                              then

  Complite's TEXT comparison format is insensitive to changes in text
flow, and will treat these as the same.

  Complite's keyword and phrase processing can be configured to ignore ADA
style comments as well.
----------------------------------------------------------------------------







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

* Re: Ada-smart diff tool
  1997-03-22  0:00 ` James D. Veale
@ 1997-03-24  0:00   ` Jeff
  0 siblings, 0 replies; 9+ messages in thread
From: Jeff @ 1997-03-24  0:00 UTC (permalink / raw)



Wes,

Ada-ASSURED can do a smart dif.

This tool really is Ada-smart.  It reads your code into an attributed
tree where each node in the tree corresponds to a program structure.  In
this way it automatically categorizes each construct in your file.  In
contrast, if you used text-oriented tools like awk, sed, grep, or perl,
you must do the categorization yourself.

Ada-ASSURED can also do a smart grep where it can do a structured search
across multiple Ada files.

Tasks like these are trivial with the AA scripting language because it
has access to the structure of your Ada program, not just the text.

There is a small catch, however.  It's not free (some of us tool vendors
who invested in Ada would like to eat, too ;-), unless you're an
academic teaching an Ada class.  I'd be happy to let you try it out for
free, however.  Drop me a line if you'd like an eval.

Jeff Burns

-----------------------------
Jeff Burns, Director of Marketing
GrammaTech, Inc.
Ithaca, NY  14850
ph: 607-273-7340
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"
=============================




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

* Re: Ada-smart diff tool
  1997-03-22  0:00 ` Robert Dewar
@ 1997-03-25  0:00   ` Nick Roberts
  0 siblings, 0 replies; 9+ messages in thread
From: Nick Roberts @ 1997-03-25  0:00 UTC (permalink / raw)




Robert Dewar <dewar@merv.cs.nyu.edu> wrote in article
<dewar.859060828@merv>...
> Wes said about the comparison tool he wants:
> 
> <<Finally (if wishes were horses) has to be "free" software.>>
> 
[and then he rattles on about the FSF etc.]

Getting back to the original question ... it sounds to me like this would
be an excellent assignment for a postgraduate (or undergraduate?) student
project. This might also solve the cost problem. (Nothing like killing two
birds with one stone, eh?) Now all we have to do is find the students!

Nick ;-}






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

* Re: Ada-smart diff tool
  1997-03-20  0:00 W. Wesley Groleau (Wes)
  1997-03-22  0:00 ` James D. Veale
@ 1997-03-25  0:00 ` Tom Halliley
  1 sibling, 0 replies; 9+ messages in thread
From: Tom Halliley @ 1997-03-25  0:00 UTC (permalink / raw)



I'm unaware of an existing tool that will solve your problem, but
there is a technology that helps:  ASIS.

ASIS (Ada Semantic Interface Specification) is an Ada API
(soon to be an ISO standard) provided by some Ada vendors which
allows a tool developer to fetch syntactic and semantic information
about a compiled Ada program.  Hence, one could write an ASIS-based
tool that displays a _semantic_ difference between two units, as
opposed to a simple lexical/syntactic difference via diff/sdiff/etc.

Contact your Ada vendor regarding ASIS and tools built thereupon.

TomH
-----------------------------------------------------------------------
         J. Thomas Halliley     |     Aonix
Principal Software Engineer     |     5040 Shoreham Place
          tomh@sd.aonix.com  ___|___  San Diego, CA 92122  619.824.0348




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

* Re: Ada-smart diff tool
@ 1997-03-31  0:00 W. Wesley Groleau (Wes)
  1997-03-31  0:00 ` Robert Dewar
  0 siblings, 1 reply; 9+ messages in thread
From: W. Wesley Groleau (Wes) @ 1997-03-31  0:00 UTC (permalink / raw)



> ASIS (Ada Semantic Interface Specification) is an Ada API
> (soon to be an ISO standard) provided by some Ada vendors which
> allows a tool developer to fetch syntactic and semantic information
> about a compiled Ada program.  Hence, one could write an ASIS-based
> tool that displays a _semantic_ difference between two units, as
> opposed to a simple lexical/syntactic difference via diff/sdiff/etc.

ASIS is a Good Thing.  But can it do such a comparison between two
versions of the _same_ unit?

FWIW, diff/sdiff are _not_ adequate, since they can be fooled by
one space vs. no space and by line breaks (at the syntax level).

---------------------------------------------------------------------------
W. Wesley Groleau (Wes)                                Office: 219-429-4923
Hughes Defense Communications (MS 10-41)                 Home: 219-471-7206
Fort Wayne,  IN   46808                  (Unix): wwgrol@pseserv3.fw.hac.com
---------------------------------------------------------------------------




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

* Re: Ada-smart diff tool
  1997-03-31  0:00 W. Wesley Groleau (Wes)
@ 1997-03-31  0:00 ` Robert Dewar
  0 siblings, 0 replies; 9+ messages in thread
From: Robert Dewar @ 1997-03-31  0:00 UTC (permalink / raw)



Wesley asks

<<ASIS is a Good Thing.  But can it do such a comparison between two
versions of the _same_ unit?>>

This is very confused, but partly this confusion was caused by thee
original post. ASIS is just a tool kit it cannot do comparisons or
anything else, it is just a library on which you build tools. Can
you build a tool on top of ASIS that does comparisons of two vesions
of the same unit -- certainly you could build such a tool!





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

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

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-03-20  0:00 Ada-smart diff tool W. Wesley Groleau (Wes)
1997-03-22  0:00 ` Robert Dewar
1997-03-25  0:00   ` Nick Roberts
  -- strict thread matches above, loose matches on Subject: below --
1997-03-20  0:00 W. Wesley Groleau (Wes)
1997-03-22  0:00 ` James D. Veale
1997-03-24  0:00   ` Jeff
1997-03-25  0:00 ` Tom Halliley
1997-03-31  0:00 W. Wesley Groleau (Wes)
1997-03-31  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