Modify loop

From RIF
Revision as of 01:28, 24 October 2009 by StellaMitchell (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search




Test TypePositiveEntailmentTest
ContributorGary Hallmark
StatusApproved
Record13 Oct 2009 telecon
DialectPRD
PurposeModify Action of RIF PRD
DescriptionDemonstrates the modify action in RIF PRD. The rule decrements a frame slot until it reaches 0.
SeeAlsoModify noloop
SpecRefhttp://www.w3.org/2005/rules/wiki/PRD
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 ?C ( If And( ?X[ex:count -> ?C] pred:numeric-greater-than(?C 0) ) Then Do ( Modify (?X[ex:count-> func:numeric-subtract(?C 1)]) ) ) ex:foo[ex:count -> 10] ) )
XMLview RIF/XML
Conclusion
Presentation Syntaxex:foo[ex:count-> 0]
XMLview RIF/XML