Automated Grading of DFA Constructions Rajeev Alur (Penn), Loris D’Antoni (Penn), Sumit Gulwani (MSR), Bjoern Hartmann (Berkeley), Dileep Kini (UIUC),

Slides:



Advertisements
Similar presentations
Recognising Languages We will tackle the problem of defining languages by considering how we could recognise them. Problem: Is there a method of recognising.
Advertisements

Recognising Languages We will tackle the problem of defining languages by considering how we could recognise them. Problem: Is there a method of recognising.
Theory of Computing Lecture 23 MAS 714 Hartmut Klauck.
CSE 311 Foundations of Computing I
Reducing DFA’s Section 2.4. Reduction of DFA For any language, there are many DFA’s that accept the language Why would we want to find the smallest? Algorithm:
Lecture 24 MAS 714 Hartmut Klauck
Constraint Based Synthesis for Beginners PSY 2012 Armando Solar-Lezama.
Equivalence of Extended Symbolic Finite Transducers Presented By: Loris D’Antoni Joint work with: Margus Veanes.
Deterministic Finite Automata (DFA)
DFA Minimization Jeremy Mange CS 6800 Summer 2009.
Finite Automata CPSC 388 Ellen Walker Hiram College.
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 3 School of Innovation, Design and Engineering Mälardalen University 2012.
Lecture 24 Coping with NPC and Unsolvable problems. When a problem is unsolvable, that's generally very bad news: it means there is no general algorithm.
Teaching Finite Automata with AutomataTutor Rajeev Alur (Penn), Loris D’Antoni (Penn), Sumit Gulwani (MSR), Bjoern Hartmann (Berkeley), Dileep Kini (UIUC),
New Mexico Computer Science For All
Efficient Query Evaluation on Probabilistic Databases
Introduction to Computability Theory
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli.
Finite Automata Great Theoretical Ideas In Computer Science Anupam Gupta Danny Sleator CS Fall 2010 Lecture 20Oct 28, 2010Carnegie Mellon University.
1 Introduction to Computability Theory Lecture2: Non Deterministic Finite Automata Prof. Amos Israeli.
Introduction to Computability Theory
Intro to DFAs Readings: Sipser 1.1 (pages 31-44) With basic background from Sipser 0.
CSE332: Data Abstractions Lecture 27: A Few Words on NP Dan Grossman Spring 2010.
Finite Automata and Non Determinism
Courtesy Costas Busch - RPI1 Non Deterministic Automata.
Homework #2 Solutions.
A faster reliable algorithm to estimate the p-value of the multinomial llr statistic Uri Keich and Niranjan Nagarajan (Department of Computer Science,
1 Single Final State for NFAs and DFAs. 2 Observation Any Finite Automaton (NFA or DFA) can be converted to an equivalent NFA with a single final state.
Snick  snack CPSC 121: Models of Computation 2010 Winter Term 2 DFAs in Depth Benjamin Israel Notes heavily borrowed from Steve Wolfman’s,
Fall 2006Costas Busch - RPI1 Non-Deterministic Finite Automata.
CS5371 Theory of Computation Lecture 4: Automata Theory II (DFA = NFA, Regular Language)
Automating Construction of Lexers. Example in javacc TOKEN: { ( | | "_")* > | ( )* > | } SKIP: { " " | "\n" | "\t" } --> get automatically generated code.
CS Chapter 2. LanguageMachineGrammar RegularFinite AutomatonRegular Expression, Regular Grammar Context-FreePushdown AutomatonContext-Free Grammar.
Fall 2004COMP 3351 Another NFA Example. Fall 2004COMP 3352 Language accepted (redundant state)
Automating Grammar Comparison by Ravichandhran Madhavan, EPFL Mikael Mayër, EPFL Sumit Gulwani, MSR Viktor Kuncak, EPFL.
1 A Single Final State for Finite Accepters. 2 Observation Any Finite Accepter (NFA or DFA) can be converted to an equivalent NFA with a single final.
Great Theoretical Ideas in Computer Science.
CSE 311: Foundations of Computing Fall 2014 Lecture 23: State Minimization, NFAs.
Regular Model Checking Ahmed Bouajjani,Benget Jonsson, Marcus Nillson and Tayssir Touili Moran Ben Tulila
Reverse Engineering State Machines by Interactive Grammar Inference Neil Walkinshaw, Kirill Bogdanov, Mike Holcombe, Sarah Salahuddin.
Lexical Analysis — Part II: Constructing a Scanner from Regular Expressions Copyright 2003, Keith D. Cooper, Ken Kennedy & Linda Torczon, all rights reserved.
Lexical Analysis — Part II: Constructing a Scanner from Regular Expressions.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
REGULAR LANGUAGES.
Minimization of Symbolic Automata Presented By: Loris D’Antoni Joint work with: Margus Veanes 01/24/14, POPL14.
1 For each language, give a regular expression that generates the language and a DFA that accepts it. L 1 = { w  {0, 1}* : has both 00 and 11 as substrings}
Lexical Analysis Constructing a Scanner from Regular Expressions.
Great Theoretical Ideas in Computer Science.
4b 4b Lexical analysis Finite Automata. Finite Automata (FA) FA also called Finite State Machine (FSM) –Abstract model of a computing entity. –Decides.
Decidable Questions About Regular languages 1)Membership problem: “Given a specification of known type and a string w, is w in the language specified?”
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 3 Mälardalen University 2010.
CMSC 330: Organization of Programming Languages Finite Automata NFAs  DFAs.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Recognising Languages We will tackle the problem of defining languages by considering how we could recognise them. Problem: Is there a method of recognising.
Regular Expressions Fundamental Data Structures and Algorithms Peter Lee March 13, 2003.
MA/CSSE 474 Theory of Computation Minimizing DFSMs.
Regular Language Algorithms. Algorithms We have seen many algorithms for manipulating computational systems for the regular languages. Each treats these.
Learning regular tree languages from correction and equivalence queries Cătălin Ionuţ Tîrnăucă Research Group on Mathematical Linguistics, Rovira i Virgili.
1 Chapter Constructing Efficient Finite Automata.
Finite Automata Great Theoretical Ideas In Computer Science Victor Adamchik Danny Sleator CS Spring 2010 Lecture 20Mar 30, 2010Carnegie Mellon.
Theory of Computation Automata Theory Dr. Ayman Srour.
Formal Language & Automata Theory
Non Deterministic Automata
Recognizer for a Language
Chapter 2 FINITE AUTOMATA.
Non-Deterministic Finite Automata
Non Deterministic Automata
Instructor: Aaron Roth
Instructor: Aaron Roth
Presentation transcript:

Automated Grading of DFA Constructions Rajeev Alur (Penn), Loris D’Antoni (Penn), Sumit Gulwani (MSR), Bjoern Hartmann (Berkeley), Dileep Kini (UIUC), Mahesh Viswanathan (UIUC)

Motivations Grading is a tedious and time consuming task Human grades are often inconsistent MOOCs (Massive Online Open Courses) admits thousands of students, infeasible to grade manually

The DFA Construction Problem Draw the DFA accepting the language: { s | ‘ab’ appears in s exactly 2 times } Solution:

Student Solutions

Problem Syntactic Mistake The problem description was { s | ‘ab’ appears in s exactly 2 times } The student instead drew DFA for { s | ‘ab’ appears in s at least 2 times } INTUITION: find the distance between the two language descriptions

Mosel: MSO + Syntactic Sugar Mosel: similar to MSO; predicates describing DFAs sizeOf(indOf(‘ab’))=2 sizeOf(indOf(‘ab’))>=2 If we had such descriptions we could use tree edit distance to check how far they are from each other ``Easy’’ to go from such Mosel predicates to automata (classical MSO to DFA algorithm) However, what we need is: given a DFA compute a (small) Mosel formula

Brute Force Search Enumerate all the predicates and check for equivalence with target DFA Search pruning and speeding: Avoid trivially equivalent predicates (A V B, B V A) Approximate equivalence using set of test strings: – Generate sets of positive and negative examples that distinguish each state in the target DFA – One can prove all such strings are enough to prove inequivalent all DFAs of smaller size than target DFA

Solution Syntactic Mistake The student forgot one final state INTUITION: find the smallest number of syntactic modification to fix solutions

DFA Edit Difference Compute DFA edit distance: – Number of edits necessary to transform the DFA into a correct one An edit is – Make a state (non)final – Add a new state – Redirect a transition

DFA Edit Difference: How to compute it? We try every possible edit and check for equivalence Speed up equivalence by using test set The problem of finding DFAED is in NP (is it NP-hard?)

Solution Semantic Mistake The student didn’t see that the ‘a’ loop might not be traversed INTUITION: find on how many strings the student is wrong

Approximate Density S = correct solution A = student attempt Compute Symmetric Difference: D = S\A U A\S Measure relative size of D with respect to S Size(D,S) = lim n->∞ D n /S n Size(D,S) is not computable in general (the limit oscillates) Approximate the limit to finite n

Evaluation 1/2 H1, H2 = human graders N =naïve grader T = tool Tool is closer to humans than humans are to each other

Evaluation 2/2 H1, H2 = human graders N =naïve grader T = tool Tool and humans look indistinguishable

Pro’s and Cons Pros: On disagreeing cases, human grader often realized that his grade was inaccurate Identical solutions receive same grades and correct attempts awarded max score (unlike human) Cons: For now limited to small DFAs When two types of mistakes happen at same time, the tool can’t figure it out

Conclusions AutomataTutor: a tool that grades DFA constructions fully automatically Few new automata problems: How to compute DFA edit difference? How to synthesize Mosel formulas in a better way? How to compute language sizes in a way that is always defined and accurate?

Questions? Thank you!