← Indietro
EsameEsame completoTesto d’esame

13 02 13

Esame completo di Principles of Programming Languages per il corso di Computer Engineering presso Politecnico di Milano. Materiale proveniente dall’archivio storico Studwiz e classificato per la consultazione online.

Principles of Programming LanguagesEsame completo

Informazioni sul documento

Cosa trovi in questo materiale

Esame completo di Principles of Programming Languages per il corso di Computer Engineering presso Politecnico di Milano. Materiale proveniente dall’archivio storico Studwiz e classificato per la consultazione online.

Qualità dell’importazione: il testo è stato estratto direttamente dal documento originale.

Contenuti estratti dal documento

Passaggi rappresentativi riconosciuti nelle diverse parti del materiale. Il testo completo resta presente nella pagina per la ricerca, mentre l’anteprima compatta rende più semplice la lettura.

Pagina 1

Principles of Programming Languages, 2013.02.13 Notes: - Total available time: 2h. - You may use any written material you need. - You cannot use computers, phones or laptops during the exam. Exercise 1, Haskell (5+6 pts) CBCB Inc. produces its goods (bikes and other stuff) by assembling various parts coming from several suppliers. CBCB is connected to its suppliers through a number of supply brokers, and each of them is specialized in dealing one type of item (e.g. wheels, components, brakes...). At a fixed scheduled times (say, once every three months) each broker sends to CBCB's server a message containing the current offers from its suppliers (e.g. of wheels). Such message is a sequence of offers of analogous items. CBCB's server enqueues such sequence in a sequence of sequences; when this is complete, the servers calls the procedure allPossibleBikes to return all the possible combinations of bikes that could be built. Example: supply broker 1 sends (ultra-wheel-1, WheelyWheel); supply broker 2 sends ("very nice frame", "another frame", "frame000"); supply broker 3 sends (3444,712,9938,115403). In this case allPossibleBikes should return the sequence: (ultra-wheel-1 "very nice frame" 3444) (WheelyWheel "very nice frame" 3444) (ultra-wheel-1 "another frame" 3444) (WheelyWheel "another frame" 3444) (ultra-wheel-1 "frame000" 3444) (WheelyWheel "frame000" 3444) (ultra-wheel-1 "very nice frame" 712) (WheelyWheel "very nice frame" 712) (ultra-wheel-1 "another frame" 712) (WheelyWheel "another frame" 712) (ultra-wheel-1 "frame000" 712) (WheelyWheel "frame000" 712) (ultra-wheel-1 "very nice frame" 9938) (WheelyWheel "very nice frame" 9938) (ultra-wheel-1 "another frame" 9938) (WheelyWheel "another frame" 9938) (ultra-wheel-1 "frame000" 9938) (WheelyWheel "frame000"…

Anteprima

Prima pagina del documento.

Prima pagina: 13 02 13