;;; -- Steve Polyak 30 November 1998 -- rewrite for CPF. (in-package "ONTOLINGUA-USER") (define-theory TFPSV (frame-ontology slot-constraint-sugar cpo) "This is an initial definition of psv elements to support TF." :issues ((:copyright "Copyright (c) 1998 Steve Polyak"))) (in-theory 'TFPSV) ;;;-------------PSV---------------- ;;; TF PSV (define-function OBJECT.RESOURCE-TYPE (?object) :-> ?restype "The type of resource for a domain e.g. consumable_strictly." :def (and (cpo-activity-relatable-object ?object) (string ?restype))) (define-function OBJECT.IS-RESOURCE (?object) :-> ?flag "Marks an object as a resource in the domain." :def (and (cpo-activity-relatable-object ?object) (cpo-boolean ?flag))) (define-relation OBJECT.UNIT (?object ?unit) "The relationship between an object and its unit." :def (and (cpo-activity-relatable-object ?object) (cpo-resource-unit ?unit))) ;;; CPO-Resource-Unit (define-class CPO-RESOURCE-UNIT (?x) "A resource unit describes the units for an object (e.g. pounds for money)" :def (and (cpo-entity ?x) (has-one ?x unit.label))) (define-function UNIT.LABEL (?unit) :-> ?label :def (and (cpo-resource-unit ?unit) (string ?label))) (define-function UNIT.TYPE (?unit) :-> ?type "Additional TF information on the unit e.g. pounds = count" :def (and (cpo-resource-unit ?unit) (string ?type)))