CS 6905 Advanced Topics in Computer Science:
Functional and Logic Programming

Assignment 1

 Family Name       Given Name         Student ID         Signature

Determine the kind (e.g. constant-constant) of unification of each block of terms given below. Also determine the result (succ or fail) and possible bindings of the pairs of terms of each block given below. Just print out this page (“Properties|Finishing/Print on Both Sides”) and fill out the space provided

Kind:

Term 1:        container    constant[]   ll[2]      two[X,Y]   three

Term 2:        nothing[]     constant      ff         two           three[X,Y,Z]

Result:

Bindings:

Kind:

Term 1:        Zoo    dD     fred   _       _22      -0.9999

Term 2:        lion    Xx      _0      two   23        _

Result:

Bindings:

Kind:

Term 1:        U2     e[]      xx[1]      xyxy[X,Y]          xyxy[X,Y]

Term 2:        u[]     _        X            _24                    XY

Result:

Bindings:

Kind:

Term 1:        d1[]   sr[1] kk[1] n[_]   three[X,Y,Z]         two[X,X]

Term 2:        p1[]   rs[2] jk[1] n[Z]   three[a1,b2,c3]     two[u,u]

Result:

Bindings:

Kind:

Term 1:         loc[john,whr[sf,sf]]        loc[X,whr[sf,sf]]

Term 2:        loc[Y,whr[X,X]]              loc[Y,whr[X,X]]

Result:

Bindings:

Kind:

Term 1:        [t,t,u]                      [jk[1],jk[1]]                     [[t,t,u]]

Term 2:        [V,W,X|Y]                [jk[X],jk[X]]                      [[u|X]|Y]

Result:

Bindings:

One way to working out the results and possible bindings is using Relfun's CGI script after scrolling down to "Interface" at http://www.dfki.uni-kl.de/~vega/relfun.html. Or, use your own downloaded version from this Directory (for WINDOWS read INSTALL.txt): http://www.cs.unb.ca/~boley/FLP/resources.html. Then

paste calls of the form Term 1 .= Term 2 into the interaction window.

Maintained by Harold Boley