-> Begin on: Apri 4th 2023
-> Finish on: May 17th 2023
-> By:
------ Hicham SAIDI
------ Anis CHEIKH
-> Note : 87.5% (best mark)
-> Teacher: Dr Djouadi
-> Licence 2 -Informatic-
Hi there, As I am growing up, I find it great to share any project that I did or I will do in the futur in my gitub page even if it is simple or hard. So I have decide to day Feb 13th, 2024 to share some projects that I did for my univecity as homework or test which may help other student who may have similar project to do. This project was done by me (Saidi HIcham) and Anis Cheikh
This project was for the module of Languages Theory, do on April 2023, in my second year of univercity in informatic. The pdf which tell you what to do is in frensh so I will write the explanation here in english:
Let ℒ(𝐺) be the language generated by the grammar 𝐺 =< 𝑇, 𝑁, 𝑆, 𝑃 > such that:
𝑇 = {𝑎, 𝑏, 𝑐} 𝑁 = {𝑆, 𝐴} 𝑃: 𝑆→𝐴/𝜀 𝐴→𝑎𝐴𝑎𝑎/𝑏𝑏𝐴𝑏/𝑐 Write a parameterized program to generate all words of the language 𝐿𝑘 = {𝜔 ∈ ℒ(𝐺) / |𝜔| ≤ 𝑘} for 𝑘 ≥ 0. The parameter 𝑘 will be given as input to your program. Write a parameterized program to generate all words of the language 𝐿𝑅𝑘 = {𝜔 ∈ ℒ 𝑅 (𝐺) / |𝜔| ≤ 𝑘} for 𝑘 ≥ 0. ℒ 𝑅 (𝐺) is the mirror language of ℒ(𝐺). The parameter 𝑘 will be given as input to your program. Write a parameterized program to generate all words of the language 𝐿𝑛𝑘. The parameters 𝑘 and 𝑛 will be given as input to your program (𝑘, 𝑛 ≥ 0). 𝐿𝑛𝑘 represents the power n of the language 𝐿𝑘.
Write a parameterized program that, given any word as input, checks if it belongs to the language ℒ(𝐺). It is assumed that this word is lexically correct, meaning it only contains elements from the set 𝑇. During evaluation, the teacher will provide any word as input, and your program should verify if the word is syntactically correct.
This project was done using java programming language. The commanters will let you understand every thing in the code not the graphic part as it was optional so I was focusing on the mathematical part more than the graphical interface but I am sure you can find out to understand it as you have now powerful tools like chatGPT and other AI assictenes.