\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 Lecture Notes},
            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 Lecture Notes}
\author{\textbf{H. Conrad Cunningham}}
\date{\textbf{4 May 2018}}

\begin{document}
\maketitle

{
\setcounter{tocdepth}{4}
\tableofcontents
}
Copyright (C) 2018, \href{http://www.cs.olemiss.edu/~hcc}{H. Conrad
Cunningham}\\
Professor of \href{https://www.cs.olemiss.edu}{Computer and Information
Science}\\
\href{http://www.olemiss.edu}{University of Mississippi}\\
211 Weir Hall\\
P.O. Box 1848\\
University, MS 38677\\
(662) 915-5358

I maintain these notes as text in the Pandoc's dialect of Markdown using
embedded LaTeX markup for the mathematical formulas and then translate
the notes to HTML, PDF, and other formats as needed.

\textbf{Advisory}: The HTML version of this document requires use of a
browser that supports the display of MathML. A good choice as of May
2018 is a recent version of Firefox from Mozilla.

\hypertarget{lecture-notes}{%
\section{Lecture Notes}\label{lecture-notes}}

\protect\hyperlink{current_lecture}{\textbf{Go To Current Lecture}}

\hypertarget{lecture-notes-examples-and-schedule}{%
\subsection{Lecture Notes, Examples, and
Schedule}\label{lecture-notes-examples-and-schedule}}

\hypertarget{language-oriented-programming}{%
\subsubsection{Language-Oriented
Programming}\label{language-oriented-programming}}

\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
\item
  \textbf{(22 Jan) Review syllabus.} Distribute papers to be discussed
  over next two weeks.
\item
   \textbf{(24-26 Jan) Discuss ``Little Languages'' paper}

  \begin{enumerate}
  \def\labelenumii{\alph{enumii}.}
  \item
    Paper: Jon Bentley.
    \href{localcopy/BentleyLittleLanguages.pdf}{Programming Pearls:
    Little Languages}, \emph{Communications of the ACM}, Vol. 29, No.~8,
    pp.~711-721, August 1986.
  \item
    Software: The \texttt{groff} package includes the GNU
    implementations of the \texttt{troff} set of ``Unix'' tools such as
    \texttt{pic} and \texttt{chem}. (I installed this on my iMac using
    Homebrew. I also installed the \texttt{plotutils} package to help
    with display in various formats.)
  \item
    Additional references for little language \texttt{pic} (not
    discussed)

    \begin{itemize}
    \tightlist
    \item
      Brian W. Kernighan.
      \href{http://doc.cat-v.org/unix/v8/picmemo.pdf}{PIC -\/- A
      Graphics Language for Typesetting, Revised User Manual}, Computing
      Science Technical Report No.~116, Bell Laboratories, December
      1984. {[}\href{localcopy/picmemo.pdf}{local}{]}
    \item
      Philipp K. Janert.
      \href{http://www.onlamp.com/pub/a/onlamp/2007/06/21/in-praise-of-pic.html}{In
      Praise of Pic}, \emph{ONLamp.com}, O'Reilly Media, June 2007,
      Retrieved 24 January, 2018.
    \item
      Eric S. Raymond.
      \href{http://floppsie.comp.glam.ac.uk/Glamorgan/gaius/web/pic.html}{Making
      Pictures with GNU PIC}, August 1995.
    \item
      W. Richard Stevens. \href{localcopy/pic_examples.pdf}{Examples of
      \texttt{pic} Macros}, Retrieved from
      \url{http://www.kohala.com/start/} (troff resources, pic), 24
      January 2018. {[}\href{localcopy/pic_examples.txt}{\texttt{pic}
      source}{]}
    \end{itemize}
  \item
    Additional references for the little languages \texttt{lex},
    \texttt{yacc}, \texttt{make}, and \texttt{chem} (not discussed)

    \begin{itemize}
    \tightlist
    \item
      Jon L. Bentley, Lynn W. Jelinski, and Brian W. Kernighan.
      \href{localcopy/chem.pdf}{Chem -- A Program for Phototypesetting
      Chemical Structure Diagrams}, AT\&T Bell Laboratories, Murray
      Hill, NJ 07974, U.S.A.
    \item
      Stuart I. Feldman. \href{localcopy/make.pdf}{Make -- A Program for
      Maintaining Computer Program}, \emph{Software: Practice and
      Experience}, Vol. 9, no. 4 pp.~255-265, 1979.
    \item
      Stephen C. Johnson. \href{localcopy/yacc.pdf}{Yacc: Yet Another
      Compiler-Compiler}, Vol. 32. Murray Hill, NJ: Bell Laboratories,
      1975.
    \item
      Michael E. Lesk and Eric Schmidt. \href{localcopy/lex.pdf}{Lex: A
      Lexical Analyzer Generator}, Bell Laboratories Murray Hill, NJ,
      1975.
    \item
      \href{https://learnxinyminutes.com/docs/make/}{Learn X in Y
      Minutes, Where X = make (GNU)}
    \item
      \href{https://learnxinyminutes.com/docs/bash/}{Learn X in Y
      Minutes, Where X = bash (GNU)}
    \end{itemize}
  \end{enumerate}
\item
   \textbf{(26-29 Jan) Discuss ``No Silver Bullet'' paper} and related
  issues

  \begin{enumerate}
  \def\labelenumii{\alph{enumii}.}
  \item
    Paper: Frederick P. Brooks. \href{localcopy/NoSilverBullet.pdf}{No
    Silver Bullet: Essence and Accident in Software Engineering},
    \emph{IEEE Computer}, Vol. 20, No.~4, 10-19, 1987.
  \item
    Retrospective paper after 10 years (not discussed): Frederick P.
    Brooks. `No Silver Bullet' Refired, Chapter 17 in \emph{The Mythical
    Man Month: Essays on Software Engineering, Anniversary Edition},
    Addison Wesley, 1995.
  \end{enumerate}
\item
   \textbf{(29-31 Jan) Discuss ``Language-Oriented Programming'' paper}

  \begin{enumerate}
  \def\labelenumii{\alph{enumii}.}
  \item
    Paper: M. P. Ward.
    \href{http://www.cse.dmu.ac.uk/~mward/martin/papers/middle-out-t.pdf}{Language-Oriented
    Programming}, \emph{Software--Concepts and Tools,} Vol. 15, No.~4,
    pp.~147-161, 1994.
    {[}\href{localcopy/LanguageOrientedProgramming.pdf}{local}{]}
  \item
    Additional references from paper (not discussed)

    \begin{itemize}
    \tightlist
    \item
      Charles Antony Richard Hoare.
      \href{localcopy/Hoare_Turing_Address.pdf}{The Emperor's Old
      Clothes} (1980 Turing Award Address), \emph{Communications of the
      ACM}, Vol. 24, No.~2, 75-83, 1981.
    \end{itemize}
  \end{enumerate}
\item
   \textbf{(31 Jan; intermittently until Spring Break, 19-28 Mar; 2-6
  Apr) Discuss overview of Domain Specific Languages}

  \begin{enumerate}
  \def\labelenumii{\alph{enumii}.}
  \item
    Instructor's notes on \href{DomainSpecificLanguages.html}{Domain
    Specific Languages}
  \item
    Mixed-in introductory discussion of
    \protect\hyperlink{FowlerDSLintro}{Fowler's DSL book introductory
    chapters}, \protect\hyperlink{StateMachineDSL}{State Machine DSL},
    and \protect\hyperlink{CompConfigDSL}{Computer Configuration DSL}
    below.
  \item
    References used in notes (most not discussed directly)

    \begin{itemize}
    \tightlist
    \item
      Martin Fowler. Using Domain-Specific Languages, Chapter 2,
      \emph{Domain-Specific Languages}, Addison Wesley, 2011.
    \item
      Steve Freeman and Nat Pryce.
      \href{http://www.jmock.org/oopsla2006.pdf}{Evolving an Embedded
      Domain-Specific Language in Java}, In \emph{Proceedings of the ACM
      SIGPLAN International Conference on Object-Oriented Programming,
      Systems, Languages, and Applications (OOPSLA)}, 12 pages, 2006.
      {[}\href{localcopy/EvolvingEmbeddedDSLJava.pdf}{local}{]}
    \item
      Gabor Karsai, Holger Krahn, Claas Pinkernell, Bernhard Rumpe,
      Martin Schindler and Steven Voelkel.
      \href{https://arxiv.org/pdf/1409.2378}{Design Guidelines for
      Domain Specific Languages}, In \emph{Proceedings of OOPSLA
      Workshop on Domain-Specific Modeling}, 2009. Also arXiv preprint
      arXiv:1409.2378, 2014.
      {[}\href{localcopy/Design_Guidelines_DSLs.pdf}{local}{]}
    \item
      Marjan Mernik, Jan Heering, and Anthony M. Sloane.
      \href{https://pdfs.semanticscholar.org/bd06/01088d5f217dc136a898f577763df92891cb.pdf}{When
      and How to Develop Domain Specific Languages}, \emph{ACM Computing
      Surveys}, 37(4):316-344, December 2005.
      {[}\href{localcopy/WhenDSL.pdf}{local}{]}
    \item
      Scott A. Thibault, Renaud Marlet, and Charles Consel.
      \href{localcopy/DSLDesignImpleVideo.pdf}{Domain-Specific
      Languages: From Design to Implementation--Application to Video
      Device Drivers Generation}. \emph{IEEE Transactions on Software
      Engineering}, 25(3):363--377, May/June 1999.
    \end{itemize}
  \end{enumerate}
\item
   \textbf{(dates on items) Survey Design Patterns}

  \begin{enumerate}
  \def\labelenumii{\alph{enumii}.}
  \item
    \textbf{(5-7 Feb)} Instructor's notes on
    \href{Patterns/Patterns.html}{Introduction to Patterns}
    {[}\href{Patterns/Intro_Patterns.html}{HTML slides}{]}
  \item
    \textbf{(7 Feb)} Instructor's notes on
    \href{Patterns/Pipes.html}{Pipes and Filters Architectural Pattern}
    (Not fully covered, used mainly to illustrate approach to pattern
    definition)
    {[}\href{Patterns/sle_Pipes_Filters_Pattern.ppt}{Powerpoint}{]}
  \item
    \textbf{(9-12 Feb)} John Vlissides. Designing with Patterns, In
    \emph{Pattern Hatching: Design Patterns Applied}, Addison-Wesley,
    1998.
    {[}\href{Patterns/sle_Designing_with_Patterns.ppt}{Powerpoint}{]}
  \item
    Additional references (not directly discussed in class)

    \begin{itemize}
    \tightlist
    \item
      \href{https://sourcemaking.com/design_patterns}{Source Making
      Design Patterns catalog}
    \item
      Instructor's slides on
      \href{Patterns/sle_Factory_Method_Pattern.ppt}{Factory Method
      Design Pattern (Powerpoint)}
    \item
      Instructor's slides on
      \href{Patterns/sle_Strategy_Pattern.ppt}{Strategy Design Pattern
      (Powerpoint)}
    \item
      Instructor's slides on
      \href{Patterns/sle_Template_Method_Pattern.ppt}{Template Method
      Design Pattern (Powerpoint)}
    \item
      {[}Siemens book{]} Frank Buschmann, Regine Meunier, Hans Rohnert,
      Peter Sommerlad, and Michael Stal. \emph{Pattern-Oriented Software
      Architecture: A System of Patterns}, Wiley, 1996.
    \item
      {[}``Gang of Four'' (GoF) book{]} Erich Gamma, Richard Helm, Ralph
      Johnson, and John Vlissides. \emph{Design Patterns: Elements of
      Reusable Object-Oriented Software}, Addison Wesley, 1995.
      Patterns*, Wiley, 1996.
    \item
      Mary Shaw.
      \href{http://www.google.com/url?sa=t\&source=web\&ct=res\&cd=9\&ved=0CDMQFjAI\&url=http\%3A\%2F\%2Fciteseerx.ist.psu.edu\%2Fviewdoc\%2Fdownload\%3Fdoi\%3D10.1.1.131.4205\%26rep\%3Drep1\%26type\%3Dpdf\&ei=pA7XS82YIYHMNN_HqPsF\&usg=AFQjCNGBwu48uiRxFJO1pgCIi94jSdu4FA\&sig2=Ut3P0nKWRUwqByT_CFsIZw}{Some
      Patterns for Software Architecture}, In John M. Vlissides, James
      O. Coplien, and Norman L. Kerth, editors, \emph{Pattern Languages
      of Program Design 2}, Addison Wesley, 1996, pages 255-270.
      {[}\href{localcopy/Shaw_Patterns_Arch.pdf}{local}{]}
    \end{itemize}
  \end{enumerate}
\item
   \textbf{(5, 14-21 Feb) Discuss Fowler's introductory DSL example}

  \begin{enumerate}
  \def\labelenumii{\alph{enumii}.}
  \item
    Martin Fowler.
    \href{http://www.informit.com/articles/article.aspx?p=1592379}{An
    Introductory Example}, Chapter 1, \emph{Domain-Specific Languages},
    Addison Wesley, 2011.
  \item
    Martin Fowler. Using Domain-Specific Languages, Chapter 2,
    \emph{Domain-Specific Languages}, Addison Wesley, 2011.
  \end{enumerate}
\end{enumerate}

\hypertarget{external-dsls}{%
\subsubsection{External DSLs}\label{external-dsls}}

\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
\setcounter{enumi}{7}
\item
   \textbf{(dates on items) Discuss State Machine External DSLs} based
  on Martin Fowler's Secret Panel Controller (State Machine) DSLs

  \begin{enumerate}
  \def\labelenumii{\alph{enumii}.}
  \item
    \textbf{(2-5, 14-26 Feb)} Martin Fowler. \emph{Domain Specific
    Languages}, Addison Wesley, 2011.

    \begin{itemize}
    \tightlist
    \item
      Fowler introduces the running example, the Secret Panel Controller
      (State Machine) case study, in
      \href{http://www.informit.com/articles/article.aspx?p=1592379}{DSL
      Chapter 1})
    \item
      Fowler DSL Chapter 1
      ``\href{http://www.informit.com/articles/article.aspx?p=1592379}{An
      Introductory Example}''
    \item
      Fowler DSL Chapter 2 ``Using Domain-Specific Languages''
    \item
      Fowler DSL Chapter 3 ``Implementing DSLs''
    \item
      Fowler DSL Chapter 5 ``Implementing an External DSL''
    \item
      Fowler DSL Chapter 8 ``Code Generation''
    \item
      Fowler DSL Chapter 11 ``Semantic Model''
    \item
      Fowler DSL Chapter 17 ``Delimiter-Directed Translation''
    \item
      Fowler DSL Chapter 18 ``Syntax-Directed Translation''
    \item
      Fowler DSL Chapter 21 ``Recursive Descent Parser''
    \item
      Fowler DSL Chapter 21 ``Parser Generator''
    \item
      Fowler DSL Chapter 22 ``Parser Combinator''
    \item
      Fowler DSL Chapter 51 ``State Machine''
    \item
      Fowler DSL Chapter 52 ``Transformer Generation''
    \item
      Fowler DSL Chapter 55 ``Model Aware Generation''
    \item
      Fowler DSL Chapter 56 ``Model Ignorant Generation''
    \item
      Fowler's \href{http://martinfowler.com/dslCatalog/}{List of DSL
      Patterns} from DSL book.
    \end{itemize}
  \item
    Other items from the instructor's notes

    \begin{itemize}
    \tightlist
    \item
      \href{MealyMachineSimulator.html}{Mealy Machine Description and
      Exercise} gives a formal description of this kind of state machine
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/notes/ExprLang/11ExprLangParsing.html\#recursive-descent-parsing}{Recursive
      Descent Parsing} gives a set of (Haskell) program templates for
      recursive descent parsers
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/notes/ExprLang/11ExprLangParsing.html\#parsing-combinators}{Parsing
      Combinators} describes a preliminary set of (Haskell) parsing
      combinators for recursive descent parsers
    \item
      Wikipedia entry on
      \href{https://en.wikipedia.org/wiki/Parser_combinator}{Parsing
      Combinator}
    \end{itemize}

    \textbf{\emph{Scala versions (2009)}}
  \item
    Scala notes

    \begin{itemize}
    \item
      I developed the Scala versions in 2009 by referring to an in-work
      version of Fowler's book on his website, so they may not follow
      his final book precisely. Fowler's code is in Java, Ruby, C\#,
      etc. I updated the Scala programs in 2018 to make sure they would
      compile and execute under the current Scala release.
    \item
      \protect\hyperlink{scala}{Scala references} below
    \end{itemize}
  \item
    \textbf{(21 Feb)} Graphviz and \texttt{dot} language reference and
    examples (looked at examples in class)

    \begin{itemize}
    \tightlist
    \item
      Note: On my iMacs, I used Homebrew to install the package
      \texttt{graphviz}.
    \item
      \href{http://www.graphviz.org}{Graphviz: Graph Visualization
      Software} and the little language/tool \texttt{dot}
    \item
      \href{Graphviz/ExprLangModDep.gv}{\texttt{ExprLangModDep.gv}} --
      \href{Graphviz/ExprLangModDep.sh}{\texttt{script}} --
      \href{Graphviz/ExprLangModDep.png}{\texttt{png} output}
    \item
      \href{Graphviz/DFA01.gv}{\texttt{DFA01.gv}} --
      \href{Graphviz/DFA01.sh}{script} --
      \href{Graphviz/DFA01.pdf}{\texttt{pdf} output}
    \item
      \href{Graphviz/NFA01.gv}{\texttt{NFA01.gv}} --
      \href{Graphviz/NFA01.sh}{script} --
      \href{Graphviz/NFA01.svg}{\texttt{svg} output}
    \item
      \href{Graphviz/NFA01a.gv}{\texttt{NFA01a.gv}} --
      \href{Graphviz/NFA01a.sh}{script} --
      \href{Graphviz/NFA01a.svg}{\texttt{svg} output}
    \item
      \href{Graphviz/Infix1plus1b.gv}{\texttt{Infix1plus1b.gv}} --
      \href{Graphviz/Infix1plus1b.sh}{script} --
      \href{Graphviz/Infix1plus1b.png}{\texttt{png} output}
    \end{itemize}
  \item
    \textbf{(14 Feb)} Scala State Machine Semantic Model (Ch. 1, 3, 11)

    \begin{itemize}
    \tightlist
    \item
      \href{StateMachineDSL/Scala/StateMachine.scala}{StateMachine.scala}
    \item
      \href{StateMachineDSL/Scala/StateMachineTest.scala}{StateMachineTest.scala}
    \item
      \href{StateMachineDSL/Scala/CommandChannel.scala}{CommandChannel.scala
      (mock)}
    \item
      \href{StateMachineDSL/Scala/StateMachineDirect.sh}{StateMachineDirect.sh
      test script}
    \end{itemize}
  \item
    \textbf{(21 Feb)} Scala XML-based External DSL (Ch. 1, 3, 5)

    \begin{itemize}
    \tightlist
    \item
      \href{StateMachineDSL/Scala/StateMachineXMLTest.scala}{StateMachineXMLTest
      .scala}
    \item
      \href{StateMachineDSL/Scala/IncrementalStateMachineBuilder.scala}{IncrementalStateMachineBuilder.scala}
    \item
      \href{StateMachineDSL/Scala/SecretPanel.xml}{input file
      SecretPanel.xml}
    \item
      \href{StateMachineDSL/Scala/StateMachineXML.sh}{StateMachineXML.sh
      test script}
    \end{itemize}
  \item
    \textbf{(16 Feb)} Scala Custom External DSL with a
    Delimiter-Directed parser (Ch. 1, 3, 5, 17)

    \begin{itemize}
    \tightlist
    \item
      \href{StateMachineDSL/Scala/DelimiterDSLTest.scala}{DelimiterDSLTest.scala}
    \item
      \href{StateMachineDSL/Scala/IncrementalStateMachineBuilder.scala}{IncrementalStateMachineBuilder.scala}
    \item
      \href{StateMachineDSL/Scala/CustomExternalStateMachineDSL.dsl}{input
      file CustomExternalStateMachineDSL.dsl}
    \item
      \href{StateMachineDSL/Scala/DelimiterDSL.sh}{DelimiterDSL.sh test
      script}
    \end{itemize}
  \item
    \textbf{(19 Feb)} Scala Custom External DSL with hand-coded Ad Hoc
    Recursive-Descent parser (Ch. 1, 3, 5, 21)

    \begin{itemize}
    \tightlist
    \item
      \href{StateMachineDSL/Scala/RecursiveDescentTest.scala}{RecursiveDescentTest.scala}
    \item
      \href{StateMachineDSL/Scala/IncrementalStateMachineBuilder.scala}{IncrementalStateMachineBuilder.scala}
    \item
      \href{StateMachineDSL/Scala/CustomExternalStateMachineDSL2.dsl}{input
      file CustomExternalStateMachineDSL2.dsl}
    \item
      \href{StateMachineDSL/Scala/RecursiveDescent.sh}{RecursiveDescent.sh
      test script}
    \end{itemize}
  \item
    \textbf{(21 Feb briefly)} Scala Custom External DSL (using Scala
    parser combinator library) with embedded state machine builder (Ch.
    1, 3, 5, 22)

    \begin{itemize}
    \tightlist
    \item
      \href{StateMachineDSL/Scala/CombinatorParserBuilderTest.scala}{CombinatorParserBuilderTest.scala}
    \item
      \href{StateMachineDSL/Scala/IncrementalStateMachineBuilder.scala}{IncrementalStateMachineBuilder.scala}
    \item
      \href{StateMachineDSL/Scala/CustomExternalStateMachineDSL2.dsl}{input
      file CustomExternalStateMachineDSL2.dsl}
    \item
      \href{StateMachineDSL/Scala/CombinatorParserBuilder.sh}{CombinatorParserBuilder.sh
      test script}
    \end{itemize}
  \item
    \textbf{(21 Feb briefly)} Scala Custom External DSL (using Scala
    parser combinator library) with full AST construction (Ch. 1, 3, 5,
    22)

    \begin{itemize}
    \tightlist
    \item
      \href{StateMachineDSL/Scala/CombinatorParserASTTest.scala}{CombinatorParserASTTest.scala}
    \item
      \href{StateMachineDSL/Scala/CustomExternalStateMachineDSL2.dsl}{input
      file CustomExternalStateMachineDSL2.dsl}
    \item
      \href{StateMachineDSL/Scala/CombinatorParserAST.sh}{CombinatorParserAST.sh
      test script}
    \end{itemize}
  \item
    \textbf{(21 Feb briefly)} Scala Static C Code Generator with
    Model-Aware target platform library (Ch. 1, 3, 5, 8, 52, 55)

    \begin{itemize}
    \tightlist
    \item
      \href{StateMachineDSL/Scala/StaticC_GeneratorTest.scala}{StaticC\_GeneratorTest.scala}
    \item
      \href{StateMachineDSL/Scala/StaticC_Generator.sh}{StaticC\_Generator.sh
      test script}
    \item
      \href{StateMachineDSL/Scala/output.c}{generated C output file
      output.c}
    \item
      Note: The needed framework code needed to run the generated C
      program is not yet available in this form. It needs to be
      reconstructed from Fowler's book.
    \end{itemize}
  \item
    \textbf{(21 Feb)} Scala Graphviz Dot Language Code Generator (added
    2018) (Ch. 1, 3, 5, 8, 52)

    \begin{itemize}
    \tightlist
    \item
      \href{StateMachineDSL/Scala/GraphVizCodeGen.scala}{GraphVizCodeGen.scala}
    \item
      \href{StateMachineDSL/Scala/GraphVizCodeGenTest.scala}{GraphVizCodeGenTest.scala}
    \item
      \href{StateMachineDSL/Scala/GraphVizCodeGen.sh}{GraphVizCodeGen.sh
      test script}
    \item
      \href{StateMachineDSL/Scala/graph.gv}{generated Graphviz Dot
      output file graph.gv} (see test script)
    \item
      \href{StateMachineDSL/Scala/graph.svg}{Scalable Vector Graphics
      output from dot graph.svg} (see test script)
    \item
      \href{StateMachineDSL/Scala/graph.pdf}{PDF output from dot
      graph.pdf} (see test script)
    \end{itemize}
  \end{enumerate}
\item
  \textbf{(16 Feb) Announce homework
  \href{../homework/658hw01.html}{Assignment \#1} and
  \href{../homework/658hw02.html}{Assignment \#2}}
\item
  \textbf{(23 Feb) Discuss \href{Metaprogramming.html}{Metaprogramming}}

  Note: We return to this topic near the end of the semester with an
  emphasis on Python 3 metaprogramming features.
\end{enumerate}

\hypertarget{internal-dsls}{%
\subsubsection{Internal DSLs}\label{internal-dsls}}

\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
\setcounter{enumi}{10}
\item
   \textbf{(dates on items) Discuss Fowler's Computer Configuration
  Internal DSLs} (Ch. 4, 35, 36, 38)

  \begin{enumerate}
  \def\labelenumii{\alph{enumii}.}
  \item
    Background: Martin Fowler. \emph{Domain Specific Languages},
    (Addison Wesley, 2011).

    \begin{itemize}
    \tightlist
    \item
      Martin Fowler's \href{http://martinfowler.com/dslCatalog/}{List of
      DSL Patterns} from \emph{Domain Specific Languages}, Addison
      Wesley, 2011
    \item
      Fowler DSL Chapter 1
      ``\href{http://www.informit.com/articles/article.aspx?p=1592379}{An
      Introductory Example}''
    \item
      Fowler DSL Chapter 2 ``Using Domain-Specific Languages''
    \item
      Fowler DSL Chapter 3 ``Implementing DSLs''
    \item
      Fowler DSL Chapter 4 ``Implementing an Internal DSL''
    \item
      Fowler DSL Chapter 11 ``Semantic Model''
    \item
      Fowler DSL Chapter 13 ``Context Variable''
    \item
      Fowler DSL Chapter 32 ``Expression Builder''
    \item
      Fowler DSL Chapter 33 ``Function Sequence''
    \item
      Fowler DSL Chapter 34 ``Nested Functions''
    \item
      Fowler DSL Chapter 36 ``Object Scoping''
    \item
      Fowler DSL Chapter 37 ``Closure''
    \item
      Fowler DSL Chapter 38 ``Nested Closure''
    \item
      Fowler DSL Chapter 39 ``Literal List''
    \item
      Fowler DSL Chapter 40 ``Literal Map''
    \end{itemize}

    \textbf{\emph{Scala versions (2009)}}
  \item
    \textbf{(23 Feb)} \href{CompConfigDSL/Scala/Computer.scala}{Scala
    semantic model (shared)}
  \item
    \textbf{(23, 26 Feb)}
    \href{CompConfigDSL/Scala/CompConfigChaining.scala}{Scala internal
    DSL using Method Chaining}
  \item
    \textbf{(26 Feb)}
    \href{CompConfigDSL/Scala/CompConfigClosure.scala}{Scala internal
    DSL using Nested Closures and Object Scoping}
  \item
    \href{CompConfigDSL/Scala/CompConfig.sh}{CompConfig.sh test script}
  \end{enumerate}
\item
   \textbf{(26 Feb) Discuss Fowler's Email Message Building Internal
  DSL} (Ch. 35)

  \begin{enumerate}
  \def\labelenumii{\alph{enumii}.}
  \item
    Background: Martin Fowler. \emph{Domain Specific Languages},
    (Addison Wesley, 2011). See listing of chapters under Computer
    Configuration internal DSL above.

    \textbf{\emph{Scala versions (2009)}}
  \item
    \href{EmailDSL/Scala/EmailProgressive.scala}{Scala internal DSL
    using Method Chaining and Progressive Interfaces}
  \item
    \href{EmailDSL/Scala/EmailProgressive.sh}{EmailProgressive.sh test
    script}
  \end{enumerate}
\item
   \textbf{(see dates on items) Explore Fowler's Lair Configuration
  DSLs}

  \begin{enumerate}
  \def\labelenumii{\alph{enumii}.}
  \item
    Background on Lair DSL

    \begin{itemize}
    \tightlist
    \item
      \textbf{(28 Feb; 2-7 Mar)} Case study: Martin Fowler's
      \href{http://media.pragprog.com/titles/twa/martin_fowler.pdf}{One
      Lair and Twenty Ruby DSLs}, Chapter 3,
      \href{http://pragprog.com/book/twa/thoughtworks-anthology}{\emph{The
      ThoughtWorks Anthology: Essays on Software Technology and
      Innovation}}, The Pragmatic Bookshelf, 2008
      \href{LairDSL/FowlerOneLairTwentyDSLs.pdf}{{[}local copy}{]}
    \item
      Source code:
      {[}\href{https://pragprog.com/titles/twa/source_code}{entire
      Thoughtworks book}{]} {[}\href{LairDSL/Ruby}{Fowler's Ruby
      DSLs}{]}
    \item
      Patterns (repeated from above): Martin Fowler's
      \href{http://martinfowler.com/dslCatalog/}{List of DSL Patterns}
      from \emph{Domain Specific Languages}, Addison Wesley, 2011
    \end{itemize}
  \item
    Background on internal DSLs: Martin Fowler. \emph{Domain Specific
    Languages}, (Addison Wesley, 2011). See chapters under Computer
    Configuration internal DSL above.
  \item
    Background on Lua

    \begin{itemize}
    \item
      See \protect\hyperlink{lua}{Lua references} below
    \item
      Several of the Lair DSL programs must execute with Lua 5.1 because
      they use a few Lua platform features changed in Lua 5.2 or 5.3. I
      installed the lua@5.1 package on my iMacs using the Homebrew
      package manager.
    \item
      At the terminal command line, \texttt{lua5.1\ testNN.lua} compiles
      and executes the test driver program for the DSL with files
      builder program \texttt{builderNN.lua} and DSL script
      \texttt{rulesNN.lua}.
    \end{itemize}
  \item
    \textbf{(28 Feb Python)} Shared modules

    Fowler's Ruby source

    \begin{itemize}
    \tightlist
    \item
      \href{LairDSL/Ruby/model.rb}{Semantic model (model.rb)}
    \item
      \href{LairDSL/Ruby/rules0.rb}{Test Driver for semantic model
      (rules0.rb)}
    \end{itemize}

    Lua (2013)

    \begin{itemize}
    \tightlist
    \item
      \href{LairDSL/Lua/class_support.lua}{Class support module (for
      implementing classes in Lua)}
    \item
      \href{LairDSL/Lua/model.lua}{Semantic model}
    \item
      \href{LairDSL/Lua/rules00.lua}{Test driver for semantic model
      (rules00.lua)}
    \end{itemize}

    Python 3 (2018)

    \begin{itemize}
    \tightlist
    \item
      \href{LairDSL/Python/model.py}{Semantic model}
    \item
      \href{LairDSL/Python/rules00.py}{Test driver for semantic model
      (rules00.py)}
    \end{itemize}
  \item
    \textbf{(2 Mar Python)} Internal DSL using Global Function Sequence
    pattern

    Fowler's Ruby

    \begin{itemize}
    \tightlist
    \item
      \href{LairDSL/Ruby/builder8.rb}{builder module (builder8.rb)}
    \item
      \href{LairDSL/Ruby/rules8.rb}{dsl script (rules8.rb)}
    \end{itemize}

    Lua (2013)

    \begin{itemize}
    \tightlist
    \item
      \href{LairDSL/Lua/builder08.lua}{builder module (builder08.lua)}
    \item
      \href{LairDSL/Lua/rules08.lua}{dsl script (rules08.lua)}
    \item
      \href{LairDSL/Lua/test08.lua}{test driver (test08.lua)}
    \end{itemize}

    Python 3 (2018)

    \begin{itemize}
    \tightlist
    \item
      \href{LairDSL/Python/builder08.py}{builder module (builder08.py)}
    \item
      \href{LairDSL/Python/rules08x.py}{direct execution test of DSL
      script (rules08x.py)}
    \item
      \href{LairDSL/Python/rules08.py}{dynamically loaded dsl script
      (rules08.py)}
    \item
      \href{LairDSL/Python/test08.py}{test driver for dynamically loaded
      dsl script (test08.py)}
    \end{itemize}
  \item
    \textbf{(7 Mar Python)} Internal DSL using Class Method Function
    Sequence and Method Chaining patterns

    Fowler's Ruby

    \begin{itemize}
    \tightlist
    \item
      \href{LairDSL/Ruby/builder11.rb}{builder module (builder11.rb)}
    \item
      \href{LairDSL/Ruby/rules11.rb}{dsl script (rules11.rb)}
    \end{itemize}

    Lua (2013)

    \begin{itemize}
    \tightlist
    \item
      \href{LairDSL/Lua/builder11.lua}{builder module (builder11.lua)}
    \item
      \href{LairDSL/Lua/rules11.lua}{dsl script (rules11.lua)}
    \item
      \href{LairDSL/Lua/test11.lua}{test driver (test11.lua)}
    \end{itemize}

    Python 3 (2018)

    \begin{itemize}
    \tightlist
    \item
      \href{LairDSL/Python/builder11.py}{builder module (builder11.py)}
    \item
      \href{LairDSL/Python/rules11.py}{dynamically loaded dsl script
      (rules11.py)}
    \item
      \href{LairDSL/Python/test11.py}{test driver for dynamically loaded
      dsl script (test11.py)}
    \end{itemize}
  \item
    \textbf{(7 Mar Python)} Internal DSL using Expression Builder and
    Method Chaining patterns

    Fowler's Ruby

    \begin{itemize}
    \tightlist
    \item
      \href{LairDSL/Ruby/builder14.rb}{builder module (builder14.rb)}
    \item
      \href{LairDSL/Ruby/rules14.rb}{dsl script (rules14.rb)}
    \end{itemize}

    Lua (2013)

    \begin{itemize}
    \tightlist
    \item
      \href{LairDSL/Lua/builder14.lua}{builder module (builder14.lua)}
    \item
      \href{LairDSL/Lua/rules14.lua}{dsl script (rules14.lua)}
    \item
      \href{LairDSL/Lua/test14.lua}{test driver (test14.lua)}
    \end{itemize}

    Python 3 (2018)

    \begin{itemize}
    \tightlist
    \item
      \href{LairDSL/Python/builder14.py}{builder module (builder14.py)}
    \item
      \href{LairDSL/Python/rules14.py}{dynamically loaded dsl script
      (rules14.py)}
    \item
      \href{LairDSL/Python/test14.py}{test driver for dynamically loaded
      dsl script (test14.py)}
    \end{itemize}
  \item
    Internal DSL using Nested Closures pattern

    Fowler's Ruby

    \begin{itemize}
    \tightlist
    \item
      \href{LairDSL/Ruby/builder3.rb}{builder module (builder3.rb)}
    \item
      \href{LairDSL/Ruby/rules3.rb}{dsl script (rules3.rb)}
    \end{itemize}

    Lua (2013)

    \begin{itemize}
    \tightlist
    \item
      \href{LairDSL/Lua/builder03.lua}{builder module (builder03.lua)}
    \item
      \href{LairDSL/Lua/rules03.lua}{dsl script (rules03.lua)}
    \item
      \href{LairDSL/Lua/test03.lua}{test driver (test03.lua)}
    \end{itemize}

    Python 3 -- none yet. (Python's weak syntactic support for lambdas
    does not allow the relatively direct approach usable in Ruby, Scala,
    and Lua.)
  \item
    Internal DSL using Expression Builder, Object Scoping, and Method
    Chaining patterns

    Fowler's Ruby

    \begin{itemize}
    \tightlist
    \item
      \href{LairDSL/Ruby/builder17.rb}{builder module (builder17.4b)}
    \item
      \href{LairDSL/Ruby/rules17.rb}{dsl script (rules17.rb)}
    \end{itemize}

    Lua (2013)

    \begin{itemize}
    \tightlist
    \item
      \href{LairDSL/Lua/builder17.lua}{builder module (builder17.lua)}
    \item
      \href{LairDSL/Lua/rules17.lua}{dsl script (rules17.lua)}
    \item
      \href{LairDSL/Lua/test17.lua}{test driver (test17.lua)}
    \end{itemize}

    Python 3 -- none yet
  \item
    Internal DSL using Literal Collection pattern

    Fowler's Ruby

    \begin{itemize}
    \tightlist
    \item
      \href{LairDSL/Ruby/builder22.rb}{builder module (builder22.rb)}
    \item
      \href{LairDSL/Ruby/rules22.rb}{dsl script (rules22.rb)}
    \end{itemize}

    Lua (2013)

    \begin{itemize}
    \tightlist
    \item
      \href{LairDSL/Lua/builder22.lua}{builder module (builder22.lua)}
    \item
      \href{LairDSL/Lua/rules22.lua}{dsl script (rules22.lua)}
    \item
      \href{LairDSL/Lua/test22.lua}{test driver (test22.lua)}
    \end{itemize}

    Python 3 -- none yet
  \item
    \textbf{(5 Mar Python)} External DSL using Parser/Builder (no
    corresponding example in Fowler book chapter)

    Lua (2013)

    \begin{itemize}
    \tightlist
    \item
      Note: This program requires installation of a Lua LPEG library via
      luarocks. It must be compatible with whatever version of Lua is
      being used.
    \item
      \href{LairDSL/Lua/builderLPEG1.lua}{builder module
      (builderLPEG1.lua)}
    \item
      \href{LairDSL/Lua/rulesLPEG1.dsl}{dsl script (rulesLPEG1.dsl)}
    \item
      \href{LairDSL/Lua/testLPEG1.lua}{test driver (testLPEG1.lua)}
    \end{itemize}

    Python 3 (2018)

    \begin{itemize}
    \tightlist
    \item
      Note: This program requires installation of the Python 3 package
      \href{https://github.com/johnthagen/parsita}{Parsita}, a parser
      combinator library similar to Scala's
    \item
      \href{LairDSL/Python/builderParsita1.py}{builder module
      (builderParsita1.py)}
    \item
      \href{LairDSL/Python/rulesParsita1.dsl}{dsl script
      (rulesParsita1.dsl)}
    \item
      \href{LairDSL/Python/testParsita1.py}{test driver
      (testParsita1.py)}
    \end{itemize}
  \end{enumerate}
\item
  \textbf{(5 Mar) Announce homework
  \href{../homework/658hw03.html}{Assignment \#3}}
\item
   \textbf{(not discussed, but an alternative context for Assignment
  \#3)} Use Sandwich DSL Case Study

  \begin{enumerate}
  \def\labelenumii{\alph{enumii}.}
  \item
    Notes

    \begin{itemize}
    \tightlist
    \item
      Haskell and Scala versions are similar expansions of the original
      Lua version
    \item
      \href{\%3C\#haskell}{Haskell references} below
    \item
      \protect\hyperlink{scala}{Scala references} below
    \item
      \protect\hyperlink{lua}{Lua references} below
    \end{itemize}
  \item
    Haskell version (2014, 2017) using algebraic data types

    \begin{itemize}
    \tightlist
    \item
      \href{SandwichDSL/Haskell/SandwichDSL.html}{Sandwich DSL case
      study (Haskell)}
    \item
      \href{SandwichDSL/Haskell/SandwichDSL_base.hs}{Haskell source}
    \end{itemize}
  \item
    Scala version (2016) using case classes

    \begin{itemize}
    \tightlist
    \item
      \href{SandwichDSL/Scala/SandwichDSL_Scala.html}{Sandwich DSL case
      study (Scala)}
    \item
      \href{SandwichDSL/Scala/SandwichDSL_base.scala}{Scala source}
    \end{itemize}
  \item
    Lua version (2013) implements slightly different problem

    \begin{itemize}
    \tightlist
    \item
      \href{SandwichDSL/Lua/SandwichDSL_Lua.html}{Problem and solution
      description}
    \item
      \href{SandwichDSL/Lua/sandwich_model.lua}{Semantic Model module}
    \item
      \href{SandwichDSL/Lua/sandwich_builder.lua}{Builder module
      implementing DSL applying Function Sequence pattern}
    \item
      \href{SandwichDSL/Lua/test_sandwichDSL.lua}{Test driver}
    \end{itemize}
  \end{enumerate}
\item
  \textbf{(9 Mar)} No formal class. Work on new Assignment \#3. Study
  the following handouts for discussion after Spring Break

  \begin{enumerate}
  \def\labelenumii{\alph{enumii}.}
  \item
    \textbf{(assigned first week of semester)} James Coplien, Daniel
    Hoffman, and David Weiss.
    \href{localcopy/CoplienCommonalityVariability.pdf}{Commonality and
    Variability in Software Engineering}, \emph{IEEE Software}, Vol. 15,
    No.~6, November 1998.
  \item
    Paper ``A Little Language for Surveys: Constructing an Internal DSL
    in Ruby'' BELOW
  \item
    Conrad Barski. Building a Text Game Engine, Chapter 5, In \emph{Land
    of Lisp: Learn to Program in Lisp, One Game at a Time}, pp.~69-84,
    No Starch Press, 2011.

    The Common Lisp example in this chapter is similar to the classic
    Adventure game; the underlying data structure is a labeled digraph.

    There is m\textless{}ore information about both labeled digraphs and
    the Wizard's adventure game BELOW.
  \end{enumerate}
\item
  \textbf{(12-16 Mar) Enjoy Spring Break!}
\end{enumerate}

\hypertarget{analysis-and-design-of-dsls}{%
\subsubsection{Analysis and Design of
DSLs}\label{analysis-and-design-of-dsls}}

\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
\setcounter{enumi}{17}
\item
  \textbf{(19-21, 2-6 Apr) Resume direct discussion of
  \href{DomainSpecificLanguages.html}{Domain Specific Languages} notes}
\item
  \textbf{(21-26 Mar) Discuss commonality and variability analysis}
  paper:

  James Coplien, Daniel Hoffman, and David Weiss.
  \href{localcopy/CoplienCommonalityVariability.pdf}{Commonality and
  Variability in Software Engineering}, \emph{IEEE Software}, Vol. 15,
  No.~6, November 1998.
\item
   \textbf{(dates below) Examine Cunningham's Survey DSL case study}, in
  particular the analysis and DSL design

  \begin{enumerate}
  \def\labelenumii{\alph{enumii}.}
  \item
    \textbf{(28 Mar; 2 Apr) Discuss paper:} H. Conrad Cunningham. A
    Little Language for Surveys: Constructing an Internal DSL in Ruby,
    In \emph{Proceedings of the ACM SouthEast Conference}, 6 pages,
    March 2008.

    \begin{itemize}
    \tightlist
    \item
      \href{SurveyDSL/Ruby/surveyLangFinal.pdf}{manuscript}
    \item
      \href{SurveyDSL/Ruby/surveyLanguage4.ppt}{presentation}
    \item
      \href{SurveyDSL/Ruby/LittleLanguageSurveys_NewIntro.pdf}{improved
      paper introduction section}
    \end{itemize}
  \item
    \textbf{(2 Apr briefly)} Ruby source code (2006, 2008)

    \begin{itemize}
    \tightlist
    \item
      \href{SurveyDSL/Ruby/README.txt}{README file}
    \item
      \href{SurveyDSL/Ruby/SurveyLanguage.rb}{Ruby source code
      SurveyLanguage.rb}
    \item
      \href{SurveyDSL/Ruby/survey.rb}{test internal DSL input file}
    \item
      \href{SurveyDSL/Ruby/surveyErrors.rb}{test internal DSL input file
      with errors}
    \end{itemize}
  \end{enumerate}
\item
  \textbf{(dates below) Study object-oriented software development}

  \begin{enumerate}
  \def\labelenumii{\alph{enumii}.}
  \item
    (for reference) Study domain analysis

    \begin{itemize}
    \item
      (not updated) Instructor's slides on
      \href{slides/DomainModeling.ppt}{Domain Modeling (Powerpoint)},
      for course registration system example
    \item
      Alistair Cockburn. Introduction, Chapter 1 in \emph{Writing
      Effective Use Cases}, Addison-Wesley, 2001.
    \item
      Doug Rosenberg with Kendall Scott. Domain Modeling, Chapter 2 in
      \emph{Use Case Driven Object Modeling with UML}, Addison Wesley
      1999.
    \item
      Doug Rosenberg with Kendall Scott. Use Case Modeling, Chapter 3 in
      \emph{Use Case Driven Object Modeling with UML}, Addison Wesley
      1999.
    \end{itemize}
  \item
    \textbf{(6-13 Apr)} Instructor's notes on
    \href{OOSoftDev.html}{Object-Oriented Software Development}
  \item
    \textbf{(6-11 Apr)} Instructor's notes on
    \href{ProgrammingParadigms.html}{Programming Paradigms} -- a draft
    ``chapter'' from the evolving ``textbook'' \emph{Exploring Languages
    using Interpreters and Functional Programming}

    \begin{itemize}
    \item
      \href{ProgrammingParadigms.html\#object-oriented}{Object-oriented}
    \item
      \href{ProgrammingParadigms.html\#prototype-based}{Prototype-based}
    \end{itemize}
  \item
    \textbf{(9 Apr)} Discuss type systems terminology from
    \href{PythonMetaprogramming/Py3RefMeta01.html}{Python 3
    Metaprogramming} notes

    \begin{itemize}
    \item
      \href{PythonMetaprogramming/Py3RefMeta02.html\#type-system-concepts}{Type
      system concepts}
    \item
      \href{PythonMetaprogramming/Py3RefMeta02.html\#python-type-system}{Python
      type system}
    \end{itemize}
  \item
    (for reference) Instructor's notes on the
    \href{https://john.cs.olemiss.edu/~hcc/csci450/notes/HaskellNotes/04Lists450.html\#kinds-of-polymorphism}{Kinds
    of Polymorphism}
  \end{enumerate}
\item
  \textbf{(13 Apr) Distribute \href{../homework/658hw04.html}{Assignment
  \#4 (Final Project)}}
\item
   \textbf{(dates below) Continue study of object-oriented software
  development}

  \begin{enumerate}
  \def\labelenumii{\alph{enumii}.}
  \item
    \textbf{(16-18 Apr)} Instructor's slides on
    \href{UsingCRC.html}{Using CRC Cards
    (Class-Responsibility-Collaboration)} (HTML)

    \begin{itemize}
    \item
      (handout, for reference) Kent Beck and Ward Cunningham.
      \href{http://c2.com/doc/oopsla89/paper.html}{A Laboratory for
      Teaching Object-Oriented Thinking}, In \emph{Proceedings of the
      OOPSLA'89 Conference}, ACM, 1989.
    \item
      (for reference) Paul Gestwicki.
      \href{https://www.youtube.com/watch?v=otKUer13HnA}{CRC Card
      Analysis (YouTube)}, Ball State University, February 2016.
    \end{itemize}
  \item
    (for reference) Ralph E. Johnson and Brian Foote.
    \href{http://www.laputan.org/drc/drc.html}{Designing Reusable
    Classes}, \emph{Journal of Object-Oriented Programming}, Vol. 1,
    No.~2, pages 22-35, June/July 1988.
  \item
    (for reference)
    \href{http://joelabrahamsson.com/a-simple-example-of-the-openclosed-principle/}{A
    simple example of the open-closed principle}
  \item
    (for reference)
    \href{https://www.vikingcodeschool.com/software-engineering-basics/solid-design-principles}{SOLID
    Design Principles}, a look at the core SOLID principles through the
    lens of modularity.
  \item
    (for reference) ``Uncle'' Bob Martin video on
    \href{https://www.youtube.com/watch?v=TMuno5RZNeE}{``SOLID
    Principles of Object-Oriented and Agile Design''}
  \end{enumerate}
\item
   (for reference, slides need additional updating) Examine
  object-oriented programming

  \begin{enumerate}
  \def\labelenumii{\alph{enumii}.}
  \item
    Understanding Inheritance, based on Timothy Budd's
    \emph{Understanding Object-Oriented Programming with Java}, Chapter
    8: {[}\href{slides/sle_08_Inheritance.ppt}{Powerpoint}{]}
  \item
    Software Reuse, based on Timothy Budd's \emph{Understanding
    Object-Oriented Programming with Java}, Chapter 10:
    {[}\href{slides/sle_10_Software_Reuse.ppt}{Powerpoint}{]}

    \begin{itemize}
    \tightlist
    \item
      \href{Frog/Scala/FrogTest.scala}{Scala translation of Frog dynamic
      composition example}
    \end{itemize}
  \item
    Replacement and Refinement, loosely based on Timothy Budd's \emph{An
    Introduction to Object-Oriented Programming}, Third Edition, Section
    16.2: {[}\href{slides/sle_Replace_Refine.ppt}{Powerpoint}{]}
  \item
    Implications of Inheritance, based on Timothy Budd's
    \emph{Understanding Object-Oriented Programming with Java}, Chapter
    11:
    {[}\href{slides/sle_11_Implication_Inheritance.ppt}{Powerpoint}{]}
  \item
    Multiple Inheritance, based on Timothy Budd's \emph{An Introduction
    to Object-Oriented Programming}, Third Edition, Chapter 13:
    {[}\href{slides/sle_Multiple_Inheritance.ppt}{Powerpoint}{]}

    \begin{itemize}
    \tightlist
    \item
      \href{PhilFrog/Scala/PhilFrog.scala}{Scala Modified Philosophical
      Frog example from Odersky et a}
    \item
      \href{Stackable/Scala/StackableTest.scala}{Scala Modified
      Stackable traits example (IntQueue) from Odersky et al}
    \end{itemize}
  \item
    Polymorphism, based on Timothy Budd's \emph{Understanding
    Object-Oriented Programming with Java}, Chapter 12:
    {[}\href{slides/sle_12_Polymorphism.ppt}{Powerpoint}{]}
  \item
    Second Look at Classes, loosely based on Timothy Budd's \emph{An
    Introduction to Object-Oriented Programming}, Chapter 25 on
    Reflection and Introspection:
    {[}\href{slides/sle_Second_Look_at_Classes.ppt}{Powerpoint}{]}
  \item
    Luca Cardelli and Peter Wegner.
    \href{localcopy/Cardelli_On_Understanding_Types.pdf}{On
    Understanding Types, Data Abstraction, and Polymorphism}, \emph{ACM
    Computing Surveys}, Vol. 17, No.~4, pp.~471-523, 1985.
  \end{enumerate}
\item
  \textbf{(20-25 Apr) Do object-oriented analysis and design in class
  for a ``choose your own adventure'' game}

  \begin{enumerate}
  \def\labelenumii{\alph{enumii}.}
  \item
    Reference: Conrad Barski. Building a Text Game Engine, Chapter 5, In
    \emph{Land of Lisp: Learn to Program in Lisp, One Game at a Time},
    pp.~69-84, No Starch Press, 2011.

    The Common Lisp example in this chapter is similar to the classic
    Adventure game; the underlying data structure is a labeled digraph.

    There is more information about both labeled digraphs and the
    Wizard's adventure game \protect\hyperlink{LabeledDigraph}{BELOW},
  \item
    \href{AdventureSCV.html}{Adventure Game Analysis}
  \end{enumerate}
\end{enumerate}

\hypertarget{python-3-metaprogramming}{%
\subsubsection{Python 3
Metaprogramming}\label{python-3-metaprogramming}}

\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
\setcounter{enumi}{25}
\item
  \textbf{(25-30 Apr, 2-4 May) Explore
  \href{PythonMetaprogramming/Py3RefMeta.html}{Python 3 Reflexive
  Metaprogramming}}

  \begin{enumerate}
  \def\labelenumii{\alph{enumii}.}
  \item
    Introduction
    {[}\href{PythonMetaprogramming/Py3RefMeta01.html}{HTML}{]}
    {[}\href{PythonMetaprogramming/Py3RefMeta01.pdf}{PDF}{]}
  \item
    Basic Features Supporting Metaprogramming
    {[}\href{PythonMetaprogramming/Py3RefMeta02.html}{HTML}{]}
    {[}\href{PythonMetaprogramming/Py3RefMeta02.pdf}{PDF}{]}
  \item
    Decorators and Metaclasses (for Debugging Case Study)
    {[}\href{PythonMetaprogramming/Py3RefMeta03.html}{HTML}{]}
    {[}\href{PythonMetaprogramming/Py3RefMeta03.pdf}{PDF}{]}{]}
  \end{enumerate}
\end{enumerate}

\hypertarget{not-discussed-spring-2018-for-reference}{%
\subsection{Not Discussed Spring 2018 (For
Reference)}\label{not-discussed-spring-2018-for-reference}}

\hypertarget{ruby-dsls}{%
\subsubsection{Ruby DSLs}\label{ruby-dsls}}

\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
\setcounter{enumi}{26}
\item
   (for reference) Background on writing Ruby DSLs

  \begin{enumerate}
  \def\labelenumii{\alph{enumii}.}
  \item
    Jim Freeze.
    \href{http://www.artima.com/rubycs/articles/ruby_as_dsl.html}{Creating
    DSLs with Ruby}, Artima Developer, March 2006.
  \item
    Jamis Buck.
    \href{http://weblog.jamisbuck.org/2006/4/20/writing-domain-specific-languages.html}{Writing
    Domain Specific Languages}, \emph{The Bucklog} (blog), 20 April
    2006.
  \item
    \href{https://ruby.github.io/rake/}{Rake (Ruby Make)}, a software
    management and build tool written as a Ruby internal DSL
  \end{enumerate}
\item
   (for reference) Discuss Fowler's DSL Reader framework

  \begin{enumerate}
  \def\labelenumii{\alph{enumii}.}
  \item
    Background:

    \begin{itemize}
    \tightlist
    \item
      Martin Fowler.
      \href{http://www.martinfowler.com/articles/languageWorkbench.html}{Language
      Workbenches: The Killer-App for Domain Specific Languages?} June
      2005.
    \item
      Martin Fowler.
      \href{http://www.martinfowler.com/articles/codeGenDsl.html}{Generating
      Code for DSLs}, June 2005.
    \end{itemize}

    \textbf{\emph{Ruby DSLs (2006)}}
  \item
    Ruby shared modules

    \begin{itemize}
    \tightlist
    \item
      \href{ReaderDSL/Ruby/ReaderFramework.rb}{DSL Reader Framework
      module (ReaderFramework.rb)}
    \item
      \href{ReaderDSL/Ruby/ReaderUtilities.rb}{DSL Reader Utilities
      mix-in module (ReaderUtilities.rb)}
    \item
      \href{ReaderDSL/Ruby/fowlerdata.txt}{Data input file
      (fowlerdata.txt)}
    \item
      \href{ReaderDSL/Ruby/dslinput.txt}{Text DSL description
      (dslinput.txt)}
    \item
      \href{ReaderDSL/Ruby/dslinput.xml}{XML DSL description
      (dslinput.xml)}
    \end{itemize}
  \item
    Ruby direct configuration and testing of Reader

    \begin{itemize}
    \tightlist
    \item
      \href{ReaderDSL/Ruby/BuilderDirect.rb}{BuilderDirect.rb}
    \end{itemize}
  \item
    Ruby single-pass external text DSL

    \begin{itemize}
    \tightlist
    \item
      \href{ReaderDSL/Ruby/TextSinglePass.rb}{TextSinglePass.rb}
    \end{itemize}
  \item
    Ruby two-pass external XML DSL

    \begin{itemize}
    \tightlist
    \item
      \href{ReaderDSL/Ruby/TwoPass.rb}{TwoPass.rb}
    \item
      \href{ReaderDSL/Ruby/GeneratedBuilderExternal.rb}{class
      BuilderExternal source code generated by TwoPass.rb}
    \end{itemize}
  \item
    Ruby internal DSL

    \begin{itemize}
    \tightlist
    \item
      \href{ReaderDSL/Ruby/RubyDSL.rb}{RubyDSL.rb}
    \end{itemize}
  \end{enumerate}
\end{enumerate}

\hypertarget{language-processing}{%
\subsubsection{Language Processing}\label{language-processing}}

\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
\setcounter{enumi}{28}
\item
  (for reference) Study Parsing Expression Grammars (PEGs)

  \begin{enumerate}
  \def\labelenumii{\alph{enumii}.}
  \item
    Wikipedia entry on
    \href{http://en.wikipedia.org/wiki/Parsing_expression_grammar}{Parsing
    Expression Grammar}
  \item
    Bryan Ford. \href{localcopy/Ford_Packrat_Parsing02.pdf}{Packrat
    Parsing: Simple, Powerful, Lazy, Linear Time}, Functional Pearl. In
    \emph{Proceedings of the seventh ACM SIGPLAN International
    Conference on Functional Programming (ICFP '02)}, ACM, pp, 36-47,
    2002.
  \item
    Bryan Ford.
    \href{localcopy/Ford_Parsing_Expression_Grammars.pdf}{Parsing
    Expression Grammars: A Recognition-Based Syntactic Foundation},
    \emph{ACM SIGPLAN Notices}, Vol. 39, No.~1, pp.~111-122, 2004.
    {[}\href{http://www.brynosaurus.com/pub/lang/peg-slides.pdf}{slides}{]}
  \end{enumerate}
\item
  (for reference) Arithmetic expression tree program skeletons

  \begin{enumerate}
  \def\labelenumii{\alph{enumii}.}
  \item
    Background: These are expanded from the example in
    \href{ScalaForJava/ScalaForJava.html}{Notes on Scala for Java
    Programmers}.

    \textbf{\emph{Scala versions (2008-16)}}
  \item
    \href{Expression/Scala/ExprCase.scala}{Scala recursive function
    version using case classes}
  \item
    \href{Expression/Scala/ExprObj.scala}{Scala traditional
    object-oriented version}

    \textbf{\emph{Haskell version (2017)}}
  \item
    \href{Expression/Haskell/ExprTreeCalculator.html}{Haskell Expression
    Tree Calculator case study}
    {[}\href{Expression/Haskell/ExprTreeCalculator.hs}{source}{]}

    \textbf{\emph{Lua versions (2013-16)}}
  \item
    Lua recursive function versions (2013, 2014)

    \begin{itemize}
    \tightlist
    \item
      \href{Expression/Lua/exprRecFuncRecord.lua}{Lua Recursive
      Functions with Record Representation}
    \item
      \href{Expression/Lua/exprRecFuncList2.lua}{Lua Recursive Functions
      with List Representation}
    \item
      \href{Expression/Lua/exprEvalTable2.lua}{Lua Evaluation Function
      Table with List Representation}
    \end{itemize}
  \item
    Lua object-oriented versions (2013, 2016)

    \begin{itemize}
    \tightlist
    \item
      \href{Expression/Lua/exprObjBased.lua}{Lua Prototype Object-Based}
    \item
      \href{Expression/Lua/exprObjInherit.lua}{Lua Object-Oriented with
      Inheritance}
    \end{itemize}
  \item
    Lua LPEG parsers (2013)

    \begin{itemize}
    \tightlist
    \item
      Require installation of compatible LPEG library
    \item
      \href{ExprParser/Lua/exprParser.lua}{Parser with captures}
    \item
      \href{ExprParser/Lua/exprParserSemantic.lua}{Parser with semantic
      actions} (changed \texttt{unpack(t)} to \texttt{table.unpack(t)}
      for Lua 5.2 and 5.3)
    \end{itemize}
  \end{enumerate}
\end{enumerate}

\hypertarget{exploring-languages-using-interpreters}{%
\subsubsection{Exploring Languages using
Interpreters}\label{exploring-languages-using-interpreters}}

\hypertarget{haskell}{%
\paragraph{Haskell}\label{haskell}}

\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
\setcounter{enumi}{30}
\item
   (for reference, from 2017 CSci 450) Explore the
  \href{https://john.cs.olemiss.edu/~hcc/csci450/notes/ExprLang/10ExprLangSynSem.html}{Expression
  Language Syntax and Semantics (Chapter 10)}

  \begin{enumerate}
  \def\labelenumii{\alph{enumii}.}
  \item
    Supplemental slides:

    \begin{itemize}
    \tightlist
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/notes/ExprLang/ExprLangSynSemSlides.html}{Expression
      Language Syntax and Semantics}
    \end{itemize}
  \item
    Code in work:

    \begin{itemize}
    \tightlist
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/notes/ExprLang/ExprLangModDep.png}{Module
      dependency graph}
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/notes/ExprLang/Values.hs}{Values
      module}
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/notes/ExprLang/AbSynExpr.hs}{Abstract
      Syntax module}
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/notes/ExprLang/Environments.hs}{Environments
      module}
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/notes/ExprLang/EvalExpr.hs}{Evaluator
      module}
    \item
      Expression Language parsing and REPL modules linked to Chapter 11
      below
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/notes/ExprLang/ProcessAST.hs}{Process
      AST} -- simplification and derivative code skeleton
    \end{itemize}
  \end{enumerate}
\item
  (for reference, from 2017 CSci 450) Explore the
  \href{https://john.cs.olemiss.edu/~hcc/csci450/notes/ExprLang/11ExprLangParsing.html}{Expression
  Language Parsing (Chapter 11)}

  \begin{enumerate}
  \def\labelenumii{\alph{enumii}.}
  \item
    Supplemental slides:

    \begin{itemize}
    \tightlist
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/notes/ExprLang/ExprLangParsingSlides.html}{Expression
      Language Parsing}
    \end{itemize}
  \item
    Code in work:

    \begin{itemize}
    \tightlist
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/notes/ExprLang/ExprLangModDep.png}{Module
      dependency graph}
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/notes/ExprLang/Values.hs}{Values
      module}
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/notes/ExprLang/AbSynExpr.hs}{Abstract
      Syntax module}
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/notes/ExprLang/Environments.hs}{Environments
      module}
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/notes/ExprLang/EvalExpr.hs}{Evaluator
      module}
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/notes/ExprLang/LexExpr.hs}{Lexical
      analyzer module}
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/notes/ExprLang/ParseInfixExpr.hs}{Recursive
      descent parser for infix language} (simple expressions)
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/notes/ExprLang/ParsePrefixExpr.hs}{Recursive
      descent parser for prefix language}
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/notes/ExprLang/PrefixExprREPL.hs}{Prefix
      REPL module}
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/notes/ExprLang/InfixExprREPL.hs}{Infix
      REPL module}
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/notes/ExprLang/ProcessAST.hs}{Process
      AST}
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/notes/ExprLang/ParserComb.hs}{Parser
      Combinators module}
    \end{itemize}
  \end{enumerate}
\item
  (for reference, from 2017 CSci 450) Explore the
  \href{https://john.cs.olemiss.edu/~hcc/csci450/notes/ExprLang/12ExprLangCompiling.html}{Expression
  Language Compilation (Chapter 12)}

  \begin{enumerate}
  \def\labelenumii{\alph{enumii}.}
  \item
    Code in work:

    \begin{itemize}
    \tightlist
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/notes/ExprLang/SInstr01.hs}{Stack
      Virtual Machine?}
    \end{itemize}
  \end{enumerate}
\item
   (for reference, from 2017 CSci 450) Explore the Imperative Core
  Language: No notes or slide yet, but the code follows

  \begin{enumerate}
  \def\labelenumii{\alph{enumii}.}
  \item
    Modules

    \begin{itemize}
    \tightlist
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/notes/ImpCore/Values.hs}{Values
      module}
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/notes/ImpCore/AbSynImpCore.hs}{Abstract
      Syntax module}
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/notes/ImpCore/Environments.hs}{Environments
      module}
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/notes/ImpCore/LexImpCore.hs}{Lexical
      analyzer module}
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/notes/ImpCore/ParseImpCore.hs}{Recursive
      descent parser module}
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/notes/ImpCore/EvalImpCore.hs}{Evaluator
      module}
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/notes/ImpCore/ImpCore.hs}{REPL
      module}
    \end{itemize}
  \end{enumerate}
\end{enumerate}

\hypertarget{lua}{%
\paragraph{Lua}\label{lua}}

\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
\setcounter{enumi}{34}
\item
   (for reference, from 2016 CSci 450) Examine modularized Expression
  Language 1 interpreter

  \begin{enumerate}
  \def\labelenumii{\alph{enumii}.}
  \item
    Modules

    \begin{itemize}
    \tightlist
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/2016fall/notes/ExprLang1/Lua/Module_Usage_Diagram_Interpreter_EL1.png}{Module
      Usage Diagram}
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/2016fall/notes/ExprLang1/Lua/utilities.lua}{Utilities
      module}
    \item
      Parser module
      \href{https://john.cs.olemiss.edu/~hcc/csci450/2016fall/notes/ExprLang1/Lua/parser_infix_01.lua}{{[}Infix
      parser{]}}
      \href{https://john.cs.olemiss.edu/~hcc/csci450/2016fall/notes/ExprLang1/Lua/parser_prefix_01.lua}{{[}Prefix
      parser{]}}
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/2016fall/notes/ExprLang1/Lua/abs_syn_01.lua}{Abstract
      Syntax module}
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/2016fall/notes/ImpCore/Lua/environment.lua}{Environment
      module}
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/2016fall/notes/ExprLang1/Lua/values_01.lua}{Values
      module}
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/2016fall/notes/ExprLang1/Lua/evaluator_01.lua}{Evaluator
      module}
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/2016fall/notes/ExprLang1/Lua/repl.lua}{REPL
      module}
    \end{itemize}
  \item
    Scripts to execute and test:

    \begin{itemize}
    \tightlist
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/2016fall/notes/ExprLang1/Lua/test_01.lua}{Evaluator
      Test script}
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/2016fall/notes/ExprLang1/Lua/driver_parser_infix_01.lua}{Infix
      Parser Test script}
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/2016fall/notes/ExprLang1/Lua/driver_parser_prefix_01.lua}{Prefix
      Parser Test script}
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/2016fall/notes/ExprLang1/Lua/runinfix.lua}{Run
      infix interpreter script}
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/2016fall/notes/ExprLang1/Lua/runprefix.lua}{Run
      prefix interpreter script}
    \end{itemize}
  \end{enumerate}
\item
   (for reference, from 2016 CSci 450)
  \href{https://john.cs.olemiss.edu/~hcc/csci450/2016fall/notes/ImpCore/ImpCore.html}{Imperative
  Core Language}

  \begin{enumerate}
  \def\labelenumii{\alph{enumii}.}
  \item
    Modules

    \begin{itemize}
    \tightlist
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/2016fall/notes/ImpCore/Lua/Module_Usage_Diagram_Interpreter_EL1.png}{Module
      Usage Diagram}
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/2016fall/notes/ImpCore/Lua/utilities.lua}{Utilities
      module}
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/2016fall/notes/ImpCore/Lua/parser_prefix_core2.lua}{Parser
      module}
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/2016fall/notes/ImpCore/Lua/abs_syn_core2.lua}{Abstract
      Syntax module}
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/2016fall/notes/ImpCore/Lua/environment.lua}{Environment
      module}
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/2016fall/notes/ImpCore/Lua/values_01.lua}{Values
      module}
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/2016fall/notes/ImpCore/Lua/evaluator_core2.lua}{Evaluator
      module}
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/2016fall/notes/ImpCore/Lua/repl_core2.lua}{REPL
      module}
    \end{itemize}
  \item
    Run and test scripts

    \begin{itemize}
    \tightlist
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/2016fall/notes/ImpCore/Lua/test_core.lua}{Evaluator
      Test script}
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/2016fall/notes/ImpCore/Lua/driver_parser_core.lua}{Prefix
      Parser Test script}
    \item
      \href{https://john.cs.olemiss.edu/~hcc/csci450/2016fall/notes/ImpCore/Lua/runcore2.lua}{Run
      prefix interpreter script}
    \end{itemize}
  \end{enumerate}
\end{enumerate}

\hypertarget{kamin-interpreters}{%
\paragraph{Kamin Interpreters}\label{kamin-interpreters}}

\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
\setcounter{enumi}{36}
\item
  (for reference, not updated) Kamin Interpreters in Lua Toolset (KILT)

  \begin{enumerate}
  \def\labelenumii{\alph{enumii}.}
  \item
    \href{Kamin_Budd_interpreters/}{Kamin-Budd Interpreters}

    Samuel N. Kamin. \emph{Programming Languages: An Interpreter-Based
    Approach}, Addison-Wesley, 1990.

    Note: I implemented the interpreter prototypes below in Lua 5.1 in
    2013 for the Fall offering of CSci 658 and for a potential future
    offering of CSci 450. Some aspects my not work with Lua 5.2 or 5.3.

    I subsequently reimplemented the first with improved modularization
    in Lua in 2016 and then reimplemented it again in 2017 in Haskell.
  \item
    Language/Interpreter-independent modules

    \begin{itemize}
    \tightlist
    \item
      {[}REPL Module (repl.lua) {]}
      (\textless{}KILT/repl.lua\textgreater{})\\
    \item
      \href{KILT/environment.lua}{Environment Module (environment.lua)}
    \item
      \href{KILT/funtab.lua}{Function Table Module (funtab.lua)}
    \item
      \href{KILT/utilities.lua}{Utilities Module (utilities.lua)}
    \item
      \href{KILT/opcodes.lua}{Opcodes Factory Module (opcodes.lua)}
    \item
      \href{KILT/values.lua}{Values Factory Module (values.lua)}
    \item
      \href{KILT/parser.lua}{Parser Factory Module (parser.lua)}
    \item
      {[}Evaluator Factory Module (evaluator.lua) {]}
      (\textless{}KILT/evaluator.lua\textgreater{})
    \end{itemize}
  \item
    Kamin Chapter 1 Core language interpreter

    \begin{itemize}
    \tightlist
    \item
      \href{KILT/Core.lua}{Core Interpreter (Core.lua)}
    \item
      \href{KILT/opcodes_core.lua}{Core Opcodes (opcodes\_core.lua)}
    \item
      \href{KILT/values_core.lua}{Core Values Module (values\_core.lua)}
    \item
      \href{KILT/parser_core.lua}{Core Parser Module (parser\_core.lua)}
    \item
      \href{KILT/evaluator_core.lua}{Core Evaluator Module
      (evaluator\_core.lua)}
    \end{itemize}
  \item
    Kamin Chapter 2 Lisp language interpreter

    \begin{itemize}
    \tightlist
    \item
      \href{KILT/Lisp.lua}{Lisp Interpreter (Lisp.lua)}
    \item
      \href{KILT/opcodes_lisp.lua}{Lisp Opcodes (opcodes\_lisp.lua)}
    \item
      \href{KILT/values_lisp.lua}{Lisp Values Module (values\_lisp.lua)}
    \item
      \href{KILT/parser_lisp.lua}{Lisp Parser Module (parser\_lisp.lua)}
    \item
      \href{KILT/evaluator_lisp.lua}{Lisp Evaluator Module
      (evaluator\_lisp.lua)}
    \item
      \href{KILT/LispExamplesKaminChap2.txt}{A few Lisp examples}
    \end{itemize}
  \item
    Kamin Chapter 4 Scheme language interpreter

    \begin{itemize}
    \tightlist
    \item
      \href{KILT/Scheme.lua}{Scheme Interpreter (Scheme.lua)}
    \item
      \href{KILT/opcodes_scheme.lua}{Scheme Opcodes
      (opcodes\_scheme.lua)}
    \item
      \href{KILT/values_scheme.lua}{Scheme Values Module
      (values\_scheme.lua)}
    \item
      \href{KILT/parser_scheme.lua}{Scheme Parser Module
      (parser\_scheme.lua)}
    \item
      \href{KILT/evaluator_scheme.lua}{Scheme Evaluator Module
      (evaluator\_scheme.lua)}
    \item
      \href{KILT/SchemeExamples.txt}{A few Scheme examples}
    \end{itemize}
  \end{enumerate}
\end{enumerate}

\hypertarget{modules-and-frameworks}{%
\subsubsection{Modules and Frameworks}\label{modules-and-frameworks}}

\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
\setcounter{enumi}{37}
\item
  (for reference) Simple, silly Employee hierarchy example

  \begin{enumerate}
  \def\labelenumii{\alph{enumii}.}
  \item
    \href{Employee/Scala/EmployeeTest.scala}{Scala (2008, 2010)}
  \item
    \href{Employee/Ruby/employee.rb}{Ruby (2006)}
  \end{enumerate}
\item
  (for reference) Examine a natural number arithmetic package

  This case study has implementations in five different languages (with
  some slight differences among the examples). So it can be used to
  compare implementations in different languages.

  \begin{enumerate}
  \def\labelenumii{\alph{enumii}.}
  \item
    Background on Peano arithmetic

    \begin{itemize}
    \tightlist
    \item
      \href{http://en.wikipedia.org/wiki/Peano_axioms}{Peano Axioms},
      Wikipedia article
    \item
      \href{http://mathworld.wolfram.com/PeanosAxioms.html}{Peano's
      Axioms}, Wolfram MathWorld article
    \end{itemize}
  \item
    \href{Nat/Lua/nats2.lua}{Lua version (2013)}
  \item
    Elixir version (2015)

    \begin{itemize}
    \tightlist
    \item
      \href{Nat/Elixir/Nat.ex}{Nat module}
    \item
      \href{Nat/Elixir/Nat_Test.ex}{test module}
    \item
      \href{Nat/Elixir/Nat.exs}{test script}
    \end{itemize}
  \item
    Scala versions (2012, 2016)

    \begin{itemize}
    \tightlist
    \item
      \href{Nat/Scala/TestNats.scala}{Functional object-oriented style
      with ordinary classes}
    \item
      \href{Nat/Scala/TestCaseObjNats.scala}{Functional object-oriented
      style with case classes}
    \item
      \href{Nat/Scala/TestCaseExtNats.scala}{Functional module style
      with case classes}
    \end{itemize}
  \item
    \href{Nat/Ruby/Nat.txt}{Ruby version (2006)}
  \item
    Java version (2004, 2016), simpler, no generics

    \begin{itemize}
    \tightlist
    \item
      \href{Nat/Java/Nat.java}{abstract base class Nat}
    \item
      \href{Nat/Java/Zero.java}{subclass Zero}
    \item
      \href{Nat/Java/Succ.java}{subclass Succ}
    \item
      \href{Nat/Java/Err.java}{subclass Err}
    \item
      \href{Nat/Java/TestNat.java}{TestNat main program}
    \end{itemize}
  \end{enumerate}
\item
  (for reference) Abstract data types and modular design

  \begin{enumerate}
  \def\labelenumii{\alph{enumii}.}
  \item
    Background: Abstract data types

    \begin{itemize}
    \tightlist
    \item
      Nell Dale and Henry Walker. Abstract specification techniques,
      Chapter 1, In \emph{Abstract Data Types: Specifications,
      Implementations, and Applications}, pp.~1-34,D. C. Heath, 1996.
    \item
      H. Conrad Cunningham, Yi Liu, and Jingyi Wang. Designing a
      flexible framework for a table abstraction, Chapter 13 in Y. Chan,
      J. Talburt, and T. Talley, editors, \emph{Data Engineering:
      Mining, Information, and Intelligence}, pp.~279-314, Springer,
      2010.\\
      {[}\href{localcopy/Cunningham_Table_Abstraction.pdf}{manuscript}{]}
      {[}\href{slides/TableFramework8.ppt}{slides}{]}
    \end{itemize}
  \item
    \href{ModularDesign.html}{Modular Design}
  \item
    \href{DataAbstraction.html}{Data Abstraction}:
    {[}\href{slides/Data_Abstraction_rev2.ppt}{slides}{]}
  \item
    \href{Abstraction/Abstraction.html}{Abstraction} -- draft
    ``chapter'' from evolving ``textbook'' Exploring Languages with
    Interpreters and Functional Programming (some overlap with Data
    Abstraction document)
  \item
    Classic papers by David L. Parnas and associates:

    \begin{itemize}
    \tightlist
    \item
      Kathryn Heninger Britton, R. Alan Parker, and David L. Parnas.
      \href{localcopy/Parnas_Abstract_Interfaces.pdf}{A Procedure for
      Designing Abstract Interfaces for Device Interface Modules}, In
      \emph{Proceedings of the 5th International Conference on Software
      Engineering}, pp.~195-204, March 1981.
    \item
      David L. Parnas.
      \href{localcopy/Parnas_Criteria_Decomposing.pdf}{On the Criteria
      To Be Used in Decomposing Systems into Modules},
      \emph{Communications of the ACM}, Vol. 15, No.~12, pp.~1053-1058,
      1972.
    \item
      David L. Parnas. \href{localcopy/Parnas_Families.pdf}{On the
      Design and Development of Program Families}, \emph{IEEE
      Transactions on Software Engineering}, Vol. SE-2, No.~1, pp.~1-9,
      March 1976.
    \item
      David L. Parnas.
      \href{localcopy/Parnas_Extension_Contraction.pdf}{Designing
      Software for Ease of Extension and Contraction}, \emph{IEEE
      Transactions on Software Engineering}, Vol. SE-5, No.~1,
      pp.~128-138, March 1979.
    \item
      David L. Parnas, P. C. Clements, and D. M. Weiss.
      \href{localcopy/Parnas_Modular_Structure.pdf}{The Modular
      Structure of Complex Systems}, \emph{IEEE Transactions on Software
      Engineering}, Vol. SE-11, No.~3, pp.~259-266, March 1985.
    \end{itemize}
  \item
    William R. Cook.
    \href{http://www.cs.utexas.edu/~wcook/Drafts/2009/essay.pdf}{On
    Understanding Data Abstraction Revisited}. In \emph{Proceedings of
    OOPSLA}, October 2009.
    {[}\href{localcopy/Understanding_Data_Abstraction_Revisited.pdf}{local}{]}
  \end{enumerate}
\item
  (for reference) Explore consequences of software architectural
  mismatch.

  Paper: David Garlan, Robert Allen, and John Ockerbloom.
  \href{localcopy/ArchitecturalMismatch.pdf}{Architectural Mismatch: Why
  Reuse is So Hard}, \emph{IEEE Software}, Vol. 12, No.~6, November
  1995.

  Instructor's notes on \href{Arch_Mismatch.html}{Architectural
  Mismatch}
\item
  (for reference) Examine the CookieJar ADT case study (in Scala)

  \begin{enumerate}
  \def\labelenumii{\alph{enumii}.}
  \item
    \href{CookieJar/Scala/CookieJar_problem.html}{Cookie Jar ADT Problem
    Description}
  \item
    \href{CandyBowl/Lua/candybowl_semantics.html\#specifying-semantics}{Specification
    concepts and notation} -- from Candy Bowl ADT description
  \item
    Immutable CookieJar ADT Implementation in Scala
    (\texttt{ICookieJar}) -- uses method chaining functional style with
    immutable objects

    \begin{itemize}
    \tightlist
    \item
      \href{CookieJar/Scala/immutable/ICookieJar.scala}{ADT
      specification as Scala trait}
    \item
      \href{CookieJar/Scala/immutable/ICookieJarList.scala}{List
      version}
    \item
      \href{CookieJar/Scala/immutable/ICookieJarMap.scala}{HashMap
      version}
    \item
      \href{CookieJar/Scala/immutable/ICookieJarTupleList.scala}{List of
      tuples version}
    \item
      \href{CookieJar/Scala/immutable/ICookieJarTest.scala}{Blackbox
      test script}
    \end{itemize}
  \item
    Mutable CookieJar ADT Implementation in Scala (\texttt{CookieJar})
    -- uses object-oriented style with mutable state

    \begin{itemize}
    \tightlist
    \item
      \href{CookieJar/Scala/mutable/CookieJar.scala}{ADT specification
      as Scala trait}
    \item
      {[}List version
      \href{CookieJar/Scala/mutable/CookieJarArrayBuffer.scala}{ArrayBuffer
      version}
    \item
      \href{CookieJar/Scala/mutable/CookieJarMap.scala}{HashMap version}
    \item
      \href{CookieJar/Scala/mutable/CookieJarTupleList.scala}{List of
      tuples version}
    \item
      \href{CookieJar/Scala/mutable/CookieJarArray.scala}{Array version}
    \item
      \href{CookieJar/Scala/mutable/CookieJarTest.scala}{Blackbox test
      script}
    \end{itemize}
  \item
    \href{CookieJar/Ruby/CookieJarRuby.txt}{Similar specification and
    Ruby program}
  \end{enumerate}
\item
  (for reference) Examine Carrie's Candy Bowl ADT (abstract data type)
  case study

  \begin{enumerate}
  \def\labelenumii{\alph{enumii}.}
  \item
    Lua

    \begin{itemize}
    \tightlist
    \item
      \href{CandyBowl/Lua/candybowl_semantics.html}{ADT Semantics}
    \item
      \href{CandyBowl/Lua/candybowl_hash.lua}{Hashed version}
    \item
      \href{CandyBowl/Lua/candybowl_list.lua}{Unsorted List version}
    \item
      \href{CandyBowl/Lua/test_candybowl.lua}{Test driver}
    \end{itemize}
  \item
    Scala

    \begin{itemize}
    \tightlist
    \item
      \href{CandyBowl/Scala/CandyBowl.scala}{CandyBowl trait}
    \item
      \href{CandyBowl/Scala/CandyBowlList.scala}{CandyBowlList class}
    \end{itemize}
  \end{enumerate}
\item
   (for reference) Examine the Labeled Digraph case study

  \begin{enumerate}
  \def\labelenumii{\alph{enumii}.}
  \item
    Background:

    \begin{itemize}
    \item
      Nell Dale and Henry Walker. ``Directed Graphs or Digraphs,''
      Chapter 10, In \emph{Abstract Data Types: Specifications,
      Implementations, and Applications}, pp.~439-469, D. C. Heath,
      1996.
    \item
      Conrad Barski. ``Building a Text Game Engine,'', Chapter 5, In
      \emph{Land of Lisp: Learn to Program in Lisp, One Game at a Time},
      pp.~69-84, No Starch Press, 2011.

      The Common Lisp example in this chapter is similar to the classic
      Adventure game; the underlying data structure is a labeled
      digraph.
    \end{itemize}
  \item
    Haskell solutions (2015)

    \begin{itemize}
    \tightlist
    \item
      \href{Digraph/Haskell/DigraphADT.html}{Labelled Digraph Abstract
      Data Type}
    \item
      List representation for vertices and edges:
      {[}\href{Digraph/Haskell/DigraphADT_List.hs}{module}{]}
      {[}\href{Digraph/Haskell/DigraphADT_TestList.hs}{test module}{]}
    \item
      Map representation for graph:
      {[}\href{Digraph/Haskell/DigraphADT_Map.hs}{module}{]}
      {[}\href{Digraph/Haskell/DigraphADT_TestMap.hs}{test module}{]}
    \end{itemize}
  \item
    Elixir solutions (2015)

    \begin{itemize}
    \tightlist
    \item
      Tuple and list representation for graph:
      {[}\href{Digraph/Elixir/Digraph_List.ex}{module}{]}
      {[}\href{Digraph/Elixir/Digraph_Test.exs}{test module}{]}
    \end{itemize}
  \item
    Scala solutions (2016)

    \begin{itemize}
    \tightlist
    \item
      Abstract data type specification and Scala trait (interface):
      {[}\href{Digraph/Scala/Digraph.scala}{ADT interface}{]}
    \item
      List representation for vertices and edges:
      {[}\href{Digraph/Scala/DigraphList.scala}{class source}{]}
      {[}\href{Digraph/Scala/Test_DigraphList.scala}{test source}{]}
    \item
      Map (HashMap) representation for graph:
      {[}\href{Digraph/Scala/DigraphMap.scala}{class source}{]}
      {[}\href{Digraph/Scala/Test_DigraphMap.scala}{test source}{]}
    \end{itemize}
  \item
    Using the Elixir Digraph ADT module to build the Wizard's Adventure
    game (2015)

    \begin{itemize}
    \item
      \href{Wizard/Elixir/wizards_game.ex}{Wizard's Adventure game,
      Version 1,} adapted from Chapter 5, 6, and 17 of Conrad Barski's
      \emph{Land of Lisp: Learn to Program in Lisp, One Game at a Time},
      No Starch Press, 2011.
    \item
      \href{Wizard/Elixir/wizards_game2a.ex}{Wizard's Adventure game,
      Version 2,} that uses a higher order function to generate game
      actions and improved handling of the game state.
    \end{itemize}
  \end{enumerate}
\item
  (for reference) Examine the Dice of Doom game.

  \begin{enumerate}
  \def\labelenumii{\alph{enumii}.}
  \item
    Background: Conrad Barski. \emph{Land of Lisp: Learn to Program in
    Lisp, One Game at a Time}, No Starch Press, 2011.
  \item
    \href{Dice_of_Doom/Elixir/dice_of_doom_v1a.ex}{Dice of Doom, Version
    1a}, is a basic eagerly evaluated version (similar to that developed
    on pages 303-325 of \emph{Land of Lisp}). This version supports
    either two human players or a human player and a simple, minimax
    search-based ``AI'' (artificial intelligence) opponent.
  \item
    \href{Dice_of_Doom/Elixir/dice_of_doom_v1b.ex}{Dice of Doom, Version
    1b}, is an eager version above with an attempt at memoization of
    functions \texttt{neighbors} and \texttt{game\_tree} using the
    Elixir \texttt{Agent} modules.
  \item
    \href{Dice_of_Doom/Elixir/dice_of_doom_v2a.ex}{Dice of Doom, Version
    2a,} is a lazy version using Elixir \texttt{Stream} data structures
    (but without the memoization optimizations). This is based on
    version 1a above plus the discussion from pages 384-389 in chapter
    18 of \emph{Land of Lisp}. This version implements a limited depth
    minimax search, but it does not implement the artificial
    intelligence heuristics given in the last part of chapter 18.
  \end{enumerate}
\item
  (for reference) Explore Systematic generalization.

  \begin{enumerate}
  \def\labelenumii{\alph{enumii}.}
  \item
    Hans A. Schmid.
    \href{localcopy/SchmidSystematicDesignByGeneralization.pdf}{Systematic
    Framework Design by Generalization}, \emph{Communications of the
    ACM}, Vol. 40, No.~10, pp.~48-51, October 1997.
  \item
    Hans A. Schmid.
    \href{localcopy/SchmidCreatingApplicationsFromComponents.pdf}{Creating
    Applications From Components: A Manufacturing Framework Design},
    \emph{IEEE Software}, Vol. 13, No.~6, November 1997.
  \item
    Hans A. Schmid. Framework Design by Systematic Generalization,
    Chapter 15 in M. E. Fayad and R. E. Johnson, editors,
    \emph{Domain-Specific Application Frameworks}, pp.~353-378, Wiley,
    2000.
  \item
    Hans A. Schmid. OSEFA: Framework for Manufacturing, Chapter 4 in M.
    E. Fayad, D. C. Schmidt, and R. E. Johnson, editors, \emph{Building
    Application Frameworks: Object-Oriented Foundations of Framework
    Design}, pp.~43-65, Wiley, 1999.
  \end{enumerate}
\item
  (for reference) Mark Ardis, Nigel Daley, Daniel Hoffman, Harvey Siy,
  and David Weiss.
  \href{https://pdfs.semanticscholar.org/75bf/823305d898014d50ec4b47ed1d6cf42a17bf.pdf}{Software
  Product Lines: A Case Study}, \emph{Software Practice and Experience},
  Vol. 30, No.~7, pp.~825-847, 2000.
\item
  (for reference) Frameworks, based on Timothy Budd's \emph{An
  Introduction to Object-Oriented Programming}, Third Edition, Chapter
  21.

  \begin{enumerate}
  \def\labelenumii{\alph{enumii}.}
  \item
    Simple Sorting Framework in Scala

    \begin{itemize}
    \tightlist
    \item
      \href{SortFramework/Scala/SortEmployee.scala}{Low-level concrete
      Employee sorting}
    \item
      \href{SortFramework/Scala/InsertionSorter.scala}{Insertion Sorting
      framework}
    \item
      \href{SortFramework/Scala/EmployeeSorter.scala}{Employee Sorting
      application of framework}
    \item
      \href{SortFramework/Scala/TestEmployeeSorter.scala}{Test code for
      Employee Sorting application of framework}
    \end{itemize}
  \item
    Ice Cream Store discrete event simulation

    \begin{itemize}
    \tightlist
    \item
      \href{IceCreamStore/Scala/SimFramework.scala}{Simulation
      framework}
    \item
      \href{IceCreamStore/Scala/IceCreamStoreApp.scala}{Ice Cream Store
      application}
    \end{itemize}
  \end{enumerate}
\item
  (for reference) Scala Divide-and-Conquer Framework, similar to the
  Java framework in the paper:

  H. C. Cunningham, Y. Liu, and C. Zhang. Using classic problems to
  teach Java framework design, \emph{Science of Computer Programming},
  Special Issue on Principles and Practice of Programming in Java (PPPJ
  2004), Vol. 59, No.~1-2, pp.~147-169, January 2006. doi:
  10.10.16/j.scico.2005.07.009.
  {[}\href{http://www.cs.olemiss.edu/~hcc/papers/classicProblems.pdf}{manuscript}{]}

  Note: The above paper was not discussed in class, but the Scala
  versions of the Divide-and-Conquer (immediately below) and Binary Tree
  Traversal (farther down on this page) frameworks were discussed.

  \begin{itemize}
  \tightlist
  \item
    \href{DivConq/Scala/DivConqTemplate.scala}{Template-based
    Divide-and-Conquer Framework (DivConqTemplate)}
  \item
    \href{DivConq/Scala/DivConqStrategy.scala}{Strategy-based
    Divide-and-Conquer Framework (DivConqStrategy)}
  \item
    \href{DivConq/Scala/DivConqProblemSolution.scala}{Traits for Problem
    and Solution descriptions for both frameworks
    (DivConqProblemSolution)}
  \item
    \href{DivConq/Scala/QuickSortTemplateApp.scala}{Application of
    Template-based framework to QuickSort (QuickSortTemplateApp)}
  \item
    \href{DivConq/Scala/QuickSortStrategyApp.scala}{Application of
    Strategy-based framework to QuickSort (QuickSortStrategyApp)}
  \item
    \href{DivConq/Scala/QuickSortDesc.scala}{Descriptor for QuickSort
    state for both QuickSort applications (QuickSortDesc)}
  \end{itemize}
\item
  (for reference) Binary Tree Visitor Scala Framework

  \begin{enumerate}
  \def\labelenumii{\alph{enumii}.}
  \item
    Background: H. C. Cunningham, Y. Liu, and C. Zhang. Using classic
    problems to teach Java framework design, \emph{Science of Computer
    Programming}, Special Issue on Principles and Practice of
    Programming in Java (PPPJ 2004), Vol. 59, No.~1-2, pp.~147-169,
    January 2006. doi: 10.10.16/j.scico.2005.07.009.\\
    {[}\href{http://www.cs.olemiss.edu/~hcc/papers/classicProblems.pdf}{manuscript}{]}

    \emph{Scala versions (2008, 2010)}
  \item
    Straightforward translation of the non-generic Java program to Scala

    \begin{itemize}
    \tightlist
    \item
      \href{BinTree/Scala/Nongeneric/BinTreeFramework.scala}{Top-level
      framework (BinTreeFramework)}
    \item
      \href{BinTree/Scala/Nongeneric/EulerTourVisitor.scala}{Second-level
      Euler tour framework (EulerTourVisitor)}
    \item
      \href{BinTree/Scala/Nongeneric/MappingVisitor.scala}{Second-level
      mapping visitor framework (MappingVisitor)}
    \item
      \href{BinTree/Scala/Nongeneric/BreadthFirstVisitor.scala}{Second-level
      breadth-first framework (BreadthFirstVisitor)}
    \item
      \href{BinTree/Scala/Nongeneric/BinTreeTest.scala}{Application of
      BinTree frameworks (BinTreeTest)}
    \end{itemize}
  \item
    Generic implementation of BinTree framework in Scala.

    \begin{itemize}
    \tightlist
    \item
      \href{BinTree/Scala/Generic/BinTreeFramework.scala}{Top-level
      framework (BinTreeFramework)}
    \item
      \href{BinTree/Scala/Generic/EulerTourVisitor.scala}{Second-level
      Euler tour framework (EulerTourVisitor)}
    \item
      \href{BinTree/Scala/Generic/BreadthFirstVisitor.scala}{Second-level
      breadth-first framework (BreadthFirstVisitor)}
    \item
      \href{BinTree/Scala/Generic/BinTreeTest.scala}{Application of
      BinTree frameworks (BinTreeTest)}
    \end{itemize}
  \end{enumerate}
\item
   (for reference) Study the Movable and Named Objects case study (in
  Lua but based on a Haskell case study by Thompson)

  \begin{enumerate}
  \def\labelenumii{\alph{enumii}.}
  \item
    \emph{Purpose}: The Named and Movable Objects case study explores
    use of inheritance hierarchies and multiple inheritance in Lua. I
    also extracted a ``class support module'' from the initial version
    of this code; this module was used in later case studies (e.g., Lair
    Configuration DSL).

    The ``makeClass'' function dynamically creates a ``class'' that has
    zero or more superclasses. It creates the class prototype object
    with an appropriate constructor/initialization function, appropriate
    default definitions of instance methods, and the needed settings of
    metaclasses and the \texttt{\_\_index} metamethod to support the
    inheritance hierarchy.
  \item
    Background reading on object-oriented programming languages:
    \href{Fundamentals/01Fundamental450.html\#object-oriented}{Object-oriented}
    subsection of the
    \href{Fundamentals/01Fundamental450.html}{Fundamental Concepts of
    Programming Languages} notes
  \item
    Background reading on case study: Section 14.6 of Simon Thompson.
    \emph{Haskell: The Craft of Functional Programming}, Third Edition,
    Addison Wesley, 2011

    Note: We should readdress the design and implementation of this case
    study and the class support module. The latter may be too complex
    for our purposes in this course.
  \item
    \href{Movable/Lua/movable.lua}{First Lua version} (movable.lua)
  \item
    Modularized Lua version with improved class support:

    \begin{itemize}
    \tightlist
    \item
      \href{Movable/Lua/class_support.lua}{class support module}
      (class\_support.lua)
    \item
      \href{Movable/Lua/movable2.lua}{module using class-support}
      (movable2.lua)
    \item
      \href{Movable/Lua/movable2Test.lua}{test driver}
      (movable2Test.lua)
    \end{itemize}
  \item
    Other older versions:\textless{}

    \begin{itemize}
    \tightlist
    \item
      \href{Movable/Scala/MovableNamedTypes.hs}{Haskell source}
    \item
      \href{Movable/Scala/Movable.scala}{Scala source (partial)}
    \end{itemize}
  \end{enumerate}
\item
   (for reference) Study the prototype-based programming example

  \emph{Comments}: Lua is essentially a \emph{prototype-based}
  programming language. A Lua table has its own state, a unique
  identity, and an independent lifecyle. By assigning function closures
  to identifier-style keys, a table can also have its own operations.
  The method-call syntax enables these operations to refer to its
  associated table conveniently.

  The Lua metatable and metamethod features enable a table to
  \emph{delegate} some of its work conveniently to other tables. In
  particular, the \texttt{\_\_index} metamethod enables accesses to data
  fields or operations not defined in one table to other tables.

  The previous ``object-oriented'' Arithmetic Expression Tree and
  Movable \& Named Objects examples use Lua's prototype-based features
  to implement classes and inheritance structures.

  This module uses those features in a more straightforward
  prototype-based approach--by creating a ``copy'' of the prototype
  object. It provides two constructor functions, set up to use the
  method-call syntax.

  Constructor method \texttt{Prototype:new} creates a new object as a
  \emph{shallow copy} of the table parameter \texttt{mixin} with other
  references \emph{delegated} to object \texttt{self}. A call
  \texttt{Prototype:new} creates a basic object that delegates to object
  \texttt{Prototype}. If \texttt{obj} has been created by this
  \texttt{new} method, then a call of \texttt{obj:new} creates a new
  object that delegates to \texttt{obj} rather than \texttt{Prototype}.
  (This is different from the way Lua classes are implemented.)

  Constructor method \texttt{Prototype:clone} creates a new object that
  is a \emph{shallow copy} of object \texttt{self} and then mixes in the
  fields and methods from \texttt{mixin}. It delegates accesses to any
  undefined fields to whatever object \texttt{self} does.

  \emph{Concepts}: Prototype object, delegation, shallow copy, mixin

  \begin{itemize}
  \tightlist
  \item
    \href{Prototype/Prototype.lua}{Prototype-based programming with
    delegation and cloning}
  \item
    \href{Prototype/PrototypeTest.lua}{Test script}
  \end{itemize}
\item
   (for reference) Examine Rational Arithmetic case study (data
  abstraction)

  Note: I have rewritten this 2016 case study to use Haskell and
  incorporated it into the draft Abstraction ``chapter'' of Exploring
  Languages with Interpreters and Functional Programming

  \begin{enumerate}
  \def\labelenumii{\alph{enumii}.}
  \tightlist
  \item
    \href{Rational/Lua/Rational.html}{Using Data Abstraction in Lua}
  \end{enumerate}

  \begin{quote}
  Example motivated by sections 2.1.1 and 2.1.2 from: Harold Abelson and
  Gerald J. Sussman with Julie Sussman.
  \href{http://mitpress.mit.edu/sicp/}{\emph{Structure and
  Interpretation of Computer Programs}}, Second Edition, MIT Press, 1996
  \end{quote}

  \begin{quote}
  \href{https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-001-structure-and-interpretation-of-computer-programs-spring-2005/video-lectures/}{SICP
  video lectures, Hal Abelson}
  \end{quote}

  \begin{quote}
  \emph{Concepts}: designing modules with multiple implementations, data
  abstraction barrier (``building the wall''), canonical forms, using
  Lua modules, using higher order functions, using closures/thunks to
  encapsulate data
  \end{quote}

  \begin{enumerate}
  \def\labelenumii{\alph{enumii}.}
  \setcounter{enumii}{1}
  \item
    \href{Rational/Lua/rational.lua}{Rational arithmetic module} --
    outer layer implementation of Rational Arithmetic abstraction
  \item
    \href{Rational/Lua/rationalCore.lua}{Rational number data
    representation using two-element arrays} -- primitive layer
    implementation 1\\
    \href{Rational/Lua/rationalCore.lua}{{[}module{]}}
    \href{Rational/Lua/rationalCoreTest.lua}{{[}test script{]}}
  \item
    \href{Rational/Lua/rationalDeferGCD.lua}{Rational number data
    representation using array but deferring GCD} -- -- primitive layer
    implementation 2\\
    \href{Rational/Lua/rationalDeferGCD.lua}{{[}module{]}}
    \href{Rational/Lua/rationalDeferGCDTest.lua}{{[}test script{]}}
  \item
    \href{Rational/Lua/rationalClo.lua}{Rational number data
    representation using closures} -- primitive layer implementation 3\\
    \href{Rational/Lua/rationalClo.lua}{{[}module{]}}
    \href{Rational/Lua/rationalCloTest.lua}{{[}test script{]}}
  \end{enumerate}
\item
   (for reference) Examine the complex number arithmetic modules in Lua

  Modules are repeated in each package in which they are used

  \begin{enumerate}
  \def\labelenumii{\alph{enumii}.}
  \item
    \emph{Background} reading:
    \href{http://mitpress.mit.edu/sicp/}{\emph{Structure and
    Interpretation of Computer Programs}}, Second Edition, MIT Press,
    1996, Section 2.4

    \href{https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-001-structure-and-interpretation-of-computer-programs-spring-2005/video-lectures/}{SICP
    video lectures, Hal Abelson}
  \item
    Rectangular coordinates modules:\\
    \href{Complex/Lua/complexRectangular.lua}{{[}arithmetic{]}}
    \href{Complex/Lua/complexRectangularRep.lua}{{[}rectangular
    representation{]}}
    \href{Complex/Lua/complexUtilities.lua}{{[}utilities{]}}
    \href{Complex/Lua/testComplexRectangular.lua}{{[}test driver{]}}
  \item
    Polar coordinates modules: ~\\
    \href{Complex/Lua/complexPolar.lua}{{[}arithmetic{]}}
    \href{Complex/Lua/complexPolarRep.lua}{{[}polar representation{]}}
    \href{Complex/Lua/complexUtilities.lua}{{[}utilities{]}}
    \href{Complex/Lua/testComplexPolar.lua}{{[}test driver{]}}
  \item
    Tagged data modules: ~
    \href{Complex/Lua/complexTagged.lua}{{[}arithmetic{]}}
    \href{Complex/Lua/dataTagging.lua}{{[}data tagging{]}}
    \href{Complex/Lua/complexUtilities.lua}{{[}utilities{]}}
    \href{Complex/Lua/testComplexTagged.lua}{{[}test driver{]}}
  \item
    Data-directed programming modules: ~\\
    \href{Complex/Lua/complexDataDirected.lua}{{[}arithmetic{]}}
    \href{Complex/Lua/complexRectangularRep.lua}{{[}rectangular
    representation{]}} \href{Complex/Lua/complexPolarRep.lua}{{[}polar
    representation{]}} \href{Complex/Lua/dataTagging.lua}{{[}data
    tagging{]}} \href{Complex/Lua/complexUtilities.lua}{{[}utilities{]}}
    \href{Complex/Lua/testComplexDataDirected.lua}{{[}test driver{]}}
  \item
    Object-oriented modules:\\
    \href{Complex/Lua/complexObjOriented.lua}{{[}arithmetic{]}}
    \href{Complex/Lua/complexUtilities.lua}{{[}utilities{]}}
    \href{Complex/Lua/testComplexObjOriented.lua}{{[}test driver{]}}
  \end{enumerate}
\item
   (for reference) Lua list module case study (Cell List)

  \emph{Purpose}: This Lua case study illustrates (i) functional
  programming principles, (ii) design and implementation methods for
  abstract data types and information hiding modules, and, (iii) Lua
  programming techniques (linked lists, stateless iterators, closures,
  metatables, etc.)

  \emph{Background reading} on Lua: Chapter 11 on data structures (pages
  107-116) and Chapter 15 on modules (pages 151-161) of
  \emph{Programming in Lua} (PiL), Third Edition

  \emph{Caveats}: (1) These modules (from 2013-14) internally layer the
  operations into primitive and non-primitive operations, but they do
  not separate the primitive operations into its own module. That can be
  done similarly to the Rational Arithmetic case study. (2) In the
  future, I plan to construct a more efficient implementation that uses
  array-style tables. The table-based versions likely also need to use
  weak tables to avoid memory leaks.

  \begin{enumerate}
  \def\labelenumii{\alph{enumii}.}
  \item
    Cell-based list module:\\
    \href{CellLists/Lua/cellList.lua}{{[}module source{]}}
    \href{CellLists/Lua/cellListTest.lua}{{[}test driver{]}}
  \item
    Closure-and-table-based list module variant:\\
    \href{CellLists/Lua/cellListClosure.lua}{{[}module source{]}}
    \href{CellLists/Lua/cellListClosureTest.lua}{{[}test driver{]}}
  \item
    Function-based cell list module variant:\\
    \href{CellLists/Lua/cellListFunct.lua}{{[}module source{]}}
    \href{CellLists/Lua/cellListFunctTest.lua}{{[}test driver{]}}
  \item
    Lazy list module variant using C preprocessor (cpp -P):\\
    \href{CellLists/Lua/lazyList1.lua}{{[}module source{]}}
    \href{CellLists/Lua/lazyList1X.lua}{{[}source after cpp{]}}\\
    \href{CellLists/Lua/lazyList1Test.lua}{{[}test driver{]}}
    \href{CellLists/Lua/lazyList1TestX.lua}{{[}driver after cpp{]}}
    \href{CellLists/Lua/lazyList1run.sh}{{[}sh script{]}}
  \item
    Lazy list module variant using
    \href{https://github.com/stevedonovan/LuaMacro}{Lua Macro 2.5}:\\
    \href{CellLists/Lua/lazyListMacros.lua}{{[}macro definitions{]}}
    \href{CellLists/Lua/lazyList2.luam}{{[}module macro source{]}}
    \href{CellLists/Lua/lazyList2.lua}{{[}source after luam -o{]}}\\
    \href{CellLists/Lua/lazyList2Test.luam}{{[}macro test driver{]}}
    \href{CellLists/Lua/lazyList2Test.lua}{{[}driver after luam -o{]}}
    \href{CellLists/Lua/lazyList2run.sh}{{[}sh script{]}}
  \end{enumerate}
\item
   (for reference) Examine functions adapted from SICP

  \begin{enumerate}
  \def\labelenumii{\alph{enumii}.}
  \item
    Background reading: Chapter 1 of the classic textbook SICP -- Harold
    Abelson and Gerald J. Sussman with Julie Sussman. \emph{Structure
    and Interpretation of Computer Programs}, Second Edition, MIT Press,
    1996:\\
    {[}\href{http://mitpress.mit.edu/sicp/}{book site at MIT Press}{]}
    {[}\href{http://mitpress.mit.edu/sicp/full-text/book/book.html}{HTML}{]}
    {[}\href{http://sicpebook.wordpress.com/}{SICP ebook site}
  \item
    First-order functions in Scala

    \begin{itemize}
    \tightlist
    \item
      \href{SICP_examples/Scala/sqrt.scala}{Square root (Newton's
      Method) with all public functions}
    \item
      \href{SICP_examples/Scala/sqrt2.scala}{Square root (Newton's
      Method) with nested function definitions}
    \item
      \href{SICP_examples/Scala/factorial.scala}{Factorial}
    \item
      \href{SICP_examples/Scala/fibonacci.scala}{Fibonacci}
    \item
      \href{SICP_examples/Scala/exponentiation.scala}{Exponentiation}
    \item
      \href{SICP_examples/Scala/gcd.scala}{Greatest common divisor}
    \end{itemize}
  \item
    Higher-order functions in Scala

    \begin{itemize}
    \tightlist
    \item
      \href{SICP_examples/Scala/summation.scala}{Summation (takes
      function arguments)}
    \item
      \href{\%3CSICP_examples/Scala/derivative.scala\%3E}{Derivative
      (returns function result)}
    \end{itemize}
  \item
    Lua versions

    \begin{itemize}
    \tightlist
    \item
      \href{SICP_examples/Lua/sqrt.lua}{Square root (Newton's Method)}
    \item
      \href{SICP_examples/Lua/factorial.lua}{Factorial}
    \item
      \href{SICP_examples/Lua/fibonacci.lua}{Fibonacci}
    \item
      \href{SICP_examples/Lua/exponentiation.lua}{Exponentiation}
    \item
      \href{SICP_examples/Lua/gcd.lua}{Greatest common divisor}
    \item
      \href{SICP_examples/Lua/summation.lua}{Summation}
    \item
      \href{SICP_examples/Lua/derivative.lua}{Derivative}
    \end{itemize}
  \item
    Also various \href{SICP_examples/Haskell/}{Haskell},
    \href{SICP_examples/Elixir/}{Elixir},
    \href{SICP_examples/Elm/}{Elm}, and
    \href{SICP_examples/Scheme/}{Scheme} versions
  \end{enumerate}
\item
  (for reference) Examine Square Root case study (stepwise refinement)

  \begin{enumerate}
  \def\labelenumii{\alph{enumii}.}
  \tightlist
  \item
    \href{SICP_examples/Lua/StepwiseRefinement.html}{Using Stepwise
    Refinement in Lua}
  \end{enumerate}

  \begin{quote}
  \emph{Concepts}: TBD (examine the notes to see what was covered)
  \end{quote}

  \begin{quote}
  Example motivated by sections 1.1.7 and 1.1.8 from: Harold Abelson and
  Gerald J. Sussman with Julie Sussman.
  \href{http://mitpress.mit.edu/sicp/}{\emph{Structure and
  Interpretation of Computer Programs}}, Second Edition, MIT Press, 1996
  \end{quote}

  \begin{quote}
  \href{https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-001-structure-and-interpretation-of-computer-programs-spring-2005/video-lectures/}{SICP
  video lectures, Hal Abelson}
  \end{quote}

  \begin{enumerate}
  \def\labelenumii{\alph{enumii}.}
  \setcounter{enumii}{1}
  \tightlist
  \item
    \href{SICP_examples/Lua/sqrt.lua}{Square root}
  \end{enumerate}
\end{enumerate}

\hypertarget{programming-language-reference-materials}{%
\subsection{Programming Language Reference
Materials}\label{programming-language-reference-materials}}

\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
\setcounter{enumi}{57}
\tightlist
\item
  \href{Free_Prog_Lang_Textbooks.html}{Free online programming language
  textbooks and tutorials}
\end{enumerate}

\hypertarget{haskell-1}{%
\subsubsection{Haskell}\label{haskell-1}}

\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
\setcounter{enumi}{58}
\item
  \href{https://learnxinyminutes.com/docs/haskell/}{Learn X in Y
  Minutes, Where X = Haskell}
\item
   H. Conrad Cunningham.
  \href{https://john.cs.olemiss.edu/~hcc/csci450/notes/HaskellNotes/IntroFP_Haskell.html}{Introduction
  to Functional Programming Using Haskell}, Computer and Information
  Science, University of Mississippi, 2016-2017. (I am writing this
  ``textbook'' primarily for CSci 450 and likely will use the title
  \emph{Exploring Languages with Interpreters and Functional
  Programming} for the Fall 2018 draft.)
\item
  H. Conrad Cunningham. \href{haskell_notes.pdf}{\emph{Notes on
  Functional Programming with Haskell}}, Computer and Information
  Science, University of Mississippi, 1994-2014. (I am revising this
  document and integrating it with other materials to produce the new
  ``textbook'' above \emph{Exploring Languages with Interpreters and
  Functional Programming}. The chapters at the chapters at the end have
  not yet been integrated.)
\item
  \href{http://www.haskell.org}{Haskell language website}

  \begin{enumerate}
  \def\labelenumii{\alph{enumii}.}
  \tightlist
  \item
    \href{http://www.haskell.org/onlinereport/haskell2010/}{\emph{Haskell
    2010 Language Report}}
  \item
    \href{http://www.haskell.org/ghc/docs/latest/html/users_guide/}{\emph{GHC
    User's Guide}}
  \end{enumerate}
\item
  \href{http://cheatsheet.codeslower.com/CheatSheet.pdf}{\emph{Haskell
  Cheat Sheet}}
\item
  \href{https://www.fpcomplete.com/school}{School of Haskell} online
  tutorials
\item
  Miron Lipovaca. \href{http://learnyouahaskell.com/}{\emph{Learn You a
  Haskell for Great Good: A Beginner's Guide}}, a free online tutorial
  at \url{http://learnyouahaskell.com/}. (It is also in print from No
  Starch Press, 2011.)
\item
  Kees Doets and Jan van Eijck.
  \href{http://fldit-www.cs.uni-dortmund.de/~peter/PS07/HR.pdf}{\emph{The
  Haskell Road to Logic, Math and Programming}}, March 2004. This book
  is also available in print, published by College Publications, 2004.
\item
  Paul Hudak.
  \href{https://www.google.com/url?sa=t\&rct=j\&q=\&esrc=s\&source=web\&cd=2\&ved=0ahUKEwjsveil57TZAhUCyVMKHdv3DG4QFggvMAE\&url=http\%3A\%2F\%2Fwww.cs.yale.edu\%2Fhomes\%2Fhudak\%2FPapers\%2FHSoM.pdf\&usg=AOvVaw0ito3odDctDREQ7Yw3QTsR}{\emph{The
  Haskell School of Music: From Signals to Symphonies}}, Version 2.6,
  January 2014. This book is a recent rewrite of Hudak's \emph{The
  Haskell School of Expression: Learning Functional Programming through
  Multimedia}, Cambridge University Press, 2000.
\item
  Simon Marlowe.
  \href{https://web.archive.org/web/20180117182938/http://chimera.labs.oreilly.com/books/1230000000929/index.html}{\emph{Parallel
  and Concurrent Programming in Haskell: Techniques for Multicore and
  Multithreaded Programming}},

  \begin{enumerate}
  \def\labelenumii{\arabic{enumii}.}
  \setcounter{enumii}{2012}
  \tightlist
  \item
    This book is also available in print, published by O'Reilly Media,
    2013.
  \end{enumerate}
\item
  Bryan O'Sullivan, Don Stewart, and John Goerzen.
  \href{http://book.realworldhaskell.org}{\emph{Real World Haskell}},

  \begin{enumerate}
  \def\labelenumii{\arabic{enumii}.}
  \setcounter{enumii}{2007}
  \tightlist
  \item
    This book is also available in print, published by O'Reilly Media in
    November 2008.
  \end{enumerate}
\end{enumerate}

\hypertarget{lua-1}{%
\subsubsection{Lua}\label{lua-1}}

\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
\setcounter{enumi}{69}
\item
  \href{https://learnxinyminutes.com/docs/lua/}{Learn X in Y Minutes,
  Where X = Lua}
\item
  Definitive reference: Roberto Ierusalimshcy. \emph{Programming in
  Lua}, Fourth Edition, Lua.org, Rio de Janiero, Brazil, 2016. (The
  \href{https://www.lua.org/pil/contents.html}{First Edition} of this
  book, covering Lua 5.0, is available online at
  \url{https://www.lua.org/pil/contents.html}.)
\item
  Instructor's Lua slides (from CSci 450, Fall 2016)

  \begin{enumerate}
  \def\labelenumii{\alph{enumii}.}
  \tightlist
  \item
    Background: The slides below are adapted, in part, from
    \href{http://www.dcc.ufrj.br/~fabiom/lua/}{\emph{Programming in Lua,
    Slides for Course}} by Fabio Mascarenhas from the Federal University
    of Rio de Janeiro, Brazil. He taught a course, which used Lua 5.2,
    at Nankai University, P. R. China, in July 2013.
  \item
    \href{LuaIntro/01IntroLua.html}{Introduction to Lua} slides based,
    in part, on Mascarenhas slide sets 0-5
  \item
    \href{LuaIntro/02IntroLua.html}{Advanced Lua Functions} slides
    based, in part, on Mascarenhas slide set 6
  \item
    \href{LuaIntro/03IntroLua.html}{Modules in Lua} slides based, in
    part, on Mascarenhas slide set 9
  \item
    \href{LuaIntro/04IntroLua.html}{Lua Metatables} slides based, in
    part, on Mascarenhas slide set 10
  \item
    \href{LuaIntro/05IntroLua.html}{Lua Objects} slides based, in part,
    on Mascarenhas slide set 11
  \end{enumerate}
\end{enumerate}

\hypertarget{python-3}{%
\subsubsection{Python 3}\label{python-3}}

\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
\setcounter{enumi}{72}
\item
  \href{https://learnxinyminutes.com/docs/python3/}{Learn X in Y
  Minutes, Where X = Python3}
\item
  Bernd Klein. \href{https://www.python-course.eu}{Python Course}
\end{enumerate}

\hypertarget{ruby}{%
\subsubsection{Ruby}\label{ruby}}

\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
\setcounter{enumi}{74}
\item
  \href{https://learnxinyminutes.com/docs/ruby/}{Learn X in Y Minutes,
  Where X = Ruby}
\item
  Chris Pine. \href{http://pine.fm/LearnToProgram/}{Learn to Program}
\item
  why the lucky stiff (Jonathan Gillette).
  \href{http://mislav.uniqpath.com/poignant-guide/}{why's (poignant)
  guide to Ruby}
\end{enumerate}

\hypertarget{scala}{%
\subsubsection{Scala}\label{scala}}

\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
\setcounter{enumi}{77}
\item
  \href{https://learnxinyminutes.com/docs/scala/}{Learn X in Y Minutes,
  Where X = Scala}
\item
  Definitive reference: Martin Odersky, Lex Spoon, and Bill Venners.
  \emph{Programming in Scala}, Third Edition, Artima, 2016. The first
  edition (2008) is available online at
  \url{http://www.artima.com/pins1ed/}.
\item
  Martin Odersky.
  \href{http://www.scala-lang.org/docu/files/ScalaByExample.pdf}{\emph{Scala
  by Example}}, EPFL, 2014.
  {[}\href{localcopy/ScalaByExample.pdf}{local}{]}
\item
  Instructor's \href{ScalaForJava/ScalaForJava.html}{Notes on Scala for
  Java Programmers}
\item
  Paul Chiusano and Runar Bjarnason. \emph{Functional Programming in
  Scala}, Manning, 2015.

  \begin{enumerate}
  \def\labelenumii{\alph{enumii}.}
  \tightlist
  \item
    Instructor's Notes on \href{FPS03/FunctionalDS.html}{Functional Data
    Structures (Chapter 3)}
  \item
    Instructor's Notes on \href{FPS04/ErrorHandling.html}{Error Handling
    without Exceptions (Chapter 4)}
  \item
    Instructor's Notes on \href{FPS05/Laziness.html}{Strictness and
    Laziness (Chapter 5)}
  \end{enumerate}
\end{enumerate}

\end{document}
