coroutines and prolog

70 views
Skip to first unread message

Jacob

unread,
Jul 20, 2017, 12:14:04 PM7/20/17
to Shen
Dr. Tarver, have you ever thought about implementing coroutines in Shen? They can be a nice alternative to threads at times.  Also, I have been playing around with a language called Picat lately.  I really like the way it extends prolog.  Maybe Shen could mine some ideas from Picat?

Mark Tarver

unread,
Jul 20, 2017, 3:28:35 PM7/20/17
to Shen
SP has already got a nice theory of concurrency inside of it.  There's a good chance it might make it into a 4th edition of TBoS and be open source.

I haven't used Picat, but there was a whole slew of functional-logic programming languages in the '80s (LIFE, Loglisp, Lisplog, POPLOG) which combined the paradigms.  Shen Prolog is pretty well-integrated into the language.

But none of these experiments really took off, IMO partly because logic programming never took off commercially in a big way and also because interest in that kind of language was confined to an intersection between those who know both logic and functional programming.  That's a proper subset of an already small set.  In my experience Prolog is brilliant at certain problems.   

I guess you're hinting at Parallel Prolog in your post.   Not an easy proposition as the FGI pioneers found.    They really struggled to make it work; what they developed was often a watered down version of Prolog.  Because you have to cope with variable sharing and also vector assignments, it is really hard to parallelise Shen Prolog.  It is designed though to run multiple non-communicating Prolog processes simultaneously in different vector memory - something that one of the sponsors - Vasil Diadov - wanted.  But I've never actually felt the need to use this feature.

Mark
Reply all
Reply to author
Forward
0 new messages