Advertisement
Guest User

Untitled

a guest
Jan 18th, 2018
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. bexp2store True_ _ = return True
  2.  
  3. bexp2store False_ _ = return False
  4.  
  5. bexp2store (BVar x) _ = ($x)
  6.  
  7. bexp2store (Or bs) st = do
  8.  
  9. is <- mapM (\x -> bexp2store x st) bs
  10.  
  11. return (or is)
  12.  
  13. bexp2store (And bs) st = do
  14.  
  15. is <- mapM (\x -> bexp2store x st) bs
  16.  
  17. return (and is)
  18.  
  19. bexp2store (Not bs) st = do
  20.  
  21. i <- bexp2store bs st
  22.  
  23. return (not i)
  24.  
  25. bexp2store (e1 := e2) st
  26.  
  27. = return ( exp2store e1 st == exp2store e2 st)
  28.  
  29. bexp2store (e1 :<= e2) st
  30.  
  31. = return ( exp2store e1 st <= exp2store e2 st)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement