Presentation is loading. Please wait.

Presentation is loading. Please wait.

Copyright © 2002 Cycorp The Basics Arity Argument Types Second-Order Predicates More on Functions Predicates and Denotational Functions.

Similar presentations


Presentation on theme: "Copyright © 2002 Cycorp The Basics Arity Argument Types Second-Order Predicates More on Functions Predicates and Denotational Functions."— Presentation transcript:

1 Copyright © 2002 Cycorp The Basics Arity Argument Types Second-Order Predicates More on Functions Predicates and Denotational Functions

2 Copyright © 2002 Cycorp Second-Order Predicates Sometimes we want to make statements about predicates themselves. This requires “second-order” predicates, which can take predicates as arguments. Examples : #$arg1Isa, #$arity, #$isa Thus in (#$arity #$mother 2), #$arity takes the predicate #$mother as its first argument. Some second-order predicates are used to relate CycL predicates to one another within a predicate hierarchy...

3 Copyright © 2002 Cycorp #$genlPreds (#$isa #$genlPreds #$BinaryPredicate) (#$arg1Isa #$genlPreds #$Predicate) (#$arg2Isa #$genlPreds #$Predicate) (#$genlPreds ?NARROW-PRED ?WIDE-PRED) means that ?NARROW-PRED is a restricted version of ?WIDE-PRED Any arguments of which ?NARROW-PRED is true are also ones of which ?WIDE-PRED is true. Predicates related by #$genlPreds can be any arity, as long as they both have the same arity.

4 Copyright © 2002 Cycorp #$genlPreds #$genlPreds (continued) (#$genlPreds #$biologicalMother #$biologicalParents ) is (#$implies (#$biologicalMother ?X ?Y) (#$biologicalParents ?X ?Y)) (#$genlPreds #$createdBy #$startsAfterStartingOf) is (#$implies (#$createdBy ?X ?Y) (#$startsAfterStartingOf ?X ?Y))

5 Copyright © 2002 Cycorp #$genlInverse (#$genlInverse ?NARROW-PRED ?WIDE-PRED-INV) means that ?NARROW-PRED is a restricted version of ?WIDE-PRED-INV, with argument order reversed.

6 Copyright © 2002 Cycorp #$genlInverse (#$genlInverse ?NARROW-PRED ?WIDE-PRED-INV) means that ?NARROW-PRED is a restricted version of ?WIDE-PRED-INV, with argument order reversed. How would this be expressed in a rule ?

7 Copyright © 2002 Cycorp #$genlInverse (#$genlInverse ?NARROW-PRED ?WIDE-PRED-INV) means that ?NARROW-PRED is a restricted version of ?WIDE-PRED-INV, with argument order reversed. How would this be expressed in a rule ? (#$implies (?NARROW-PRED ?ARG1 ?ARG2) (?WIDE-PRED-INV ?ARG2 ?ARG1)) ?NARROW-PRED and ?WIDE-INV-PRED must be binary predicates. Example : (#$genlInverse #$customers #$suppliers)

8 Copyright © 2002 Cycorp #$negationPreds (#$negationPreds ?PRED ?NEG-PRED ) means that if (?PRED ?ARG1 … ?ARGN) then not (?NEG-PRED ?ARG1 … ?ARGN) ?PRED and ?NEG-PRED can be of any arity, as long as they both have the same arity. Example : (#$negationPreds #$owns #$rents)

9 Copyright © 2002 Cycorp #$negationInverse (#$negationInverse ?PRED ?NEG-PRED-INV) means that if (?PRED ?ARG1 ?ARG2) then not (?NEG-PRED-INV ?ARG2 ?ARG1) ?PRED and ?NEG-PRED-INV must be binary predicates. Example: (#$negationInverse #$subordinates #$subordinates)

10 Copyright © 2002 Cycorp Summary Second-Order predicates can be used to express relations between predicates The four predicates discussed were: –#$genlPreds –#$genlInverse –#$negationPreds –#$negationInverse


Download ppt "Copyright © 2002 Cycorp The Basics Arity Argument Types Second-Order Predicates More on Functions Predicates and Denotational Functions."

Similar presentations


Ads by Google