Programming Languages and Environments

Objectives

Knowledge:
 1 - Understand the characteristics and usage scenarios of a set of programming languages: Caml, C, JavaScript, Java.
 2 - Understand the functionality and the architecture of the environments for programming development and execution.
 3 - General understanding of all the issues involved from the specification to the execution of programs.

Skills:
 4 - Solve small, but characteristic, problems in the programming languages addressed in the course.
 5 - Identify common abstractions and the fundamental differences on how those abstractions are supported in different programming languages.
 6 - Express or approximate mechanisms available in a given programming language using another language that does not have them as primitive.

General characterization

Code

8147

Credits

6.0

Responsible teacher

Artur Miguel de Andrade Vieira Dias, Luís Manuel Marques da Costa Caires

Hours

Weekly - 5

Total - 73

Teaching language

Português

Prerequisites

Students should have completed the Introduction to Programming (Introdução à Programação) and the Object-Oriented Programming (Programação Orientada pelos Objectos) courses.

Bibliography

  • Artur Miguel Dias, Course notes including exercises.
  • Jason Hickey, Anil Madhavapeddy, Yaron Minsky, "Real World OCaml", O''''Reilly Media, 2013.
  • Brian Kernighan, Dennis M. Ritchie, "The C Programming Language", 2nd ed., Prentice Hall, 1988.
  • Marijn Haverbeke, "Eloquent JavaScript", 2nd ed., No Starch Press, 2014.
  • John C. Mitchell. Concepts in Programming Languages. Cambridge University Press, 2003.
  • Ryan Stansifer. The Study of Programming Languages. Prentice-Hall International, Inc., 1995.

Teaching method

This course has a strong applied approach and about 70% of the grade of the tests and exams depends on the student''''''''s ability to use well the studied languages in solving programming problems.

In the lectures, the concepts are presented, discussed and exemplified. Many of the concepts that appear in the syllabus are conveniently presented and discussed at the time of the study of specific languages (e.g. type inference in OCaml, prototype based programming). Other concepts are better discussed in an independent manner, making use of the previously studied languages for illustrative purposes (e.g. bindings, type systems, the polymorphism nomenclature of Cardelli).

In the lab classes, the students solve small problems, applying the concepts and techniques learned. Some of these problems are theoretical, but most are programming problems.

The projects are mainly developed outside the classes.

Evaluation method

Assessment components

The assessment components are the following and have the weights on the final score that are shown:

  • T1 - Mid-term test 1 - 35% [in person]
  • T2 - Mid-term test 2 - 35% [in person]
  • PP - Programming projects - 30%
  • ER - Resit exam - 70% [in person]

Each of these elements is graded up to 20 points.

The value of PP is the arithmetic mean of 3 programming projectsThere is no minimum score on any of themThe projects are carried out by groups of two students. There may be discussions of some projects for some groups.

Tests are exames are with limited consultation. Students can bring one (1) A4 sheet with notes, written or printed on both sides. At the top left of the sheet, write the student''s short name and number.

Grades of the practical and theoretical components

The grade of the practical component is defined as:

  • PRAT = PP

The grade of the theoretical component is defined in two diferent ways, depending on when the grade is obtained:

  • TEOR= (T1 + T2) / 2
  • TEOR = ER

Frequência

The "frequência" grade is the same as the practical component:

  • FREQ = PRAT

The "frequência" is an essential element to pass this course. The ERASMUS students can make the projects from a distance.

Final grade and Success

The final grade is calculated using the formula:

  • FINAL = 0.3 * FREQ + 0.7 * TEOR

Sucess depends on the following condition:

  • Success = FREQ >= 9.5 e TEOR >= 9.5

All the intermediate grades are rounded to two decimal places. 
The final grade is an integer number.

Validity of the "frequência" obtained this year

The "frequência" grade obtained in the current school year will be valid in the next school yearat least.

Frequências from the previous years

All "frequência" grades obtained in previous years are valid in the current school year. It is  possible to improve the "frequência" grade.

Academic fraud

Any type of fraud in any component of the assessment causes the student to imediatelly fail to pass the course in the current academic year (even if there are exams scheduled).

Subject matter

A – Programming and execution environments
Interpretation. Virtual Machines. Levels of interpretation. Compilation. Linking. Loading. Execution model. Portability. Security. Interoperability. Tools.

B – Procedural and functional languages
OCaml and C. Types: their role; type checking and inference; polymorphism; overloading; static and dynamic typing. Block structuring: bindings; environments; name resolution. Procedures and Functions: local and global names; parameterization; closures.

C – Object-oriented languages
JavaScript and Java. Classes and prototypes. Information hiding. Subtyping. Inheritance.

D – Scripting languages and domain-specific languages
JavaScript and Bash.

E – Programming techniques
Programming paradigms. Inductive method in OCaml. Handling pointers in C. Modeling in JavaScript. Introduction to client-side Web programming.

F - Introduction to web programming.
The HTTP protocol, forms, scripting, AJAX. The event model on the client-side and on the server-side.

G – Selecting a programming language
Factors to consider. Scenarios.