PLQuiz

EN ES

Computer Science Degree - Final Project

Watch project in GitHub

Project summary

PLQuiz is a desktop application that creates problem sheets or questionnaires about the usage of lexical analysis algorithms. The questionnaires are presented in a Moodle-compatible format or print-ready, including high resolution images in vector format. The exercise can be built from a user-provided regular expression, or automatically generated via search and genetic algorithms.

Aho-Sehi-Ullman algorithm

Calculate a set of functions from the syntax tree of the regular expression, and use them to generate the corresponding automata transition table. The functions are:

  • First-pos: set of positions corresponding to the first possible symbols in the matched strings.
  • Last-pos: set of positions corresponding to the last symbols.
  • Follow-pos: set of positions after a given position in the expression.

McNaughton-Yamada-Thompson algorithm

Uses a regular expression to build the deterministic finite automaton that represents the same language. The expression's syntax tree is traversed recursively to build the automata, composing each node from tree automata of the nodes below.

Generation of exam questions

The application uses search algorithms to generate regular expression corresponding to a given type and problem attributes. The possible attributes that define a problem are:

  • If it contains the empty string.
  • The number of different symbols available.
  • The number of states in the corresponding transition table.

The Aho-Sethi-Ullman exercises use random search algorithms, while the McNaughton-Yamada-Thompson use a genetic algorithm.

Questionnaires

The application generates questionnaires in three possible formats:

  • HTML + CSS, used in the user interface to display a preview.
  • Latex, used to generate print-ready questionnaires to use as exams or problem sheets.
  • Moddle XML, used to generate questionnaires that can be easily imported in the e-learning platform.

and also generates images in three possible formats:

  • As regular image files, generated by default when exporting as a Latex document.
  • As a dot program compatible with Graphviz, as an option when exporting as Latex document.
  • As a 64-bit string, to insert images inside XML documents.