Re: Rules ASCII Syntax: Ordered and Unordered Options

From: pat hayes ([email protected])
Date: 06/03/03

  • Next message: Sandro Hawke: "Re: DRAFT: List of Built-ins"
    Hi Harold, a few questions about your selector notation. We have been 
    thinking along similar lines for SCL, hence the details. If the 
    answers are published somewhere just point me at that.
    
    >Hi Sandro,
    >
    >>  > In the example, the individual constant "5.0 percent" can be 
    >>analyzed as the
    >>  > cterm percent[5.0], and the constant "2003/04" can be analyzed as either a
    >>  > positional cterm interval["2003","2004"] or again as an 
    >>object-oriented cterm
    >>  > interval[start->"2003";end->"2004"]. Note that square brackets 
    >>are preferable
    >>  > for cterms to clearly set them off from the parenthesized atoms.
    >>
    >>  cterms are construction functor expressions?    This syntax is new to
    >>  me; where does it come from?   Does it have detractors?
    >
    >Yes, originally 'complex terms' are exactly what Prolog calls 
    >'structures'. The
    >distinction between (round) parentheses for active calls and [square] brackets
    >for passive structures was introduced in Relfun -- cf. 
    >http://www.relfun.org/ or
    >http://www.cs.unb.ca/~boley/cs6905/cs6905FLP.pdf -- and can be seen 
    >as an obvious
    >generalization of Prolog's list notation via a polyadic tup 
    >constructor, so that
    >[e1,...,eM] is definable as tup[e1,...,eM].
    
    SCL follows KIF in allowing polyadicity explicitly, so we can define 
    tup axiomatically, so this is also natural for us.
    
    >
    >Later, in Object-Oriented RuleML, we have permitted 'complex terms' to *also*
    >contain unordered roles with their fillers,  or -- as in F-Logic -- to *only*
    >contain such frame-like 'slots'. In that sense, this is a merger of Prolog and
    >F-Logic.
    >
    >Well, a 'detractor' --  which sounds better as the antonym for 
    >'constructor' than
    >'destructor' does -- in a unification-based language such as Prolog, 
    >Relfun, or
    >F-Logic can be represented by a local unification and variable 
    >dereferencing for
    >the selected part of the complex data structure (BTW, John McCarthy 
    >in his work
    >on abstract syntax used 'selector' as the antonym for 'constructor').
    
    First question, how does one unify a term which selects a 
    subexpression which isn't present? Does the unifier have to supply a 
    suitable binding, or does the unification fail?
    Eg consider unifying
    interval[StartDate, EndDate] with a single variable ?x
    
    >So we can access the start date of interval["2003","2004"] by unifying it with
    >interval[StartDate,EndDate] and dereferencing StartDate to "2003". 
    >Similarly, we
    >can access the end date of interval[start->"2003";end->"2004"] via unification
    >with interval[start->StartDate;end->EndDate] and dereferencing 
    >EndDate to "2004".
    
    When is dereferencing performed? (Only during unification?) What is 
    the difference between dereferencing and binding? The above first 
    example looks like a normal unification if we read 'StartDate' as a 
    variable; what does it mean to dereference a variable?
    
    Does  interval[start->A; end->B] unify with interval[A,B] ? How about
    interval[start->?x; end->B] unified with interval[A,B] ? Does that 
    bind ?x to A ; if so, what is the common instance?
    What happens if we put the variable on the other side:
    interval[start->A; end->B] unify with interval[?x,B]  ? Does this 
    bind ?x simply to B or to something that indicates the 'end' role? 
    What is the common instance? (More generally, how is instantiation 
    defined over Cterms? )
    
    Does f[a->A] unify with f[a->A, b->B] ?
    
    (The reason for asking this is that in one interpretation, any 
    'missing' roles should be interpreted as existentials, eg that would 
    be appropriate for case-grammar or event description logics, and then 
    this kind of unification would be appropriate.)
    
    Can I write a variable in a role position, eg:  f[?x->A] unify with f[a->A] ??
    
    >But instead of / in addition to this, we can introduce a 'universal' 
    >selector sel,
    >parameterized by either a positive integer or a role name.
    >
    >sel[1](interval["2003","2004"]) would return "2003".
    >sel[end](interval[start->"2003";end->"2004"]) would return "2004".
    
    What about
    sel[1](interval[start->"2003";end->"2004"]) ? Is that "2003" or undefined?
    
    Final question: what is the point of all of this? Why bother writing
    
    sel[1](interval["2003","2004"])  when you could just write "2003" ?
    
    Is the following meaningful?:
    
    sel[1](?x)= "2003"
    when ?x bound to interval["2003","2004"] ?
    
    It seems to me that if this works then you ought to be able to use 
    this to mimic higher-order unifications.  Has that been tried?
    
    Pat
    -- 
    ---------------------------------------------------------------------
    IHMC					(850)434 8903 or (650)494 3973   home
    40 South Alcaniz St.			(850)202 4416   office
    Pensacola��������������			(850)202 4440   fax
    FL 32501�����������				(850)291 0667    cell
    [email protected]	          http://www.coginst.uwf.edu/~phayes
    [email protected]   for spam
    


    This archive was generated by hypermail 2.1.4 : 06/03/03 EST