cws/main_cw05.tex
changeset 476 7550c816187a
parent 463 0315d9983cd0
equal deleted inserted replaced
475:59e005dcf163 476:7550c816187a
    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                              *   *