분류 전체보기411 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. Lecture 6: Environments and Scoping 목차 Learning Objectives - Explain what a "law" is - Explain how to verify that a programming language interpreter satisfies a law - Explain laws that uniquely characterize (simply-typed) functions What is a "Law"? An abstraction can be understood and defined independently of its underlying implementation Abstract definition = syntax + laws A law is an equation between two terms Example: → 왼쪽이 Syn.. 2024. 3. 29. Lecture 5: Functions, Substitution and Environments 목차 Learning Objectives• Explain how function application works by substituting parameters for arguments • Execute simple programs involving lambdas • Explain what name shadowing and name capture is • Implement recursion using only lambdas • Explain how environments are delayed substitutions Functions in ParetExamples Syntax (Lab/Extended) Example Example Function ApplicationParentheses aro.. 2024. 3. 28. 이전 1 ··· 11 12 13 14 15 16 17 ··· 103 다음 반응형