Created with TopBraid Composer grand parent grand mother grand father predicate Same-sex marriage not permitted (in this model) oldObject predicate subject object Set object Change {?predicate} of {?subject} to {?object} spouse spouseOppositeSex oppositeSex gender spouseGender age must be within a realistic range age 0 120 Infer age from currentYear - birthYear birthYear currentYear age Gets the male parent of a given person (?arg1) get father father the person to get the father of childAge child createPredicate spouseGender spouse gender grandParent parent gender opposite year sub str 0 4 predicate Gets the current year as an xsd:integer. get current year the gender to match against Find the grandparents of the given person ?this. This template can be used either for grandMother or grandFather. Infer grand parent true the predicate to create (e.g. grandFather) Infer {?predicate} from {?gender} grand parents get opposite sex