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

What are the input devices, What are the Input devices Various devices ...

What are the Input devices Various devices are available for data input on graphics workstations. Most systems have a keyboard and one or more additional devices specially desi

Explain turing reducibility, Explain Turing reducibility?  Exponential ...

Explain Turing reducibility?  Exponential time algorithms typically happens when we solve by searching by a space of solutions known as brute -force search

cell array to a spreadsheet, The xlswrite function can write the contents ...

The xlswrite function can write the contents of a cell array to a spreadsheet.  A manufacturer kepts information on the weights of some parts in a cell array.  Every row stores the

What is page stealing, What is Page stealing? Ans. Taking page frames o...

What is Page stealing? Ans. Taking page frames other working sets is called Page stealing.

Decomposition model of parallel programming, The PVM system supports functi...

The PVM system supports functional and data decomposition model of parallel programming. It attaches with C, C++, and FORTRAN. The C and C++ language bindings for the PVM user inte

Instruction level-levels of parallel processing, Instruction Level It r...

Instruction Level It refers to the condition where different instructions of a program are implemented by different processing elements. Most processors have numerous execution

Explain pass-1 algorithm of passes used in two-pass-assemble, Explain pass-...

Explain pass-1 algorithm of passes used in two-pass assembler? Pass I: (i) Separate the symbol, operand fields and mnemonic opcode (ii) Make the symbol table (iii)

Explain about truth table and logic diagram, Q. Explain about truth table a...

Q. Explain about truth table and logic diagram? A Boolean function can be realized in a logic circuit employing the basic gates: - AND, OR & NOT. Concern here for illustration

Ring, Ring This is a easy linear array where the end nodes are connecte...

Ring This is a easy linear array where the end nodes are connected.  It is equivalent to a engage with wrap around connections. The data transmit in a ring is normally one dire

What is a structure, What is a structure? A structure is a collection o...

What is a structure? A structure is a collection of variables under a single name. These variables can be of different types, and each has a name which is used to select it fro

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