main_testing5/bf_test6.scala
author Christian Urban <christian.urban@kcl.ac.uk>
Mon, 25 Dec 2023 01:10:55 +0100
changeset 482 769bda18a43d
parent 475 59e005dcf163
permissions -rw-r--r--
updated jars
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
263
5a16bcb4105e updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
475
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 460
diff changeset
     2
def urbanmain() = {
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 460
diff changeset
     3
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 460
diff changeset
     4
  import M5b._
348
b5b6ed38c2f2 updated jars
Christian Urban <christian.urban@kcl.ac.uk>
parents: 286
diff changeset
     5
475
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 460
diff changeset
     6
  //println(optimise(load_bff("benchmark.bf")).length)
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 460
diff changeset
     7
  //println(optimise(load_bff("mandelbrot.bf")).length)
384
6e1237691307 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 348
diff changeset
     8
475
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 460
diff changeset
     9
  val urban_l1 = optimise(load_bff("benchmark.bf")).length
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 460
diff changeset
    10
  val urban_l2 = optimise(load_bff("mandelbrot.bf")).length 
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 460
diff changeset
    11
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 460
diff changeset
    12
  assert(urban_l1 == 181)
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 460
diff changeset
    13
  assert(urban_l2 == 11203)
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 460
diff changeset
    14
}