P/FDM METADATA CLASSES as Daplex Declarations
 
BASIC METADATA – ENTITY AND PROPERTY TYPES
 
declare objmet ->> entity
declare oname(objmet) -> string            %unique obj id
key_of objmet is oname
 
%
% an entity class in Daplex
%
declare entmet ->> objmet
declare super(entmet) -> entmet           %its supertype
declare rdfname(entmet) -> string          
          %link to RDF schema
 
%
% a property (on an entity class) in Daplex
%
declare propmet ->> objmet
declare fname(propmet) -> string %property name
declare firstargtype(propmet) -> entmet %domain
declare resulttype(propmet) -> entmet             %range
declare has_inv(propmet) -> boolean    %has an inverse
declare rdfname(propmet) -> string
          %link to RDF schema
 
 
 
 
 
 
 
 
 
 
 
 
 
 
METADATA FOR CONSTRAINTS WITH QUANTIFIERS
e.g. ("X in Domx) p(X) ® ("Y in Domy) q(X,Y) & r(Y) ® ($Z in Domz) pred(X,Y,Z)
 
Based on Range-restricted FOL
Translates to RDF/RDFS independent of Colan Syntax
%
% implies constraint
%
declare impliesconstr ->> constraint     Subtype for "
declare qvar(impliesconstr) -> setmem
declare if(impliesconstr) -> boolpred
declare then(impliesconstr) -> constraint (any subtype)
 
%
% exists constraint
%
declare existsconstr ->> constraint      Subtype for $
declare qvar(existsconstr) -> setmem
declare suchthat(existsconstr) -> constraint (any subtype)
 
%
% body without quantifiers
%
declare unquantified_constraint ->> constraint   Simplest
declare body(unquantified_constraint) -> boolpred
 
 
 
 
 
 
 
 
 
 
 
 
 
METADATA for VARIABLES AND SETS
e.g. instance:  (p in person)
 
%
% variable
%
declare variable ->> singleton
declare varname(variable) -> string       %variable name
 
%
% varable in set
%
declare setmem ->> boolprim
declare var(setmem) -> variable
          %the variable
declare set(setmem) -> setexpr
          %the set
 
 
%
% multivalued function call that generates a set
%
declare mvfncall ->> setexpr
declare prop(mvfncall) -> propmet         
        %the property that generates the set
declare arg(mvfncall) -> objmet
          %the argument
 

 

 

 

 

 

 

 

BOOLEAN EXPRESSION METADATA

e.g.instance: (age(x) > 3) & (tall(x) || short(x))

 

{Effectively stores parse tree of constraint,

with tips referencing entity or assocn metadata}

 

declare boolpred ->> expr %boolean predicate
declare boolterm ->> boolpred     %boolean term 
declare boolfac ->> boolterm       % factor (in a term)
declare boolprim ->> boolfac       %boolean primitive
 
declare boolor ->> boolpred        %boolean or
declare op(boolor) ->> boolterm  %list of or-ed terms
 
declare booland ->> boolterm      %boolean and
declare op(booland) ->> boolfac  %list of and-ed factors
 
declare negfac ->> boolfac         %signed boolean factor 
declare negop(negfac) -> string  % sign{+,-}
declare body(negfac) -> boolprim          %negated body
 
 
%
% comparison
%
declare comparison ->> boolprim
declare op1(comparison) -> arith_expr
declare op2(comparison) -> arith_expr
declare operator(comparison) -> string %{<,>,<>,=}
 

Note: The arith_expr metadata type allows for

arithmetic expressions whose tips can be of type

entmet, propmet or basic (number, string, boolean)

 

 

 

 

 

 

Full example: see

http://www.csd.abdn.ac.uk/~schalmer/schema/

 

 

RDFS  Representation of COLAN METADATA

 

<rdfs:Class rdf:ID="variable">

  <rdfs:subClassOf rdf:resource="#operand"/>

</rdfs:Class>

 

<rdf:Property rdf:ID="varname">

  <rdfs:domain rdf:resource="#variable"/>

  <rdfs:range rdf:resource=

  "http://www.w3.org/2000/01/rdf-schema#Literal"/>

</rdf:Property>

 

<rdfs:Class rdf:ID="setmem">

  <rdfs:subClassOf rdf:resource="#boolprim"/>

</rdfs:Class>

 

<rdf:Property rdf:ID="var">

  <rdfs:domain rdf:resource="#setmem"/>

  <rdfs:range rdf:resource="#variable"/>

</rdf:Property>

 

<rdf:Property rdf:ID="set">

  <rdfs:domain rdf:resource="#setmem"/>

  <rdfs:range rdf:resource="#setexpr"/>

</rdf:Property>