Language translators and IDEs
도입됨
19:11
운영 체제
당신은 그것을 본 적이 없고, 앞으로도 절대 볼 수 없으나 — 그것은 항상 존재합니다. 당신이 여는 모든 앱, 저장하는 모든 파일, 화면을 터치할 때마다, 보이지 않는…
영어 내레이션 · 영어와 중국어 자막 전환 가능
이 수업의 내용
| English | 의미 |
|---|---|
| compiler/kəmˈpaɪlə/ | 컴파일러 |
| programmer | A person who writes and develops computer programs. |
| machine instructions | Commands in machine code that a processor can execute directly. |
| arithmetic/əˈrɪθmətɪk/ | Calculations with numbers, such as adding and subtracting. |
| source code/sɔːs kəʊd/ | 소스 코드 |
| translator/trænˈsleɪtə/ | 번역기 |
| machine code/məˈʃiːn kəʊd/ | 머신 코드 |
| processor/ˈprəʊsesə/ | The component that executes instructions and performs the operations of a computer or similar system. |
| compiling | The process of translating a whole program before it runs. |
| interpreting | The process of translating and executing a program one statement at a time. |
| assembler/əˈsemblə/ | 어셈블러 |
| assembly language/əˈsemblɪ ˈlæŋɡwɪdʒ/ | 어셈블리 언어 |
| mnemonic instruction | An assembly language command that uses a short word for an operation. |
| labels/ˈleɪblz/ | Names used to mark positions in a program's code. |
| symbolic addresses | Names used to refer to memory locations instead of their actual addresses. |
| addresses | Numbers that identify specific locations in a computer's memory. |
| hardware/ˈhɑːdweə/ | The physical parts of a computer system that can be touched. |
| device drivers/dɪˈvaɪs ˈdraɪvəz/ | Programs that allow an operating system to control hardware devices. |
| embedded systems | Computers built into larger devices to perform specific tasks. |
| loops | Parts of a program that repeat instructions a number of times or until a condition is met. |
| high-level program | A program written in a language designed to be easier for people to understand. |
| object code/ˈɒbdʒekt kəʊd/ | 오브젝트 코드 |
| executable/ɪɡˈzekjʊtəbl/ | 실행 파일 |
| syntax errors | Mistakes that break the rules for writing code in a programming language. |
| run time/rʌn taɪm/ | The period during which a program is running on a computer. |
| operating system/ˈɒpəreɪtɪŋ ˈsɪstəm/ | System software that manages hardware resources and provides services for applications. |
| interpreter/ɪnˈtɜːprɪtə/ | 인터프리터 |
| statement/ˈsteɪtmənt/ | A line of code that tells a program what to do. |
| execution speed | The rate at which a computer carries out a program's instructions. |
| portability | The ability of a program to run on different platforms. |
| platform/ˈplætfɔːm/ | The combination of processor and operating system on which a program runs. |
| debugging/ˈdiːbʌɡɪŋ/ | The process of finding and correcting errors in a program. |
| bytecode/ˈbaɪtkəʊd/ | 바이트코드 |
| portable/ˈpɔːtəbl/ | 이식 가능함 |
| virtual machine/ˈvɜːtʃuːəl məˈʃiːn/ | 가상 머신 |
| just-in-time compilation/dʒʌst ɪn taɪm ˌkɒmpɪˈleɪʃn/ | 지연 컴파일 |
| native code | Machine code that can run directly on a particular processor. |
| console mode | A way of running a program using text input and output. |
| command line | A place where users type text commands to interact with a computer. |
| integrated development environment/ˈɪntɪɡreɪtɪd dɪˈveləpmənt enˈvaɪrənmənt/ | 통합 개발 환경 |
| context-sensitive prompts/ˈkɒntekst ˈsensɪtɪv prɒmpts/ | 문맥 민감提示 |
| identifiers | Names chosen by programmers for parts of a program. |
| keywords/ˈkiːwɜːdz/ | Words with special meanings that are part of a programming language. |
| parameters/pəˈræmɪtəz/ | Values that specify a model or function, or named inputs that a subroutine receives. |
| auto-complete/ˈɔːtəʊ kəmˈpliːt/ | 자동 완성 |
| dynamic syntax checks/daɪˈnæmɪk ˈsɪntæks tʃeks/ | 동적 구문 검사 |
| prettyprint/ˈpretɪprɪnt/ | 코드 포맷팅 |
| strings/strɪŋz/ | Sequences of characters used as text in a program. |
| comments/ˈkɒments/ | Explanatory text in source code or markup that does not execute as a program instruction. |
| indentation/ˌɪndenˈteɪʃn/ | Space placed at the start of a line to show structure, including code blocks in languages that use it syntactically. |
| expand and collapse | A feature that shows or hides sections of code. |
| block/blɒk/ | A group of statements treated as a single section of code. |
| breakpoints/ˈbreɪkpɔɪnts/ | 브레이크 포인트 |
| single stepping/ˈsɪŋɡl ˈstepɪŋ/ | 단위 실행 |
| variables/ˈveərɪəblz/ | A quantity or named value that can change or take different values. |
| expressions | Combinations of values and operations that produce a value. |
| report window/rɪˈpɔːt ˈwɪndəʊ/ | 보고서 창 |
| warnings | Messages that point out possible problems in a program. |
| function/ˈfʌŋkʃn/ | A mapping that assigns exactly one output to each allowed input. |
| logic error/ˈlɒdʒɪk ˈerə/ | A mistake in an algorithm or program that produces an incorrect result despite valid syntax. |
| run-time error messages | Messages that report errors occurring while a program is running. |
컴퓨터가 자체 프로그램을 작성할 수 있을 거라고 믿은 사람은 아무도 없었다
- 1952 그레이스 호퍼는 프로그래머의 표기법을 기계어 명령어로 변환하는 첫 번째 컴파일러를 개발했다. 그녀는 나중에 이렇게 말했다. "누구도 그것이 가능하다고 믿지 않았다. 내가 작동하는 컴파일러를 가지고 있었지만 아무도 건드리려 하지 않았다. 그들은 컴퓨터가 산술 연산만 할 수 있다고 했다."
- Every language you have used since rests on that idea: you write source code for people, and a translator produces the machine code the processor runs.
- 세 가지 종류의 번역기와 하나의 유명한 하이브리드_program이 있으며, 시험에서는 언제 어떤 것을 사용할 것인지, 그리고 왜 그렇게 해야 하는지를 설명하길 원한다.
- 이 수업은 번역기에 대해 다루며, 컴파일과 인터프리팅 사이의Trade-offs, 자바가 두 가지를 혼합한 방식, 그리고 IDE가 제공하는 도구들에 관해 설명한다.
소스 코드, 기계어 및 어셈블러
- 프로세서는 기계어만 실행한다. 번역기(translator) 는 사람들이 읽을 수 있는 프로그램을 기계어로 변환한다.
- 어셈블러(assembler) 는 어셈블리 언어를 기계어로 번역한다: 각 기호화 명령어인
LDD,ADD,JMP는 정확히 하나의 기계어 명령어로 변환되며, 라벨과 기호적 주소는 실제 주소로 교체된다. - 어셈블리는 프로그래머가 하드웨어에 직접 제어를 필요로 하는 경우에 사용된다: 장치 드라이버, 임베디드 시스템, 게임의 가장 내부적인 루프 등.
Match each translator to what it does.
난이도 2/5 · 140코인 + 오늘 첫 완료 시 작은 보너스 추가
Assembler: assembly→machine code; compiler: all-at-once to an executable; interpreter: line by line at run time.
컴파일러
- 컴파일러는 실행되기 전에 고수준 프로그램의 전체를 기계어로 변환하여 오브젝트 코드를 생성합니다. 이는 실행 가능한 파일을 생성하며, 번역 과정이 끝난 후 모든 구문 오류를 한 목록으로 함께 보고합니다.
- 프로그램 자체를 실행하지는 않습니다. 코드가 정상화되면 컴파일러가 설치되어 있지 않아도 실행 파일은 원하는 만큼 여러 번 실행할 수 있습니다.
- 실행 중에는 아무것도 변환하지 않으므로 실행 속도가 빠르지만, 기계어는 특정 프로세서와 운영 체제에만 종속됩니다.
The compiler route: source to running program
Step through how a compiler works — translating the whole program once, before it runs. Contrast it with an interpreter, which translates and runs one line at a time.
A compiler differs from an interpreter because it:
난이도 1/5 · 100코인 + 오늘 첫 완료 시 작은 보너스 추가
A compiler translates all at once into an executable that runs without the compiler. An interpreter runs line by line.
Put the compiler route in order, from writing code to running it.
난이도 3/5 · 200코인 + 오늘 첫 완료 시 작은 보너스 추가
A compiler translates the whole program once into an executable; that file then runs without the compiler.
인터프리터
- 인터프리터는 고수준 프로그램의 문장 하나를 한 번에 번역하고 바로 실행한 후 다음 문장으로 넘어갑니다.
- 실 가능한 파일을 생성하지 않습니다.symptom을 처음 encountering하면 해당 줄과 함께 보고하므로 수정 후 다시 실행할 수 있습니다.
- 프로그램이 실행될 때마다 소스 코드와 인터프리터가 모두 존재해야 하며, 매번 재번역되므로 실행 속도가 느리지만, 인터프리터가 있는 곳이라면 동일한 소스 코드를 어디에서나 실행할 수 있습니다.

한 번 번역하여 배포하거나, 진행하면서 번역하기

When does an interpreter report an error?
난이도 1/5 · 100코인 + 오늘 첫 완료 시 작은 보너스 추가
An interpreter runs line by line, so it reports an error at the moment it reaches that line — handy during development.
An interpreter produces no stand-alone executable, so the interpreter itself must be installed to run the program.
난이도 1/5 · 100코인 + 오늘 첫 완료 시 작은 보너스 추가
An interpreter translates and runs line by line each time — there is no separate executable to ship, unlike a compiler.
장단점 (채점 기준서 기준)
| 컴파일러 | 인터프리터 | |
|---|---|---|
| 실행 속도 | 빠름(이미 기계어) | 느림(매 행 시 번역됨) |
| 사용자에게 필요한 것 | 실행 파일만; 소스는 비공개 유지 | 소스 코드와 인터프리터 |
| 오류 탐지 | 번역 후 한 번에 전체 나열 | 개발 중 각 줄마다 즉시 보고 |
| 코드 변경 | 전체 재컴파일 | 편집 후 즉시 재실행 |
| 이식성 | 단일 플랫폼; 각 플랫폼마다 재컴필 필요 | 인터프리터가 있는 곳이라면 어디서나 실행 가능 |

You should choose a compiler when:
난이도 1/5 · 100코인 + 오늘 첫 완료 시 작은 보너스 추가
Compiled executables are fast and stand-alone. Interpreters suit quick development and portable scripts.
Which points favour using an interpreter while developing a program? Select 모든 that apply.
난이도 2/5 · 140코인 + 오늘 첫 완료 시 작은 보너스 추가
Fast edit-run cycles and errors at their line are the interpreter's strengths. Run-time speed is the compiler's.
worked example: 작성 중에는 인터프리터, 완성 후에는 컴파일러 사용
- 개발자가 프로그램을 작성할 때는 인터프리터를 사용하고, 완료된 후에는 컴파일러를 사용합니다. 각 도구가 어떻게 사용되는지 설명하십시오. [4]
- 개발 단계에서 인터프리터는 완전한 번역을 기다리지 않고 부분적으로 작성된 프로그램을 즉시 실행합니다. 오류를 encountered하면 해당 줄을 보고하므로 개발자는 수정 후 즉시 다시 실행할 수 있습니다: 디버깅을 용이하게 하는 빠른 수정-실 사이클입니다.
- 프로그램이 완성되면, 컴파일러는 전체 프로그램을 더 빠르게 실행할 수 있는 실행 파일로 번역하며, 사용자의 컴퓨터에 번역기를 필요로 하지 않고 소스 코드를 비공개로 유지합니다.
- 각 도구당 2점: 기능 및 해당 단계에 적합한 이유.
자바: 부분 컴파일, 부분 인터프리트
- 자바 소스는 바이트코드라는 압축적이며 이식 가능한 중간 형태로 컴파일되며, 이는 실제 프로세서를 위한 기계어가 아닙니다.
- A virtual machine, the JVM, then interprets the bytecode on whatever machine it runs on, or uses just-in-time compilation to turn the busiest parts into native code while the program runs.
- 컴파일 단계에서는 조기에 구문 오류를 포착하고, 인터프리팅 단계에서는 하나의 바이트코드 파일을 JVM이 있는 곳이라면 어디에서나 실행할 수 있게 합니다. 콘솔 모드의 자바는 명령줄에서 실행되는 텍스트 프로그램으로 교재의 예시입니다.

한 번 작성, 어디서나 실행: 하나의 바이트코드 파일, 플랫폼별 하나의 JVM

Java compiles to bytecode that runs on a JVM. The main benefit is:
난이도 1/5 · 100코인 + 오늘 첫 완료 시 작은 보너스 추가
Bytecode is platform-independent; any JVM can run it (with JIT giving near-native speed for hot code).
Java's compiler produces platform-independent ____, which a virtual machine then interprets.
난이도 1/5 · 100코인 + 오늘 첫 완료 시 작은 보너스 추가
Bytecode is an intermediate form: compiled once, then run by the JVM on any platform. That is what makes Java partially compiled and partially interpreted.
이 카드는 내용이 수정되어 번역이 업데이트될 때까지 영어로 표시됩니다.
Worked example: why compile to bytecode and then interpret?
- Explain why Java is compiled to bytecode rather than straight to machine code.
- A compiler produces machine code for a particular processor and operating system, so the program will not necessarily run on a machine with a different platform.
- Java's compiler targets a virtual machine instead, so the bytecode is identical everywhere. Each platform supplies its own JVM to interpret it.
- The cost is speed: interpreting bytecode is slower than running native code, which is why the JVM adds just-in-time compilation 即时编译 for the hot parts.
IDE와 네 가지 기능 그룹
- An integrated development environment (IDE) is one application for writing, translating, running and debugging a program. The syllabus groups its features in four.
- 코딩용: 컨텍스트 기반 프롬프트가 해당 지점에 맞는 식별자, 키워드 또는 파라미터를 팝업하며, 자동 완성이 이름을 완성해 줍니다.
- 초기 오류 탐지용: 동적 구문 체크는 번역 전 입력 중 실수를 강조 표시합니다. 표시용: prettyprint은 일관된 두공을 사용하여 키워드, 식별자, 문자열, 주석을 서로 다른 색상으로 표시하며, 확대 및 축소는 블록 본체를 숨겨 outlines를 볼 수 있게 합니다.
- 디버깅용: breakpoint는 표시된 줄에서 프로그램 정지; 싱글 스텝은 줄 단위로 실행; 창은 변수 및 표현식의 값을 표시; 보고 창은 오류, 경고, 출력을 나열합니다.

코딩, 오류 탐지, 표시, 디버깅

Which feature is part of an IDE's debugger?
난이도 1/5 · 100코인 + 오늘 첫 완료 시 작은 보너스 추가
A debugger lets you set breakpoints, step through code line by line, and inspect variable values.
Match each IDE feature to its syllabus group.
난이도 2/5 · 140코인 + 오늘 첫 완료 시 작은 보너스 추가
Coding, initial error detection, presentation, debugging: the four groups the syllabus names, one feature each here.
worked example: Calculate()의 버그 찾기
- 함수
Calculate()가 예상치 못한 값을 반환합니다. IDE의 디버깅 기능이 원인을 찾는 데 어떻게 도움이 되는지 묘사하십시오. [4] Calculate()첫 번째 줄에 breakpoint를 설정하여, 전체를 실행하는 대신 그 지점에서 정지하도록 합니다.- 함수를 싱글 스텝으로 한 줄씩 실행합니다. 각 단계 후 변수 값 및 IDE에 감시하도록 요청한 표현식의 값을 읽어내어 기대값과 비교합니다.
- The first line after which a value is wrong is where the logic error is. The report window shows any run-time error messages and output along the way.

일시정지, 단계 실행,inspect

Put the steps of finding a logic error with a debugger in order.
난이도 3/5 · 200코인 + 오늘 첫 완료 시 작은 보너스 추가
Pause, step, inspect, compare, locate. Each is one of the debugging features the syllabus lists.
놓칠 수 있는 점
- 컴파일러는 프로그램을 실행하지 않는다. 전체를 번역하여 실행 가능한 파일을 생성한다.
- 인터프리터는 첫 번째 오류에서 멈추지만, 컴파일러는 모든 오류를 나열한다. 이 둘을 바꾸어 쓰면 안 된다.
- "빠르다"에는 런타임에라는 조건이 필요하고, "이동 가능하다"에는 인터프리터가 있는 곳이라면 어디서나 동일한 소스가 실행된다는 조건이 필요하다.
- IDE 기능을 커리큘럼의 네 가지 그룹으로 분류하라: 브레이크 포인트는 디버깅,prettyprint은 표현, 컨텍스트 민감 프롬프트는 코딩이다. 바이트코드는 기계 언어가 아니다.
이해했습니다
- 어셈블러: 어셈블리 명령어 하나당 기계 언어 명령어 하나 · 컴파일러: 프로그램 전체를 실행 전에 번역하여 실행 가능한 파일과 모든 오류 목록을 생성함 · 인터프리터: 문장 하나씩 순차적으로 실행하며 첫 번째 오류에서 멈추고 실행 가능한 파일 없음
- 컴파일러는 속도, 배포 및 소스의 비공개성을 위해 사용하며, 인터프리터는 빠른 편집-실행 사이클, 이동 가능성 및 초급자를 위해 사용된다.
- Java는 JVM이 해석하거나 JIT 컴파일하는 이동 가능한 바이트코드로 컴파일됨: 부분적으로 컴파일되고 부분적으로 해석됨
- 네 가지 그룹의 IDE 기능: 코딩(컨텍스트 민감 프롬프트), 초기 오류 탐지(동적 구문 검사), 표현(prettyprint, 확장 및 축소), 디버깅(브레이크 포인트, 단일 스텝, 변수, 리포트 창)
어떤 문제가 있었나요? 사이트 팀만 이 내용을 볼 수 있습니다.