computer science school of computing clemson university mathematical reasoning across the curriculum...

12
Computer Science School of Computing Clemson University Mathematical Reasoning across the Curriculum Software Development Foundations and Software Engineering Murali Sitaraman Clemson University This research is funded in part by NSF grants CCF-0811748 and DUE-1022941

Upload: leonard-austen-harrington

Post on 27-Dec-2015

217 views

Category:

Documents


4 download

TRANSCRIPT

Computer Science School of Computing Clemson University

Mathematical Reasoning across the Curriculum

Software Development Foundations and Software Engineering

Murali SitaramanClemson University

This research is funded in part by NSF grants CCF-0811748 and DUE-1022941

School of Computing Clemson University

You can find lot more details at…

Bing or Google: Clemson RESOLVE

School of Computing Clemson University

Math Reasoning at Clemson

CP SC 215: Software Development Foundations (SDF) Intro to Java, Objects, and SE 2-3 weeks of contracts and reasoning

CP SC 372: Software Engineering (SE) Classical SE topics 4-5 weeks of contracts and reasoning

School of Computing Clemson University

SDF Course Reasoning Example

Assume |S| /= 0 and S = S0;S.Push(S.Pop());

Confirm S = S0;

School of Computing Clemson University

Math Modeling: IntStack Contract

Suppose IntStack is an interface uses Integer_Theory, String_Theory;

Think of stacks of Integers as “math strings” of integers this: Str(Z);

Specification of Constructor Initialization ensures this = empty_string;

Exercises: Specification of other Stack operations

School of Computing Clemson University

Specification of IntStack Interface

Operation push (int x); updates this; restores x; ensures this = <x> o #this;

int Operation pop (); updates this; requires this /= empty_string; ensures #this = <result of pop()> o this;

bool Operation is_empty(); preserves this; ensures result of is_empty =

(this = empty_string);

School of Computing Clemson University

Contract specifications

Requirements and guarantees Requires clauses are preconditions Ensures clauses are postconditions

Who is responsible for requires clauses? Client (i.e., caller) Implementer Neither Both

Consequences

School of Computing Clemson University

Some more details…

Henderson & Sitaraman, “Mathematical reasoning at the Crossroads,” ACM Inroads Magazine, March 2012 issue.

Joe Hollingsworth YouTube “reasoning table” videos

Cook, et al., ITiCSE 2012 Procs. www.cs.clemson.edu/group/resolve

School of Computing Clemson University

SE Course Highlights

Covers classical topics, such as process models, requirements analysis, design with UML, etc.

About a third of the course is devoted to mathematical contracts and reasoning

Component-based development project with formal contracts using RESOLVE

Reasoning about the correctness of a subset of the components formally

Use of the Web IDE for experimentation

School of Computing Clemson University

Example Projects

Develop alternative implementations of Queue_Template, satisfying given internal contracts (e.g., rep. invariants) a circular array realization reusing a sequence component

Develop an implementation-independent Queue searching capability and reason about its correctness formally Recursion Iteration

School of Computing Clemson University

Some more details…

Cook, et al., ICSE 2012 Procs. Cook, Harton, and Smith, YouTube

“Clemson RESOLVE” video RESOLVE is a sourceforge project with

MIT license www.cs.clemson.edu/group/resolve

School of Computing Clemson University

Workshop invitation

NSF-funded SIGCSE Workshop #27 on Making Math Reasoning Fun tonight at 306 C at 7P!