feat(tools/DSL): reimplement emit_* functions using CIL