This is version . It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]

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.


[],] :: ListList[Top]

11: Type inference is failing on nested constructors.#

Reporter: David Kitchin
Report date-time: 2011-02-28 18:28
Orc version: OrcScala r2459

Code:#

[[],[]] :: 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.

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:#

-- 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: Date: By:

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:#

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: Date: By:

6: Vtimer hangs#

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:
Implementation
Fix Made: Rev: Date: By:

11: orc.run.extensions.ManyActorBasedScheduler causes a ClassCastException#

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".

CLOSED#


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:#

random(1) >v> println(v) >> (v = 0)

Actual output:#

false

Reporter's comments:#

This does work:
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

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:#

{-{-{-{-{-{--}-}-}-}-}-}

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: 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:#

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

7: 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:#

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: Typechecking null causes NullPointerException (fixed)#

Reporter: John Thywissen
Report date-time: 2010-12-20 17:57
Orc version: 2.0.0 rev. 2281

Code:#

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: 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:#

{. 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: defs 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:#

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

Add new attachment

Only authorized users are allowed to upload new attachments.
« This particular version was published on 28-Feb-2011 18:33 by DavidKitchin.