Presentation is loading. Please wait.

Presentation is loading. Please wait.

On the Use of Automata Techniques to Decide Satisfiability Mia Minnes May 3, 2005.

Similar presentations


Presentation on theme: "On the Use of Automata Techniques to Decide Satisfiability Mia Minnes May 3, 2005."— Presentation transcript:

1 On the Use of Automata Techniques to Decide Satisfiability Mia Minnes May 3, 2005

2 Motivation We’ve seen how useful ILP formulations can be. Often, the main question is whether such a system (of linear equations and inequalities) has a solution, and if so, what it is. Omega is nice, but can we do better? Moreover, can we have a general framework for solving such systems which is amenable to extension? –E.g. to Mixed Integer Linear Programming –E.g. to more general systems (with quantifiers).

3 Motivation One possible such framework is Finite Automata. Why are we interested in it? It worked before…MONA (model checking for LTL). Automata are amenable to algorithmic manipulation. It often has a compact representation.

4 Goal Given a system of linear equations and inequalities, construct an automaton which accepts exactly those vectors which are solutions to the system. In order to get there, we’ll need to 1.Define the systems of equations / inequalities 2.Define automata 3.Formulate algorithm.

5 1. The Systems Presburger Arithmetic is the first order theory (sentences involving , , Boolean combinations) of Atomic (basic) formulas are of the form: or

6 1. The Systems A formula  ( x 1,…, x n ) in Presburger Arithmetic is SATISFIABLE if there are integers c 1,…, c n such that  ( c 1,…, c n ) is true. Examples:    Presburger (1927) gave decision method. ILP Problem ?

7 2. Automata A finite state AUTOMATON is a “machine” which reads input bit-by-bit and changes state according to the current state and input. It has designated initial and accepting states, and a transition function which gives the rule for moving between states. Example: 0 0,1 1 sisi smsm sfsf 01100  00011  10011  Sample Input:

8 3. Algorithm 1.Given , a formula in Presburger Arithmetic 2.Construct A , the automaton accepting exactly those words satisfying  3.Check if the set of words accepted by A  is empty 4.If yes,  is not satisfiable; if no, it is. Observe: The hardest part of this algorithm is (2). Why? Cf. (Wolper, Boigelot ‘02, extending Boudet, Comon ‘96)

9 3. Algorithm To tackle the translation of formulas to automata: 1.First construct A  for atomic  2.Then define automata corresponding to Boolean op’ns 3.Finally, define automata for quantified formulas. (Note that the third step is not important for ILP problems.)

10 3. Algorithm: Equations Some implementation details: 1.Integers encoded in 2’s complement binary notation. 2.Read numbers MSB first. 3.States represent current value of sum. Hence,

11 3. Algorithm: Forward Construction sisi 0-2-3-41243 Inputs (b): ----- 01 ----- 10 ----- 00,11 x-y=2 a = (1,-1) … …

12 3. Algorithm: Pruning Construction sisi 0-2-3-41243 ----- 01 ----- 10 ----- 00,11 ----- 00,01,10,11 x-y=2 sbsb Note: this is not yet minimal!

13 3. Algorithm: Backward Construction sisi 012 ----- 01 ----- 10 ----- 00,11 ----- 00,01,10,11 x-y=2 H={s i,2} L={2}  =(  0 +a.b)/2  Z?  =-a.b?  0   via b H={s i,2,1,0} L={0} H={s i,2,1,0} L= empty H={s i,2,1} L={1} Note: this is minimal!

14 3. Algorithm: Inequalities 1.For forward construction: include all states representing numbers less than RHS as accepting (plus modify bad states). 2.For backward construction, add transitions for all

15 sisi 0-212 ----- 01 ----- 10 ----- 00,11 ----- 00,01,10,11 x-y <= 2 sbsb Also need to add transitions! sgsg 3. Algorithm: Inequalities

16 3. Algorithm: General Formulas 1.We’ve taken care of any atomic formula. 2.For negation, conjunction, and disjunction of formulas, use the standard techniques for complementation, intersection, and union of finite automata. Complementation: switch accepting / non-accepting states Intersection: run both automata simultaneously Union: run the automata side by side 3.To eliminate quantifiers, use the projection operation on automata.

17 Complexity Results If  is a quantifier free formula, then the minimal automaton for  has at most 1+(  +  ) |  | states, where |  | is the number of terms in ,  and  depend on the absolute values of the coefficients in the linear terms. If  is an arbitrary formula of length, the minimal automaton for  has at most states. Moreover, there is an example requiring this many states, so the bound is tight. Cf. (Klaedtke ‘03)

18 Evaluation of Aut. Decision Proc. Relatively simple algorithm. Handles general case well (Pres. Arithmetic). Uses graph theoretic simplifications. Exhibits solution if one exists. Doesn’t use native arithmetic so will spend more time on computation. Calculates a lot of data that may not be necessary for specific question.

19 Experimental Results: Quant. Free Satisfiability problem for quantifier free Presburger Arithmetic is NP complete, so experiments were designed to determine which classes of formulas were handled well by each technique (LASH vs. ILP vs. Omega) 25 runs with parameters: # atomic formulas # variables LASH was able to complete nearly all test runs, and do so correctly. ILP, Omega were faster when they worked but were prone to error / failure. Cf. (Ganesh, Berezin, Dill ‘02)

20 Extension: Mixed Integers and Reals Hybrid systems and timed systems require systems of equations in which some of the variables have real values and some have integer values. To use the automata techniques in this case we have two challenges: 1.How to encode real numbers as binary input to automata? 2.How to design automata which accept particular sets of reals? A nice feature of the design which follows is that the set of integers is automata recognizable. Cf. (Boigelot, Bronne, Rassart ‘97 Boigelot, Jodogne, Wolper ‘01 Boigelot, Wolper ‘02)

21 Encoding Real Numbers Given  a real number, we encode it in binary with MSB first, using 2’s complement for negative numbers. Result is an infinite word  =  I *  F where  I encodes the integer part of  as a finite binary word, and  F encodes the fractional part of  as an infinite binary word.

22 Automata Accepting Real Numbers Decompose the problem as follows: Using a finite automaton (as before) to accept the integer part of the real number Concatenating with a special automaton which only accepts * And then appending a new kind of automaton which will have to be able to accept the fractional (infinite) part of the real number. Finite Automaton Buchi Automaton *

23 Automata Accepting Real Numbers What is a Buchi Automaton? A finite state automaton where the notion of “accepting a word” is different: The automaton accepts a word  if, on reading , the automaton enters an accepting state infinitely many times. By the Buchi characterization theorem, the set of words accepted by a Buchi automaton is nonempty exactly if there is a “lasso” path in the underlying directed graph from an initial state to an accepting state and then looping back to the accepting state. smsm sfsf sisi 0 0,1 1 Accepts e.g. 011111…

24 Automata Accepting Real Numbers Now the satisfiability question is: Does the integer part automaton accept a non- empty set of words? And, Does the fractional part automaton accept a non- empty set of words? Since both of these are answerable (in linear time) by graph algorithms, we’re in good shape.

25 Future Directions & Open Questions Further, more extensive, comparative studies For general formulas (with quantifiers) In the mixed case (compare to Fourier-Motzkin approach) Explore different encoding schemes LSB vs. MSB first Expand/ optimize existing toolsets.

26 References Boigelot, Bronne, Rassart (CAV ‘97) “An Improved Reachability Analysis for Strongly Linear Hybrid Systems”. Wolper, Boigelot (TACAS ‘00) “On the Construction of Automata from Linear Arithmetic Constraints”. Boigelot, Jodogne, Wolper (IJCAR ‘01) “On the Use of Weak Automata for Deciding Linear Arithmetic with Integer and Real Variables”. Boigelot, Wolper (ICLP ‘02) “Representing Arithmetic Constraints with Automata: An Overview”. Ganesh, Berezin, Dill (FMCAD ‘02) “Deciding Presburger Arithmetic by Model Checking and Comparison with Other Methods”. Klaedtke (Technical Report, ‘03; LICS ‘04) “On the Automata Size for Presburger Arithmetic”.


Download ppt "On the Use of Automata Techniques to Decide Satisfiability Mia Minnes May 3, 2005."

Similar presentations


Ads by Google