SWRL Built-Ins update

From: stabet@comcast.net
Date: 01/20/04

  • Next message: Deborah L. McGuinness: "[Fwd: Re: Submission request to W3C: Semantic Web Rule Language (SWRL)]"
    Hi All,
    
    Attached, please find the updated version of the built-ins proposal.
    
    thanks,
    
    Said
    
    
    ======================================================================================
    SWRL Built-ins
    DRAFT 5
    
    Said Tabet, Benjamin Grosof, Harold Boley, Mike Dean
    
    01/20/2004
    ======================================================================================
    
    
    Proposed Taxonomy
    =================
    
    The proposed hierarchy of built-ins for SWRL is motivated by a modular approach that will
    allow further extensions in future releases of SWRL. At the same time, it will provide the
    flexibility for various implementations to select the level of hierarchy to be support with
    each version of SWRL.
    
    
    SWRL's built-ins approach is also based on the reuse of existing built-ins in XQuery and XPath,
    themselves derived from XML data types part 2 built-ins. Some other built-ins are specific
    to SWRL and RuleML, dealing with fact and rule prioritization.
    
    This system of built-ins should also help in the interoperation of SWRL with
    other Web formalisms by providing an extensible, modular built-ins infrastructure for 
    Semantic Web Languages, Web Services, and Web applications.
    
    While we suggest to have a top level distinction between the following two categories:
    
    	* Side-effect free built-ins
    	* Side-effect full built-ins
    
    the SWRL language will only provide support for side-effect free built-ins.
    
    Even though the taxonomy may appear to be quite large, users only need to load the relevant ones.
    
    
    
    Built-Ins for Handling XML Data Types
    -------------------------------------
    
    	Like in OWL, our approach is to integrate XML Part 2, Data Types:
    		URLs:
    		http://www.w3.org/TR/xmlschema-2/
    		http://www.w3.org/TR/xpath-functions/
    
    	We need some examples of the types of built-ins we would use with these data types.
    	Is that enough?
    	Example: Dates, Duration (as pointed by Sandro onn the JC telecon: 5/29/03) 
    	can be used with comparison and other
    	built-ins such as calculation. 
    
    
    Accessor Methods and Functions:
    -------------------------------
    
    	get() methods
    
    	set(): side-effectfull. It will be at a different level, in a layer outside of the inner swrl kernel.
    
    
    Error and Exception Handling Methods:
    -------------------------------------
    
    API level built-ins (outside the Kernel):
    
    	swrlx:exception()		
    	swrlx:exception(arguments list)
    
    
    Log functionality
    -----------------
    
    Logging is a 'mild' form of side-effects. It can be side-effectfree (writing to a new file everytime):
    
    	swrlx:log()
    	swrlx:log(arguments list)
    
    
    Math Operators and Functions
    ----------------------------
    
    The swrl presentation and XML/RDF syntax defines an abstraction layer on top of operators and functions. Comparison operators should be singled out as they return boolean values. They are predicates in the OWL.
    
    	Operators
    	---------
    	op:numeric-add
    	op:numeric-subtract
    	op:numeric-multiply
    	op:numeric-divide
    	op:numeric-integer-divide
    	op:numeric-mod
    	op:numeric-unary-plus
    	op:numeric-unary-minus
    
    	Comparison predicates:
    	---------------------
    	op:numeric-equal
    	op:numeric-less-than
    	op:numeric-greater-than
    	op:numeric-greater-than
    	
    	Built-In Functions:
    	------------------
    	fn:abs
    	fn:ceiling
    	fn:floor
    	fn:round
    	fn:round-half-to-even
    	fn:round-half-to-even
    
    	Built-In Aggregate Functions
    	----------------------------
    	fn:count
    	fn:avg
    	fn:max
    	fn:min
    	fn:sum
    
    
    Built-In Functions and Operators over Boolean Values 
    ----------------------------------------------------
    
    	fn:true()
    	fn:false()
    	op:boolean-equal
    	op:boolean-less-than
    	op:boolean-greater-than
    	fn:not
    
    "fn:not" is a function built-in
    
    Built-In Functions on Strings 
    -----------------------------
    
    	fn:compare
    	fn:string-equal
    	fn:concat
    	fn:string-join
    	fn:substring
    	fn:string-length()
    	fn:normalize-space()
    	fn:upper-case
    	fn:lower-case
    	fn:translate
    	fn:contains
    	fn:starts-with
    	fn:ends-with
    	fn:substring-before
    	fn:substring-after
    	fn:matches
    	fn:replace
    	fn:tokenize
    
    
    Built-In Functions and Operators on Date, Time and Duration
    -----------------------------------------------------------
    
    The following list of built-ins for Dates, Time, and Durations is imported
    
    
    	Base Operators:
    	---------------
    	op:yearMonthDuration-equal
    	op:yearMonthDuration-less-than
    	op:yearMonthDuration-greater-than
    	op:dayTimeDuration-equal
    	op:dayTimeDuration-less-than
    	op:dayTimeDuration-greater-than
    	op:dateTime-equal
    	op:dateTime-less-than
    	op:dateTime-greater-than
    	op:date-equal
    	op:date-less-than
    	op:date-greater-than
    	op:time-equal
    	op:time-less-than
    	op:time-greater-than
    	op:gYearMonth-equal
    	op:gYear-equal
    	op:gMonthDay-equal
    	op:gMonth-equal
    	op:gDay-equal
    
    	Accessors for Date, Time and Duration:
    	--------------------------------------
    	fn:get-years-from-yearMonthDuration
    	fn:get-months-from-yearMonthDuration
    	fn:get-days-from-dayTimeDuration
    	fn:get-hours-from-dayTimeDuration
    	fn:get-minutes-from-dayTimeDuration
    	fn:get-seconds-from-dayTimeDuration
    	fn:get-year-from-dateTime
    	fn:get-month-from-dateTime
    	fn:get-day-from-dateTime
    	fn:get-hours-from-dateTime
    	fn:get-minutes-from-dateTime
    	fn:get-seconds-from-dateTime
    	fn:get-timezone-from-dateTime
    	fn:get-year-from-date
    	fn:get-month-from-date
    	fn:get-day-from-date
    	fn:get-timezone-from-date
    	fn:get-hours-from-time
    	fn:get-minutes-from-time
    	fn:get-seconds-from-time
    	fn:get-timezone-from-time
    
    	Advanced Built-In Operators
    	---------------------------
    	op:add-yearMonthDurations
    	op:subtract-yearMonthDurations
    	op:multiply-yearMonthDuration
    	op:divide-yearMonthDuration
    	op:add-dayTimeDurations
    	op:subtract-dayTimeDurations
    	op:multiply-dayTimeDuration
    	op:divide-dayTimeDuration
    	op:subtract-dates
    	op:subtract-times
    	op:add-yearMonthDuration-to-dateTime
    	op:add-dayTimeDuration-to-dateTime
    	op:subtract-yearMonthDuration-from-dateTime
    	op:subtract-dayTimeDuration-from-dateTime
    	op:add-yearMonthDuration-to-date
    	op:add-dayTimeDuration-to-date
    	op:subtract-yearMonthDuration-from-date
    	op:subtract-dayTimeDuration-from-date
    	op:add-dayTimeDuration-to-time
    	op:subtract-dayTimeDuration-from-time
    
    	Advanced Built-In Functions
    	---------------------------
    	fn:subtract-dateTimes-yielding-yearMonthDuration
    	fn:subtract-dateTimes-yielding-dayTimeDuration
    
    
    Built-In Functions for QNames and URIs
    --------------------------------------
    
    	QNames:
    	-------
    	fn:resolve-QName
    	op:QName-equal
    	fn:get-local-name-from-QName
    	fn:get-namespace-uri-from-QName
    	fn:get-namespace-uri-for-prefix
    	fn:get-in-scope-prefixes
    
    	URI
    	---
    	fn:resolve-uri 
    	op:anyURI-equal 
    
    
    Built-Ins for Lists
    -------------------
    
    These are the three basic list
    	
    	op:list-union
    	op:list-intersection
    	op:list-substraction
    
    
    Built-ins for module handling
    -----------------------------
    	
    	fn:declareModule: not fully side-effect free
    	fn:setModule: this is a side-effectfull built-in function.
    	fn:getModuleInfo
    	fn:listModules
    
    Built-ins for sequences
    -----------------------
    
    Not supported for the moment in SWRL. Maybe left as an option in
    implementations.
    
    
    Built-ins for nodes
    -------------------
    
    Not supported for the moment in SWRL. Maybe left as an option in
    implementations.
    
    
    Other possible Built-ins: 
    -------------------------
    
    	Logic Built-ins: side-effectfree
    	Control Built-ins: side-effectfull
    	Database Built-ins 
    	Term Comparison Built-ins 
    	Term Manipulation Built-ins 
    	Stream I/O Built-ins 
    	Character I/O Built-ins 
    	Term I/O Built-ins 
    	Event Handling Built-ins 
    	Debugging Built-ins 
    	Arrays and Global Variable Built-ins 
    	Coroutining Built-ins 
    	External Interface Built-ins (imports)
    	Prolog Environment Built-ins 
    	Compiler Directives Built-Ins
    	Operating System Built-Ins 
    	Sorting Library predicates Built-ins
    
    
    Implementation-level extension of the set of Built-ins
    ======================================================
    It could also be allowed to extend the Taxonomy by defining further built-ins on the level of the implementation language of the SWRL built-ins.
    


    This archive was generated by hypermail 2.1.4 : 01/20/04 EST