cws/main_cw05.tex
changeset 473 be818c5a67d4
parent 460 f5c0749858fd
child 491 2a30c7dfe3ed
equal deleted inserted replaced
472:fbff6f601370 473:be818c5a67d4
    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 Scala on the command line with the option \texttt{-cp bf.jar}
    46 can call \texttt{scala-cli} 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 -cp bf.jar
    53 $ scala-cli --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                              *   *