ArticleslgStudy

science

Extended static checking

Extended static checking is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Extended static checking rather than just read about it. In short: Extended static checking (ESC) is a collective name in computer science for a range of techniques for statically checking the correctness of various program constraints. ESC can be thought of as an extended form of type checking.

Key takeaways

  • Extended static checking belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Extended static checking to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Extended static checking from memory before moving on to harder problems.

Reference excerpt

Extended static checking (ESC) is a collective name in computer science for a range of techniques for statically checking the correctness of various program constraints. ESC can be thought of as an extended form of type checking. As with type checking, ESC is performed automatically at compile time (i.e. without human intervention). This distinguishes it from more general approaches to the formal verification of software, which typically rely on human-generated proofs. Furthermore, it promotes practicality over soundness, in that it aims to dramatically reduce the number of false positives (overestimated errors that are not real errors, that is, ESC over strictness) at the cost of introducing some false negatives (real ESC underestimation error, but that need no programmer's attention, or are not targeted by ESC). ESC can identify a range of errors that are currently outside the scope of a type checker, including division by zero, array out of bounds, integer overflow and null dereferences. The techniques used in extended static checking come from various fields of computer science, including static program analysis, symbolic simulation, model checking, abstract interpretation, SAT solving and automated theorem proving and type checking. Extended static checking is generally performed only at an intraprocedural, rather than interprocedural, level in order to scale to large programs. Furthermore, extended static checking aims to report errors by exploiting user-supplied specifications, in the form of pre- and post-conditions, loop invariants and class invariants. Extended static checkers typically operate by propagating strongest postconditions (respectively weakest preconditions) intraprocedurally through a method starting from the precondition (respectively postcondition). At each point during this process an intermediate condition is generated that captures what is known at that program point. This is combined with the necessary conditions of the program statement at that point to form a verification condition. An example of this is a statement involving a division, whose necessary condition is that the divisor be non-zero. The verification condition arising from this effectively states: given the intermediate condition at this point, it must follow that the divisor is non-zero. All verification conditions must be shown to be false (hence correct by means of excluded third) in order for a method to pass extended static checking (or "unable to find more errors"). Typically, some form of automated theorem prover is used to discharge verification conditions. Extended static checking was pioneered in ESC/Modula-3 and, later, ESC/Java. Its roots originate from more simplistic static checking techniques, such as static debugging or lint and FindBugs. A number of other languages have adopted ESC, including Spec# and SPARKada and VHDL VSPEC. However, there is currently no widely used software programming language that provides extended static checking in its base development environment.

See also Java Modeling Language (JML)

References

Further reading Cormac Flanagan; K. Rustan M. Leino, Mark Lillibridge, Greg Nelson, James B. Saxe, Raymie Stata (2002). "Extended static checking for Java". Proceedings of the ACM SIGPLAN 2002 conference on Programming language design and implementation. p. 234. doi:10.1145/512529.512558. ISBN 978-1-58113-463-6. S2CID 47141042.{{cite book}}: CS1 maint: multiple names: authors list (link) Babic, Domagoj; Hu, Alan J. (2008). "Calysto". Proceedings of the 13th international conference on Software engineering - ICSE '08. p. 211. doi:10.1145/1368088.1368118. ISBN 978-1-60558-079-1. S2CID 62868643. Chess, B.V. (2002). "Improving computer security using extended static checking". Proceedings 2002 IEEE Symposium on Security and Privacy. pp. 160–173. doi:10.1109/SECPRI.2002.1004369. ISBN 978-0-7695-1543-4. S2CID 12067758. Rioux, Frédéric; Chalin, Patrice (2006). "Improving the Quality of Web-based Enterprise Applications with Extended Static Checking: A Case Study". Electronic Notes in Theoretical Computer Science. 157 (2): 119–132. doi:10.1016/j.entcs.2005.12.050. ISSN 1571-0661. James, Perry R.; Chalin, Patrice (2009). "Faster and More Complete Extended Static Checking for the Java Modeling Language". Journal of Automated Reasoning. 44 (1–2): 145–174. doi:10.1007/s10817-009-9134-9. ISSN 0168-7433. S2CID 14996225. Xu, Dana N. (2006). "Extended static checking for haskell". Proceedings of the 2006 ACM SIGPLAN workshop on Haskell. p. 48. doi:10.1145/1159842.1159849. ISBN 978-1-59593-489-5. S2CID 1340468. Leino, K. Rustan M. (2001). "Extended Static Checking: A Ten-Year Perspective". Informatics. Lecture Notes in Computer Science. Vol. 2000. pp. 157–175. doi:10.1007/3-540-44577-3_11. ISBN 978-3-540-41635-7. Detlefs, David L.; Leino, K. Rustan M.; Nelson, Greg; Saxe, James B. (1998). "Extended Static Checking". Compaq SRC Research Report (159).

Worked examples

Example 1 — a first encounter with Extended static checking

Start with the simplest possible case. Write down what Extended static checking claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Extended static checking before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Extended static checking ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Extended static checking

In research
Extended static checking appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Extended static checking in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Extended static checking is common in secondary-school and first-year university syllabi. It links to neighbouring topics Formal methods, Static program analysis, so understanding it makes those chapters shorter.
In everyday life
Look for Extended static checking outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Extended static checking” →

How to study Extended static checking in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Extended static checking means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Extended static checking out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Extended static checking in simple terms?

Extended static checking (ESC) is a collective name in computer science for a range of techniques for statically checking the correctness of various program constraints. ESC can be thought of as an extended form of type checking.

Why does Extended static checking matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Extended static checking?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Extended static checking.

Tags

  • Formal methods
  • Static program analysis

Keep exploring