Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any Rules Engine/Inference Engine for Go

Tags:

go

rule-engine

We want to implement our business logic using Go, but we cannot find any good implementation of rules engine/inference engine for Go. Does anyone have any experience or suggestions?

like image 960
rui Avatar asked Mar 27 '13 19:03

rui


2 Answers

There is a project that aims to implement an ISO Prolog compiler in Go:

  • GoLog.

I haven't tested it, but given that it implements some basic Prolog, that should be quite a capable rule-based reasoning engine, AFAIS.

Otherwise, a search for "rule" over at godoc.org also yields a bunch of packages:

  • godoc.org/?q=rule
like image 200
Samuel Lampa Avatar answered Sep 28 '22 05:09

Samuel Lampa


The best example of something like this to my knowledge is the 'table-driven' approach to unit tests taken in much of the standard library. For example, the fmttests.

Beyond that, Go is a powerful, expressive language. What do you actually need? There are a number of examples of state machine implementations in Go, and a number of web frameworks with declarative JSON configuration.

If you mean proper logic programming, there's no popular Go library for it yet.

like image 41
Cera Avatar answered Sep 28 '22 07:09

Cera