arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2407.08088cs.FLcs.GRcs.HCcs.PL
收藏

有限状态自动机与正则表达式的相互转换可视化

Finite-State Automaton To/From Regular Expression Visualization

Marco T. Morazán, Tijana Minić

AI总结:

针对形式语言与自动机理论课程中转换规则难理解的问题,开发了支持有限状态自动机与正则表达式互转的可视化工具,可分步操作且认知负荷低,教学效果良好。

摘要:

大多数形式语言与自动机理论课程都会探讨用于识别语言中单词的计算模型与用于生成语言中单词的计算模型之间的对偶性。对于不熟悉形式化表述的学生而言,这些转换通常缺乏直观性。可视化工具可在帮助学生完成此类转换方面发挥关键作用。本文介绍了为FSM(一种面向自动机理论课堂的领域特定语言)开发的可视化工具,可实现有限状态自动机与正则表达式的相互转换。使用这些工具时,用户可输入任意有限状态机或任意正则表达式,并可在转换过程中逐步前进或后退。每一步都会通过可视化呈现说明所执行的步骤。文章概述了这些工具,描述了其实现方式,并将其与相关工作进行了对比。此外,本文还展示了从对照组收集的实证数据。实证数据表明,这些工具广受好评、效果显著,且学习使用它们的外在认知负荷较低。

英文摘要:

Most Formal Languages and Automata Theory courses explore the duality between computation models to recognize words in a language and computation models to generate words in a language. For students unaccustomed to formal statements, these transformations are rarely intuitive. To assist students with such transformations, visualization tools can play a pivotal role. This article presents visualization tools developed for FSM -- a domain-specific language for the Automata Theory classroom -- to transform a finite state automaton to a regular expression and vice versa. Using these tools, the user may provide an arbitrary finite-state machine or an arbitrary regular expression and step forward and step backwards through a transformation. At each step, the visualization describes the step taken. The tools are outlined, their implementation is described, and they are compared with related work. In addition, empirical data collected from a control group is presented. The empirical data suggests that the tools are well-received, effective, and learning how to use them has a low extraneous cognitive load.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑