- Lina Sofía Ballesteros Merchán
- Santiago Alvarez Díaz
Development of the proposed activity for the subject of Formal Languages and Compilers taught at EAFIT University by prof Sergio Ramírez. Considering the language L = {x ∈ {0,1} | x represents a multiple of three in binary} and the DFA that accepts said language, with the support of a Python library, the behavior of the automaton is simulated.
- The program was executed on Windows OS.
- The chosen language was Python.
- The libray used was Automata and the class used is DFA .The library requires Python 3.8 or newer.
- The code editor used was Visual Studio Code.
- The convention defined for representing the empty string is the character 'e'.
Follow these instructions to run the program:
-
Clone the project on your machine or download the ZIP file.
git clone git@github.com:linaballesteros/flc_assignment.git
-
Go to the project directory (or wherever you stored it).
cd tarea_1_compi cd flc_assignment
-
Make sure you have Python 3.8 or newer.
python --version
-
Install the Automaton library required using
pip
pip install automata-lib
-
Go to the project directory in your code editor or terminal:
cd tarea_1_compi cd flc_assignment
-
Run the following in your command prompt:
python binary3.py
-
Enter your input, for example:
Enter your string: 1111
-
Check results.
The DFA accepts the string ’1111’