next up previous
Next: postinfer.n Up: Implementation Previous: utils.n

preinfer.n

PreInfer.preinfer: String_ast.Ast.topdec -> String_ast.Ast.topdec simplifies value bindings in a given ast program in order to help the accuracy of the analysis. Simplifications are as follows:

val k a = k e  --->  val a = e
val {a, b}={a=e1, b=e2}  --->  val a = e1 and b = e2
val ref a = ref e  --->  val a = e
val (a, b) = (e1, e2)  --->  val a = e1 and b = e2
val [a, b] = [e1, e2]  --->  val a = e1 and b = e2
val [|a, b|]=[|e1, e2|]  --->  val a = e1 and b = e2
val p = (e1; e2; e3)  --->  val _ = (e1; e2) and p = e3



Sukyoung Ryu
2001-08-31