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

Assignment 1


Syllabus
Assigns
Notes
Projects
Resources

Family Name       First 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:        x        r[]      ll[2]      two[X,Y]   three

 

Term 2:        y[]      r        ff         two           three[X,Y,Z]

Result:

 

Bindings:

 

 

Kind:

Term 1:        Z        d        fred   _       _22      -0.9999

 

Term 2:        c        X        _0      two   23        _

 

Result:

Bindings:

 

 

Kind:

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

 

Term 2:        g[]     _        X            _24                    XY

 

Result:

Bindings:

 

Kind:

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

 

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

 

 

Result:

Bindings:

 

 

Kind:

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

 

Term 2:        plce[Y,whr[X,X]]            plce[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:

Paste calls of the form Term 1 .= Term 2 into the "Query (batch):" window.

 

 

 


Maintained by Harold Boley