[Python-Dev] SoC AST generation question

"Martin v. Löwis" martin at v.loewis.de
Tue Mar 20 09:04:22 CET 2007


Jay Parlar schrieb:
> 1) Who would most likely mentor this project?

As Brett says, it all depends on the applications we receive and
those that get accepted. That said, it might be me.

> 2) I've never worked in the core before (but have been using Python as
> my primary language for about 6 years), so I'm wondering if the
> potential mentor thinks it'd even be feasible for me to jump at a
> project like this without prior knowledge.

Notice that there are really two separate AST projects listed: one
is to improve usage of the AST compiler, by, say, adding more passes
to it, or allowing round-tripping from the Python representation.
The other one is to generate ast.c, which currently is hand-written,
but could probably be generated automatically. This would not improve
any end-user features, but would improve the maintainability, as
currently, changing the AST is tedious as you have to change so
much other stuff as well.

> I'm interested in this project for two reasons. The first is that I'm
> still trying to pick my PhD thesis, and I'm leaning in the direction
> of automated code generation for embedded systems. I feel like working
> on this project would at least push me one way or another in terms of
> picking. I've done a major code generation tool before, but it was for
> a problem domain I was already an "expert" in, so I didn't develop any
> generic methods.

If you want to focus on the "automated code generation" aspect, pick
the generation of ast.c. Generating C code from a "domain-specific
model" is a must-know of the compiler engineer. If you want to focus
on "embedded systems", manipulating on the ast level may be closer
as you will see how "backend" processing works (which you often
find important when generating code for a specific target system).

HTH,
Martin




More information about the Python-Dev mailing list