Escrito por estudiantes que aprobaron Inmediatamente disponible después del pago Leer en línea o como PDF ¿Documento equivocado? Cámbialo gratis 4,6 TrustPilot
logo-home
Document preview thumbnail
Vista previa 2 fuera de 15 páginas
Examen

Compiler Construction 2025/2026 Exam Questions and Verified Answers | Already Graded A+

Document preview thumbnail
Vista previa 2 fuera de 15 páginas

Compiler Construction 2025/2026 Exam Questions and Verified Answers | Already Graded A+ What does the compiler take as input and produce as output? -

Vista previa del contenido

Compiler Construction 2025/2026 Exam
Questions and Verified Answers |
Already Graded A+



What does the compiler take as input and produce as output? - 🧠ANSWER

✔✔Source program text - the source language, and outputs program target

for the machine - the target language

What is the difference between a compiler and an interpreter? - 🧠ANSWER

✔✔A compiler takes source language and outputs target language, which

is then executed accepting input and producing output. Interpreters don't

produce a target program as a translation, and instead appear to directly

take execute the operations specified in the source program on inputs

supplied by the user


What is LLVM? - 🧠ANSWER ✔✔set of libraries containing the clang

compiler, and C/C++/Objective-C compilers. Introduced to allow reuse of

the parser, for example, from a static compiler. Implements statically and

runtime compiled languages.




COPYRIGHT©JOSHCLAY 2025/2026. YEAR PUBLISHED 2025. COMPANY REGISTRATION NUMBER: 619652435. TERMS OF USE. PRIVACY
1
STATEMENT. ALL RIGHTS RESERVED

, LLVM allows you to provide a front and back-end and the LLVM optimiser

takes your AST and produces LLVM intermediate representation.


Give a flowchart of a language-processing system - 🧠ANSWER ✔✔source

program -> PREPROCESSOR -> modified source code -> COMPILER ->

target assembly program -> ASSEMBLER -> relocatable machine code ->

LINKER/LOADER -> target machine code

Describe the four stages of the Slang front end. What is the difference

between the Parsed AST and Internal AST? What does static.ml do? -

🧠ANSWER ✔✔We input the slang file, which is then parsed using LEX and

YACC. We then get a parsed AST Past.expr and do static analysis,

checking types, context-sensitive rules and resolve overloaded operators.

Then we remove syntactic sugar, file loc info and types. Then we get an

intermediate AST (Act.expr).




Parsed AST has expr as Boolean of loc * bool for example.

Locations are used for errors.




COPYRIGHT©JOSHCLAY 2025/2026. YEAR PUBLISHED 2025. COMPANY REGISTRATION NUMBER: 619652435. TERMS OF USE. PRIVACY
2
STATEMENT. ALL RIGHTS RESERVED

Información del documento

Subido en
10 de abril de 2025
Número de páginas
15
Escrito en
2024/2025
Tipo
Examen
Contiene
Preguntas y respuestas
$12.99

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
JOSHCLAY
3.5
(83)
Vendido
387
Seguidores
16
Artículos
20447
Última venta
4 días hace



Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes