New features: velocity: booleW.a.n3 and booleW.q.n3: from 2941 seconds to 46 seconds i.e. 63 times faster. Velocity: a factor 10 to 15 by working with tuples instead of triple objects; a factor 3 to 6 with psyco. (http:// The RDFEngine inferencing system ================================== Note: for executing the Tk graphical library is needed. 1) The parser N3Parser The parser can be called from the command line: python N3Parser.py [fileName] e.g. python N3Parser.py authen.axiom.n3 If a filename is given this file is parsed; if not, then the interactive mode is launched. A listing, eventually with error indications will appear in a Tk-window. As output in the main window appears: 1) a listing of the parsed triples 2) the triples by predicate as they were entered in a dictionary. This dictionary is a data structure that is used for inferencing. 3) The dictionary with the prefixes is shown. The parser prepares also all necessary structures for inferencing. This includes transforming local variables to global variables by renaming. The inferencing structures are obtained using the function: getRDFDB(self, fileName, infData) The InfData object contains all necessary data for inferencing. In interactive mode a choice can be made between a list of testcases from the directory testcases. The parser includes the path and list syntaxes e.g. test.n3 and test.n3.sav1 2) The inference system: Proof.py The inference system can be called from the command line: python Proof.py filename1 filename2 ... filenamen The last filename is the query file. e.g python Proof.py authen.axiom.n3 authen.lemma.n3 If no filenames are given the interactive interface is started. A choice from testcases can be done. The output repeats first the parser output; if there are errors a Tk window will appear, otherwise not. Then inferencing can be started (type e.g. ?). The selection of parameters can be e.g.: Continue? (y, n, s, g, o, a or ?) If you answer s, g then no trace information will be given and the inferencing process will continue uninterrupted. For stepping through the process one step at a time anwser: y. The trace information contains: * an overview of the goallist before performing a step * the substitution that is the result of unifying the goal with one alternative * a history of the process i.e. the sequence of deductions * the current goal Also the state of the finite state machine is indicated: e.g. mes ====== main When a solution is found extra info concerning the solution is given. When the process is finished all found solution are repeated together with their proofs. 3) Parameter files: A system with parameter files permits to choose a query from a list of existing queries, to add, modify or delete a query. Use: python ParamFile.py A parameter file can then be selected e.g. authen.par. Remarks: * this system is terribly slow. No effort was done for optimizing the python code; this is my next project. In this sense the system is mostly a demonstration system. Some examples like some gedcom examples will take several minutes to run. For a very fast program see: http://www.agfa.com/w3c/euler/ Overview of the examples with some comment: project.a1.n3 project.qa.n3: an financial application (fake data): I put my personal financial data in this format. I'm am working on this as an example application. authen.axiom.n3 authen.lemma.n3: a very basic and useful example from De Roo. danb.n3 danb-query.n3 gedcom-facts.n3 gedcom-relations.n3 gedcom-query.n3: the gedcom (genealogical) example of De Roo. Some of the queries defined in "gedcom-query.n3" take several minutes to run. gedcom-simple.n3 gedcom-relations.n3 gedcom-qsimple.n3: a simplified version of gedcom lists.n3 lists-query.n3 rdf-facts.n3 rdf-rules.n3 rdf-query.n3 rdfc25May-test.n3 rdfc25May.n3 russell.axiom.n3 russell.lemma.n3: this does not give a solution as it is a paradox subprop.n3 subprop-query.n3 test-test.n3 test.n3: this is mainly a parser test varprop.n3 varprop-query.n3 ziv.n3 ziv-query.n3 vogel.l.n3 vogel.q.n3: a simple test with two rules boole.axiom.n3 boole.lemma.n3: some boolean algebra; use with the parameter "o": single solution; otherwise python blocks. induction.axiom.n3 induction.query.n3: a trial for defining induction Owls.n3 owls.query.n3: an example showing how a practical data storage and query application could be build. ontology.axiom.n3 ontology.query.n3: a typical example that needs the builtin anti-looping system. ontology1.axiom.n3 ontology1.query.n3: as the previous example altT.l.n3 altT.q.n3 notTest.n3 notTest.q.n3 logic.a.n3 logic.q.n3: this gives an error on my system; I kept as an example of the error file. booleW.a.n3 booleW.q.n3: some boolean algebra; works fine but very slow. It is a simulation of an half-adder. The example works with Euler too, and very fast. equal.a.n3 equal.q.n3: a trial of defining equality without builtin. demonstrates the necessity of using a builtin!! * many examples were taken from Jos De Roo: http://www.agfa.com/w3c/euler/ * some builtins are already included e.g. for manipulating strings. Equality is builtin also. (:a = :b.). see the specific RDF* modules e.g. RDFString.py * the output of the parser is basically a list of Triple objects. This makes the inference engine syntax-independent; i.e. other syntaxes can be defined e.g. a prolog-like syntax (see e.g. http://www.agfa.com/w3c/2002/02/thesis/thesis.html ) G.Naudts E-mail: naudts_vannoten@yahoo.com