• Tidak ada hasil yang ditemukan

A FOL Fragment for Safety Checking in Infinite State Systems

N/A
N/A
Protected

Academic year: 2024

Membagikan "A FOL Fragment for Safety Checking in Infinite State Systems"

Copied!
23
0
0

Teks penuh

(1)

A FOL Fragment for Safety Checking in Infinite State Systems

Supratik Chakraborty and Abhisekh Sankaran

(2)

Introduction

! Given a state-transition system, thesafety checking problem involvesfinding whether a certainsafety property is true in all reachable states of the system.

! This can be translated to the problem of reachability of a state violating the safety property in the system.

! We look at reachability in infinite state systems. This is known to be undecidable in general.

! However we try to answer the reachability question by using a combination of inductive reasoning and bounded model checking in a semi-decision procedure.

(3)

InductionSolve

ifnotSat(¬P(s))then returnTrue;

ifSat(I(s)∧ ¬P(s)) thenreturn counterexamples;

else k :=1;

whileTrue do ifnotSat(!i=k

i=1(P(si)∧ T(si,si+1))∧

!

1i<jk+1(si "=sj)∧ ¬P(sk+1))then returnTrue;

ifSat(I(s1)∧!i=k

i=1(P(si)∧ T(si,si+1))∧

!

1≤i<jk+1(si "=sj)∧ ¬P(sk+1))then return counterexamples;

else

k := k + 1;

end

(4)

InductionSolve (Contd..)

! Let

IS1(k) =!i=k

i=1(P(si)∧ T(si,si+1))∧ ¬P(sk+1).

IS2(k) =I(s1)∧!i=k

i=1(P(si)∧ T(si,si+1))∧ ¬P(sk+1).

! Non-termination of InductionSolve can be due to (a) non-termination of SAT solver or (b) unbounded increase ofk.

! Halting problem can be expressed as a reachability problem where we can decide the satisfiability ofIS1(k) andIS2(k).

! We hence try to identify classes ofP,T andI for which we can decideIS1(k)andIS2(k).

(5)

An Example

s

a b c

d e

f g

h i

a c

d f g

h i

b e s

! T(s,s")≡ ∃x,y,z(E(x,y)∧ ¬E(y,z)∧ ¬E"(x,y)∧E"(y,z))

P(s) =∀x,y,z¬(E(x,y)∧E(y,z)). Then IS1(1) =P(s)∧ T(s,s")∧ ¬P(s")is true.

! The following sub-graphs (having 3 nodes) also satisfy

T(s,s"). Further no matter how you extend them (by

adding nodes) the resulting graphs still satisfyT(s,s").

d e

b

d e

b

d e

b f

h g

f h d e g

b

(6)

An Example (Contd..)

! The following sub-graphs (having 0 and 3 nodes resp.) also satisfyP(s)and¬P(s"). Extending them,P(s)and

P(s")still hold true.

d e

i

d e

i f

g

h

! Putting the above sub-graphs together the following subgraphs having atmost 3 + 0 + 3 = 6 nodes satisfy IS1(1).

d e

i

b

d e

i

b

(7)

A General Procedure for Deciding IS1(k ) and IS 2(k )

! SupposeT(s,s")has the following property.

11

T(s ,s’ )

22

T(s ,s’ )

|s | <= B1 T

|s | <= B1 T

11 T(s,s’)

s s’

1 s112 s

s s’1

s’2 s’

! SupposeP(s)(and likewise¬P(s),I(s)and¬I(s)) have the following property.

s ,P(s )1 1

s,P(s) s ,P(s )2 2

(8)

A General Procedure for Deciding IS1(k ) and IS 2(k )

! Then ifIS1(1)has a model, we can construct a bounded (sub)model of sizeB=BT +BP+B¬P.

11

T(s ,s’ )

22

T(s ,s’ )

s ,P(s )11 11 s’ ,!P(s’ 11 11

s1

s ,P(s )2 2

s’1

2 2

s’ ,!P(s’ ) T(s,s’)

s, P(s) (C) s’,!P(s’)

! We can do likewise forIS1(k)andIS2(k)for anyk.

! Then for each formula, if it has a model, it has a model of bounded sizeB. Enumerate all models of size uptoB. If

youfind a model, you are done, else you know there

cannot exist a model.

(9)

The Extensible Bounded Submodel Property (EBS)

A formulaϕ(x)overΣis said to satisfy theExtensible

Bounded Submodelproperty with respect toσ⊆Σ(denoted asϕ(x)∈EBSΣ(σ)) if there exists a cardinalBϕ,σ such that for everyΣ−structureMhaving universeAwith|A| ≥ Bϕ,σ and for everyaA|x|, ifM |=ϕ(a)then there existsA1Asuch that

1. aA|x|1 2. |A1| ≤ Bϕ,σ

3. For allA2such thatA1A2A, ifM2" is the substructure ofM generated byA2, then there exists aΣ−structureM2 such thatM2|σ =M2"|σ andM2|=ϕ(a).

(10)

The EBS property pictorially

TO BE RETAINED A1

A2 A

M

CAN BE CHANGED

|A | <= B1

Its easy to see that forσ1⊆σ2⊆Σ,EBSΣ2)⊆EBSΣ1).

(11)

Some Examples

! Bernays-Sch¨onfinkel (∃(..))is inEBSΣ(Σ). For a sentenceϕ,Bϕ,Σ= No. of existential quantifiers inϕ.

! In the example shown earlier, the sentence is

x1,x2,x3,y1,y2,y3z1,z2,z3

(E(x1,x2)∧ ¬E(x2,x3)∧ ¬(E(z1,z2)∧E(z2,z3))∧

¬E"(x1,x2)∧E"(x2,x3)∧E"(y1,y2)∧E"(y2,y3))

and hence has bound of 6.

!owenheim class (monadic FO)∈EBSΣ(Σ).Bϕ,Σ=k.2m (k = Rank ofϕ,m=|Σ|).

! Ifφ=∀xyP(x,y),thenφ∈EBSΣ(∅).

(12)

EBS and other classes of FO

! EBS"→bounded submodel property.

Considerϕ=∀xyP(x,y). The infinite chain is a model but there is no bounded submodel of it satisfyingϕ. Yet ϕ∈EBSΣ(∅)as seen earlier.

! EBS"=finite satisfiability

Letϕ1express there exists exactly one element andϕ2

express an infinite chain. Then Finitely sat In EBS Eg formula

Yes Yes ϕ1

Yes No ϕ1∨ϕ2

No Yes ϕ1∧ϕ2(=False)

No No ϕ2

(13)

Closure properties of EBS

Letϕi(xi)∈EBSΣii)for someσi ⊆Σi. Let condition

C = (Σ1∩Σ21∩σ2). LetZi)denote free variables ofϕi. 1. ∧-Closure: Letϕ(x) =ϕ1(x1)∧ϕ2(x2),Σ = Σ1∪Σ2. IfC

holds, thenϕ(x)∈EBSΣ1∪σ2)⊆ EBSwith Bϕ,σ1∪σ2 =Bϕ11 +Bϕ22.

2. ∨-Closure: Letϕ(x) =ϕ1(x1)∨ϕ2(x2),Σ =Σ1∪Σ2. Then ϕ(x)∈EBSΣ(σ)with

σ = ((Σ1−Σ2)∪σ2)"

((Σ2−Σ1)∪σ1),Bϕ,σ =

max{Bϕ11,Bϕ22}+max(|Z1)\Z2)|,|Z2)\Z1)|).

3. ¬-(Non)Closure: EBS is not closed under negation.

4. ∃−Closure: Letϕ(x) =∃zϕ1(x1)wherezZ1). Then ϕ(x)∈EBSΣ11)⊆ EBSwithBϕ,σ =Bϕ11.

(14)

A Syntactic Subclass of EBS - Some Terminology

Considerϕ(x)in prenex normal form with all its variables named uniquely. Let

! V(ϕ)= set of all free variables#

the leftmost∃quantified variables ofϕ.

! AV(ϕ)= set of all∀quantified variables ofϕand

! EV(ϕ)= set of all∃quantified variables ofϕexcept the leftmost ones.

(15)

A Syntactic Subclass of EBS - Some Terminology (Contd..)

A predicatePis called

! freeif each argument of every instance ofPinϕis inV(ϕ).

! universal if no argument of any instance ofP is from EV(ϕ)and atleast one argument of some instance ofPis fromAV(ϕ).

! existential if atleast one argument of some instance ofP is fromEV(ϕ).

! mixed if, for somei, theith argument of one instance ofP is fromAV(ϕ)while theithargument of another instance of P is fromEV(ϕ).

(16)

A Syntactic Subclass of EBS - Some Terminology (Contd..)

! Thefree support set (fss)of an instance ofPinϕis the set of all variables inV(ϕ)appearing as arguments in that instance ofP. Theaggregated free support set (afss) of predicatePis the union of the free support sets of all instances ofP inϕ.

! Theuniversal support set (uss)of an instance ofPinϕis the set of all variables ofAV(ϕ)appearing as arguments in that instance ofP. Theaggregated universal support set (auss)ofPis the union of the universal support sets of all instances ofP inϕ.

(17)

A Syntactic Subclass of EBS - Some Terminology (Contd..)

! Theexistential support set (ess)of an instance ofP inϕis the set of all variables ofEV(ϕ)appearing as arguments in that instance ofP. Theaggregated existential support set (aess)ofPis the union of the existential support sets of all instances ofP inϕ.

! Two instances of predicatePinϕ(x)are said to be distinguishablewith respect to variablev if there is an integerisuch thatv occurs as theithargument of one instance but not as theith argument of the other instance.

(18)

An Example

Considerϕgiven as below.

ϕ(u,x) = ∃wyz P(x,z)∧(P(y,z)∨ ¬P(u,w))∧(Q(y)∨

¬Q(x)∨S(u))∨(R(y,x)∧R(u,y))∧(T(y,z)∧T(z,w))

! V(ϕ) ={u,x,w},AV(ϕ) ={y},EV(ϕ) ={z}.

! P is existential,Q,R are universal,Sis free,T is mixed.

! ForP,fssoffirst instance is{x},ussis{}andess is{z}.

ForP,afss={x,u,w},auss={y}andaess={z}.

! Variabley distinguishes the two instances ofQ.

(19)

A Syntactic Subclass of EBS - Definition

Letϕ(x)be a FOL formula in prenex normal form with uniquely named variables and signatureΣ. Formulaϕ(x)is said to have Existentially Distinguishable and Unmixed Predicateswith respect toσ⊆Σ(denotedϕ(x)∈EDUPΣ(σ)) if:

1. Every predicate inσis nullary, unary, free or universal.

2. There is no equality.

3. Every predicateP ∈Σwith arity≥2 satisfies the following:

! Pis not mixed inϕ(x).

! LetP1andP2be two syntactically distinct instances ofP.

LetEUσbe the union of aggregated existential support sets of unary predicates inσ, andE1,2be the union of existential support sets ofP1andP2. ThenP1andP2are either distinguishable with respect to every variable inE1,2or with respect to some variable inE1,2\EUσ.

(20)

An Example

Consider the same example as before.

ϕ(u,x) = ∃wyz P(x,z)∧(P(y,z)∨ ¬P(u,w))∧(Q(y)∨

¬Q(x)∨S(u))∨(R(y,x)∧R(u,y))∧(T(y,z)∧T(z,w)).

! ϕ /∈EDUPΣ(σ)for anyσ asT is mixed.

! ϕ /∈EDUPΣ(σ)also since the second argument of thefirst twoP instances is same i.e.z.

! Suppose the last clause is dropped and the second argument of thefirstP instance is changed tou. Then if P ∈/σ, ϕ∈EDUPΣ(σ)else not.

(21)

Some Results on EDUP

Lemma

Letϕ(x)be a formula in prenex normal form with signatureΣin which (a) every predicate of arity≥2inΣappears exactly once and (b)there is no equality predicate. Then there existsσ ⊆Σ such thatϕ(x)∈EDUPΣ(σ).

LetBSbe the Bernay’s Sch¨onfinkel class andLbe the L¨owenheim class of FO formulae overΣ.

Lemma

(BSL)⊆EDUPΣ(Σ).

(22)

Some Results on EDUP (Contd..)

Lemma

If L"⊆BS, then(LBS)!EDUPΣ(Σ).

Theorem

Letϕ(x)∈EDUPΣ(σ). Let m and k be the number of constants and unary predicates, resp. inΣ. Let l be the number of

existential instances of predicates of arity≥2inϕ(x). Then ϕ(x)∈EBSΣ(σ)withBϕ,σ =m+|V(ϕ(x))|+|EV(ϕ(x)| ·2k+l.

(23)

Conclusion

! We looked at a semantic property called EBS to give us a semi-decision procedure for the reachability problem in infinite state systems.

! We studied the EBS class with regards to its relation with other classes, deciding the membership in the EBS class and its closure properties.

! We then looked at a syntactic subclass of EBS called EDUP which is defined by placing restrictions on the way quantified variables appear as the arguments of predicates and looked at some results concerning this class.

! The EDUP class generalises two well known classes namely Bernays Sch¨onfinkel and L¨owenheim and is a decidable class.

! We intend to get explore more syntactic subclasses of EBS.

Referensi

Dokumen terkait

Variables consist of stock return as the dependent variable, profitability, earnings management, and liquidity as the independent variable, leverage as the moderating variable

Since ∅ is an open set in any topological space ( S, O ) and any union of open sets is an open set, it follows that the topology itself is an interior system on S. In addition,

Estimated value of properties loss EVPL in the training data set D, ̂x is the predicted values of predictor variables Percentage of Plain Land PL, Population Size PS, Population

The article argues that this set of distinctly Irish American interests was able to be manipulated in support of the antagonistic Union and Confederate causes, and that the

Summary of all dimensions Positive pole variables Contribution to dimension Negative pole variables Contribution to dimension Learning as work to be done An intention to

The results of testing three variables, namely minimum wage, average education level, and population growth, indicate that concurrently, all independent variables have an impact on the

Although the probabilistic model showed the strength in representing the determinants of dwell time as random variables, the observed data did not support the model assumption of the

28 of 1999 concerning the Administration of a Clean and KKN-free State, the definitions of corruption, collusion and nepotism are explained, all of which are disgraceful acts for state