10.02.2013 Views

A User's Guide to gringo, clasp, clingo, and iclingo

A User's Guide to gringo, clasp, clingo, and iclingo

A User's Guide to gringo, clasp, clingo, and iclingo

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ERROR: unsafe variables in:<br />

File:Line:Column: Rule<br />

File:Line:Column: Var<br />

...<br />

Along with the error message, the Rule <strong>and</strong> the name Var of at least one variable<br />

causing the problem are reported. The first action <strong>to</strong> take usually consists of checking<br />

whether variable Var is actually in the scope of any a<strong>to</strong>m (in the positive body of<br />

rule) that can bind it. 18 If Var is a local variable belonging <strong>to</strong> an a<strong>to</strong>m A on the<br />

left-h<strong>and</strong> side of a condition (cf. Section 3.1.8) or <strong>to</strong> an aggregate (cf. Section 3.1.10),<br />

an a<strong>to</strong>m over some domain predicate might be included in a condition <strong>to</strong> bind Var. In<br />

particular, if A itself is over a domain predicate, the problem is often easily fixed by<br />

writing “A:A.”<br />

The following error is related <strong>to</strong> conditions (cf. Section 3.1.8):<br />

ERROR: unstratified predicate in:<br />

File:Line:Column: Rule<br />

File:Line:Column: Predicate/Arity<br />

The problem is that an a<strong>to</strong>m Predicate(...) such that its predicate<br />

Predicate/Arity is not a domain predicate (cf. Section 3.1.8) is used on the righth<strong>and</strong><br />

side of a condition within Rule. The error is corrected by either removing the<br />

a<strong>to</strong>m or by replacing it with another a<strong>to</strong>m over a domain predicate.<br />

The next errors may occur within an arithmetic evaluation (cf. Section 3.1.4):<br />

ERROR: cannot convert Term <strong>to</strong> integer in:<br />

File:Line:Column: Literal<br />

It means that either a (symbolic) constant or a compound term (over an uninterpreted<br />

function with non-zero arity) has occurred in the scope of some built-in arithmetic<br />

function.<br />

The following error message is issued by (embedded) <strong>clasp</strong>:<br />

ERROR: Read Error: Line 2, Compute Statement expected!<br />

This error means that the input does not comply with lparse’s numerical format [53].<br />

It is not unlikely that the input can be processed by <strong>gringo</strong>, <strong>clingo</strong>, or i<strong>clingo</strong>.<br />

The next error indicates that input in lparse’s numerical format [53] is corrupt:<br />

ERROR: Read Error: Line Line, A<strong>to</strong>m out of bounds<br />

There is no way <strong>to</strong> resolve this problem. If the input has been generated by <strong>gringo</strong>,<br />

<strong>clingo</strong>, or i<strong>clingo</strong>, please report the problem <strong>to</strong> the authors of this guide.<br />

The following error message is issued by (embedded) <strong>clasp</strong>:<br />

ERROR: Read Error: Line Line, Unsupported rule type!<br />

It means that some rule type in lparse’s numerical format [53] is not supported. Most<br />

likely, the program under consideration contains rules with disjunction in the head.<br />

A similar error may occur with <strong>clingo</strong> or i<strong>clingo</strong>:<br />

ERROR: Error: <strong>clasp</strong> cannot h<strong>and</strong>le disjunctive rules, \<br />

use option --shift!<br />

18 Recall from Section 3.1.4 <strong>and</strong> 3.1.5 that a variable in the scope of a built-in arithmetic function may not<br />

be bound by a corresponding a<strong>to</strong>m <strong>and</strong> that built-in comparison predicates do not bind any variable.<br />

48

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!