add relevant research
[msc-thesis1617.git] / methods.dsl.tex
index bf9953f..0ee9a24 100644 (file)
@@ -1,10 +1,9 @@
-\section{\acrlong{EDSL}s}
 There are several techniques available for creating \glspl{EDSL}. Each of
 them have their own advantages and disadvantages such as extendability,
 typedness and view support. In the following subsections each of the main
 techniques are briefly explained.
 
-\subsection{Deep embedding}
+\section{Deep embedding}
 A deep \gls{EDSL} means that the language is represented as an \gls{ADT}. Views
 are functions that transform something to the datatype or the other way around.
 As an example we have the simple arithmetic \gls{EDSL} shown in
@@ -31,10 +30,11 @@ individually for all views.
 
 The first downside of the type of \gls{EDSL} can be overcome by using
 \glspl{GADT}\cite{cheney_first-class_2003}. Listing~\ref{lst:exdeepgadt} shows
-the same language, but type-safe with a \gls{GADT}\footnote{\glspl{GADT} are
-not supported in the current version of \gls{Clean} and therefore the syntax is
-artificial. However, \glspl{GADT} can be simulated using bimaps}. Unfortunately
-the lack of extendability stays a problem. If a language construct is added no
+the same language, but type-safe with a \gls{GADT}. \glspl{GADT} are not
+supported in the current version of \gls{Clean} and therefore the syntax is
+artificial. However, it has been shown that \glspl{GADT} can be simulated using
+bimaps or projection pairs\cite{cheney_lightweight_2002}. Unfortunately the
+lack of extendability stays a problem. If a language construct is added no
 compile time guarantee is given that all views support it.
 
 \begin{lstlisting}[language=Clean,label={lst:exdeepgadt},%
@@ -49,7 +49,7 @@ compile time guarantee is given that all views support it.
        | E.e: Eq (DSL e) (DSL e)          -> DSL Bool &  == e
 \end{lstlisting}
 
-\subsection{Shallow embedding}
+\section{Shallow embedding}
 In a shallowly \gls{EDSL} all language constructs are expressed as functions in
 the host language. An evaluator view for our example language then looks
 something like the code shown in Listing~\ref{lst:exshallow}. Note that much of
@@ -87,7 +87,7 @@ information for all the views. This will mean that every component will have to
 implement all views. This makes it slow for multiple views and complex to
 implement.
 
-\subsection{Class based shallow embedding}
+\section{Class based shallow embedding}
 The third type of embedding is called class based shallow embedding and has the
 best of both shallow and deep embedding. In class based shallow embedding the
 language constructs are defined as type classes. The same language is shown