!!! OrcScala Problem Reports 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. %%invisible ---> To add a problem: ---> Go to the invisible block below the other open problems ---> Copy the template to above the invisible block %% ---- %%invisible ---> 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".>> ! Code: [{orc runnable='false' <<Minimal complete example Orc code demonstrating problem.>> }] ! Actual output: {{{ <<Cut-and-paste any relevant Orc message or output produced>> }}} ! Reporter's comments: <<Free-form notes by reporter>> ---- %% ---- !! CLOSED ---- !! %%strike 1: {{{random}}}'s values not comparing correctly%% (fixed) | __Reporter:__ | Bryan Marker | __Report date-time:__ | 2010-09-24 11:32 | __Orc version:__ | 2.0.0 rev. 2136 ! Code: [{orc runnable='false' random(1) >v> println(v) >> (v = 0) }] ! Actual output: {{{ false }}} ! Reporter's comments: This does work: [{orc runnable='false' random(1) >w> random(1) >v> println(v) >> (v = w) }] Is there something with the types of {{v}} and {{0}} that cause this? ! Orc team response || Analysis | __Repeatable:__ | Yes | __Root Cause:__ | 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. || Implementation | __Fix Made:__ | __Rev:__ 2141 __Date:__ 28 Sep 2010 __By:__ jthywiss ---- !! %%strike 2: Orc plug-in token colorer doesn't recognize nested comments %% (fixed) | __Reporter:__ | John Thywissen | __Report date-time:__ | 2010-12-14 16:48 | __Orc version:__ | 2.0.0 rev. 2253 ! Code: [{orc runnable='false' {-{-{-{-{-{--}-}-}-}-}-} }] ! Actual output: Close braces are highlighted as erroneous characters. ! Reporter's comments: The parser handles the comments correctly, so there is no error marker. Only the token coloring is wrong. ! Orc team response || Analysis | __Repeatable:__ | Yes | __Root Cause:__ | {{OrcEclipse src.edu.utexas.cs.orc.orceclipse.parse.~OrcLexer.getFirstTokenAt}} bug -- it stops scanning a multi-line comment at the first {{ -} }}. | __Proposed Fix:__ | {{getFirstTokenAt}}'s {{COMMENT_MULTILINE}} case needs to handle nested comments. || Implementation | __Fix Made:__ | __Rev:__ 2307 __Date:__ 2010-12-28 10:26 __By:__ jthywiss ---- !! 3: %%strike {{~CappedActorBasedScheduler}} tries to run halted token %% (fixed) | __Reporter:__ | John Thywissen | __Report date-time:__ | 2010-12-15 11:29 | __Orc version:__ | 2.0.0 rev. ! Code: [{orc runnable='false' def f(num) = num + 1 f(1,2) }] ! Actual output: {{{ OrcExamples/test_data/functional_invalid/Parser26.orc:11:1: orc.error.runtime.ArityMismatchException: Arity mismatch, expected 1 arguments, got 2 arguments. f(1,2) ^ orc.run.extensions.CappedActorBasedScheduler$Worker@f27461b: caught java.lang.AssertionError: halted token scheduled java.lang.AssertionError: halted token scheduled at orc.run.Orc$Token.run(Orc.scala:504) at orc.run.extensions.CappedActorBasedScheduler$Worker.steal(CappedActorBasedScheduler.scala:103) at orc.run.extensions.CappedActorBasedScheduler$Worker$$anonfun$act$1$$anonfun$apply$1.apply(CappedActorBasedScheduler.scala:114) at orc.run.extensions.CappedActorBasedScheduler$Worker$$anonfun$act$1$$anonfun$apply$1.apply(CappedActorBasedScheduler.scala:111) at scala.actors.ReactorTask.run(ReactorTask.scala:34) ... }}} ! Reporter's comments: This is test case {{Parser26}}. ! Orc team response || Analysis | __Repeatable:__ | Yes | __Root Cause:__ | Arity mismatch on function call attempts the call even after halting the token | __Proposed Fix:__ | Add else branching || Implementation | __Fix Made:__ | __Rev:__ 2302 __Date:__ 26 Dec 2010 __By:__ dkitchin ---- !! %%strike 4: {{misra_philosopher.orc}} throwing {{~ArgumentTypeMismatchException}} %% | __Reporter:__ | John Thywissen | __Report date-time:__ | 2010-12-16 16:06 | __Orc version:__ | 2.0.0 rev. 2260 ! Code: [{orc runnable='false' -- Excerpt of lines 51-59: def thinking() = def on(("rumble", _)) = println(name + " hungry") >> map(requestFork, missing) >> hungry() def on(("request", p)) = sendFork(p) >> thinking() on(receive()) }] ! Actual output: {{{ (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 }}} ! Reporter's comments: Path to example in Eclipse: {{~OrcExamples/distributed_algorithms/misra_philosopher.orc}} ! Orc team response || Analysis | __Repeatable:__ | Yes | __Root Cause:__ | List extractor sites no longer perform extractions on objects implementing Iterable; this feature is deprecated in 2.0. | __Proposed Fix:__ | Change the code to use some native Set implementation with a native iteration strategy rather than list recursion. || Implementation | __Fix Made:__ | __Rev:__ 2640 __Date:__ 28 Mar 2011 __By:__ dkitchin ---- !! %%strike 5: {{randomized_byzantine.orc}} refers to an old {{Map}} site that no longer exists %% | __Reporter:__ | John Thywissen | __Report date-time:__ | 2010-12-16 16:06 | __Orc version:__ | 2.0.0 rev. 2260 ! Code: [{orc runnable='false' val table = Map() }] ! Actual output: {{{ OrcExamples/distributed_algorithms/randomized_byzantine.orc:18:15: Variable Map is unbound [[OrcWiki:UnboundVariableException]] val table = Map() ^ }}} ! Reporter's comments: Path to example in Eclipse: {{~OrcExamples/distributed_algorithms/randomized_byzantine.orc}} ! Orc team response || Analysis | __Repeatable:__ | Yes | __Root Cause:__ | Orc's Map has been removed from the prelude due to Java compatibility issues and is no longer available | __Proposed Fix:__ | Use a Java or Scala map implementation directly || Implementation | __Fix Made:__ | __Rev:__ 2640 __Date:__ 28 Mar 2011 __By:__ dkitchin ---- !! %%strike 6: {{Vtimer}} hangs %% (fixed) | __Reporter:__ | John Thywissen | __Report date-time:__ | 2010-12-16 16:57 | __Orc version:__ | 2.0.0 rev. 2270 ! Code: (Any code that calls {{Vtimer}}.) ! Actual output: {{{ ../OrcExamples/beginning_Orc/auction.orc java.util.concurrent.TimeoutException ../OrcExamples/standard_problems/fib-vtimer.orc java.util.concurrent.TimeoutException ../OrcExamples/standard_problems/path.orc java.util.concurrent.TimeoutException ../OrcExamples/test_data/functional_valid/Orc24.orc java.util.concurrent.TimeoutException ../OrcExamples/test_data/functional_valid/Orc25.orc java.util.concurrent.TimeoutException ../OrcExamples/test_data/functional_valid/Orc26.orc java.util.concurrent.TimeoutException ../OrcExamples/test_data/functional_valid/readwrite.orc java.util.concurrent.TimeoutException }}} ! Reporter's comments: 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. ! Orc team response || Analysis | __Repeatable:__ | Yes | __Root Cause:__ | {{Vtimer}} design changes from 23 Oct never carried through. | __Proposed Fix:__ | Delete {{Vwait}} until next release || Implementation | __Fix Made:__ | __Rev:__ 2631 __Date:__ 26 Mar 2011 __By:__ J^T ---- !! 7: %%strike Call to untyped site causes type checker to report "no member named apply" %% (fixed) | __Reporter:__ | John Thywissen | __Report date-time:__ | 2010-12-19 11:10 | __Orc version:__ | 2.0.0 rev. 2280 ! Code: [{orc runnable='false' def foo() = "foo" val Foo = MakeSite(foo) }] ! Actual output: {{{ Type orc.lib.builtin.MakeSite$ has no member named apply [[OrcWiki:NoSuchMemberException]] val Foo = MakeSite(foo) ^ }}} ! Reporter's comments: Seems to happen on calls to any untyped site. ! Orc team response || Analysis | __Repeatable:__ | | __Root Cause:__ | | __Proposed Fix:__ | || Implementation | __Fix Made:__ | __Rev:__ 2303 __Date:__ 26 Dec 2010 __By:__ dkitchin ---- !! 8: %%strike Typechecking {{{null}}} causes {{{NullPointerException}}} %% (fixed) | __Reporter:__ | John Thywissen | __Report date-time:__ | 2010-12-20 17:57 | __Orc version:__ | 2.0.0 rev. 2281 ! Code: [{orc runnable='false' null }] ! Actual output: {{{ java.lang.NullPointerException at orc.compile.typecheck.Typechecker$.typeValue(Typechecker.scala:383) ... }}} ! Reporter's comments: (none) ! Orc team response || Analysis | __Repeatable:__ | | __Root Cause:__ | null value needs a specific type | __Proposed Fix:__ | Let null :: Bot, for now. || Implementation | __Fix Made:__ | __Rev:__ 2304 __Date:__ 26 Dec 2010 __By:__ dkitchin ---- !! 9: %%strike Typechecking fails on record literal %% (fixed) | __Reporter:__ | John Thywissen | __Report date-time:__ | 2010-12-21 17:32 | __Orc version:__ | 2.0.0 rev. 2281 ! Code: [{orc runnable='false' {. a = 1 .} }] ! Actual output: {{{ 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) ... }}} ! Reporter's comments: (none) ! Orc team response || Analysis | __Repeatable:__ | | __Root Cause:__ | | __Proposed Fix:__ | || Implementation | __Fix Made:__ | __Rev:__ 2305 __Date:__ 26 Dec 2010 __By:__ dkitchin ---- !! 10: %%strike {{{def}}}s that return {{{String}}} type check as {{{java.lang.Class}}} %% (fixed) | __Reporter:__ | John Thywissen | __Report date-time:__ | 2010-12-21 18:22 | __Orc version:__ | 2.0.0 rev. 2281 ! Code: [{orc runnable='false' def f() = "f" f() }] ! Actual output: {{{ Program type checks as java.lang.Class ... }}} ! Reporter's comments: Asserting or ascribing doesn't change things. Maybe it's simply a {{{toString()}}} bug. ! Orc team response || Analysis | __Repeatable:__ | | __Root Cause:__ | | __Proposed Fix:__ | || Implementation | __Fix Made:__ | __Rev:__ 2305 __Date:__ 26 Dec 2010 __By:__ dkitchin ---- !! %%strike 11: {{orc.run.extensions.~ManyActorBasedScheduler}} causes a {{~ClassCastException}} %% (fixed) | __Reporter:__ | John Thywissen | __Report date-time:__ | 2011-01-22 19:17 | __Orc version:__ | 2.0.0 rev. 2382 ! Code: While running the Orc7 test case. Appears to be a heisenbug. ! Actual output: {{{ 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) }}} ! Reporter's comments: Apparently, this comes when one "uses the lightweight react when using the thread proxy actor". ! Orc team response || Analysis | __Repeatable:__ | Inconsistent | __Root Cause:__ | Speculation: When thread pool is shutting down, submitted tasks get run on caller's thread. If the caller is the main thread, and the task is a Reactor, the CCE above occurs. | __Proposed Fix:__ | Replace token scheduler with simpler one || Implementation | __Fix Made:__ | __Rev:__ 2642 __Date:__ 30 Mar 2011 __By:__ jthywiss ---- !! %%strike 12: Type inference is failing on nested constructors. %% (fixed) | __Reporter:__ | David Kitchin | __Report date-time:__ | 2011-02-28 18:28 | __Orc version:__ | OrcScala r2459 ! Code: [{orc runnable='false' [[],[]] :: List[List[Top]] }] ! Actual output: {{{ 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]] ^ }}} ! Reporter's comments: 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. ! Orc team response || Analysis | __Repeatable:__ | Yes | __Root Cause:__ | | __Proposed Fix:__ | || Implementation | __Fix Made:__ | __Rev:__ 2634 __Date:__ 28 Mar 2011 __By:__ dkitchin ----