1 / 18

Predicates and Denotational Functions

Predicates and Denotational Functions. The Basics Arity Argument Types Second-Order Predicates More on Functions. Function Result Types. Know what type of thing a given function returns for any appropriate argument #$MotherFn always returns some female animal

barto
Download Presentation

Predicates and Denotational Functions

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Predicates and Denotational Functions • The Basics • Arity • Argument Types • Second-Order Predicates • More on Functions

  2. Function Result Types • Know what type of thing a given function returns for any appropriate argument • #$MotherFn always returns some female animal • #$TransportViaFnalways returns some collection of transportation events • In CycL it’s easy to specify function result types ...

  3. Function Result Types • Specified in two primary ways • #$resultIsa : states what type of thingthe result is an instance of • #$resultGenl: states what type of thing the result is a specialization of

  4. Function Result Types: #$resultIsa Example 1 (#$resultIsa #$GovernmentFn #$RegionalGovernment) Thus , (#$isa (#$GovernmentFn #$Sweden) #$RegionalGovernment) and (#$isa (#$GovernmentFn #$CityofAustinTX) #$RegionalGovernment)

  5. Function Result Types: #$resultIsa and #$resultGenl Example 2 • (#$resultIsa #$TransportViaFn #$Collection) and • (#$resultGenl #$TransportViaFn #$TransportationEvent) • Thus , (#$TransportViaFn #$Automobile) is an instance of #$Collection and a specialization of #$TransportationEvent

  6. Transitivity of #$genls • Given the transitivity of#$genls and the “transfer of#$isathrough #$genls” result types are powerful. • Example (using transitivity of #$genls) : • (#$resultGenl #$TransportViaFn #$TransportionEvent) and • (#$genls #$TransportationEvent #$Event) Thus , • (#$genls (#$TransportViaFn #$Automobile) #$Event)

  7. Transitivity of #$genls Example • Example (using “transfer of #$isa through #$genls”) : • (#$resultIsa #$GovernmentFn #$RegionalGovernment)and • (#$genls #$RegionalGovernment #$Organization) • Thus , (#$isa (#$GovernmentFn #$Sweden) #$Organization)

  8. Examples of Function Use: #$BodyPartFn Given this information : (#$isa #$BodyPartFn #$BinaryFunction) (#$arg1Isa #$BodyPartFn #$Animal) (#$arg2Isa #$BodyPartFn #$AnimalBodyPartType) (#$arg2Isa #$BodyPartFn #$UniqueAnatomicalBodyPartType) (#$arg2Genl #$BodyPartFn #$AnimalBodyPart) (#$resultIsa #$BodyPartFn #$AnimalBodyPart) Are these well-formed NATs ? (#$BodyPartFn #$SubaruCar #$Fender) (#$BodyPartFn #$GoldenRetriever #$Tail) (#$BodyPartFn #$Rover) (#$BodyPartFn #$Rover #$Tail)

  9. Examples of Function Use: #$BodyPartFn Given this information : (#$isa #$BodyPartFn #$BinaryFunction) (#$arg1Isa #$BodyPartFn #$Animal) (#$arg2Isa #$BodyPartFn #$AnimalBodyPartType) (#$arg2Isa #$BodyPartFn #$UniqueAnatomicalBodyPartType) (#$arg2Genl #$BodyPartFn #$AnimalBodyPart) (#$resultIsa #$BodyPartFn #$AnimalBodyPart) Are these well-formed NATs ? (#$BodyPartFn #$SubaruCar #$Fender) (#$BodyPartFn #$GoldenRetriever #$Tail) (#$BodyPartFn #$Rover) (#$BodyPartFn #$Rover #$Tail)

  10. Examples of Function Use: #$BodyPartFn Given this information : (#$isa #$BodyPartFn #$BinaryFunction) (#$arg1Isa #$BodyPartFn #$Animal) (#$arg2Isa #$BodyPartFn #$AnimalBodyPartType) (#$arg2Isa #$BodyPartFn #$UniqueAnatomicalBodyPartType) (#$arg2Genl #$BodyPartFn #$AnimalBodyPart) (#$resultIsa #$BodyPartFn #$AnimalBodyPart) Are these well-formed NATs ? (#$BodyPartFn #$SubaruCar #$Fender) (#$BodyPartFn #$GoldenRetriever #$Tail) (#$BodyPartFn #$Rover) (#$BodyPartFn #$Rover #$Tail)

  11. Examples of Function Use: #$InstructionsFn-Making Given this information : (#$isa #$InstructionsFn-Making #$UnaryFunction) (#$arg1Isa #$InstructionsFn-Making #$ExistingObjectType) (#$arg1Genl #$InstructionsFn-Making #$Artifact-Generic) (#$resultIsa #$InstructionsFn-Making #$ObjectType) (#$resultGenl #$InstructionsFn-Making #$Instructions) Are these well-formed NATs ? (#$InstructionsFn-Making #$Recipe #$ChickenSoup) (#$InstructionsFn-Making #$RadioReceiver) (#$InstructionsFn-Making #$Mud) (#$InstructionsFn-Making #$SetOrCollection)

  12. Examples of Function Use: #$InstructionsFn-Making Given this information : (#$isa #$InstructionsFn-Making #$UnaryFunction) (#$arg1Isa #$InstructionsFn-Making #$ExistingObjectType) (#$arg1Genl #$InstructionsFn-Making #$Artifact-Generic) (#$resultIsa #$InstructionsFn-Making #$ObjectType) (#$resultGenl #$InstructionsFn-Making #$Instructions) Are these well-formed NATs ? (#$InstructionsFn-Making #$Recipe #$ChickenSoup) (#$InstructionsFn-Making #$RadioReceiver) (#$InstructionsFn-Making #$Mud) (#$InstructionsFn-Making #$SetOrCollection)

  13. Examples of Function Use: #$InstructionsFn-Making Given this information : (#$isa #$InstructionsFn-Making #$UnaryFunction) (#$arg1Isa #$InstructionsFn-Making #$ExistingObjectType) (#$arg1Genl #$InstructionsFn-Making #$Artifact-Generic) (#$resultIsa #$InstructionsFn-Making #$ObjectType) (#$resultGenl #$InstructionsFn-Making #$Instructions) Are these well-formed NATs ? (#$InstructionsFn-Making #$Recipe #$ChickenSoup) (#$InstructionsFn-Making #$RadioReceiver) (#$InstructionsFn-Making #$Mud) (#$InstructionsFn-Making #$SetOrCollection)

  14. Individuals or Collections? A key distinction among functions : • Does it always return an individual ? • #$MotherFn • #$BorderBetweenFn • Does it always return a collection ? • #$TransportViaFn • #$GroupFn

  15. #$IndividualDenotingFunction #$IndividualDenotingFunction • All functions such that : (#$resultIsa ?FUNCTION #$Individual) • Any NAT made by applying ?FUNCTION denotes an individual (as opposed to a collection). • Must have a #$resultIsa specification. • Must not have a #$resultGenl specification. Why not? • More Examples : #$GovernmentFn , #$BirthFn

  16. #$CollectionDenotingFunction #$CollectionDenotingFunction • All functions such that :(#$resultIsa ?FUNCTION #$Collection) • Any NAT made by applying ?FUNCTION denotes a collection (as opposed to an individual). • Must have a #$resultIsa specification. • May also have a#$resultGenlspecification. • More Examples : #$ResidentsFn , #$TeacherFn)

  17. The Hierarchy Individual vs. Collection Denoting Functions #$Function-Denotational #$Individual Denoting Function #$Collection Denoting Function disjoint #$GovernmentFn #$BirthFn #$GroupFn #$ResidentsFn isa genls

  18. Summary • Function result types • Transitivity of #$genls • Individual-denoting vs. collection-denoting functions

More Related