Skip to content

Commit

Permalink
Merge pull request #24 from spoofax-shell/consistency
Browse files Browse the repository at this point in the history
[RFC] Consistency fixes
  • Loading branch information
Balletie committed Apr 29, 2016
2 parents d6f8cab + 49a8014 commit e14ea2b
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 34 deletions.
4 changes: 2 additions & 2 deletions research/00-introduction.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ \section*{Introduction}
\addcontentsline{toc}{section}{Introduction}

Spoofax is a language workbench developed by Delft University of Technology over
the course of several years. During those years it has grown to be \textit{"a
the course of several years. During those years it has grown to be \textit{``a
language workbench for efficient, agile development of textual domain-specific
languages with state-of-the-art IDE support"}~\cite{Kats10a}.
languages with state-of-the-art IDE support''}~\cite{Kats10a}.

Since Spoofax is used to develop new domain-specific languages, the ability for
rapid prototyping using a read-eval-print loop would be very convenient. The
Expand Down
8 changes: 4 additions & 4 deletions research/02-repl.tex
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ \section{Read-Eval-Print Loops}
expressions in a programming language are typed by the user, after which the
results of that expression are printed back to the user. Such an environment is
called a Read-Eval-Print Loop (REPL), although many different names are known,
including but not limited to \textit{language shell},
\textit{command-line interpreter} or \textit{interactive interpreter}. There
including but not limited to \emph{language shell},
\emph{command-line interpreter} or \emph{interactive interpreter}. There
are subtle differences between these names and the name REPL. These are,
however, mostly of semantic value. In this report the term REPL is chosen,
because it conveys the notion of such an interactive environment well.
Expand Down Expand Up @@ -68,7 +68,7 @@ \subsection{Advantages of REPLs}
The explorative and interactive features of a REPL also make it an excellent
tool for programmers to learn a new programming language. REPLs are also
combined with what is called literate programming to offer notebooks or language
playgrounds, as discussed in~\cref{sec:literate-programming}.
playgrounds, as discussed in \cref{sec:literate-programming}.

\subsection{Functionality}
\label{sssec:repl-functionality}
Expand All @@ -77,7 +77,7 @@ \subsection{Functionality}
However, a core set of functionalities, shared between all REPL implementations,
can be identified. To reach this core set of features, well-known REPLs have
been investigated and their features have been compiled into a matrix as seen
in~\cref{table:feature-matrix}. These features are shortly discussed below.
in \cref{table:feature-matrix}. These features are shortly discussed below.

\begin{table}[]
\centering
Expand Down
8 changes: 4 additions & 4 deletions research/03-literate-prog.tex
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ \section{Literate Programming}
what the programmer wants a computer to do~\cite{knuth1984},
by mixing documentation and code in a single source file.
This idea of literate programming was realized in its original form as the
`WEB' language developed during Knuth's research at Stanford University.
``WEB'' language developed during Knuth's research at Stanford University.

\subsubsection{The `WEB' language}
\subsubsection{The ``WEB'' language}

The `WEB' language was mainly a combination of two other languages, namely
The ``WEB'' language was mainly a combination of two other languages, namely
\TeX{} for document formatting and PASCAL as the programming language. By
combining these languages, each with a different purpose, into one language, the
source code serves two purposes: to produce a document describing the program
Expand All @@ -36,7 +36,7 @@ \subsubsection{IPython / Jupyter notebooks}
A more recent example of literate programming comes in the form of IPython with
Jupyter notebooks~\cite{ipython2007}. IPython was partially inspired by other
scientific tools already offering notebook-like functionality, such as Matlab or
Mathematica. Besides the literal programming style introduced by `WEB', IPython
Mathematica. Besides the literal programming style introduced by ``WEB'', IPython
notebooks allow for REPL-style interactive editing; documentation and code can
be edited live and blocks of code can be reevaluated, printing their updated
results. IPython notebooks also allow for more complex graphical elements such
Expand Down
2 changes: 1 addition & 1 deletion research/04-problem-def.tex
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ \section{Problem Definition}
provide this rapid prototyping ability for other languages like Lisp
and Python. Therefore, the client has expressed their interest in
REPLs that are generated from language definitions created with
Spoofax. Such a REPL would aid both the developer of the language, and
Spoofax. Such a REPL would aid both the developer of the language and
its end-user.

Since a lot of language services are already provided by Spoofax, the
Expand Down
2 changes: 1 addition & 1 deletion research/05-problem-ana.tex
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ \subsubsection{Partially replacing the AST of the current program}
When given an identifier to bind a new term to, the term in the AST
corresponding to the identifier has to be replaced with the new term.
This implies that the REPL needs to able parse single terms that might
not be valid programs, and then update the AST of the program accordingly.
not be valid programs and then update the AST of the program accordingly.
This requirement has certain effects when it comes to the build process
used in the REPL.

Expand Down
6 changes: 3 additions & 3 deletions research/06-require-ana.tex
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ \subsubsection{Must have}

Requirements listed under ``must haves'' are of critical importance to the
usability and success of the deliverable. Without these, the product is not in a
workable state and is not likely to be accepted by the client. \textit{Must} can
workable state and is not likely to be accepted by the client. \emph{Must} can
also be considered an acronym for the Minimum Usable SubseT.

\paragraph{Interactive shell} Per the definition of a REPL given in
Expand Down Expand Up @@ -99,7 +99,7 @@ \subsubsection{Should have}
Requirements listed under ``should-haves'' are important, but not necessary for
a working product.

\paragraph{Ability to redefine identifiers} As explained in ~\cref{sec:repl},
\paragraph{Ability to redefine identifiers} As explained in \cref{sec:repl},
REPLs provide the ability to explore unknown problem domains. It is not a
far-fetched idea that a developer would want to change function implementations
or the types of certain variables. To support this, a REPL should allow users to
Expand Down Expand Up @@ -136,7 +136,7 @@ \subsubsection{Could have}
between this feature and the previously mentioned environment inspection is that
this feature works per variable.

\paragraph{Literate programming} As explained in section
\paragraph{Literate programming} As explained in
\cref{sec:literate-programming}, literate programming offers the advantage that
code and documentation go hand in hand. This allows developers of languages in
Spoofax to document and illustrate their language simultaneously with the
Expand Down
2 changes: 1 addition & 1 deletion research/07-realisation.tex
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
\section{Frameworks and Tools}
\label{sec:realisation-product}

The previous section analysed the requirements for the product as set in
The previous section analyzed the requirements for the product as set in
\cref{sec:requirement-analysis}. The purpose of this section is to discuss the
frameworks and tools used during the development of the product.

Expand Down
18 changes: 9 additions & 9 deletions research/notes.org
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ the designer of the language ever having to care about its
implementation.

This section goes over the elements that make up the specification of
a language, and for each element the relevant part of Spoofax is
a language. For each element the relevant part of Spoofax is
given[fn:comp-constr-course:This section follows the structure of the
language specification portion of the compiler construction course at
the TU Delft. The slides can be found here:
Expand Down Expand Up @@ -67,7 +67,7 @@ The declarative nature of SDF3 allows for thinking in terms of the
structure (the /what/), instead of in terms of parser algorithms (the
/how/) as is the case with many current parsing
algorithms\nbsp\cite{Kats10b}. The syntax definition is used to make
parsers that parse a textual representation of a program into its AST,
parsers that parse a textual representation of a program into its AST
and pretty-printers for mapping ASTs back to text. However, due to its
declarative nature, SDF3 is not limited to generating parsers and
pretty printers: it can also be used for error recovery
Expand All @@ -83,8 +83,8 @@ parser generated from an SDF3 specification.
Static semantics refer to the meaning of what a well-formed program is
for a particular language\nbsp\cite{Milner97}. This imposes more
constraints than syntax definition, such as name binding, scoping
rules, and type checking. These cannot be specified by a syntax
definition alone, and are thus considered separately.
rules and type checking. These cannot be specified by a syntax
definition alone and are thus considered separately.
*** Declarative static semantics specification in Spoofax
In Spoofax, all the static semantics as well as the dynamic semantics
used to be specified with the /Stratego/ transformation language
Expand Down Expand Up @@ -163,11 +163,11 @@ specification (see the previous section [[#sec:nabl]]).
:CUSTOM_ID: sec:term-rewrite
:END:
Spoofax offers a high level declarative DSL called /Stratego/ for
program transformation\nbsp\cite{Visser01}. Stratego operates on ASTs,
program transformation\nbsp\cite{Visser01}. Stratego operates on ASTs
and is the most general part of Spoofax: it can be used for specifying
the static semantics (name binding, type checking), desugaring rules
and the dynamic semantics of a language. As the static semantics can
now be done using NaBL and TS, and the dynamic semantics with DynSem
now be done using NaBL and TS and the dynamic semantics with DynSem
(section [[#sec:dynamic-semantics]]), Stratego is now used to specify
desugaring rules for a language, as well as optimizations such as
constant folding and other applications of AST transformations.
Expand All @@ -176,7 +176,7 @@ Stratego is based on the notions of /term rewrite rules/ and so-called
/strategies/.
*** Term rewrite rules
A rewrite rule is a transformation on a term, in which the left-hand
side allows for pattern matching and variable binding, and the right
side allows for pattern matching and variable binding and the right
hand side instantiates new replacement terms. An example of a rewrite
rule for paplj is given below.
#+LATEX: \lstset{language=stratego,numbers=left}
Expand Down Expand Up @@ -284,13 +284,13 @@ website: http://www.metaborg.org/spoofax/editor-services/].

Editor services are defined using a DSL, shown in the bottom window of
figure [[fig:menu-actions]]. In the case of menus, their actions are
specified using Stratego, and via Stratego the actions can even be
specified using Stratego. Via Stratego these actions can even be
specified in Java. As such, Spoofax allows for defining arbitrarily
complex IDE actions.

Many of these editor services such as syntax highlighting and code
folding rules can be derived from the syntax
definition\nbsp\cite{Kats10c}, and can be further customized if
definition\nbsp\cite{Kats10c} and can be further customized if
needed. Taken together with the language definition, the editor
services provide a language with a complete and state-of-the-art IDE
experience\nbsp\cite{Kats10a}.
Expand Down
18 changes: 9 additions & 9 deletions research/spoofax-org-export.tex
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
implementation.

This section goes over the elements that make up the specification of
a language, and for each element the relevant part of Spoofax is
a language. For each element the relevant part of Spoofax is
given\footnote{This section follows the structure of the
language specification portion of the compiler construction course at
the TU Delft. The slides can be found here:
Expand Down Expand Up @@ -59,7 +59,7 @@ \subsubsection{SDF3: syntax definition in Spoofax}
structure (the \emph{what}), instead of in terms of parser algorithms (the
\emph{how}) as is the case with many current parsing
algorithms~\cite{Kats10b}. The syntax definition is used to make
parsers that parse a textual representation of a program into its AST,
parsers that parse a textual representation of a program into its AST
and pretty-printers for mapping ASTs back to text. However, due to its
declarative nature, SDF3 is not limited to generating parsers and
pretty printers: it can also be used for error recovery
Expand All @@ -73,8 +73,8 @@ \subsection{Static Semantics}
Static semantics refer to the meaning of what a well-formed program is
for a particular language~\cite{Milner97}. This imposes more
constraints than syntax definition, such as name binding, scoping
rules, and type checking. These cannot be specified by a syntax
definition alone, and are thus considered separately.
rules and type checking. These cannot be specified by a syntax
definition alone and are thus considered separately.
\subsubsection{Declarative static semantics specification in Spoofax}
\label{sec:orgheadline2}
In Spoofax, all the static semantics as well as the dynamic semantics
Expand Down Expand Up @@ -148,11 +148,11 @@ \subsubsection{TS: the Type Specification language}
\subsection{Term Rewriting and Program Transformation}
\label{sec:term-rewrite}
Spoofax offers a high level declarative DSL called \emph{Stratego} for
program transformation~\cite{Visser01}. Stratego operates on ASTs,
program transformation~\cite{Visser01}. Stratego operates on ASTs
and is the most general part of Spoofax: it can be used for specifying
the static semantics (name binding, type checking), desugaring rules
and the dynamic semantics of a language. As the static semantics can
now be done using NaBL and TS, and the dynamic semantics with DynSem
now be done using NaBL and TS and the dynamic semantics with DynSem
(section \ref{sec:dynamic-semantics}), Stratego is now used to specify
desugaring rules for a language, as well as optimizations such as
constant folding and other applications of AST transformations.
Expand All @@ -162,7 +162,7 @@ \subsection{Term Rewriting and Program Transformation}
\subsubsection{Term rewrite rules}
\label{sec:orgheadline4}
A rewrite rule is a transformation on a term, in which the left-hand
side allows for pattern matching and variable binding, and the right
side allows for pattern matching and variable binding and the right
hand side instantiates new replacement terms. An example of a rewrite
rule for paplj is given below.
\lstset{language=stratego,numbers=left}
Expand Down Expand Up @@ -264,13 +264,13 @@ \subsection{Editor Services}

Editor services are defined using a DSL, shown in the bottom window of
figure \ref{fig:menu-actions}. In the case of menus, their actions are
specified using Stratego, and via Stratego the actions can even be
specified using Stratego. Via Stratego these actions can even be
specified in Java. As such, Spoofax allows for defining arbitrarily
complex IDE actions.

Many of these editor services such as syntax highlighting and code
folding rules can be derived from the syntax
definition~\cite{Kats10c}, and can be further customized if
definition~\cite{Kats10c} and can be further customized if
needed. Taken together with the language definition, the editor
services provide a language with a complete and state-of-the-art IDE
experience~\cite{Kats10a}.

0 comments on commit e14ea2b

Please sign in to comment.