This is an implementation of Finite State Machines in Clojure using core.logic. They are a good starting point for computational linguistics and illustrate several features of core.logic, such as various ways of defining new relations, pattern matching and also the invertibility of relations.
It is not an introduction to core.logic. To learn the basics, I would recommend the Logic Starter.
Awesome! Reading about logic programming is always enlightening - thanks for this.
ReplyDeleteOne teeny weeny bug: in the formal comment of the state machine you define the first transition fn as `delta(ok, a) = a;` when it probably should be `delta(ok, a) = ok;`
Good spot, fixed. Glad to hear somebody actually reading the Maths :).
ReplyDelete