Re: ISSUE-92: n-ary builtins

Lets try to find an option we can all live with from among the following on the 
upcoming telecon:

Current status:

Of the options discussed so far, the following remain:

1. Make it clear this is only shorthand for the purposes of writing DTB, and 
that all  rulesets must use a fixed arity function/predicate

1a. specify one rather than n different functions. So, in the case of concat we 
would only have a binary string concatenation function. Clearly all the others 
can be built from this base case.

3a. Remove all the well-formedness requirements. The same symbol can have 
several arities, can be a pred, func, and an individual in different contexts.

3b. To keep the separation between preds, funcs, and individuals, but pred, 
func, external symbols can have multiple arities.

3c. To keep things as before, but for external symbols to allow multiple arities 
(and maybe even allow them to be funcs and preds in different contexts).


Description:
The basic issue is that BLD (and core) require all predicates and functions to 
have a fixed arity, but in DTB we reuse many xpath/xquery functions and 
predicates, and there are several that do not have a fixed arity (e.g. concat).

In DTB, the treatment of these operators is unclear:

 > "numbering the different versions of the respective built-ins and treating the
 > unnumbered version as syntactic sugar, i.e. for instance instead of External(
 > func:concat2( str1, str2) ) and External( func:concat3( str1 str2 str3 ) ) we
 > allow the equivalent forms External( func:concat( str1, str2) ) and External(
 > func:concat( str1 str2 str3 ) )."

Does this mean that BLD should allow rulesets to use concat with any arity, or 
does it mean that for the purposes of DTB we write concat as a shortcut for 
whichever (concat2, concat3, etc) is appropriate?



-- 
Dr. Christopher A. Welty                    IBM Watson Research Center
+1.914.784.7055                             19 Skyline Dr.
cawelty@gmail.com                           Hawthorne, NY 10532
http://www.research.ibm.com/people/w/welty

Received on Friday, 13 March 2009 17:52:01 UTC