120 likes | 246 Views
Promoting the use of Formal Methods through Education. Some ideas. Amiram Yehudai School of Computer Science Tel-Aviv University. State of the practice. Formal methods are used more than in the past. But still not enough. Change is slow. How can we change this? Convince industry
E N D
Promoting the use of Formal Methods through Education Some ideas Amiram Yehudai School of Computer Science Tel-Aviv University
State of the practice • Formal methods are used more than in the past. • But still not enough. • Change is slow. • How can we change this? • Convince industry • Educate new generations of students Dagstuhl, May 10 2006
Use of FM in industry • Comprehensive use of Formal Methods • Best practice • A major change in the practice • Hard to convince organizations • Incremental change • FM complement current practices • Maybe less effective • Evolution is easier for most organizations Dagstuhl, May 10 2006
Teach FM in Universities • Similar dilemma • Comprehensive use of FM • Usually divorced from main curriculum • Usually an elective course • Very important, but not sufficient • Incorporate FM in the curriculum • As a thread in a general software course • Show how it fits within “conventional” way Dagstuhl, May 10 2006
Design by Contract • Design by Contract (as in Eiffel) is an attempt to use FM in a partial way, but fully integrated in a conventional development method. • Teaching OO programming with DbC as an integral component maybe one way to incorporate FM in the curriculum • There should be other ways Dagstuhl, May 10 2006
My experience • OOP elective using Eiffel in mid 90’s • As the topic became popular, parallel classes given (by others) in C++, were chosen by most students, so I stopped • Later, required course by Yishai Feldman in IDC. • Recently, required course in TAU. Dagstuhl, May 10 2006
IDC – Y. Feldman • OOP Design and programming course. • 4th semester. after intro CS in Java, Data Structures, Functional Progr. • Text book: OOSC (eiffel). • But students write code in Java, • Also do proofs. • DbC tool – iContcat, JMSAssert, Jose (our own work). Dagstuhl, May 10 2006
Jose - Design by Contractwith Aspects • Ohad Barzilay, Feldman, S. Tyszberowicz • A tool to enforce java contracts using AspectJ technology • Programmer writes contracts as special comments with the code. • Similar to previous tools. • The tool creates AspectJ code. • Technique more robust than previous tools. Dagstuhl, May 10 2006
TAU “Software 1” • Just started this year (replacing C course) • OO Programming in Java. • Second Programming Course (after intro using scheme and SICP). • Contract taught right from the start. • Students write contracts as structured comments. • Right now, no DbC tool used. Dagstuhl, May 10 2006
TAU “Software 1” • No suitable text book – ref books: OOSC + Liskov + some Java book. • Topics include also testing, refactoring, some Design Patterns • Tools: eclipse, JavaDoc, JUnit • Content still changing (problems) • Sivan Toledo + AY Dagstuhl, May 10 2006
Contract in Java books • Very few Java books even mention contracts. • One example I found: • Niño, Hosch: An Introduction to Programming and Object-Oriented Design Using Java Dagstuhl, May 10 2006
Vision for the future • “Operating systems are like underwear [we all need them but] — nobody really wants to look at them.” )Bill Joy) • We should strive to make FM like this: • A programmer using a compiler does not need to understand Compiler technology. • Can we ever expect development tools based on FM to be like this? Dagstuhl, May 10 2006