OCL2018 workshop Text Model - M2M for M2T paper
diff --git a/qvt/docs/OCL2018TextM2M/.gitignore b/qvt/docs/OCL2018TextM2M/.gitignore
new file mode 100644
index 0000000..ed39a5f
--- /dev/null
+++ b/qvt/docs/OCL2018TextM2M/.gitignore
@@ -0,0 +1,4 @@
+/.~lock.TextM2M.odg#
+/TextM2M.synctex.gz
+/TextM2M.aux
+/TextM2M.log
diff --git a/qvt/docs/OCL2018TextM2M/ATLXMLM2M.png b/qvt/docs/OCL2018TextM2M/ATLXMLM2M.png
new file mode 100644
index 0000000..0e68be6
--- /dev/null
+++ b/qvt/docs/OCL2018TextM2M/ATLXMLM2M.png
Binary files differ
diff --git a/qvt/docs/OCL2018TextM2M/AcceleoExample.png b/qvt/docs/OCL2018TextM2M/AcceleoExample.png
new file mode 100644
index 0000000..54c2c6a
--- /dev/null
+++ b/qvt/docs/OCL2018TextM2M/AcceleoExample.png
Binary files differ
diff --git a/qvt/docs/OCL2018TextM2M/ExampleInstances.png b/qvt/docs/OCL2018TextM2M/ExampleInstances.png
new file mode 100644
index 0000000..2932f0c
--- /dev/null
+++ b/qvt/docs/OCL2018TextM2M/ExampleInstances.png
Binary files differ
diff --git a/qvt/docs/OCL2018TextM2M/M2MM2TFeatureModel.png b/qvt/docs/OCL2018TextM2M/M2MM2TFeatureModel.png
new file mode 100644
index 0000000..8dcbeba
--- /dev/null
+++ b/qvt/docs/OCL2018TextM2M/M2MM2TFeatureModel.png
Binary files differ
diff --git a/qvt/docs/OCL2018TextM2M/ModelM2M.png b/qvt/docs/OCL2018TextM2M/ModelM2M.png
new file mode 100644
index 0000000..374b6c0
--- /dev/null
+++ b/qvt/docs/OCL2018TextM2M/ModelM2M.png
Binary files differ
diff --git a/qvt/docs/OCL2018TextM2M/QVToExample.png b/qvt/docs/OCL2018TextM2M/QVToExample.png
new file mode 100644
index 0000000..d3b6069
--- /dev/null
+++ b/qvt/docs/OCL2018TextM2M/QVToExample.png
Binary files differ
diff --git a/qvt/docs/OCL2018TextM2M/TextM2M.odg b/qvt/docs/OCL2018TextM2M/TextM2M.odg
new file mode 100644
index 0000000..521e231
--- /dev/null
+++ b/qvt/docs/OCL2018TextM2M/TextM2M.odg
Binary files differ
diff --git a/qvt/docs/OCL2018TextM2M/TextM2M.pdf b/qvt/docs/OCL2018TextM2M/TextM2M.pdf
new file mode 100644
index 0000000..d18a521
--- /dev/null
+++ b/qvt/docs/OCL2018TextM2M/TextM2M.pdf
Binary files differ
diff --git a/qvt/docs/OCL2018TextM2M/TextM2M.png b/qvt/docs/OCL2018TextM2M/TextM2M.png
new file mode 100644
index 0000000..28315f5
--- /dev/null
+++ b/qvt/docs/OCL2018TextM2M/TextM2M.png
Binary files differ
diff --git a/qvt/docs/OCL2018TextM2M/TextM2M.tex b/qvt/docs/OCL2018TextM2M/TextM2M.tex
new file mode 100644
index 0000000..b4ad5a4
--- /dev/null
+++ b/qvt/docs/OCL2018TextM2M/TextM2M.tex
@@ -0,0 +1,483 @@
+% This is LLNCS.DEM the demonstration file of
+% the LaTeX macro package from Springer-Verlag
+% for Lecture Notes in Computer Science,
+% version 2.4 for LaTeX2e as of 16. April 2010
+%
+\documentclass{llncs}
+%
+\usepackage{makeidx}  % allows for indexgeneration
+\usepackage[pdftex]{graphicx}
+\usepackage[T1]{fontenc}
+\usepackage[utf8]{inputenc}
+\usepackage{upquote}
+%
+\begin{document}
+%
+\mainmatter              % start of the contributions
+%
+\title{A text model - Use your favourite M2M for M2T}
+%
+\titlerunning{Textual M2M}  % abbreviated title (for running head)
+%                                     also used for the TOC unless
+%                                     \toctitle is used
+%
+\author{Edward D. Willink}
+%
+\authorrunning{Edward Willink} % abbreviated author list (for running head)
+%
+%%%% list of authors for the TOC (use if author list has to be modified)
+\tocauthor{Edward Willink}
+%
+\institute{Willink Transformations Ltd, Reading, England,\\
+\email{ed\_at\_willink.me.uk}}
+
+
+\maketitle              % typeset the title of the contribution
+
+\begin{abstract}
+Models provide a disciplined representation of information. Model-to-Model (M2M) transformations convert between model structures. When a more readable representation is required, Model-to-Text (M2T) transformations convert a model structure to a concatenation of character sequences. We ignore the obvious conversion differences and demonstrate that an unmodified M2M tool can be used for M2T. We achieve this with a standard Text model that post-processes the M2M model output to yield formatted text. 
+
+\keywords{Model transformation, M2M, M2T, Text model}
+\end{abstract}
+%
+\section{Introduction}
+%
+For model enthusiasts, everything is a model and every change is a model-to-model transformation. Models are persisted in a form that is suitable for automated use, often involving XMI files or model databases. Unfortunately, in the real world there are many occasions where a practical representation of a model is required. If the information is to be maintained by humans, something more readable than XML is required. If the information is to be consumed by a tool, such as a C compiler that has no knowledge of models, the information must be provided in the tool-specific language, such as C. A model-to-text transformation is therefore required to provide the model in the required form.
+
+An M2T destroys models whereas an M2M preserves models; consequently there is an orthodoxy that M2M and M2T are different technologies. An M2T language is designed around string template expressions, whereas an M2M language is designed around model mappings. This orthodoxy is endorsed by the Object Management Group (OMG) where M2M is facilitated by the Query/View/Transformation (QVT) specification \cite{QVT-1.3} and M2T by the MOFM2T specification \cite{MOFM2T-1.0}. There are a variety of correspondingly named implementations of the QVT languages \cite{Eclipse-QVTd}, \cite{Eclipse-QVTo}. Acceleo \cite{Eclipse-Acceleo} is the only (partial) implementation of MOFM2T.
+
+In this paper we examine the distinctive characteristics of M2T in Section~\ref{M2T} before examining an M2M solution in Section~\ref{M2M}. In Section~\ref{Evaluation} we evaluate the solution before outlining future work in Section~\ref{Future Work}. We consider related work in Section~\ref{Related Work} and conclude in Section~\ref{Conclusions}. 
+
+\section{Is M2T necessarily distinct?}\label{M2T}
+
+At this point I must thank Toni Siljamaki for his obstinate persistence in asking why Eclipse QVTo couldn't be used to perform M2T \cite{Bug396543}. My initial instinctive reaction was to fall back on orthodoxy; OMG provide distinct specifications and anyway M2M and M2T are obviously different. However after some reflection, it is clear that the "M2" facilities such as metamodels, loading, navigation, expressions, queries and rules are the same for both M2M and M2T. Only the final "2M" or "2T" need be different. Requiring the use of distinct M2M and M2T tools is not justifiable.
+
+How might an M2M support text? Only one change and one enhancement appear to be necessary:
+
+\begin{itemize}
+	\item change: output to a text file rather than model file
+	\item enhancement: better facilities for creating strings / character sequences
+\end{itemize}
+
+\subsection{Text Output}\label{Text Output}
+
+In MOFM2T, the rules (templates) conspire to concatenate and return Strings. M2M tools can already do this since the underlying language, typically OCL \cite{OCL-2.4}, has a String type and String operations. It is just necessary to amend the output model declaration to identify that the overall String result is to be emitted directly as a text File, rather than encoded as an XML file.
+
+\subsection{Text Facilities}\label{Text Facilities}
+
+Considering the following example output text:
+
+\begin{verbatim}
+The name is "computedName".
+\end{verbatim}
+
+Typical M2T tools such as Acceleo or Xtend provide a forward escape to embed a control expression within literal text. 
+
+\begin{verbatim}
+The name is "[self.name/]".  -- MOFM2T/Acceleo with escaped OCL
+The name is "«this.name»".   -- Xtend with escaped Java
+\end{verbatim}
+
+A backwards escape may define a multi-line text expression that concatenates with its siblings and may have nested forward escapes. However an OCL-based M2M without escapes may only concatenate explicitly.
+
+\begin{verbatim}
+'The name is "[self.name/]".'       -- MOFM2T
+'''The name is "«this.name»".'''    -- Xtend
+\end{verbatim}
+
+An OCL-based M2M without escapes may only concatenate explicitly.
+
+\begin{verbatim}
+'The name is "'+ self.name +'".'    -- OCL
+\end{verbatim}
+
+OCL provides a fairly modest String library and an overall expression evaluation capability that allows complex String results to be computed. No change is therefore mandated to enable an OCL-based M2M to be used as an M2T although enhanced String capabilities could well be helpful for applications with a high proportion of literal text.
+
+Considering the following example output with a repeated computation:
+
+\begin{verbatim}
+{ "firstComputedName", "secondComputedName" }
+\end{verbatim}
+
+A for loop facility with optional before/prefix, separator and after/suffix texts is helpful. The examples below show Acceleo and then Xtend.
+
+\begin{verbatim}
+{ [for (p : P | somePs) separator(', ')]"[p.name/]"[/for] }
+{ «FOR p : somePs SEPARATOR ', '»"«p.name»"«ENDFOR» } 
+\end{verbatim}
+
+An OCL-based M2M may use collect() for the content iteration, but the separator splicing is verbose.
+
+\begin{verbatim}
+'{ '+ somePs->collect(p | '"'+ p.name +'"')
+  ->iterate(s; acc : String = '' |
+      if acc = '' then s else acc +', '+ s endif
+    )  +' }'
+\end{verbatim}
+
+\section{M2M solution}\label{M2M}
+
+Figure~\ref{fig:ModelM2M} shows the typical components of an M2M transformation and associated environment that we re-use for M2T. The core M2M transforms between input and output models, each of which conforms to its corresponding metamodel, which in turn conforms to a universal metametamodel such as Ecore. The input model is loaded from an input file by an XMI load facility, and the output model is saved by a corresponding XMI save facility.
+
+\begin{figure}
+	\begin{center}
+		\includegraphics[width=4.9in]{ModelM2M.png}
+	\end{center}
+	\caption{M2M for models}
+	\label{fig:ModelM2M}
+\end{figure}
+
+After many years reflection, the solution to using an M2M for M2T arose from another longstanding problem; how can an M2M be used to perform an XML2XML transformation?
+
+\subsection{XML2XML}\label{XML2XML}
+
+The need for an XML2XML transformation arises when there is a need to manipulate some aspect of the XMI serialization of a model in a way that is not accessible to a regular M2M. Typically there may be a need to impose some policy on the xmi:ids that are a serialization rather than model artefact. There is no xmi:id within the model technology space and so any solution that tries to expose an xmi:id is messy.
+
+\begin{figure}
+	\begin{center}
+		\includegraphics[width=4.9in]{ATLXMLM2M.png}
+	\end{center}
+	\caption{ATL injector and extractor for XML M2M}
+	\label{fig:ATLXMLM2M}
+\end{figure}
+
+B\'ezevin \cite{TechnologySpace} identified distinct model, grammar and XSD technology spaces and the early versions of ATL \cite{Eclipse-ATL} supported XML2XML transformation through the use of custom injectors and extractors as shown in Figure~\ref{fig:ATLXMLM2M}. ATL's weak metamodel typing allowed the XML metamodel to remain a little vague. Unfortunately these custom load and save functionalities have suffered from bit rot and are no longer available; XML2XML is no longer supported by ATL. 
+
+%If however a transformation is performed in the XML technology space, the xmi:id is there and can be manipulated as desired. Of course we do not want to have to use separate XML and Model technology space transformation tools, and so since XML is self-evidently a model, how can an M2M be used for XML2XML? The original implementation of the ATL M2M that accompanied the technology space papers provided alternative 'injectors' so that a model could be loaded in its XML-conforming rather than Ecore-conforming form.
+
+\begin{figure}
+	\begin{center}
+		\includegraphics[width=4.9in]{XMLM2M.png}
+	\end{center}
+	\caption{Variant EMF loader and saver for XML Model M2M}
+	\label{fig:XMLM2M}
+\end{figure}
+
+The proprietary ATL injector and extractor are not necessary when using EMF since the variant loading and saving functionality can be encapsulated by a custom XML Resource allowing it to be used by any M2M tool. We may therefore use the structure shown in Figure~\ref{fig:XMLM2M}.
+
+The main difficulty in implementing this approach lies in the absence of a good metamodel for XML. After examining a few candidates, it was clear that none was suitable as a standard against which users could write their XML transformations. The SAX parser \cite{SAXparser} is the de facto standard and so the http://www.eclipse.org/qvt/2018/XML metamodel was defined to closely correspond to the familiar SAX parsing events; startElement() creates, and starts to populate, an Element; endElement() completes population. The model vocabulary of the XML metamodel is therefore obvious to anyone familiar with the vocabulary of the SAX parser events.
+
+Migrating the functionality from proprietary ATL injector/extractor to EMF Resources enables the XML technology space to be used whenever \verb$*.xmlmodel$ is used as the file extension of an input/output model. No modification to tools is required. % unless file extensions such as \verb$*.xml$ or \verb$*.ecore$ are to be selectively usable in either Model or XML technology spaces. Without change standard file extension are always for use in the Model technology space; the new \verb$*.xmlmodel$ is always in the XML technology space.
+
+\subsection{Text Model}\label{Text Model}
+
+The same approach can be used to provide a much simpler and tool-independent solution for using M2M for M2T. This is shown in Figure~\ref{fig:TextM2M}. The M2M transforms to a Text output model which the Text save serializes as a conventional text file.
+
+\begin{figure}
+	\begin{center}
+		\includegraphics[width=4.9in]{TextM2M.png}
+	\end{center}
+	\caption{Use of M2M for M2T}
+	\label{fig:TextM2M}
+\end{figure}
+
+The main challenge is to design a suitable Text metamodel.
+
+\subsection{Text Structure}\label{Text Structure}
+
+Language parsers such as lex and yacc \cite{DragonBook} and their many successors discover the structure of source text by successively aggregating to more powerful concepts:
+
+\begin{itemize}
+	\item 8 bit bytes in a source file/stream
+	\item Multi-byte characters corresponding to Unicode `letters'
+	\item Multi-character tokens corresponding to `words'
+	\item Multi-token rules/productions corresponding to `clauses' and `sentences'
+\end{itemize}
+
+This conversion sequence is very successful for Text-to-Model conversion but the rules/productions are not appropriate for Model-to-Text conversion since the details of the whitespace formatting are typically discarded once the tokens have been identified. For Model-to-Text purposes, some form of pretty printing is necessary to make the result acceptable to a human reader. We would also like to avoid the language-specific limitations of a typical Text-to-Model grammar.
+
+Traditional M2T tools just concatenate Character Sequences and so we might consider that their \verb$text$ metamodel is just a Sequence of Character. Reifying such a metamodel for M2M usage is easy but the need to assign each character as a distinct model element is pretty unacceptable. Perhaps in QVTo:
+
+\begin{verbatim}
+...                                -- 'The name is'
+characters += object text::Character { value := ' '; };
+characters += object text::Character { value := '"'; };
+forEach (c : self.name.characters()) {
+    characters += object text::Character { value := c; };
+}
+characters += object text::Character { value := '"'; };
+\end{verbatim}
+
+We should therefore look to some form of multi-Character model.
+
+A significant challenge for practical M2T tools is providing satisfactory indentation and inter-element separation for hierarchical and iterated text structures. The challenge arises because indentation is used within string templates both to indent the output text and to make the control expressions readable. 
+
+For Acceleo, the conflict between template and control characters can require empirical iteration to get a satisfactory result. The documentation recommends use of a separate pretty formatting pass if non-trivial formatting is needed.
+
+The Xtend UI uses a grey background to distinguish template characters. This is helpful but not always perfect since the grey background is omitted from new-line characters. Empirical programming cannot always solve the problem.
+
+\subsection{Text Metamodel}\label{Text Metamodel}
+
+With a Text metamodel, we can separate the concerns. 
+
+\begin{itemize}
+	\item The M2M transformation language statements provide a readable exposition.
+	\item The Text Model declarations control pretty printing.
+\end{itemize}
+
+\begin{figure}
+	\begin{center}
+		\includegraphics[width=4.9in]{TextModel.png}
+	\end{center}
+	\caption{Metamodel for Text}
+	\label{fig:TextModel}
+\end{figure}
+
+The Text model shown in Figure~\ref{fig:TextModel} compromises a tree of StringNode elements organized by \verb$parent$/ordered-\verb$children$ relationships. The additional attributes provide declarations to control the pretty printing performed by the Text Saver.
+
+\subsection{Text Saver}\label{Text Saver}
+
+The result text is formed as the concatenation of a depth-first traversal of the value of the \verb$text$ property of each StringNode.
+
+The detailed formatting of groups of children is facilitated by a \verb$prefix$ before the first, a \verb$separator$ between each child and a \verb$suffix$ after the last child. Additionally an \verb$endText$ may follow the children even if there are no children.
+
+The \verb$indent$ specifies an indentation increment for this node. The cumulative indentation of a node and its parents starts every non-empty line.
+
+An M2M transforms to create the StringNode tree comprising the important text segments and formatting declarations that influence the final serialization. No characters are provided that are not directed by the StringNode.%; it is therefore possible, if desired, to create a text output that is completely free of any new-lines. 
+
+The Text Saver is implemented by a custom EMF TextResource that replaces the conventional XML serialization by the pretty printed text resulting from the depth first tree traversal and formatting declarations.
+
+A corresponding Text Loader is also implemented, mainly for test purposes. The serialization during a Text Save is not fully reversible and so the corresponding replacement functionality when loading is limited to identifying whitespace indentation hierarchies and punctuation separators for matching indentations. Any serious Text-to-Model application probably needs a more powerful approach such as an Xtext parser \cite{Eclipse-Xtext}.
+
+\section{Evaluation}\label{Evaluation}
+
+The Text Model has been used in conjunction with Eclipse QVTo to generate C, H, Lex (Flex) and Y (Bison) files from an Ecore file for an auto-generated XMI loader.
+
+No changes were required to Eclipse QVTo and only a couple of minor bug reports were raised. Problems were easily circumvented. Overall there seemed to be fewer problems than when using Acceleo or Xtend. All approaches share the pleasant characteristic of M2T development that problems are clearly visualized in the textual output. Additional debug output can provide helpful insights. Development time was focussed on the correct content of the Flex and Bison declarations to be generated rather than struggling with their formatting.
+
+Execution of the M2M for text is fast. The 2000 lines of the four XMI loader files are generated in less than a second.
+
+\subsection{Example}\label{Example}
+
+The utility of this approach can be assessed by examining a very simple example that is artificially elaborated to demonstrate important facilities. The target output is the textile snippet shown in Figure~\ref{fig:TextileExample}. The snippet comprises a heading, a blank line then a list of separated formatted elements. 
+
+\begin{figure}
+	\begin{center}
+		\includegraphics[width=4.9in]{TextileExample.png}
+	\end{center}
+	\caption{Target Textile Output}
+	\label{fig:TextileExample}
+\end{figure}
+
+The Acceleo solution in Figure~\ref{fig:AcceleoExample} formats the heading and blank line as literal text at the start of emitPrecedences2. The \verb|[for...]...[/for]| construct supports the formatting of p.name using a \verb|[.../]| escape to access the name. The additional separator argument defines the inter-text separation.
+
+The redundant emitPrecedences1 demonstrates that declarations occur as escapes within the surrounding text literal and the need to re-escape in order to make a nested call. 
+
+\begin{figure}
+	\begin{center}
+		\includegraphics[width=4.9in]{AcceleoExample.png}
+	\end{center}
+	\caption{Acceleo solution to example}
+	\label{fig:AcceleoExample}
+\end{figure}
+
+The Xtend solution in Figure~\ref{fig:XtendExample} is very similar except for the guillemet rather than square bracket escapes.
+
+The redundant emitPreferences1 demonstrates that declarations occur as functions within an outer control flow allowing a direct call to a nested function. The inner emitPrecedences2 uses the \verb|'''...'''| backward escape from the outer control to the inner text template formatting. This allows the inner template to be indented for readability.
+
+\begin{figure}
+	\begin{center}
+		\includegraphics[width=4.5in]{XtendExample.png}
+	\end{center}
+	\caption{Xtend solution to example}
+	\label{fig:XtendExample}
+\end{figure}
+
+Finally the new QVTo and Text Model solution is shown in Figure~\ref{fig:QVToExample} is a little more verbose (or a little more modular). The inner formatting is factored out as emitPrecedence3 that constructs a StringNode comprising just the formatted precedence element. Since there is no string template capability, the self.name expression needs no elaboration, but the text needs quoting and concatenation. 
+
+\begin{figure}
+	\begin{center}
+		\includegraphics[width=4.0in]{QVToExample.png}
+	\end{center}
+	\caption{QVTo and Text solution to example}
+	\label{fig:QVToExample}
+\end{figure}
+
+emitPrecedences2 provides the heading as its text, and iterates emitPrecedences3 to define the children. The separator and children StringNode elements provide very similar capability to the for construct of Acceleo or Xtend. %Use of the prefix and suffix elements to provide the new-lines gives a perhaps more accurate result for the case of no elements.
+
+The redundant emitPrecedences1 demonstrates use of the init section to bypass creation of a nested StringNode. The intermediate Text model instances created by QVTo are shown in Figure~\ref{fig:ExampleInstances}.
+
+\begin{figure}
+	\begin{center}
+		\includegraphics[width=4.9in]{ExampleInstances.png}
+	\end{center}
+	\caption{StringNode instances for the example}
+	\label{fig:ExampleInstances}
+\end{figure}
+
+\subsection{MOFM2T}\label{MOFM2T}
+
+The OMG issued the MOF Model to Text Transformation Language Request For Proposal (MOFM2T RFP) in April 2007 as a follow on to the MOF 2.0 Query / Views / Transformations RFP (QVT RFP) which addressed only Model-to-Model transformation. The MOFM2T RFP \cite{MOFM2T-RFP} is very clear in its intent:
+
+\begin{quote}
+This RFP calls for a language and semantics for transforming models into text.
+The goal is not to create yet another language, but to use or extend existing
+OMG language(s). Justification must be provided for creating yet another
+language.
+\end{quote}
+
+The final MOFM2T submission \cite{MOFM2T-SUB} re-uses the MOF metamodel, OCL expressions
+and QVT query syntax. However the orthodoxy of the traditional text templates already in use by the submitters' candidates prevailed. The submission fails to re-use any of the transformation facilities of QVT. It is hard to claim that MOFM2T is not `yet another language'. No justification is provided.
+
+In contrast, in this paper we re-use QVTo (or QVTr or ATL or ...) unchanged to support M2T. This was possible with just one day of development for the one-class metamodel and its associated support.
+
+It might seem that a fully declarative transformation language such as QVTr for M2T could result in the output paragraphs appearing in unpredictable orders? But no, if all collections are ordered, a declarative transformation result should also be ordered; only unordered collections may yield shuffled results.
+
+\section{Future Work}\label{Future Work}
+
+The \verb$http://www.eclipse.org/qvt/2018/TextModel$ metamodel and its support was made available in June 2018 as part of the Eclipse Photon release once the Eclipse QVTd support is also installed. It may be bundled with ATL and/or QVTo in future releases.
+
+The current support is usable. The text model is powerful, but could be extended. More significant is the opportunity for syntax sugar to make that power more accessible.
+
+\subsection{splice iterator}
+
+The inelegance of the splicing at the end of Section~\ref{Text Facilities} may be mitigated by adding a splice() iterator to the OCL Standard Library for ordered collections of toString()-able elements could support:
+
+\begin{verbatim}
+'{ '+ somePs->splice(p; separator=',' | '"'+ p.name +'"') +' }'
+\end{verbatim}
+
+\subsection{Line Wrapping}\label{Line Wrapping}
+
+Line wrapping is not conventionally available for M2T. The separation of information and rendering concerns enables the Text Model saver to respect a prevailing indentation and line-breaking policy and wrap lines accordingly. Figure~\ref{fig:TextModel}  shows a \verb$nonBreakingSpace$ property that is intended to provide a facility to control automatic wrapping of too-long lines. Long lines are first broken at spaces or tabs, then non-breaking space characters are replaced by space characters.
+
+\subsection{Declarative Pretty Printing}\label{Declarative Pretty Printing}
+
+Tools such as Xtext have demonstrated how the addition of model assignment annotations to an EBNF grammar can synthesize a useful parser/editor rather than just a partial parser. No equivalent extension is available to add pretty-printing annotations, rather Xtext supports manual programming of an independent declarative class. TCS \cite{TCS} has demonstrated that the required line-wrap/space-before/... declarations can be added to an annotated EBNF grammar. The serializer can then be autogenerated as an M2M text transformation. A friendly editor could offer show-assignment-annotations, and show-formatting-annotations options to avoid redundant clutter.
+
+\subsection{String Templates}\label{String Templates}
+
+In the introduction we identified a need to facilitate text synthesis, possibly using a syntax similar to Xtext's triple quote String Template with embedded guillemeted OCL expressions.
+The evaluation in Section~\ref{Evaluation} observed that String Templates are not essential, although they may be useful, particularly for output comprising mostly boilerplate.
+
+A string template expression could be added to OCL, in much the same way as it has been to Xtend, 
+but learning from Xtend, Acceleo and MOFM2T four escape tokens are needed for the start and end of  a forward or backward escape. Acceleo has only 2, Xtend and MOFM2T just 3 which inhibits arbitrary nesting. Again learning from Xtend, guillemets are very readable and so we might look to use.
+
+\begin{verbatim}
+  «ocl-expression»        forwards escape within literal text
+  «'string-template'»     backwards escape - an ocl-expression
+\end{verbatim}
+
+(An OCL expression starting or ending with a ' can be disambiguated with a space)
+
+These escapes enable the core of our evaluation example from Section~\ref{Evaluation} to nest an ocl-expression within a string-template within an ocl-expression within a string-template within a QVTo statement.
+
+\begin{verbatim}
+map Pivot::ModelemitPrecedences2() : Text::StringNode {
+    «'
+    h2(#Precedences). *Precedences*
+	
+    «getPrecedences(m)->splice(separator = ', ' | «'@«name»@'»)»
+    '»
+}
+\end{verbatim}
+
+An OCL evaluation of string-templates should compute the appropriate string result. An M2M compilation may recognize that string-templates and splice() are syntax sugar for Text Model capabilities.
+
+%\subsection{Syntax Sugar}\label{Syntax Sugar}
+
+%Construction of a StringNode as a direct consequence of an Eclipse QVTo mapping benefits from the helpful QVTo mapping syntax. Construction of additional StringNode elements requires a verbose \verb$object Text::StringNode { .... }$ wrapper around the nested context. This verbosity can be mitigated by a helper function. A backward escape would be better.
+
+\subsection{Incremental and Parallel M2T}\label{Incremental M2T}
+
+Incremental or parallel execution is difficult in an M2M with imperative characteristics such as QVTo, but very practical in a purely declarative language such as QVTr. Therefore if QVTr is used as the M2M, an incremental execution can mark dirty StringNode elements in the tree that can then be selectively reserialized. Unfortunately incremental QVTr execution is not yet available. A parallel execution can distribute parts of the StringNode tree to multiple proocessors and bring the results together at the end.
+
+\section{Related Work}\label{Related Work}
+
+Defining a really simple text model to allow an M2M to be used for an M2T seems like a rather obvious idea. However string template orthodoxy is so entrenched that this simple tree model seems to have been overlooked. Consequently many tools and researchers use naive Strings and then struggle to recover lost structure.
+
+Ogunyomi \cite{Signatures} introduces user-defined signatures to facilitate identifying text segments that need updating. These should be available automatically as a consequence of dependency analysis in a declarative M2M. 
+
+Figure~\ref{fig:M2MM2TFeatureModel} shows a Feature Model for our use of M2M for M2T in the style proposed by Rose \cite{Feature Model}. 
+
+\begin{figure}
+	\begin{center}
+		\includegraphics[width=4.9in]{M2MM2TFeatureModel.png}
+	\end{center}
+	\caption{Feature Model for M2M used for M2T}
+	\label{fig:M2MM2TFeatureModel}
+\end{figure}
+
+This highlights that the mandatory forwards escaping is missing; we have proposed an OCL extension to remedy this. In other respects, the M2M facilities provide good feature coverage and additional features regarding model output. The external text model provides for extensibility.
+
+\section{Conclusions}\label{Conclusions}
+
+We have introduced a very simple one-class metamodel that models text as a tree of attributed character sequences.
+
+We have shown that this metamodel separates the content and pretty printing concerns and enables any M2M to be used without modification as an M2T.
+
+We have demonstrated the usability of this approach by using Eclipse QVTo to generate c, h, lex and y files from an Ecore metamodel.
+
+We have outlined minor extensions to OCL to improve OCL-based M2M usability for M2T.
+
+We can therefore argue that this simple approach to M2T is more compliant with the OMG MOFM2T RFP than the eventual MOFM2T standard.
+
+
+% ---- Bibliography ----
+%
+\begin{thebibliography}{}
+%
+\bibitem{DragonBook}
+Aho, A., Sethi, R., Ullman, J.: Compilers, Principles, Techniques and Tools, Addison Wesley, 1986
+
+\bibitem{SAXparser}
+Brownell, D.: SAX2, 'Reilly, 2002, ISBN 0-596-00237-8.
+
+\bibitem{TechnologySpace}
+Ivanov, I., B\'ezivin, J., Aksit, M.: Technological Spaces: An Initial Appraisal. 1-6.  (2002). 
+
+\bibitem{TCS}
+Jouault, F.,  B\'ezivin, J.,  Kurtev. I.: TCS: A DSL for the specification of textual concrete syntaxes in model engineering. Model-Driven Engineering Languages and Systems: 17th International Conference, MODELS 2014, , September 28 – October 3, 2014, Valencia, Spain.
+\url{https://research.utwente.nl/en/publications/tcsa-dsl-for-the-specification-of-textual-concrete-syntaxes-in-mo}
+
+\bibitem{Signatures}
+Ogunyomi, B., Rose, L., Kolovos, D.: User-defined Signatures for Source Incremental Model-to-text Transformation. 5th International Conference, GPCE 2006, Portland, Oregon, USA, October 22-26, 2006.
+\url{http://ceur-ws.org/Vol-1331/p4.pdf}
+
+\bibitem{Feature Model}
+Rose, L., Matragkas, N., Kolovos, D.,  Paige, R.: A feature model for model-to-text transformation languages. In Modeling in Software Engineering (MISE), 2012 ICSE Workshop on (pp. 57-63). IEEE. DOI: 10.1109/MISE.2012.6226015
+
+\bibitem{Bug396543}
+Siljamaki, T.: Additional M2T capability in QVTO. Eclipse QVTo project Bugzilla 396543. December, 2012.
+\url{https://bugs.eclipse.org/396543}
+
+\bibitem{MOFM2T-RFP}
+MOF Model to Text Transformation Language Request For Proposal. OMG Document: ad/04-04-07, April 2004.
+\url{https://www.omg.org/cgi-bin/doc?ad/04-04-07.pdf}
+
+\bibitem{MOFM2T-SUB}
+Revised submission for MOF Model to Text Transformation Language RFP. OMG Document: ad/06-09-03. September 2006.
+\url{https://www.omg.org/cgi-bin/doc?ad/06-09-03.pdf}
+
+\bibitem{MOFM2T-1.0}
+MOF Model to Text Transformation Language, v1.0, OMG Document Number: formal/2008-01-16, Object Management Group (2008),  \url{http://www.omg.org/spec/MOFM2T/1.0}
+
+\bibitem{OCL-2.4}
+Object Constraint Language. Version 2.4., OMG Document Number: formal/2014-02-03, Object Management Group (2009),  \url{http://www.omg.org/spec/OCL/2.4}
+
+\bibitem{QVT-1.3}
+OMG. Meta Object Facility (MOF) 2.0 Query/View/Transformation Specification, Version 1.3.
+OMG Document Number: ptc/16-06-03, June 2016.
+
+\bibitem{Eclipse-Acceleo}
+Eclipse Acceleo Project.\\
+\url{https://projects.eclipse.org/projects/modeling.m2t.acceleo}
+
+\bibitem{Eclipse-ATL}
+Eclipse ATL Project.\\
+\url{https://projects.eclipse.org/projects/modeling.mmt.atl}
+
+\bibitem{Eclipse-QVTd}
+Eclipse QVT Declarative Project.\\
+\url{https://projects.eclipse.org/projects/modeling.mmt.qvtd}
+
+\bibitem{Eclipse-QVTo}
+Eclipse QVT Operational Mappings Project.\\
+\url{https://projects.eclipse.org/projects/modeling.mmt.qvto}
+
+\bibitem{Eclipse-Xtext}
+Eclipse Xtext Project.\\
+\url{https://projects.eclipse.org/projects/modeling.tmf.xtext}
+
+\end{thebibliography}
+\end{document}
diff --git a/qvt/docs/OCL2018TextM2M/TextModel.png b/qvt/docs/OCL2018TextM2M/TextModel.png
new file mode 100644
index 0000000..515ba5a
--- /dev/null
+++ b/qvt/docs/OCL2018TextM2M/TextModel.png
Binary files differ
diff --git a/qvt/docs/OCL2018TextM2M/TextileExample.png b/qvt/docs/OCL2018TextM2M/TextileExample.png
new file mode 100644
index 0000000..9d0e772
--- /dev/null
+++ b/qvt/docs/OCL2018TextM2M/TextileExample.png
Binary files differ
diff --git a/qvt/docs/OCL2018TextM2M/XMLM2M.png b/qvt/docs/OCL2018TextM2M/XMLM2M.png
new file mode 100644
index 0000000..30b63bd
--- /dev/null
+++ b/qvt/docs/OCL2018TextM2M/XMLM2M.png
Binary files differ
diff --git a/qvt/docs/OCL2018TextM2M/XtendExample.png b/qvt/docs/OCL2018TextM2M/XtendExample.png
new file mode 100644
index 0000000..3868eeb
--- /dev/null
+++ b/qvt/docs/OCL2018TextM2M/XtendExample.png
Binary files differ
diff --git a/qvt/docs/OCL2018TextM2M/llncs.cls b/qvt/docs/OCL2018TextM2M/llncs.cls
new file mode 100644
index 0000000..40eae17
--- /dev/null
+++ b/qvt/docs/OCL2018TextM2M/llncs.cls
@@ -0,0 +1,1208 @@
+% LLNCS DOCUMENT CLASS -- version 2.19 (31-Mar-2014)

+% Springer Verlag LaTeX2e support for Lecture Notes in Computer Science

+%

+%%

+%% \CharacterTable

+%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z

+%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z

+%%   Digits        \0\1\2\3\4\5\6\7\8\9

+%%   Exclamation   \!     Double quote  \"     Hash (number) \#

+%%   Dollar        \$     Percent       \%     Ampersand     \&

+%%   Acute accent  \'     Left paren    \(     Right paren   \)

+%%   Asterisk      \*     Plus          \+     Comma         \,

+%%   Minus         \-     Point         \.     Solidus       \/

+%%   Colon         \:     Semicolon     \;     Less than     \<

+%%   Equals        \=     Greater than  \>     Question mark \?

+%%   Commercial at \@     Left bracket  \[     Backslash     \\

+%%   Right bracket \]     Circumflex    \^     Underscore    \_

+%%   Grave accent  \`     Left brace    \{     Vertical bar  \|

+%%   Right brace   \}     Tilde         \~}

+%%

+\NeedsTeXFormat{LaTeX2e}[1995/12/01]

+\ProvidesClass{llncs}[2014/03/31 v2.19

+^^J LaTeX document class for Lecture Notes in Computer Science]

+% Options

+\let\if@envcntreset\iffalse

+\DeclareOption{envcountreset}{\let\if@envcntreset\iftrue}

+\DeclareOption{citeauthoryear}{\let\citeauthoryear=Y}

+\DeclareOption{oribibl}{\let\oribibl=Y}

+\let\if@custvec\iftrue

+\DeclareOption{orivec}{\let\if@custvec\iffalse}

+\let\if@envcntsame\iffalse

+\DeclareOption{envcountsame}{\let\if@envcntsame\iftrue}

+\let\if@envcntsect\iffalse

+\DeclareOption{envcountsect}{\let\if@envcntsect\iftrue}

+\let\if@runhead\iffalse

+\DeclareOption{runningheads}{\let\if@runhead\iftrue}

+

+\let\if@openright\iftrue

+\let\if@openbib\iffalse

+\DeclareOption{openbib}{\let\if@openbib\iftrue}

+

+% languages

+\let\switcht@@therlang\relax

+\def\ds@deutsch{\def\switcht@@therlang{\switcht@deutsch}}

+\def\ds@francais{\def\switcht@@therlang{\switcht@francais}}

+

+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}

+

+\ProcessOptions

+

+\LoadClass[twoside]{article}

+\RequirePackage{multicol} % needed for the list of participants, index

+\RequirePackage{aliascnt}

+

+\setlength{\textwidth}{12.2cm}

+\setlength{\textheight}{19.3cm}

+\renewcommand\@pnumwidth{2em}

+\renewcommand\@tocrmarg{3.5em}

+%

+\def\@dottedtocline#1#2#3#4#5{%

+  \ifnum #1>\c@tocdepth \else

+    \vskip \z@ \@plus.2\p@

+    {\leftskip #2\relax \rightskip \@tocrmarg \advance\rightskip by 0pt plus 2cm

+               \parfillskip -\rightskip \pretolerance=10000

+     \parindent #2\relax\@afterindenttrue

+     \interlinepenalty\@M

+     \leavevmode

+     \@tempdima #3\relax

+     \advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip

+     {#4}\nobreak

+     \leaders\hbox{$\m@th

+        \mkern \@dotsep mu\hbox{.}\mkern \@dotsep

+        mu$}\hfill

+     \nobreak

+     \hb@xt@\@pnumwidth{\hfil\normalfont \normalcolor #5}%

+     \par}%

+  \fi}

+%

+\def\switcht@albion{%

+\def\abstractname{Abstract.}%

+\def\ackname{Acknowledgement.}%

+\def\andname{and}%

+\def\lastandname{\unskip, and}%

+\def\appendixname{Appendix}%

+\def\chaptername{Chapter}%

+\def\claimname{Claim}%

+\def\conjecturename{Conjecture}%

+\def\contentsname{Table of Contents}%

+\def\corollaryname{Corollary}%

+\def\definitionname{Definition}%

+\def\examplename{Example}%

+\def\exercisename{Exercise}%

+\def\figurename{Fig.}%

+\def\keywordname{{\bf Keywords:}}%

+\def\indexname{Index}%

+\def\lemmaname{Lemma}%

+\def\contriblistname{List of Contributors}%

+\def\listfigurename{List of Figures}%

+\def\listtablename{List of Tables}%

+\def\mailname{{\it Correspondence to\/}:}%

+\def\noteaddname{Note added in proof}%

+\def\notename{Note}%

+\def\partname{Part}%

+\def\problemname{Problem}%

+\def\proofname{Proof}%

+\def\propertyname{Property}%

+\def\propositionname{Proposition}%

+\def\questionname{Question}%

+\def\remarkname{Remark}%

+\def\seename{see}%

+\def\solutionname{Solution}%

+\def\subclassname{{\it Subject Classifications\/}:}%

+\def\tablename{Table}%

+\def\theoremname{Theorem}}

+\switcht@albion

+% Names of theorem like environments are already defined

+% but must be translated if another language is chosen

+%

+% French section

+\def\switcht@francais{%\typeout{On parle francais.}%

+ \def\abstractname{R\'esum\'e.}%

+ \def\ackname{Remerciements.}%

+ \def\andname{et}%

+ \def\lastandname{ et}%

+ \def\appendixname{Appendice}%

+ \def\chaptername{Chapitre}%

+ \def\claimname{Pr\'etention}%

+ \def\conjecturename{Hypoth\`ese}%

+ \def\contentsname{Table des mati\`eres}%

+ \def\corollaryname{Corollaire}%

+ \def\definitionname{D\'efinition}%

+ \def\examplename{Exemple}%

+ \def\exercisename{Exercice}%

+ \def\figurename{Fig.}%

+ \def\keywordname{{\bf Mots-cl\'e:}}%

+ \def\indexname{Index}%

+ \def\lemmaname{Lemme}%

+ \def\contriblistname{Liste des contributeurs}%

+ \def\listfigurename{Liste des figures}%

+ \def\listtablename{Liste des tables}%

+ \def\mailname{{\it Correspondence to\/}:}%

+ \def\noteaddname{Note ajout\'ee \`a l'\'epreuve}%

+ \def\notename{Remarque}%

+ \def\partname{Partie}%

+ \def\problemname{Probl\`eme}%

+ \def\proofname{Preuve}%

+ \def\propertyname{Caract\'eristique}%

+%\def\propositionname{Proposition}%

+ \def\questionname{Question}%

+ \def\remarkname{Remarque}%

+ \def\seename{voir}%

+ \def\solutionname{Solution}%

+ \def\subclassname{{\it Subject Classifications\/}:}%

+ \def\tablename{Tableau}%

+ \def\theoremname{Th\'eor\`eme}%

+}

+%

+% German section

+\def\switcht@deutsch{%\typeout{Man spricht deutsch.}%

+ \def\abstractname{Zusammenfassung.}%

+ \def\ackname{Danksagung.}%

+ \def\andname{und}%

+ \def\lastandname{ und}%

+ \def\appendixname{Anhang}%

+ \def\chaptername{Kapitel}%

+ \def\claimname{Behauptung}%

+ \def\conjecturename{Hypothese}%

+ \def\contentsname{Inhaltsverzeichnis}%

+ \def\corollaryname{Korollar}%

+%\def\definitionname{Definition}%

+ \def\examplename{Beispiel}%

+ \def\exercisename{\"Ubung}%

+ \def\figurename{Abb.}%

+ \def\keywordname{{\bf Schl\"usselw\"orter:}}%

+ \def\indexname{Index}%

+%\def\lemmaname{Lemma}%

+ \def\contriblistname{Mitarbeiter}%

+ \def\listfigurename{Abbildungsverzeichnis}%

+ \def\listtablename{Tabellenverzeichnis}%

+ \def\mailname{{\it Correspondence to\/}:}%

+ \def\noteaddname{Nachtrag}%

+ \def\notename{Anmerkung}%

+ \def\partname{Teil}%

+%\def\problemname{Problem}%

+ \def\proofname{Beweis}%

+ \def\propertyname{Eigenschaft}%

+%\def\propositionname{Proposition}%

+ \def\questionname{Frage}%

+ \def\remarkname{Anmerkung}%

+ \def\seename{siehe}%

+ \def\solutionname{L\"osung}%

+ \def\subclassname{{\it Subject Classifications\/}:}%

+ \def\tablename{Tabelle}%

+%\def\theoremname{Theorem}%

+}

+

+% Ragged bottom for the actual page

+\def\thisbottomragged{\def\@textbottom{\vskip\z@ plus.0001fil

+\global\let\@textbottom\relax}}

+

+\renewcommand\small{%

+   \@setfontsize\small\@ixpt{11}%

+   \abovedisplayskip 8.5\p@ \@plus3\p@ \@minus4\p@

+   \abovedisplayshortskip \z@ \@plus2\p@

+   \belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@

+   \def\@listi{\leftmargin\leftmargini

+               \parsep 0\p@ \@plus1\p@ \@minus\p@

+               \topsep 8\p@ \@plus2\p@ \@minus4\p@

+               \itemsep0\p@}%

+   \belowdisplayskip \abovedisplayskip

+}

+

+\frenchspacing

+\widowpenalty=10000

+\clubpenalty=10000

+

+\setlength\oddsidemargin   {63\p@}

+\setlength\evensidemargin  {63\p@}

+\setlength\marginparwidth  {90\p@}

+

+\setlength\headsep   {16\p@}

+

+\setlength\footnotesep{7.7\p@}

+\setlength\textfloatsep{8mm\@plus 2\p@ \@minus 4\p@}

+\setlength\intextsep   {8mm\@plus 2\p@ \@minus 2\p@}

+

+\setcounter{secnumdepth}{2}

+

+\newcounter {chapter}

+\renewcommand\thechapter      {\@arabic\c@chapter}

+

+\newif\if@mainmatter \@mainmattertrue

+\newcommand\frontmatter{\cleardoublepage

+            \@mainmatterfalse\pagenumbering{Roman}}

+\newcommand\mainmatter{\cleardoublepage

+       \@mainmattertrue\pagenumbering{arabic}}

+\newcommand\backmatter{\if@openright\cleardoublepage\else\clearpage\fi

+      \@mainmatterfalse}

+

+\renewcommand\part{\cleardoublepage

+                 \thispagestyle{empty}%

+                 \if@twocolumn

+                     \onecolumn

+                     \@tempswatrue

+                   \else

+                     \@tempswafalse

+                 \fi

+                 \null\vfil

+                 \secdef\@part\@spart}

+

+\def\@part[#1]#2{%

+    \ifnum \c@secnumdepth >-2\relax

+      \refstepcounter{part}%

+      \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%

+    \else

+      \addcontentsline{toc}{part}{#1}%

+    \fi

+    \markboth{}{}%

+    {\centering

+     \interlinepenalty \@M

+     \normalfont

+     \ifnum \c@secnumdepth >-2\relax

+       \huge\bfseries \partname~\thepart

+       \par

+       \vskip 20\p@

+     \fi

+     \Huge \bfseries #2\par}%

+    \@endpart}

+\def\@spart#1{%

+    {\centering

+     \interlinepenalty \@M

+     \normalfont

+     \Huge \bfseries #1\par}%

+    \@endpart}

+\def\@endpart{\vfil\newpage

+              \if@twoside

+                \null

+                \thispagestyle{empty}%

+                \newpage

+              \fi

+              \if@tempswa

+                \twocolumn

+              \fi}

+

+\newcommand\chapter{\clearpage

+                    \thispagestyle{empty}%

+                    \global\@topnum\z@

+                    \@afterindentfalse

+                    \secdef\@chapter\@schapter}

+\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne

+                       \if@mainmatter

+                         \refstepcounter{chapter}%

+                         \typeout{\@chapapp\space\thechapter.}%

+                         \addcontentsline{toc}{chapter}%

+                                  {\protect\numberline{\thechapter}#1}%

+                       \else

+                         \addcontentsline{toc}{chapter}{#1}%

+                       \fi

+                    \else

+                      \addcontentsline{toc}{chapter}{#1}%

+                    \fi

+                    \chaptermark{#1}%

+                    \addtocontents{lof}{\protect\addvspace{10\p@}}%

+                    \addtocontents{lot}{\protect\addvspace{10\p@}}%

+                    \if@twocolumn

+                      \@topnewpage[\@makechapterhead{#2}]%

+                    \else

+                      \@makechapterhead{#2}%

+                      \@afterheading

+                    \fi}

+\def\@makechapterhead#1{%

+% \vspace*{50\p@}%

+  {\centering

+    \ifnum \c@secnumdepth >\m@ne

+      \if@mainmatter

+        \large\bfseries \@chapapp{} \thechapter

+        \par\nobreak

+        \vskip 20\p@

+      \fi

+    \fi

+    \interlinepenalty\@M

+    \Large \bfseries #1\par\nobreak

+    \vskip 40\p@

+  }}

+\def\@schapter#1{\if@twocolumn

+                   \@topnewpage[\@makeschapterhead{#1}]%

+                 \else

+                   \@makeschapterhead{#1}%

+                   \@afterheading

+                 \fi}

+\def\@makeschapterhead#1{%

+% \vspace*{50\p@}%

+  {\centering

+    \normalfont

+    \interlinepenalty\@M

+    \Large \bfseries  #1\par\nobreak

+    \vskip 40\p@

+  }}

+

+\renewcommand\section{\@startsection{section}{1}{\z@}%

+                       {-18\p@ \@plus -4\p@ \@minus -4\p@}%

+                       {12\p@ \@plus 4\p@ \@minus 4\p@}%

+                       {\normalfont\large\bfseries\boldmath

+                        \rightskip=\z@ \@plus 8em\pretolerance=10000 }}

+\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%

+                       {-18\p@ \@plus -4\p@ \@minus -4\p@}%

+                       {8\p@ \@plus 4\p@ \@minus 4\p@}%

+                       {\normalfont\normalsize\bfseries\boldmath

+                        \rightskip=\z@ \@plus 8em\pretolerance=10000 }}

+\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%

+                       {-18\p@ \@plus -4\p@ \@minus -4\p@}%

+                       {-0.5em \@plus -0.22em \@minus -0.1em}%

+                       {\normalfont\normalsize\bfseries\boldmath}}

+\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%

+                       {-12\p@ \@plus -4\p@ \@minus -4\p@}%

+                       {-0.5em \@plus -0.22em \@minus -0.1em}%

+                       {\normalfont\normalsize\itshape}}

+\renewcommand\subparagraph[1]{\typeout{LLNCS warning: You should not use

+                  \string\subparagraph\space with this class}\vskip0.5cm

+You should not use \verb|\subparagraph| with this class.\vskip0.5cm}

+

+\DeclareMathSymbol{\Gamma}{\mathalpha}{letters}{"00}

+\DeclareMathSymbol{\Delta}{\mathalpha}{letters}{"01}

+\DeclareMathSymbol{\Theta}{\mathalpha}{letters}{"02}

+\DeclareMathSymbol{\Lambda}{\mathalpha}{letters}{"03}

+\DeclareMathSymbol{\Xi}{\mathalpha}{letters}{"04}

+\DeclareMathSymbol{\Pi}{\mathalpha}{letters}{"05}

+\DeclareMathSymbol{\Sigma}{\mathalpha}{letters}{"06}

+\DeclareMathSymbol{\Upsilon}{\mathalpha}{letters}{"07}

+\DeclareMathSymbol{\Phi}{\mathalpha}{letters}{"08}

+\DeclareMathSymbol{\Psi}{\mathalpha}{letters}{"09}

+\DeclareMathSymbol{\Omega}{\mathalpha}{letters}{"0A}

+

+\let\footnotesize\small

+

+\if@custvec

+\def\vec#1{\mathchoice{\mbox{\boldmath$\displaystyle#1$}}

+{\mbox{\boldmath$\textstyle#1$}}

+{\mbox{\boldmath$\scriptstyle#1$}}

+{\mbox{\boldmath$\scriptscriptstyle#1$}}}

+\fi

+

+\def\squareforqed{\hbox{\rlap{$\sqcap$}$\sqcup$}}

+\def\qed{\ifmmode\squareforqed\else{\unskip\nobreak\hfil

+\penalty50\hskip1em\null\nobreak\hfil\squareforqed

+\parfillskip=0pt\finalhyphendemerits=0\endgraf}\fi}

+

+\def\getsto{\mathrel{\mathchoice {\vcenter{\offinterlineskip

+\halign{\hfil

+$\displaystyle##$\hfil\cr\gets\cr\to\cr}}}

+{\vcenter{\offinterlineskip\halign{\hfil$\textstyle##$\hfil\cr\gets

+\cr\to\cr}}}

+{\vcenter{\offinterlineskip\halign{\hfil$\scriptstyle##$\hfil\cr\gets

+\cr\to\cr}}}

+{\vcenter{\offinterlineskip\halign{\hfil$\scriptscriptstyle##$\hfil\cr

+\gets\cr\to\cr}}}}}

+\def\lid{\mathrel{\mathchoice {\vcenter{\offinterlineskip\halign{\hfil

+$\displaystyle##$\hfil\cr<\cr\noalign{\vskip1.2pt}=\cr}}}

+{\vcenter{\offinterlineskip\halign{\hfil$\textstyle##$\hfil\cr<\cr

+\noalign{\vskip1.2pt}=\cr}}}

+{\vcenter{\offinterlineskip\halign{\hfil$\scriptstyle##$\hfil\cr<\cr

+\noalign{\vskip1pt}=\cr}}}

+{\vcenter{\offinterlineskip\halign{\hfil$\scriptscriptstyle##$\hfil\cr

+<\cr

+\noalign{\vskip0.9pt}=\cr}}}}}

+\def\gid{\mathrel{\mathchoice {\vcenter{\offinterlineskip\halign{\hfil

+$\displaystyle##$\hfil\cr>\cr\noalign{\vskip1.2pt}=\cr}}}

+{\vcenter{\offinterlineskip\halign{\hfil$\textstyle##$\hfil\cr>\cr

+\noalign{\vskip1.2pt}=\cr}}}

+{\vcenter{\offinterlineskip\halign{\hfil$\scriptstyle##$\hfil\cr>\cr

+\noalign{\vskip1pt}=\cr}}}

+{\vcenter{\offinterlineskip\halign{\hfil$\scriptscriptstyle##$\hfil\cr

+>\cr

+\noalign{\vskip0.9pt}=\cr}}}}}

+\def\grole{\mathrel{\mathchoice {\vcenter{\offinterlineskip

+\halign{\hfil

+$\displaystyle##$\hfil\cr>\cr\noalign{\vskip-1pt}<\cr}}}

+{\vcenter{\offinterlineskip\halign{\hfil$\textstyle##$\hfil\cr

+>\cr\noalign{\vskip-1pt}<\cr}}}

+{\vcenter{\offinterlineskip\halign{\hfil$\scriptstyle##$\hfil\cr

+>\cr\noalign{\vskip-0.8pt}<\cr}}}

+{\vcenter{\offinterlineskip\halign{\hfil$\scriptscriptstyle##$\hfil\cr

+>\cr\noalign{\vskip-0.3pt}<\cr}}}}}

+\def\bbbr{{\rm I\!R}} %reelle Zahlen

+\def\bbbm{{\rm I\!M}}

+\def\bbbn{{\rm I\!N}} %natuerliche Zahlen

+\def\bbbf{{\rm I\!F}}

+\def\bbbh{{\rm I\!H}}

+\def\bbbk{{\rm I\!K}}

+\def\bbbp{{\rm I\!P}}

+\def\bbbone{{\mathchoice {\rm 1\mskip-4mu l} {\rm 1\mskip-4mu l}

+{\rm 1\mskip-4.5mu l} {\rm 1\mskip-5mu l}}}

+\def\bbbc{{\mathchoice {\setbox0=\hbox{$\displaystyle\rm C$}\hbox{\hbox

+to0pt{\kern0.4\wd0\vrule height0.9\ht0\hss}\box0}}

+{\setbox0=\hbox{$\textstyle\rm C$}\hbox{\hbox

+to0pt{\kern0.4\wd0\vrule height0.9\ht0\hss}\box0}}

+{\setbox0=\hbox{$\scriptstyle\rm C$}\hbox{\hbox

+to0pt{\kern0.4\wd0\vrule height0.9\ht0\hss}\box0}}

+{\setbox0=\hbox{$\scriptscriptstyle\rm C$}\hbox{\hbox

+to0pt{\kern0.4\wd0\vrule height0.9\ht0\hss}\box0}}}}

+\def\bbbq{{\mathchoice {\setbox0=\hbox{$\displaystyle\rm

+Q$}\hbox{\raise

+0.15\ht0\hbox to0pt{\kern0.4\wd0\vrule height0.8\ht0\hss}\box0}}

+{\setbox0=\hbox{$\textstyle\rm Q$}\hbox{\raise

+0.15\ht0\hbox to0pt{\kern0.4\wd0\vrule height0.8\ht0\hss}\box0}}

+{\setbox0=\hbox{$\scriptstyle\rm Q$}\hbox{\raise

+0.15\ht0\hbox to0pt{\kern0.4\wd0\vrule height0.7\ht0\hss}\box0}}

+{\setbox0=\hbox{$\scriptscriptstyle\rm Q$}\hbox{\raise

+0.15\ht0\hbox to0pt{\kern0.4\wd0\vrule height0.7\ht0\hss}\box0}}}}

+\def\bbbt{{\mathchoice {\setbox0=\hbox{$\displaystyle\rm

+T$}\hbox{\hbox to0pt{\kern0.3\wd0\vrule height0.9\ht0\hss}\box0}}

+{\setbox0=\hbox{$\textstyle\rm T$}\hbox{\hbox

+to0pt{\kern0.3\wd0\vrule height0.9\ht0\hss}\box0}}

+{\setbox0=\hbox{$\scriptstyle\rm T$}\hbox{\hbox

+to0pt{\kern0.3\wd0\vrule height0.9\ht0\hss}\box0}}

+{\setbox0=\hbox{$\scriptscriptstyle\rm T$}\hbox{\hbox

+to0pt{\kern0.3\wd0\vrule height0.9\ht0\hss}\box0}}}}

+\def\bbbs{{\mathchoice

+{\setbox0=\hbox{$\displaystyle     \rm S$}\hbox{\raise0.5\ht0\hbox

+to0pt{\kern0.35\wd0\vrule height0.45\ht0\hss}\hbox

+to0pt{\kern0.55\wd0\vrule height0.5\ht0\hss}\box0}}

+{\setbox0=\hbox{$\textstyle        \rm S$}\hbox{\raise0.5\ht0\hbox

+to0pt{\kern0.35\wd0\vrule height0.45\ht0\hss}\hbox

+to0pt{\kern0.55\wd0\vrule height0.5\ht0\hss}\box0}}

+{\setbox0=\hbox{$\scriptstyle      \rm S$}\hbox{\raise0.5\ht0\hbox

+to0pt{\kern0.35\wd0\vrule height0.45\ht0\hss}\raise0.05\ht0\hbox

+to0pt{\kern0.5\wd0\vrule height0.45\ht0\hss}\box0}}

+{\setbox0=\hbox{$\scriptscriptstyle\rm S$}\hbox{\raise0.5\ht0\hbox

+to0pt{\kern0.4\wd0\vrule height0.45\ht0\hss}\raise0.05\ht0\hbox

+to0pt{\kern0.55\wd0\vrule height0.45\ht0\hss}\box0}}}}

+\def\bbbz{{\mathchoice {\hbox{$\mathsf\textstyle Z\kern-0.4em Z$}}

+{\hbox{$\mathsf\textstyle Z\kern-0.4em Z$}}

+{\hbox{$\mathsf\scriptstyle Z\kern-0.3em Z$}}

+{\hbox{$\mathsf\scriptscriptstyle Z\kern-0.2em Z$}}}}

+

+\let\ts\,

+

+\setlength\leftmargini  {17\p@}

+\setlength\leftmargin    {\leftmargini}

+\setlength\leftmarginii  {\leftmargini}

+\setlength\leftmarginiii {\leftmargini}

+\setlength\leftmarginiv  {\leftmargini}

+\setlength  \labelsep  {.5em}

+\setlength  \labelwidth{\leftmargini}

+\addtolength\labelwidth{-\labelsep}

+

+\def\@listI{\leftmargin\leftmargini

+            \parsep 0\p@ \@plus1\p@ \@minus\p@

+            \topsep 8\p@ \@plus2\p@ \@minus4\p@

+            \itemsep0\p@}

+\let\@listi\@listI

+\@listi

+\def\@listii {\leftmargin\leftmarginii

+              \labelwidth\leftmarginii

+              \advance\labelwidth-\labelsep

+              \topsep    0\p@ \@plus2\p@ \@minus\p@}

+\def\@listiii{\leftmargin\leftmarginiii

+              \labelwidth\leftmarginiii

+              \advance\labelwidth-\labelsep

+              \topsep    0\p@ \@plus\p@\@minus\p@

+              \parsep    \z@

+              \partopsep \p@ \@plus\z@ \@minus\p@}

+

+\renewcommand\labelitemi{\normalfont\bfseries --}

+\renewcommand\labelitemii{$\m@th\bullet$}

+

+\setlength\arraycolsep{1.4\p@}

+\setlength\tabcolsep{1.4\p@}

+

+\def\tableofcontents{\chapter*{\contentsname\@mkboth{{\contentsname}}%

+                                                    {{\contentsname}}}

+ \def\authcount##1{\setcounter{auco}{##1}\setcounter{@auth}{1}}

+ \def\lastand{\ifnum\value{auco}=2\relax

+                 \unskip{} \andname\

+              \else

+                 \unskip \lastandname\

+              \fi}%

+ \def\and{\stepcounter{@auth}\relax

+          \ifnum\value{@auth}=\value{auco}%

+             \lastand

+          \else

+             \unskip,

+          \fi}%

+ \@starttoc{toc}\if@restonecol\twocolumn\fi}

+

+\def\l@part#1#2{\addpenalty{\@secpenalty}%

+   \addvspace{2em plus\p@}%  % space above part line

+   \begingroup

+     \parindent \z@

+     \rightskip \z@ plus 5em

+     \hrule\vskip5pt

+     \large               % same size as for a contribution heading

+     \bfseries\boldmath   % set line in boldface

+     \leavevmode          % TeX command to enter horizontal mode.

+     #1\par

+     \vskip5pt

+     \hrule

+     \vskip1pt

+     \nobreak             % Never break after part entry

+   \endgroup}

+

+\def\@dotsep{2}

+

+\let\phantomsection=\relax

+

+\def\hyperhrefextend{\ifx\hyper@anchor\@undefined\else

+{}\fi}

+

+\def\addnumcontentsmark#1#2#3{%

+\addtocontents{#1}{\protect\contentsline{#2}{\protect\numberline

+                     {\thechapter}#3}{\thepage}\hyperhrefextend}}%

+\def\addcontentsmark#1#2#3{%

+\addtocontents{#1}{\protect\contentsline{#2}{#3}{\thepage}\hyperhrefextend}}%

+\def\addcontentsmarkwop#1#2#3{%

+\addtocontents{#1}{\protect\contentsline{#2}{#3}{0}\hyperhrefextend}}%

+

+\def\@adcmk[#1]{\ifcase #1 \or

+\def\@gtempa{\addnumcontentsmark}%

+  \or    \def\@gtempa{\addcontentsmark}%

+  \or    \def\@gtempa{\addcontentsmarkwop}%

+  \fi\@gtempa{toc}{chapter}%

+}

+\def\addtocmark{%

+\phantomsection

+\@ifnextchar[{\@adcmk}{\@adcmk[3]}%

+}

+

+\def\l@chapter#1#2{\addpenalty{-\@highpenalty}

+ \vskip 1.0em plus 1pt \@tempdima 1.5em \begingroup

+ \parindent \z@ \rightskip \@tocrmarg

+ \advance\rightskip by 0pt plus 2cm

+ \parfillskip -\rightskip \pretolerance=10000

+ \leavevmode \advance\leftskip\@tempdima \hskip -\leftskip

+ {\large\bfseries\boldmath#1}\ifx0#2\hfil\null

+ \else

+      \nobreak

+      \leaders\hbox{$\m@th \mkern \@dotsep mu.\mkern

+      \@dotsep mu$}\hfill

+      \nobreak\hbox to\@pnumwidth{\hss #2}%

+ \fi\par

+ \penalty\@highpenalty \endgroup}

+

+\def\l@title#1#2{\addpenalty{-\@highpenalty}

+ \addvspace{8pt plus 1pt}

+ \@tempdima \z@

+ \begingroup

+ \parindent \z@ \rightskip \@tocrmarg

+ \advance\rightskip by 0pt plus 2cm

+ \parfillskip -\rightskip \pretolerance=10000

+ \leavevmode \advance\leftskip\@tempdima \hskip -\leftskip

+ #1\nobreak

+ \leaders\hbox{$\m@th \mkern \@dotsep mu.\mkern

+ \@dotsep mu$}\hfill

+ \nobreak\hbox to\@pnumwidth{\hss #2}\par

+ \penalty\@highpenalty \endgroup}

+

+\def\l@author#1#2{\addpenalty{\@highpenalty}

+ \@tempdima=15\p@ %\z@

+ \begingroup

+ \parindent \z@ \rightskip \@tocrmarg

+ \advance\rightskip by 0pt plus 2cm

+ \pretolerance=10000

+ \leavevmode \advance\leftskip\@tempdima %\hskip -\leftskip

+ \textit{#1}\par

+ \penalty\@highpenalty \endgroup}

+

+\setcounter{tocdepth}{0}

+\newdimen\tocchpnum

+\newdimen\tocsecnum

+\newdimen\tocsectotal

+\newdimen\tocsubsecnum

+\newdimen\tocsubsectotal

+\newdimen\tocsubsubsecnum

+\newdimen\tocsubsubsectotal

+\newdimen\tocparanum

+\newdimen\tocparatotal

+\newdimen\tocsubparanum

+\tocchpnum=\z@            % no chapter numbers

+\tocsecnum=15\p@          % section 88. plus 2.222pt

+\tocsubsecnum=23\p@       % subsection 88.8 plus 2.222pt

+\tocsubsubsecnum=27\p@    % subsubsection 88.8.8 plus 1.444pt

+\tocparanum=35\p@         % paragraph 88.8.8.8 plus 1.666pt

+\tocsubparanum=43\p@      % subparagraph 88.8.8.8.8 plus 1.888pt

+\def\calctocindent{%

+\tocsectotal=\tocchpnum

+\advance\tocsectotal by\tocsecnum

+\tocsubsectotal=\tocsectotal

+\advance\tocsubsectotal by\tocsubsecnum

+\tocsubsubsectotal=\tocsubsectotal

+\advance\tocsubsubsectotal by\tocsubsubsecnum

+\tocparatotal=\tocsubsubsectotal

+\advance\tocparatotal by\tocparanum}

+\calctocindent

+

+\def\l@section{\@dottedtocline{1}{\tocchpnum}{\tocsecnum}}

+\def\l@subsection{\@dottedtocline{2}{\tocsectotal}{\tocsubsecnum}}

+\def\l@subsubsection{\@dottedtocline{3}{\tocsubsectotal}{\tocsubsubsecnum}}

+\def\l@paragraph{\@dottedtocline{4}{\tocsubsubsectotal}{\tocparanum}}

+\def\l@subparagraph{\@dottedtocline{5}{\tocparatotal}{\tocsubparanum}}

+

+\def\listoffigures{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn

+ \fi\section*{\listfigurename\@mkboth{{\listfigurename}}{{\listfigurename}}}

+ \@starttoc{lof}\if@restonecol\twocolumn\fi}

+\def\l@figure{\@dottedtocline{1}{0em}{1.5em}}

+

+\def\listoftables{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn

+ \fi\section*{\listtablename\@mkboth{{\listtablename}}{{\listtablename}}}

+ \@starttoc{lot}\if@restonecol\twocolumn\fi}

+\let\l@table\l@figure

+

+\renewcommand\listoffigures{%

+    \section*{\listfigurename

+      \@mkboth{\listfigurename}{\listfigurename}}%

+    \@starttoc{lof}%

+    }

+

+\renewcommand\listoftables{%

+    \section*{\listtablename

+      \@mkboth{\listtablename}{\listtablename}}%

+    \@starttoc{lot}%

+    }

+

+\ifx\oribibl\undefined

+\ifx\citeauthoryear\undefined

+\renewenvironment{thebibliography}[1]

+     {\section*{\refname}

+      \def\@biblabel##1{##1.}

+      \small

+      \list{\@biblabel{\@arabic\c@enumiv}}%

+           {\settowidth\labelwidth{\@biblabel{#1}}%

+            \leftmargin\labelwidth

+            \advance\leftmargin\labelsep

+            \if@openbib

+              \advance\leftmargin\bibindent

+              \itemindent -\bibindent

+              \listparindent \itemindent

+              \parsep \z@

+            \fi

+            \usecounter{enumiv}%

+            \let\p@enumiv\@empty

+            \renewcommand\theenumiv{\@arabic\c@enumiv}}%

+      \if@openbib

+        \renewcommand\newblock{\par}%

+      \else

+        \renewcommand\newblock{\hskip .11em \@plus.33em \@minus.07em}%

+      \fi

+      \sloppy\clubpenalty4000\widowpenalty4000%

+      \sfcode`\.=\@m}

+     {\def\@noitemerr

+       {\@latex@warning{Empty `thebibliography' environment}}%

+      \endlist}

+\def\@lbibitem[#1]#2{\item[{[#1]}\hfill]\if@filesw

+     {\let\protect\noexpand\immediate

+     \write\@auxout{\string\bibcite{#2}{#1}}}\fi\ignorespaces}

+\newcount\@tempcntc

+\def\@citex[#1]#2{\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi

+  \@tempcnta\z@\@tempcntb\m@ne\def\@citea{}\@cite{\@for\@citeb:=#2\do

+    {\@ifundefined

+       {b@\@citeb}{\@citeo\@tempcntb\m@ne\@citea\def\@citea{,}{\bfseries

+        ?}\@warning

+       {Citation `\@citeb' on page \thepage \space undefined}}%

+    {\setbox\z@\hbox{\global\@tempcntc0\csname b@\@citeb\endcsname\relax}%

+     \ifnum\@tempcntc=\z@ \@citeo\@tempcntb\m@ne

+       \@citea\def\@citea{,}\hbox{\csname b@\@citeb\endcsname}%

+     \else

+      \advance\@tempcntb\@ne

+      \ifnum\@tempcntb=\@tempcntc

+      \else\advance\@tempcntb\m@ne\@citeo

+      \@tempcnta\@tempcntc\@tempcntb\@tempcntc\fi\fi}}\@citeo}{#1}}

+\def\@citeo{\ifnum\@tempcnta>\@tempcntb\else

+               \@citea\def\@citea{,\,\hskip\z@skip}%

+               \ifnum\@tempcnta=\@tempcntb\the\@tempcnta\else

+               {\advance\@tempcnta\@ne\ifnum\@tempcnta=\@tempcntb \else

+                \def\@citea{--}\fi

+      \advance\@tempcnta\m@ne\the\@tempcnta\@citea\the\@tempcntb}\fi\fi}

+\else

+\renewenvironment{thebibliography}[1]

+     {\section*{\refname}

+      \small

+      \list{}%

+           {\settowidth\labelwidth{}%

+            \leftmargin\parindent

+            \itemindent=-\parindent

+            \labelsep=\z@

+            \if@openbib

+              \advance\leftmargin\bibindent

+              \itemindent -\bibindent

+              \listparindent \itemindent

+              \parsep \z@

+            \fi

+            \usecounter{enumiv}%

+            \let\p@enumiv\@empty

+            \renewcommand\theenumiv{}}%

+      \if@openbib

+        \renewcommand\newblock{\par}%

+      \else

+        \renewcommand\newblock{\hskip .11em \@plus.33em \@minus.07em}%

+      \fi

+      \sloppy\clubpenalty4000\widowpenalty4000%

+      \sfcode`\.=\@m}

+     {\def\@noitemerr

+       {\@latex@warning{Empty `thebibliography' environment}}%

+      \endlist}

+      \def\@cite#1{#1}%

+      \def\@lbibitem[#1]#2{\item[]\if@filesw

+        {\def\protect##1{\string ##1\space}\immediate

+      \write\@auxout{\string\bibcite{#2}{#1}}}\fi\ignorespaces}

+   \fi

+\else

+\@cons\@openbib@code{\noexpand\small}

+\fi

+

+\def\idxquad{\hskip 10\p@}% space that divides entry from number

+

+\def\@idxitem{\par\hangindent 10\p@}

+

+\def\subitem{\par\setbox0=\hbox{--\enspace}% second order

+                \noindent\hangindent\wd0\box0}% index entry

+

+\def\subsubitem{\par\setbox0=\hbox{--\,--\enspace}% third

+                \noindent\hangindent\wd0\box0}% order index entry

+

+\def\indexspace{\par \vskip 10\p@ plus5\p@ minus3\p@\relax}

+

+\renewenvironment{theindex}

+               {\@mkboth{\indexname}{\indexname}%

+                \thispagestyle{empty}\parindent\z@

+                \parskip\z@ \@plus .3\p@\relax

+                \let\item\par

+                \def\,{\relax\ifmmode\mskip\thinmuskip

+                             \else\hskip0.2em\ignorespaces\fi}%

+                \normalfont\small

+                \begin{multicols}{2}[\@makeschapterhead{\indexname}]%

+                }

+                {\end{multicols}}

+

+\renewcommand\footnoterule{%

+  \kern-3\p@

+  \hrule\@width 2truecm

+  \kern2.6\p@}

+  \newdimen\fnindent

+  \fnindent1em

+\long\def\@makefntext#1{%

+    \parindent \fnindent%

+    \leftskip \fnindent%

+    \noindent

+    \llap{\hb@xt@1em{\hss\@makefnmark\ }}\ignorespaces#1}

+

+\long\def\@makecaption#1#2{%

+  \small

+  \vskip\abovecaptionskip

+  \sbox\@tempboxa{{\bfseries #1.} #2}%

+  \ifdim \wd\@tempboxa >\hsize

+    {\bfseries #1.} #2\par

+  \else

+    \global \@minipagefalse

+    \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%

+  \fi

+  \vskip\belowcaptionskip}

+

+\def\fps@figure{htbp}

+\def\fnum@figure{\figurename\thinspace\thefigure}

+\def \@floatboxreset {%

+        \reset@font

+        \small

+        \@setnobreak

+        \@setminipage

+}

+\def\fps@table{htbp}

+\def\fnum@table{\tablename~\thetable}

+\renewenvironment{table}

+               {\setlength\abovecaptionskip{0\p@}%

+                \setlength\belowcaptionskip{10\p@}%

+                \@float{table}}

+               {\end@float}

+\renewenvironment{table*}

+               {\setlength\abovecaptionskip{0\p@}%

+                \setlength\belowcaptionskip{10\p@}%

+                \@dblfloat{table}}

+               {\end@dblfloat}

+

+\long\def\@caption#1[#2]#3{\par\addcontentsline{\csname

+  ext@#1\endcsname}{#1}{\protect\numberline{\csname

+  the#1\endcsname}{\ignorespaces #2}}\begingroup

+    \@parboxrestore

+    \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par

+  \endgroup}

+

+% LaTeX does not provide a command to enter the authors institute

+% addresses. The \institute command is defined here.

+

+\newcounter{@inst}

+\newcounter{@auth}

+\newcounter{auco}

+\newdimen\instindent

+\newbox\authrun

+\newtoks\authorrunning

+\newtoks\tocauthor

+\newbox\titrun

+\newtoks\titlerunning

+\newtoks\toctitle

+

+\def\clearheadinfo{\gdef\@author{No Author Given}%

+                   \gdef\@title{No Title Given}%

+                   \gdef\@subtitle{}%

+                   \gdef\@institute{No Institute Given}%

+                   \gdef\@thanks{}%

+                   \global\titlerunning={}\global\authorrunning={}%

+                   \global\toctitle={}\global\tocauthor={}}

+

+\def\institute#1{\gdef\@institute{#1}}

+

+\def\institutename{\par

+ \begingroup

+ \parskip=\z@

+ \parindent=\z@

+ \setcounter{@inst}{1}%

+ \def\and{\par\stepcounter{@inst}%

+ \noindent$^{\the@inst}$\enspace\ignorespaces}%

+ \setbox0=\vbox{\def\thanks##1{}\@institute}%

+ \ifnum\c@@inst=1\relax

+   \gdef\fnnstart{0}%

+ \else

+   \xdef\fnnstart{\c@@inst}%

+   \setcounter{@inst}{1}%

+   \noindent$^{\the@inst}$\enspace

+ \fi

+ \ignorespaces

+ \@institute\par

+ \endgroup}

+

+\def\@fnsymbol#1{\ensuremath{\ifcase#1\or\star\or{\star\star}\or

+   {\star\star\star}\or \dagger\or \ddagger\or

+   \mathchar "278\or \mathchar "27B\or \|\or **\or \dagger\dagger

+   \or \ddagger\ddagger \else\@ctrerr\fi}}

+

+\def\inst#1{\unskip$^{#1}$}

+\def\fnmsep{\unskip$^,$}

+\def\email#1{{\tt#1}}

+\AtBeginDocument{\@ifundefined{url}{\def\url#1{#1}}{}%

+\@ifpackageloaded{babel}{%

+\@ifundefined{extrasenglish}{}{\addto\extrasenglish{\switcht@albion}}%

+\@ifundefined{extrasfrenchb}{}{\addto\extrasfrenchb{\switcht@francais}}%

+\@ifundefined{extrasgerman}{}{\addto\extrasgerman{\switcht@deutsch}}%

+\@ifundefined{extrasngerman}{}{\addto\extrasngerman{\switcht@deutsch}}%

+}{\switcht@@therlang}%

+\providecommand{\keywords}[1]{\par\addvspace\baselineskip

+\noindent\keywordname\enspace\ignorespaces#1}%

+}

+\def\homedir{\~{ }}

+

+\def\subtitle#1{\gdef\@subtitle{#1}}

+\clearheadinfo

+%

+%%% to avoid hyperref warnings

+\providecommand*{\toclevel@author}{999}

+%%% to make title-entry parent of section-entries

+\providecommand*{\toclevel@title}{0}

+%

+\renewcommand\maketitle{\newpage

+\phantomsection

+  \refstepcounter{chapter}%

+  \stepcounter{section}%

+  \setcounter{section}{0}%

+  \setcounter{subsection}{0}%

+  \setcounter{figure}{0}

+  \setcounter{table}{0}

+  \setcounter{equation}{0}

+  \setcounter{footnote}{0}%

+  \begingroup

+    \parindent=\z@

+    \renewcommand\thefootnote{\@fnsymbol\c@footnote}%

+    \if@twocolumn

+      \ifnum \col@number=\@ne

+        \@maketitle

+      \else

+        \twocolumn[\@maketitle]%

+      \fi

+    \else

+      \newpage

+      \global\@topnum\z@   % Prevents figures from going at top of page.

+      \@maketitle

+    \fi

+    \thispagestyle{empty}\@thanks

+%

+    \def\\{\unskip\ \ignorespaces}\def\inst##1{\unskip{}}%

+    \def\thanks##1{\unskip{}}\def\fnmsep{\unskip}%

+    \instindent=\hsize

+    \advance\instindent by-\headlineindent

+    \if!\the\toctitle!\addcontentsline{toc}{title}{\@title}\else

+       \addcontentsline{toc}{title}{\the\toctitle}\fi

+    \if@runhead

+       \if!\the\titlerunning!\else

+         \edef\@title{\the\titlerunning}%

+       \fi

+       \global\setbox\titrun=\hbox{\small\rm\unboldmath\ignorespaces\@title}%

+       \ifdim\wd\titrun>\instindent

+          \typeout{Title too long for running head. Please supply}%

+          \typeout{a shorter form with \string\titlerunning\space prior to

+                   \string\maketitle}%

+          \global\setbox\titrun=\hbox{\small\rm

+          Title Suppressed Due to Excessive Length}%

+       \fi

+       \xdef\@title{\copy\titrun}%

+    \fi

+%

+    \if!\the\tocauthor!\relax

+      {\def\and{\noexpand\protect\noexpand\and}%

+      \protected@xdef\toc@uthor{\@author}}%

+    \else

+      \def\\{\noexpand\protect\noexpand\newline}%

+      \protected@xdef\scratch{\the\tocauthor}%

+      \protected@xdef\toc@uthor{\scratch}%

+    \fi

+    \addtocontents{toc}{\noexpand\protect\noexpand\authcount{\the\c@auco}}%

+    \addcontentsline{toc}{author}{\toc@uthor}%

+    \if@runhead

+       \if!\the\authorrunning!

+         \value{@inst}=\value{@auth}%

+         \setcounter{@auth}{1}%

+       \else

+         \edef\@author{\the\authorrunning}%

+       \fi

+       \global\setbox\authrun=\hbox{\small\unboldmath\@author\unskip}%

+       \ifdim\wd\authrun>\instindent

+          \typeout{Names of authors too long for running head. Please supply}%

+          \typeout{a shorter form with \string\authorrunning\space prior to

+                   \string\maketitle}%

+          \global\setbox\authrun=\hbox{\small\rm

+          Authors Suppressed Due to Excessive Length}%

+       \fi

+       \xdef\@author{\copy\authrun}%

+       \markboth{\@author}{\@title}%

+     \fi

+  \endgroup

+  \setcounter{footnote}{\fnnstart}%

+  \clearheadinfo}

+%

+\def\@maketitle{\newpage

+ \markboth{}{}%

+ \def\lastand{\ifnum\value{@inst}=2\relax

+                 \unskip{} \andname\

+              \else

+                 \unskip \lastandname\

+              \fi}%

+ \def\and{\stepcounter{@auth}\relax

+          \ifnum\value{@auth}=\value{@inst}%

+             \lastand

+          \else

+             \unskip,

+          \fi}%

+ \begin{center}%

+ \let\newline\\

+ {\Large \bfseries\boldmath

+  \pretolerance=10000

+  \@title \par}\vskip .8cm

+\if!\@subtitle!\else {\large \bfseries\boldmath

+  \vskip -.65cm

+  \pretolerance=10000

+  \@subtitle \par}\vskip .8cm\fi

+ \setbox0=\vbox{\setcounter{@auth}{1}\def\and{\stepcounter{@auth}}%

+ \def\thanks##1{}\@author}%

+ \global\value{@inst}=\value{@auth}%

+ \global\value{auco}=\value{@auth}%

+ \setcounter{@auth}{1}%

+{\lineskip .5em

+\noindent\ignorespaces

+\@author\vskip.35cm}

+ {\small\institutename}

+ \end{center}%

+ }

+

+% definition of the "\spnewtheorem" command.

+%

+% Usage:

+%

+%     \spnewtheorem{env_nam}{caption}[within]{cap_font}{body_font}

+% or  \spnewtheorem{env_nam}[numbered_like]{caption}{cap_font}{body_font}

+% or  \spnewtheorem*{env_nam}{caption}{cap_font}{body_font}

+%

+% New is "cap_font" and "body_font". It stands for

+% fontdefinition of the caption and the text itself.

+%

+% "\spnewtheorem*" gives a theorem without number.

+%

+% A defined spnewthoerem environment is used as described

+% by Lamport.

+%

+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

+

+\def\@thmcountersep{}

+\def\@thmcounterend{.}

+

+\def\spnewtheorem{\@ifstar{\@sthm}{\@Sthm}}

+

+% definition of \spnewtheorem with number

+

+\def\@spnthm#1#2{%

+  \@ifnextchar[{\@spxnthm{#1}{#2}}{\@spynthm{#1}{#2}}}

+\def\@Sthm#1{\@ifnextchar[{\@spothm{#1}}{\@spnthm{#1}}}

+

+\def\@spxnthm#1#2[#3]#4#5{\expandafter\@ifdefinable\csname #1\endcsname

+   {\@definecounter{#1}\@addtoreset{#1}{#3}%

+   \expandafter\xdef\csname the#1\endcsname{\expandafter\noexpand

+     \csname the#3\endcsname \noexpand\@thmcountersep \@thmcounter{#1}}%

+   \expandafter\xdef\csname #1name\endcsname{#2}%

+   \global\@namedef{#1}{\@spthm{#1}{\csname #1name\endcsname}{#4}{#5}}%

+                              \global\@namedef{end#1}{\@endtheorem}}}

+

+\def\@spynthm#1#2#3#4{\expandafter\@ifdefinable\csname #1\endcsname

+   {\@definecounter{#1}%

+   \expandafter\xdef\csname the#1\endcsname{\@thmcounter{#1}}%

+   \expandafter\xdef\csname #1name\endcsname{#2}%

+   \global\@namedef{#1}{\@spthm{#1}{\csname #1name\endcsname}{#3}{#4}}%

+                               \global\@namedef{end#1}{\@endtheorem}}}

+

+\def\@spothm#1[#2]#3#4#5{%

+  \@ifundefined{c@#2}{\@latexerr{No theorem environment `#2' defined}\@eha}%

+  {\expandafter\@ifdefinable\csname #1\endcsname

+  {\newaliascnt{#1}{#2}%

+  \expandafter\xdef\csname #1name\endcsname{#3}%

+  \global\@namedef{#1}{\@spthm{#1}{\csname #1name\endcsname}{#4}{#5}}%

+  \global\@namedef{end#1}{\@endtheorem}}}}

+

+\def\@spthm#1#2#3#4{\topsep 7\p@ \@plus2\p@ \@minus4\p@

+\refstepcounter{#1}%

+\@ifnextchar[{\@spythm{#1}{#2}{#3}{#4}}{\@spxthm{#1}{#2}{#3}{#4}}}

+

+\def\@spxthm#1#2#3#4{\@spbegintheorem{#2}{\csname the#1\endcsname}{#3}{#4}%

+                    \ignorespaces}

+

+\def\@spythm#1#2#3#4[#5]{\@spopargbegintheorem{#2}{\csname

+       the#1\endcsname}{#5}{#3}{#4}\ignorespaces}

+

+\def\@spbegintheorem#1#2#3#4{\trivlist

+                 \item[\hskip\labelsep{#3#1\ #2\@thmcounterend}]#4}

+

+\def\@spopargbegintheorem#1#2#3#4#5{\trivlist

+      \item[\hskip\labelsep{#4#1\ #2}]{#4(#3)\@thmcounterend\ }#5}

+

+% definition of \spnewtheorem* without number

+

+\def\@sthm#1#2{\@Ynthm{#1}{#2}}

+

+\def\@Ynthm#1#2#3#4{\expandafter\@ifdefinable\csname #1\endcsname

+   {\global\@namedef{#1}{\@Thm{\csname #1name\endcsname}{#3}{#4}}%

+    \expandafter\xdef\csname #1name\endcsname{#2}%

+    \global\@namedef{end#1}{\@endtheorem}}}

+

+\def\@Thm#1#2#3{\topsep 7\p@ \@plus2\p@ \@minus4\p@

+\@ifnextchar[{\@Ythm{#1}{#2}{#3}}{\@Xthm{#1}{#2}{#3}}}

+

+\def\@Xthm#1#2#3{\@Begintheorem{#1}{#2}{#3}\ignorespaces}

+

+\def\@Ythm#1#2#3[#4]{\@Opargbegintheorem{#1}

+       {#4}{#2}{#3}\ignorespaces}

+

+\def\@Begintheorem#1#2#3{#3\trivlist

+                           \item[\hskip\labelsep{#2#1\@thmcounterend}]}

+

+\def\@Opargbegintheorem#1#2#3#4{#4\trivlist

+      \item[\hskip\labelsep{#3#1}]{#3(#2)\@thmcounterend\ }}

+

+\if@envcntsect

+   \def\@thmcountersep{.}

+   \spnewtheorem{theorem}{Theorem}[section]{\bfseries}{\itshape}

+\else

+   \spnewtheorem{theorem}{Theorem}{\bfseries}{\itshape}

+   \if@envcntreset

+      \@addtoreset{theorem}{section}

+   \else

+      \@addtoreset{theorem}{chapter}

+   \fi

+\fi

+

+%definition of divers theorem environments

+\spnewtheorem*{claim}{Claim}{\itshape}{\rmfamily}

+\spnewtheorem*{proof}{Proof}{\itshape}{\rmfamily}

+\if@envcntsame % alle Umgebungen wie Theorem.

+   \def\spn@wtheorem#1#2#3#4{\@spothm{#1}[theorem]{#2}{#3}{#4}}

+\else % alle Umgebungen mit eigenem Zaehler

+   \if@envcntsect % mit section numeriert

+      \def\spn@wtheorem#1#2#3#4{\@spxnthm{#1}{#2}[section]{#3}{#4}}

+   \else % nicht mit section numeriert

+      \if@envcntreset

+         \def\spn@wtheorem#1#2#3#4{\@spynthm{#1}{#2}{#3}{#4}

+                                   \@addtoreset{#1}{section}}

+      \else

+         \def\spn@wtheorem#1#2#3#4{\@spynthm{#1}{#2}{#3}{#4}

+                                   \@addtoreset{#1}{chapter}}%

+      \fi

+   \fi

+\fi

+\spn@wtheorem{case}{Case}{\itshape}{\rmfamily}

+\spn@wtheorem{conjecture}{Conjecture}{\itshape}{\rmfamily}

+\spn@wtheorem{corollary}{Corollary}{\bfseries}{\itshape}

+\spn@wtheorem{definition}{Definition}{\bfseries}{\itshape}

+\spn@wtheorem{example}{Example}{\itshape}{\rmfamily}

+\spn@wtheorem{exercise}{Exercise}{\itshape}{\rmfamily}

+\spn@wtheorem{lemma}{Lemma}{\bfseries}{\itshape}

+\spn@wtheorem{note}{Note}{\itshape}{\rmfamily}

+\spn@wtheorem{problem}{Problem}{\itshape}{\rmfamily}

+\spn@wtheorem{property}{Property}{\itshape}{\rmfamily}

+\spn@wtheorem{proposition}{Proposition}{\bfseries}{\itshape}

+\spn@wtheorem{question}{Question}{\itshape}{\rmfamily}

+\spn@wtheorem{solution}{Solution}{\itshape}{\rmfamily}

+\spn@wtheorem{remark}{Remark}{\itshape}{\rmfamily}

+

+\def\@takefromreset#1#2{%

+    \def\@tempa{#1}%

+    \let\@tempd\@elt

+    \def\@elt##1{%

+        \def\@tempb{##1}%

+        \ifx\@tempa\@tempb\else

+            \@addtoreset{##1}{#2}%

+        \fi}%

+    \expandafter\expandafter\let\expandafter\@tempc\csname cl@#2\endcsname

+    \expandafter\def\csname cl@#2\endcsname{}%

+    \@tempc

+    \let\@elt\@tempd}

+

+\def\theopargself{\def\@spopargbegintheorem##1##2##3##4##5{\trivlist

+      \item[\hskip\labelsep{##4##1\ ##2}]{##4##3\@thmcounterend\ }##5}

+                  \def\@Opargbegintheorem##1##2##3##4{##4\trivlist

+      \item[\hskip\labelsep{##3##1}]{##3##2\@thmcounterend\ }}

+      }

+

+\renewenvironment{abstract}{%

+      \list{}{\advance\topsep by0.35cm\relax\small

+      \leftmargin=1cm

+      \labelwidth=\z@

+      \listparindent=\z@

+      \itemindent\listparindent

+      \rightmargin\leftmargin}\item[\hskip\labelsep

+                                    \bfseries\abstractname]}

+    {\endlist}

+

+\newdimen\headlineindent             % dimension for space between

+\headlineindent=1.166cm              % number and text of headings.

+

+\def\ps@headings{\let\@mkboth\@gobbletwo

+   \let\@oddfoot\@empty\let\@evenfoot\@empty

+   \def\@evenhead{\normalfont\small\rlap{\thepage}\hspace{\headlineindent}%

+                  \leftmark\hfil}

+   \def\@oddhead{\normalfont\small\hfil\rightmark\hspace{\headlineindent}%

+                 \llap{\thepage}}

+   \def\chaptermark##1{}%

+   \def\sectionmark##1{}%

+   \def\subsectionmark##1{}}

+

+\def\ps@titlepage{\let\@mkboth\@gobbletwo

+   \let\@oddfoot\@empty\let\@evenfoot\@empty

+   \def\@evenhead{\normalfont\small\rlap{\thepage}\hspace{\headlineindent}%

+                  \hfil}

+   \def\@oddhead{\normalfont\small\hfil\hspace{\headlineindent}%

+                 \llap{\thepage}}

+   \def\chaptermark##1{}%

+   \def\sectionmark##1{}%

+   \def\subsectionmark##1{}}

+

+\if@runhead\ps@headings\else

+\ps@empty\fi

+

+\setlength\arraycolsep{1.4\p@}

+\setlength\tabcolsep{1.4\p@}

+

+\endinput

+%end of file llncs.cls