3 ms·
I'd argue it can't be done. It basically has features that are best implemented as a library. In fact, the many kanrens (including Clojure's core.logic) demonst
by moomin 9y ago
I'd argue it can't be done. It basically has features that are best implemented as a library. In fact, the many kanrens (including Clojure's core.logic) demonstrate the effectiveness of this approach. Meanwhile, stuff like GPU-accelerated ML have supplanted it in the natural language processing arena, and functional programming has become the paradigm of choice for theorem provers like Agda.
- killin_dan 9y agoDo you know very much about GPUs? Would but be viable to implement a kanren on top of cuda or something like that? Wouldn't that lend kanren insane performance gains?
- convolvatron 9y agonot too surprisingly, a lot of logic programs don't parallelize very well at all because of very linear dependencies (control flow). and some do a lot of largely independent but very regular work that would execute quite well on a simd/vector/smt array. people have come up with some tricks to map control flow into simd (like some really cool parser tricks), but i think in general those have regimes where they have sub-serial performance. so maybe? if you had the magic compiler? or you provided some manual annotation support? or a robust ffi? for sql, which has a much more limited footprint, there's been some cool vectorization work.
- tom_mellior 9y ago> It basically has features that are best implemented as a library. In fact, the many kanrens I've never seen one that came close to a real Prolog. Having a library that implements a slow, informally specified tiny subset of Prolog doesn't say anything about the usefulness of real Prolog.