Home

About

Advanced Search

Browse by Discipline

Scientific Societies

E-print Alerts

Add E-prints

E-print Network
FAQHELPSITE MAPCONTACT US


  Advanced Search  

 
Solution Proposal Functional Programming --Sheet 13 (a) W(A 0 , #x. if True (x Nil) (x 1))
 

Summary: Solution Proposal Functional Programming -- Sheet 13
Exercise 1
(a) W(A 0 , #x. if True (x Nil) (x 1))
W(A 0 + {x :: b 1 }, if True (x Nil) (x 1))
W(A 0 + {x :: b 1 }, if True (x Nil)) 1
W(A 0 + {x :: b 1 }, if True)
W(A 0 + {x :: b 1 }, if)
= (id, Bool # b 2 # b 2 # b 2 )
W(A 0 + {x :: b 1 }, True)
= (id, Bool)
mgu(Bool # b 2 # b 2 # b 2 , Bool # b 3 ) = [b 3 /b 2 # b 2 # b 2 ]
= ([b 3 /b 2 # b 2 # b 2 ], b 2 # b 2 # b 2 )
W(A 0 + {x :: b 1 }, (x Nil))
W(A 0 + {x :: b 1 }, x)
= (id, b 1 )
W(A 0 + {x :: b 1 }, Nil)
= (id, List b 4 )
mgu(b 1 , List b 4 # b 5 ) = [b 1 /List b 4 # b 5 ]
= ([b 1 /List b 4 # b 5 ], b 5 )
mgu(b 2 # b 2 # b 2 , b 5 # b 6 ) = [b 5 /b 2 , b 6 /b 2 # b 2 ] 2

  

Source: Ábrahám, Erika - Fachgruppe Informatik, Rheinisch Westfälische Technische Hochschule Aachen (RWTH)

 

Collections: Computer Technologies and Information Sciences