Co-founder of Strumenta. Essays on software languages, legacy systems and the craft of building tools.

274 articles · since 2009

A wide square in Lyon with Fourviere above it
DSLs & language workbenches · 1 min · 213 words · 59 of 60 in this topic · by

The Code as a Source for Models

The code as a source for models

I am taking a rest after some hours of work. I used the javassist library to extract information from the code of a layer in an enterprise application and use it to build a model to generate the successive layer. I wish I could extract some of the information using generics but the infamous “Java 1.4 only” constraint plagued me. Anyways, to use generics I would need to refactor a little bit the layer I am using as source of my model (aka the “source layer”) and I can’t.

There were moments where I wanted to bang my head so strongly on the wall but after some efforts I managed to extract the information in the 75% of the cases I needed to. Anyway it is information that comes for free because it is not expressed purposely to build my model, it is just normal code. The problem is that I can not obtain all the information automatically, I still need a human refinement of the model before I start the generation of the target layer. So I am considering if the information I obtained is worthy because it saved the 75% of the human effort needed to build the complete model or it useless because it is not enough to support automatization.

Mumble, mumble… opinions?

Federico Tomassetti

I build parsers, transpilers and languages for people whose work is too specific for off-the-shelf software. I co-founded Strumenta, in Torino.

Reply by email · I read everything.

If this was useful, there are more on the same problem.

More in DSLs & language workbenches

DSL for Modding Minecraft – Part 2 17 min read · code inside DSL for Modding Minecraft 14 min read Interview with Rutger Van Beusekom 16 min read

A legacy estate you need to understand before you commit.

See how Strumenta works

Disclosure — Strumenta is a company I co-founded.

One letter when there is something worth sending.

Written by Federico · Torino

Scroll to Top