EECS 294-98: Formal Methods for Engineering Education. Sanjit A. Seshia EECS, UC Berkeley



Similar documents
sensors and actuators? How do we handle the errors introduced due to noise, quantization etc?

CS 425 Software Engineering

Fundamentals of Computer Programming CS 101 (3 Units)

University of Central Florida Department of Electrical Engineering & Computer Science EEL 4914C Spring Senior Design I

Programming Languages

imtech Curriculum Presentation

02-201: Programming for Scientists

REDESIGNING STUDENT LEARNING ENVIRONMENTS

Undergraduate Major in Computer Science and Engineering

EE411: Introduction to VLSI Design Course Syllabus

CS 649 Database Management Systems. Fall 2011

CS 425 Software Engineering. Course Syllabus

PSYCHOLOGY Section M01 Mixed Mode Spring Semester Fundamentals of Psychology I MW 11:30 - A130. Course Description

Prerequisite Math 115 with a grade of C or better, or appropriate skill level demonstrated through the Math assessment process, or by permit.

The Model Checker SPIN

Math 3E - Linear Algebra (3 units)

Assessment Processes. Department of Electrical and Computer Engineering. Fall 2014

CS 341: Foundations of Computer Science II elearning Section Syllabus, Spring 2015

Electrical and Computer Engineering Undergraduate Advising Manual

Testing & Verification of Digital Circuits ECE/CS 5745/6745. Hardware Verification using Symbolic Computation

INF 203: Introduction to Network Systems (3 credit hours) Spring W1, Class number 9870

Technological Tools to Learn and Teach Mathematics and Statistics

Brazosport College Syllabus for PSYC 2301 General Psychology

SYSTEMS, CONTROL AND MECHATRONICS

Academic year: 2015/2016 Code: IES s ECTS credits: 6. Field of study: Electronics and Telecommunications Specialty: -

Lab 3 Microcontroller programming Interfacing to Sensors and Actuators with irobot

GET 114 Computer Programming Course Outline. Contact: Office Hours: TBD (or by appointment)

The Emerging Trends in Electrical and Computer Engineering

Embedded Systems Engineering Certificate Program

EE360: Digital Design I Course Syllabus

CS 425 Software Engineering. Course Syllabus

Teaching an Electrical Circuits Course Online

CS Master Level Courses and Areas COURSE DESCRIPTIONS. CSCI 521 Real-Time Systems. CSCI 522 High Performance Computing

CS 1361-D10: Computer Science I

ENGG*4420 Real Time Systems Design Fall 2015

ABET TAC CIP Report for the Academic Year Mechanical Engineering Technology (MET) Program

Medical Device Design: Shorten Prototype and Deployment Time with NI Tools. NI Technical Symposium 2008

MAT 103B College Algebra Part I Winter 2016 Course Outline and Syllabus

The Course.

Advanced Placement (AP)

CREATING ON-LINE MATERIALS FOR COMPUTER ENGINEERING COURSES

Course Content Concepts

Math 19A (Online) Calculus for Science Engineering and Mathematics University of California Santa Cruz

Electrical Engineering

ECE 156A - Syllabus. Lecture 0 ECE 156A 1

Foundations of Programming

Business Management and Supervision (MST) Accounting

CS (TR: Davis Campus) Syllabus Introduction to Computer Science

Department Policies for Online Math Classes

ELECTRICAL ENGINEERING

COURSE SYLLABUS. Instructor Background: M.S. Computer Information Systems, Nova Southeastern University

A Comparison of Student Learning in an Introductory Logic Circuits Course: Traditional Face-to-Face vs. Fully Online

The Bachelor of Science in Computer Science

ENGINEERING AND TECHNOLOGY EDUCATION DEPARTMENT

University of Macau Undergraduate Electromechanical Engineering Program

CS 301 Course Information

Analysis of the Effectiveness of Online Learning in a Graduate Engineering Math Course

INFS5873 Business Analytics. Course Outline Semester 2, 2014

BUAD 310 Applied Business Statistics. Syllabus Fall 2013

Diablo Valley College Catalog

ACADEMIC INTERGRITY POLICY

6.080/6.089 GITCS Feb 12, Lecture 3

Truman College-Mathematics Department Math 125-CD: Introductory Statistics Course Syllabus Fall 2012

Eastern Washington University Department of Computer Science. Questionnaire for Prospective Masters in Computer Science Students

CS422 - Programming Language Design

The mission of the School of Electronic and Computing Systems 3 is to provide:

EdX Learner s Guide. Release

Exploring Computer Science A Freshman Orientation and Exploratory Course

SCHOOL OF ENGINEERING Baccalaureate Study in Engineering Goals and Assessment of Student Learning Outcomes

ELEC 5260/6260/6266 Embedded Computing Systems

INTRODUCTION TO INFORMATION TECHNOLOGY

Syllabus. Instructor:

How to Pass Physics 212

Computer Science Program- Engineering

Syllabus for EE 459Lx Spring 2016

CIS 3515 Mobile Application Development Instructor:

COMMONWEALTH OF MASSACHUSETTS BUNKER HILL COMMUNITY COLLEGE CHARLESTOWN, MASSACHUSETTS COMPUTER INFORMATION TECHNOLOGY DEPARTMENT

Online Basic Statistics

SECOND YEAR. Major Subject 3 Thesis (EE 300) 3 Thesis (EE 300) 3 TOTAL 3 TOTAL 6. MASTER OF ENGINEERING IN ELECTRICAL ENGINEERING (MEng EE) FIRST YEAR

How To Pass A Biology Course At Goshen Legend

Course Syllabus. COSC 1437 Programming Fundamentals II. Revision Date: August 21, 2013

AN OVERVIEW OF COURSE REDESIGN. by Carol A. Twigg

Objectives of Lecture 1. Labs and TAs. Class and Office Hours. CMPUT 391: Introduction. Introduction

WESTERN UNIVERSITY LONDON CANADA Department of Psychology Psychology 3285F Section 001 Research in Behavioural Neuroscience

Program Analysis: Theory and Practice

Intermediate & College Algebra Course Redesign Final Report. College Algebra - Replacement Model

Transcription:

EECS 294-98: Formal Methods for Engineering Education Sanjit A. Seshia EECS, UC Berkeley

Engineering Education (recent past) On-campus experience Instructor lectures / discusses in class Students listen / discuss Some email / forum interaction Homework exercises/exams: paper/electronic hand-ins, programming assignments, Grading mostly manual, some automated testing Hardware Labs: must be on campus, limited capacity S. A. Seshia 2

Engineering Education (today) Mostly on-campus experience Some recorded video Instructor lectures / discusses in class Students listen / discuss Online discussion forums (e.g. piazza) Homework exercises/exams: paper/electronic hand-ins, programming assignments, Grading mostly manual, some automated testing Hardware Labs: must be on campus, limited capacity S. A. Seshia 3

Engineering Education (near future) On-campus + MOOCs + blended models Substantial online content (not just video) Instructor may lecture / discuss in class Also online Students listen / discuss in class + online Online discussion forums standard Homeworks/exams: substantially electronic / online Lot more automated grading, peer grading, crowdgrading, Hardware Labs: on campus, limited capacity? Effective Virtual Lab Environments S. A. Seshia 4

Some Technical Problems in the New Wave of Engg. Education Automatic Grading Verification / Effective Testing: synthesizing test cases, input stimuli, equivalence checking, etc. Generating feedback Assigning partial / extra credit Automatic Exercise Generation Problem generation (to deter cheating, allow for self-paced / customized learning, etc.) Solution generation (supports the above) Virtual Laboratory Environments Realistic lab setting (solution that works in virtual lab should work in real lab!) Auto-grading, lab customization, etc. S. A. Seshia 5

Formal Methods Mathematical / algorithmic techniques used to model, verify, design, and maintain computational systems. S. A. Seshia 6

Formal Verification Algorithmic techniques to prove/disprove that a system satisfies a given property in a specified operating environment S. A. Seshia 7

Automatic Grading (one part) Algorithmic techniques to prove/disprove that a student solution satisfies correctness criteria in a specified operating conditions S. A. Seshia 8

Formal Specification Mathematical techniques for MODELING systems. Mathematical statement of Problem to be solved. S. A. Seshia 9

Formal Synthesis Algorithmic techniques for correct-by-construction SYNTHESIS. Automatic synthesis of problems/solutions. S. A. Seshia 10

Debugging Algorithmic techniques for providing feedback when a design fails or is non-optimal. Automatic generation of feedback for student solutions (correct / incorrect). (the other part of automatic grading) S. A. Seshia 11

Algorithmic Formal Methods Formal specification Propositional, first-order logic Temporal logic(s) Boolean satisfiability (SAT) solving Satisfiability modulo theories (SMT) solving Automatic theorem proving Model checking Program verification and synthesis based on the above S. A. Seshia 12

Point to Ponder Is Auto-Grading exactly the same problem as Formal Verification for industry designs? S. A. Seshia 13

Three Sample Efforts Auto-grading for Python programming course at MIT Auto-grading for Automata Theory course at U.Penn. Exercise generation / Auto-grading for Embedded Systems course/lab at Berkeley S. A. Seshia 14

MIT project: Correction Model for Programming Assignments Array Index: v[a] -> v[{a+1, a-1}] Increment: v++ -> { ++v, v--, --v } Conditional: a op b -> a ops b where ops = { <, >, <=, >=, ==,!= } Initialization: v=n -> v={n+1, n-1, 0} Return Value: return v -> return?v Key Idea: Finding minimal set of such changes that convert a buggy solution into a correct one is phrased as a synthesis problem. PLDI 2013: Rishabh Singh, Sumit Gulwani, Armando Solar-Lezama 15

Feedback Synthesis: Array Reverse i = 1 i <= a.length front <= back back http://sketch1.csail.mit.edu/python autofeedback/

Feedback Synthesis: Finite State Automata Draw a DFA that accepts: { s ab appears in s exactly 2 times } Attempt 1 Attempt 2 Grade: 9/10 Feedback: One more state should be made final Based on Edit-distance to a correct solution Grade: 6/10 Feedback: The DFA is incorrect on the string ababb Based on Counterexample Attempt 3 Grade: 5/10 Feedback: The DFA accepts {s ab appears in s at least 2 times} Based on Edit-distance to the problem description IJCAI 2013: Alur, Loris d Antoni, Gulwani, Dileep Kini, Viswanathan 17

Primary Motivation: Embedded Systems course Context: Introduction to Embedded Systems Undergraduate capstone design course at Berkeley Automating Exercise Generation Generating problems and solutions Virtual Laboratory Taking the lab experience online Representative of Lab based Courses Robotics, circuits, control systems, S. A. Seshia and J. C. Jensen 1

EECS 149: Introduction to Embedded Systems UC Berkeley This course introduces the modeling, design and analysis of computational systems that interact with physical processes. Computer Science: Abstract Away the Physical World Control Theory: Deals Directly with Physical Quantities Cyber Physical Systems: Computational + Physical http://leeseshia.org/ On campus course gets somewhat diverse enrollment (EE/CS, ME, CE, ) S. A. Seshia and J. C. Jensen 1

Traditional View of Embedded Systems Tend to be special purpose. Embedded computer with a special purpose processor S. A. Seshia and J. C. Jensen 2

Traditional View of Embedded Systems Interfacing to sensors and actuators. Cypres II automatic activation device: 1. embedded microcontroller 2. barometric pressure sensor 3. pyrotechnic cutter actuator It deploys a reserve parachute for a skydiver who is unaware or unconscious of altitude. S. A. Seshia and J. C. Jensen 2

Traditional View of Embedded Systems Subject to resource constraints: memory, time, energy, S. A. Seshia and J. C. Jensen 2

Our View of Embedded Systems We hold that embedded systems should be: characterized by interactions with the physical world, not resource constraints introduced through formal modeling, design and analysis, not ad hoc engineering practices S. A. Seshia and J. C. Jensen 2

Motivating Example of a Cyber-Physical System (see Ch 1 in book) STARMAC quadrotor aircraft (Tomlin, et al.) Introductory Video: http://www.youtube.com/watch?v=rj9r2orcayo Back-Flip Manuever: http://www.youtube.com/watch?v=id3qggpzzim Modeling: Flight dynamics (ch2) Modes of operation (ch3) Transitions between modes (ch4) Composition of behaviors (ch5) Multi-vehicle interaction (ch6) Design: Processors (ch7) Memory system (ch8) Sensor interfacing (ch9) Concurrent software (ch10) Real-time scheduling (ch11) Analysis: Specifying safe behavior (ch12) Achieving safe behavior (ch13) Verifying safe behavior (ch14) Guaranteeing timeliness (ch15) Also in the course: Security and Networking EECS 149, UC Berkeley: 24

The Core Learning Experience: Exercises and Labs Textbook Exercises: High level modeling with FSMs, ODEs, temporal logic, etc. Programming in various languages (C, LabVIEW, etc.) Algorithm design and analysis (scheduling, verification, etc.) Laboratory (6 weeks) Capstone design project (12 weeks) How to extend this experience to a MOOC version of EECS 149? S. A. Seshia and J. C. Jensen 2

The MOOC Challenge: Bringing Automation to Two Course Components Theory Component: Homeworks and Exams Generating new problems (e.g., similar difficulty to existing problems, test range of concepts) Generating solutions Grading / Tutoring Exercise Creation & Grading Toolkit Lab Component: Structured Labs and Open Ended Projects Mix of software and hardware design Challenge: how do we give students in an online course offering a similar design experience? Lab Creation & Grading Toolkit S. A. Seshia and J. C. Jensen 2

demo verifun.eecs.berkeley.edu/autogen/ptolemydemo/modelmutation.php verifun.eecs.berkeley.edu/autogen/schedulingdemo/schedule.php S. A. Seshia and J. C. Jensen 2

irobot Hill Climb Modify the irobot Createto autonomously navigate to the top of an incline, avoiding cliffs and obstacles along the way.

Lab: Robot Hill Climb Virtual World Students design Statecharts controller to climb a hill ODE simulation of robot, software, & environment Statechart deploys to real robot without modification Simulation of a not yet perfecte S. A. Seshia and J. C. Jensen 2

Videos / Demos S. A. Seshia and J. C. Jensen 3

Automatic Grading of Lab Exercises: The How Specify desired properties (e.g. end goal for hill climb, waypoints) Temporal logic / monitor automata Run time Verification Check whether solution is correct / wrong Feedback generation Leverage simulation/property based error localization methods [Li & Seshia, DAC 10, RV 12] Use of Simulation based Falsification tools Tools such as S Taliro, Breach [Donze et al., HSCC 13], Other considerations: Local vs Global, Detecting cheating, etc. S. A. Seshia and J. C. Jensen 3

Class Introductions Please introduce yourselves -- state name and research interests/areas and what you d like to get out of this class (Programming Systems, Computer Security, CAD, Embedded Systems, Synthetic Biology, Control Theory, etc.) S. A. Seshia 32

Course Logistics Check out the webpage: www.eecs.berkeley.edu/~sseshia/fmee Tentative class schedule is up Suggested project topics will be posted by next week S. A. Seshia 33

Grading Paper discussions / class participation (30%) Most of the course Each student signs up to present a paper and the rest of us help dissect it Project (70%) Project proposal due mid Feb. (date TBA) Culminates in final presentation + tool (+ written paper) ~50% of past projects in 219C led to conference papers! Looking forward to actual usable tools from this course! S. A. Seshia 34

Misc. Office hours: MW 1:30 2:30, and by appointment Pre-requisites: basic knowledge of algorithms, data structures, mathematics Berkeley EECS lower-division courses should cover it S. A. Seshia 35