A modular C application for querying airport, flight, passenger, and reservation data.
Academic project built for Laboratórios de Informática III (2025/2026).
This project implements a flight management system capable of loading and querying large CSV datasets covering airports, flights, aircrafts, passengers, and reservations. The system is designed with a strong emphasis on modularity, encapsulation, and memory safety. The program validates all CSV input (syntactic and logical).
The application supports three execution modes:
| Executable | Description |
|---|---|
programa-principal |
Batch mode — reads queries from a file and writes results to disk |
programa-interativo |
Interactive mode — terminal UI for exploring data on-the-fly |
programa-testes |
Test mode — validates query outputs and benchmarks performance |
Build all executables at once:
makeReads queries from a file and writes output to resultados/.
make runOutput files will be created as resultados/command1_output.txt, resultados/command2_output.txt, etc.
Launches a terminal interface where you can load a dataset and run queries interactively.
make runinterativoCompares program output against expected results, and reports timing and memory usage.
make runtestesmake valgrindRuns programa-principal under Valgrind with full leak checking and origin tracking.
make clean # Remove object files and results
make fclean # Also remove executables and docs
make rebuild # fclean + full rebuild| Query | Description |
|---|---|
1 <code> |
Airport summary (name, city, country, type, arrival/departure counts) |
2 <N> [manufacturer] |
Top N aircraft by number of flights (optional manufacturer filter) |
3 <start_date> <end_date> |
Airport with most departures in a date range |
4 [begin_date end_date] |
Passenger who spent the most time in the weekly top 10 spenders |
5 <N> |
Top N airlines by average delay (Delayed flights only) |
6 <nationality> |
Most common destination airport for passengers of a given nationality |
Append S to any query number to use = as the field separator instead of ;.
Generate and view Doxygen HTML docs:
make doc # Generate docs into docs/
make doc-view # Open docs in browser
make doc-clean # Remove generated docsAll public interfaces in include/ are documented with @brief, @param, and @return tags following Doxygen conventions.
The report is in Portuguese and was written in Typst.
- Gabriel Faria
- Ricardo Rodrigues
- Rui Gomes