这是正确的,对于最弱的前置条件,分别是最强的后置条件吗?
{P} x = x-x; {X'= X}
P:x = 0
{true} y = y-y; {Q}
问:y = 0
编辑:
我首先应用this,如下所示:
{true} y = y - y {Q} ==> sp(y = y-y; true)=∃x,y = x-x∧true
现在我不知道该怎么做;在我看来,“y = 0”最有意义,但这似乎不正确。
答案 0 :(得分:0)
前提条件越强,后置条件越强。例如,
var n = document.getElementsByClassName('dealTitleTwoLine');
var s = n[0].getAttribute('href');
如果前置条件是最弱的,即let emojiRanges = [
0x1F601...0x1F64F, // emoticons
0x1F30D...0x1F567, // Other additional symbols
0x1F680...0x1F6C0, // Transport and map symbols
0x1F681...0x1F6C5 //Additional transport and map symbols
]
var emojis: [String] = []
for range in emojiRanges {
for i in range {
let c = String(describing: UnicodeScalar(i)!)
emojis.append(c)
}
}
,则后置条件中没有关于{y = 5} x := 8 {x = 8; y = 5}
值的有效假设。