
Formal Methods: Static Code Analysis for Software Reliability
Inquiry Framework
Question Framework
Driving Question
The overarching question that guides the entire project.How can we effectively use formal methods to enhance static code analysis in software development and what are the challenges and opportunities associated with its real-world application?Essential Questions
Supporting questions that break down major concepts.- What is static code analysis and why is it important in software development?
- How can formal methods be applied to static analysis of software?
- What are formal specifications and how do they aid in the verification process?
- How do propositional and predicate logic contribute to formal methods in software verification?
- What are the challenges of using formal methods in real-world software development?
- In what ways do automata and formal languages assist in the development of static analysis techniques?
Standards & Learning Goals
Learning Goals
By the end of this project, students will be able to:- Apply formal methods to enhance static code analysis in software development.
- Develop a comprehensive understanding of formal specifications and their role in software verification.
- Utilize propositional and predicate logic to analyze static code.
- Investigate the application of automaton and formal languages in developing static analysis techniques.
- Assess the real-world challenges and opportunities of using formal methods in software development.
Formal Methods for Software Development
Mathematical Logic
Computer Science
Entry Events
Events that will be used to introduce the project to studentsInteractive Puzzle on Code Behavior
Present students with an interactive puzzle where they must predict the behavior of a code snippet using formal methods for static analysis. By directly engaging with the theoretical aspects of their coursework, students will be challenged to apply complex logic and problem-solving skills in a hands-on manner.Mystery Code Challenge
Present students with an intentionally buggy codebase with obscured software specifications, then challenge them to use formal modelling techniques to uncover errors and propose solutions. This activity promotes creative debugging skills and connects directly to the learning goals of formal verification and specification.Portfolio Activities
Portfolio Activities
These activities progressively build towards your learning goals, with each submission contributing to the student's final portfolio.Logic Foundations: The Building Blocks
Students delve into propositional and predicate logic, foundational elements in formal methods. Through engaging exercises, they learn how to apply logic principles to static code analysis, setting the stage for deeper exploration.Steps
Here is some basic scaffolding to help students complete the activity.Final Product
What students will submit as the final product of the activityA portfolio that includes a set of logic-based analyses of various simple code snippets.Alignment
How this activity aligns with the learning objectives & standardsAligns with MATH-201 standard to utilize logic for problem-solving in theoretical computer science.Formal Specification Draft
Students craft initial formal specifications for a simple software module. In this activity, they practice translating code requirements into precise formal descriptions, laying the groundwork for formal verification.Steps
Here is some basic scaffolding to help students complete the activity.Final Product
What students will submit as the final product of the activityA formal specification document for a simple software module, demonstrating understanding of formal specification principles.Alignment
How this activity aligns with the learning objectives & standardsSupports CS-301 by engaging students in designing formal specifications for software systems.Static Analysis and Verification Puzzle
Students use formal specifications to conduct static code analysis. By examining errors and verifying code correctness, they enhance their understanding of specification-based verification.Steps
Here is some basic scaffolding to help students complete the activity.Final Product
What students will submit as the final product of the activityAn analysis report detailing errors and verification steps taken against the formal specifications.Alignment
How this activity aligns with the learning objectives & standardsAddresses FMSD-101 and CS-301 standards, focusing on the application of formal methods and specification-based verification.Automata Adventure: Linking Theories to Code
Explores the relationship between automata theory and static code analysis. Students experiment with finite automata to model code behavior, illustrating the theoretical foundations.Steps
Here is some basic scaffolding to help students complete the activity.Final Product
What students will submit as the final product of the activityA comprehensive exploration report on automata models and their application in static analysis.Alignment
How this activity aligns with the learning objectives & standardsAligns with CS-302, exploring the role of automata and formal languages in computer science applications.Real-World Challenge: Formal Methods in Practice
Simulating real-world software development challenges, students apply formal methods to a complex codebase. They navigate and propose solutions to potential real-world problems in formal specifications application.Steps
Here is some basic scaffolding to help students complete the activity.Final Product
What students will submit as the final product of the activityA real-world application report identifying challenges and solutions in applying formal methods.Alignment
How this activity aligns with the learning objectives & standardsSupports FMSD-105 by evaluating the challenges and solutions in real-world applications of formal methods.Rubric & Reflection
Portfolio Rubric
Grading criteria for assessing the overall project portfolioFormal Methods in Software Development Rubric
Logic Application
Evaluates the student's ability to apply propositional and predicate logic to code analysis scenarios.Understanding of Logic Principles
Assesses the depth of understanding of logic principles relevant to static code analysis.
Exemplary
4 PointsDemonstrates a comprehensive and innovative application of logic principles to complex code scenarios.
Proficient
3 PointsApplies logic principles effectively to solve code analysis scenarios, with a thorough understanding.
Developing
2 PointsShows an emerging understanding of logic applications with inconsistent application across scenarios.
Beginning
1 PointsDisplays limited understanding of logic principles, struggling to apply them to scenarios.
Integration of Logic with Code
Assesses the ability to integrate logic principles with code to demonstrate analysis and verification.
Exemplary
4 PointsSkillfully integrates logic with code to provide in-depth analysis and verification, revealing deep insights.
Proficient
3 PointsEffectively integrates logic with code, showing clear analysis and verification steps.
Developing
2 PointsPartially integrates logic with code, with some analysis and verification evident.
Beginning
1 PointsStruggles to connect logic and code, with minimal analysis or verification.
Formal Specification Development
Evaluates the student's capability in drafting and refining formal specifications within software systems.Specification Accuracy and Detail
Assesses the accuracy, detail, and coherence of formal specifications created by the student.
Exemplary
4 PointsProduces highly accurate, detailed, and coherent specifications that address complex system components.
Proficient
3 PointsCreates accurate and coherent specifications that effectively capture system requirements.
Developing
2 PointsDevelops specifications with some inaccuracies or omissions but covers basic requirements.
Beginning
1 PointsProduces minimal or inaccurate specifications that fail to meet basic requirements.
Peer Feedback Incorporation
Measures the ability to effectively incorporate peer feedback into specification drafting and refinement.
Exemplary
4 PointsSeamlessly incorporates rich feedback, showing improved specification sophistication.
Proficient
3 PointsIntegrates feedback effectively, showing clear improvements in specification quality.
Developing
2 PointsAttempts to integrate feedback with some success and noticeable improvements.
Beginning
1 PointsShows limited integration of feedback with minimal impact on the final specification.
Static Analysis and Verification
Assesses the effectiveness of static code analysis and verification using formal methods.Error Identification and Reporting
Evaluates the student's ability to identify and report errors in code using formal methods.
Exemplary
4 PointsIdentifies and reports errors comprehensively and accurately using formal methods, with sophisticated insight.
Proficient
3 PointsEffectively identifies and reports code errors using formal methods, with detailed reasoning.
Developing
2 PointsIdentifies some errors with formal methods, but reports may lack full accuracy or detail.
Beginning
1 PointsStruggles to identify or report errors using formal methods, showing minimal insight or accuracy.
Application of Automata Theory
Evaluates the student's application of automata theory to code behavior and static analysis.Automata Model Development
Assess the creation and application of automata models in understanding and analyzing code behavior.
Exemplary
4 PointsDevelops sophisticated automata models that provide deep analysis and insight into code behavior.
Proficient
3 PointsEffectively creates automata models that accurately analyze code behavior.
Developing
2 PointsCreates basic automata models that show some understanding of code behavior.
Beginning
1 PointsStruggles to create automata models, showing minimal impact on code analysis.
Real-World Application and Critical Analysis
Assesses the understanding of real-world challenges and solutions in applying formal methods in software development.Challenge Identification and Solution Proposal
Evaluates the identification of practical challenges and the proposal of feasible formal methods solutions.
Exemplary
4 PointsConsistently identifies complex challenges and proposes innovative, feasible solutions with thorough analysis.
Proficient
3 PointsIdentifies key challenges and proposes feasible solutions with solid analysis.
Developing
2 PointsIdentifies some challenges and proposes basic solutions, though with limited analysis.
Beginning
1 PointsStruggles to identify challenges or propose viable solutions, with minimal analysis.