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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,34872f3f22b5b140 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-11-08 13:10:59 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.arcor-online.net!newsfeed01.sul.t-online.de!t-online.de!newspeer1-gui.server.ntli.net!ntli.net!newsfep1-gui.server.ntli.net.POSTED!53ab2750!not-for-mail From: "chris.danx" User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2b) Gecko/20021016 X-Accept-Language: en-gb, en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Suggestion for gnatstub References: <3dcb9e51$0$303$bed64819@news.gradwell.net> <3DCBC4C9.AD436CD9@earthlink.net> In-Reply-To: <3dcb9e51$0$303$bed64819@news.gradwell.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Inktomi-Trace: pc2-bbrg1-4-cust108.renf.cable.ntl.com 1036789854 1400 80.4.70.108 (8 Nov 2002 21:10:54 GMT) Message-ID: Date: Fri, 08 Nov 2002 21:09:39 +0000 NNTP-Posting-Host: 80.1.224.4 X-Complaints-To: abuse@ntlworld.com X-Trace: newsfep1-gui.server.ntli.net 1036789854 80.1.224.4 (Fri, 08 Nov 2002 21:10:54 GMT) NNTP-Posting-Date: Fri, 08 Nov 2002 21:10:54 GMT Organization: ntl News Service Xref: archiver1.google.com comp.lang.ada:30613 Date: 2002-11-08T21:09:39+00:00 List-Id: Marin David Condic wrote: > Actually, I dislike gnatstub because it doesn't generate null > functions. I often want the stubs to be executable so I can test > higher level code and do iterative builds. ("O.K. I got *this* > function working right, now lets go build the next one..." Saves on > having to build test harnesses.) I'd imagine it would be fairly > straightforward to include an option that let the user select the > desired behavior - raise exceptions or generate working code. I'd also like to see some revisions to gnatstub like this. Something that smartly creates stub functions that work when possible. I'm wrote quite a few packages over the summer and wanted to try out an iterative development style tought in our software development course (to test it out... :) ). The package spec would be written, then a stub generated, then a higher level module coded and tested. The stub would then be replaced with the correct code, tested with the aid of the higher level (coordinate) module plus some extra code. The scheme worked well, but I found that gnatstub was not all that useful, because it generated function bodies that needed recoding to be stubs. I would also like it to put the comments from the spec, which could be controlled by a flag. Also the ability to specify a test code function (and location) that it could use to generate code of the form procedure make_type (xx : in yy) is begin some_log_routine ("make_type called with value", xx); end make_type; or something like that. Even if it just put the name of the procedure being called to the log routine it would cut down a heck of a lot of work. This strategy is what I use to write code now (atleast in Ada). I take a problem, write a spec, generate a stub (usually by hand) and then write the test code. Finally, the code for the implementation is filled in and tested incrementally. It is very effective and I would benefit greatly from a smarter gnatstub (sadly I have no time to modify or redesign it, too much bloody work!). Chris -- for personal replies change spamoff to chris