Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection to datalog? #15

Open
copumpkin opened this issue Jul 9, 2018 · 1 comment
Open

Connection to datalog? #15

copumpkin opened this issue Jul 9, 2018 · 1 comment
Labels

Comments

@copumpkin
Copy link
Contributor

With MonoSAT's graph operations, it feels vaguely like there might be a somewhat mechanical transformation from datalog to GNF and MonoSAT, but I haven't fleshed that out. Have you given it much thought, or is there any related work you know of in that space?

@sambayless
Copy link
Owner

I haven't thought too deeply about the Datalog/MonoSAT connection before; but it could be promising.
Maybe something like: rules in data log become edges in a graph, facts are modeled as nodes (perhaps with a node 'true' always present), and we consider facts to be derivable if they are reachable from the true node. Each edge would have constraints on it ensuring that it can only be true if the body of one of its rules holds. Queries would be reachability predicates.

Is that similar to what you had in mind? It might be worth trying.

One thing to keep in mind:
MonoSAT scales well for graphs with as many as a few million nodes, depending on how complex the constraints are. But it isn't going to handle billions of nodes. So you would only be able to apply this to problem domains where the total space of possibly-derivable-facts (each of which will become a node) is not too large.

The closest thing I'm aware of in that area would be Answer Set Programming, which is a logic programming language with constraints. High-performance ASP solvers typically use a modified SAT solver on the backend. I'm not sure how closely the semantics of datalog and ASP line up (ASP is based around a notion of 'stable models' that I think differs from datalog), but that might be another direction to explore if you wanted a SAT backend for datalog constraints. This paper discusses the semantics of datalog and ASP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants