본문 바로가기

전체 글376

Lecture 4: Functions 목차 Learning Objectives- Explain what a higher-order function is; motivate usefulness- Explain what a lambda(λ) is; motivate usefulness- Explain the difference between val and def in Scala- Write simple programs involving lambdas- Explain how function application works by substituting parameters for arguments- Execute simple programs involvnig lambdas  Why Higher-Order Functions?Higher-Order Func.. 2024. 3. 27.
Lecture 8: Negotiation 목차 Why negotiate? Positive sitation: - Win-win opportunities - Short term relations (buying car, bike, etc...) - Long term relations Opposing interests, but also: - Power play (or war) will not lead to a solution (전쟁 등이 해결책으로 이어지지는 않음) - All parties need a solution (common interest) - All parties need to at least pretend to be willing Definitions (외워야 함) Party or Stakeholder - someone that has a.. 2024. 3. 26.
CPL 1-2: Semantics and Transformations 목차 Translating from Java to Paret Example 1) Example 2) Example 3) Example 4) Mandatory Assignment desugar takes an abstract syntax tree (ExprExt) as input, and returns a core syntax tree (ExprC). interp takes a core syntax tree (ExprC) as input, and returns a value (Value). 1. Basics desugar: case TrueExt() => TrueC() case FalseExt() => FalseC() case NumExt(n) => NumC(n) case NilExt() => NilC().. 2024. 3. 26.
Lecture 3: Semantics & Transformations 목차 Learning Objectives- Write interpreters for simple languages - Explain differences, advantages and disadvantages between compilers and interpreters - Know which different types of semantics exist - Apply big-step semantics rules to reduce expressions to values - Explain what desugaring is, and why it is useful - Implement a simple desugarer  Semantics (의미)Semantics is the meaning of program p.. 2024. 3. 26.
CPL 1 : Syntax and Parsing 목차 Parsing by Hand Given the following grammar: (1 + 2) * (1 + 4)를 AST와 Node Version으로 변환. Given the following Grammar: pi * r * r을 AST와 Node Version으로 변환. Given the following grammar: AndC가 OrC보다 먼저. false or true and (true or false) Paret context-free syntax Expr.NumExt = INT // integer literals Expr.TrueExt = [true] Expr.FalseExt = [false] Expr.UnOpExt = [([UnOp] [Expr])] Expr.BinOpExt = [([B.. 2024. 3. 25.
Lecture 2: Syntax & Parsing 목차 Learning ObjectivesUnderstand what grammars are Write your own grammars from a specificationKnow what Algebraic Data Types areDefine your own Algebraic Data Types (in Scala)Apply pattern matching in (Scala) programsCreate abstract syntax tree from programs given a grammar (EXAM QUESTION)Know what s-expressions areWrite simple parsers  Syntax Syntax: the structure of program phrases in a langu.. 2024. 3. 25.
Lecture 1: Introduction 목차 Abstraction (추상화) Programming languages are how we instruct machines to do our bidding The more precisely we can model domain-specific abstractions, the better programs we can write, i.e. - concise - maintainable - efficient - correct Abstraction is the process of generalizing concrete details to focus attention on details of greater importance. What is a Definitional Interpreter Definitional.. 2024. 3. 19.
Lecture 7 pt 2: Background for Software Security and Testing 목차 Why care about C/C++? Software in C/C++ is necessary because: - it is performant (성능 기준에 맞는) - it facilitates communication with or control of the hardware (하드웨어 컨트롤) A lot of languages, including safe languages still use components in C/C++ We have inherited a lot of (legacy) software coded in these languages CPUs only Understand Binary C, C++ code → Compiler → Binary code For other language.. 2024. 3. 18.
반응형