BasicOS
Basics
of
Operating
Systems

Eurecom Dictionnary

General overview

The objective of this project is to complete the C code of a dictionnary management system. This system is built upon two components:
  • A file, storing the word,

  • A C program, performing operations on the dictionnary. This program reads arguments from the command line, including commands to be performed on the dictionnary (e.g., looking for a word), and returns an answer in the terminal.

System specification

Overview

A dictionnary is stored in a text file: words.txt. This text file contains a list of English words: one word per line. They are classified in alphabetical order. A program, called words, that you ought to write, takes as input two references:
  1. A reference to a command file: this fille contains a list of commands to be executed by words. This file contains one command per line. The valid commands are given later.

  2. A reference to a dictionnary file (e.g., to words.txt)

For instance, a typical use of words is:
$ ./words fileOfCommands words.txt
Actually, in the repository we provide, the dictionnary file is given in the subdirectory data, words is in bin, and we provide examples of command files in examples, so a valid command should rather be: $ cd bin&&./words ../examples/commands1 ../data/words.txt

Commands

The commands to implement are given in the following table. We assume that a dictionnary named D has been given as reference to words.

Command Comment
add word1 word2 word3 ... adds the provided words to D
remove word1 word2 word3 ... removes the provided words from
size returns the total number of words in D
advancedsize ab returns the total number of words starting with "ab" in D
save filename saves D in the referenced file
search word returns "word" if "word" in a D, otherwise nothing
advancedsearch w?r*d returns whether "w?rd" in a D using, the "?" to match any valid characters of words
helpdescribes the available commands

Implementation

Valid characters

All valid characters are the ones present in words.txt. This includes
  • Uppercase and lowercase letters
  • Numbers 0-9
  • & ! ' , -, . /
  • -
You can easily find this lst of characters by running this bash command on the words.txt file:
$ grep -o . BasicOS/docs/words.txt | sort -u

compilation and execution

Your implementation must be compilable and runnable on the Linux PCs in the laboratory rooms. We will evaluate the compilation of your code, and then the execution using the provided tests. The performance of your implementation is very important as well. Thus, for the provided examples, we will evaluate how much time the execution of your program takes. Using the following command, we can deduce How much time your program takes to execute "commands1"
$ cd bin&&time ./words ../examples/commands1 ../data/words.txt


We have prepared a C environment (Makefile, libraries, include) for the project in the following git: https://gitlab.eurecom.fr/ludovic.apvrille/basicos_project_fall2025_forstudents. Clone it as follows:
$ git clone git@gitlab.eurecom.fr:ludovic.apvrille/basicos_project_fall2025_forstudents.git
 
Once cloned, have a look at the .md file at the root of this git repository.

Bonus

  • Implementing a command to merge a referenced dictionnary file with the opened dictionnary.

  • Automatically compressing/uncompressing dictionnary files

  • Supporting "*" in the advancedsearch command: "*" matches zero or more characters.

Deadlines, deliverables and organization

Program the specified system, and provide the sources files in C, Makefile and one report in markdown format, by Dec. 11th, 2025, 18h00 CET. Advices on how to write a report are given here. Everything should be available in the git of your project. No commit after this date will be considered. If your code does not compile, don't expect to have a grave over 5.

All members of the group must work on the general definition of the dictionnary handling (loading in a data structure), and the implementation of the core functions (command analysis). Then, the implementation of commands must be split between the members of the group, as follows:
  • Members #1 (leader): data structure management and size

  • Members #2: remove and advancedsize

  • Members #3: add and save

  • Members #4: search and advancedsearch

Grading

10 points are given to the whole group, 10 points are given to each student.
  • 5 points for the report. The report covers the work of the whole group, but must emphasize on the work done by each group member.

  • 5 points for the global approach: global algorithm, common code, regular progression on the project.

  • 10 individual points for personal implementation. This grade is individual. If your implementation in C is not ready by the deadline, provide the corresponding algorithm in pseudo code: you can get up five points with a pseudo-code.

How to proceed?

Making groups

  1. Form 16 groups of 4 students. As soon as your group is setup, send me an email with the name of the group leader, as well as the other names, and the email of each group member. I will validate the group by answering to your email and giving you a group number. Please organize yourselves into 16 groups, each consisting of 4 students. Once your group has been established, I would like the designated group leader to send me an email providing the full names and email addresses of all the group members. In the subject line of your email, please include the phrase "[BasicOS] New group". Upon receiving your email, I will confirm your group's formation, assign you a group number.

  2. Setup a gitlab projet (use gitlab.eurecom.fr for this) called EXACTLY basicos2025-teamXX (With XX your group number, for group 1: basicos2025-team01) and send me the link to your gitlab: I will follow your progression that way. Do allow me to clone your gitlab project.

How to work?

  1. First sessions. Clearly define the general structure of your project. Two documents we have prepared should help you for this: the first one on how to structure a C program and the second one on complementary information on the project specification

  2. First and second sessions: program together the main framework: handling of arguments, handling of main commands, handling of errors.

  3. Third session: individually program the commands you are meant to implement. Make individual tests.

  4. Fourth session: integrate together all commands, and check that all the tests you provide run: a part of your grade is based on this. Improve program performance.

  5. Fourth session: Provide at least 5 more tests with more that 10 commands each.

  6. Your git must be ready (=STRICT DEADLINE) the 11th of December, 18h00, Paris time.

And do not forget to regularly commit&push on the git. Working in a regular way is part of the final grade.