X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fmaster-project%2Freport.git;a=blobdiff_plain;f=Chapters%2FContext.tex;h=7323b5b42f60b0f3d4243d4c523d30f3281ddcf8;hp=7e620a073e3cd648459b274e23d7543ea5283c9b;hb=a8cc8a42f676a1ab1ddca1c84b017d059610783d;hpb=75d1001c7a7809c80bc4113477ad90b12f23b80f diff --git a/Chapters/Context.tex b/Chapters/Context.tex index 7e620a0..7323b5b 100644 --- a/Chapters/Context.tex +++ b/Chapters/Context.tex @@ -9,11 +9,10 @@ \blank[medium] \startcitedquotation[deursen00] - A domain-specific language (\small{DSL}) is a program- - ming language or executable specification language - that offers, through appropriate notations and ab- - stractions, expressive power focused on, and usu- - ally restricted to, a particular problem domain. + A domain-specific language (\small{DSL}) is a programming language + or executable specification language that offers, through + appropriate notations and abstractions, expressive power focused + on, and usually restricted to, a particular problem domain. \stopcitedquotation An embedded \small{DSL} is a \small{DSL} that is embedded in @@ -29,7 +28,7 @@ polymorphism, higher-order values or type classes can be used in the embedded language. \cite[hudak96] - For an \small{EDSL}, the definitions of compiletime and runtime + For an \small{EDSL}, the definitions of compile-time and run-time are typically fuzzy (and thus hard to define here), since the \small{EDSL} \quote{compiler} is usually compiled by the same Haskell compiler as the \small{EDSL} program itself. @@ -40,15 +39,15 @@ this not been done before?}. Using a functional language for describing hardware is not a new idea at all. In fact, there has been research into functional hardware description even before the conventional hardware description - languages were created. Examples of these are µFP \cite[sheeran83] and + languages were created. Examples of these are µFP \cite[sheeran83]\ and Ruby \cite[jones90]. Functional languages were not nearly as advanced as they are now, and functional hardware description never really got off. Recently, there have been some renewed efforts, especially using the - Haskell functional language. Examples are Lava \cite[claessen00] (an - \small{EDSL}) and ForSyde \cite[sander04] (an \small{EDSL} using - Template Haskell). \cite[baaij09] has a more complete overview of the + Haskell functional language. Examples are Lava \cite[claessen00]\ (an + \small{EDSL}) and ForSyde \cite[sander04]\ (an \small{EDSL} using + Template Haskell). \cite[baaij09]\ has a more complete overview of the current field. We will now have a look at the existing hardware description languages, @@ -70,7 +69,7 @@ define limitations on values, making it easier to find violations and thus bugs. \item Easy to process. Functional languages have nice properties like - purity \refdef{purity} and single binding behaviour, which make it easy + purity \refdef{purity} and single binding behavior, which make it easy to apply program transformations and optimizations and could potentially simplify program verification. \stopitemize @@ -80,7 +79,7 @@ embedded functional hardware description languages (in particular those using Haskell) are limited. Below a number of downsides are sketched of the recent attempts using the Haskell language. - \cite[baaij09] has a more complete overview of these and other + \cite[baaij09]\ has a more complete overview of these and other languages. This list uses Lava and ForSyDe as examples, but tries to generalize @@ -102,7 +101,7 @@ generate parts of this \small{AST}. Template Haskell is a very powerful, but also complex mechanism. - It was inteded to simplify the generation of some repetive pieces + It was intended to simplify the generation of some repetitive pieces of code, but its introspection features have inspired all sorts of applications, such as hardware description compilers. \stopframedtext @@ -113,7 +112,7 @@ specific languages. For example, an \hs{if} or \hs{case} expression is typically executed once when the Haskell description is processed and only the result is reflected in the generated - datastructure (and thus in the final program). In Lava, for + data-structure (and thus in the final program). In Lava, for example, conditional assignment can only be described by using explicit multiplexer components, not using any of Haskell's compact mechanisms (such as \hs{case} expressions or pattern