본문 바로가기

분류 전체보기411

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.
반응형