Giter Club home page Giter Club logo

Comments (4)

AlexKnauth avatar AlexKnauth commented on September 3, 2024

Is this intentional? The readme mentions something about absento needing a "ground atom." If it was intentional, why isn't this an error?

from faster-minikanren.

webyrd avatar webyrd commented on September 3, 2024

The original implementation of absento supported arbitary terms, including fresh logic variables, as the first argument to absento. I think this general behavior should be supported. If not, at least allowing a fresh variable representing an atom should be supported. If not, signalling an error if the first argument is the wrong type, or isn't ground, is the correct behavior.

Michael, would it be difficult to support the full general behavior of absento? Is this a reification problem? An attributed variables problem? An efficiency problem?

Thanks!

from faster-minikanren.

webyrd avatar webyrd commented on September 3, 2024

I just submitted my first ever pull request! :)

#3

This patch checks that the first argument to absento is a ground error--otherwise it signals an error.

Handling generalized absento constraints using faster-miniKanren's attributed variables architecture looks tricky to me. It may be necessary to handle absento constraints specially.

from faster-minikanren.

michaelballantyne avatar michaelballantyne commented on September 3, 2024

@webyrd Is there an example of a tricky case you're thinking about? I'm not sure it's too bad, except perhaps for reification concerns that would be handled by the old reifier this implementation inherits.

(absento a b) is equivalent to: for all subtrees s of b, (=/= a s).

Applying (absento a b) where a and b are fresh logic variables should apply (=/= a b) and add a to the absento part of the constraint record for b. If b is instantiated to a pair (c . d), we'll consult the constraint record and apply (absento a c) and (absento a d), which will create the disequalities and add the absento constraint record to c and d just as we did with b.

Generalized absento still doesn't allow a constraint to restrict the range of values for a variable to a finite range, so it shouldn't break any of the assumptions that make the attributed variable implementation safe.

from faster-minikanren.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.