Faculdade de Ciências e Tecnologia da Universidade NOVA de Lisboa

LEI · Faculdade de Ciências e Tecnologia da Universidade NOVA de Lisboa

Programming Languages and Environments

LAPCourse Page
  • 6 ECTS
  • 2nd Semester
  • Exam: Optional
Overall
5
1
4
3
3
1
2
0
1
0
4.0
★★★★★
5 ratings
Workload
Very light
0
Light
0
Moderate
3
Heavy
2
Very heavy
0
Moderate5 ratings

Feedback

2025/2026
★★★★★
Workload:Moderate

4 months ago

Das cadeiras mais importantes do curso. Os professores são incríveis e os materiais fornecidos são interessantes e úteis. Os testes são difíceis, e diferem um pouco dos exercícios realizados nas aulas práticas, e por isso é necessário um estudo regular. Façam os projetos sem recorrer à inteligência artificial se quiserem crescer enquanto programadores.

★★★★★
Workload:Heavy

4 months ago

Adorei aprender Ocaml, as aulas práticas e projetos foram incríveis. Mas os testes eram bastante difíceis. Não havia muitos recursos para estudar também, então utilizei bastante o Claude para me fazer modelos de teste.

★★★★★
Workload:Heavy

4 months ago

A cadeira de Laboratório de Aplicações e Programação foi, na minha opinião, uma das cadeiras mais importantes do curso, principalmente porque obriga a aplicar conceitos de programação de forma mais completa e estruturada. É uma unidade curricular que desenvolve bastante o raciocínio lógico, a organização do código e a capacidade de construir uma solução funcional a partir de um problema mais aberto.

A carga de trabalho foi pesada. Apesar de a matéria não ser impossível, exige bastante prática e consistência, sobretudo por causa do projeto. É uma cadeira onde não compensa deixar trabalho para o fim, porque muitos erros só aparecem quando se começa realmente a implementar, testar e integrar as várias partes do programa.

O método de ensino ajudou porque a cadeira tem uma componente muito prática. Mais do que decorar teoria, é necessário perceber bem como dividir um problema em partes mais pequenas, implementar funções, testar casos simples e ir melhorando a solução progressivamente. Esta abordagem acaba por ser muito útil para ganhar maturidade como programador.

Em relação à avaliação, o projeto é uma parte essencial da cadeira. A melhor estratégia é começar cedo, perceber bem o enunciado e garantir que cada funcionalidade fica bem testada antes de avançar para a seguinte. Também é importante manter o código organizado, com funções pequenas e claras, porque isso facilita muito a deteção de erros e a evolução do projeto.

Relativamente aos materiais, os exemplos e exercícios são úteis, mas o verdadeiro progresso acontece quando se programa mesmo. No início, algumas partes podem parecer abstratas, especialmente para quem ainda não está habituado ao estilo funcional, mas com prática começa-se a perceber melhor a lógica da linguagem e a forma como os problemas devem ser resolvidos.

Algumas dicas para futuros alunos:

  • Não deixem o projeto para os últimos dias.
  • Leiam muito bem o enunciado antes de começar a programar.
  • Dividam o problema em partes pequenas e testem cada função separadamente.
  • Usem exemplos simples para confirmar se o código está a fazer o esperado.
  • Mantenham o código organizado desde o início, porque depois é muito mais difícil corrigir.
  • Tentem perceber a lógica da programação funcional em vez de apenas copiar soluções.
  • Façam commits frequentes ou guardem versões diferentes do projeto para não perderem progresso.
  • Peçam ajuda cedo quando ficam bloqueados, porque um erro pequeno pode impedir o resto do projeto de avançar.

No geral, considero que LAP é uma cadeira exigente, mas muito útil. Dá trabalho, especialmente por causa do projeto, mas também é das cadeiras onde mais se sente evolução prática. Quem acompanha a matéria, começa o projeto cedo e programa de forma consistente acaba por ganhar uma base muito importante para cadeiras futuras e para desenvolvimento de software em geral.

★★★★★
Workload:Moderate

4 months ago

Bons professores. Aulas práticas aprendes muito. Os projetos sao faziveis. E uma cadeira que exige estudo e dedicação. Ha imensos exercícios no clip que sao realizados em aula. Recomendo estudarem bastante.

★★★★★
Workload:Moderate

4 months ago

Apesar de ser uma linguagem de programacao nova, tem uns conceitos de programação funcional que são bem fáceis de compreender. As avaliações deixaram a desejar, visto que tinham um nível de dificuldade acima do que estávamos habituados. Os professores são bastante compreensivos e tentam ajudar ao máximo. É uma cadeira com materiais interativos, que se apanharem o gosto pela coisa será uma cadeira para subir a média.

About the course

Objectives

To Know

1. The origins and structure of programming languages (Lambda Calculus, paradigms, interpreters, and compilers). 2. Key concepts in functional programming, including expression-based languages and polymorphic types. 3. Recursive algorithms, inductive reasoning, and their correctness. 4. The role of higher-order functions and their significance in functional programming. 5. The principles of modularity, concurrency, and state management 6. Understand the potential of programming without side effects, referential transparency, and functional data structures

To Do

7. Implement functional programs using OCaml, applying effect-free techniques and polymorphic types. 8. Write recursive algorithms and prove their correctness using inductive reasoning. 9. Use higher-order functions, such as function composition and partial evaluation, in practical programming. 10. Work with structured data (tuples, lists, algebraic data types) and iterate over data structures using Map and Fold. 11. Decompose, Design and implement modular and concurrent programs, handling state, memoization, and asynchronous operations.

Syllabus

1. The history and structure of programming languages

1.1 The origins of programming languages: The Lambda Calculus 1.2 The main concepts of programming languages 1.3 Programming paradigms 1.4 Interpreters and Compilers (introduction)

2. Expressions, Values, Functions and types

2.1 The OCaml programming language 2.2 Expression and Statement based programming languages 2.3 Values and Types 2.3 Name binders: (Mathematical) variables (let) and functions (fun) 2.4 Polymorphic types and type inference 2.5 Library Functions 2.6 Input/Output

3. Recursion and Induction

3.1 Recursive algorithms on natural numbers 3.2 Inductive reasoning 3.3 Correctness of inductive reasoning 3.4 Tail recursion 3.5 Comparison with imperative algorithms

4. Higher-Order functions Composition,

4.1 Functions as values 4.2 Partial evaluation 4.3 Function composition

5. Structured Data

5.1 Tuples and Lists 5.2 Algaebric Data Types 5.2 Inductive types and algorithms 5.3 Using Map and Fold to iterate data structures

6. Modules, Interfaces and Functors

6.1 OCaml Module System 6.2 Modularity mechanisms in other programming languages

7. State, Asynchrony and Concurrency

7.1 The use of state in functional programming 7.2 Memoization 7.3 Asynchronous computation and I/O (Promises) 7.4 Concurrent programming in OCaml

8. Machines, Interpreters and Compilers

8.1 Stack-based and Register based machines 8.2 The structure of programming languages 8.3 Compositionality of semantic constructs 8.4 Interpreting and compiling functions

Something missing or out of date?

Assessment

Assessment Components

The assessment consists of two components: the laboratory component and the theoretical-practical component.

Laboratory Component and "Frequência"

The laboratory component is composed of three assignments. Each assignment involves designing, implementing, and validating functional programs to solve a given set of problems. It also includes the preparation of a report and an oral discussion. Even if the first two parts of the assignment (programs and reports) are carried out in groups of two students; the discussion is individual. The submission and acceptance method is described in the project assignment.

The discussions (to assess the student’s understanding of the work they submitted) are mandatory, in-person, and individual. The discussion of an assignment consists of making changes to the submitted code so that the new program solves a variation of the original problem, as defined in the discussion instructions, which differs slightly from the problem solved in the assignment. The grades for discussions and their criteria are as follows:

20: the change is globally correct; 16: the change is confusing or very incomplete, but the approach could be correct; 12: the change is incorrect, with "some things right and others very wrong"; 4: "no changes were made" or "the changes made are minimal" or "the changes made do not make sense."

Generally, a student''s grade for an assignment is the lower of the grade for the submitted work (done in a group) and their grade in the discussion of that work (which is zero if the student is absent). A student’s grade for an assignment may be lower than that determined by the previous rule if their group partner’s performance in the discussion of all assignments is very poor (graded with 4). Consequently, the grades of the two group members can differ (and range between 0 and the grade of the assignment).

The laboratory component grade (CompL) is the average of the student''s grades on the three assignments (P1, P2, and P3), with weights of 0.25, 0.25, and 0.5, respectively.

The formula is as follows: CompL = 0.25 x P1 + 0.25 x P2 + 0.5 x P3.

To qualify for "Frequência", CompL must be >= 9.5.

The discussion of the first assignment is held on the day of the first test, and the discussions for the second and third assignments are conducted on the day of the second test.

Theoretical-Practical Component

The theoretical-practical component consists of two tests (during the semester) or an indivisible exam (during the resit period). All three tests are individual, face-to-face, written, and without consultation. No electronic devices (e.g., calculators, mobile phones, smartwatches, tablets, laptops) are allowed.

Pre-registration for the tests is required.

The grade for the theoretical-practical component (CompTP) is the weighted average of the test scores (T1 and T2) or the exam score (Ex):

CompTP = 0.4T1 + 0.6T2 or CompTP = Ex. To pass, CompTP must be >= 9.5.

Final Grade

The final grade (F) for students with "Frequência" is:

F = CompTP, if CompTP < 9.5; F = 0.3 * CompL + 0.7 * CompTP, if CompTP >= 9.5.

All grades (P1, P2, P3, T1, T2, Ex, CompL, and CompTP) are rounded to one decimal place, except the final grade (F), which is rounded to the nearest whole number.

"Frequência" and Grades from Previous Years

In accordance with the current assessment regulations, "Frequência" from 2 previous years remains valid, as do their grades. Older results are not kept and used.

Open Book and AI Tools

The use of online resources and AI tools (such as ChatGPT or Copilot) is allowed for projects and class exercises but is prohibited during written tests and discussions. The use of AI tools must be explicitly mentioned in the code and report submitted. A student who uses these tools during an evaluation or project and fails to mention their use is considered to have committed plagiarism.

Fraud and Plagiarism

Issues of fraud and plagiarism will be dealt with according to NOVA FCT''s Evaluation Regulations.

Students may discuss assignments with colleagues and exchange ideas, but they may not share code (even "a few lines") under any circumstances, either orally or in writing. Writing code must be an individual task or internal to each group, depending on the evaluation element. For example, it is not permitted to show code on a screen, dictate code, send files with code, or post them in places accessible to third parties.

It is assumed that all parties involved act with common sense and that everyone is reasonable. It is expected that when students work in groups, they do so fairly and equitably, work by work. The contribution of each group member is the group''s collective responsibility. The various assignments throughout the semester do not have to be completed by the same groups of students.

In summary, the following are considered fraudulent:

a group that gives or receives code commits fraud; a group in which only one member does the work commits fraud; students who work in larger groups, sharing code, commit fraud. The use of AI tools (such as ChatGPT or Copilot) must be explicitly mentioned in the code. A group that uses these tools during an assignment and fails to mention their use is considered to have committed plagiarism.

Ban on the Use of Electronic Devices During Assessments

During an assessment, a student may not have any electronic devices capable of accessing the internet or with Bluetooth connectivity (e.g., smartphones, smartwatches, smartglasses, tablets, laptops) with them, even if they are turned off. Violation of this rule results in immediate failure of the curricular unit by exclusion and will be reported to the Scientific Committee of the respective program.

Has the assessment changed, or is something missing?

Bibliography

  • "OCaml programming: Correct + Efficient + Beautiful" de Michael R. Clarkson et al.

Missing a book or some materials?