Skip to main content

Questions tagged [design-by-contract]

Design by contract (DbC) prescribes that software designers should define formal, precise and verifiable interface specifications for software components, which extend the ordinary definition of abstract data types with preconditions, postconditions and invariants.

4 votes
4 answers
813 views

I read Bertrand Meyer's paper on design by contract yesterday and it is not very clear for me what is the relationship between DbC and testing, since it appears that without testing I cannot be ...
edalorzo's user avatar
  • 2,696
-2 votes
1 answer
76 views

For systems that are built on top of diverse tech stacks, including both static and dynamic types languages, what is in practice some ways to have the API contracts published and enforced? Some wiki ...
Jim's user avatar
  • 359
0 votes
1 answer
131 views

FIRST AND FOREMOST: Forgive me if the following question falls into the "off topic" category of this StackExchange, due to its slightly opinion polling nature. This is not my intention, I am simply ...
NJ Mercaldo's user avatar
6 votes
6 answers
2k views

I am writing a library for some data structures in C that will be used in embedded systems. I have had issues designing and coming up with a solid error handling plan. This API is only subject to ...
Michael Joseph's user avatar
2 votes
0 answers
231 views

I'm in the early stages of learning design-by-contract (DbC). And I think that if followed correctly, it can produce very high quality software. This gets me wondering though... why isn't it used a ...
Leon Carlo Valencia's user avatar
4 votes
1 answer
2k views

Does an OOP design that uses a Design by Contract mean the designer is using interfaces to create a "contract." The term "contract" is used quite often when discussing OOP interfaces, so I didn't ...
johnny's user avatar
  • 3,679
4 votes
3 answers
967 views

I'd heard about Design by Contract a long time ago and always was confused by this question. The approach uses real-world client-supplier analogy to describe caller-callee relationships. It stays, ...
neoascetic's user avatar
3 votes
1 answer
190 views

Design by contract is based on Hoare logic where a proof of correctness of a program is established by reasoning over pre/post conditions and invariants. What are the means and prerequisites of a ...
Trident D'Gao's user avatar

15 30 50 per page