I'm using the Akari solver in copris v.1.1
Here is the code in scalademoapp.scala:
import java.lang.String
import java.util.Arrays
object scalademoapp extends App {
System.out.println(" test 1.............");
val a = new Array [String] (3); a(0)="-smt";
a(1)="-v"; a(2)="c:\\akari.txt";
System.out.println("test.............");
System.out.println(a.deep.mkString("\n"));
Solver.main(a);
System.out.println("test4.............");
}
This exception is raised when trying to execute the solver:
Exception in thread "main" java.lang.RuntimeException: Objective variable is not defined at jp.kobe_u.copris.sugar.Solver.findOptBody(Sugar.scala:631) at jp.kobe_u.copris.AbstractSolver$$anonfun$findOpt$1.apply$mcZ$sp(Solver.scala:266) at jp.kobe_u.copris.AbstractSolver$$anonfun$findOpt$1.apply(Solver.scala:264) at jp.kobe_u.copris.AbstractSolver$$anonfun$findOpt$1.apply(Solver.scala:264) at jp.kobe_u.copris.AbstractSolver.measureTime(Solver.scala:205) at jp.kobe_u.copris.AbstractSolver.findOpt(Solver.scala:264) at jp.kobe_u.copris.CoprisTrait$class.findOpt(Copris.scala:52) at jp.kobe_u.copris.dsl$.findOpt(Copris.scala:92) at AbstractPuzzleSolver$class.findOptSolution(PuzzleSolver.scala:54) at Solver$.findOptSolution(Akari-v1-1.scala:37) at AbstractPuzzleSolver$class.solve(PuzzleSolver.scala:70) at Solver$.BoardPuzzleSolver$$super$solve(Akari-v1-1.scala:37) at BoardPuzzleSolver$class.solve(PuzzleSolver.scala:237) at Solver$.solve(Akari-v1-1.scala:37) at AbstractPuzzleSolver$class.main(PuzzleSolver.scala:163) at Solver$.main(Akari-v1-1.scala:37) at scalademoapp$.delayedEndpoint$scalademoapp$1(scalademoapp.scala:21) at scalademoapp$delayedInit$body.apply(scalademoapp.scala:7) at scala.Function0$class.apply$mcV$sp(Function0.scala:40) at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12) at scala.App$$anonfun$main$1.apply(App.scala:76) at scala.App$$anonfun$main$1.apply(App.scala:76) at scala.collection.immutable.List.foreach(List.scala:381) at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:35) at scala.App$class.main(App.scala:76) at scalademoapp$.main(scalademoapp.scala:7) at scalademoapp.main(scalademoapp.scala)
What is causing this exception?
scalademoapp.scala: 7
– dk14case "-smt" :: solver :: rest
atPuzzleSolver.scala
--v
should be the last argument:Solver.main(Array("-smt", "c:\\akari.txt", "-v"))
– dk14