Skip to content

Rulewerk v0.6.0

Compare
Choose a tag to compare
@irina-dragoste irina-dragoste released this 21 May 23:20
· 424 commits to master since this release

The sixth release of the Java rule reasoning library Rulewerk, formally known as VLog4j.

Breaking changes:

  • VLog4j is now called Rulewerk. Consequently, the groupId, artifact Ids, and package names
    of the project have changed.
  • In the examples package, ExamplesUtils.getQueryAnswerCount(queryString, reasoner) does no
    longer exist. It can be replaced by
    reasoner.countQueryAnswers(RuleParser.parsePositiveLiteral(queryString)).getCount()
  • The FileDataSource constructor and those of child classes (CsvFileDataSource, RdfFileDataSource)
    now take the String path to a file instead of File object.
  • The VLog backend has been moved to a new rulewerk-vlog module,
    changing several import paths. Reasoner.getInstance() is
    gone. Furthermore, InMemoryDataSource has become an abstract class,
    use VLogInMemoryDataSource where applicable.

New features:

  • Counting query answers is more efficient now, using Reasoner.countQueryAnswers()
  • All inferred facts can be serialized to a file using Reasoner.writeInferences()
  • All inferred facts can be obtained as a Stream using Reasoner.getInferences()
  • Reasoner.getCorrectness() returns the correctness result of the last reasoning task.
  • Knowledge bases can be serialized to a file using KnowlegdeBase.writeKnowledgeBase()
  • Rules files may import other rules files using @import and
    @import-relative, where the latter resolves relative IRIs using
    the current base IRI, unless the imported file explicitly specifies
    a different one.
  • Named nulls of the form _:name are now allowed during parsing (but
    may not occur in rule bodies). They are renamed to assure that they
    are distinct on a per-file level.
  • The parser allows custom directives to be implemented, and a certain
    set of delimiters allows for custom literal expressions.

Other improvements:

  • Prefix declarations are now kept as part of the Knowledge Base and
    are used to abbreviate names when exporting inferences.

Bugfixes:

  • Several reasoning errors in VLog (backend) have been discovered and fixed in the version used now

The attached standalone-rulewerk-client-0.6.0.jar can be directly used to run Rulewerk from the command line: https://github.com/knowsys/rulewerk/wiki/Standalone-client.

Rulewerk 0.6.0 is not fully backwards compatible with (VLog4j) v0.5.0 due to API changes. However, existing code should not be hard to update. See the release notes for details.

The release uses vlog-java-1.3.3, which is the Maven artefact for the VLog rule engine. It packages system-dependent binaries for Linux, MacOS, and Windows, and should work out of the box with current versions of these systems. In case of problems, own binaries can be compiled as described in the README.

This release includes the following modules, which are available in Maven Central in group org.semanticweb.rulewerk:

  • rulewerk-core: essential data models for rules and facts, and essential reasoner functionality
  • rulewerk-parser: support for processing knowledge bases in VLog4j syntax
  • rulewerk-rdf: support for reading from RDF files in Java (not required for loading RDF directly during reasoning)
  • rulewerk-graal: support for translating objects from the Graal rule library to VLog4j
  • rulewerk-owlapi: support for converting rules from OWL ontology, loaded with the OWL API
  • rulewerk-client: stand-alone application that builds a command-line client for VLog4j.
  • rulewerk-vlog: support for using VLog as a reasoning backend for Rulewerk.

A Rulewerk Wiki is available online, with detailed information about our tool, the supported rule language examples and grammar, and related publications.

It is strongly encouraged to use Maven to include Rulewerk in your projects, as illustrated in the Rulewerk example project. We do not provide own jar files, but you can download jars manually from Maven Central if desired.