# Correctness (computer science)
## MicroSim spec
- **Recommended sim type:** verification / coverage
- **Microsimmability score:** 80/100
- **Layout:** drawing region (canvas) on top; control region (sliders/buttons) below.
### Parameters (tunable controls)
- `Input space coverage`
- `Bug density`
- `Test cases`
### What animates
Test cases sweep an input space; the probability of an undetected fault falls as coverage rises against a fixed bug [[Density|density]].
### Learning objective
Relate confidence in correctness to coverage and defect density.
## Links (Wikipedia order)
<!-- injected from _registry/childlinks/Correctness_(computer_science).json (2026-07-30T02:09:12Z) -->
[[Accuracy_and_precision]] · `Acta_Informatica` · [[Adaptability]] · [[Algorithm]] · [[Algorithmic_efficiency]] · `C_(programming_language)` · `Communications_of_the_ACM` · `Compiler_correctness` · `Computer_memory` · [[Computer_programming]] · `Constructive_logic` · `Curry–Howard_correspondence` · `Design_by_contract` · [[Flexibility_(engineering)]] · [[Formal_system]] · `Formal_verification` · `Halting_problem` · `Hoare_logic` · `ISO/IEC_9126` · `Integer` · `Lambda_calculus` · `List_of_system_quality_attributes` · [[Loose_coupling]] · [[Maintainability]] · `Mathematical_proof` · `Model_checking` · [[Non-functional_requirement]] · `Number_theory` · [[Orthogonality_(programming)]] · `Perfect_number` · `Program_analysis` · `Program_derivation` · `Proof_theory` · [[Reliability_engineering]] · [[Reusability]] · [[Robustness_(computer_science)]] · [[Scalability]] · [[Software_portability]] · [[Software_quality]] · [[Software_quality_assurance]] · [[Software_quality_control]] · [[Software_quality_management]] · [[Software_sizing]] · [[Software_testability]] · `Software_testing` · `Theoretical_computer_science` · `Tony_Hoare` · `Undecidable_problem` · [[Usability]] · `Victor_Basili`
> p5.js MicroSim stub · part of System Quality Attributes · [Wikipedia source](https://en.wikipedia.org/wiki/Correctness_%28computer_science%29)
> Relation: subfield of system quality attributes.
## Concept summary
Correctness is the property that a program satisfies its specification on all valid inputs.
## Build checklist
- [ ] Claim it: set `status: in-progress` + `lease` + `leased_at`
- [ ] Write the child page explaining the concept (tie it back to system quality attributes)
- [ ] Finalize parameter ranges and defaults
- [ ] Implement the p5.js sketch (drawing + control regions)
- [ ] Add caption + the learning objective on the page
- [ ] Set `status: done`
## p5.js sketch
```javascript
// MicroSim: Correctness (computer science)
let controls = {};
function setup() {
// createCanvas(...); create sliders for the parameters above.
}
function draw() {
// background(...); read controls; render verification / coverage; respond live.
}
```
---
Back to System Quality Attributes · Wikipedia: [Correctness (computer science)](https://en.wikipedia.org/wiki/Correctness_%28computer_science%29)
---
<!-- SEMIOTIC-PROFILE:START -->
## Semiotic profile
> *The semiotic universals this article invokes, machine-derived from the crossref — **unverified** (born so). Populated 2026-07-06 for the Systems room.*
**Universals (4):** 🟡 system (5) · 🟡 density (4) · 🟡 science (3) · 🟢 probability (1)
**Enter by sign:** Systems Semiotic Gateway · Alphabetum · Icon Registry · ← Systems Portal
<!-- SEMIOTIC-PROFILE:END -->
<!-- REAL-GENERATIVE-MEDIA:START -->
## From the Real GENERATIVE library
> In theoretical computer science, an algorithm is correct with respect to a specification if it behaves as specified. Best explored is functional correctness, which refers to the input-output behavior of the algorithm: for each input it produces an output satisfying the specification.[1] ([Wikipedia](https://en.wikipedia.org/wiki/Correctness_%28computer_science%29))
<!-- REAL-GENERATIVE-MEDIA:END -->
## Wikipedia : Wikitube
**Strict pair:** [Wikipedia](https://en.wikipedia.org/wiki/Correctness_%28computer_science%29) : [Wikitube](https://en.wikitube.io/wiki/Correctness_%28computer_science%29)
## Previous hub tags
Tree parent: [[Reliability_engineering]].
Legacy hubs: none.
---
*Sources: 1 legacy note. Minted wave 1, 2026-07-30 (v1.6 order).*