This is a list of reported problems in the pre-release version of OrcScala (to be released as Orc 2.0 later this year). Edit this page to add a problem report.
---> To add a problem:
---> Go to the invisible block below the other open problems
---> Copy the template to above the invisible block
(0, 0) thinking
(0, 1) thinking
(1, 0) thinking
(1, 1) thinking
(0, 0) hungry
(1, 0) hungry
(1, 1) hungry
(0, 1) hungry
orc/lib/includes/prelude/list.inc:38:5: orc.error.runtime.ArgumentTypeMismatchException: Expected type List for argument 0, got class java.util.HashSet instead
def map(f,[]) = []
^
called at OrcExamples/distributed_algorithms/misra_philosopher.orc:54:7
called at OrcExamples/distributed_algorithms/misra_philosopher.orc:109:1
orc/lib/includes/prelude/list.inc:39:5: orc.error.runtime.ArgumentTypeMismatchException: Expected type List for argument 0, got class java.util.HashSet instead
def map(f,h:t) = f(h):map(f,t)
^
called at OrcExamples/distributed_algorithms/misra_philosopher.orc:54:7
called at OrcExamples/distributed_algorithms/misra_philosopher.orc:109:1
orc/lib/includes/prelude/list.inc:38:5: orc.error.runtime.ArgumentTypeMismatchException: Expected type List for argument 0, got class java.util.HashSet instead
def map(f,[]) = []
^
called at OrcExamples/distributed_algorithms/misra_philosopher.orc:54:7
called at OrcExamples/distributed_algorithms/misra_philosopher.orc:109:1
orc/lib/includes/prelude/list.inc:39:5: orc.error.runtime.ArgumentTypeMismatchException: Expected type List for argument 0, got class java.util.HashSet instead
def map(f,h:t) = f(h):map(f,t)
^
called at OrcExamples/distributed_algorithms/misra_philosopher.orc:54:7
called at OrcExamples/distributed_algorithms/misra_philosopher.orc:109:1
orc/lib/includes/prelude/list.inc:38:5: orc.error.runtime.ArgumentTypeMismatchException: Expected type List for argument 0, got class java.util.HashSet instead
def map(f,[]) = []
^
called at OrcExamples/distributed_algorithms/misra_philosopher.orc:54:7
called at OrcExamples/distributed_algorithms/misra_philosopher.orc:109:1
orc/lib/includes/prelude/list.inc:39:5: orc.error.runtime.ArgumentTypeMismatchException: Expected type List for argument 0, got class java.util.HashSet instead
def map(f,h:t) = f(h):map(f,t)
^
called at OrcExamples/distributed_algorithms/misra_philosopher.orc:54:7
called at OrcExamples/distributed_algorithms/misra_philosopher.orc:109:1
orc/lib/includes/prelude/list.inc:38:5: orc.error.runtime.ArgumentTypeMismatchException: Expected type List for argument 0, got class java.util.HashSet instead
def map(f,[]) = []
^
called at OrcExamples/distributed_algorithms/misra_philosopher.orc:54:7
called at OrcExamples/distributed_algorithms/misra_philosopher.orc:109:1
orc/lib/includes/prelude/list.inc:39:5: orc.error.runtime.ArgumentTypeMismatchException: Expected type List for argument 0, got class java.util.HashSet instead
def map(f,h:t) = f(h):map(f,t)
^
called at OrcExamples/distributed_algorithms/misra_philosopher.orc:54:7
called at OrcExamples/distributed_algorithms/misra_philosopher.orc:109:1
orc.run.extensions.ManyActorBasedScheduler$Worker@5176477b: caught java.lang.ClassCastException: java.lang.Thread cannot be cast to scala.concurrent.forkjoin.ForkJoinWorkerThread
java.lang.ClassCastException: java.lang.Thread cannot be cast to scala.concurrent.forkjoin.ForkJoinWorkerThread
at scala.concurrent.forkjoin.ForkJoinTask.fork(ForkJoinTask.java:481)
at scala.actors.scheduler.ForkJoinScheduler.executeFromActor(ForkJoinScheduler.scala:121)
at scala.actors.scheduler.DelegatingScheduler$class.executeFromActor(DelegatingScheduler.scala:42)
at scala.actors.Scheduler$.executeFromActor(Scheduler.scala:21)
at scala.actors.Actor$class.scheduleActor(Actor.scala:628)
at orc.run.extensions.ManyActorBasedScheduler$Worker.scheduleActor(ManyActorBasedScheduler.scala:77)
at scala.actors.Reactor$class.resumeReceiver(Reactor.scala:131)
at orc.run.extensions.ManyActorBasedScheduler$Worker.scala$actors$ReplyReactor$$super$resumeReceiver(ManyActorBasedScheduler.scala:77)
at scala.actors.ReplyReactor$class.resumeReceiver(ReplyReactor.scala:69)
at orc.run.extensions.ManyActorBasedScheduler$Worker.resumeReceiver(ManyActorBasedScheduler.scala:77)
at scala.actors.Actor$class.searchMailbox(Actor.scala:478)
at orc.run.extensions.ManyActorBasedScheduler$Worker.searchMailbox(ManyActorBasedScheduler.scala:77)
at scala.actors.Reactor$class.react(Reactor.scala:203)
at orc.run.extensions.ManyActorBasedScheduler$Worker.scala$actors$ReplyReactor$$super$react(ManyActorBasedScheduler.scala:77)
at scala.actors.ReplyReactor$class.react(ReplyReactor.scala:109)
at orc.run.extensions.ManyActorBasedScheduler$Worker.scala$actors$Actor$$super$react(ManyActorBasedScheduler.scala:77)
at scala.actors.Actor$class.react(Actor.scala:606)
at orc.run.extensions.ManyActorBasedScheduler$Worker.react(ManyActorBasedScheduler.scala:77)
at orc.run.extensions.ManyActorBasedScheduler$Worker$$anonfun$act$1.apply(ManyActorBasedScheduler.scala:84)
at orc.run.extensions.ManyActorBasedScheduler$Worker$$anonfun$act$1.apply(ManyActorBasedScheduler.scala:84)
at scala.actors.Reactor$class.seq(Reactor.scala:280)
at orc.run.extensions.ManyActorBasedScheduler$Worker.seq(ManyActorBasedScheduler.scala:77)
at scala.actors.Reactor$$anon$3.andThen(Reactor.scala:258)
at scala.actors.Combinators$class.loop(Combinators.scala:26)
at orc.run.extensions.ManyActorBasedScheduler$Worker.loop(ManyActorBasedScheduler.scala:77)
at scala.actors.Combinators$$anonfun$loop$1.apply(Combinators.scala:26)
at scala.actors.Combinators$$anonfun$loop$1.apply(Combinators.scala:26)
at scala.actors.Reactor$$anonfun$seq$1$$anonfun$apply$1.apply(Reactor.scala:277)
at scala.actors.ReactorTask.run(ReactorTask.scala:34)
at scala.actors.threadpool.ThreadPoolExecutor.runWorker(Unknown Source)
at scala.actors.threadpool.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Thread.java:680)
Apparently, this comes when one "uses the lightweight react when using the thread proxy actor".
---> Copy the template below, except for the "% %" at the bottom
---> Insert the copy ABOVE the "% % invisible" line (up 2 lines)
---> Replace text in the form of <<blah>> with real values
<<Problem title which briefly and uniquely identifies a problem report>>#
Reporter:
<<Your Name>>
Report date-time:
<<YYYY-MM-DD HH:MM>>
Orc version:
<<In Eclipse, choose Run > Run Configurations > Orc program. Copy the version info. in the first line of "runtime engine version".>>
OrcScala bug. random(1) returns a java.lang.Integer which, when its equals is called with the scala.math.BigInt literal 0, fails to compare as equal. OrcJava had work-arounds in its orc.runtime.sites.core.Equal site for this.
Proposed Fix:
Update orc.lib.builtin.Eq to replace use of equals with Scala's ==, which handles boxing correctly.
orc.error.runtime.ArgumentTypeMismatchException: Expected type (Field, _) for argument 0, got (java.lang.Class, Integer) instead
at orc.lib.builtin.RecordConstructor$$anon$3$$anonfun$1.apply(Constructors.scala:119)
at orc.lib.builtin.RecordConstructor$$anon$3$$anonfun$1.apply(Constructors.scala:117)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206)
at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:61)
at scala.collection.immutable.List.foreach(List.scala:45)
at scala.collection.TraversableLike$class.map(TraversableLike.scala:206)
at scala.collection.immutable.List.map(List.scala:45)
at orc.lib.builtin.RecordConstructor$$anon$3.call(Constructors.scala:117)
at orc.lib.builtin.RecordConstructor$$anon$3.call(Constructors.scala:114)
at orc.types.SimpleCallableType$class.call(CallableType.scala:35)
at orc.lib.builtin.RecordConstructor$$anon$3.call(Constructors.scala:114)
at orc.compile.typecheck.Typechecker$.typeCall(Typechecker.scala:356)
at orc.compile.typecheck.Typechecker$.typeSynthExpr(Typechecker.scala:75)
at orc.compile.typecheck.Typechecker$.typeSynthExpr(Typechecker.scala:94)
at orc.compile.typecheck.Typechecker$.typeSynthExpr(Typechecker.scala:100)
...
Back on 23 Oct, we decided to refactor Vtimer to not make the engine depend on Vtimer. r2169 removed the Vtimer calls from the engine, but the Vtimer side of the changes was never completed.
A type argument is overconstrained; inference failed. Please add explicit type arguments. There may also be an underlying type error. [[OrcWiki:OverconstrainedTypeVariableException]]
[[],[]] :: List[List[Top]]
^
Constraint generation seems to behave strangely in the presence of nested constructors. The underlying constraint List[Bot] <: List[List[Top]] should succeed trivially, but instead it fails. This is the simplest example I have found which demonstrates the problem. In fact, the expression should have the even more precise type List[List[Bot]], but I've currently left it as Top for simplicity.