MATH 118R Quiz: MATH 118 Harvard 118r Spring 05Quiz4

28 views11 pages
15 Feb 2019
Department
Course
Professor

Document Summary

My signature below certi es that i have complied with the university of pennsylvania"s code of. 1: ocaml and java: true/false (22 points) Variables stored on the stack in the ocaml abstract stack machine are not mutable, although they may refer to mutable records in the heap. b. c. A well-typed ocaml program can fail with an error because it tried to use a null pointer. d. In both java and ocaml, if v1 and v2 are references, then the expression v1 == v2 evaluates to true exactly when they refer to the same location in the heap. e. In ocaml, if s and t are variables of type string such that s == t, then s = t is guaranteed to return true. f. In java, if s and t are variables of type string such that s. equals(t), then s == t is guaranteed to return true. g.