Skip to main content

CSE 331: Topics

The course is organized into 10 topics. We plan to cover one topic per week.

1. Specifications & Testing

Even when we are asking AI to write code for us, since AI cannot read our minds, it is important to be able to write a clear specification, stating in precise terms what that code needs to do. In this topic, we will look at how specifications for methods are written in Java.

2. Testing & Immutable Reasoning

Testing gives us some confidence (though not complete confidence) that the implementation satisfies the specification by checking it on a well-designed set of test cases.

To gain even more confidence in correctness, we turn to reasoning. First, we will reason about code that does not change the values on any local variables (so-called "functional" code).

3. Reasoning about Local Variable Mutation: Floyd Logic

Now we will learn how to reason about code that changes the values of local variables using a technique called Floyd logic. Different properties will be true at different points in the program, based on the current values of the variables. We will learn how to propagate knowledge about what is true at different program points across assignment statements, conditionals (if statements), and loops.

4. Mutation and Data Abstraction