- The objective of this project is to implement a simulation of a Deterministic Pushdown Automaton (DPDA) and provide a minimalist Graphical User Interface (GUI) for interacting with the simulation. The DPDA will serve as an abstract machine capable of accepting or rejecting input strings. This project serves as a requirement in the subject Advanced Algorithms and Complexity (STALGCM) in De La Salle University.
- Accessible in the link: https://kylecarlo.github.io/Deterministic-Pushdown-Automata/
- Download the project from the repository.
- Open a terminal.
- Using the terminal, go to the project directory (directory where index.html is located).
- Type in the terminal,
npm start
- Input the machine definition based on the proper format stated below
- Press
IMPORT
if you have an input from.txt
file. - Press
READ
button to check the machine definition.- Troubleshoot: If error exists, check the input format again or check if all the transitions are deterministic.
- Input the string you want to check in the box in the
Input String
panel.- NOTE: There should be no
*
in the input string as it representsλ
in the machine definition.
- NOTE: There should be no
- Press
RUN
button to check if the string is accepted or not. - Press
STEP
button to check the step-by-step procedure done by the machine. - Press
RESET
button to go back from the start. - You can control the speed of the machine execution by controlling the slider. Rightmost being the fastest.
- The machine definition follows the format below by line
- number of states
- list of states
- number of symbols in the input alphabet
- input alphabet
- number of symbols in the stack alphabet
- stack alphabet
- number of transitions
- list of transitions in the format
q s pop q’ push
such thatf(q,s,pop) = (q’,push)
- Note that for this simulation, only single-character inputs and single-character push/pop to the stack are accepted
- DPDA's formal definition is followed for other rules regarding transitions
- start state
*
representsλ
- initial stack symbol
- number of final states
- list of final states
- Daphne Janelyn L. Go
- Kyle Carlo C. Lasala
- Maria Monica Manlises