Re: DRAFT: List of Built-ins

From: Sandro Hawke (
Date: 06/04/03

  • Next message: Sandro Hawke: "Wanted: Test Case for Herbrand Semantics"
    > >  > As promised, please find, attached, the list of built-ins. This is a
    > >>  draft, a new version will be available next week with much more details.
    > >
    > >Understood; feel free to answer my questions in that new version
    > >instead of e-mail, if that works better.
    > >
    > >General question: how do you propose to organize built-ins in terms of
    > >input vs. output vs. bi-directional parameters?  EG addition and
    > >subtraction can be the same predicate:
    > >     sum(3,4,7)   true if 3+4=7
    > >     sum(3,4,?x)  binds ?x to 7 if unbound
    > >     sum(3,?y,7)  binds ?y to 4 if unbound
    > Does
    > sum(times(?x,?x),?y,0)
    > sum(times(2,?x), 1, ?y)
    > get ?x bound to  -1 ?
    Is your question whether systems of equations get solved?  I think the
    answer is "no", although I suppose it's possible.
    My question was just about the in/out signature of the sum predicate.
    Prolog documentation usually includes this information in the
    documentation of each builtin, like:
        append(?List1, ?List2, ?List3)
    where the "?"'s mean it can work in any direction, and
        str_cat(+Str1, +Str2, ?Result)
    which means Str1 and Str2 must already be bound and ?Result may be.
    I was asking if Said was proposing
        sum(+left, +right, ?product)
        sum(+left, +right, -product)     (can't be used to check sum(1,1,2))
        sum(?left, ?right, ?product) 
    ... or what.
        -- sandro

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