Warning:
This wiki has been archived and is now read-only.

Chaining strategy numeric-add 2

From RIF
Jump to: navigation, search




Test TypePositiveEntailmentTest
ContributorAxel Polleres
StatusApproved
RecordF2F11
DialectBLD
PurposeThis test highlights the different behavior of forward-chaining vs. backward-chaining engines
DescriptionThe entailment holds, but some engines may have difficulty finding it and/or may behave badly with it. This particular test case may be hard to handle for forward-chaining engines, depending on their implementation of the func:numeric-add builtin. In a backward-chaining strategy, the entailment should be found. The condition External(pred:numeric-greater-than(?x 0)) guarantees termination on backward-chaining, i.e. the rule only applies to positive numeric arguments.
SeeAlsoChaining_strategy_numeric-add_1

Chaining_strategy_numeric-subtract_1

Chaining_strategy_numeric-subtract_2
SpecRefhttp://www.w3.org/2005/rules/wiki/DTB#func:numeric-add_.28adapted_from_op:numeric-add.29
Premises
Presentation SyntaxDocument( Prefix(ex <http://example.org/example#>) Prefix(func <http://www.w3.org/2007/rif-builtin-function#>) Prefix(pred <http://www.w3.org/2007/rif-builtin-predicate#>) Group ( Forall ?x ( ex:a(?x) :- And ( ex:a(External(func:numeric-add(?x 1))) External(pred:numeric-greater-than(?x 0))) ) ex:a(10) ) )
XMLview RIF/XML
Conclusion
Presentation Syntaxex:a(3)
XMLview RIF/XML