The decision procedure is discussed in details in [5].
Reduction Step:
transform fusion logic formula FL into ∃X init ∧ I where X is a set of propositional dependency variables not occurring in FL and I is future transition formula
BDD Step:
transform init ∧ I into a BDD-based satisfiability problem
Transform a fusion logic formula FL into an equivalent reduced form init ∧ I
Transform FL into finit ∧ T where
finit: initial state,
finit ≜ℛ′0(FL)
T: transition relation, of the form
∧ i=1k(rXi ≡ FTi) ∧ ∧ j=1n(rY j ≡ PTj) where, rXi and rY j are dependent Boolean variables (not appearing in FL) and FTi is a future transition formula and PTj is a past transition formula:
T ≜ℛ0(FL)
Transform finit ∧ T into init ∧ I
where
Let X,X1 and X2 denote non state formulae and w a state formula then the definition of future Transition formula ℛk(FL) is as follows:
For k ∈{0,1}
FL |
ℛk(FL) |
W |
true |
⟨test(W)⟩X |
ℛk(X) |
⟨step(FT)⟩X |
k = 0 : (r⟨step(FT)⟩X ≡(FT ∧ℛ′0(X))) ∧ℛ0(X) |
k = 1 : ℛ0(X) |
|
⟨FE1 ∨FE2⟩X | ℛk(⟨FE1⟩X ∨⟨FE2⟩X) |
⟨FE1 ; FE2⟩X | ℛ
k(⟨FE1⟩⟨FE2⟩X) |
⟨FE∗⟩X |
(r⟨FE∗⟩X ≡ℛ′1(X1)) ∧ℛ1(X1) |
where X1 is X ∨⟨c(FE)⟩r⟨FE∗⟩X |
|
X1 U X2 |
(rX1UX2 ≡(ℛ′1(X2) ∨(ℛ′1(X1) ∧rX1UX2)) |
X |
ℛk(⟨step(true)⟩X) |
So only the step(FT), FE∗ and X1 U X2 case will introduce a dependent variable.
Let X,X1 and X2 denote non state formulae and w a state formula then the definition of past Transition formula ℛk(FL) is as follows:
For k ∈{0,1}
FL |
ℛk(FL) |
¬X |
ℛk(X) |
X1 ∨X2 |
ℛk(X1) ∧ℛk(X2) |
X⟨test(W)⟩ |
ℛk(X) |
X⟨pstep(PT)⟩ |
k = 0 : (rX⟨pstep(PT)⟩≡(PT ∧ℛ′0(X))) ∧ℛ0(X) |
k = 1 : ℛ0(X) |
|
X⟨PE1 ∨PE2⟩ | ℛk(X⟨PE1⟩∨X⟨PE2⟩) |
PE1 PE2⟨X⟩ |
ℛk(X⟨PE1⟩⟨PE2⟩) |
X⟨PE⟩ |
(rX⟨PE⟩≡ℛ′1(X1)) ∧ℛ1(X1) |
where X1 is X ∨rX⟨PE⟩⟨pc(PE)⟩ |
|
X1 S X2 |
(rX1SX2 ≡(ℛ′1(X2) ∨(ℛ′1(X1) ∧rX1SX2)) |
X |
ℛk(X⟨pstep(true)⟩) |
So only the pstep(PT), FE∗ and X1 S X2 case will introduce a dependent variable.
Let X,X1 and X2 denote non state formulae and w a state formula then the definition of state formula ℛ′k(FL) is as follows:
For k ∈{0,1}
FL |
ℛ′k(FL) |
W |
W |
⟨test(W)⟩X |
W ∧ℛ′k(X) |
⟨step(FT)⟩X |
k = 0 : r⟨step(FT)⟩X |
k = 1 : FT ∧ℛ′0(X) |
|
⟨FE1 ∨FE2⟩X |
ℛ′k(⟨FE1⟩X ∨⟨FE2⟩X) |
⟨FE1 ; FE2⟩X | ℛ′k(⟨FE1⟩⟨FE2⟩X) |
⟨FE∗⟩X |
r⟨FE∗⟩X |
¬X |
¬ℛ′k(X) |
X1 ∨X2 |
ℛ′k(X1) ∨ℛ′k(X2) |
X1 U X2 |
rX1UX2 |
X1 |
ℛ′k(⟨step(true)⟩X) |
Let X,X1 and X2 denote non state formulae and w a state formula then the definition of state formula ℛ′k(FL) is as follows:
For k ∈{0,1}
FL |
ℛ′k(FL) |
X⟨test(W)⟩ |
W ∧ℛ′k(X) |
X⟨pstep(PT)⟩ |
k = 0 : rX⟨pstep(PT)⟩ |
k = 1 : PT ∧ℛ′0(X) |
|
X⟨PE1 ∨PE2⟩ | ℛ′k(X⟨PE1⟩∨X⟨PE2⟩) |
X⟨PE1 PE2⟩ | ℛ′
k(X⟨PE1⟩⟨PE2⟩) |
X⟨PE⟩ |
rX⟨PE⟩ |
X1 S X2 |
rX1SX2 |
X1 |
ℛ′k(X⟨pstep(true)⟩) |
Reduction function for ⟨FE∗⟩X is a bit more involved because FE could be valid for intervals with only one state. Solution: a function c is introduced which transforms an arbitrary future fusion expression FE into another formula c(FE) such that c(FE) ≡ FE ∧morere holds. Note: ⟨FE∗⟩X ≡⟨c(FE)∗⟩X holds.
FE |
c(FE) |
test(W) |
test(¬true) |
step(FT) | step(FT) |
FE1 ∨ FE2 | c(FE
1) ∨ c(FE2) |
FE1 ; FE2 |
c(FE1) ; FE2 ∨ FE1 ; c(FE2) |
FE∗ |
c(FE) ; FE∗ |
Reduction function for X⟨PE⟩ is a bit more involved because PE could be valid for intervals with only one state. Solution: a function pc is introduced which transforms an arbitrary past fusion expression PE into another formula pc(PE) such that pc(PE) ≡ PE ∧morele holds. Note: X⟨PE⟩X ≡ X⟨pc(PE)⟩ holds.
PE |
pc(PE) |
test(W) |
test(¬true) |
pstep(PT) |
pstep(PT) |
PE1 ∨ PE2 | pc(FE1) ∨ pc(PE2) |
PE1 PE2 |
pc(PE1) PE2 ∨ PE1 pc(PE2) |
PE |
PEpc(PE) |
Transform finit ∧ T into init ∧ I
Let FL be a fusion Logic formula and dep(FL) be the dependent variables introduced by ℛ′0(FL) and ℛ0(FL) then
(1) FL ≡∃dep(FL) (ℛ′0(FL) ∧ℛ0(FL))
We know that ℛ0(FL)) is of the form F ∧ P where:
F ≜ (∧ i=1krXi ≡ FTi) and P ≜ (∧ j=1nrY j ≡ PTj)
where FTi is future transition formula and PTj is a past transition formula
Let first ≜¬true denote a formula which holds in the first state of an interval.
We shift reasoning back to a starting state of a satisfying interval then FL is satisfiable iff
(2) ∃dep(FL) (first ∧finit ∧(F ∧ P))
is satisfiable
Let pinit be a state formula obtained from P by replacing each construct by false then (2) is satisfiable iff
(3) ∃dep(FL) (pinit ∧finit ∧(F ∧ (morer ⊃ F′)))
is satisfiable
Let rZ be a fresh dependency (rZ ∉ dep(FL)) then (3) is satisfiable iff
(4) ∃dep(FL) ∪{rZ} (pinit ∧ rZ ∧
(F ∧ (morer ⊃ F′) ∧ (rZ ≡ (finit ∨ rZ))))
is satisfiable
Given a future fusion logic formula
⟨step(A)∗⟩(B ∨ C) ∨⟨step(A) ; test(B)⟩D
The Reduction Step yields:
init ≜ rX1 ∨ rX3 where X1 ≜⟨step(A)∗⟩(B ∨ C) and X3 ≜⟨step(A)⟩⟨test(B)⟩D.
The corresponding invariant I is
I ≜ (rX1 ≡ (B ∨ C) ∨ (A ∧ rX1)) ∧ (rX3 ≡ A ∧(B ∧ D))
Given a past fusion logic formula
(B ∨ C) ∧ (D⟨pstep(A) test(B)⟩)
The Reduction Step yields:
finit ≜ rX1 ∧ (B ∧ rX2) where X1 ≜(B ∨ C) and X2 ≜ D⟨pstep(A) test(B)⟩.
The corresponding invariant PI is
PI ≜ (rX1 ≡(B ∨ C)) ∧ (rX2 ≡ A ∧ D)
This is transformed into
init ≜ (rX1 ≡false) ∧ (rX2 ≡ A ∧false) ∧ rZ
I ≜ (rZ ≡ (finit ∨ rZ)) ∧ (morer ⊃ ((( rX1) ≡ (B ∨ C)) ∧ (( rX2) ≡ ( A) ∧ D)))
Transform init ∧ I into BDD based satisfiability problem.
| init: a state formula |
| I: an invariant, ∧ i=1k(FTi) (for k ≥ 1) where |
| where FTi contains dependent variable rXi and |
| FTi is a future transition formula |
Let us examine the ‘Always’ operator
init ∧ I |
● |
● |
● |
● |
● |
⟨I⟩ |
|||||
⟨—I—⟩ |
|||||
⟨—I— | — —⟩ | ||||
⟨—I— |
— — |
— —⟩ |
|||
⟨—I— |
— — |
— — |
— —⟩ |
||
init |
|||||
We know that invariant I only contains (next) as temporal operator. So it can only constrain the first two states of each suffix interval.
init ∧ I |
● |
● |
● |
● |
● |
⟨I⟩ |
|||||
⟨—I—⟩ |
|||||
⟨—I—⟩ | |||||
⟨—I—⟩ |
|||||
⟨—I—⟩ |
|||||
init |
|||||
Introducing BDDs Γi’s:
init ∧ I |
● |
● |
● |
● |
● |
Γ3 |
|||||
⟨—Γ2—⟩ |
|||||
⟨—Γ2—⟩ | |||||
⟨—Γ
2—⟩ | |||||
⟨—Γ2—⟩ |
|||||
Γ1 |
|||||
Given right fusion logic formula
⟨step(A)∗⟩(B ∨ C) ∨⟨step(A) ; test(B)⟩D
With Init = rX1 ∨ rX3 and corresponding invariant:
I = (rX1 ≡ (B ∨ C) ∨ (A ∧ rX1)) ∧ (rX3 ≡ A ∧(B ∧ D))
Then Γ1 = rX1 ∨ rX3 and
Γ2 = (rX1 ≡ (B ∨ C) ∨ (A ∧ r′X1)) ∧ (rX3 ≡ A ∧ (B′∧ D′))
and
Γ3 = (rX1 ≡ (B ∨ C) ∨ (A ∧false)) ∧ (rX3 ≡ A ∧false)
Encoding as a BDD-based satisfiability problem:
To construct a satisfying interval (in case FL is satisfiable) we proceed as follows.
Let Δm be that set of states for which Γ3 ∧ Δm is true.
If there are independent variables then Find a value assignment σm for the independent variables for BDD Δm, i.e., choose one state σm of Δm.
Compute Prm−1 denoting those states of Δm−1 that lead via Γ2 to state σm (weakest precondition of Γ2 and σm). Again choose one state σm−1 of Prm−1.
Continue until we reach Pr0 and then choose state σ0.
The states σ0…σm−1σm will then represent a (minimal) satisfying interval σ for FL.
Implementation of decision procedure