290 likes | 379 Views
Transaction Ordering Verification using Trace Inclusion Refinement. Mike Jones 11 January 2000. Case Study. Check the producer consumer property for PCI 2.1 protocol. Which formal methods are best suited for reasoning about large protocols over unbounded branching networks?
E N D
Transaction Ordering Verification using Trace Inclusion Refinement Mike Jones 11 January 2000
Case Study • Check the producer consumer property for PCI 2.1 protocol. • Which formal methods are best suited for reasoning about large protocols over unbounded branching networks? • Resulting tools apply to designing, not implementing, a protocol over unbounded branching networks.
Formal methods (in 1 slide) • Formal = truth is based on form, not meaning. • Syntax, not semantics, matters. • Theorem proving • expressive, interactive, machine-checked • Model checking • unexpressive, automatic, complexity • Hybrid techniques • Intel, HP, Compaq, Microsoft, AMD, SRI, Lucent, VSIA ...
Why PCI? • It works. Why verify it? • Published standard violated prod/cons. • Stationary target. • Beyond current formal techniques.
... p d ... c f Producer/Consumer for PCI ...for all networks and all executions.
Solution • Carefully reduce the problem • Check the reduced problem • Generalize results
Related work • Other PCI work. • liveness [Corella,97] • state machine specifications [Clarke,99] • U of Utah [Mokkedem et al,00] • Unbounded branching networks. • predicate transformers[Kesten,97] • predicate abstraction[Das,99] • Combined method [Abdulla,99]
Careful reduction • Reduce arbitrary PCI networks to N networks. • Reduce infinite state to finite states. • Show that PCI is a trace inclusion refinement of the reduced protocol.
Structural Reduction p d p d p c f f f c c d
Unrelated paths and agents ... p d ... c f p d f c
State reduction • PCI networks have an infinite # of states. • Ignore certain transactions while preserving the PC property.
Unrelated Transactions dwc p c dwc d dw d’ d p fw ... p d p p p c cdw dwc dw fw p cdw
Trace Inclusion Refinement For every trace in the concrete protocol.
Trace Inclusion Refinement For every trace in the concrete protocol. There exists a trace in the reduced protocol...
Trace Inclusion Refinement For every trace in the concrete protocol. There exists a trace in the reduced protocol... Such that the reduction of each concrete state is equal to the corresponding abstract state.
...Applied to PCI • Write a set of rules inductively defining the reachable states in PCI and reduced model.
Check reduced model • Used SML and murphi model checker. • Rules based input languages • 3,176 states checked in 67 seconds. • Property was satisfied.
Changing the model • A different protocol • PCI without local master IDs • About 1/2 a day of effort • Plausible violation found in under 10 minutes • A different property • When are two transactions received in order? • Useful for an on-chip bus being considered for SOC • 1/2 an hour additional effort
Conclusions • A combination of rule-based notation, theorem proving and model checking works. • Easy to modify both the protocol and the property being checked.
Future work • Automate the refinement proof. • Tools for deriving reduced protocols for mutations of protocols. • Anyone have a protocol over an unbounded network they need studied?
Outline • Lay the groundwork • Overview PCI and the property • Our solution • What makes our solution so good • Discussion and conclusions
Why Formal Methods? • simulation impossible: infinite states. • Does not guaruntee correctness. • Forced to identify assumptions. • Capitol critical applications.
Structural Reduction • Reduce any instance of PC to one of 3 abstract instances. • Allows us to get complete structural coverage by checking 3 networks. • Supported by a machine-checked proof. p d p d p c f f f c c d
Producer/Consumer for PCI • Producer writes a data value and sets a flag. • Consumer reads the flag then reads the data • Assuming • no intervening writes • flag gets written before it gets read • Then the consumer gets the new data value. • Check this for ALL executions in ALL networks
What makes this problem hard • All networks and all executions. • Reasoning about PCI networks in general, using induction, is hard. • Reasoning about individual PCI networks equals inefficient simulation.