tion, tutorials...) and its support, either commer-
cial or through a community.
• Scalability is a mandatory requirement. The size
of industrial system means large model and thus
the ability to generate large documents gener-
ally also based on complex templates.
• Efficiency is less critical in case of batch/server
based generation. However, for laptop generation
or when frequently update of a work document or
developing a template, good speed of generation
(i.e. under a minute) is important. Reducing the
generation scope may also be used to accelerate
modelling/generation cycles.
• Usability is important for industrial adoption. We
should not assume the developer/maintainer of
a generator template has a programming back-
ground and favour declarative and easy to learn
tools. Two complementary levels need to be
easy to use: how to retrieve information from the
model and how to present that information in the
document under the adequate form (see FR). This
requires a good learning curve of the associated
language (preferably standard like OCL), good
writing support for both of the above levels and
good readability, i.e. to maintain and evolve the
generator template, preferably with some mod-
ularity feature. In order to invoke the tool, a
good user interface integration with the mod-
elling tool is required while a portable API (e.g.
Java) is also useful for non UI invocation, e.g. for
batch/nightly document regeneration.
3 MODEL TO DOCUMENT
GENERATION STRATEGIES
Different strategies may be considered to produce a
document from a model. In this section, we review
the available design space and give some high-level
guidelines that can help drive the choice based on typ-
ical trade-offs that need to be considered.
Template-based Generation. The most obvious
choice is to use a single transformation tool able to
convert a model into the target document format based
on a transformation specified through some template
which can take the form of a specific format (e.g.
XML with a specific schema) or a Domain Specific
Language (DSL). This simple design helps to give
good control on the available features and perfor-
mance. However, restricted choices may be available
for the model source/target document format combi-
nation. If multiple document formats need to be con-
sidered, developing independent converters for each
format is not a good idea because the template design
will not be reused. An additional converter might be
chained to transform the target document into other
formats if the converter is reliable enough (e.g. to
produce a PDF from most editable formats). In this
context, we obviously restrict to Model-to-Text gen-
eration tools. This transformation can be managed by
an independent library, e.g. Gendoc (Eclipse, 2018)
or M2Doc (Obeo, 2019) for EMF) or directly inside a
Word processor through internal macro/scripting. The
latter is not recommended because the scripting lan-
guage is not effective and maintainable for such trans-
formation and for accessing a model repository. An
editor is also not optimised for generation and should
not be required at this step.
Generic Reporting Tools. Efficient reporting tools
exist and are able to generate many different tar-
get document formats either editable (office docu-
ments but also spreadsheets or even presentations) or
read-only (PDF). Birt (Eclipse Foundation, 2005) and
Jasper (Jaspersoft, 2005) are examples of such plat-
forms. They usually rely on an internal report descrip-
tion format that is populated from one or several data
sources. The usual scenario is rather to generate busi-
ness reports from spreadsheets or relational databases.
However, data sources can be extended through ad-
ditional drivers through a protocol such as the Open
Data Access (ODA) which includes support for con-
necting, accessing meta-data, and executing queries.
It is not restricted to classical relational databases and
can also be used for model-based repositories. For ex-
ample, an EMF connector is available and can be used
together with Birt (Eclipse Foundation, 2008) with
queries in OCL. The developed template can then be
run in server mode. The performance might be im-
pacted by the efficiency of the query engine. Alter-
natively, an intermediate data file in a specific format
might also be produced from the model and fed more
efficiently in the reporting tool.
Existing Modelling Platforms. Some modelling
platforms integrate reporting capabilities and some
also support model interchange, e.g. the MagicDraw
tool can process EMF and also generate files us-
ing Velocity Template Library (Apache Foundation,
2006). However, this setting is hard to automate and
reuse outside of this specific toolchain even though
some parts might be open source.
Relying on an Intermediary Format. Is an inter-
esting option because such a format can stay abstract
enough to capture the essence (semantics) of the re-
Assessment of EMF Model to Text Generation Strategies and Libraries in an Industrial Context
435