(define (domain daml+oil-ex) (:types Car - object ;no car is a person Height - object FullTimeOccupation - object ) (:objects medium - Height short - Height tall - Height ) (:predicates (associatedData ob1 - object ob2 - object ;associatedData is a DatatypeProperty without a range restriction. ) (animal ob0 - object ;This class of animals is illustrative of a number of ontological idioms. ;Animals have exactly two parents, ie: ;If x is an animal, then it has exactly 2 parents ;(but it is NOT the case that anything that has 2 parents is an animal). ) (person ob0 - object ;every person is a man or a woman ;Persons have at most 1 item of associatedData ) (humanbeing ob0 - object) (bigfoot ob0 - object ;BigFoots (BigFeet?) are exactly those persons whose shosize is over12. ) (hasParent ob1 - object ob2 - object) (hasMother ob1 - object ob2 - object) (male ob0 - object) (man ob0 - object) (hasAncestor ob1 - object ob2 - object) (hasSpouse ob1 - object ob2 - object) (tallthing ob0 - object) (tallman ob0 - object) (marriedperson ob0 - object) (hasFather ob1 - object ob2 - object) (shirtsize ob1 - object cl2 - @exd:clothingsize ;shirtsize is a DatatypeProperty whose range is clothingsize. ) (female ob0 - object) (descendant ob1 - object ob2 - object) (hasHeight ob1 - object he2 - Height) (woman ob0 - object) (age ob1 - object in2 - Integer ;age is a DatatypeProperty whose range is xsd:decimal. ;age is also a UniqueProperty (can only have one age) ) (hasOccupation ob1 - object ob2 - object) (adult ob0 - object) (senior ob0 - object) (hasChild ob1 - object ob2 - object) (shoesize ob1 - object in2 - Integer ;shoesize is a DatatypeProperty whose range is xsd:decimal. ;shoesize is also a UniqueProperty (can only have one shoesize) ) (hasMom ob1 - object ob2 - object) ) (:facts (forall (ob0 - object) (if (person ob0) (animal ob0))) (forall (ob0 - object) (if (humanbeing ob0) (person ob0))) (forall (ob0 - object) (if (bigfoot ob0) (person ob0))) (forall (ob1 - object ob2 - object) (if (hasParent ob1 ob2) (animal ob1))) (forall (ob1 - object ob2 - object) (if (hasParent ob1 ob2) (animal ob2))) (forall (ob1 - object ob2 - object) (if (hasMother ob1 ob2) (hasParent ob1 ob2))) (forall (ob1 - object ob2 - object) (if (hasMother ob1 ob2) (female ob2))) (forall (ob1 - object ob21 - object ob22 - object) (if (and (hasMother ob1 ob21) (hasMother ob1 ob22)) (= ob21 ob22))) (forall (ob0 - object) (if (male ob0) (animal ob0))) (forall (ob0 - object) (if (man ob0) (person ob0))) (forall (ob0 - object) (if (man ob0) (male ob0))) (forall (ob1 - object ob2 - object ob3 - object) (if (and (hasAncestor ob1 ob2) (hasAncestor ob2 ob3)) (hasAncestor ob1 ob3))) (forall (ob0 - object) (if (tallman ob0) (tallthing ob0))) (forall (ob0 - object) (if (tallman ob0) (man ob0))) (forall (ob0 - object) (if (marriedperson ob0) (person ob0))) (forall (ob1 - object ob2 - object) (if (hasFather ob1 ob2) (hasParent ob1 ob2))) (forall (ob1 - object ob2 - object) (if (hasFather ob1 ob2) (male ob2))) (forall (ob1 - object ob21 - object ob22 - object) (if (and (shirtsize ob1 ob21) (shirtsize ob1 ob22)) (= ob21 ob22))) (forall (ob0 - object) (if (female ob0) (animal ob0))) (forall (ob1 - object ob2 - object ob3 - object) (if (and (descendant ob1 ob2) (descendant ob2 ob3)) (descendant ob1 ob3))) (forall (ob0 - object) (if (woman ob0) (person ob0))) (forall (ob0 - object) (if (woman ob0) (female ob0))) (forall (ob1 - object ob21 - object ob22 - object) (if (and (age ob1 ob21) (age ob1 ob22)) (= ob21 ob22))) (forall (ob0 - object) (if (adult ob0) (person ob0))) (forall (ob0 - object) (if (senior ob0) (person ob0))) (forall (ob1 - object ob21 - object ob22 - object) (if (and (shoesize ob1 ob21) (shoesize ob1 ob22)) (= ob21 ob22))) (forall (ob1 - object ob2 - object) (if (hasMom ob1 ob2) (hasMother ob1 ob2))) (forall (x - object) (if (animal x) (exists (y1 - object y2 - object) (and (hasParent x y1) (hasParent x y2) (not (= y1 y2)) (forall (y3 - object) (if (hasParent x y3) (or (= y1 y3) (= y2 y3)))))))) (forall (x - object) (if (female x) (not (male x)))) (forall (x - object) (if (person x) (forall (y - object) (if (hasParent x y) (person y))))) (forall (x - object) (if (person x) (exists (y1 - object) (and (hasFather x y1) (forall (y2 - object) (if (hasFather x y2) (= y1 y2))))))) (forall (x - object) (if (person x) (exists (y1 - object) (shoesize x y1)))) (forall (x - object) (if (person x) (forall (y1 - object y2 - object) (if (and (hasSpouse x y1) (hasSpouse x y2)) (= y1 y2))))) (forall (x - object) (if (person x) (forall (y1 - object y2 - object) (if (and (hasOccupation x y1) (is FullTimeOccupation y1) (hasOccupation x y2) (is FullTimeOccupation y2)) (= y1 y2))))) (forall (x - object) (if (person x) (or (man x) (woman x)))) (forall (x - object) (if (or (man x) (woman x)) (person x))) (forall (x - object) (not (and (man x) (woman x)))) (forall (x - object) (if (person x) (forall (y1 - object y2 - object) (if (and (associatedData x y1) (associatedData x y2)) (= y1 y2))))) (forall (ob1 - object ob2 - object) (if (hasChild ob1 ob2) (hasParent ob2 ob1))) (forall (ob1 - object ob2 - object) (if (hasMother ob1 ob2) (hasMom ob1 ob2))) (forall (x - object) (if (is Car x) (not (person x)))) (forall (x - object) (if (and (is tallthing x) (is man x)) (is tallman x))) (forall (x - object) (if (marriedperson x) (exists (y1 - object) (and (hasSpouse x y1) (forall (y2 - object) (if (hasSpouse x y2) (= y1 y2))))))) (forall (x - object) (if (and (is person x) (exists (y1 - object) (and (hasSpouse x y1) (forall (y2 - object) (if (hasSpouse x y2) (= y1 y2)))))) (is marriedperson x))) (forall (x - object) (if (person x) (humanbeing x))) (forall (x - object) (if (adult x) (exists (y - object) (and (is @exd:over17 y) (age x y))))) (forall (x - object) (if (and (is person x) (exists (y - object) (and (is @exd:over17 y) (age x y)))) (is adult x))) (forall (x - object) (if (senior x) (exists (y - object) (and (is @exd:over59 y) (age x y))))) (forall (x - object) (if (and (is person x) (exists (y - object) (and (is @exd:over59 y) (age x y)))) (is senior x))) (forall (x - object) (if (is Height x) (or (= x short) (= x medium) (= x tall)))) (forall (x - object) (if (or (= x short) (= x medium) (= x tall)) (is Height x))) (forall (x - object) (if (tallthing x) (hasHeight x tall))) (forall (x - object) (if (hasHeight x tall) (tallthing x))) (forall (x - object) (if (bigfoot x) (exists (y - object) (and (is @exd:over12 y) (shoesize x y))))) (forall (x - object) (if (and (is person x) (exists (y - object) (and (is @exd:over12 y) (shoesize x y)))) (is bigfoot x))) ) ) (define (situation daml+oil-ex-situ) (:domain daml+oil-ex) (:objects Peter - object ;Peter is an instance of Person. Peter has shoesize 9.5 and age 46. From the ;range restrictions we know that these are of type xsd:decimal and ;xsd:nonNegativeInteger respectively. Peter also has shirtsize 15, the type ;of which is the union type clothingsize; no discriminating type ;has been specified, so the value may be either a string or an integer. Santa - object ;Santa is an instance of Person. Santa has two pieces of ;associatedData, one of which is the real number 3.14159 and the ;other of which is the string "3.14159". We may be able to infer a ;logical inconsistency (because Persons can have at most 1 item of ;associatedData, and a value cannot be both a string and a real ;number). Adam - object ;Adam is a person. Ian - object ;Ian is an instance of Person. Ian has shoesize 14 and age 37. From ;the range restrictions we know that these are of type xsd:decimal ;and xsd:nonNegativeInteger respectively. Ian also has shirtsize 12, ;the type of which is the union type clothingsize; the discriminating ;type "string" has been specified, so the value is to be taken as the ;string "12" rather than the integer 12. We may be able to infer ;that Ian is an instance of BigFoot (because 14 is a valid value for ;xsd:over12). ) (:init (person Peter) (person Santa) (person Adam) (person Ian) (age Adam 13) (shoesize Adam 9.5) (shoesize Ian 14) (age Ian 37) (shirtsize Ian "12") (shoesize Peter 9.5) (age Peter 46) (shirtsize Peter 15) (associatedData Santa 3.14159) (associatedData Santa "3.14159") ) )