mpl test case in Mosh

1 view
Skip to first unread message

Eduardo Cavazos

unread,
May 17, 2010, 5:19:00 PM5/17/10
to Mosh Developer Disscus
Hello,

During the development of the MPL project, I've run the the tests in a
few implementations including Mosh. Recently I added a test which
passes in Ypsilon, Ikarus, and Chez, but seems to give Mosh trouble.

The test suite is at:

http://github.com/dharmatech/mpl/blob/master/test.sls

The particular test that gives Mosh trouble is:

(test-equal "MM: page 117"

(polynomial-division (alge " (2+4i)*x^2 + (-1-8i)*x + (-3+3i) ")
(alge " (1+2i)*x + (1-1i) ")
x)

(list (alge " 2*x-3 ")
0))

An R6RS program which also demonstrates the problem using the code
from the test is:

(import (mpl rnrs-sans)
(mpl polynomial-division))

(display
(polynomial-division '(+ -3+3i (* -1-8i x) (* 2+4i (^ x 2)))
'(+ 1-1i (* 1+2i x))
'x))

(newline)

Again, that program runs in the other implementations.

When I run this code with Mosh, it never returns; i.e. seems to be
caught in a loop.

I'll try to narrow it down further, but I wanted to mention it early.

The good news is that, if I comment out that one test from the test
suite, Mosh completes all the tests.

More information about MPL is at:

http://github.com/dharmatech/mpl/blob/master/mpl.org

Ed

--
You received this message because you are subscribed to the Google Groups "Mosh Developer Disscus" group.
To post to this group, send email to mosh-develo...@googlegroups.com.
To unsubscribe from this group, send email to mosh-developer-di...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mosh-developer-discuss?hl=en.

Eduardo Cavazos

unread,
May 17, 2010, 6:51:04 PM5/17/10
to Mosh Developer Disscus
I should also mention:

~ $ mosh -v
Mosh R6RS scheme interpreter, version 0.2.5

higepon

unread,
May 18, 2010, 12:06:28 AM5/18/10
to mosh-develo...@googlegroups.com
Hi.

Thank you for your bug report.
I reproduced the bug and narrowed it down.

(import (except (rnrs) /)
(mpl div))

(display (simplify-quotient '(/ 2+4i 1+2i))) ; => 2 : Ypsilon
; => 2+4i : Mosh

Do you have any ideas?

---
MINOWA Taro(Higepon)
http://www.monaos.org/
http://github.com/higepon
http://code.google.com/p/mosh-scheme/
http://www.facebook.com/people/Taro_Minowa_Higepon/649065487
http://twitter.com/higepon

Eduardo Cavazos

unread,
May 18, 2010, 12:24:25 AM5/18/10
to Mosh Developer Disscus
On May 17, 11:06 pm, higepon <hige...@gmail.com> wrote:

> I reproduced the bug and narrowed it down.
>
> (import (except (rnrs) /)
>         (mpl div))
>
> (display (simplify-quotient '(/ 2+4i 1+2i))) ; => 2 : Ypsilon
>                                              ; => 2+4i : Mosh

Wow, that was fast!

> Do you have any ideas?

It looks like in Ypsilon, Ikarus, Chez, and Larceny:

(expt 1+2i -1) => 1/5-2/5i

whereas in Mosh:

(expt 1+2i -1) => 1

higepon

unread,
May 18, 2010, 9:26:18 AM5/18/10
to mosh-develo...@googlegroups.com

Eduardo Cavazos

unread,
May 19, 2010, 12:22:28 AM5/19/10
to Mosh Developer Disscus
On May 18, 8:26 am, higepon <hige...@gmail.com> wrote:

> Fixed the bug and added test.http://github.com/higepon/mosh/commit/7e4bbd844399d1a74031c49e3757fe8...

Thanks Higepon!
Reply all
Reply to author
Forward
0 new messages