5 ms·
Has anyone had experience with Datalog or Datafun? What was the programming experience like? What did you build with it? Did you find that you were more product
by iamwil 7y ago
Has anyone had experience with Datalog or Datafun? What was the programming experience like? What did you build with it? Did you find that you were more productive or less? What sorts of problems was it a good fit for, and what sorts of things was it a bad fit for?
- whazor 7y agoFor my database course I had to write all queries in: SQL, Relational Algebra, and Datalog. I remember that Datalog was the easiest way of writing queries if you understood all the tricks. However, this was on paper, never executed on real databases.
- alexchamberlain 7y agoI’ve been playing with some ideas of applying Datalog to RDF graphs; there’s a very rough and ready implementation at https://github.com/alexchamberlain/mutant https://github.com/alexchamberlain/mutant. This isn’t a new idea; Apache’s Marmotta is very similar. I think we’ve really missed a trick with declarative programming beyond the database. I find it much easier to think about simple rules, and I think it would be easier to share these rules with less technical business partners too.
- iamwil 7y agoAre people using RDF a lot nowadays? I don't see it often, besides in the Java world. What use case did you want to use datalog for with RDF graphs?
- alexchamberlain 7y agoTo be honest, I'm not 100% sure. The tooling that exists - at least in the open source space - seems to be vastly dominated by Java and academic endeavours. That being said, I think the ideas behind RDF are pretty awesome, and its simplistic structure makes full indexing, datalog inference and layering possible.
- kendallgclark 7y agoStardog is a fast RDF graph database with datalog, description logic, and machine learning reasoners built-in. http://Stardog.com/ http://Stardog.com/
- YeGoblynQueenne 7y agoMy research group (I'm a PhD student) is working on algorithms that learn logic programs from examples and background knowledge (also given as logic programs). The programs our algorithms learn are first order definite datalog programs, which means they are sets of first order Horn clauses without negation as failure and without any functions of arity more than 1 as arguments of literals or terms. The reason for the restriction is completeness and efficiency. Definite datalog programs are guaranteed to terminate (given a finite predicate and constant signature), so the search for a hypothesis (the learned program) cannot "go infinite" even when the target theory (what you are trying to learn) is recursive, even when it has mutually recursive clauses. As a result our algorithms can learn recursive programs (which, is rather important). The space of hypotheses doubles in size when negation as failure is allowed, which improves the efficiency of the search for hypotheses. The problem of course is that some programs cannot be expressed in definite datalog than can be expressed in Prolog with negation as failure and arbitrary functions as arguments. So that's a bit of a limitation. For instance, one has to jump through hoops to learn programs with "exceptions" (A if B except if C), say like a program calculating leap years (which have exceptions for years divisible by 100 and 400) or fizzbuzz. This is not directly programming with datalog- it's machine learning of datalog programs from data. But I think it's similar to the experience you're asking for. My group's algorithms: Metagol (a meta-interpretive learner for definite datalog programs): https://github.com/metagol/metagol https://github.com/metagol/metagol Louise (a polynomial-time version of Metagol): https://github.com/stassa/louise https://github.com/stassa/louise
- iamwil 7y agoSo you're building a program that can learn to write datalog programs. Is it because datalog programs are tedious enough they should be automateable? Why this particular research direction? > The space of hypotheses doubles in size when negation as failure is allowed, which improves the efficiency of the search for hypotheses. That line confused me. Shouldn't a double in the search space decrease the efficiency of the search for the hypothesis?
- srean 7y agoWhole lot easier to understand, compose and guide than DNNs. Thats a reason enough.