-
Finite-State Automaton To/From Regular Expression Visualization
Authors:
Marco T. Morazán,
Tijana Minić
Abstract:
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 visualiza…
▽ More
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.
△ Less
Submitted 10 July, 2024;
originally announced July 2024.
-
Proceedings of The 2023 Scheme and Functional Programming Workshop
Authors:
Marco T. Morazán
Abstract:
This volume contains the articles presented at The 2023 Scheme and Functional Programming Workshop in Seattle, Washington on September 9, 2023. The program committee reviewed the articles using current academic standards and selected four articles for presentation. These proceedings are considered non-archival and the authors are free to submit revised versions of their articles to other venues fo…
▽ More
This volume contains the articles presented at The 2023 Scheme and Functional Programming Workshop in Seattle, Washington on September 9, 2023. The program committee reviewed the articles using current academic standards and selected four articles for presentation. These proceedings are considered non-archival and the authors are free to submit revised versions of their articles to other venues for archival publication.
Program Committee: Leif Andersen, Northeastern University; Mark Friedman
Leilani Gilpin, University of California, Santa Cruz; Jason Hemann, Seton Hall University
Julia Lawall, Inria; Joe Gibbs Politz, University of California at San Diego; Marco T Morazán (Chair), Seton Hall University
△ Less
Submitted 12 October, 2023;
originally announced October 2023.
-
Visualizing a Nondeterministic to Deterministic Finite-State Machine Transformation
Authors:
Tijana Minic,
Marco T. Morazán
Abstract:
The transformation of a nondeterministic finite-state automaton into a deterministic finite-state automaton is an integral part of any course on formal languages and automata theory. For some students, understanding this transformation is challenging. Common problems encountered include not comprehending how the states of the deterministic finite-state automaton are determined and not comprehendin…
▽ More
The transformation of a nondeterministic finite-state automaton into a deterministic finite-state automaton is an integral part of any course on formal languages and automata theory. For some students, understanding this transformation is challenging. Common problems encountered include not comprehending how the states of the deterministic finite-state automaton are determined and not comprehending the role that all the edges of the nondeterministic finite-state automaton have in the deterministic finite-state automaton's construction. To aid students in understanding, transformation visualization tools have been developed. Although useful in helping students, these tools do not properly illustrate the relationship between the states of the deterministic finite-state automaton and the edges of the nondeterministic finite-state automaton. This article presents a novel interactive visualization tool to illustrate the transformation that highlights this relationship and that is integrated into the FSM programming language. In addition, the implementation of the visualization is sketched.
△ Less
Submitted 12 October, 2023;
originally announced October 2023.
-
Visualizing Why Nondeterministic Finite-State Automata Reject
Authors:
Oliwia Kempinski,
Marco T. Morazán
Abstract:
Students find their first course in Formal Languages and Automata Theory challenging. In addition to the development of formal arguments, most students struggle to understand nondeterministic computation models. In part, the struggle stems from the course exposing them for the first time to nondeterminism. Often, students find it difficult to understand why a nondeterministic machine accepts or re…
▽ More
Students find their first course in Formal Languages and Automata Theory challenging. In addition to the development of formal arguments, most students struggle to understand nondeterministic computation models. In part, the struggle stems from the course exposing them for the first time to nondeterminism. Often, students find it difficult to understand why a nondeterministic machine accepts or rejects a word. Furthermore, they may feel uncomfortable with there being multiple computations on the same input and with a machine not consuming all of its input. This article describes a visualization tool developed to help students understand nondeterministic behavior. The tool is integrated into, FSM, a domain-specific language for the Automata Theory classroom. The strategy is based on the automatic generation of computation graphs given a machine and an input word. Unlike previous visualization tools, the computation graphs generated reflect the structure of the given machine's transition relation and not the structure of the computation tree.
△ Less
Submitted 11 October, 2023;
originally announced October 2023.
-
Regular Expressions in a CS Formal Languages Course
Authors:
Marco T. Morazán
Abstract:
Regular expressions in an Automata Theory and Formal Languages course are mostly treated as a theoretical topic. That is, to some degree their mathematical properties and their role to describe languages is discussed. This approach fails to capture the interest of most Computer Science students. It is a missed opportunity to engage Computer Science students that are far more motivated by practical…
▽ More
Regular expressions in an Automata Theory and Formal Languages course are mostly treated as a theoretical topic. That is, to some degree their mathematical properties and their role to describe languages is discussed. This approach fails to capture the interest of most Computer Science students. It is a missed opportunity to engage Computer Science students that are far more motivated by practical applications of theory. To this end, regular expressions may be discussed as the description of an algorithm to generate words in a language that is easily programmed. This article describes a programming-based methodology to introduce students to regular expressions in an Automata Theory and Formal Languages course. The language of instruction is FSM in which there is a regular expression type. Thus, facilitating the study of regular expressions and of algorithms based on regular expressions.
△ Less
Submitted 14 August, 2023;
originally announced August 2023.
-
Introduction to Functional Classes in CS1
Authors:
Marco T. Morazán
Abstract:
Students introduced to programming using a design-based approach and a functional programming language become familiar with first-class functions. They rarely, however, connect first-class functions to objects and object-oriented program design. This is a missed opportunity because students inevitably go on to courses using an object-oriented programming language. This article describes how studen…
▽ More
Students introduced to programming using a design-based approach and a functional programming language become familiar with first-class functions. They rarely, however, connect first-class functions to objects and object-oriented program design. This is a missed opportunity because students inevitably go on to courses using an object-oriented programming language. This article describes how students are introduced to objects within the setting of a design-based introduction to programming that uses a functional language. The methodology exposes students to interfaces, classes, objects, and polymorphic dispatch. Initial student feedback suggests that students benefit from the approach.
△ Less
Submitted 26 July, 2022;
originally announced July 2022.
-
Design of Classes I
Authors:
Marco T. Morazán
Abstract:
The use of functional programming languages in the first programming course at many universities is well-established and effective. Invariably, however, students must progress to study object-oriented programming. This article presents how the first steps of this transition have been successfully implemented at Seton Hall University. The developed methodology builds on the students' experience wit…
▽ More
The use of functional programming languages in the first programming course at many universities is well-established and effective. Invariably, however, students must progress to study object-oriented programming. This article presents how the first steps of this transition have been successfully implemented at Seton Hall University. The developed methodology builds on the students' experience with type-based design acquired in their previous introduction to programming courses. The transition is made smooth by explicitly showing students that the design lessons they have internalized are relevant in object-oriented programming. This allows for new abstractions offered by object-oriented programming languages to be more easily taught and used by students. Empirical evidence collected from students in the course suggests that the approach developed is effective and that the transition is smooth.
△ Less
Submitted 26 July, 2022;
originally announced July 2022.
-
How to Design While Loops
Authors:
Marco T. Morazán
Abstract:
Beginning students find the syntactic construct known as a while loop difficult to master. The difficulties revolve around guaranteeing loop termination and around learning how to properly sequence mutations to solve a problem. In fact, both of these are intertwined and students need to be taught a model that helps them reason about how to design while loops. For students that have been introduced…
▽ More
Beginning students find the syntactic construct known as a while loop difficult to master. The difficulties revolve around guaranteeing loop termination and around learning how to properly sequence mutations to solve a problem. In fact, both of these are intertwined and students need to be taught a model that helps them reason about how to design while loops. For students that have been introduced to how to design programs using structural recursion, generative recursion, accumulative recursion, and mutation, the task of teaching them how to design while loops is made easier. These students are familiar, for example, with state variables, termination arguments, and accumulator invariants. All of these are fundamental in the design of while loops. This articles presents a novel technique used at Seton Hall University to introduce beginners to the design of while loops. It presents a design recipe that students can follow step-by-step to establish such things as the driver of the loop, the loop invariant, and the proper sequencing of mutations. The article also presents an example of designing a while-loop based function using the new design recipe.
△ Less
Submitted 20 August, 2020;
originally announced August 2020.
-
Using Video Game Development to Motivate Program Design and Algebra Among Inner-City High School Students
Authors:
Marco T. Morazán
Abstract:
Introducing inner-city high school students to program design presents unique challenges. The typical assumptions of an introductory programming course, like students understand what variables and functions are, may not be safe. Therefore, asking students to define functions as part of the program design process may be an overwhelming task. Many students do not understand that a function is an abs…
▽ More
Introducing inner-city high school students to program design presents unique challenges. The typical assumptions of an introductory programming course, like students understand what variables and functions are, may not be safe. Therefore, asking students to define functions as part of the program design process may be an overwhelming task. Many students do not understand that a function is an abstraction over similar expressions and that parameters represent the differences among these expressions. This articles presents a novel approach to teaching program design to high school students while simultaneously reinforcing high school algebra. The approach is based on a design recipe to help students develop the abstractions that lead to functions. Using a bottom-up approach, students are taught how to abstract over similar expressions. They are then taught how to use high school algebra concepts, like compound functions and function composition, to also design functions. In addition, the article also presents empirical data collected from students to measure their reaction to the course. For the students in the course, the empirical data suggests that high school algebra concepts are successfully reinforced and that students feel they become better problem solvers, find programming intellectually stimulating, and walk away with an interest in programming.
△ Less
Submitted 20 August, 2020;
originally announced August 2020.
-
Visual Designing and Debugging of Deterministic Finite-State Machines in FSM
Authors:
Marco T. Morazán,
Joshua M. Schappel,
Sachin Mahashabde
Abstract:
This article presents a visualization tool for designing and debugging deterministic finite-state machines in FSM -- a domain specific language for the automata theory classroom. Like other automata visualization tools, users can edit machines and observe their execution, given some input. Unlike other automata visualization tools, the user is not burdened nor distracted with rendering a machine a…
▽ More
This article presents a visualization tool for designing and debugging deterministic finite-state machines in FSM -- a domain specific language for the automata theory classroom. Like other automata visualization tools, users can edit machines and observe their execution, given some input. Unlike other automata visualization tools, the user is not burdened nor distracted with rendering a machine as a graph. Furthermore, emphasis is placed on the design of machines and this article presents a novel design recipe for deterministic finite-state machines. In support of the design process, the visualization tool allows for each state to be associated with an invariant predicate. During machine execution, the visualization tool indicates if the proposed invariant holds or does not hold after each transition. In this manner, students can validate and debug their machines before attempting to prove partial correctness or submitting for grading. In addition, any machine edited with the visualization tool can be rendered as executable code. The interface of the visualization tool along with extended examples of its use are presented.
△ Less
Submitted 20 August, 2020;
originally announced August 2020.
-
Vector Programming Using Generative Recursion
Authors:
Marco T. Morazán
Abstract:
Vector programming is an important topic in many Introduction to Computer Science courses. Despite the importance of vectors, learning vector programming is a source of frustration for many students. Much of the frustration is rooted in discovering the source of bugs that are manifested as out-of-bounds indexing. The problem is that such bugs are, sometimes, rooted in incorrectly computing an ind…
▽ More
Vector programming is an important topic in many Introduction to Computer Science courses. Despite the importance of vectors, learning vector programming is a source of frustration for many students. Much of the frustration is rooted in discovering the source of bugs that are manifested as out-of-bounds indexing. The problem is that such bugs are, sometimes, rooted in incorrectly computing an index. Other times, however, these errors are rooted in mistaken reasoning about how to correctly process a vector. Unfortunately, either way, all too often beginners are left adrift to resolve indexing errors on their own. This article extends the work done on vector programming using vector intervals and structural recursion to using generative recursion. As for problems solved using structural recursion, vector intervals provide beginners with a useful framework for designing code that properly indexes vectors. This article presents the methodology and concrete examples that others may use to build their own CS1 modules involving vector programming using any programming language.
△ Less
Submitted 26 June, 2019;
originally announced June 2019.
-
FSM Error Messages
Authors:
Marco T. Morazán,
Josephine A. Des Rosiers
Abstract:
Computer Science students, in general, find Automata Theory difficult and mostly unrelated to their area of study. To mitigate these perceptions, FSM, a library to program state machines and grammars, was developed to bring programming to the Automata Theory classroom. The results of the library's maiden voyage at Seton Hall University had a positive impact on students, but the students found the…
▽ More
Computer Science students, in general, find Automata Theory difficult and mostly unrelated to their area of study. To mitigate these perceptions, FSM, a library to program state machines and grammars, was developed to bring programming to the Automata Theory classroom. The results of the library's maiden voyage at Seton Hall University had a positive impact on students, but the students found the library difficult to use due to the error messages generated. These messages were generated by the host language meaning that students needed to be familiar with the library's implementation to make sense of them. This article presents the design of and results obtained from using an error-messaging system tailor-made for FSM. The effectiveness of the library was measured by both a control group study and a survey. The results strongly suggest that the error-messaging system has had a positive impact on students' attitude towards automata theory, towards programming in FSM, and towards FSM error messages. The consequence has been a marked improvement on students' ability to implement algorithms developed as part of constructive proofs by making the debugging of FSM programs easier.
△ Less
Submitted 26 June, 2019;
originally announced June 2019.
-
Vector Programming Using Structural Recursion
Authors:
Marco T. Morazán
Abstract:
Vector programming is an important topic in many Introduction to Computer Science courses. Despite the importance of vectors, learning vector programming is a source for frustration to many students given that they feel left adrift when it comes to resolving vector indexing errors. Even though the size of a vector is a natural number, there have been no efforts to define a useful recursive data d…
▽ More
Vector programming is an important topic in many Introduction to Computer Science courses. Despite the importance of vectors, learning vector programming is a source for frustration to many students given that they feel left adrift when it comes to resolving vector indexing errors. Even though the size of a vector is a natural number, there have been no efforts to define a useful recursive data definition to help beginners design vector processing functions. This article defines the concept of a vector interval and describes how to exploit its recursive structure to design vector processing functions. The described methodology provides a context beginners can use to reason about proper vector indexing instead of leaving them adrift with this responsibility. A key feature of properly using the described methodology is that if students process the correct vector interval then vector indexing errors can not arise. The classroom deployment of this approach is described in detail. Students, to date, have found vector intervals helpful in avoiding out-of-bounds indexing errors when all the vector elements of the interval are processed.
△ Less
Submitted 14 May, 2018;
originally announced May 2018.
-
Functional Automata - Formal Languages for Computer Science Students
Authors:
Marco T. Morazán,
Rosario Antunez
Abstract:
An introductory formal languages course exposes advanced undergraduate and early graduate students to automata theory, grammars, constructive proofs, computability, and decidability. Programming students find these topics to be challenging or, in many cases, overwhelming and on the fringe of Computer Science. The existence of this perception is not completely absurd since students are asked to des…
▽ More
An introductory formal languages course exposes advanced undergraduate and early graduate students to automata theory, grammars, constructive proofs, computability, and decidability. Programming students find these topics to be challenging or, in many cases, overwhelming and on the fringe of Computer Science. The existence of this perception is not completely absurd since students are asked to design and prove correct machines and grammars without being able to experiment nor get immediate feedback, which is essential in a learning context. This article puts forth the thesis that the theory of computation ought to be taught using tools for actually building computations. It describes the implementation and the classroom use of a library, FSM, designed to provide students with the opportunity to experiment and test their designs using state machines, grammars, and regular expressions. Students are able to perform random testing before proceeding with a formal proof of correctness. That is, students can test their designs much like they do in a programming course. In addition, the library easily allows students to implement the algorithms they develop as part of the constructive proofs they write. Providing students with this ability ought to be a new trend in the formal languages classroom.
△ Less
Submitted 16 December, 2014;
originally announced December 2014.
-
Proceedings First International Workshop on Trends in Functional Programming in Education
Authors:
Marco T. Morazán,
Peter Achten
Abstract:
The First International Workshop on Trends in Functional Programming in Education, TFPIE 2012, was held on June 11, 2012 at the University of St Andrews in Scotland. The goal of TFPIE is to gather researchers, professors, teachers, and all professionals that use or are interested in the use of functional programming in education. Submissions were vetted by the TFPIE 2012 program committee using pr…
▽ More
The First International Workshop on Trends in Functional Programming in Education, TFPIE 2012, was held on June 11, 2012 at the University of St Andrews in Scotland. The goal of TFPIE is to gather researchers, professors, teachers, and all professionals that use or are interested in the use of functional programming in education. Submissions were vetted by the TFPIE 2012 program committee using prevailing academic standards. The 4 articles in this volume were selected for publication as the result of this process. These articles cover a wide range of novel approaches in education using functional programming. Page and Gamboa describe how they introduce students to computational thinking and problem solving using logic and equation-based reasoning. O'Donnell describes efforts to make computer systems courses come alive through the use of simulation and a functional hardware description language. Radge describes a novel approach to CS1 exploiting the interplay of the imprecision found in mathematical abstractions and the precision that is required in programming. Stutterheim, Swierstra, and Swierstra describe a new approach to introduce high school students to programming and to important ideas in Computer Science using a web-based interpreter and theorem prover.
△ Less
Submitted 20 January, 2013;
originally announced January 2013.