linasofi13 / flc_assignment

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

> ST0270 Formal Languages and Compilers Assignment 1 ♟️

Names:

  • Lina Sofía Ballesteros Merchán
  • Santiago Alvarez Díaz

image

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.

About

  • 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'.

Installing Requirements

Follow these instructions to run the program:

  1. Clone the project on your machine or download the ZIP file.

    git clone git@github.com:linaballesteros/flc_assignment.git
  2. Go to the project directory (or wherever you stored it).

    cd tarea_1_compi
    
    cd flc_assignment
  3. Make sure you have Python 3.8 or newer.

    python --version
    
  4. Install the Automaton library required using pip

    pip install automata-lib

Run the Program

  1. Go to the project directory in your code editor or terminal:

     cd tarea_1_compi
    
     cd flc_assignment
  2. Run the following in your command prompt:

    python binary3.py
  3. Enter your input, for example:

    Enter your string: 1111 
  4. Check results.

    The DFA accepts the string ’1111’

About


Languages

Language:Python 100.0%