rec

2 views
Skip to first unread message

Anonymer

unread,
Dec 13, 2010, 3:36:29 PM12/13/10
to byu-cs-330-Fall-2010
Is this a test case that should pass?

(test/pred (infer-type (unify (generate-constraints 'top (alpha-vary
(parse '(rec (f (fun (x) (f x))) (f 1))))))) (type=? (t-num)))

Jay McCarthy

unread,
Dec 13, 2010, 3:49:09 PM12/13/10
to byu-cs-330...@googlegroups.com, byu-cs-330-Fall-2010
No

Sent from my iPhone

Kevin Black

unread,
Dec 13, 2010, 3:54:47 PM12/13/10
to byu-cs-330...@googlegroups.com
If run the program would result in an infinite loop, but if it were to terminate then the type of the program would be whatever the return type of f is (say alpha).

Anonymer

unread,
Dec 13, 2010, 3:57:42 PM12/13/10
to byu-cs-330-Fall-2010
What's a good test case with the .... filled in then?

(rec (f (fun (x) (f x)))
....)

On Dec 13, 1:49 pm, Jay McCarthy <jay.mccar...@gmail.com> wrote:
> No
>
> Sent from my iPhone
>

Jay McCarthy

unread,
Dec 13, 2010, 4:02:50 PM12/13/10
to byu-cs-330...@googlegroups.com, byu-cs-330-Fall-2010
The program is fine but the test case is bogus

Sent from my iPhone

Reply all
Reply to author
Forward
0 new messages