
{% import "transformers/java/macros" as macros %}

    public static void {{transformer.name}}({% for fqn,varname in transformer.src_variables %}{{fqn}} {{varname}}, {%endfor%}{{transformer.dest_fqn}}) {
        // Declare the local and temp vars first
        {% for varname, vartyperef in transformer.symtable.declarations %}
        {{ signature(vartyperef) }} {{ varname }};
        {% endfor %}

        // And now the instructions
        {% for instruction in transformer.instructions %}
        {{ macros.render_instruction(instruction) }}
        {% endfor %}
    }


# if we had pattern matching that applied nodes recursive?

Given, Output{a}, Input{x,w}
a.b.c.d = f1(x.y.z)
a.b.c.d.e = f2(w.x.y)

# For mutable:
if (!a.hasB()) {
    a.setB(new B())
}
if (!a.getB().hasC()) {
    a.getB().setC(new C())
}
a.getB().getC().setD(... final register value of f1(x.y.z) ....)


get_rules(FP x:[]) = [ ]
get_rules(FP x:y:[]) = [ Getter x y ]
get_rules(FP x:y:rest) = (Getter x y) : get_rules(FP y:rest)
