Commits

Sébastien Ferré committed 9fb58f0

New version of [term.ttl] defining terms as specialized containers.

Comments (0)

Files changed (1)

-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
-@prefix owl: <http://www.w3.org/2002/07/owl#>.
+# author: Sébastien Ferré <mailto:ferre@irisa.fr>
+
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#>
 @prefix term: <http://www.irisa.fr/LIS/ferre/RDFS/term#>
 
 term:Term
 	rdfs:label "term" ;
-	rdfs:comment "The class of all compound terms." ;
-	a rdfs:Class .
+	rdfs:comment "The class of all compound terms, a subclass of RDF containers." ;
+	rdfs:subClassOf rdfs:Container .
 
 term:Functor
 	rdfs:label "functor" ;
-	rdfs:comment "The class of all term functors." ;
-	a rdfs:Class .
-
-term:Operator
-	rdfs:label "operator" ;
-	rdfs:comment "The subclass of functors that can be used a prefix, infix or postfix operators." ;
-	a rdfs:Class ;
-	rdfs:subClassOf term:Functor .
+	rdfs:comment "The class of all term functors, which are types of terms." ;
+	rdfs:subClassOf rdfs:Class .
 
 term:functor
-	rdfs:label "has functor" ;
-	a rdf:Property ;
+	rdfs:label "functor" ;
+	rdfs:comment "A specialization of rdf:type to relate terms to their functors." ;
+	rdfs:subPropertyOf rdf:type ;
   	rdfs:domain term:Term ;
         rdfs:range term:Functor .
 
-term:arg1
-	rdfs:label "has 1st argument" ;
-	a rdf:Property ;
-        rdfs:subPropertyOf term:argAny ;
-        rdfs:domain term:Term .
+# rdf:_n properties are used to link terms to their arguments
+# rdfs:member generalizes them, and allow to refer to arbitrary arguments
 
-term:arg2
-	a rdf:Property ;
-        rdfs:subPropertyOf term:argAny ;
-        rdfs:domain term:Term .
 
-term:arg3
-	a rdf:Property ;
-        rdfs:subPropertyOf term:argAny ;
-        rdfs:domain term:Term .
+# classes and properties for natural notation of terms
 
-term:arg4
-	a rdf:Property ;
-        rdfs:subPropertyOf term:argAny ;
-        rdfs:domain term:Term .
+term:Operator
+	rdfs:label "operator" ;
+	rdfs:comment "The subclass of functors that can be used as a prefix, infix, postfix, or mixfix operators." ;
+	rdfs:subClassOf term:Functor .
 
-term:arg5
+term:PrefixOperator
+	rdfs:label "prefix operator" ;
+	rdfs:comment "The subclass of operators that be used as a prefix operator." ;
+	rdfs:subClassOf term:Operator .
+
+term:InfixOperator
+	rdfs:label "infix operator" ;
+	rdfs:comment "The subclass of operators that be used as an infix operator." ;
+	rdfs:subClassOf term:Operator .
+
+term:LeftAssociativeInfixOperator
+	rdfs:label "left-associative infix operator" ;
+	rdfs:comment "The subclass of operators that be used as a left-associative infix operator." ;
+	rdfs:subClassOf term:InfixOperator .
+
+term:RightAssociativeInfixOperator
+	rdfs:label "right-associative infix operator" ;
+	rdfs:comment "The subclass of operators that be used as a right-associative infix operator." ;
+	rdfs:subClassOf term:InfixOperator .
+
+term:PostfixOperator
+	rdfs:label "postfix operator" ;
+	rdfs:comment "The subclass of operators that be used as a postfix operator." ;
+	rdfs:subClassOf term:Operator .
+
+term:MixfixOperator
+	rdfs:label "mixfix operator" ;
+	rdfs:comment "The subclass of operators that be used as a mixfix operator." ;
+	rdfs:subClassOf term:Operator .
+
+term:arity
+	rdfs:label "arity" ;
+	rdfs:comment "The number of arguments of a functor." ;
 	a rdf:Property ;
-        rdfs:subPropertyOf term:argAny ;
-        rdfs:domain term:Term .
+	rdfs:domain term:Functor ;
+	rdfs:range xsd:integer .
 
-term:arg6
+term:precedence
+	rdfs:label "precedence" ;
+	rdfs:comment "The precedence of a functor, i.e., priority level." ;
 	a rdf:Property ;
-        rdfs:subPropertyOf term:argAny ;
-        rdfs:domain term:Term .
+	rdfs:domain term:Functor ;
+	rdfs:range xsd:integer .
 
-term:arg7
-	a rdf:Property ;
-        rdfs:subPropertyOf term:argAny ;
-        rdfs:domain term:Term .
 
-term:arg8
-	a rdf:Property ;
-        rdfs:subPropertyOf term:argAny ;
-        rdfs:domain term:Term .
+# classes and properties for defining implicit functors
 
-term:arg9
-	a rdf:Property ;
-        rdfs:subPropertyOf term:argAny ;
-        rdfs:domain term:Term .
+term:ImplicitFunctor
+	rdfs:label "implicit functor" ;	
+	rdfs:comment "The class of implicitely define functors." ;
+	rdfs:subClassOf term:Functor .
 
-term:arg10
+term:implicitClass
+	rdfs:label "implicit class"@en ;
+	rdfs:comment "The type of implicit structures of this functor."@en ;
 	a rdf:Property ;
-        rdfs:subPropertyOf term:argAny ;
-        rdfs:domain term:Term .
+	rdfs:domain term:implicitFunctor ;
+	rdfs:range rdfs:Class .
 
-term:argAny
-	rdfs:label "has any argument" ;
+term:implicitProperties
+	rdfs:label "implicit properties"@en ;
+	rdfs:comment "The properties used for linking the implicit structure of this functor to its arguments."@en ;
 	a rdf:Property ;
-	rdfs:subPropertyOf term:subterm .
+	rdfs:domain term:implicitFunctor ;
+	rdfs:range rdf:Seq . # a sequence of properties, given in the same order as arguments
+
+
+# example: functor :some for existential restrictions in OWL
+#
+# :some
+#	a term:ImplicitFunctor ;
+#	term:implicitType owl:Restriction ;
+#	term:implicitProperties [ a rdf:Seq ; rdf:_1 owl:onProperty; rdf:_2 owl:someValuesFrom ] ;
+#	a term:RightAssociativeInfixOperator ;
+#	rdfs:label "some" ;
+#	term:arity 2 .
+#
+# implicit structure: [ a owl:Restriction ; owl:onProperty :hasChild ; owl:someValuesFrom :Doctor ]
+# equivalent Turtle term: [ a :some ; rdf:_1 :hasChild ; rdf:_2 :Doctor ]
+# with functional notation: :some(:hasChild,:Doctor)
+# with infix notation and labels: has child some doctor
+
+
 
-term:subterm
-	rdfs:label "has subterm" ;
-	a owl:TransitiveProperty ;
-        a owl:ReflexiveProperty .