templates5/bfc.scala
author Christian Urban <urbanc@in.tum.de>
Thu, 06 Dec 2018 18:37:17 +0000
changeset 233 5f36d04d23a5
child 285 475c39725698
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
233
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
// Part 2 about a "Compiler" for the Brainf*** language
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     2
//======================================================
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     3
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     4
// !!! Copy any function you need from file bf.scala !!!
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     5
//
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     6
// If you need any auxiliary function, feel free to 
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     7
// implement it, but do not make any changes to the
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     8
// templates below.
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     9
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    10
def time_needed[T](n: Int, code: => T) = {
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    11
  val start = System.nanoTime()
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    12
  for (i <- 0 until n) code
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    13
  val end = System.nanoTime()
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    14
  (end - start)/(n * 1.0e9)
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    15
}
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    16
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    17
type Mem = Map[Int, Int]
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    18
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    19
import io.Source
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    20
import scala.util._
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    21
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    22
// !! COPY from your bf.scala !!
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    23
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    24
// def load_bff(name: String) : String = ...
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    25
  
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    26
// def sread(mem: Mem, mp: Int) : Int = ...
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    27
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    28
// def write(mem: Mem, mp: Int, v: Int) : Mem = ...
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    29
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    30
// def jumpRight(prog: String, pc: Int, level: Int) : Int = ...
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    31
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    32
// def jumpLeft(prog: String, pc: Int, level: Int) : Int = ...
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    33
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    34
// def compute(prog: String, pc: Int, mp: Int, mem: Mem) : Mem = ...
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    35
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    36
// def run(prog: String, m: Mem = Map()) = 
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    37
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    38
// The baseline to what we can compare our "compiler"
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    39
// implemented below. It should require something like 
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    40
// 60 seconds for the calculation on my laptop
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    41
//
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    42
//time_needed(1, run(load_bff("benchmark.bf")))
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    43
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    44
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    45
// DEBUGGING INFORMATION!!!
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    46
//
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    47
// Compiler, even real ones, are fiendishly difficult to get
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    48
// to produce correct code. The point is that for example for
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    49
// the Sierpinski program, they need to still generate code
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    50
// that displays such a triangle. If yes, then one usually
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    51
// can take comfort that all is well. If not, then something
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    52
// went wrong during the optimisations.
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    53
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    54
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    55
// ADVANCED TASKS
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    56
//================
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    57
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    58
// (5) Write a function jtable that precomputes the "jump
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    59
//     table" for a bf-program. This function takes a bf-program 
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    60
//     as an argument and Returns a Map[Int, Int]. The 
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    61
//     purpose of this map is to record the information
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    62
//     that given on the position pc is a '[' or a ']',
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    63
//     then to which pc-position do we need to jump next?
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    64
// 
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    65
//     For example for the program
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    66
//    
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    67
//       "+++++[->++++++++++<]>--<+++[->>++++++++++<<]>>++<<----------[+>.>.<+<]"
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    68
//
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    69
//     we obtain the map
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    70
//
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    71
//       Map(69 -> 61, 5 -> 20, 60 -> 70, 27 -> 44, 43 -> 28, 19 -> 6)
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    72
//  
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    73
//     This states that for the '[' on position 5, we need to
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    74
//     jump to position 20, which is just after the corresponding ']'.
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    75
//     Similarly, for the ']' on position 19, we need to jump to
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    76
//     position 6, which is just after the '[' on position 5, and so
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    77
//     on. The idea is to not calculate this information each time
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    78
//     we hit a bracket, but just look up this information in the 
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    79
//     jtable. You can use the jumpLeft and jumpRight functions
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    80
//     from Part 1 for calculating the jtable.
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    81
//
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    82
//     Then adapt the compute and run functions from Part 1 in order 
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    83
//     to take advantage of the information stored in the jtable. 
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    84
//     This means whenever jumpLeft and jumpRight was called previously,
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    85
//     you should look up the jump address in the jtable.
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    86
 
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    87
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    88
//def jtable(pg: String) : Map[Int, Int] = ...
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    89
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    90
// testcase
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    91
// jtable("""+++++[->++++++++++<]>--<+++[->>++++++++++<<]>>++<<----------[+>.>.<+<]""")
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    92
// =>  Map(69 -> 61, 5 -> 20, 60 -> 70, 27 -> 44, 43 -> 28, 19 -> 6)
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    93
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    94
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    95
//def compute2(pg: String, tb: Map[Int, Int], pc: Int, mp: Int, mem: Mem) : Mem = ...
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    96
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    97
//def run2(pg: String, m: Mem = Map()) = ... 
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    98
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    99
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   100
//testcase
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   101
//time_needed(1, run2(load_bff("benchmark.bf")))
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   102
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   103
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   104
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   105
// (6) Write a function optimise which deletes "dead code" (everything
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   106
// that is not a bf-command) and also replaces substrings of the form
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   107
// [-] by a new command 0. The idea is that the loop [-] just resets the
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   108
// memory at the current location to 0. In the compute3 and run3 functions
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   109
// below you implement this command by writing the number 0 to mem(mp), 
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   110
// that is write(mem, mp, 0). 
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   111
//
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   112
// The easiest way to modify a string in this way is to use the regular
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   113
// expression """[^<>+-.,\[\]]""", which recognises everything that is 
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   114
// not a bf-command and replace it by the empty string. Similarly the
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   115
// regular expression """\[-\]""" finds all occurrences of [-] and 
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   116
// by using the Scala method .replaceAll you can replace it with the 
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   117
// string "0" standing for the new bf-command.
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   118
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   119
//def optimise(s: String) : String = ...
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   120
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   121
//def compute3(pg: String, tb: Map[Int, Int], pc: Int, mp: Int, mem: Mem) : Mem = ...
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   122
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   123
//def run3(pg: String, m: Mem = Map()) = ...
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   124
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   125
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   126
// testcases
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   127
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   128
//optimise(load_bff("benchmark.bf"))          // should have inserted 0's
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   129
//optimise(load_bff("mandelbrot.bf")).length  // => 11203
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   130
 
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   131
//time_needed(1, run3(load_bff("benchmark.bf")))
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   132
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   133
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   134
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   135
// (7)  Write a function combine which replaces sequences
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   136
// of repeated increment and decrement commands by appropriate
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   137
// two-character commands. For example for sequences of +
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   138
//
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   139
//              orig bf-cmds  | replacement
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   140
//            ------------------------------
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   141
//              +             | +A 
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   142
//              ++            | +B
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   143
//              +++           | +C
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   144
//                            |
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   145
//              ...           |
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   146
//                            | 
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   147
//              +++....+++    | +Z
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   148
//                (where length = 26)
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   149
//
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   150
//  Similar for the bf-command -, > and <. All other commands should
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   151
//  be unaffected by this change.
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   152
//
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   153
//  Adapt the compute4 and run4 functions such that they can deal
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   154
//  appropriately with such two-character commands.
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   155
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   156
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   157
//def combine(s: String) : String = ...
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   158
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   159
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   160
// testcase
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   161
//combine(load_bff("benchmark.bf"))
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   162
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   163
//def compute4(pg: String, tb: Map[Int, Int], pc: Int, mp: Int, mem: Mem) : Mem = ...
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   164
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   165
// should call first optimise and then combine on the input string
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   166
//def run4(pg: String, m: Mem = Map()) = ...
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   167
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   168
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   169
// testcases
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   170
//combine(optimise(load_bff("benchmark.bf"))) // => """>A+B[<A+M>A-A]<A[[....."""
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   171
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   172
//time_needed(1, run4(load_bff("benchmark.bf")))
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   173
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   174
//time_needed(1, run(load_bff("sierpinski.bf"))) 
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   175
//time_needed(1, run4(load_bff("sierpinski.bf"))) 
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   176
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   177
//time_needed(1, run4(load_bff("mandelbrot.bf")))
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   178
5f36d04d23a5 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   179