Bindings and Symbol Table
Data Types and Type Systems
Common Lisp Concepts
Syntax and Parsing
Parsing and Semantics
100

What is the concept of binding in programming?

The process of associating attributes (e.g., type, location) with a name in a program.

100

What are the differences between simple types and complex types?

Simple types are predefined (e.g., integers), while complex types are constructed using type constructors (e.g., arrays).

100

What is a cons cell in Common Lisp?

A basic data structure consisting of two components: the car (first element) and the cdr (rest of the list).

100

What is the difference between syntax and semantics?

Syntax is the structure of code, while semantics is its meaning.

100

What is a recursive descent parser?

A top-down parser that uses a set of recursive procedures to process grammar rules.

200

What is a symbol table in the context of binding?

A data structure used by a translator to maintain bindings between names and attributes.

200

What is type equivalence?

A rule to determine if two types are the same; it can be structural or name equivalence.

200

What is referential transparency?

A property where a function’s output depends only on its input, with no side effects.

200

Why are EBNF grammars preferred for syntax definition?

They allow for more compact and readable grammar definitions.

200

What are single-symbol lookahead and predictive parsing?

Techniques for deciding which production rule to apply using one token of lookahead.

300

How does static scoping differ from dynamic scoping?

Static scoping determines scope based on program structure, while dynamic scoping depends on runtime call stack.

300

How does implicit conversion differ from explicit conversion?

Implicit conversion is automatic, while explicit conversion (casting) requires programmer intervention.

300

How is tail recursion different from standard recursion?

Tail recursion has no additional computations after the recursive call, optimizing memory usage.

300

What does it mean for a grammar to be context-free?

The grammar rules can be applied regardless of the surrounding context in the language.

300

What is the difference between static and dynamic semantics?

Static semantics are enforced at compile time, while dynamic semantics are validated at runtime.

400

What is overload resolution?

The process of determining which overloaded function or operator to invoke based on argument types.

400

What is the purpose of type constructors?

To build complex data types from simpler ones, such as arrays or records.

400

How does Common Lisp treat functions as data?

Functions are first-class values and can be passed as parameters or returned as results.

400

What is the principle of longest substring?

The rule to match the longest sequence of characters as a single lexeme during lexical analysis.

400

What is an attribute grammar?

A formal way to define syntax and semantics using attributes associated with grammar symbols.

500

What is a lexical address?

A reference consisting of a level number and offset used to locate variables in static scoping.

500

Can casting serve a purpose in dynamically typed languages?

No, because types are determined at runtime, and casting typically applies to statically typed languages.

500

What is the purpose of the cond macro in Lisp?

To simplify multi-branch conditional expressions as an alternative to nested if statements.

500

What is the relationship between a lexical analyzer and a parser?

The lexical analyzer generates tokens for the parser, which builds a syntax tree.

500

What are the two types of attributes in attribute grammars?

Synthesized attributes (computed from child nodes) and inherited attributes (passed from parent nodes).

M
e
n
u