Increasing Engagement in Automata Theory with JFLAP Susan H. Rodger Duke University Visual Thinking Workshop – Duke University May 4,

Slides:



Advertisements
Similar presentations
CS 345: Chapter 9 Algorithmic Universality and Its Robustness
Advertisements

Nondeterministic Finite Automata CS 130: Theory of Computation HMU textbook, Chapter 2 (Sec 2.3 & 2.5)
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 3 School of Innovation, Design and Engineering Mälardalen University 2012.
Theory Of Automata By Dr. MM Alam
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
Welcome to CSE105 and Happy and fruitful New Year
Decidable languages Sipser 4.1 (pages ). CS 311 Mount Holyoke College 2 Hierarchy of languages All languages Turing-recognizable Turing-decidable.
Lecture 3 Goals: Formal definition of NFA, acceptance of a string by an NFA, computation tree associated with a string. Algorithm to convert an NFA to.
CHAPTER 3 The Church-Turing Thesis
CS 310 – Fall 2006 Pacific University CS310 Decidability Section 4.1/4.2 November 10, 2006.
Foundations of (Theoretical) Computer Science Chapter 4 Lecture Notes (Section 4.1: Decidable Languages) David Martin With modifications.
CS 490: Automata and Language Theory Daniel Firpo Spring 2003.
Fall 2006Costas Busch - RPI1 Non-Deterministic Finite Automata.
1 CSCI 3130: Formal Languages and Automata Theory Tutorial 4 Hung Chun Ho Office: SHB 1026 Department of Computer Science & Engineering.
CS5371 Theory of Computation Lecture 8: Automata Theory VI (PDA, PDA = CFG)
CS 310 – Fall 2006 Pacific University CS310 Variants of Turing Machines Section 3.2 November 8, 2006.
Regular Expressions and Automata Chapter 2. Regular Expressions Standard notation for characterizing text sequences Used in all kinds of text processing.
Final Exam Review Cummulative Chapters 0, 1, 2, 3, 4, 5 and 7.
An Interactive Approach to Formal Languages and Automata with JFLAP
Computer Science Concepts Come Alive Susan H. Rodger Duke University Haverford College Philadelphia, PA April 18, 2010 Supported by.
Lecture 21: Languages and Grammars. Natural Language vs. Formal Language.
Concepts Come Alive through Visualization and Interaction University of Wisconsin Oshkosh July 16-17, 2009 Susan Rodger Professor of the Practice Duke.
Increasing Engagement in Automata Theory with JFLAP Susan H. Rodger Duke University SIGCSE 2009 March 7, 2009 Supported by NSF Grant.
Nondeterministic Finite Automata CS 130: Theory of Computation HMU textbook, Chapter 2 (Sec 2.3 & 2.5)
CS 390 Introduction to Theoretical Computer Science.
An Interactive and Visual Approach to Learning Computer Science Susan H. Rodger Department of Computer Science Duke University November 30, 2004 This work.
Teaching Strategies and Learning Styles CRA-W Workshop Feb 23, 2005 Susan Rodger Associate Professor of the Practice Duke University
An Interactive Approach to Formal Languages and Automata with JFLAP Susan H. Rodger Duke University NSF CCLI Showcase March 9, 2007 Supported by NSF Grant.
Pushdown Automata (PDAs)
Computer Science Concepts Come Alive Susan H. Rodger Duke University February 20, 2007.
Teaching Strategies and Learning Styles CRA-W Workshop Mar 7, 2007 Susan Rodger Associate Professor of the Practice Duke University
Computability Construct TMs. Decidability. Preview: next class: diagonalization and Halting theorem.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 3 Mälardalen University 2010.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 11 Midterm Exam 2 -Context-Free Languages Mälardalen University 2005.
Increasing Interaction and Support in the Formal Languages and Automata Theory Course Susan H. Rodger Duke University ITiCSE 2007 June 25, 2007 Supported.
1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 6 Mälardalen University 2010.
Increasing the Use of JFLAP in Courses Susan H. Rodger Duke University Durham, NC USA Program Visualization Workshop June 30, 2011 NSF.
Saeid Pashzadeh Jan 2009 Theory of Computation 1.
Decidable languages Section 4.1 CSC 4170 Theory of Computation.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
Career Path and Passions - So many decisions along the way Susan H. Rodger Professor of the Practice Duke University Nov. 13, 2015 IBM Research Triangle.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
Foundations of (Theoretical) Computer Science Chapter 2 Lecture Notes (Section 2.2: Pushdown Automata) Prof. Karen Daniels, Fall 2010 with acknowledgement.
Computability Review homework. Video. Variations. Definitions. Enumerators. Hilbert's Problem. Algorithms. Summary Homework: Give formal definition of.
SIGCSE 06: NSF Showcase A Visual & Interactive Computability Course Emphasizing Breadth of Automata Rakesh Verma Computer Science Department University.
Formal Languages, Automata and Models of Computation
CSCI 2670 Introduction to Theory of Computing October 13, 2005.
CS 154 Formal Languages and Computability February 11 Class Meeting Department of Computer Science San Jose State University Spring 2016 Instructor: Ron.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 12 Mälardalen University 2007.
1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 8 Mälardalen University 2011.
Theory of Computation Automata Theory Dr. Ayman Srour.
1 8.4 Extensions to the Basic TM Extended TM’s to be studied: Multitape Turing machine Nondeterministic Turing machine The above extensions make no increase.
CS 154 Formal Languages and Computability March 15 Class Meeting Department of Computer Science San Jose State University Spring 2016 Instructor: Ron Mak.
 2005 SDU Lecture11 Decidability.  2005 SDU 2 Topics Discuss the power of algorithms to solve problems. Demonstrate that some problems can be solved.
CSCI 3130: Formal languages and automata theory Andrej Bogdanov The Chinese University of Hong Kong Decidable.
CS 154 Formal Languages and Computability May 12 Class Meeting Department of Computer Science San Jose State University Spring 2016 Instructor: Ron Mak.
Theory of Computation. Introduction to The Course Lectures: Room ( Sun. & Tue.: 8 am – 9:30 am) Instructor: Dr. Ayman Srour (Ph.D. in Computer Science).
1/29/02CSE460 - MSU1 Nondeterminism-NFA Section 4.1 of Martin Textbook CSE460 – Computability & Formal Language Theory Comp. Science & Engineering Michigan.
1 Chapter 2 Finite Automata (part a) Hokkaido, Japan.
Changes to JFLAP to Increase Its Use in Courses Susan H. Rodger Duke University ITiCSE 2011 Darmstadt, Germany June 29, 2011 NSF Grants.
6. Pushdown Automata CIS Automata and Formal Languages – Pei Wang.
50/50 rule You need to get 50% from tests, AND
Non Deterministic Automata
PDAs Accept Context-Free Languages
Chapter 2 FINITE AUTOMATA.
An Interactive Approach to Formal Languages and Automata with JFLAP
CSE322 Definition and description of finite Automata
Non Deterministic Automata
Chapter 1 Regular Language
Sub: Theoretical Foundations of Computer Sciences
Presentation transcript:

Increasing Engagement in Automata Theory with JFLAP Susan H. Rodger Duke University Visual Thinking Workshop – Duke University May 4, 2009 Supported by NSF Grant DUE

Outline Introduction and Overview of JFLAP JFLAP’s use in education JFLAP Two-year Study and Results Conclusions

Computer Science - Formal Languages and Automata Theory Traditionally taught – Pencil and paper exercises No immediate feedback Limited – simple examples Different – More mathematical than most CS courses – Less hands-on than most CS courses – Programming is in most of their CS courses, not here

Why Develop Tools for Automata? Textual Tabular Visual Interactive

Overview of JFLAP Java Formal Languages and Automata Package Instructional tool to learn concepts of Formal Languages and Automata Theory Topics: – Regular Languages – Context-Free Languages – Recursively Enumerable Languages – Lsystems With JFLAP your creations come to life!

JFLAP’s Use Around the World JFLAP web page has over 200,000 hits since 1996 Google Search – JFLAP appears on over 9830 web pages – Note: search only public web pages JFLAP now used in several textbooks – JFLAP exercises JFLAP been downloaded in over 160 countries

Thanks to Students - Worked on JFLAP and Automata Theory Tools NPDA , C++, Dan Caugherty FLAP , C++, Mark LoSacco, Greg Badros JFLAP , Java version Eric Gramond, Ted Hung, Magda and Octavian Procopiuc Pâté, JeLLRap, Lsys Anna Bilska, Jason Salemme, Lenore Ramm, Alex Karweit, Robyn Geer JFLAP 4.0 – 2003, Thomas Finley, Ryan Cavalcante JFLAP 6.0 – Stephen Reading, Bart Bressler, Jinghui Lim, Chris Morgan, Jason Lee, Jonathan Su Over 19 years!

What is JFLAP? Regular Languages Create – DFA and NFA – Moore and Mealy – regular grammar – regular expression Conversions – NFA to DFA to minimal DFA – NFA  regular expression – NFA  regular grammar

JFLAP – Regular languages (more) Simulate DFA and NFA – Step with Closure or Step by State – Fast Run – Multiple Run Combine two DFA Compare Equivalence Brute Force Parser Pumping Lemma

FA Edit & Simulation Start up JFLAP When we start up JFLAP we have a choice of structures. The first of these is the Finite Automata!

FA Edit & Simulation Start Editing! We start with an empty automaton editor window.

FA Edit & Simulation Create States We create some states...

FA Edit & Simulation Create Transitions We create some transitions...

FA Edit & Simulation Initial and Final State We set an initial and final state. Now we can simulate input on this automaton!

FA Edit & Simulation Input to Simulate... When we say we want to simulate input on this automaton, a dialog asks us for the input.

FA Edit & Simulation Start Simulation! When simulation starts, we have a configuration on the initial state with all input remaining to be processed.

FA Edit & Simulation After One Step This is a nondeterministic FA, and on this input we have multiple configurations after we “Step.”

FA Edit & Simulation After Two Steps The previous configurations on q 1 and q 2 are rejected, and are shown in red. The remaining uncolored configurations paths are not rejected, and are still open.

FA Edit & Simulation After Three Steps Yet another step.

FA Edit & Simulation After Four Steps One of the final configurations has been accepted!

FA Edit & Simulation Traceback One can then see a traceback to see the succession of configurations that led to the accepting configuration.

FA Multiple Run Select Multiple Run One can then enter many strings and receive acceptance info.

JFLAP – Context-free Languages Create – Nondeterministic PDA – Context-free grammar – Pumping Lemma Transform – PDA  CFG – CFG  PDA (LL & SLR parser) – CFG  CNF – CFG  Parse table (LL and SLR) – CFG  Brute Force Parser

JFLAP – Recursively Enumerable Languages Create – Turing Machine (1-Tape) – Turing Machine (multi-tape) – Building Blocks – Unrestricted grammar Parsing – Unrestricted grammar with brute force parser

JFLAP - L-Systems This L-System renders as a tree that grows larger with each successive derivation step.

L-Systems L-systems may also be stochastic. The T → Tg rule adds g to the derivation, which draws a line segment. We add another rewriting rule for T, T → T. With two rewriting rules for T, the rule chosen is random, leading to uneven growth!

L-Systems The same stochastic L-system, rendered 3 different times all at the 9th derivation.

Students love L-Systems

Increasing Interaction in the Course with JFLAP

Using JFLAP during Lecture Use JFLAP to build examples of automata or grammars Use JFLAP to demo proofs Load a JFLAP example and students work in pairs to determine what it does, or fix it if it is not correct.

Example 1: JFLAP during Lecture Ask students to write on paper an NPDA for palindromes of even length Build one of their solutions using JFLAP – Shows students how to use JFLAP

Example 1: JFLAP during Lecture (cont) Run input strings on the NPDA – Shows the nondeterminism

Example 2: JFLAP during Lecture Brute Force Parser – Give a grammar with a lambda- production and unit production – Run it in JFLAP, see how long it takes (LONG) Is aabbab in L? – Transform the grammar to remove the lambda and unit- productions – Run new grammar in JFLAP, runs much faster!

Example 2 (cont) Parse Tree Results First Grammar – 1863 nodes generated Second Grammar – 40 nodes generated Parse tree is the same.

With JFLAP, Exploring Concepts too tedious for paper Load a Universal Turing Machine and run it See the exponential growth in an NFA or NPDA Convert an NPDA to a CFG – Large grammar with useless rules – Run both on the same input and compare – Transform grammar (remove useless rules)

JFLAP’s use Outside of Class Homework problems – Turn in JFLAP files – OR turn in on paper, check answers in JFLAP Recreate examples from class Work additional problems – Receive immediate feedback

Ordering of Problems in Homework Order questions so they are incremental in the usage of JFLAP 1.Load a DFA. What is the language? Students only enter input strings. 2.Load a DFA that is not correct. What is wrong? Fix it. Students only modifying a small part. 3.Build a DFA for a specific language. Last, students build from scratch.

JFLAP Study Study of JFLAP’s effectiveness in learning – Two year study – Fourteen Faculty Adopters – Two 2-day faculty Adopter Workshops – June 2005, June 2006 – Collect data and Academic years – Pretest/Posttest – Interviews – Team of three evaluators Eric Weibe – Education Rocky Ross – Computer Science Theory Joe Bergin – Computer Science Tools

Fourteen Faculty Adopter Participants Duke UNC-Chapel Hill Emory Winston-Salem State University United States Naval Academy Rensselaer Polytechnic Institute UC Davis Virginia State University Norfolk State University University of Houston Fayetteville State University University of Richmond San Jose State University Rochester Institute of Technology -small, large - public, private - includes minority institutions

We hoped to show with this learning approach… Students gain a better and deeper understanding of FLA Students are happier and more confident in learning FLA Students are more interested in using the tools on their own Instructors can easily use the tools in class Instructors can easily grade electronic submissions

Goals of the JFLAP Study - Formal Languages and Automata (FLA) Present FLA in a visual and interactive manner in addition to the more traditional approach – Integrated Present Applications of FLA Provide a tool for allowing students to explore FLA in a computational manner Provide Materials for instructors to integrate this approach in their courses

Running a Study is hard! Hit by the drop In enrollments in CS after dot-com burst IRBs are different process at every institution – One page writeup ok’d (simplest) – Full medical IRB (many pages) One institution shut down all IRB research projects – we could not use data already collected. One University - Control Group – different times means different types of students, different professors. Some faculty came to workshop and did not follow through There were also some fantastic faculty! A lot depends on the people you pick to participate!

Second Year Added two schools with large number of students – One school worked well Multiple sections – one without JFLAP One class in morning, one in evening – different type of students – One school did not follow through

Do Student’s Learn Better with JFLAP? Pretest/Posttest – No statistically significant difference between experimental and control groups.

Year One Instructor Interviews Used JFLAP in their courses – Primary use in class – demonstrations – Some used it to generate the graphics for their lecture – Extensive use – homeworks – includes electronic submission – One used it in office hours

Year One – Software Implementation

Years 1 and 2: Usability Survey

Year 2 – Implementation Survey

Year 2 – Usability Survey

Conclusions From Study No Conclusive Results from Pretests/Postests Results of Study showed – All the faculty used JFLAP in their courses, mostly for homework, some in lecture – Students had a high opinion of JFLAP – Majority of students felt access to JFLAP Made learning course concepts easier Made them feel more engaged Made the course more enjoyable – Over half the students used JFLAP to study for exams – Over half the student thought time and effort using JFLAP helped them get a better grade.

There are other ways to get interaction in this course besides software…

Interaction in Class – Props Edible Turing Machine TM for f(x)=2x where x is unary TM is not correct, can you fix it? Then eat it! States are blueberry muffins

Students building DFA with cookies and icing

Questions? JFLAP tutorialwww.jflap.org