1 / 21

Mathematics throughout the CS Curriculum

Mathematics throughout the CS Curriculum. Support by NSF #. General Consensus. Most CS faculty agree that math is important. Discrete Math is usually required. The Problem. Students study math, but don’t see the connection to their CS courses. Content Reasoning skills

willis
Download Presentation

Mathematics throughout the CS Curriculum

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Mathematics throughout the CS Curriculum Support by NSF #

  2. General Consensus • Most CS faculty agree that math is important. • Discrete Math is usually required.

  3. The Problem • Students study math, but don’t see the connection to their CS courses. • Content • Reasoning skills • Why Reasoning Skills? • What Reasoning Skills??

  4. Beyond the Classroom • Current Software is too large for one person to understand at the code level. • Software engineers must work at the modular level. • How do we prepare future programmers? • What do they need to know? • How can they reason about large programs composed of many parts?

  5. What reasoning skills are necessary?Concept Inventory

  6. Apply in All Courses • Introductory Level Programming • Data Structures and Algorithms • Software Engineering • Theory of Programming Languages • Electives

  7. Motivation for Reasoning • Binary search in C++ library • Proven correct? • Failed!

  8. Need Precise Specs • Need to distinguish between mathematical integers and computer integers • Specs take this distinction into account.

  9. Introductory Programming • Informal and Formal Reasoning • Reasoning Tables • Reasoning based on specification without needing to see code.

  10. Example OperationPlusTwo(updatesi: int) requires ?? ensuresi = #i + 2; Code Increment(i); Increment(i);

  11. Increment • Operation Increment (updatesi: int) requiresi< max_int; ensuresi = #i + 1; No need to see Code i:= i + 1;

  12. Example OperationPlusTwo(updatesi: int) requiresi< max_int - 1; ensuresi = #i + 2; Code Increment(i); Increment(i);

  13. Reasoning Table

  14. Upper Level • Formal Methods in Software Engineering • Algorithms (Distinction between proving an algorithm and that an implementation meets the specification of the algorithm) • Theory of Programming Languages • (Verifying Compiler Challenge)

  15. Formal Methods Unit • Often at end of text • Missing altogether

  16. Precise Specifications • requiresclause (pre-condition) • ensuresclause (post-condition) • loop invariants • Math modeling

  17. Stack Model • Stack_Familyis_modeled_byStr(Entry) exemplar S; Initialization ensures S = Λ; Note: Entry is a generic type.

  18. Example Operation Push(alters E: Entry; updates S: Stack); requires |S| < Max_Depth; ensures S = <#E> o #S; Operation Pop(replaces R: Entry; updates S: Stack); requires |S| > 0; ensures #S = <R> o S;

  19. Proof Rules for Verification • code: Assume B; code1; Confirm Q; • code; Assume B; code2; Confirm Q; • -------------------------------------------------------------- • code; If B then code1 else code2; endif; Confirm Q;

  20. Verification Conditions • Automated generation of VC’s • http://resolve.cs.clemson.edu/interface/#

  21. Summary • To meet the challenges of current software, students need • To reason about large programs modularly • To read and write mathematical specs • To distinguish between spec and implementation

More Related