comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: Source code instrumentation as compilation part?
Date: Sun, 09 Feb 2014 08:55:21 +0000
Date: 2014-02-09T08:55:21+00:00	[thread overview]
Message-ID: <lyha881x8m.fsf@pushface.org> (raw)
In-Reply-To: 30a19252-d0c4-4f43-9e1b-76f6f3ed7f78@googlegroups.com

droiddermo@gmail.com writes:

> Looks like the ASIS library can help me out, but it is made for
> creating separate tools. Is it possible to integrate ASIS-based tool
> with GNAT? So for example to write a tool that would be loaded by GNAT
> during compilation, and would modify nodes in the AST before it (the
> AST) is about to be transformed into GIMPLE.

Avatox[1], Ada Via Asis TO Xml, contains a prototype of a tool "axf2ada"
to take an XML representation of code (generated by avatox and possibly
modified on the lines you suggest) and (re)generate Ada.

GNAT contains various tools built using ASIS, including the formatter
gnatpp (which clearly regenerates Ada). ASIS GPL 2013 contains in
tools/gnat2xml a converter like Avatox and a regenerator xml2gnat (I
think they may only have included this for testing gnat2xml, but still
...)

> Or is it possible to get GIMPLE from GNAT compiler, modify and pass it
> to GCC? I couldn't find if there is a working GIMPLE front-end inside
> GCC, but it seems that GIMPLE is used internally only. I can dump it
> with pretty much and GCC compiler, but I can't recompile modified
> GIMPLE afterwards.

There's also the possibility of LLVM via DragonEgg[2], but it seems to
be rather behind the GCC wavefront (not surprising, it's a major
project).

[1] http://www.mckae.com/avatox.html
[2] http://dragonegg.llvm.org


      reply	other threads:[~2014-02-09  8:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-09  7:18 Source code instrumentation as compilation part? droiddermo
2014-02-09  8:55 ` Simon Wright [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox