Files changed (4)
-[Remark: autoconf and automake greatly help in the installation process. I recommend you use them for your own development.]
The purpose of the project is to develop a Command Line Interpreter for Datalog queries. It aims at converting Datalog queries into SQL statements. Then, a backend Relational Database is in charge of evaluating the query.
+So far, YADI is able to solve recursive Datalog programs with negation. Nevertheless, recursive programs must satisfy the following five conditions for being accepted and solved by YADI:
+1.- No two predicates are mutually recursive; the only allowed form of recursion is self-recursion.
+4.- If the predicate is defined by several rules (union of rules), then only one of the definitions can have a recursive call.
+Because of this rules, the language accepted by YADI is more powerful than semipositive-datalog but less powerful than stratified-datalog.
-It is madatory to connect a PostgreSQL server, with a role, a database and at least one populated table to formulate queries against that table.
+Here the resulting set will consist of 'x,y' tuples and the sum of 'z' variables of these tuples. Aggregation comparison is also accepted by YADI, for example:
-be careful with the file owner permissions, you might need to give "postgres" user read/write permissions
+For running YADI it is necessary to have access to a PostgreSQL database. As it can be seen below, when starting the program it will be necessary to indicate a username, database name, host, port and password. Obviously the provided user will need to have write/read permission on the provided database.
+Observe that the flag "-db" will make YADI print debugging information, such as the stratification of programs, generated SQL, database schema, etc.
+The directory 'test' contains several test cases. Specifically, the directory 'test/sql' contains several sample databases. A script for setting automatically the testdb has been included, it can be invoked by running "make testdb". However the file 'test/database.conf' must be defined with the connection information, this file must have the following format:
+Furthermore, the directory 'test/integration' contains several test cases. A script for automatically running the tests was also included, running 'make tests' will invoke it.
- if Hashtbl.find preds (get_rule_predname a) < Hashtbl.find preds (get_rule_predname b) then -1 else 1 in