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=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.224.51.68 with SMTP id c4mr30798522qag.7.1380988000383; Sat, 05 Oct 2013 08:46:40 -0700 (PDT) X-Received: by 10.49.35.243 with SMTP id l19mr1977qej.15.1380988000326; Sat, 05 Oct 2013 08:46:40 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!a6no4719529qak.0!news-out.google.com!9ni11763qaf.0!nntp.google.com!i2no614802qav.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 5 Oct 2013 08:46:40 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=82.43.197.131; posting-account=g4n69woAAACHKbpceNrvOhHWViIbdQ9G NNTP-Posting-Host: 82.43.197.131 References: <87fee75d-04d9-49bb-8cb2-4c5ea7f98cdf@googlegroups.com> <2013100300100162749-rblove@airmailnet> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <0bda50e3-0620-4765-ac3d-11d2d1780dff@googlegroups.com> Subject: Re: example of machine generated Ada ? From: Martin Injection-Date: Sat, 05 Oct 2013 15:46:40 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:17401 Date: 2013-10-05T08:46:40-07:00 List-Id: On Thursday, October 3, 2013 7:14:33 AM UTC+1, Niklas Holsti wrote: > On 13-10-03 07:10 , Robert Love wrote: >=20 > > On 2013-10-02 17:37:04 +0000, Patrick said: >=20 > >=20 >=20 > >> Hi Everyone >=20 > >> >=20 > >> I am just daydreaming about generating Ada from another language. >=20 > >> >=20 > >> Several languages use C as an intermediate language but hand written C >=20 > >> is hard to read and machine generated is even more painful. Ada might >=20 > >> make for reliable, readable machine generated code. >=20 > >> >=20 > >> Thanks-Patrick >=20 > >=20 >=20 > > There was a product in the 90s called Matrixx, it let you draw flow >=20 > > charts and type in algorithms and drag connections between components >=20 > > your created graphically. You pushed the button and out popped some of >=20 > > the ugliest Ada you can imagine. My point is you can have code >=20 > > generators but there is no guarantee of the quality, readablity or >=20 > > maintainablity. >=20 >=20 >=20 > If I remember correctly, the motivation for including a goto statement >=20 > in Ada was that automatic code generators might need it. This perhaps >=20 > shows what kind of code was expected from such generators... GOTOs in auto-generated code are not usual...in the late 80's Jackson Struc= tured Programming (JSP) diagrams -> COBOL often used GOTOs...but that was f= ine...it allowed implementation of the "Backtracking" technique in the JSP = method and also, "who cares" what the auto-generated code looks like - you'= re supposed to be only looking at the diagrams. It's the same reason we don't care about the 'gotos' in the assembler from = your-favourite-Ada-compiler :-) -- Martin