← Back
ExamFull examExam paper onlyItalian

10 07 12

Study material for Formal Languages and Compilers, shared by the Studwiz community and reviewed by moderators.

Formal Languages and CompilersFull exam

Document information

What's included in this study material

Study material for Formal Languages and Compilers, shared by the Studwiz community and reviewed by moderators.

Import quality: text was extracted directly from the original document.

Extracted content from the document

Representative passages recognised in different parts of the material. The full extracted text remains available to search, while this compact preview makes the page easier to read.

Page 1

Linguaggi Formali e Compilatori (Formal Languages and Compilers) prof. S. Crespi Reghizzi, prof. Angelo Morzenti (prof. Luca Breveglieri) Prova scritta - 10 luglio 2012 - Parte I: Teoria CON SOLUZIONI - A SCOPO DIDA TTICO LE SOLUZIONI SONO MOL TO ESTESE E COM- MENT A TE V ARIAMENTE - NON SI RICHIEDE CHE IL CANDIDA TO SVOLGA IL COMPITO IN MODO AL- TRETT ANTO AMPIO, BENS `I CHE RISPONDA IN MODO APPROPRIA TO E A SUO GIUDIZIO RAGIONEVOLE NOME: MATRICOLA: FIRMA: ISTRUZIONI - LEGGERE CON ATTENZIONE: • L’esame si compone di due parti: – I (80%) Teoria: 1. espressioni regolari e automi finiti 2. grammatiche libere e automi a pila 3. analisi sintattica e parsificatori 4. traduzione sintattica e analisi semantica – II (20%) Esercitazioni Flex e Bison • Per superare l’esame l’allievo deve sostenere con successo entrambe le parti (I e II), in un solo appello oppure in appelli diversi, ma entro un anno. • Per superare la parte I (teoria) occorre dimostrare di possedere conoscenza sufficiente di tutte le quattro sezioni (1-4), rispondendo alle domande obbligatorie. • `E permesso consultare libri e appunti personali. • Per scrivere si utilizzi lo spazio libero e se occorre anche il tergo del foglio; `e vietato allegare nuovi fogli o sostituirne di esistenti. • Tempo: Parte I (teoria): 2h.15m - Parte II (esercitazioni): 60m 1 Espressioni regolari e automi finiti 20% Si consideri il seguente automa nondeterministico (avente due stati iniziali): 0 1 2 3 4 5 →← ↓↓ a b b a b b a b b Si risponda alle domande seguenti: 1. Utilizzando il procedimento di determinizzazione basato sull’algoritmo Berry-Sethi, se ne produca una versione equivalente deterministica. 2. Si verifichi se l’automa deterministico ottenuto al punto precedente `e minimo; in caso negativo si ricavi, mediante un procedimento…

Preview

First page of the document.

First page: 10 07 12