
| | |
|
|  | |
 |  |  |  | |  | | | | Frequently Asked Questions Submit a New Question - Question: How could I help?
- Answer: If you are using DES for teaching, developing applications, writing a paper or thesis, please drop me a note so that it can be advertised in the DES Facts page. This will help to get funds to further develop this project. You can also contribute with new ideas, as an implementor (and therefore listed as a contributor), and also by donating!
- Question: Is it possible to programmatically access to DES from a C++ or Java program?
- Answer: There is no API for such, but a textual API (TAPI) is provided, which allows to communicate with DES via OS standard streams (cf. User Manual). See also next question for solving this but recurring to the APIs provided by the underlying Prolog systems.
- Question: How a Java program as ACIDE can access the deductive database in a direct way?
- Answer: ACIDE (acide.sourceforge.net) is a GUI we have used to connect to DES and it is written in Java. Communication is via standard input-output, so that there is no need in this case for a more elaborated Java API.
To access DES from Java you have to select one of the supported interpreters (SWI-Prolog, SICStus, GNU or Ciao) which provides Java connections, read the documentation to learn how to access Prolog programs in order to build such a Java connection. Then, in this code you can consult des.pl, which in turn will consult other files (you can take a look at the user manual where the required files are listed for each Prolog system; note that in the systems folder you can find the different files for the different Prolog systems). In order to avoid to enter the input processing loop, simply delete the line ":- initialization((start;true))." in des.pl, section "Auto-start after loading". The predicate useful for processing inputs is process_input/2. Forget the second (output) argument and set the first one with a string with your query. This should be your interface predicate with DES. It will accept any of the allowed inputs (commands, Datalog queries and SQL queries). However, before using it, you have to initialize DES with the predicate init_des/0. Once you have run a query, you can access its results via the predicate et/2. Assuming you have a predicate parent(X,Y), the goal et(parent(X,Y),_) gives you all the facts in the answer, one by one via backtracking. - Question: Datalog Educational System implements the Magic Sets method/delta rules?
- Answer: No. It is based on memoization (tabling) techniques. The User Manual briefly explains this and provides some bibliographic references.
- Question: The command /dbschema issues MySQL ODBC errors in MS Windows. Are there errors, really?
- Answer: Install the latest ODBC connector. It seems to be a bug of the connector. Please recall to, first, delete your connections and, second, uninstall the current connector.
- Question: Why I cannot connect to a Postgre database with SICStus sources?
- Answer: There is limited functionality in this Prolog system which will be overcome in future versions. Try the SWI-Prolog version instead. Update: Current port to SICStus Prolog 4.2.0 solves this problem.
- Question: Can I connect DES to a relational database such as MySQL or Oracle?
- Answer: Yes, it is possible since version 2.0. This provides a means to access a relational database (with tables and views defining relations) and also to submit queries in both Datalog and SQL languages. When a SQL view is involved in query, its processing occurs at the SQL engine instead of the Datalog engine.
- Question: How can I trace a Datalog program using DES?
- Answer: Since version 1.3.0, DES provides declarative degugging capabilities. Also, since version 2.0, DES provides naïve Datalog and SQL tracers. See the User Manual for details.
- Question: After installing the Windows executable version of DES 1.1 for Windows, I get a message “spcon.dll not found”. What is wrong?
- Answer: The DLL library spcon.dll was missed from the first release of DES 1.1. It was fixed on 06/10/2004.
- Question: When I consult the example file family.dl and try to put in a new predicate, i.e. /assert father(‘max josef’, tom), DES breaks down.
- Answer: This comes from using blanks as part of atoms. This was not incorporated in DES 1.1.1 (cf. Syntax section). It is currently suuported since version 1.1.2.
- Question: I use SICStus Prolog 4.0.1 and when I consult des.pl to start des, an exception regarding the non existence of the predicate working_directory is issued. What is going wrong?
- Answer: Up to DES 1.8.1, there exist only ports to older versions of SICStus Prolog, namely 3.x. Since DES 2.0, a port to 4.x replaces the old port.
|
|