Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Sounds interesting. I have had unification on my mind a lot lately as well. Unification just makes life really nice, as you can be declarative instead of imperative. Modern functional languages like OCaml and (especially) Haskell use tons of unification. The most notable application is for the various forms of case statements you'll find in these languages (either explicit case statements or implicit conditional behavior, like function overloading & multimethods), so I think of unification mainly as a method for conditional behavior based on the structure of the data involved.

I don't know a lot about heavy-duty logic programming, so I'm wondering what (if any) kinds of logic programming paradigms aren't easily do-able with nothing but a good unification-based case statement (perhaps in the guise of multimethod dispatch)?

In other words, I'm seriously interested in an entirely separate module which allows robust unification of perl data structures.
Again, the application to case statements makes this sound like it's in a similar vein to P6's "~~" smart match operator.
The main problem that I see is what happens when one tries to unify two conditionally bound objects? Should a junction be the result? Should the unification fail because we have nothing real to bind to? Should they only be allowed to unify iff they are identical? Is there any merit to this idea at all?
A junction/intersection is the only interpretation that makes any sense to me.

If you think of unification using a geometric interpretation, the unbound variables in the unification problem are the basis of a vector space, the constraints are linear/affine (in)equalities in that space, and the solution of the unification is the intersection of all the affine constraints. Think of unifying (x,x,y) with (x,y,y). The 2-d vector space of assignments to {x,y} collapses to a 1-d vector space.

Of course the constraints you are considering aren't affine, and the spaces aren't exactly vector spaces, but the intuition is the same. Under this interpretation, it's clear that you would want to take the intersection of the ranges of two "conditionally bound" objects.

blokhead


In reply to Re: (OT) Pushing inductive systems to their limit by blokhead
in thread (OT) Pushing inductive systems to their limit by Ovid

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2024-04-19 14:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found