generating constraints for lists

6 views
Skip to first unread message

Alyssa Meservy

unread,
Nov 29, 2011, 6:58:05 PM11/29/11
to byu-cs-330...@googlegroups.com
When we're generating constraints for (tempty? e) we want to constrain e to being a list, but don't care what type of list it is. Is it alright to constrain e to the type (t-list (t-var (gensym 'tempty-list))) ? Or is there a we can check what type of list it should be?

--Alyssa Meservy
-"And now, after the many testimonies which have been given of him, this is the testimony, last of all, which we give of him: That he lives!"

Jay McCarthy

unread,
Nov 29, 2011, 7:04:14 PM11/29/11
to byu-cs-330...@googlegroups.com
On Tue, Nov 29, 2011 at 4:58 PM, Alyssa Meservy <ames...@gmail.com> wrote:
When we're generating constraints for (tempty? e) we want to constrain e to being a list, but don't care what type of list it is. Is it alright to constrain e to the type (t-list (t-var (gensym 'tempty-list)))?

That is totally correct.
 
Or is there a we can check what type of list it should be?

If the context requires it to be a certain type, then that will be imposed by something later on

Jay
 

--Alyssa Meservy
-"And now, after the many testimonies which have been given of him, this is the testimony, last of all, which we give of him: That he lives!"




--
Jay McCarthy <j...@cs.byu.edu>
Assistant Professor / Brigham Young University
http://faculty.cs.byu.edu/~jay

"The glory of God is Intelligence" - D&C 93
Reply all
Reply to author
Forward
0 new messages