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 2002:a24:78c:: with SMTP id f134-v6mr7887408itf.36.1521944245444; Sat, 24 Mar 2018 19:17:25 -0700 (PDT) X-Received: by 2002:a9d:6217:: with SMTP id g23-v6mr598796otj.11.1521944245343; Sat, 24 Mar 2018 19:17:25 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!paganini.bofh.team!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!u184-v6no2345226ita.0!news-out.google.com!j10-v6ni2505ite.0!nntp.google.com!199-v6no2354173itl.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 24 Mar 2018 19:17:25 -0700 (PDT) In-Reply-To: <87732f2a-4032-467d-b8c9-cfff2f1b670c@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=47.185.233.194; posting-account=zwxLlwoAAAChLBU7oraRzNDnqQYkYbpo NNTP-Posting-Host: 47.185.233.194 References: <7eaadf74-c55f-4c00-8f13-bf027cce130e@googlegroups.com> <6188b81f-7d6a-4ea4-90d4-74142471d979@googlegroups.com> <66082e27-14ca-45d1-b8ff-7fe825cd2687@googlegroups.com> <17b6ac53-6b99-430e-8bac-63311ea1fffe@googlegroups.com> <2b114d79-3af8-4285-b645-e2ea6b83331a@googlegroups.com> <2108cec0-fcb7-4b9e-b68c-15dc274d85e1@googlegroups.com> <131606956.543351411.509161.laguest-archeia.com@nntp.aioe.org> <8cd36360-51bb-4d7b-b823-afd244a83344@googlegroups.com> <1220246767.543424591.870799.laguest-archeia.com@nntp.aioe.org> <82e2a3ff-b7e8-42b2-9dc7-84c0910ca184@googlegroups.com> <1720809648.543445951.620902.laguest-archeia.com@nntp.aioe.org> <1485479787.543449660.880348.laguest-archeia.com@nntp.aioe.org> <7a8e40b3-7100-4bb2-a6a7-a3b1d4d59b94@googlegroups.com> <6fcbdb10-3d5c-4a54-b75c-157b9ed9a093@googlegroups.com> <251782d7-d40b-422e-801a-3670b6da8e1b@googlegroups.com> <2624e271-85d1-4753-8a70-47733d36b4b2@googlegroups.com> <11a9ef2e-2b91-46d0-98aa-8ad9c617f790@googlegroups.com> <38f6ef66-4f7d-48df-894f-869d1bb8eb96@googlegroups.com> <87732f2a-4032-467d-b8c9-cfff2f1b670c@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <86abcb30-87f6-42bb-b28b-cf0033633132@googlegroups.com> Subject: Re: LLVM and Ada From: "Dan'l Miller" Injection-Date: Sun, 25 Mar 2018 02:17:25 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:51194 Date: 2018-03-24T19:17:25-07:00 List-Id: On Friday, March 23, 2018 at 11:38:03 AM UTC-5, Shark8 wrote: > Insofar as Byron is concerned: > (a) I intend for the backend to be completely modularizable, and therefor= e am not married to any particular code-generator. > (b) Nobody who wanted LLVM codegen has contributed to the code-base. For multiple people or sponsoring companies (or even federal grant-writing = agencies) to get involved in your work, you would need to have some sweet-s= melling pollen to attract bees to your flower, so to speak. If pluggabilit= y of different backends is the primary/sole definition of modularity in Byr= on, there seems currently to exist only 3 pluggable open-source backends th= at could conceivably serve as Byron's backend processor machine-code genera= tion (i.e., GCC, LLVM, and OpenWatcom) and only a few bytecode backends (e.= g., CLR, JVM). Of these 5, only one seems compelling: LLVM. If you seek additional developers or sponsoring companies, then Byron needs= to have a special sauce, because LLVM backend for GNAT seems to be a matte= r of an immense amount of debugging & fixing those bugs. So why develop a = new Ada compiler from scratch when the primary competitor simply needs to b= e finished? Answer: because Byron would have other modularities: for exa= mple, 1) plug in different schools of thought on semantic-correctness checks: Do= n't like Ada2020's =E2=80=9Cconservative=E2=80=9C (Draconian?) regime of ta= sking correctness? Then plug in Ada2012's instead. Or permit development = of custom semantic-correctness checks on a per-company (e.g., DoD contracto= r) or per-project (e.g., this model of nuclear submarine) basis. Or plug i= n Spark's. 2) Make language features themselves modular. If Dmitry wants coroutines, = then Dmitry simply writes a DLL that plugs into Byron that defines the synt= ax of coroutines according to Byron's syntax API or AST and that defines th= e semantics of coroutines according to Byron's semantics API. 3) Make the stages of compilation modular: write a multi-stage compiler th= at embraces =E2=80=A2generating=E2=80=A2 Ada source code that then smoothly= compiles generated & human-authored Ada source code. 4) Make the AST modular to be bolted onto Clang's AST (to permit automated = transformation of C++ or Objective-C code to Ada), onto Roslyn's AST (to pe= rmit automated transformation of C# code to Ada), onto Java's AST (to permi= t automated transformation of Java code to Ada), and so forth. Or in other words, you need a better elevator speech. You are almost there= ; pick a modularity problem that is interesting to you to solve in addition= to pluggable backend.