Equality

From RIF

Jump to: navigation, search




Test TypePositiveEntailmentTest
ContributorAdrian Paschke
StatusInDevelopment
Record
DialectBLD
Purpose
DescriptionFactorial function using equality to assign computed values to variables. This test case also demonstrates recursion and the use of mathematical built-in function such as >, -, +.
SeeAlso
SpecRef
Premises
Presentation Syntaxfactorial(?N ?F) :-    ?N>0    ?N1 = ?N-1    factorial(?N1 ?F1)    ?F = ?N * ?F1. factorial(0 1).
XMLview XML
Conclusion
Presentation Syntaxfactorial(6 120)
XMLview XML