• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 2 fuera de 10 páginas
Examen

CS 326 Final

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

CS 326 Final − Syntax and semantics − Naming, scopes and bindings − Control flow − Data types − Subroutines - answersGeneral issues in the design and implementation of a language: Mechanism for defining types (syntax, semantics) − Rules for: − type equivalence (when are the types of two values the same?) − type compatibility (when can a value of type A be used in a context that expects type B?) − type inference (what is the type of an expression, given the types of the operands?) - answersA type system consists of: ensure that a program obeys thecompatibility rules - answersType checking violation of compatibility rules - answersType clash − Strong typing - language prevents you from applying an operation to data for which it is not appropriate − Static typing - language has strong typing, and it does type checking at compile time − Dynamic typing - type checking done at run time - answersA language may have: language prevents you from applying an operation to data for which it is not appropriate - answersStrong typing language has strong typing, and it does type checking at compile time - answersStatic typing

Vista previa del contenido

CS 326 Final
− Syntax and semantics

− Naming, scopes and bindings

− Control flow

− Data types

− Subroutines - answers✔✔General issues in the design and implementation of a language:



Mechanism for defining types (syntax, semantics)

− Rules for:

− type equivalence (when are the types of two values the same?)

− type compatibility (when can a value of type A be used in a context that

expects type B?)

− type inference (what is the type of an expression, given the types of the

operands?) - answers✔✔A type system consists of:



ensure that a program obeys thecompatibility rules - answers✔✔Type checking



violation of compatibility rules - answers✔✔Type clash



− Strong typing - language prevents you from applying an operation to data for which it is not
appropriate

− Static typing - language has strong typing, and it does type checking at compile time

− Dynamic typing - type checking done at run time - answers✔✔A language may have:



language prevents you from applying an operation to data for which it is not appropriate -
answers✔✔Strong typing



language has strong typing, and it does type checking at compile time - answers✔✔Static typing

, type checking done at run time - answers✔✔Dynamic typing



− Scheme - strong typing, but dynamic

− Smalltalk - strong typing, but dynamic (operations <=> messages

sent to objects)

− Ada - strong and static typing

− Pascal - "almost" strong and "almost" static typing

− C - weaker than Pascal, but static (not much done at run time)

− Java - strong typing, part done at compile time, part at run time - answers✔✔Type Systems Examples



collection of values for a domain - answers✔✔Type: Denotational



internal structure of data, described down to the level

of fundamental types

− built-in types (integer, character, real, etc), also called primitive or

predefined types

− composite types (array, record, set, etc) - answers✔✔Type: Constructive



interface that specifies the operations that can be applied to objects - answers✔✔Type: Abstraction



For writing: FileInputStream , BufferedReader



BufferedReader reader = new BufferedReader(new FileReader("input.txt"));



For Reading: FileOutputStream , PrintWriter



PrintWriter writer = new PrintWriter(new FileWriter("output.txt")); - answers✔✔Java File I/O

Información del documento

Subido en
10 de agosto de 2025
Número de páginas
10
Escrito en
2025/2026
Tipo
Examen
Contiene
Preguntas y respuestas
$8.49

¿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

Vendido
0
Seguidores
0
Artículos
196
Última venta
-



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