First Exam/Second Test 19/6/2010

Size: px
Start display at page:

Download "First Exam/Second Test 19/6/2010"

Transcription

1 Instituto Superior Técnico Programação Avançada First Exam/Second Test 19/6/2010 Name: Number: Write your number on every page. Your answers should not be longer than the available space. You can use the other side of the page for drafts. The exam has 6 pages and the duration is 2.0 hours. The grade for each question is written in parenthesis. Good luck. If you want to do the second test, answer questions 7, 8, 9, 10, 11, 12 and 13. If you want to do the exam, answer all questions. 1. (1.0) In order to allow introspection, the Java language had to reify the concept of class and had to provide ways for obtaining a class, either from an instance or from the name of the class or from a String containing the name of the class. Write fragments of Java programs that show each of these three different ways of obtaining a class. "I am a string".getclass() String.class Class.forName("java.lang.String") 2. (1.0) Consider a hypothetical definition of a complexity metric for a class as the total number of public fields described in the class plus the total number of public methods described in that class. Write, in Java, a class named Metrics containing a static method named complexity. This method accepts a String with the name of a class and returns an integer with the complexity metric of that class. import java.lang.reflect.*; class Metricas { public static int complexidade(string c) throws ClassNot Class objclass = Class.forName(c); return objclass.getfields().length + objclass.getmet

2 Number: 2 3. (1.0) The Lisp language invented quote and, later, backquote. Which are their uses? How do they work? Quer o quote, quer o backquote servem para facilitar a metaprogramação. O quote indica que o seu argumento é para ser tomado literalmente, sem avaliação, permitindo que fragmentos de programas possam ser tratados como dados. O backquote funciona de modo idêntico mas permite selectivamente avaliar subexpressões do seu argumento, precedendo-as do comma. Desta forma, o backquote comporta-se como um mecanismos de templates que facilita substancialmente a meta-programação. 4. (2.0) There are several proposals for the inclusion of multiple dispatch in Java. Explain this concept and write about the advantages and disadvantages of its implementation in Java. In particular compare the concept with the already existent concept of overloading. 5. (2.0) In CLOS, the application of a generic function entails the computation of the effective method. Describe the necessary steps for that computation. (a) São seleccionados os methods aplicáveis. (b) Os methods seleccionados são ordenadas do mais específico para o menos específico. (c) Os methods ordenados são combinados, produzindo o method efectivo. 6. (3.0) We want to adapt the object-oriented model of the Java language to allow the use of active values. An active value is a Java object that, when modified, notifies other objects of that event. As an example, consider a Java object that represents a car and which class has the following definition:

3 Number: 3 class Car extends... { String brand; String model;... float currentspeed;... Given an instance of a car, we want to attach to it one or more objects (which we will call listeners) so that these objects will be notified via some pre-defined method call that will receive, as argument, the modified object. For example, it should be possible to attach to a specific car a graphical object that continuously represents the actual speed of that car. Given this scenario, suggest an intercession mechanism based in Javassist that allows the creation of active values. It is not necessary to present the implementation of the mechanism but include all the necessary information that is relevant for someone else to implement the mechanism you propose.

4 Number: 4 7. (2.0) In general, aspect-oriented programming allows not only the dynamic cross-cutting but also the static cross-cutting. Describe and explain the capabilities of each of these concepts. O cross-cutting dinâmico implica a modificação do comportamento de um programa, permitindo a inserção de comportamento adicional em pontos bem definidos da execução do programa. O cross-cutting estático implica a modificação da estrutura estática do programa, permitindo modificações na hierarquia de class, a adição de methods, a implementação de novas interfaces, etc. 8. (1.0) Describe, in your own words, the effect of the following aspect of AspectJ: aspect FooAspect { static final int LIMIT = 100; before(foo foo, int newbar): set(int Foo.bar) && target(foo) && args(newbar) { if (Math.abs(newBar - foo.bar) > LIMIT) { throw new RuntimeException(); 9. (2.0) The majority of programming languages employ two concepts related to the binding of names and values: definition and assignment.

5 Number: 5 (a) (1.0) In terms of the programming language, what is the difference between these two concepts? (b) (1.0) In terms of the implementation of the language in a meta-circular evaluator, what is the difference between these two concepts? 10. (1.0) The Common Lisp language provides the forms function (# ) and funcall, while the Scheme language does not provide them. Why? Explain. 11. (1.0) Discuss the differences between external iterators and internal iterators. An Internal Iterator is a higher-order function that applies a function to each element of a collection. The iteration is controlled by the producer of values. Used in Lisp, Haskell and other Functional Languages.

6 Number: 6 An External Iterator is an accessor of the current element of a collection, and, potentially, of the next one. The iteration is controlled by the consumer of values. Used in C++, Java and other Object-Oriented Languages. 12. (1.0) Consider the yield operator as provided by Python to allow the creation of generators. Explain a possible implementation of that operator in a language that allows the capture of continuations. Teria de capturar uma continuação na invocação do gerador para poder retornar um valor ao consumidor assim que se atinge o operador yield. Nesse momento, teria de capturar outra continuação para guardar o estado de computação do gerador para, na invocação seguinte, poder retormar a execução do mesmo. Esta continuação teria de ser guardada entre invocações do gerador. 13. (2.0) Consider the ambiguous operator amb proposed by John McCarthy, that non-deterministically returns the value of one of the expressions provided as arguments. (a) (1.0) Using the amb operator, define a function called integer-bigger-or-equal-to that accepts an integer as argument and non-deterministically returns an integer bigger or equal to its argument. (define (inteiro-maior-ou-igual-a a) (amb a (inteiro-maior-ou-igual-a (+ a 1)))) (b) (1.0) Consider the operator fail. Together with the operator amb, define a function list-element that receives a list as argument and non-deterministically returns one element of that list. (define (elemento-lista l) (if (null? l) (fail) (amb (car l) (elemento-lista (cdr l)))))

Instituto Superior Técnico. First Exam 7/6/2013. Number:

Instituto Superior Técnico. First Exam 7/6/2013. Number: Instituto Superior Técnico Programação Avançada First Exam 7/6/2013 Name: Number: Write your number on every page. Your answers should not be longer than the available space. You can use the other side

More information

Super bluetooth phone hacker. Super bluetooth phone hacker.zip

Super bluetooth phone hacker. Super bluetooth phone hacker.zip Super bluetooth phone hacker Super bluetooth phone hacker.zip Download free Super bluetooth hack from Section: Pocket pc software & Category: Mobile softwares. Filetype: Motorola software & Size: 98.94

More information

Learn Sphinx Documentation Documentation

Learn Sphinx Documentation Documentation Learn Sphinx Documentation Documentation Release 0.0.1 Lucas Simon Rodrigues Magalhaes January 31, 2014 Contents 1 Negrito e italico 1 2 Listas 3 3 Titulos 5 4 H1 Titulo 7 4.1 H2 Sub-Titulo.............................................

More information

Introdução às GPUs. Graphics Pipeline. Marcelo Walter UFPE. 3D Application or Game. 3D API: OpenGL or Direct 3D. Vertices

Introdução às GPUs. Graphics Pipeline. Marcelo Walter UFPE. 3D Application or Game. 3D API: OpenGL or Direct 3D. Vertices Introdução às GPUs Marcelo Walter UFPE atualização/maio 2009 Graphics Pipeline 2 1 Graphics Pipeline glbegin(gl_triangles); gl3f(0.0,0.0,0.0); gl3f(1.0,0.0,0.0); gl3f(0.5,1.0,0.0);... glend(); 3 Graphics

More information

src docs Release Author

src docs Release Author src docs Release 0.8.18 Author September 20, 2018 Contents 1 networkapiclient package 3 1.1 Submodules............................................... 3 1.2 networkapiclient.ambiente module...................................

More information

Campaigns. Salesforce, Winter

Campaigns. Salesforce, Winter Campaigns Salesforce, Winter 19 @salesforcedocs Última atualização: 16/10/2018 A versão em Inglês deste documento tem precedência sobre a versão traduzida. Copyright 2000 2018 salesforce.com, inc. Todos

More information

What is an Algebra. Core Relational Algebra. What is Relational Algebra? Operação de Seleção. Álgebra Relacional: Resumo

What is an Algebra. Core Relational Algebra. What is Relational Algebra? Operação de Seleção. Álgebra Relacional: Resumo What is an Algebra Bancos de Dados Avançados Revisão: Álgebra Relacional DCC030 - TCC: Bancos de Dados Avançados (Ciência Computação) DCC049 - TSI: Bancos de Dados Avançados (Sistemas Informação) DCC842

More information

Arquivos script. Cálculo numérico con Matlab Arquivos script 1

Arquivos script. Cálculo numérico con Matlab Arquivos script 1 Arquivos script Programas en Matlab: conteñen comandos que se executan secuencialmente; extensión.m; Execución: escribi-lo seu nome (sen.m). O arquivo debe estar no directorio actual (ou nun directorio

More information

Software repository suse linux. Software repository suse linux.zip

Software repository suse linux. Software repository suse linux.zip Software repository suse linux Software repository suse linux.zip 22/10/2014 Zypper is command line interface in SUSE Linux which is used to install, update, remove software, manage repositories.download

More information

SCHEME The Scheme Interpreter. 2 Primitives COMPUTER SCIENCE 61A. October 29th, 2012

SCHEME The Scheme Interpreter. 2 Primitives COMPUTER SCIENCE 61A. October 29th, 2012 SCHEME COMPUTER SCIENCE 6A October 29th, 202 In the next part of the course, we will be working with the Scheme programming language. In addition to learning how to write Scheme programs, we will eventually

More information

Picasa web download photos. Picasa web download photos.zip

Picasa web download photos. Picasa web download photos.zip Picasa web download photos Picasa web download photos.zip 12/02/2016 Empresa quer focar seus esforços no Google Photos, um "novo espaço para acessar os dados dos seus Picasa Web Albums e poder ver, fazer

More information

MCSD Azure Solutions Architect. Sobre o curso. Metodologia. Microsoft. Com certificação. Nível: Avançado Duração: 60h

MCSD Azure Solutions Architect. Sobre o curso. Metodologia. Microsoft. Com certificação. Nível: Avançado Duração: 60h MCSD Azure Solutions Architect Microsoft Com certificação Nível: Avançado Duração: 60h Sobre o curso A GALILEU integrou na sua oferta formativa, o Percurso de Formação e Certificação MCSD Azure Solutions

More information

Multi-Methods in Racket

Multi-Methods in Racket Multi-Methods in Racket António Menezes Leitão April, 18, 2013 1 Introduction Multi-methods are an advanced concept that extends the single dispatch approach that is used in the majority of object-oriented

More information

Repensando Templates com Cryml. Dalton Pinto

Repensando Templates com Cryml. Dalton Pinto Repensando Templates com Cryml Dalton Pinto 1 Dalton Pinto 2 3 4 5 Motivação 6 # partial: _file_or_folder.html.erb

More information

CS 415 Midterm Exam Spring 2002

CS 415 Midterm Exam Spring 2002 CS 415 Midterm Exam Spring 2002 Name KEY Email Address Student ID # Pledge: This exam is closed note, closed book. Good Luck! Score Fortran Algol 60 Compilation Names, Bindings, Scope Functional Programming

More information

Querying Microsoft SQL Server 2014 (20461)

Querying Microsoft SQL Server 2014 (20461) Querying Microsoft SQL Server 2014 (20461) Formato do curso: Presencial e Live Training Localidade: Lisboa Com certificação: MCSA: SQL Server Data: 14 Nov. 2016 a 25 Nov. 2016 Preço: 1630 Promoção: -760

More information

Functional programming in LISP

Functional programming in LISP Programming Languages Week 4 Functional programming in LISP College of Information Science and Engineering Ritsumeikan University review of part 3 enumeration of dictionaries you receive a sequence of

More information

Prof. Edwar Saliba Júnior

Prof. Edwar Saliba Júnior 1 package Conexao; 2 3 4 * 5 * @author Cynthia Lopes 6 * @author Edwar Saliba Júnior 7 8 import java.io.filenotfoundexception; 9 import java.io.ioexception; 10 import java.sql.sqlexception; 11 import java.sql.statement;

More information

Deploying and Managing Windows 10 Using Enterprise Services ( )

Deploying and Managing Windows 10 Using Enterprise Services ( ) Deploying and Managing Windows 10 Using Enterprise Services (20697-2) Formato do curso: Presencial Com certificação: Microsoft Certified Solutions Associate (MCSA) Preço: 1670 Nível: Intermédio Duração:

More information

Enabling and Managing Office 365 (20347)

Enabling and Managing Office 365 (20347) Enabling and Managing Office 365 (20347) Formato do curso: Presencial Preço: 1670 Nível: Iniciado Duração: 35 horas Este curso permite aos formandos adquirir conhecimentos na avaliação, planificação, implementação

More information

Rastreamento de objetos do vpc

Rastreamento de objetos do vpc Rastreamento de objetos do vpc Índice Introdução Rastreamento de objetos do vpc Diagrama de Rede Comandos show da linha de base Introdução Este documento descreve o Rastreamento de objetos do vpc, porque

More information

Lecture #24: Programming Languages and Programs

Lecture #24: Programming Languages and Programs Lecture #24: Programming Languages and Programs A programming language is a notation for describing computations or processes. These range from low-level notations, such as machine language or simple hardware

More information

Functional Programming. Big Picture. Design of Programming Languages

Functional Programming. Big Picture. Design of Programming Languages Functional Programming Big Picture What we ve learned so far: Imperative Programming Languages Variables, binding, scoping, reference environment, etc What s next: Functional Programming Languages Semantics

More information

SharePoint 2013 Site Collection and Site Administration (55033)

SharePoint 2013 Site Collection and Site Administration (55033) SharePoint 2013 Site Collection and Site Administration (55033) Formato do curso: Presencial Preço: 1740 Nível: Intermédio Duração: 35 horas Este curso de 5 dias, É destinado a utilizadores avançados de

More information

CSCI 3155: Principles of Programming Languages Exam preparation #1 2007

CSCI 3155: Principles of Programming Languages Exam preparation #1 2007 CSCI 3155: Principles of Programming Languages Exam preparation #1 2007 Exercise 1. Consider the if-then-else construct of Pascal, as in the following example: IF 1 = 2 THEN PRINT X ELSE PRINT Y (a) Assume

More information

This exam is worth 70 points, or about 23% of your total course grade. The exam contains 15 questions.

This exam is worth 70 points, or about 23% of your total course grade. The exam contains 15 questions. CS 61A Final Exam May 16, 2008 Your name login: cs61a This exam is worth 70 points, or about 23% of your total course grade. The exam contains 15 questions. This booklet contains 18 numbered pages including

More information

11/6/17. Functional programming. FP Foundations, Scheme (2) LISP Data Types. LISP Data Types. LISP Data Types. Scheme. LISP: John McCarthy 1958 MIT

11/6/17. Functional programming. FP Foundations, Scheme (2) LISP Data Types. LISP Data Types. LISP Data Types. Scheme. LISP: John McCarthy 1958 MIT Functional programming FP Foundations, Scheme (2 In Text: Chapter 15 LISP: John McCarthy 1958 MIT List Processing => Symbolic Manipulation First functional programming language Every version after the

More information

CORBA Based Architecture for Large Scale Workflow. Master thesis defended in August 21 st, Institute of Computing UNICAMP Campinas - SP

CORBA Based Architecture for Large Scale Workflow. Master thesis defended in August 21 st, Institute of Computing UNICAMP Campinas - SP CORBA Based Architecture for Large Scale Workflow. Master thesis defended in August 21 st, 2000. Institute of Computing UNICAMP Campinas - SP Autor: Roberto Silveira Silva Filho, Jacques Wainer, Edmundo

More information

Exercícios de FORTRAN90/95

Exercícios de FORTRAN90/95 Eercícios de FORTRAN90/95 1. Estruturas de Repetição (Do Loops) 2. Estruturas codicioais (IF, CASE) 3. Arrays(1D, 2D) 4. Fuções e loops em diferetes liguages de programação. 1. Estrutura de Repetição (

More information

This exam is open book. Each question is worth 3 points.

This exam is open book. Each question is worth 3 points. This exam is open book. Each question is worth 3 points. Page 1 / 15 Page 2 / 15 Page 3 / 12 Page 4 / 18 Page 5 / 15 Page 6 / 9 Page 7 / 12 Page 8 / 6 Total / 100 (maximum is 102) 1. Are you in CS101 or

More information

Summer 2017 Discussion 10: July 25, Introduction. 2 Primitives and Define

Summer 2017 Discussion 10: July 25, Introduction. 2 Primitives and Define CS 6A Scheme Summer 207 Discussion 0: July 25, 207 Introduction In the next part of the course, we will be working with the Scheme programming language. In addition to learning how to write Scheme programs,

More information

Acelerando a Manada. Parallel Queries no PostgreSQL

Acelerando a Manada. Parallel Queries no PostgreSQL Acelerando a Manada Parallel Queries no PostgreSQL Paralelismo Intra-Consulta em PostgreSQL pré 9.6 Paralelismo Intra-Consulta - Requisitos Apresenta maiores ganhos em grandes volumes (Pode não encaixar

More information

SCHEME 8. 1 Introduction. 2 Primitives COMPUTER SCIENCE 61A. March 23, 2017

SCHEME 8. 1 Introduction. 2 Primitives COMPUTER SCIENCE 61A. March 23, 2017 SCHEME 8 COMPUTER SCIENCE 61A March 2, 2017 1 Introduction In the next part of the course, we will be working with the Scheme programming language. In addition to learning how to write Scheme programs,

More information

UMBC CMSC 331 Final Exam

UMBC CMSC 331 Final Exam UMBC CMSC 331 Final Exam Name: UMBC Username: You have two hours to complete this closed book exam. We reserve the right to assign partial credit, and to deduct points for answers that are needlessly wordy

More information

MIDTERM EXAMINATION - CS130 - Spring 2005

MIDTERM EXAMINATION - CS130 - Spring 2005 MIDTERM EAMINATION - CS130 - Spring 2005 Your full name: Your UCSD ID number: This exam is closed book and closed notes Total number of points in this exam: 231 + 25 extra credit This exam counts for 25%

More information

CS 314 Principles of Programming Languages

CS 314 Principles of Programming Languages CS 314 Principles of Programming Languages Lecture 15: Review and Functional Programming Zheng (Eddy) Zhang Rutgers University March 19, 2018 Class Information Midterm exam forum open in Sakai. HW4 and

More information

Opti usb pci driver 82c861. Opti usb pci driver 82c861.zip

Opti usb pci driver 82c861. Opti usb pci driver 82c861.zip Opti usb pci driver 82c861 Opti usb pci driver 82c861.zip then follow the procedure below. If you need help, let us know.download the latest Windows drivers for OPTi 82C861 PCI to USB Open Host Controller

More information

Scheme. Functional Programming. Lambda Calculus. CSC 4101: Programming Languages 1. Textbook, Sections , 13.7

Scheme. Functional Programming. Lambda Calculus. CSC 4101: Programming Languages 1. Textbook, Sections , 13.7 Scheme Textbook, Sections 13.1 13.3, 13.7 1 Functional Programming Based on mathematical functions Take argument, return value Only function call, no assignment Functions are first-class values E.g., functions

More information

Functional Programming. Pure Functional Languages

Functional Programming. Pure Functional Languages Functional Programming Pure functional PLs S-expressions cons, car, cdr Defining functions read-eval-print loop of Lisp interpreter Examples of recursive functions Shallow, deep Equality testing 1 Pure

More information

Remove wga para windows 7 professional. Remove wga para windows 7 professional.zip

Remove wga para windows 7 professional. Remove wga para windows 7 professional.zip Remove wga para windows 7 professional Remove wga para windows 7 professional.zip Activate Windows 7/8.1/10 Activate Win 7 Ultimate, Professional, Home edition. Windows 7 is pretty old OS but it Chew WGA

More information

About Codefrux While the current trends around the world are based on the internet, mobile and its applications, we try to make the most out of it. As for us, we are a well established IT professionals

More information

Microsoft net framework 2.0 windows 7 32 bit. Microsoft net framework 2.0 windows 7 32 bit.zip

Microsoft net framework 2.0 windows 7 32 bit. Microsoft net framework 2.0 windows 7 32 bit.zip Microsoft net framework 2.0 windows 7 32 bit Microsoft net framework 2.0 windows 7 32 bit.zip The Microsoft.NET Framework version 2.0 redistributable package installs devices with ASP.NET 2.0 7 / Vista

More information

COMPUTING SCIENCE 3Z: PROGRAMMING LANGUAGES 3

COMPUTING SCIENCE 3Z: PROGRAMMING LANGUAGES 3 Tuesday, 28 May 2009 2.00 pm 3.30 pm (Duration: 1 hour 30 minutes) DEGREES OF MSci, MEng, BEng, BSc, MA and MA (Social Sciences) COMPUTING SCIENCE 3Z: PROGRAMMING LANGUAGES 3 Answer all 4 questions. This

More information

From UML to Java and return (object-oriented modeling II)

From UML to Java and return (object-oriented modeling II) From UML to Java and return (object-oriented modeling II) Bruce Eckel, Thinking in Java, 4th edition, PrenticeHall, New Jersey, cf. http://mindview.net/books/tij4 jvo@ualg.pt José Valente de Oliveira 6-1

More information

Scheme Tutorial. Introduction. The Structure of Scheme Programs. Syntax

Scheme Tutorial. Introduction. The Structure of Scheme Programs. Syntax Scheme Tutorial Introduction Scheme is an imperative language with a functional core. The functional core is based on the lambda calculus. In this chapter only the functional core and some simple I/O is

More information

A LISP Interpreter in ML

A LISP Interpreter in ML UNIVERSITY OF OSLO Department of Informatics A LISP Interpreter in ML Mandatory Assignment 1 INF3110 September 21, 2009 Contents 1 1 Introduction The purpose of this assignment is to write an interpreter,

More information

TRI para escalas politômicas. Dr. Ricardo Primi Programa de Mestrado e Doutorado em Avaliação Psicológica Universidade São Francisco

TRI para escalas politômicas. Dr. Ricardo Primi Programa de Mestrado e Doutorado em Avaliação Psicológica Universidade São Francisco TRI para escalas politômicas Dr. Ricardo Primi Programa de Mestrado e Doutorado em Avaliação Psicológica Universidade São Francisco Modelos Modelo Rasch-Andrich Rating Scale Model (respostas graduais)

More information

Lambda Calculus and Lambda notation in Lisp II. Based on Prof. Gotshalks notes on Lambda Calculus and Chapter 9 in Wilensky.

Lambda Calculus and Lambda notation in Lisp II. Based on Prof. Gotshalks notes on Lambda Calculus and Chapter 9 in Wilensky. λ Calculus Basis Lambda Calculus and Lambda notation in Lisp II Based on Prof. Gotshalks notes on Lambda Calculus and Chapter 9 in Wilensky Mathematical theory for anonymous functions» functions that have

More information

Fundamentos de programação

Fundamentos de programação Fundamentos de programação Tratamento de exceções Edson Moreno edson.moreno@pucrs.br http://www.inf.pucrs.br/~emoreno Exception Handling There are two aspects to dealing with run-time program errors: 1)

More information

Cdfs to mp3 converter. Cdfs to mp3 converter.zip

Cdfs to mp3 converter. Cdfs to mp3 converter.zip Cdfs to mp3 converter Cdfs to mp3 converter.zip conversion to MP3 audio files gives it a boost. If you opt for MP3, you may wait.cdfs To Mp3 Convert Software, free cdfs to mp3 convert software software

More information

Firmware 2 2 update xbox 360. Firmware 2 2 update xbox 360.zip

Firmware 2 2 update xbox 360. Firmware 2 2 update xbox 360.zip Firmware 2 2 update xbox 360 Firmware 2 2 update xbox 360.zip 24/09/2009 Como atualizar o firmware (pirateador) do xbox 360? ae queria 2 respostas 2. Skyrim titlle update 10 de Xbox 360 desbloqueado vem

More information

Functional Programming. Pure Functional Languages

Functional Programming. Pure Functional Languages Functional Programming Pure functional PLs S-expressions cons, car, cdr Defining functions read-eval-print loop of Lisp interpreter Examples of recursive functions Shallow, deep Equality testing 1 Pure

More information

Configuração do laboratório de discagem de entrada de cliente (SÃO JOSÉ, USA)

Configuração do laboratório de discagem de entrada de cliente (SÃO JOSÉ, USA) Configuração do laboratório de discagem de entrada de cliente (SÃO JOSÉ, USA) Índice Introdução Pré-requisitos Requisitos Componentes Utilizados Convenções Configuração Informações Relacionadas Introdução

More information

Automatic Memory Management in newlisp

Automatic Memory Management in newlisp SS Procedia Computer Science 18 (2013) 159 16 8 International Conference on Computational Science, ICCS 2013 Automatic Memory Management in newlisp German Molt, Miguel caballer, EloyRomero, Carlos dealfonso

More information

UNIVERSIDADE DE LISBOA Faculdade de Ciências Departamento de Informática

UNIVERSIDADE DE LISBOA Faculdade de Ciências Departamento de Informática UNIVERSIDADE DE LISBOA Faculdade de Ciências Departamento de Informática RECOMMENDATION SYSTEM FOR MODERN TELEVISION Diogo dos Reis Gonçalves TRABALHO DE PROJETO MESTRADO EM ENGENHARIA INFORMÁTICA Especialização

More information

Respostas dos Exercícios de Programação Java

Respostas dos Exercícios de Programação Java Exercício 3. 3a) package exercicio.pkg3a; Respostas s Exercícios de Programação Java public class Exercicio3a int tab, i=1; System.out.print("Digite a tabuada: "); tab = leia.nextint(); System.out.println("\nTabuada

More information

Programming Languages

Programming Languages Programming Languages Tevfik Koşar Lecture - XIII March 2 nd, 2006 1 Roadmap Functional Languages Lambda Calculus Intro to Scheme Basics Functions Bindings Equality Testing Searching 2 1 Functional Languages

More information

I BCS-031 BACHELOR OF COMPUTER APPLICATIONS (BCA) (Revised) Term-End Examination. June, 2015 BCS-031 : PROGRAMMING IN C ++

I BCS-031 BACHELOR OF COMPUTER APPLICATIONS (BCA) (Revised) Term-End Examination. June, 2015 BCS-031 : PROGRAMMING IN C ++ No. of Printed Pages : 3 I BCS-031 BACHELOR OF COMPUTER APPLICATIONS (BCA) (Revised) Term-End Examination 05723. June, 2015 BCS-031 : PROGRAMMING IN C ++ Time : 3 hours Maximum Marks : 100 (Weightage 75%)

More information

XSDs: exemplos soltos

XSDs: exemplos soltos XSDs: exemplos soltos «expande o tipo base»

More information

Fall 2018 Discussion 8: October 24, 2018 Solutions. 1 Introduction. 2 Primitives

Fall 2018 Discussion 8: October 24, 2018 Solutions. 1 Introduction. 2 Primitives CS 6A Scheme Fall 208 Discussion 8: October 24, 208 Solutions Introduction In the next part of the course, we will be working with the Scheme programming language. In addition to learning how to write

More information

SCHEME 7. 1 Introduction. 2 Primitives COMPUTER SCIENCE 61A. October 29, 2015

SCHEME 7. 1 Introduction. 2 Primitives COMPUTER SCIENCE 61A. October 29, 2015 SCHEME 7 COMPUTER SCIENCE 61A October 29, 2015 1 Introduction In the next part of the course, we will be working with the Scheme programming language. In addition to learning how to write Scheme programs,

More information

Lambda Calculus see notes on Lambda Calculus

Lambda Calculus see notes on Lambda Calculus Lambda Calculus see notes on Lambda Calculus Shakil M. Khan adapted from Gunnar Gotshalks recap so far: Lisp data structures basic Lisp programming bound/free variables, scope of variables Lisp symbols,

More information

Spring 2018 PhD Qualifying Exam in Languages

Spring 2018 PhD Qualifying Exam in Languages Spring 2018 PhD Qualifying Exam in Languages Illinois Institute of Technology Department of Computer Science Monday, January 29, 2018 Instructions This exam is closed book and closed notes. Read each problem

More information

CSC Java Programming, Fall Java Data Types and Control Constructs

CSC Java Programming, Fall Java Data Types and Control Constructs CSC 243 - Java Programming, Fall 2016 Java Data Types and Control Constructs Java Types In general, a type is collection of possible values Main categories of Java types: Primitive/built-in Object/Reference

More information

STREAMS 10. Basics of Streams. Practice with Streams COMPUTER SCIENCE 61AS. 1. What is a stream? 2. How does memoization work?

STREAMS 10. Basics of Streams. Practice with Streams COMPUTER SCIENCE 61AS. 1. What is a stream? 2. How does memoization work? STREAMS 10 COMPUTER SCIENCE 61AS Basics of Streams 1. What is a stream? 2. How does memoization work? 3. Is a cons-stream a special form? Practice with Streams 1. Define a procedure (ones) that, when run

More information

Metamodeling and Metaprogramming Seminar

Metamodeling and Metaprogramming Seminar Metamodeling and Metaprogramming Seminar 1. Introduction Prof. O. Nierstrasz Spring Semester 2008 Metamodeling and Metaprogramming Seminar Lecturer: Assistant: WWW: Oscar Nierstrasz www.iam.unibe.ch/~oscar

More information

Introdução e boas práticas em UX Design (Portuguese Edition)

Introdução e boas práticas em UX Design (Portuguese Edition) Introdução e boas práticas em UX Design (Portuguese Edition) By Fabricio Teixeira Introdução e boas práticas em UX Design (Portuguese Edition) By Fabricio Teixeira Cada vez mais o desenvolvimento do front-end

More information

Introduction to LISP. York University Department of Computer Science and Engineering. York University- CSE V.

Introduction to LISP. York University Department of Computer Science and Engineering. York University- CSE V. Introduction to LISP York University Department of Computer Science and Engineering York University- CSE 3401- V. Movahedi 11_LISP 1 Introduction to LISP Evaluation and arguments S- expressions Lists Numbers

More information

UNIVERSIDADE DE LISBOA Faculdade de Ciências Departamento de Informática

UNIVERSIDADE DE LISBOA Faculdade de Ciências Departamento de Informática UNIVERSIDADE DE LISBOA Faculdade de Ciências Departamento de Informática EWA - EVALUATING WEB ACCESSIBILITY Nádia Raquel Palma Fernandes MESTRADO EM ENGENHARIA INFORMÁTICA Especialização em Sistemas de

More information

CSCI 135 Exam #1 Fundamentals of Computer Science I Fall 2014

CSCI 135 Exam #1 Fundamentals of Computer Science I Fall 2014 CSCI 135 Exam #1 Fundamentals of Computer Science I Fall 2014 Name: This exam consists of 8 problems on the following 8 pages. You may use your two- sided hand- written 8 ½ x 11 note sheet during the exam.

More information

SCHEME AND CALCULATOR 5b

SCHEME AND CALCULATOR 5b SCHEME AND CALCULATOR 5b COMPUTER SCIENCE 6A July 25, 203 In the next part of the course, we will be working with the Scheme programming language. In addition to learning how to write Scheme programs,

More information

INF4820. Common Lisp: Closures and Macros

INF4820. Common Lisp: Closures and Macros INF4820 Common Lisp: Closures and Macros Erik Velldal University of Oslo Oct. 19, 2010 Erik Velldal INF4820 1 / 22 Topics for Today More Common Lisp A quick reminder: Scope, binding and shadowing Closures

More information

University of Palestine. Mid Exam Total Grade: 100

University of Palestine. Mid Exam Total Grade: 100 First Question No. of Branches (5) A) Choose the correct answer: 1. If we type: system.out.println( a ); in the main() method, what will be the result? int a=12; //in the global space... void f() { int

More information

THREADS. Laboratório - Java

THREADS. Laboratório - Java THREADS Laboratório - Java class ABC {. public void main(..) {.. begin body end 2 A single threaded program class ABC {. public void main(..) {.. begin end body 3 A Multithreaded Program Main Thread start

More information

Spring 2018 Discussion 7: March 21, Introduction. 2 Primitives

Spring 2018 Discussion 7: March 21, Introduction. 2 Primitives CS 61A Scheme Spring 2018 Discussion 7: March 21, 2018 1 Introduction In the next part of the course, we will be working with the Scheme programming language. In addition to learning how to write Scheme

More information

CS 61A Interpreters, Tail Calls, Macros, Streams, Iterators. Spring 2019 Guerrilla Section 5: April 20, Interpreters.

CS 61A Interpreters, Tail Calls, Macros, Streams, Iterators. Spring 2019 Guerrilla Section 5: April 20, Interpreters. CS 61A Spring 2019 Guerrilla Section 5: April 20, 2019 1 Interpreters 1.1 Determine the number of calls to scheme eval and the number of calls to scheme apply for the following expressions. > (+ 1 2) 3

More information

9/21/17. Outline. Expression Evaluation and Control Flow. Arithmetic Expressions. Operators. Operators. Notation & Placement

9/21/17. Outline. Expression Evaluation and Control Flow. Arithmetic Expressions. Operators. Operators. Notation & Placement Outline Expression Evaluation and Control Flow In Text: Chapter 6 Notation Operator evaluation order Operand evaluation order Overloaded operators Type conversions Short-circuit evaluation of conditions

More information

Compiladores Prof. Bruno Lopes Lista 1

Compiladores Prof. Bruno Lopes Lista 1 1. Coteje as etapas do processo de compilação. 2. Seja a seguinte BNF da linguagem Pascal. Compiladores 2016.2 Prof. Bruno Lopes Lista 1 program ::= program identifier ; uses declaration ; block. uses

More information

Improving Variability of Applications using Adaptive Object-Models

Improving Variability of Applications using Adaptive Object-Models FACULDADE DE ENGENHARIA DA UNIVERSIDADE DO PORTO Improving Variability of Applications using Adaptive Object-Models João Gradim Pereira Master in Informatics and Computing Engineering Supervisor: Ademar

More information

Crack illustrator cc 18. Crack illustrator cc 18.zip

Crack illustrator cc 18. Crack illustrator cc 18.zip Crack illustrator cc 18 Crack illustrator cc 18.zip Oct 9, 2017 Adobe Photoshop CC 2017 Crack Full Version Working Serial Key is suitable for Adobe Photoshop CC 2017 18.0.0 Adobe Photoshop CC 2017 18.0.0

More information

Fall 2017 Discussion 7: October 25, 2017 Solutions. 1 Introduction. 2 Primitives

Fall 2017 Discussion 7: October 25, 2017 Solutions. 1 Introduction. 2 Primitives CS 6A Scheme Fall 207 Discussion 7: October 25, 207 Solutions Introduction In the next part of the course, we will be working with the Scheme programming language. In addition to learning how to write

More information

Assigned Date: August 27, 2014 Due Date: September 7, 2015, 11:59 PM

Assigned Date: August 27, 2014 Due Date: September 7, 2015, 11:59 PM 15440: Distributed Systems Fall 2015 Problem Solving Assignment 1 A Java Programming Preparation for Project 1 Assigned Date: August 27, 2014 Due Date: September 7, 2015, 11:59 PM 1. Warm Up with Some

More information

Around Weaving in abc

Around Weaving in abc Around Weaving in abc Objectives Avoid heap allocations Inlining not as the general strategy to avoid code duplication Keep code in original classes to avoid visibility problems The starting point Around

More information

Introduction to C Programming

Introduction to C Programming 13205 C Programming Lecture 1-26/Sept/2017 c 2017 Abel Gomes All Rights Reserved Introduction to C Programming Scribe: A. Gomes This lecture aims to respond to the following questions: Why do we need to

More information

Boot camp mac drivers 3.0 for windows. Boot camp mac drivers 3.0 for windows.zip

Boot camp mac drivers 3.0 for windows. Boot camp mac drivers 3.0 for windows.zip Boot camp mac drivers 3.0 for windows Boot camp mac drivers 3.0 for windows.zip Sep 20, 2013 How to find the correct BootCamp direct download link for your Mac from the 6 days ago To install Windows 7

More information

Macros. Pat Hanrahan. CS448h Fall 2015

Macros. Pat Hanrahan. CS448h Fall 2015 Macros Pat Hanrahan CS448h Fall 2015 Macro Definitions in Lisp Timothy Harris Abstract In LISP 1.5 special forms are used for three logically separate purposes: a) to reach the alist, b) to allow functions

More information

Static and Dynamic Types for Functional Languages

Static and Dynamic Types for Functional Languages Static and Dynamic Types for Functional Languages Pedro Jorge Fernandes Ângelo Mestrado Integrado em Engenharia de Redes e Sistemas Informáticos Departamento de Ciência de Computadores 2017 Orientador

More information

Scheme: Data. CS F331 Programming Languages CSCE A331 Programming Language Concepts Lecture Slides Monday, April 3, Glenn G.

Scheme: Data. CS F331 Programming Languages CSCE A331 Programming Language Concepts Lecture Slides Monday, April 3, Glenn G. Scheme: Data CS F331 Programming Languages CSCE A331 Programming Language Concepts Lecture Slides Monday, April 3, 2017 Glenn G. Chappell Department of Computer Science University of Alaska Fairbanks ggchappell@alaska.edu

More information

Object oriented programming. Instructor: Masoud Asghari Web page: Ch: 3

Object oriented programming. Instructor: Masoud Asghari Web page:   Ch: 3 Object oriented programming Instructor: Masoud Asghari Web page: http://www.masses.ir/lectures/oops2017sut Ch: 3 1 In this slide We follow: https://docs.oracle.com/javase/tutorial/index.html Trail: Learning

More information

Discussion. Type 08/12/2016. Language and Type. Type Checking Subtypes Type and Polymorphism Inheritance and Polymorphism

Discussion. Type 08/12/2016. Language and Type. Type Checking Subtypes Type and Polymorphism Inheritance and Polymorphism Type Joseph Spring Discussion Languages and Type Type Checking Subtypes Type and Inheritance and 7COM1023 Programming Paradigms 1 2 Type Type denotes the kind of values that programs can manipulate: Simple

More information

Problem 1: Binary Trees: Flatten

Problem 1: Binary Trees: Flatten Problem 1: Binary Trees: Flatten Recall the data definition for binary trees: A binary-tree is either: #f (make-bt val left right) where val is a number, and left and right are binary-trees. (define-struct

More information

Fun facts about recursion

Fun facts about recursion Outline examples of recursion principles of recursion review: recursive linked list methods binary search more examples of recursion problem solving using recursion 1 Fun facts about recursion every loop

More information

Lambda Calculus LC-1

Lambda Calculus LC-1 Lambda Calculus LC-1 λ- Calculus History-1 Developed by Alonzo Church during 1930 s-40 s One fundamental goal was to describe what can be computed. Full definition of λ-calculus is equivalent in power

More information

Scheme Basics > (butfirst '(help!)) ()

Scheme Basics > (butfirst '(help!)) () Scheme Basics > (butfirst '(help!)) () [The butfirst of a *sentence* containing one word is all but that word, i.e., the empty sentence. (BUTFIRST 'HELP!) without the inner parentheses would be butfirst

More information

AN APPROACH TO THE CLUSTERING OF CORRELATED DATA

AN APPROACH TO THE CLUSTERING OF CORRELATED DATA UNIVERSIDADE DE LISBOA FACULDADE DE CIÊNCIAS DEPARTAMENTO DE INFORMÁTICA AN APPROACH TO THE CLUSTERING OF CORRELATED DATA Marco Filipe da Silva Mesquita MESTRADO EM INFORMÁTICA 2008 UNIVERSIDADE DE LISBOA

More information

OUTLIERS DETECTION BY RANSAC ALGORITHM IN THE TRANSFORMATION OF 2D COORDINATE FRAMES

OUTLIERS DETECTION BY RANSAC ALGORITHM IN THE TRANSFORMATION OF 2D COORDINATE FRAMES BCG - Boletim de Ciências Geodésicas - On-Line version, ISSN 1982-2170 http://dx.doi.org/10.1590/s1982-21702014000300035 OUTLIERS DETECTION BY RANSAC ALGORITHM IN THE TRANSFORMATION OF 2D COORDINATE FRAMES

More information

UMBC CMSC 331 Final Exam

UMBC CMSC 331 Final Exam UMBC CMSC 331 Final Exam Name: UMBC Username: You have two hours to complete this closed book exam. We reserve the right to assign partial credit, and to deduct points for answers that are needlessly wordy

More information

Laboratório de Mecatrônica EESC/USP SEM VxWorks/Workbench. Jean M.S.C. Yabarrena 30/04/10

Laboratório de Mecatrônica EESC/USP SEM VxWorks/Workbench. Jean M.S.C. Yabarrena 30/04/10 Laboratório de Mecatrônica EESC/USP SEM 0544 VxWorks/Workbench Jean M.S.C. Yabarrena 30/04/10 Motivação Como interagir com o VxWorks e como utilizar seus recursos Objetivos Utilizar uma utilidade que utiliza

More information

( &% class MyClass { }

( &% class MyClass { } Recall! $! "" # ' ' )' %&! ( &% class MyClass { $ Individual things that differentiate one object from another Determine the appearance, state or qualities of objects Represents any variables needed for

More information

Midterm Exam: ECSE 427/COMP 310 Operating Systems Thursday, March 1, 2012 Place: ENGMC 304 & ENGTR 0070; Time: 10:30am 11:30am

Midterm Exam: ECSE 427/COMP 310 Operating Systems Thursday, March 1, 2012 Place: ENGMC 304 & ENGTR 0070; Time: 10:30am 11:30am Midterm Exam: ECSE 427/COMP 310 Operating Systems Thursday, March 1, 2012 Place: ENGMC 304 & ENGTR 0070; Time: 10:30am 11:30am EXAMINER: Prof. M. Maheswaran STUDENT NAME: McGill ID: INSTRUCTIONS: This

More information