Comments (4)
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.
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.
I just submitted my first ever pull request! :)
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.
@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)
- Bignums, big problem HOT 4
- dead link in readme HOT 1
- Use variable-age ordering to simplify disequality
- Integrate atomic type constraints with unification
- Room to cleanup compatibility layer
- `vars` may produce duplicates
- Unused argument in reifier
- Chicken scheme support? HOT 1
- Add generalized absento HOT 5
- Support variable unification in matche patterns HOT 1
- Disequality constraint not being honored HOT 3
- Does not compile with Guile 2.2.3 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from faster-minikanren.