README for TRIPLE Release 20020314 ---------------------------------- OVERVIEW TRIPLE is an RDF query, inference, and transformation language for the Semantic Web. Instead of having a built-in semantics for RDF Schema (as many other RDF query languages have), TRIPLE allows the semantics of languages on top of RDF (like RDF Schema, Topic Maps, UML, etc.) to be defined with rules. For languages where this is not easily possible (e.g., DAML+OIL), access to external programs (like description logics classifiers) is provided. As a result, TRIPLE allows RDF reasoning and transformation under several different semantics, which is necessary if you need to access multiple data source in one application (e.g., for data integration). See the paper in triple/doc for a description of syntax and semantics. The TRIPLE system contains a DAML+OIL tool that can be used to analyze, classify (with an external DL classifier like RACER and FaCT), and visualize DAML+OIL ontologies. This tool is used for accessing RACER from TRIPLE for classification of DAML+OIL ontologies (see section "DAML+OIL Examples Using RACER as DL Classifier"). INSTALLATION The following are the installation instructions for both Windows and Unix machines: 1. unpack triple- archive 2. download and install Java on your machine (code was tested with JDK 1.3.X): http://java.sun.com/j2se/1.3/ ; add Java executable to your PATH (if not automatically done by installation) [Note: if you want to use JDK 1.4.X, you have to prepend xerces.jar to your boot classpath with -Xbootclasspath/p:xerces.jar; see 5.] 3. [optional] recompile TRIPLE source code with Ant (http://jakarta.apache.org/ant/). This should only be required if you have changed some TRIPLE source files! 4. download and install foreign software components: - XSB 2.5 (tabled PROLOG) (not needed if you only want to use the DAML+OIL standalone tool): http://xsb.sourceforge.net/ - [optional] RACER description logic classifier, version 1.6.2 or higher (1.6.1 will not work!): needed for DAML+OIL classification with 'daml -racer' (esp. for TRIPLE's EXTERNAL statement) http://kogs-www.informatik.uni-hamburg.de/~race/ - [optional] AT&T GraphViz needed to process output of 'daml -dot -racer' to visualize ontologies after classification (generates ps, gif, and many other formats) http://www.research.att.com/sw/tools/graphviz/ - [optional] CORBA-FaCT description logic classifier: can be used to classify DAML+OIL ontologies that were generated with 'daml -xml' (FaCT has not yet been integrated into TRIPLE; you have to use RunClient "Tell|Compile File" with the SHIQ server) http://www.cs.man.ac.uk/~horrocks/FaCT/CORBA-FaCT.html 5. adapt paths in scripts found in triple/bin directory [for JDK 1.4.X, activate -Xbootclasspath/p] NEWS version 20020314: switched to XSB 2.5 and Jena 1.3.2 UML (XMI) example added 'triple -tripledump' added servlet for DAML+OIL added (output is PS and GIF) version 20020307: 'triple -rdfdump' added (allows models to be dumped as RDF files) servlet version added version 20020304: EXTERNAL support (calls external programs for transforming models) DAML+OIL support: can be called with EXTERNAL (making TRIPLE a DAML+OIL query language) standalone version also included support for RACER DL classifier version 20020212: RDF import added COMMAND LINE OPTIONS The general format for calling TRIPLE is: triple[.sh] [-rdfdata ] [-rdfdump ] [-tripledump ] (|-) -rdfdata : load RDF file into specified model -rdfdump : dump specified model as RDF file -tripledump: dump specified model as TRIPLE file - : read from standard input The general format for calling the DAML+OIL standalone tool is: daml[.sh] [-xml|-lisp|-daml|-dot|-triple] [-racer ] (|-) [-ns ] [-o ] -xml : output in XML syntax according to FaCT DTD (default) -lisp : output in LISP syntax (useful for debugging) -daml : output in DAML syntax (only with -racer) -dot : output as GraphViz dot file (only with -racer) -triple : output in internal TRIPLE syntax (only with -racer) -racer : send to racer for classification; returns taxonomy - : read from standard input instead of a file -ns : use this as default namespace -o : write output to file (default: standard output) The options must occur in exactly this order. -daml, -dot, and -triple can only be used with -racer, i.e., the output contains the taxonomy (rdfs:subClassOf and daml:sameClassAs) after classification with RACER. DOCUMENTATION At the moment, no complete language description exists. Please refer to the paper ('TRIPLE---An RDF Query, Inference, and Transformation Language', in the doc directory) and slides on the TRIPLE web page ( http://triple.semanticweb.org/ ) for further information. EXAMPLES Go to examples directory in a Unix/DOS shell. Dublin Core Example: - call UNIX : ../bin/triple.sh dc.triple WINDOWS: ..\bin\triple dc.triple - output should be the answer binding Doc = dfki:doc1, Title = 'FRODO: Milestone 1' RDF Schema Example: - call UNIX : ../bin/triple.sh rdfschema.triple WINDOWS: ..\bin\triple rdfschema.triple - output should be the answer bindings X = xyz:'MotorVehicle', Y = rdfs:'Resource' X = xyz:'PassengerVehicle', Y = rdfs:'Resource' ... X = xyz:'MiniVan', Y = xyz:'PassengerVehicle' Simple DAML+OIL Animals Example (semantics partially defined in TRIPLE) - call UNIX: ../bin/triple.sh -rdfdata animals.rdf \ http://www.example.org/animals# ontology animals-damloil.triple WINDOWS: ..\bin\triple.sh -rdfdata animals.rdf http://www.example.org/animals# ontology animals-damloil.triple - output should be C = 'http://www.example.org/animals#':'Omnivore' C = 'http://www.daml.org/#':'Nothing' DAML+OIL Examples Using RACER as DL Classifier - go to examples/daml directory - adapt paths in daml_oil[.bat] shell script/batch file 1. TRIPLE DAML+OIL example: - call ../../bin/triple.sh animals.triple - output for the query (FORALL C <- C[daml:sameClassAs -> daml:Nothing]@animals:ontology3.) should be: C = 'http://www.example.org/animals#':'Omnivore' C = 'http://www.daml.org/2001/03/daml+oil#':'Nothing' (this means that Omnivore was detected to be unsatisfiable by RACER) - call ../../bin/triple.sh -rdfdump dump.rdf \ http://www.example.org/animals# ontology1 animals.triple additionally, dumps complete ontology into file "dump.rdf" 2. DAML+OIL standalone example: [Note: please don't import the daml+oil ontology and don't use samePropertyAs (this is not yet supported by RACER).] - call ../../bin/daml.sh -lisp daml+oil-ex.daml output: ontology represented in SHIQ (LISP syntax) - call ../../bin/daml.sh -xml daml+oil-ex.daml output: ontology represented in SHIQ (XML syntax, as accepted by FaCT and RACER) - classification with RACER, output in DAML syntax: call ../../bin/daml.sh -daml -racer \ daml+oil-ex.daml - classification with RACER + visualization with GraphViz: [daml+oil-ex.gif and daml+oil-ex.ps are sample graphs] + call ../../bin/daml.sh -dot -racer \ daml+oil-ex.daml -o ontology.dot + call dot -Tgif ontology.dot -o ontology.gif or dot -Tps ontology.dot -o ontology.ps (assuming dot (from the GraphViz package) is on your classpath) + enjoy the generated gif or ps file :-) UML (XMI) Example see examples/uml/README.txt LICENSE TRIPLE is distributed under the terms of the "SFO License"; see file LICENSE.txt. Additional licenses apply for included libraries: - Apache Xerces: (c) 1999 The Apache Software Foundation http://xml.apache.org/xerces-j/index.html - Jena RDF parser: (c) Copyright Hewlett-Packard Company 2001 http://www.hpl.hp.com/semweb/jena-top.html BUGS In this release, not all parts of the TRIPLE language are fully implemented (esp.: reified triples, anonymous resources, path expressions, model expressions). TO DO for TRIPLE: - implement missing language features - finish pure Java inference engine - reactivate RDF syntax - clean up source code :-) for DAML+OIL part: - implement EXTERNAL such that parameterized modules are supported - improve handling of oneOf/hasValue - handle data types and instances (if possible) - integrate FaCT in addition to RACER (with common XML interface); are there other DL engines that could/should be integrated? - add LaTeX output (?); other syntaxes? CONTACT TRIPLE web page: http://triple.semanticweb.org/ Michael Sintek: sintek@db.stanford.edu Stefan Decker : stefan@db.stanford.edu