* Standard Ada program w\ all (possible) features @ 1996-10-06 0:00 Ruibiao Qiu 1996-10-07 0:00 ` Larry Kilgallen 1996-10-07 0:00 ` Robert Dewar 0 siblings, 2 replies; 9+ messages in thread From: Ruibiao Qiu @ 1996-10-06 0:00 UTC (permalink / raw) Hello, there Where can I get a sample program that includes as many as ada features as possible? Regards -- Ruibiao Qiu Email: rqiu01@cs.fiu.edu Home Page: http://www.cs.fiu.edu/~rqiu01/ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Standard Ada program w\ all (possible) features 1996-10-06 0:00 Standard Ada program w\ all (possible) features Ruibiao Qiu @ 1996-10-07 0:00 ` Larry Kilgallen 1996-10-07 0:00 ` Michael Feldman 1996-10-16 0:00 ` James Squire 1996-10-07 0:00 ` Robert Dewar 1 sibling, 2 replies; 9+ messages in thread From: Larry Kilgallen @ 1996-10-07 0:00 UTC (permalink / raw) In article <32585204.41C6@cs.fiu.edu>, Ruibiao Qiu <rqiu01@cs.fiu.edu> writes: > Where can I get a sample program that includes as many as > ada features as possible? I hope the answer is the validation suite (although perhaps not meeting an implicit single program requirement). Larry Kilgallen ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Standard Ada program w\ all (possible) features 1996-10-07 0:00 ` Larry Kilgallen @ 1996-10-07 0:00 ` Michael Feldman 1996-10-16 0:00 ` James Squire 1 sibling, 0 replies; 9+ messages in thread From: Michael Feldman @ 1996-10-07 0:00 UTC (permalink / raw) In article <1996Oct7.101423.1@eisner>, Larry Kilgallen <kilgallen@eisner.decus.org> wrote: >In article <32585204.41C6@cs.fiu.edu>, Ruibiao Qiu <rqiu01@cs.fiu.edu> writes: > >> Where can I get a sample program that includes as many as >> ada features as possible? > >I hope the answer is the validation suite (although perhaps not >meeting an implicit single program requirement). > >Larry Kilgallen The validation suite consists of many, many programs and doesn't come close to what this student is after. We do need to point out that a reasonable Ada "program" typically consists of a main and several packages; a monolithic Pascal-style program is simply not Ada-like. Actually, the instrument panel example from the GNAT samples library is a quite good approximation to what this student is looking for. It shows generics, dynamic data structures (linked lists), and type extension/dispatching quite nicely, in addition to the usual syntactic stuff. Tasking is missing; also user-defined exceptions. But as a concise example of most of Ada 95, I'd recommend it highly. It's included with every GNAT distribution archive. Mike Feldman ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Standard Ada program w\ all (possible) features 1996-10-07 0:00 ` Larry Kilgallen 1996-10-07 0:00 ` Michael Feldman @ 1996-10-16 0:00 ` James Squire 1996-10-17 0:00 ` Robert Dewar 1 sibling, 1 reply; 9+ messages in thread From: James Squire @ 1996-10-16 0:00 UTC (permalink / raw) Larry Kilgallen wrote: > > In article <32585204.41C6@cs.fiu.edu>, Ruibiao Qiu <rqiu01@cs.fiu.edu> writes: > > > Where can I get a sample program that includes as many as > > ada features as possible? > > I hope the answer is the validation suite (although perhaps not > meeting an implicit single program requirement). The problem is that it is very difficult to sift through the maze to find just some sample code to drag out. At least I know this is the problem I had with ACES, and I know that ACVC is laced with "illegal Ada", which is actually a placeholder for the real code which the user is supposed to supply. I get the feeling it's sort of like trying to pull the table-cloth out without disturbing the dishes. -- James Squire mailto:m193884@csehp1.mdc.com MDA Avionics Tools & Processes McDonnell Douglas Aerospace http://www.mdc.com/ Opinions expressed here are my own and NOT my company's "He must never know what happened. If he should find out, he must be killed. Do you understand, Delenn?" -- Grey Council #1 (re: Sinclair), "And the Sky Full of Stars" ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Standard Ada program w\ all (possible) features 1996-10-16 0:00 ` James Squire @ 1996-10-17 0:00 ` Robert Dewar 0 siblings, 0 replies; 9+ messages in thread From: Robert Dewar @ 1996-10-17 0:00 UTC (permalink / raw) James Squire said "The problem is that it is very difficult to sift through the maze to find just some sample code to drag out. At least I know this is the problem I had with ACES, and I know that ACVC is laced with "illegal Ada", which is actually a placeholder for the real code which the user is supposed to supply." Sorry, I know the suite pretty well (I even helped to write some pieces of it), and I have not the slightest idea what you are talking about! ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Standard Ada program w\ all (possible) features 1996-10-06 0:00 Standard Ada program w\ all (possible) features Ruibiao Qiu 1996-10-07 0:00 ` Larry Kilgallen @ 1996-10-07 0:00 ` Robert Dewar 1996-10-16 0:00 ` James Squire 1 sibling, 1 reply; 9+ messages in thread From: Robert Dewar @ 1996-10-07 0:00 UTC (permalink / raw) "Where can I get a sample program that includes as many as ada features as possible?" Hopefully nowhere! What a horrible idea. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Standard Ada program w\ all (possible) features 1996-10-07 0:00 ` Robert Dewar @ 1996-10-16 0:00 ` James Squire 1996-10-17 0:00 ` Robert Dewar 0 siblings, 1 reply; 9+ messages in thread From: James Squire @ 1996-10-16 0:00 UTC (permalink / raw) Robert Dewar wrote: > > "Where can I get a sample program that includes as many as > ada features as possible?" > > Hopefully nowhere! > What a horrible idea. Not if you are evaluating a compiler it isn't. -- James Squire mailto:m193884@csehp1.mdc.com MDA Avionics Tools & Processes McDonnell Douglas Aerospace http://www.mdc.com/ Opinions expressed here are my own and NOT my company's "He must never know what happened. If he should find out, he must be killed. Do you understand, Delenn?" -- Grey Council #1 (re: Sinclair), "And the Sky Full of Stars" ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Standard Ada program w\ all (possible) features 1996-10-16 0:00 ` James Squire @ 1996-10-17 0:00 ` Robert Dewar 1996-10-18 0:00 ` Geert Bosch 0 siblings, 1 reply; 9+ messages in thread From: Robert Dewar @ 1996-10-17 0:00 UTC (permalink / raw) iJames Squire wrote "Robert Dewar wrote: > > "Where can I get a sample program that includes as many as > ada features as possible?" > > Hopefully nowhere! > What a horrible idea. Not if you are evaluating a compiler it isn't." No, I disagree, a test program that randomly used as many features as possible in a single program would be unlikely to be a useful test. What is needed is a much more systematic approach to testing interactions of features. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Standard Ada program w\ all (possible) features 1996-10-17 0:00 ` Robert Dewar @ 1996-10-18 0:00 ` Geert Bosch 0 siblings, 0 replies; 9+ messages in thread From: Geert Bosch @ 1996-10-18 0:00 UTC (permalink / raw) It was written: Q: "Where can I get a sample program that includes as many as Ada features as possible?" A> "Hopefully nowhere! What a horrible idea. James Squire wrote: "Not if you are evaluating a compiler it isn't. " Robert Dewar (dewar@merv.cs.nyu.edu) wrote: "No, I disagree, a test program that randomly used as many features as possible in a single program would be unlikely to be a useful test. What is needed is a much more systematic approach to testing interactions of features." The best test will be the real world. Of couse you need to check coverage, but real-world use is much different from theoretical use. I've written a basic OS/2 Presentation Manager framework using delegation instead of specialization. This way parts can work together with others than their parents, which makes it possible to build applications withou creating children. The delegation is implemented using a layered filter approach. Many Ada'95 "features" (I hate the word) are being used and indeed the Ada compiler (GNAT v3.05) cannot compile it, so it is a test of the compiler too. The framework uses: -- child units to allow extensions of the basic model to look at private data -- generic packages, since delegation works for all types of messages -- generic packages using generic packages as formal parameter, since the layered filter can use any Boolean_Set implementation -- tagged types, since specialization is still a useful concept for GUI frameworks. -- Complex C interfacing, since the OS/2 API is aimed at C. -- Access-to-subprogram values, since Presentation Manager needs callback functions -- Tasking, since every window has its own seperate thread (in OS/2 speak). -- Class-wide types, for polymorphism I can't really pick the things that are new to Ada-95, because many of them are small but important details/enhancements One strange thing was that I found that specialization and class-wide types were also needed at a few points to break cyclic dependency. Example: The Message_Filter package needs a Message type The Message type needs a Window The Window has a Message_Filter Using an abstract message not containing the Window turned out to be a solution. The Window converts any Window_Message to a Root_Message before delegation which uses the Message_Filter. The subpart to which the message is delegated converts it back to a Window_Message. Little bit clumsy at first, but when you think about it, there are no other solutions except using access types all over the place. Also, when you consider that the contents of the message should be opaque to the Message_Filter package using a Root_Message type is more logical. So, when you want to test a compiler, implement a solution to a complex problem. You also test the language that way. Probably we won't see a good Ada'95 compiler before people actually write (useful) Ada'95 programs and learn the (im)possibilities of the new language extensions. For example, I didn't see any tasking Ada-95 program larger than a few hunderd lines yet. Probably nobody will ever succeed in correctly implementing the complete Ada'95 language (even excluding annexes). So checking corners of the languages for bugs is not useful, concentrate on real-world programs. Those are the programs an Ada compiler should be able to compile. Regards, Geert -- E-Mail: geert@sun3.iaf.nl ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~1996-10-18 0:00 UTC | newest] Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 1996-10-06 0:00 Standard Ada program w\ all (possible) features Ruibiao Qiu 1996-10-07 0:00 ` Larry Kilgallen 1996-10-07 0:00 ` Michael Feldman 1996-10-16 0:00 ` James Squire 1996-10-17 0:00 ` Robert Dewar 1996-10-07 0:00 ` Robert Dewar 1996-10-16 0:00 ` James Squire 1996-10-17 0:00 ` Robert Dewar 1996-10-18 0:00 ` Geert Bosch
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox