Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Compiling Modules and Packages: A Deep Dive, Study notes of Computer Science

The process of compiling modules and packages, focusing on their declaration, semantic processing, code generation, and references. It covers the components of a module or package, the challenges of compilation, semantic processing, and code generation. The document also introduces classes and their relationship to packages.

Typology: Study notes

Pre 2010

Uploaded on 08/05/2009

koofers-user-xzk
koofers-user-xzk 🇺🇸

5

(2)

10 documents

1 / 5

Toggle sidebar

Related documents


Partial preview of the text

Download Compiling Modules and Packages: A Deep Dive and more Study notes Computer Science in PDF only on Docsity! 1 of 5 Compiling Modules & Packages What do we find in a module or package declaration? • A name and components, like in a record • Components declared in a new name space • Components may include procedures and functions The module/package declares an instance, not a template Compilation challenges • Incomplete declarations • Procedure headers • Opaque and private types • Specification/body separation 2 of 5 Semantic Processing for Modules/Packages The AST node for a package will include: • The name • A pointer to a component list • In Ada, optionally a pointer to the private part , which is just another component list Semantic processing for a package AST node: • Put the name in the symbol table as a package name • Create a new symbol table • Declare all of the components in that symbol table What kind of names are the components? • Components in the private part must not be externally visible If there is a separate package body AST node: • Make sure the body is not already defined • Add body components to the symbol table, making sure they are not visible externally • Match procedures/functions in the body with headers declared as part of the interface
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved