Logica
Logica is an open-source, declarative logic programming language based on Datalog which is designed for data manipulation and analysis. Logica is held out to be "modern logic programming".
Logica was developed at Google as a successor to Yedalog. Yedalog, also based on Datalog, aims to address perceived usability limitations of SQL. So, Logica and Yedalog both belong to the Datalog "family".
Logic programming is a declarative programming paradigm based on formal logic where the program is written as a set of logical statements. Logic programming was developed in the 1960s. Prolog and Datalog are the most prominent examples of logic programming languages. LISP is another approach to logic programming. Answer Set Programming (ASP) is another approach to logic programming.
Datalog is the logic used by relational databases. Datalog is a subset of first order logic that can safely be processed by computer based processes because it avoids logical paradoxes which can cause catastrophic system failures. That is one of the reasons why relational databases are so reliable.
Datalog and relational databases are based on the same ideas, which is to think of data as relations and data manipulation (i.e. processing that data) as a set of steps which perform operations over these relations.
Datalog and SQL differ in how these operations are described but their processing gives you the same result. But Datalog was inspired by the mathematical syntax of the first order propositional logic whereas SQL follows more of a natural language looking syntax.
While the intent of SQL, which is an ISO standard, was to give people without formal training in computer programming or mathematics the capability to access database information; the reality is that expressing complex logic in SQL is nontrivial.
Older Yedalog and now Logica are an attempt to make access to data easer using an elegant syntax of Logic Programming to solve practical problems and leverage the tremendous advances of SQL infrastructure for the execution of that logic.
- semantic clarity of logic programming
- performance and scalability of mature SQL engines
- modularity and reusability of declarative rules
Additional Information:
Comments
Post a Comment