Diagnostic codes

⚠️ Unused atom (1000)

Warning.

Unused atom '{atom}'.

Description

This atom is created but not used in any rule or query. Consider removing it if it’s not needed.

Unexpected token (1001)

Error.

Unexpected symbol '{token}'.

Description

This symbol is not expected in this context. Check the syntax of the rule or query.

Unexpected end of file (1002)

Error.

Unexpected end of file.

Description

The parser reached the end of the file while expecting more input. Check for missing symbols or incomplete rules.

Unexpected token (1003)

Error.

Unexpected symbol.

Description

This symbol is not expected in this context. Check the syntax of the rule or query.

Parsing error (1004)

Error.

Parsing error: '{token}' expected.

Description

The parser expected a different symbol or token. Check the syntax of the rule or query.

Unrecognized token (1005)

Error.

Unexpected symbol.

Description

This symbol is not recognized by the parser. Check for typos or unsupported syntax.

Unrecognized token (1006)

Error.

Unexpected symbol.

Description

This symbol is not recognized by the parser. Check for typos or unsupported syntax.

Missing token at end of file (1007)

Error.

Missing '{missing}' at the end of file.

Description

The parser expected a specific symbol at the end of the file. Check for missing symbols or incomplete rules.

Missing token (1008)

Error.

Missing '{expectedToken}' before '{currentToken}'.

Description

The parser expected a specific symbol before the current position. Check for missing symbols or incomplete rules.

Extraneous input (1009)

Error.

Unexpected symbol '{extraneous}' (expecting '{expecting}').

Description

The parser encountered an unexpected symbol while expecting another one. Check for typos or unsupported syntax.

Unknown parsing error (1010)

Error.

Unknown parsing error: {message}.

Description

An unknown error occurred during parsing. This may be due to a bug in the parser or an unsupported syntax.

Undeclared atom (1011)

Error.

Undeclared atom: {atom}.

Description

This atom is used in a rule or query but has not been declared. Declare the atom to use it, either as a fact (a rule with no head and only constants, like person("First Name", "Last Name", 37).) or by importing it with @input.

⚠️ Input atom in head (1012)

Warning.

Atom '{atom}' is used in rule head and as an input. Do you want to create a new atom instead?

Description

This atom is used in the head of a rule and as an input. This may cause confusion or unintended behavior. Consider creating a new atom instead.

Duplicate output atom (1014)

Error.

Duplicate @output for atom '{atom}'.

Description

This atom is already declared as an output. You cannot declare it again. Remove the duplicate declaration.

Non-existing output atom (1015)

Error.

Atom '{atom}' has not been declared but is being used as an output.

Description

This atom is used as an output but has not been declared as such. Check the spelling of atom name or declare it the head of a rule to output it.

Unwarded variable (1016)

Error.

Variable '{variable}' is dangerous and involved in a join; the program is not Warded Datalog±.

Description

This error occurs because the Vadalog program violates the wardedness property, which is a key safety condition in Warded Datalog±.

⚠️ No bindings for input (1017)

Warning.

Input '{atom}' has no bindings. Add @bind and @mapping rules.

Description

This @input atom has no bindings. You need to add @bind and @mapping rules to bind the input atom to a data source. To fix it, add a @bind rule to bind the input atom to a data source, and a @mapping rule to map the columns of the data source to the terms of the input atom. Example: @input("atom"). @bind("atomName", "data source", "outermost container", "innermost container"). @mapping("atomName", column1positionInAtom, "column1Name", "column1Type"). @mapping("atomName", column2positionInAtom, "column2Name", "column2Type").

💡 No bindings for output (1018)

Hint.

Output '{atom}' has no bindings, output will be sent with the response.

Description

This @output atom has no bindings. The output will be sent with the response, but you may want to add bindings to control the output.

Variable is EGD harmful (1019)

Error.

Variable '{variable}' is in a tainted position and used in join or filter operation. The program does not satisfy the EGDs harmless sufficient condition.

Description

This error arises because the program violates the safe taintedness condition for Equality-Generating Dependencies (EGDs).

💡 EGD hint (1020)

Hint.

Equality-generating dependency: existential variables are made equal in the reasoning process.

Description

This hint indicates that the head of the rule contains an equality-generating dependency (EGD) that can lead to existential variables being made equal during reasoning.

Empty definition (1021)

Error.

Definition can’t be empty.

Description

The annotation requires at least one term.

Example

% Here the definition is empty
@input().

Fix

@input("atom").

Undeclared variable (1022)

Error.

Variable '{variable}' is not bound. Bind it either in a positive atom or in an assignment.

Description

Variables used in conditions must be bound in a positive atom or in an assignment.

Invalid negation (1023)

Error.

Variable '{variable}' does not occur in a non-negated body atom. Every variable that occurs in the head and in a body negation must have a binding in a non-negated atom.

Description

If a variable occurs in the head of a rule and is also used in a negated body atom, it must have a binding in a non-negated body atom. For example, if 'X' is in the head and 'not p(X)' is in the body, there must be another atom like 'p(X)' in the body.

Example

% Here X is not bound in a non-negated body atom
a(X) :- not b(X).

Fix

a(X) :- c(X), not b(X).

Annotation parameters (1024)

Error.

Expected {expected} arguments, but got {received}.

Description

The number of arguments in the annotation must match the expected number. For example, if the annotation is '@mapping', it should have the correct number of arguments as defined in the specification.

Example

% @mapping requires 4 terms
@mapping("atom", 0, "id").

Fix

@mapping("atom", 0, "id", "int").

⚠️ Anonymous variable (1025)

Warning.

Variable {variable} is not used in the head. You should make it anonymous (replacing it with an _).

Description

In Vadalog, if a variable is not used in the head of a rule, it should be replaced with an underscore ('') to indicate that it is anonymous. For example, instead of using 'X' in the head, use '' if 'X' is not used.

Atom signature terms (1026)

Error.

Expected {expected} terms, but got {received}.

Description

The number of terms in the atom’s signature must match the number of terms in the atom. For example, if the atom is 'p(X,Y)', then the signature must have 2 terms, not 3. If the missing variable need not to be brought to the head, you can use the anonymous variable _ to mark them.

Mapping position must be an index (1027)

Error.

Mapping position must be an index (0-based) (instead it’s '{position}').

Description

The mapping position must be an index (0-based) that indicates the position of the term in the atom’s signature. For example, if the atom is 'p(X,Y)', then the mapping position can be 0 or 1, but not 2.

Example

% Here position is "pos"
@mapping("atom", "pos", "id", "int").

Fix

@mapping("atom", 0, "id", "int").

Non-Afrati linear join (1028)

Error.

Rule is not AfratiLienar: predicate '{atom}' is intensional and appears in the body of a rule with another intensional predicate.

Description

Non-Afrati linear join. A linear program is a Datalog program such that every clause in the program has at most one intensional atom in its body.

Existential variable in Datalog (1029)

Error.

Existential variable '{variable}' is used in a Datalog rule. This is not allowed.

Description

In Datalog, existential variables are not allowed. They can only be used in Vadalog rules. If you need to use an existential variable, consider using other fragments instead.

Atom not in guarded rule (1030)

Error.

Rule is not Guarded, as there is no atom in the body including all universally quantified variables.

Description

The atom is not in a Guarded rule, which is a rule that has a guard. A guard is an atom that contains all the universally quantified variables of the rule.

Atom not in frontier guarded rule (1031)

Error.

Rule is not Frontier Guarded, as there is no atom in the body including all universally quantified variables of the head.

Description

The atom is not in a Frontier Guarded rule, which is a rule that has a frontier guard. A frontier guard is an atom that contains all the universally quantified variables of the rule head.

Non-linear rule (1032)

Error.

Rule is not linear, since there are multiple atoms in the body.

Description

The rule contains more than one atom in the body, which is not allowed in linear Datalog programs.

Rule is not Weakly Guarded (1033)

Error.

Rule is not Weakly Guarded, as there is no atom in the body including all dangerous variables.

Description

Rule is not Weakly Guarded but because it misses a weak guard atom. A weak guard is an atom that contains all the dangerous universally quantified variables.

Rule is not Weakly Frontier Guarded (1034)

Error.

Rule is not Weakly Frontier Guarded, as there is no atom in the body including all dangerous variables in the head.

Description

Rule is not Weakly Frontier Guarded but because it misses a weak guard atom. A weak guard is an atom that contains all the dangerous universally quantified variables.

Variable violating SHY S1 condition (1035)

Error.

Rule is not Shy: Variable '{variable}' occurs in more than one body atom and is not protected in the body of the rule.

Variable violating SHY S2 condition (1036)

Error.

Rule is not Shy: Two distinct ∀-variables, that are not protected in the body of the rule and occur both in head and in two different body atoms, are attacked by the same invading variable.

Constant used in tainted position (1037)

Error.

No constants are allowed in tainted positions to guarantee Safe taintedness condition.

Multiple bindings per atom (1038)

Error.

Multiple bindings per atom are not allowed.

Description

In Vadalog, each atom can have at most one binding. Remove one.

No extensional atom as output (1039)

Error.

Extensional atoms cannot be used as outputs.

Description

In Vadalog, extensional atoms cannot be used as outputs. If you want to output extensional data, create a copy rule that transforms the extensional atom into an intensional one.

Binding on unknown atom (1040)

Error.

Bindings must be specified for either @input or @output atoms. Check if you mispelled the atom name, or add the missing @input or @output annotation.

No variables in fact (1041)

Error.

Variables are not allowed in facts.

Description

In Vadalog, facts cannot contain variables. Replace variables with constants.