DLGP (for Datalog Plus) is a textual exchange format at once human-friendly, concise and easy to parse. CoGui provides an editor for this language with syntax highlighting and a navigator.

Switch to graphical and DLGP representation with the factory view is a good way to become familiar with the language. See section The factory view .

DLGP files can also be imported. See section Import from Datalog±

Finally, you can also export the whole project. See section Export to Datalog±

The format can be seen as an extension of the commonly used format for plain Datalog. Datalog± may define four kinds of knowledge elements: 

  • Facts
  • Existential rules
  • Negative constraints
  • Conjunctives queries

As usually in Datalog, variables begin with an upper-case letter and constants with a lower-case letter. We distinguish between regular constants(called constants hereafter) and literals, which are values belonging to some datatype. Literals are given as double-quoted strings or numeric values(integers and floats).
The file name has the extension .dlgp or .dlp. Character encoding is assumed to be UTF-8. 
Complete syntax is described in this paper: DLGP: An extended Datalog Syntax for Existential Rules and Datalog±Version 2.0 

Some examples of different elements are available here

Some examples

Datalog± expressions

Cogui conversion

god(zeus), god(apollo).

Every kinds of knowledge elements can be named with simple strings .

god(<Zeus>), god(<Apollo>).

Zeus can not be used as a constant name in DLPG language.


Use + symbol to represent a space in the Datalog constant name.


Is there someone father of Apollo ?


A ternary predicate with a literal value(float).


A ternary predicate with a literal value(string).


A ternary predicate with a literal value(int).


A rule to define a symmetric relation.


A rule to define a transitive relation.


A rule with new variables in conclusion (head of the rule).
Unlike safe clauses in classic Datalog, Datalog± accepts new variables in the rule heads.


A rule with equality as a conclusion. 
Head (conclusion) part of the rule can contains one or more equality relations between frontier concepts. They are represented as coreference links on the cogui model.

Created with the Personal Edition of HelpNDoc: Easy CHM and documentation editor