2 ms·
The thing the specs have in common with your code is they represent entities involved in the systems operation internally or externally to as abstract or concre
by nickpsecurity 9y ago
The thing the specs have in common with your code is they represent entities involved in the systems operation internally or externally to as abstract or concrete detail as you require. They also typically represent the structure and/or order of your system's activities. The abstractions that hide messy details of the machine can let you more easily analyze properties of your system with your eyes, spec/model-checkers, or proof. Some can generate tests from specs. Then, the code's modules should map closely to those abstract actions so you mainky just have to analyze code for isdues that just show up in those parts.
The easiest method to start with is Design by Contract plus property-based and fuzz testing. By itself, it lets you specify key properties that are highlighted during a test or runtime failure. Combined with SPARK Ada, you can prove the code is correct against those specs.
https://www.eiffel.com/values/design-by-contract/introduction/ https://www.eiffel.com/values/design-by-contract/introductio...
http://www.anthonyhall.org/c_by_c_secure_system.pdf http://www.anthonyhall.org/c_by_c_secure_system.pdf
https://en.m.wikipedia.org/wiki/SPARK_(programming_language) https://en.m.wikipedia.org/wiki/SPARK_(programming_language)