In recent years, software development methods have evolved rapidly: static typing, unit testing, extreme programming, model checking. However, the abundance of terms and techniques makes it hard to understand their relationships. This work offers a unified perspective through the mathematical notion of a property, which links use cases, tests, types, and correctness proofs. This approach is especially relevant given the growing popularity of property-based testing, which makes property checking practical and accessible.
The authors use the Scala language and the ScalaCheck library to specify and randomly check properties. Using simple functions (maximum, sum, counting elements) as examples, they demonstrate how to write properties in an executable form. Properties are formulated using universal quantification and the forAll operator, which generates random test data. They show how to extract general properties from concrete examples, combine them, and even transform properties into code. For working with lists, they use an inductive data structure and pattern matching.
The article shows that even one-line functions have nontrivial properties that can be checked automatically. For example, for the max function, symmetry, idempotence, and the least upper bound property are checked; together they fully characterize the function. For the sum function, the monotonicity property reveals an integer overflow error that other tests missed. For the count function, they show how to gradually refine properties to rule out incorrect implementations (e.g., a function that always returns zero). An important result: programs themselves can be viewed as properties, blurring the line between specification and implementation.
This work offers a practical bridge between testing and formal verification. Unlike neighboring works that focus on individual techniques (e.g., explainable AI or quantum computing), here properties serve as a universal language for describing program behavior. This allows reaping most of the benefits of formal verification at a significantly lower cost. The approach is especially valuable for education: it provides a vocabulary for reasoning about programs and helps understand why programming is hard.
Precise programming could evolve toward tighter integration with theorem provers. As proof automation advances, properties formulated during development will become the starting point for full verification. Applying the approach to distributed systems and protocols is also promising, where properties help describe invariants. Tools that automatically extract properties from code and suggest them for checking could be created.
The method applies to any area of software development, from embedded systems to web services. It improves code quality, eases refactoring, and aids documentation.
Adopt the practice of writing properties in everyday development, starting with key modules. Explore how properties help when requirements change.
Software engineering still faces the scalability problem of formal methods. Precise programming shows how properties can serve as an intermediate link between informal tests and full proofs, easing the gap between practice and theory.
This section is addressed to the author of the paper and their colleagues. Neighbouring works were found by meaning-based search across our archive, not by word overlap. We do not review: we show the field around the work.
What the work does
The authors introduce the concept of precise programming, where properties serve as a bridge between specification and implementation. Using the functions max, sum, and count with ScalaCheck, they show how to formulate and automatically verify properties, uncovering errors (such as overflow) and refining specifications.
Where its strength is
The strong point is the demonstration of how properties can fully characterize a function and serve as an executable specification, combining testing and formal methods.
Where it could go next
Worth trying
Why this may matter
This approach could become a universal tool for improving software reliability across various domains, from classical computing to quantum computing, lowering the barrier to formal methods.
Nearby works in our archive
The archive is sparse around this work: the closest review is only 0.52, against a usual 0.64. It looks like few have drilled nearby.
The name ScalaCheck alludes to the idea of automatic property checking, not to 'checking Scala'—it is a tool for checking properties in Scala.
In the series 'Westworld', robot behavior is governed by complex rules, but their correctness is not guaranteed. Precise programming could help formulate and check behavioral properties, preventing unexpected failures.