Return-Path: Delivered-To: apmail-incubator-lucy-dev-archive@www.apache.org Received: (qmail 39066 invoked from network); 21 Feb 2011 20:34:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 21 Feb 2011 20:34:20 -0000 Received: (qmail 29977 invoked by uid 500); 21 Feb 2011 20:34:20 -0000 Delivered-To: apmail-incubator-lucy-dev-archive@incubator.apache.org Received: (qmail 29896 invoked by uid 500); 21 Feb 2011 20:34:20 -0000 Mailing-List: contact lucy-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: lucy-dev@incubator.apache.org Delivered-To: mailing list lucy-dev@incubator.apache.org Received: (qmail 29887 invoked by uid 99); 21 Feb 2011 20:34:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Feb 2011 20:34:20 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [128.149.139.106] (HELO mail.jpl.nasa.gov) (128.149.139.106) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Feb 2011 20:34:12 +0000 Received: from mail.jpl.nasa.gov (altvirehtstap01.jpl.nasa.gov [128.149.137.72]) by smtp.jpl.nasa.gov (Switch-3.4.3/Switch-3.4.3) with ESMTP id p1LKXn28013976 (using TLSv1/SSLv3 with cipher RC4-MD5 (128 bits) verified FAIL) for ; Mon, 21 Feb 2011 12:33:50 -0800 Received: from ALTPHYEMBEVSP20.RES.AD.JPL ([128.149.137.82]) by ALTVIREHTSTAP01.RES.AD.JPL ([128.149.137.72]) with mapi; Mon, 21 Feb 2011 12:33:49 -0800 From: "Mattmann, Chris A (388J)" To: "lucy-dev@incubator.apache.org" Date: Mon, 21 Feb 2011 12:29:00 -0800 Thread-Topic: [lucy-dev] Porting Clownfish compiler to C Thread-Index: AcvSBqTqdYO8bFIPQKSGZJTykOn5Ow== Message-ID: <1FF6A3B1-7F49-4F67-926E-60F52EFF245F@jpl.nasa.gov> References: <20110221201600.GA27558@rectangular.com> In-Reply-To: <20110221201600.GA27558@rectangular.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Source-IP: altvirehtstap01.jpl.nasa.gov [128.149.137.72] X-Source-Sender: chris.a.mattmann@jpl.nasa.gov X-AUTH: Authorized X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [lucy-dev] Porting Clownfish compiler to C Hey Marvin, Is there any reason to look at SWIG for the language bindings (not now, but= maybe later?). I know SWIG is pretty good at taking C code and generating = language specific bindings and that SVN uses it. Cheers, Chris On Feb 21, 2011, at 12:16 PM, Marvin Humphrey wrote: > Greets, >=20 > The porting of the Clownfish compiler to C has been underway for the last > several weeks. As previously discussed, this move was necessary in order= to > replace the Perl-licensed CPAN module Parse::RecDescent with the public-d= omain > Lemon parser generator, written in C by SQLite author Richard Hipp. =20 >=20 > Now that LEGAL-86 has finally been resolved favorably, usage of > Parse::RecDescent no longer blocks our 0.1.0-incubating release, taking s= ome > of the urgency out of the task. Nevertheless, trunk/clownfish is in a > transitional state right now and I think it makes sense to push through t= o a > coherent stopping point. >=20 > The end goal is to have Clownfish entirely in C, as once that is done, it > eliminates the dependency for other Lucy host language bindings on Perl. > These are the stages of the transition: >=20 > 1. *DONE* Migrate to an inside-out object model within the Clownfish > compiler internals. This makes it easier to move piecemeal from Perl > implementations to XS to C implementations. > 2. *DONE* Eliminate sophisticated usage of polymorphism by Clownfish > compiler components, e.g. by rolling up many Type classes into one > module. In our C-based compiler, we can still use crude inheritance > based on struct layout and casting, but we don't want to require meth= od > overriding if we can help it. > 3. *UNDERWAY* Port primary Clownfish components to thin XS wrappers arou= nd C > implementations. This includes everything within trunk/clownfish/lib= / > except the items under lib/Clownfish/Binding/ and lib/Clownfish/Parse= r.pm. > 4. Port everything under trunk/clownfish/lib/Clownfish/Binding/ to XS > wrappers around C code. > 5. Port Clownfish/Parser.pm to an XS wrapper around a C implementation u= sing > Lemon. > 6. Port all the test files in trunk/clownfish/t/ to C, using the test > harness code provided by Charmonizer. > 7. Change the interface by which bindings are spec'd to e.g. parse stati= c > JSON files rather than be invoked from Perl code, and change over all= the > binding specs embedded within .pm files in trunk/perl/lib/ to use the= new > interface. > 8. Remove all Perl/XS from trunk/clownfish/. >=20 > In order to eliminate Parse::RecDescent as a dependency, we need to get > through stage 5, and that had been my previous goal for the 0.1.0-incubat= ing > release. Now it seems to make sense to pause after either stage 3 or sta= ge 4. >=20 > I look forward to completing all 8 stages, as once all the Perl code is > eliminated, it will make it easier for a larger Lucy community whose prim= ary > expertise is in C to grok, to maintain and to write new host language > bindings. >=20 > Marvin Humphrey >=20 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Chris Mattmann, Ph.D. Senior Computer Scientist NASA Jet Propulsion Laboratory Pasadena, CA 91109 USA Office: 171-266B, Mailstop: 171-246 Email: chris.a.mattmann@nasa.gov WWW: http://sunset.usc.edu/~mattmann/ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Adjunct Assistant Professor, Computer Science Department University of Southern California, Los Angeles, CA 90089 USA ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++