Algorithm correctness Created 2026-10-13 Updated 2026-10-18
Partial correctness means that, if the algorithm terminates on a permitted input, its output meets the formal specification. Total correctness additionally requires algorithm termination on every permitted input.
A precondition describes permitted starting circumstances; a postcondition describes the required result. Partial correctness says that starting with and finishing implies . Total correctness also guarantees finishing. A loop invariant supplies the connection between these conditions during repeated steps.[ref]
Loop invariants. CS 2112 Fall 2019; Loop invariants, Using loop invariants to show code is correct: Establishment, Preservation, Postcondition, and Termination
Correctness is relative to a formal specification. Returning the first entry of an array correctly implements "return the first entry", but fails "return the maximum" on . A fast wrong answer does not acquire algorithm correctness from its time complexity. Numerical closeness matters only when the formal specification allows an approximation. Software testing and test coverage provide evidence about selected executions; they do not by themselves establish algorithm correctness for every permitted input.
Continuous integration Created 2026-10-20 Updated 2026-11-05
Continuous integration is a software engineering practice in which collaborators frequently combine small changes into a shared main line, conventionally at least daily, and check each integration through an automated software build and software testing. Fast feedback makes incompatible assumptions visible while the changes are still small. A server that tests isolated development branches contributes automation; frequent integration into the shared main line is the defining collaboration practice.[ref]
Continuous Integration by Martin Fowler. Definition and sections on mainline integration and automated builds
For example, one developer changes a parser to return a new data structure, while another changes code that consumes the result. Each component can pass its own isolated unit tests while their combination fails. Integration testing of the shared revision exercises that interface and exposes the mismatch. The build result should identify the tested source revision so that a failure can be reproduced.
Formal verification Created 2026-10-13 Updated 2026-10-18
Establishing specified properties of a system using formal proofs about a precise model. Formal verification connects an implementation to a formal specification; correctness of the model and its assumptions still matters when applying the result to a physical system.
For a small example, the summation loop verification below starts with executable steps and asks two separate questions: does any returned value satisfy the postcondition, and does execution reach that return? A loop invariant answers the first; a loop variant answers the second. This turns an unbounded family of permitted inputs into a few reusable proof obligations.
The model must specify programming language semantics, including the meaning of variable assignments, comparisons and integer arithmetic. A proof about exact mathematical integers need not describe a machine that wraps on integer overflow. Similarly, a correct formal proof of a weak or mistaken formal specification does not establish the intended behavior. Choosing the right formal specification and relating the model to the implemented system remain substantive tasks.
Software testing examines chosen executions and can expose a counterexample. A formal proof instead justifies a statement throughout its stated model; it does not require executing every permitted input. This makes formal verification valuable when rare boundary cases matter, while software testing can still reveal an incorrect model or misunderstood requirement.
In 1969, Tony Hoare presented rules for variable assignment, composition and iteration in a small programming language. His paper explicitly says those rules do not prove successful termination, and discusses the dependence of arithmetic reasoning on the chosen overflow behavior. These reservations already make the model's scope part of the argument.[ref]
An Axiomatic Basis for Computer Programming by Tony Hoare. Hoare, An Axiomatic Basis for Computer Programming, §2 Computer Arithmetic, pp. 576–577; §§3.1–3.4, pp. 577–578; §4 General Reservations, pp. 578–579
Greg Wilson Created 2026-10-20 Updated 2026-11-05
Greg Wilson is the first-listed author of Best Practices for Scientific Computing by Greg Wilson and others, which connects reliable scientific results to maintainable software. Its recommendations include software testing, version control, small reusable components and review of changes. These practices make it possible to inspect how an analysis was produced and detect mistakes when its implementation changes.[ref]
Best Practices for Scientific Computing by Greg Wilson and others. author list and recommendations 1–8
Merge conflict 2026-11-05
A merge conflict occurs when a version-control merging operation cannot automatically reconcile changes under its merge rules. For a typical three-way merge, the tool compares two revisions with their common base. Incompatible edits to the same region, or deletion on one side and modification on the other, can require a human decision.[ref]
git-merge in the Git documentation. True merge, How conflicts are presented and How to resolve conflicts
For example, the base contains
threshold=5; one side changes it to 7 and the other to 9. Choosing either value or a new value requires understanding the intended behavior. After editing the combined result, the resolver records that decision in version control. A textually conflict-free merge can still break a function's contract, so successful automatic combination supplies weaker evidence than software testing of the integrated program.Black-box testing chooses inputs and expected outputs from the public specification without using the implementation's control structure. Equivalence class testing partitions the input space into classes expected to exercise similar specified behavior, then chooses representatives; boundary cases test where that behavior changes. For equal-range search, use these concrete representatives:
- Empty array:
([], 4)gives(0,0). - One entry, with the target below, equal, and above it:
([4],3),([4],4),([4],5)give(0,0),(0,1),(1,1). - An absent interior value:
([1,3,5],4)gives(2,2). - One interior match:
([1,3,5],3)gives(1,2). - A repeated interior block:
([1,3,3,3,5],3)gives(1,4). - A repeated block touching the left or right boundary:
([3,3,5],3)and([1,3,3],3)give(0,2)and(1,3). - Every entry equal:
([3,3,3],3)gives(0,3); targets two and four give(0,0)and(3,3). - Extreme keys:
([Int.MinValue,0,Int.MaxValue],Int.MaxValue)gives(2,3), and searching forInt.MinValuegives(0,1).
For each result independently check , the strict inequalities outside the returned interval, and equality inside it. Unsorted inputs violate the precondition; they are not ordinary members of the specified valid-input classes. Software testing supplies evidence about implementations, while the loop invariant proof explains correctness for every valid input.
Software engineer Created 2026-10-18 Updated 2026-11-05
A software engineer designs, implements and maintains software systems, applying software engineering methods to requirements, interfaces and long-term change. The work can include selecting representations, writing and reviewing code, developing software testing, diagnosing failures and measuring performance. For example, a storage-format change requires reasoning about compatibility and migration as well as a serializer's local correctness. The role overlaps with programming but often includes responsibility for how components behave together over time.
Software engineering Created 2026-10-31 Updated 2026-11-05
Software engineering develops and maintains software through systematic design, implementation and evaluation. It connects requirements to program structure, verification, deployment and later change. For example, altering a data format can require changing its parser, stored files and clients together; a locally correct code edit does not by itself ensure a working system. Software testing, version control and explicit interface contracts help manage these dependencies. The subject includes technical trade-offs between correctness, performance, maintainability and the constraints of the intended users.
Software testing Created 2026-10-18 Updated 2026-11-05
Software testing executes a program under specified conditions and compares its behaviour with an expected result or property. A unit test may check one function; an integration test checks interacting parts; a regression test guards against recurrence of a known failure. For a sorting routine, useful properties include ordered output and preservation of the input multiset. Passing finitely many tests cannot generally prove correctness for every input. The choice of cases and the quality of the test oracle determine what evidence a test actually supplies.
Test case 2026-11-05
A test case specifies conditions, inputs, an operation to perform and the expected result or acceptance property for software testing. Its test oracle must distinguish success from failure.[ref]
unittest — Unit testing framework in the Python 3.14 documentation. opening concepts, test case and test fixture; Basic example, result assertions
Merely executing a computer program without checking an outcome supplies weaker evidence.For example, a sorting algorithm given
3,1,3 should return 1,3,3. A stronger test oracle checks both sortedness and preservation of the input multiset; checking only sortedness would accept an empty result. The test case also needs a policy for equal elements if their original order matters. Explicit preconditions and expected outcomes make a failure reproducible and help a later reader understand which contract the test case exercises.