SWRL Built-Ins approach: our updated list (attached as TEXT file)

From: [email protected]
Date: 01/13/04

  • Next message: Benjamin Grosof: "my notes from today's JC telecon 1/3/04"
    Hi everyone,
    
    Attached, please find the list of built-ins (raw) for discussion today. We tried to consolidate the previous RuleML built-ins list (1) and the list from XQuery and XPath (2,3,4)
    
    Thanks,
    
    -said
    
    
    [1] Archived RuleML Built-Ins presentation to the JC: 
        http://www.daml.org/listarchive/joint-committee/1369.html
    
    [2] XML Schema Part 2: Datatypes: 
        http://www.w3.org/TR/xmlschema-2/
    
    [3] XPath: 
        http://www.w3.org/TR/xpath
    
    [4] XQuery 1.0: 
        http://www.w3.org/TR/xquery/
    
    
    ======================================================================================
    SWRL Built-ins
    DRAFT 4
    
    Said Tabet, Benjamin Grosof, Harold Boley, Mike Dean
    
    01/13/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.
    
    We also suggest to have a top level distinction between the following two categories:
    
    	* Side-effect free built-ins
    	
    	* Side-effectful built-ins
    
    
    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() methods
    
    
    Error and Exception Handling Methods:
    -------------------------------------
    
    	swrlx:exception()
    	swrlx:exception(arguments list)
    
    
    Log functionality
    -----------------
    
    	swrlx:log()
    	swrlx:log(arguments list)
    
    
    Math Operators and Functions
    ----------------------------
    
    	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 operators:
    	---------------------
    	op:numeric-equal
    	op:numeric-less-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 on Boolean Values 
    --------------------------------------------------
    
    	fn:true()
    	fn:false()
    	op:boolean-equal
    	op:boolean-less-than
    	op:boolean-greater-than
    	fn:not
    
    
    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 Durations, Dates and Times
    --------------------------------------------------------------
    
    	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
    
    	More Built-In Operators for Date, Time, and Duration
    	----------------------------------------------------
    	op:add-yearMonthDurations
    	op:subtract-yearMonthDurations
    	op:multiply-yearMonthDuration
    	op:divide-yearMonthDuration
    	op:add-dayTimeDurations
    	op:subtract-dayTimeDurations
    	op:multiply-dayTimeDuration
    	op:divide-dayTimeDuration
    
    	fn:subtract-dateTimes-yielding-yearMonthDuration
    	fn:subtract-dateTimes-yielding-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
    
    
    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.
    
    
    Built-ins to handle undefined variables
    ---------------------------------------
    TBD
    
    
    User-defined Built-ins
    ----------------------
    
    User-defined built-ins can be composed of existing 
    pre-defined built-ins or extend other user-defined
    
    
    
    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 
    
    
    Lists Built-Ins
    ---------------
    
    	op:union
    	op:intersect
    	op:except
    
    
    Built-ins for modules handling
    ------------------------------
    	
    	declareModule
    	setModule
    	getModule
    	listModules
    
    
    
    Other listed Built-ins: 
    =======================
    
    	Logic and Control Built-ins 
    	Database Built-ins 
    	Term Comparison Built-ins 
    	Term Manipulation Built-ins 
    	Module handling 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 
    	Operating System Built-Ins 
    	Lists Library Predicates 
    	Sorts Library predicates Built-ins 
    	String Library Predicates 
    


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