일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
- Classification
- 딥러닝
- gpt
- OpenAI
- 머신러닝
- AI
- GPT-4
- ChatGPT
- supervised learning
- 오블완
- LG Aimers
- 분류
- LLM
- 해커톤
- 지도학습
- 티스토리챌린지
- PCA
- LG Aimers 4th
- LG
- deep learning
- 회귀
- regression
- Machine Learning
- Today
- Total
목록4학년 1학기 전공/컴파일러 (8)
SYDev

경희대학교 허선영 교수님의 컴파일러 수업을 기반으로 정리한 글입니다. 0. BackgroundsProcess in MemoryMemory LayoutText section: 프로그램 코드Data section: (uninitialized and initialized) 전역 변수Stack section: 일시적 데이터함수 파라미터, 리턴 어드레스, 지역 변수Heap section: 런타임에 동적으로 할당되는 메모리ELF File FormatExcecutable and Linkable Formatsource program -> compiler -> target binarytarget binary의 포맷 중 하나가 ELF컴파일 결과를 sections 나누어서 저장단순히 machine codes만 저장하는 것이..

경희대학교 허선영 교수님의 컴파일러 수업을 기반으로 정리한 글입니다. 0. IntroductionUnderstanding the meaning of a sentence -> 문장의 의미를 유추Check ambiguity & typeex) Jack and Jack left her homework at home잭은 몇 명?jack과 her의 미스매치 1. Semantic Analysiseach expression이 correct type을 가지는지x + y -> x는 int, y는 string이면 errortranslate Abstract Syntax Tree -> Intermediate Representation(IR) TreesSemantic analyzer also can checkAll identif..

경희대학교 허선영 교수님의 컴파일러 수업을 기반으로 정리한 글입니다. 1. Shift-Reduce Parsing - LR(k) Parsingpredictive parser: 어떤 production이 사용될지 예측오른쪽 항 전체에 해당하는 입력 토큰을 볼 때까지 결정을 미룲LR(k)Left-to-right parseRightmost derivationk-token lookaheadpredictive parsing(LL aprsing)보다 더 많은 grammars에 대해서 parsing 가능- 동작 방식parser는 stack & input을 가짐stack contents & next input token에 의해서, 2가지 동작 중 하나가 결정됨Shift: top of stack에 next input을 p..

경희대학교 허선영 교수님의 컴파일러 수업을 기반으로 정리한 글입니다. 1. Front-end Compilation- Lexical Analysis문장을 토큰 단위로 분류하는 과정정규 표현식을 사용하여 문장을 의미 단위로 구분- Syntax AnalysisLexical Analysis 과정에서 생성된 토큰을 기반으로 parse tree를 생성- Semantic Analysis프로그램의 선언과 진술이 의미론적으로 정확한지 확인하는 작업syntax analysis와 달리 type checking 진행 2. Syntax AnalysisAbstract Syntax Tree(AST)를 빌드 -> token stream이 valid한지 체크if the token stream is not valid -> syntax ..

경희대학교 허선영 교수님의 컴파일러 수업을 기반으로 정리한 글입니다. Goals of this AssignmentBuild a lexical analyzer for a new language, using a lexer generator for OCaml(ocamllex)know how to write a regular expression to represent a given set of stringsUnderstand how to write and debug ocamllex specification ocamllexocamllex: lexer generator for OCamlocamllex specification consists of three parts as shown in the example in..

경희대학교 허선영 교수님의 컴파일러 수업을 기반으로 정리한 글입니다. OCaml(Objective Caml)Functional Programming Language: 함수의 구성 & 추가로 프로그램이 설계되는 Functional Programming 방식을 사용하는 언어Functional programming language에서 function은 인자로서 전달되고, 자료구조에 저장되고, function calls의 결과로 반환된다. OCaml은 정적 타입 언어 -> 변수와 함수의 타입이 Compile time에 결정됨한 번 변수를 바인딩하면 변경 불가 x = x + 1 형태로 변경 불가값을 바꾸고 싶으면 새롭게 리바인딩해야함 let x = x + 1Syntax- Data Types - Operators-..

경희대학교 허선영 교수님의 컴파일러 수업을 기반으로 정리한 글입니다. 1. Front-end Compilationsource program -> target program 번역 과정에는 IR(Intermediate Representation)이라는 중간 언어 번역 과정 존재Front-end Compilation: source program -> IRLexical AnalysisSyntax AnalysisSemantic AnalysisIR Code GenerationBack-end Compilation: IR -> target program2. Lexical언어를 이해하는 첫 번째 stepwords를 구분 -> the smallest unit above lettersex) This is a sentence..

경희대학교 허선영 교수님의 컴파일러 수업을 기반으로 정리한 글입니다. What is a Compiler?compiler: source language로 작성된 프로그램을 기능적으로 동등한 target language로 작성된 프로그램으로 번역하는 프로그램compiler may support source- and target- independent compilationcompiler can also optimize program to enhanceperformanceprogrammabilitysecurity Compiler vs Interpreter Interpreter: execution + translation을 sequence 단위로 동시에 수행파이썬 사용 시에 최대 성능이 제한됨컴파일된 프로그램은 ..