본문 바로가기

학교47

CPL 4: Mutation and State case LetRecExt(binds, body) => { val newBody = binds.reverse.foldLeft(desugar(body)) { case (accBody, bind) => SeqC(SetC(bind.name, desugar(bind.value)), accBody) } AppC(FdC(binds.map(_.name), newBody), binds.map(bind => UninitializedC()))}-----------------------------------------------------------------------------------case IdC(c) => { val loc = lookup(c, nv) val value = fetch(loc, st1.. 2024. 4. 5.
Lecture 5: Expert Evaluation 목차 Evaluation Evaluation is any type of test/measure to see how well something performs Most evaluations involve people, but some not (e.g. ML algorithms) Evaluation is part of the process, not just about the final product → Iterative Development Is it good enough with respect to X? How good is X? Is X better in system A or B? What effect does it have? What is wrong with respect to X? Evaluation.. 2024. 4. 1.
Lecture 7-8: Mutation and State 목차 Learning Objectives - Explain how pointers work and how memory can be interpreted in different ways - Explain the differences between pass-by-reference and pass-by-value - Explain the differences between pure and impure languages - Understand the concept of stores and as an model for memory - Explain different methods to solve the problem of garbage - Implement a definitional interpreter with.. 2024. 4. 1.
CPL 3: Function Interpretation and Environments 목차 Environments Basic Functions Environments represent the bindings available at different locations. Environment = list of bindings Bind is a case class (ADT) Bind(name: String, value: Value) E.g. Environment = [Bind("x", NumV(3)), Bind("y", NumV(5))] Difference between maps: environments allow for duplicate keys → allow access to shadowed bindings 1. add() def add(myEnv: Environment, name: Str.. 2024. 3. 31.
반응형