Making HCC Probabilistic safely Jonathan Moody CMU Aug
Making HCC Probabilistic (safely) Jonathan Moody CMU Aug. 16, 2001
Outline " What is HCC? " Modeling in HCC with Randomness " Semantics of Probabilistic Choice " Related Work " Conclusions
What is HCC? Hybrid Concurrent Constraint " " " Hybrid: modeling continuous change " Concurrent: declarative, no ordering of operations " Constraint: logical inference on (in)equalities Example
What is HCC?
What is HCC? " HCC constraint processing occurs in phases. time Point Interval Trace
Outline " What is HCC? " Modeling in HCC with Randomness " Semantics of Probabilistic Choice " Related Work " Conclusions
Randomness in HCC has a Foreign Function Interface (FFI) " Calls to a random number generator can be made. " " " x = gaussian(mean, sigma); But the meaning of some programs is not so clear.
Randomness in HCC has a Foreign Function Interface (FFI) " Calls to a random number generator can be made. " " " x = gaussian(mean, sigma); But the meaning of some programs is not so clear.
Modeling with Randomness What would we like to model? " " Component failures " Uncertain initial conditions " Time dependent noise " " x' = F(x) + noise(t); Two mechanisms formulated to represent these uses of randomness in a model.
Modeling with Randomness Random Choices " choose <var> from <expr>; " " choose b from coinflip(p. Fail); " choose x 0 from random(low, high); Random Processes " class Brownian. Process {. . . } defined in HCC; it chooses a new random value periodically. " " noise = new Brownian. Process(delta. T); " m * x'' = F(x) - (b * x') + noise. val();
Outline " What is HCC? " Modeling in HCC with Randomness " Semantics of Probabilistic Choice " Related Work " Conclusions
Probabilistic Choice Meaning and Implementation " choose <var> from <expr>; " " Intention is that <expr> will contain a call to a non-deterministic function. " After evaluation, behaves like <var> = <value>. " Strategy: Use existing FFI, but protect these expressions from unnecessary reevaluation. " The question: When to evaluate?
Probabilistic Choice " By "when", I mean "at what step in HCC's constraint propagation process". " As early as possible? no. " Any time? no. " " " HCC has no current estimate for variable. Value could depend on order of statements. As late as possible? no.
Probabilistic Choice When the variables in the expression are fully determined. " " " for intervals [a, b] this means a = b " other data types are either unknown or fully determined. Once variables are fully determined, their estimated values cannot change without triggering a conflict (which can be detected and dealt with).
Outline " What is HCC? " Modeling in HCC with Randomness " Semantics of Probabilistic Choice " Related Work " Conclusions
Related Work (PCC) " "choose" inspired by proposal for Probabilistic CC by Vineet Gupta, et al. " Different operational semantics based on evaluating a call to an external random number generator. " Accommodates continuous distributions without resorting to computing limit of recursive choices. " Other distributions (uniform, gaussian,
Related Work (SDE) " Stochastic Differential Equations " Analytical and numerical methods for solving SDE's are available. " Ideally, HCC's numerical integrator should be made aware of stochastic terms. " Modeling noise processes with an HCC object sidesteps implementation difficulties.
Related Work (FLP) " Functional Logic Programming " Simple syntactic unification is inadequate to unify: " 2+X=4 FLP adds reasoning about equality between functional expressions. " " Residuation (analogous to our strategy) " Narrowing (unfortunately not applicable)
Outline " What is HCC? " Modeling in HCC with Randomness " Semantics of Probabilistic Choice " Related Work " Conclusions
Conclusions Goals achieved " " HCC supports random choice and processes. " Other related improvements to HCC. . . Performance limitations " " There is overhead associated with modeling random processes inside of HCC.
Acknowledgements Benoit Hudson Adam Sweet Anupa Bajwa (mentor)
C <-> HCC Coupling Why work on the C <-> HCC interface? " " True that HCC is used primarily for simulation. Output is a trace file of model values over time. " But if it is ever to be used for control (or diagnosis), a better interface must be defined.
C <-> HCC Coupling " A tighter integration and more uniform interface. " HCC_tell, HCC_ask, HCC_eval " Primary achievement: " HCC_ask enables stopping at any conditional point in the simulation, whereupon the C program resumes execution.
C <-> HCC Coupling
- Slides: 24