Variable or compound expression - unification algorithm, Computer Engineering

Assignment Help:

Variable or compound expression - Unification algorithm:

Here some things to note regarding this method are: 

(i) There if really trying to match a constant to a different constant fails this means that they are not equal, neither is a variable or compound expression or in list also. However if we considered none of the cases in unify_internal is true to must return failure.  

(ii) In case 1 and 2 in  unify_variable(var,x,my)  check and finds neither inputs have already been substituted. However if we considered if  x  already has a substitution value and var, rather than x and var so there it does similarly if var already has a substitution. 

(iii) In case 3 we see that in  unify_variable  is called as the  occurs-check  case or occur-check. However if we considered this is important to visualize we got to the stage when to complete a unification if we required to substitute X into say, f(X,Y). However if we considered we would write  f(X,Y)  instead of X. After than this still has an  X  in it! Thus we would use to substitute  X  by  f(X,Y)  and again giving us as:  f(f(X,Y),Y)  so it  is obvious why we should never have tried this substitution in the first placeis means that this process will never end. However the occurs check makes sure this isn't going to happen before case 4 returns a substitution. But in realty the rule is:; that you cannot substitute a compound  for a variable so such variable appears in the compound already that you will never get rid of the variable. 

(iv) However if we considered unify_internal(op(x),op(y),mu)) a part of case 5 in unify_internal checks whether the operators of the two compound expressions are the same. Just because of it will return false if, considered an example where it tries to unify two predicates into different names or a  with symbol.


Related Discussions:- Variable or compound expression - unification algorithm

Arithmetic pipeline, Arithmetic Pipeline The complex arithmetic operati...

Arithmetic Pipeline The complex arithmetic operations like floating point and multiplication operations use a lot of the time of the ALU. These operations can also be pipelined

Explain fundamental models of inter process communication, Explain the two ...

Explain the two fundamental models of inter process communication. Two kinds of message passing system are given as: (a) Direct Communication : Along with direct communicat

Which rule is used for the expansion of nested macro calls, The expansion ...

The expansion of nested macro calls done by using of? Ans. LIFO rule is used for the expansion of nested macro calls.

What is the benefit of report wizard over an auto report, What is the benef...

What is the benefit of Report Wizard over an Auto Report? It takes a little more work to make a report with the report wizard than with the Auto Report but you have a lot more

What is the fundamental digital design, What is the fundamental Digital Des...

What is the fundamental Digital Design? Digital design is distinct through analog design. In analog circuits we deal along with physical signals that are continuous in amplitud

Estimate the size of the state space, 1. The missionaries and cannibals pro...

1. The missionaries and cannibals problem. Three missionaries and three cannibals are on the left river bank, with a boat that can hold one or two people. If on either side of the

Shell script, shell script to find whether the given number is Armstrong or...

shell script to find whether the given number is Armstrong or not

Explain use of mpi functions with an example, Q. Explain use of MPI functio...

Q. Explain use of MPI functions with an example? include int main(int argc, char **argv) { int i, tmp, sum, s, r, N, x[100]; MPI_Init(&argc, &argv); MPI_Comm_size

Pci bus transactions - computer architecture, PCI bus transactions: PC...

PCI bus transactions: PCI bus traffic is prepared of a series of PCI bus transactions. Each transaction is build up of an address phase that is followed by 1 or more data phas

What is polling, What is polling? Polling is a scheme or an algorithm t...

What is polling? Polling is a scheme or an algorithm to recognize the devices interrupting the processor. Polling is employed when multiple devices interrupt the processor by o

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd