postcondition(名词):在计算机科学与软件工程中,指某个函数/方法/过程执行完成后必须为真的条件,用来描述“执行结果应达到什么状态”。(常与 precondition、invariant 一起用于“契约式设计”。)
/ˌpoʊstkənˈdɪʃən/
The postcondition ensures the list is sorted after the function returns.
后置条件确保函数返回后,列表已经被排序。
If the precondition holds and the implementation is correct, the postcondition should be satisfied even when edge cases occur.
如果前置条件成立且实现正确,那么即使出现边界情况,后置条件也应当被满足。
由 **post-**(“在……之后”,源自拉丁语 post)+ condition(“条件”)构成,字面意思是“事后条件”,即“执行之后应成立的条件”。