News for hackers. Stuff that matters.

PaulTarau

One can encapsulate backtracking simply as an iterator over a stream of answers to a query. The SWI_prolog ecosystem provides a nice "logic engine" abstraction for that, see http://www.swi-prolog.org/pldoc/man?section=engines . That gives something similar to Python's yield operation. Backtracking inside an engine allows one to implement some neat algorithms in space proportional to your data, without invoking garbage collection.
These days Prolog is general purpose, powerful, pattern driven programming language that (once properly learned!) can put together database, persistence, networking, NLP crunching in one modular program unit. Associating it with expert-system or rule-based programming is a typical AI-winter misconception. Well, a similar one was also floating about deep-learning during the same frosty season :-)