\PassOptionsToPackage{unicode=true}{hyperref} % options for packages loaded elsewhere
\PassOptionsToPackage{hyphens}{url}
%
\documentclass[]{article}
\usepackage{lmodern}
\usepackage{amssymb,amsmath}
\usepackage{ifxetex,ifluatex}
\usepackage{fixltx2e} % provides \textsubscript
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
  \usepackage[T1]{fontenc}
  \usepackage[utf8]{inputenc}
  \usepackage{textcomp} % provides euro and other symbols
\else % if luatex or xelatex
  \usepackage{unicode-math}
  \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase}
\fi
% use upquote if available, for straight quotes in verbatim environments
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
% use microtype if available
\IfFileExists{microtype.sty}{%
\usepackage[]{microtype}
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}
\IfFileExists{parskip.sty}{%
\usepackage{parskip}
}{% else
\setlength{\parindent}{0pt}
\setlength{\parskip}{6pt plus 2pt minus 1pt}
}
\usepackage{hyperref}
\hypersetup{
            pdftitle={CSci 658-01: Software Language Engineering Spring 2018 Assignment \#3},
            pdfauthor={H. Conrad Cunningham},
            pdfborder={0 0 0},
            breaklinks=true}
\urlstyle{same}  % don't use monospace font for urls
\setlength{\emergencystretch}{3em}  % prevent overfull lines
\providecommand{\tightlist}{%
  \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\setcounter{secnumdepth}{0}
% Redefines (sub)paragraphs to behave more like sections
\ifx\paragraph\undefined\else
\let\oldparagraph\paragraph
\renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}}
\fi
\ifx\subparagraph\undefined\else
\let\oldsubparagraph\subparagraph
\renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}}
\fi

% set default figure placement to htbp
\makeatletter
\def\fps@figure{htbp}
\makeatother

\usepackage{caption}
\DeclareCaptionLabelFormat{nolabel}{}
\captionsetup{labelformat=nolabel}

\title{CSci 658-01: Software Language Engineering\\
Spring 2018 Assignment \#3}
\author{\textbf{H. Conrad Cunningham}}
\date{\textbf{5 March 2018}}

\begin{document}
\maketitle

\hypertarget{revised-deadline-monday-2-april-2018-1159-p.m.}{%
\subsection{Revised Deadline Monday, 2 April, 2018, 11:59
p.m.}\label{revised-deadline-monday-2-april-2018-1159-p.m.}}

Original deadline Thursday, 29 March, 2018, 11:59 p.m.

\hypertarget{general-instructions}{%
\subsection{General Instructions}\label{general-instructions}}

All homework and programming exercises must be prepared in accordance
with the instructions given in the \href{../658syl_sp18.html}{Syllabus}.
Each assignment must be submitted to your instructor by its stated
deadline.

\hypertarget{assignment-3-description}{%
\subsection{Assignment \#3 Description}\label{assignment-3-description}}

This assignment may overlap with Assignment~\#4, which likely will be a
DSL analysis and design exercise.

\hypertarget{alternative-a-state-machine-internal-dsl}{%
\subsubsection{Alternative A (State Machine Internal
DSL)}\label{alternative-a-state-machine-internal-dsl}}

Unless you chose an alternative problem, Assignments \#1 and \#2
required you to develop a \emph{semantic model} and an \emph{external
DSL} for Fowler's State Machine case study. You could use Python 3 or
some other appropriate language (excluding Java or Scala for which we
had solutions). You could use any of the approaches in the class
materials for designing and implementing external DSLs.

This alternative for Assignment \#3 asks you to design and implement an
appropriate \emph{internal DSL} for the State Machine problem in the
same programming language. You may use the semantic model you developed
for Assignment \#1.

You may use any of the internal DSL techniques we have talked about in
class or that are in the Fowler DSL book. Be systematic in your use of
the DSL techniques. That is, identify what techniques you are using and,
if appropriate, how you are adapting the technique to the programming
language, problem, and DSL design. Think about design patterns and good
programmingn practices.

\hypertarget{alternative-b-lair-configuration-dsl}{%
\subsubsection{Alternative B (Lair Configuration
DSL)}\label{alternative-b-lair-configuration-dsl}}

This alternative for Assignment \#3 asks you to design and implement
\emph{one} of the following options for the Lair Configuration case
study. As above, approach the task in a systematic manner. You may use
the semantic model I provided in Python 3.

\begin{itemize}
\item
  a Python 3 \emph{internal DSL} for which I did \textbf{not} provide a
  solution (e.g., Literal Collection, Nested Function calls, etc).
\item
  a Python 3 \emph{external DSL} using a different approach than I did
  for Parsita-based DSL. (Use either a different parsing technique or a
  significanly different syntax).
\end{itemize}

\hypertarget{alternative-c-sandwich-dsl}{%
\subsubsection{Alternative C (Sandwich
DSL)}\label{alternative-c-sandwich-dsl}}

This alternative for Assignment \#3 asks you to design and implement
\emph{one} of the following options related to the Sandwich DSL case
study. As above, approach the task in a systematic manner. You will need
to implement an appropriate semantic model.

\begin{itemize}
\item
  a Python 3 \emph{internal} DSL
\item
  a Python 3 \emph{external} DSL
\end{itemize}

The class lecture notes give solutions in Haskell, Scala, and Lua, with
the older Lua problem description being slightly different.

\hypertarget{alternative-d-choose-your-own-adventure}{%
\subsubsection{Alternative D (Choose Your Own
Adventure)}\label{alternative-d-choose-your-own-adventure}}

Investigate use of the following:

\begin{itemize}
\item
  a Python 3 parser generator library (e.g., Arpeggio/textX)
\item
  a different parser combinator library (e.g., Parsy) than the one I
  used.
\end{itemize}

Then design and implement an \emph{external} DSL for the (a) State
Machine, (b) Lair Configuration, or (c) Sandwich DSL case studies. For
the State Machine you may use your semantic model from Assignments 1 and
2. For the Lair Configuration, you may use my semantic model from class.

\hypertarget{for-all-alternatives}{%
\subsection{For All Alternatives}\label{for-all-alternatives}}

\begin{itemize}
\item
  When complete, submit your source code, test DSL input, test program,
  etc. files to Blackboard.
\item
  Be sure to describe your DSL's syntax and give instructions on how to
  build your program from the source code.
\item
  Remember that the instructor prefers to compile and execute your
  solution on his MacOS systems. Make it easy for him by identifying
  what software is needed, etc.
\item
  This is an individual assignment. Document what resources you used in
  constructing your solution.
\end{itemize}

\hypertarget{looking-ahead}{%
\subsubsection{Looking Ahead}\label{looking-ahead}}

\begin{itemize}
\item
  Assignment \#4 will likely be a group DSL analysis and design exercise
  for a problem. (I am considering using a text-based,
  choose-your-own-adventure game as the problem.)
\item
  Finally, you will need to complete a project in which you choose your
  own problem and then design an implement a DSL to solve it. You are
  encouraged to choose something of interest to your research or
  professional goals or something else interesting.
\end{itemize}

\end{document}
