On Sunday, December 2, 2012 7:33:17 PM UTC+2, David Nolen wrote:
>
> On Sat, Dec 1, 2012 at 12:24 AM, Jonas <[email protected]
> <javascript:>>wrote:
>
>>
>> * Predicates on logic vars:
>> [(foo (? x number?)) (bar ?x)] => match (foo 42) but not (foo :bar)
>>
>
> This is now possible since we have constraints.
>
Awesome. Is this already in a released version of core.logic? Do you know
of any examples I might study?
>
>
>> * Segment vars:
>> [(* ??x 1 ??y) (* ??x ??y)] => (* 4 3 2 1 2 3 4) would turn into (* 4
>> 3 2 2 3 4)
>> and
>> [(* ??x 0 ??y) 0] => (* 1 2 3 0 4 5 6 7) would turn into 0
>>
>
> This has been possible for some time - but you need to extend unification.
> You need to create a wrapper around sequences and a new kind of logic var.
> Kevin's work on the partial map (PMap) functionality is a good starting
> point as well the work I've done on constrained vars (CVar).
>
I'd be interested in creating an SVar ("segment var") then. I'll start by
trying to understand yours and Kevins work on CVar/PMap.
>
> As far as doing a computer algebra system, I know things like this have
> been done before in Prolog so I don't see why not.
>
Sorry, I didn't mean to imply that it couldn't be done in core.logic, only
that the kibit rule system isn't as expressive as I'd like it to be.
Jonas
>
> David
>
>>
>
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en