Presentation is loading. Please wait.

Presentation is loading. Please wait.

Fast SAT through Incremental Unit Propagation

Similar presentations


Presentation on theme: "Fast SAT through Incremental Unit Propagation"— Presentation transcript:

1 Fast SAT through Incremental Unit Propagation
Truth Maintenance and the ITMS Brian C. Williams Oct. 30th, J/6.834J 9/20/2000 copyright Brian Williams

2 copyright Brian Williams
Outline Motivation: Fast Mode Estimation and Reconfiguration Review of unit propagation Incremental unit propagation as truth maintenance 9/20/2000 copyright Brian Williams

3 Reconfiguring for a Failed Engine
Oxidizer tank Fuel tank Open four valves Valve fails stuck closed Fire backup engine 9/20/2000 copyright Brian Williams

4 Diagnosis and Reconfiguration Performance on Cassini
Number of components: 80 Number of clauses: 11,101 9/20/2000 copyright Brian Williams

5 copyright Brian Williams
Outline Motivation: Fast Mode Estimation and Reconfiguration Review of unit propagation Incremental unit propagation as truth maintenance 9/20/2000 copyright Brian Williams

6 Unit Propagation Examples
C1: Not A or B C2: Not C or A C3: Not B or C C4: A A True B True C True C4 C1 C3 9/20/2000 copyright Brian Williams

7 Unit Propagation Examples
C1: Not A or B C2: Not C or A C3: Not B or C C4: A C4’: Not B A True B True C True C4 C1 C3 C4’ A False B False C False C2 C1 9/20/2000 copyright Brian Williams

8 copyright Brian Williams
Unit Propagation true false t r q C2: ¬ p ¬ t C1 : ¬r  q p p procedure propagate(C) // C is a clause if all literals in C are false except l, and l is unassigned then assign true to l and record C as a support for l and for each clause C’ mentioning “not l”, propagate(C’) end propagate 9/20/2000 copyright Brian Williams

9 copyright Brian Williams
Unit Propagation true false t r q C2: ¬ p ¬ t true C1 : ¬r  q p p procedure propagate(C) // C is a clause if all literals in C are false except l, and l is unassigned then assign true to l and record C as a support for l and for each clause C’ mentioning “not l”, propagate(C’) end propagate 9/20/2000 copyright Brian Williams

10 copyright Brian Williams
Unit Propagation true false t r q C2: ¬ p ¬ t true C1 : ¬r  q p p procedure propagate(C) // C is a clause if all literals in C are false except l, and l is unassigned then assign true to l and record C as a support for l and for each clause C’ mentioning “not l”, propagate(C’) end propagate 9/20/2000 copyright Brian Williams

11 copyright Brian Williams
Unit Propagation true false t r q C2: ¬ p ¬ t true C1 : ¬r  q p p procedure propagate(C) // C is a clause if all literals in C are false except l, and l is unassigned then assign true to l and record C as a support for l and for each clause C’ mentioning “not l”, propagate(C’) end propagate 9/20/2000 copyright Brian Williams

12 copyright Brian Williams
Unit Propagation true false false t r q C2: ¬ p ¬ t true C1 : ¬r  q p p procedure propagate(C) // C is a clause if all literals in C are false except l, and l is unassigned then assign true to l and record C as a support for l and for each clause C’ mentioning “not l”, propagate(C’) end propagate 9/20/2000 copyright Brian Williams

13 copyright Brian Williams
DPLL Example Example: C1: Not A or B C2: Not C or A C3: Not B or C A Propagate: C = F B = F A = F Propagate: B = T C = T A = T F T 9/20/2000 copyright Brian Williams

14 DPLL Procedure [Davis, Putnam Logmann, Loveland, 1962]
DPLL(phi,A) Input: A cnf theory phi, an assignment A to propositions in phi Output: A decision of whether phi is satisfiable. 1. propagate(phi); 2. If a clause is violated return(false); 3. Else if all propositions are assigned return(true); 4. Else Q = some unassigned proposition in phi; 6. Return (DPLL(phi, A[Q = True]) or DPLL(phi, A[Q = False]) 9/20/2000 copyright Brian Williams

15 copyright Brian Williams
Outline Motivation: Fast Mode Estimation and Reconfiguration Review of unit propagation Incremental unit propagation as truth maintenance LTMS ITMS 9/20/2000 copyright Brian Williams

16 copyright Brian Williams
Satisfiability with Incremental Unit Propagation (aka Truth Maintenance) When adding an assignment incrementally introduce additional unit propagations (already done for DPLL) When removing an assignment (backtracking), only remove propagations of that assignment. 9/20/2000 copyright Brian Williams

17 Propagating Incrementally: Adding Clause C1
true false false t r q C2: ¬ p ¬ t true C1 : ¬r  q p p procedure propagate(C) // C is a clause if all literals in C are false except l, and l is unassigned then assign true to l and record C as a support for l and for each clause C’ mentioning “not l”, propagate(C’) end propagate 9/20/2000 copyright Brian Williams

18 Undoing Propagation Incrementally: Deleting Clause D
q true s C: ¬ p ¬ t D: ¬r q p p A: ¬ s ¬ p procedure unsupport(D) // D is a clause if D supports some proposition p then delete p’s support and truth assignment; for each support C containing p // Delete consequences unsupport(C); for each clause A containing p // Resupport p then propagate(A); end unsupport 9/20/2000 copyright Brian Williams

19 Undoing Propagation Incrementally: Deleting Clause D
q true s C: ¬ p ¬ t D: ¬r q p p A: ¬ s ¬ p procedure unsupport(D) // D is a clause if D supports some proposition p then delete p’s support and truth assignment; for each support C containing p // Delete consequences unsupport(C); for each clause A containing p // Resupport p then propagate(A); end unsupport 9/20/2000 copyright Brian Williams

20 Undoing Propagation Incrementally: Deleting Clause D
q s C: ¬ p ¬ t D: ¬r q p p A: ¬ s ¬ p procedure unsupport(D) // D is a clause if D supports some proposition p then delete p’s support and truth assignment; for each support C containing p // Delete consequences unsupport(C); for each clause A containing p // Resupport p then propagate(A); end unsupport 9/20/2000 copyright Brian Williams

21 Undoing Propagation Incrementally: Deleting Clause D
q s C: ¬ p ¬ t D: ¬r q p p A: ¬ s ¬ p procedure unsupport(D) // D is a clause if D supports some proposition p then delete p’s support and truth assignment; for each support C containing p // Delete consequences unsupport(C); for each clause A containing p // Resupport p then propagate(A); end unsupport 9/20/2000 copyright Brian Williams

22 Undoing Propagation Incrementally: Deleting Clause D
q s C: ¬ p ¬ t D: ¬r q p p A: ¬ s ¬ p procedure unsupport(D) // D is a clause if D supports some proposition p then delete p’s support and truth assignment; for each support C containing p // Delete consequences unsupport(C); for each clause A containing p // Resupport p then propagate(A); end unsupport 9/20/2000 copyright Brian Williams

23 Undoing Propagation Incrementally: Deleting Clause D
q s C: ¬ p ¬ t D: ¬r q p p A: ¬ s ¬ p procedure unsupport(D) // D is a clause if D supports some proposition p then delete p’s support and truth assignment; for each support C containing p // Delete consequences unsupport(C); for each clause A containing p // Resupport p then propagate(A); end unsupport 9/20/2000 copyright Brian Williams

24 Undoing Propagation Incrementally: Deleting Clause D
q true s C: ¬ p ¬ t D: ¬r q p p A: ¬ s ¬ p procedure unsupport(D) // D is a clause if D supports some proposition p then delete p’s support and truth assignment; for each support C containing p // Delete consequences unsupport(C); for each clause A containing p // Resupport p then propagate(A); end unsupport 9/20/2000 copyright Brian Williams

25 copyright Brian Williams
Cassini Performance Number of components: 80 Number of clauses: 11101 no TMS TMS 9/20/2000 copyright Brian Williams

26 Unit Propagation in Real-Time: LTMS
Significant, unnecessary re-labeling during each switch Outliers dominate ability to react. 9/20/2000 copyright Brian Williams

27 Unit Propagation in Real-Time: LTMS
Significant, unnecessary re-labeling during each switch Outliers dominate ability to react. 9/20/2000 copyright Brian Williams

28 Example: DS-1 Bus Communication
PDE SRU PDU GDE PASM DSEU PEPE Commands BC 1553 bus Flight Computer Data Clauses that describe the bus controller (bc): C1: ¬ nci ¬ a  nco C2: ¬ ia  nco C3: ¬ ok  a C4: ¬ rf ia C5: ¬ uf  ia C6: ¬ ok ¬ rf C7: ¬ ok ¬ uf C8: ¬ rf  ¬ uf C9: ¬ a ¬ ia BC health: ok, rf, uf No input cmd: nci BC activity: a, ia No output cmd: nco 9/20/2000 copyright Brian Williams

29 LTMS’ Conservative Re-Support Strategy
Delete C10 then add C11 C7: ¬ ok ¬ pf nci C1: ¬ nci ¬ a  nco pf a C10: ok C3: ¬ ok  a C9: ¬ a ¬ ia ok ia nco Performing Unit Propagation Also show one step example C8: ¬ rf  ¬ pf C6: ¬ ok ¬ rf rf ~ 300 C4: ¬ rf ia C2: ¬ ia  nco 9/20/2000 copyright Brian Williams Support has ~ 300 consequences

30 LTMS’ Conservative Re-Support Strategy
Delete C10 then add C11 C7: ¬ ok ¬ pf nci C1: ¬ nci ¬ a  nco pf a C3: ¬ ok  a C9: ¬ a ¬ ia ok ia nco Performing Unit Propagation Also show one step example C8: ¬ rf  ¬ pf C6: ¬ ok ¬ rf rf ~ 300 C4: ¬ rf ia C2: ¬ ia  nco 9/20/2000 copyright Brian Williams Trace support and delete ~ 300 consequences

31 LTMS’ Conservative Re-Support Strategy
Delete C10 then add C11 C7: ¬ ok ¬ pf nci C1: ¬ nci ¬ a  nco pf a C3: ¬ ok  a C9: ¬ a ¬ ia ok ia nco Performing Unit Propagation Also show one step example C8: ¬ rf  ¬ pf C6: ¬ ok ¬ rf rf ~ 300 C4: ¬ rf ia C2: ¬ ia  nco 9/20/2000 copyright Brian Williams Trace support and delete ~ 300 consequences

32 LTMS’ Conservative Re-Support Strategy
Delete C10 then add C11 C7: ¬ ok ¬ pf nci C1: ¬ nci ¬ a  nco pf a C3: ¬ ok  a C9: ¬ a ¬ ia ok ia nco Performing Unit Propagation Also show one step example C8: ¬ rf  ¬ pf C6: ¬ ok ¬ rf rf ~ 300 C4: ¬ rf ia C2: ¬ ia  nco 9/20/2000 copyright Brian Williams Trace support and delete ~ 300 consequences

33 LTMS’ Conservative Re-Support Strategy
Delete C10 then add C11 C7: ¬ ok ¬ pf nci C1: ¬ nci ¬ a  nco pf a C3: ¬ ok  a C9: ¬ a ¬ ia ok ia nco Performing Unit Propagation Also show one step example C8: ¬ rf  ¬ pf C6: ¬ ok ¬ rf rf ~ 300 C4: ¬ rf ia C2: ¬ ia  nco 9/20/2000 copyright Brian Williams Trace support and delete ~ 300 consequences

34 LTMS’ Conservative Re-Support Strategy
Delete C10 then add C11 C7: ¬ ok ¬ pf nci C1: ¬ nci ¬ a  nco pf a C3: ¬ ok  a C9: ¬ a ¬ ia ok ia nco Performing Unit Propagation Also show one step example C8: ¬ rf  ¬ pf C6: ¬ ok ¬ rf rf C4: ¬ rf ia C2: ¬ ia  nco 9/20/2000 copyright Brian Williams Trace support and delete ~ 300 consequences

35 LTMS’ Conservative Re-Support Strategy
Delete C10 then add C11 C7: ¬ ok ¬ pf nci C1: ¬ nci ¬ a  nco pf a C3: ¬ ok  a C9: ¬ a ¬ ia ok ia nco Problem 2: Blocking by logical inconsistency Solution *** C8: ¬ rf  ¬ pf C6: ¬ ok ¬ rf rf C4: ¬ rf ia C2: ¬ ia  nco C11: rf 9/20/2000 copyright Brian Williams Add C11 and propagate consequences, ...

36 LTMS’ Conservative Re-Support Strategy
Delete C10 then add C11 C7: ¬ ok ¬ pf nci C1: ¬ nci ¬ a  nco pf a C3: ¬ ok  a C9: ¬ a ¬ ia ok ia nco Problem 2: Blocking by logical inconsistency Solution *** C8: ¬ rf  ¬ pf C6: ¬ ok ¬ rf rf C4: ¬ rf ia C2: ¬ ia  nco C11: rf 9/20/2000 copyright Brian Williams Add C11 and propagate consequences, ...

37 LTMS’ Conservative Re-Support Strategy
Delete C10 then add C11 C7: ¬ ok ¬ pf nci C1: ¬ nci ¬ a  nco pf a C3: ¬ ok  a C9: ¬ a ¬ ia ok ia nco Problem 2: Blocking by logical inconsistency Solution *** C8: ¬ rf  ¬ pf C6: ¬ ok ¬ rf rf C4: ¬ rf ia C2: ¬ ia  nco C11: rf 9/20/2000 copyright Brian Williams Add C11 and propagate consequences, ...

38 LTMS’ Conservative Re-Support Strategy
Delete C10 then add C11 C7: ¬ ok ¬ pf nci C1: ¬ nci ¬ a  nco pf a C3: ¬ ok  a C9: ¬ a ¬ ia ok ia nco Problem 2: Blocking by logical inconsistency Solution *** C8: ¬ rf  ¬ pf C6: ¬ ok ¬ rf Resup ~300 rf C4: ¬ rf ia C2: ¬ ia  nco C11: rf 9/20/2000 copyright Brian Williams Add C11 and propagate consequences, ~300 unchanged.

39 copyright Brian Williams
Outline Motivation: Fast Mode Estimation and Reconfiguration Review of unit propagation Incremental unit propagation as truth maintenance LTMS ITMS – a repair-based approach 9/20/2000 copyright Brian Williams

40 ITMS: Re-Support via Local Cycle Detection
To Avoid Cycles, Avoid Back Edges Number literals by depth of support. Back edges point to lower numbers. 4 C1: ¬ nci ¬ a  nco nci a 2 C3: ¬ ok  a C10: ok Performing Unit Propagation Also show one step example 5 ok 1 ia 3 nco 2 Sup ~300 rf 9/20/2000 C11: rf copyright Brian Williams C4: ¬ rf ia C2: ¬ ia  nco

41 ITMS: Re-Support via Local Cycle Detection
Number literals by depth of support. Back edges point to lower numbers. 4 C1: ¬ nci ¬ a  nco nci a 2 C3: ¬ ok  a C10: ok Performing Unit Propagation Also show one step example 5 ok 1 ia 3 nco 2 Sup ~300 rf 9/20/2000 C11: rf copyright Brian Williams C4: ¬ rf ia C2: ¬ ia  nco

42 copyright Brian Williams
Add Before Delete nci C1: ¬ nci ¬ a  nco a C10: ok C3: ¬ ok  a C9: ¬ a ¬ ia Performing Unit Propagation Also show one step example ok ia nco C6: ¬ ok ¬ rf ~300 literals rf 9/20/2000 C11: rf copyright Brian Williams C4: ¬ rf ia C2: ¬ ia  nco

43 Add Before Delete -> Propagation blocked
nci C1: ¬ nci ¬ a  nco a C10: ok C3: ¬ ok  a C9: ¬ a ¬ ia Performing Unit Propagation Also show one step example ok ia nco C6: ¬ ok ¬ rf ~300 literals rf 9/20/2000 C11: rf copyright Brian Williams C4: ¬ rf ia C2: ¬ ia  nco

44 Idea: Roll back Consequences of C10 Just Enough to Let C11 Through
nci C1: ¬ nci ¬ a  nco a C10: ok C3: ¬ ok  a C9: ¬ a ¬ ia ok ia nco Performing Unit Propagation Also show one step example C6: ¬ ok ¬ rf ~300 literals rf C4: ¬ rf ia C2: ¬ ia  nco C11: rf 9/20/2000 copyright Brian Williams

45 Idea: Roll back Consequences of C10 Just Enough to Let C11 Through
nci C1: ¬ nci ¬ a  nco a C10: ok C3: ¬ ok  a C9: ¬ a ¬ ia ok ia nco Performing Unit Propagation Also show one step example C6: ¬ ok ¬ rf ~300 literals rf C4: ¬ rf ia C2: ¬ ia  nco C11: rf 9/20/2000 copyright Brian Williams

46 Idea: Roll back Consequences of C10 Just Enough to Let C11 Through
nci C1: ¬ nci ¬ a  nco a C10: ok C3: ¬ ok  a C9: ¬ a ¬ ia ok ia nco Performing Unit Propagation Also show one step example C6: ¬ ok ¬ rf ~300 literals rf C4: ¬ rf ia C2: ¬ ia  nco C11: rf 9/20/2000 copyright Brian Williams

47 ITMS: Roll Back by Repairing Conflicts
Flip rf in conflict C11 C7: ¬ ok ¬ pf nci C1: ¬ nci ¬ a  nco 4 pf 2 a 2 C10: ok C3: ¬ ok  a C9: ¬ a ¬ ia ok 1 ia 5 nco 3 C8: ¬ rf  ¬ pf C6: ¬ ok ¬ rf rf C11: rf C2: ¬ ia  nco 2 C4: ¬ rf ia 9/20/2000 copyright Brian Williams

48 ITMS: Roll Back by Repairing Conflicts
Flip ia in conflict C4 C7: ¬ ok ¬ pf nci C1: ¬ nci ¬ a  nco 4 pf 2 a 2 C10: ok C3: ¬ ok  a C9: ¬ a ¬ ia ok 1 ia 5 nco 3 C8: ¬ rf  ¬ pf C6: ¬ ok ¬ rf rf C11: rf C2: ¬ ia  nco 1 C4: ¬ rf ia 9/20/2000 copyright Brian Williams

49 ITMS: Roll Back by Repairing Conflicts
Ready to resupport nco Flip ok in conflict C6 C7: ¬ ok ¬ pf nci C1: ¬ nci ¬ a  nco 4 pf 2 a 2 C10: ok C3: ¬ ok  a C9: ¬ a ¬ ia ok 1 ia 5 nco 2 C8: ¬ rf  ¬ pf C6: ¬ ok ¬ rf rf C11: rf C2: ¬ ia  nco 1 C4: ¬ rf ia 9/20/2000 copyright Brian Williams

50 ITMS: Roll Back by Repairing Conflicts
Remove consequences of ok trying local resupport C7: ¬ ok ¬ pf nci C1: ¬ nci ¬ a  nco 4 pf 2 a 2 C10: ok C3: ¬ ok  a C9: ¬ a ¬ ia ok 1 ia 5 nco 2 C8: ¬ rf  ¬ pf C6: ¬ ok ¬ rf rf C11: rf C2: ¬ ia  nco 1 C4: ¬ rf ia 9/20/2000 copyright Brian Williams

51 ITMS: Roll Back by Repairing Conflicts
Propagate consequences of ok C7: ¬ ok ¬ pf nci C1: ¬ nci ¬ a  nco 4 pf a C10: ok C3: ¬ ok  a C9: ¬ a ¬ ia ok 1 ia 5 nco 2 C8: ¬ rf  ¬ pf C6: ¬ ok ¬ rf rf C11: rf C2: ¬ ia  nco 1 C4: ¬ rf ia 9/20/2000 copyright Brian Williams

52 ITMS: Roll Back by Repairing Conflicts
Finally delete C10 C7: ¬ ok ¬ pf nci C1: ¬ nci ¬ a  nco 4 pf 2 a 2 C10: ok C3: ¬ ok  a C9: ¬ a ¬ ia ok 1 ia 5 nco 2 C8: ¬ rf  ¬ pf C6: ¬ ok ¬ rf rf C11: rf C2: ¬ ia  nco 2 C4: ¬ rf ia 9/20/2000 copyright Brian Williams

53 ITMS significantly decreases extra label changes
9/20/2000 copyright Brian Williams

54 Comparing the ITMS to the LTMS
9/20/2000 copyright Brian Williams


Download ppt "Fast SAT through Incremental Unit Propagation"

Similar presentations


Ads by Google