260 likes | 422 Views
PTR: A Probabilistic Transaction Logic. A logic for reasoning about action under uncertainty. A mathematically sound foundation for building software that requires such reasoning. Julian Fogel. Applications. Uncertainty in workflow Unreliable circuits AI planning Game theory.
E N D
PTR:A Probabilistic Transaction Logic A logic for reasoning about action under uncertainty. A mathematically sound foundation for building software that requires such reasoning Julian Fogel
Applications • Uncertainty in workflow • Unreliable circuits • AI planning • Game theory
Logic = Syntax + Semantics + Reasoning • Syntax: a formal language – just meaningless symbols • Semantics: giving meaning to symbols – truth in a structure ⊧ • Reasoning: what else is true given what is known – logical implication⇒, entailment ⊦
Semantics • Possible worlds, initial state • Actions and transactions, paths • Path distribution
Possible Worlds Example One propositional variable H, which is true when the coin is heads. H H Two possible worlds: H and H. H: the coin is not heads in this state (it’s tails) H: the coin is heads in this state Coin is hidden, and even chance of it being heads or tails: PW assigns probability 0.5 to each state. PW(H) = 0.5and PW(H) = 0.5. 0.5 H 0.5 H
Possible Worlds Definitions • Propositional symbols:Each symbol can be either True or False • State: a particular assignment of True or False to the propositional symbols • PW: A probability distribution over states [Fagin and Halpern 90]
Path Example One atomic action symbol F: flip a fair coin 0.5 H H 0.5 H H 0.5 0.5 H H H H PA(F,H) PA(F,H) One transaction symbol F2: flip a fair coin twice 0.25 H H H 0.25 H H H 0.25 0.25 H H H H H H 0.25 0.25 H H H H H H 0.25 0.25 H H H H H H PT(F2,H) PT(F2,H)
Path Definitions • Atomic action symbols:trigger transitions between two states • Transaction symbols: allows intermediate states [Bonner and Kifer 94] • Path: sequence of states (W1,…,Wn) • PA and PT: probability distributions over paths
Path Distribution Example 0.125 H H H Given Pw, PA, and PT as in the previous examples, the path distribution P shown here makes the transaction formula F2 true. 0.125 H H H 0.125 H H H 0.125 H H H 0.125 H H H 0.125 H H H 0.125 H H H 0.125 H H H
Path Distribution: The Heart of PTR • Given the initial probabilistic knowledge about the world encoded in Pw, PA, and PT, aPTR formulaistrueorfalse(succeeds or fails)on a path distribution P. • If a formula succeeds on a path distribution, then it executes along one of the paths that have non-zero probability.
Formulas • Probabilistic state formula: Pr(Q) c where Q is an ordinary propositional formula • Transaction Formula: • Atomic action or transaction symbol • Serial conjunction f • Disjunction f • Negation f • Pre/postcondition []-f-[] where and are probabilistic state formulas
Pre/postcondition Example SomeSuccessfulTransactions F2 [Pr(H)=0.25]-F2-[Pr(H)=0.5] [Pr(H)0.7]-F2 F2-[Pr(HH)1.0] 0.0625 H H H 0.0625 H H H 0.0625 H H H 0.0625 H H H Some Failed Transactions [Pr(H)=0.25]-F2-[Pr(H)=0.55] [Pr(H)0.8]-F2 [Pr((HH))>0]-F2 F2-[Pr((HH))<0] 0.1875 H H H 0.1875 H H H 0.1875 H H H 0.1875 H H H
Pre/postcondition []-f-[] • Precondition: constrains the distribution of the initial state of a transaction, describes what must be known before f can execute • Postcondition: constrains the distribution of the final state of a transaction, describes something known to be true after the transaction f executes
Serial Conjunction Example 0.125 H H H H 0.125 H H H H Assume that PW(H) = 1. The path distribution P tothe left makes transaction formula (F2 F) true. 0.125 H H H H 0.125 H H H H 0.125 H H H H 0.125 H H H H 0.125 H H H H 0.125 H H H H
Serial Conjunction f • First execute f followed by • Both conjuncts need to succeed • Probabilities along paths are combined like a cross-product, then normalized
Disjunction f • Executeone off or nondeterministically • Succeeds if either disjunct succeeds • Useful in defining other connectives such as conditional and biconditional • Not parallel execution
Negation • f • Succeeds on any path distribution on which f fails • Mainly useful in defining other connectives, or in conjunction with them
A Small Example A B Actions: OA, OB, MC Propositions: a, b, mc Transaction: MIX K={MIXOA(OBMC)} Query: MIX-[Pr(mc)0.8] C
PA(OA), PA(OB), PW PW(MAB) = 1
PT(MIX) 0.989 0.989 0.85 , , , 0.989 0.989 0.15 , , , 0.989 0.011 1 , , , 0.011 0.989 1 , , , 0.011 0.011 1 , , , We can verify that for any path distribution P, S and P make MIXOA(OBMC) true, and that if P is set to PT(MIX) then S and P make MIX-[Pr(mc)0.8] true.
Proposed Directions • Adding observations to the logic • Proof theory • Allowing concurrent transactions • PTR logic programming • Investigating applications • Comparison with other probabilistic logics