cws/main_cw05.tex
changeset 501 3717785f2c37
parent 491 2a30c7dfe3ed
equal deleted inserted replaced
500:fd7f8aff848c 501:3717785f2c37
    41 \subsection*{Reference Implementation}
    41 \subsection*{Reference Implementation}
    42 
    42 
    43 As usual, this Scala assignment comes with a reference implementation in
    43 As usual, this Scala assignment comes with a reference implementation in
    44 form of two \texttt{jar}-files. You can download them from KEATS. They
    44 form of two \texttt{jar}-files. You can download them from KEATS. They
    45 allow you to run any test cases on your own computer. For example you
    45 allow you to run any test cases on your own computer. For example you
    46 can call \texttt{scala-cli} on the command line with the option \texttt{--extra-jars bf.jar}
    46 can call \texttt{scala} on the command line with the option \texttt{--extra-jars bf.jar}
    47 and then query any function from the \texttt{bf.scala} template file.
    47 and then query any function from the \texttt{bf.scala} template file.
    48 You have to prefix the calls with \texttt{M5a} and \texttt{M5b},
    48 You have to prefix the calls with \texttt{M5a} and \texttt{M5b},
    49 respectively. For example
    49 respectively. For example
    50 
    50 
    51 
    51 
    52 \begin{lstlisting}[language={},xleftmargin=1mm,numbers=none,basicstyle=\ttfamily\small]
    52 \begin{lstlisting}[language={},xleftmargin=1mm,numbers=none,basicstyle=\ttfamily\small]
    53 $ scala-cli --extra-jars bf.jar
    53 $ scala --extra-jars bf.jar
    54 scala> import M5a._  
    54 scala> import M5a._  
    55 scala> run(load_bff("sierpinski.bf")) ; ()
    55 scala> run(load_bff("sierpinski.bf")) ; ()
    56                                *
    56                                *
    57                               * *
    57                               * *
    58                              *   *
    58                              *   *