Derivation Visualization for Context-Free Grammar Design: Helping Students Understand Context-Free Grammars

In Formal Languages and Automata Theory courses, students are exposed to context-free grammars. They are expected to learn how to develop grammars and how to derive words. Despite multiple classroom and textbook examples, some students find grammar design and word derivation difficult due to nondeterminism. A modern pedagogy uses a programming-based approach to introduce students to context-free grammars. Using this methodology, students can design, implement, validate, and verify context-free grammars. However, they find the design and development task challenging. This article presents a novel dynamic visualization tool to help students with grammar design, implementation, and verification. The tool presents the user with the stepwise construction of a derivation tree and with support to visualize whether nonterminal invariants hold. Empirical data from a small formative study suggests that students find the visualization tool useful to understand word derivation, to debug grammars, and to develop correctness proofs.

Authors

Institutions

Publication Details

Published
2025-10-09
DOI
https://doi.org/10.1145/3758317.3759678
Primary Topic
Natural Language Processing Techniques
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Derivation Visualization for Context-Free Grammar Design: Helping Students Understand Context-Free Grammars

Marco T. Morazán, Tijana Minić, Andrés M. Garced
Natural Language Processing Techniques
article

Derivation Visualization for Context-Free Grammar Design: Helping Students Understand Context-Free Grammars

Marco T. Morazán, Tijana Minić, Andrés M. Garced
article en

Abstract

In Formal Languages and Automata Theory courses, students are exposed to context-free grammars. They are expected to learn how to develop grammars and how to derive words. Despite multiple classroom and textbook examples, some students find grammar design and word derivation difficult due to nondeterminism. A modern pedagogy uses a programming-based approach to introduce students to context-free grammars. Using this methodology, students can design, implement, validate, and verify context-free grammars. However, they find the design and development task challenging. This article presents a novel dynamic visualization tool to help students with grammar design, implementation, and verification. The tool presents the user with the stepwise construction of a derivation tree and with support to visualize whether nonterminal invariants hold. Empirical data from a small formative study suggests that students find the visualization tool useful to understand word derivation, to debug grammars, and to develop correctness proofs.

Seton Hall University (US), University of Washington (US), Seattle University (US)
Openalex Percentile: Top 85%
Natural Language Processing Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.