Prev Up Next
Go backward to Question 1
Go up to Top
Go forward to Question 3

Question 2

Define update(Par,Val,Env1,Env2) that is true if Env2 is the same as environment Env1 except that Par has the value Val. You can assume that Par is already assigned a value in Env1.

For example, the query

ask update(b,9,[val(a,4),val(b,5),val(c,7)],E2)
should return E2=[val(a,4),val(b,9),val(c,7)].
  • Solution

  • David Poole

    Prev Up Next