What is Vadalog?
The Vadalog language, or simply Vadalog, is the language used to write logic programs in Vadalog-based reasoners.
The Vadalog language is an extension of Warded Datalog±, part of the Datalog± (Datalog with existential quantification) family. Warded Datalog±, in particular, admits existential quantification while restricting the rules to ensure wardedness, i.e., "taming the propagation of nulls during the construction of the answer in the chase procedure".
Vadalog extends Warded Datalog± with features for the practical use, from the annotations to read data from external data sources, to aggregates, to the core libraries allowing the handling of regular expressions and the manipulation of collections, among others.
The aim of this handbook is to illustrate how the Vadalog language works, document the features it includes, and show practical examples of how to write Vadalog programs.
This handbook includes:
-
the basic syntax of Vadalog: what are rules, facts, and programs
-
the data types supported by Vadalog, with an overview of constants, variables and marked nulls
-
expressions and operators in Vadalog, to be able to write conditions, assignments, negation in rules, as well as other types of expressions (Skolem functions, EGDs, etc.)
-
how to operate over multiple facts with aggregations
-
special facts called annotations to inject specific behaviors in Vadalog, for example binding and mapping the data from a data source, or importing a library, as well how to post-process the output of the reasoning tasks
-
a comprehensive guide with examples of the core libraries included in Vadalog, for math operations, URL processing, trend analysis and more.