20 cards · Public · Shuffle

MIT 6.031 - Software Construction: Testing, Immutability & Concurrency

Master core software engineering principles from MIT 6.031, covering rigorous unit testing strategies, immutable data structure design, and robust multi-threaded concurrency patterns.

Cards in this deck

(20 cards)

Preview terms and definitions before starting your study session.

#1
Term
Equivalence Partitioning
Definition
A black-box testing strategy that divides the input domain into subdomains (partitions) where the software is expected to behave similarly. You test at least one value from each partition to ensure representative coverage without redundant tests.
#2
Term
Boundary Value Analysis (BVA)
Definition
A testing technique that complements equivalence partitioning by selecting test inputs at the exact edges (boundaries) of input subdomains (e.g., 0, min - 1, max + 1). Bugs disproportionately occur at these boundary boundaries.
#3
Term
Statement Coverage vs. Branch Coverage
Definition
Statement Coverage measures the percentage of executable lines executed by tests. Branch Coverage measures whether every decision point (e.g., if/else branches) evaluates to both true and false. Branch coverage is strictly stronger than statement coverage.
#4
Term
Test-Driven Development (TDD) Cycle
Definition
A software development process relying on short, repeating iterations:
1. Red: Write a failing unit test for the intended feature.
2. Green: Write the minimum code required to pass the test.
3. Refactor: Clean up the code while ensuring all tests continue to pass.
#5
Term
Mutable vs. Immutable Objects
Definition
A mutable object's state can be changed after creation (e.g., Java StringBuilder, Python list). An immutable object's state cannot be altered once instantiated (e.g., Java String, Python tuple), making it inherently safe to share across threads.
#6
Term
Representation Invariant (Rep Invariant / RI)
Definition
A property or boolean condition that must always evaluate to true for every valid instance of an Abstract Data Type (ADT). It is typically verified at the end of constructors and mutator methods using a helper method like checkRep().
#7
Term
Abstraction Function (AF)
Definition
A conceptual mapping that defines how concrete field values in a class's internal representation () map to the abstract value space () it represents: .
#8
Term
Representation Exposure
Definition
A security and correctness bug where internal mutable data structures are exposed directly to clients via constructors or getter methods, allowing external code to modify internal state and violate the Rep Invariant.
Showing 8 of 20 cards in this deck.
Study All Now