370 likes | 522 Vues
TCC, With History. Radha Jagadeesan (WITH Vineet Gupta and Vijay Saraswat ). TCC, With History. A subjective TOUR of ONE line of joint research with Prakash. Ingredients that build up to the paper in proceedings Paper in proceedings is better referenced than this talk. Reminiscing ….
E N D
TCC, With History Radha Jagadeesan (WITH Vineet Gupta and Vijay Saraswat)
TCC, With History A subjective TOUR of ONE line of joint research with Prakash. Ingredients that build up to the paper in proceedings Paper in proceedings is better referenced than this talk
Reminiscing … • Joined Cornell for Ph. D in Fall 1987. • My first research project with Prakash: 1988 Summer • Stone Duality lectures by Prakash and Dexter [Spring 88 , Fall 88, Spring 89??]Don’t let the perpetually cheerful mien of these two gentlemen fool you!
Id [Arvind, Nikhil, Pingali, ~80s] “Copy problem” x[3] = … often results in a copy of array x • Updatable shared memory • Aims to be deterministic: • so, monotone shared memory via • logic variables x X[0]=2 x[1]=4 X[2]=array[5]
Id [Arvind, Nikhil, Pingali, ~80s] x Write write conflicts: solved by unification X[0]=2 x[1]=4 X[2]=array[5] Read write conflicts: solved by blocking reads
Id [Arvind, Nikhil, Pingali, ~80s] x Read write conflicts: solved by blocking reads x = array(2*n), x[0] =1 for (i=1; i<n; i++) { x[2*i ] = 2*x[2*i-1] for (i=0; i<n; i++) { x[2*i+1] = 2*x[2*i]
Programs as constraints x x = array(2*n), x[0] = 1 for (i=1; i<n; i++) { x[2*i ] = 2*x[2*i-1] for (i=0; i<n; i++) { x[2*i+1] = 2*x[2*i]
Pingali: Constraints as closure operators Store of logic variables: lattice, ordered by information order. Top element = false … Programs = extensive, idempotent operators on store Composition = least upper bound of closure operators [f || g] (x) = LUB { x , f(x), g(f(x)), f(g(f(x)))….. x x = array(2*n), x[0] = 1 for (i=1; i<n; i++) { x[2*i ] = 2*x[2*i-1] for (i=0; i<n; i++) { x[2*i+1] = 2*x[2*i]
Closure operators via fixed points x Closure operator f determined by the set of fixed points FIX(f)FIX(f||g) : set intersection of FIX(f), FIX(g) x = array(2*n), x[0] = 1 for (i=1; i<n; i++) { x[2*i ] = 2*x[2*i-1] for (i=0; i<n; i++) { x[2*i+1] = 2*x[2*i]
Aside: Expressions. Input/Output Symmetry array Interpret a function Array() Array() as a closure operator on [ Store x Array1 x Array2]Array1, Array2: Copies of Domain of arrays Store: Binding of variables to values (perhaps arrays) All ordered by information ordering array array array
Research into (concurrent) constraint programming • Generalizing shared store. • Weakening monotonicity • Adding time
Shared Store == Constraint system • [Lassez, Maher][Panangaden, Saraswat, Scott, Seely] Conjunction Existentials A database of logical facts. Eg. HERBRANDT, RATIONAL TREES, SET CONSTRAINTS
Concurrent constraint programming • [Saraswat][Panangaden, Rinard, Saraswat][Palamidessi, de Boer, …] • [TELL] a: add c to store [ASK] if a then A: [blocking] query for a • [PARALLEL]: A || B
Program execution as proof search • [Lincoln, Saraswat] c A: implication A || B: conjunction
Aside: Uniform proofs • [Miller, Nadathur,Loveland…] • An INTUITIONIST proof in which any sequent whose succeedent contains a non-atomic formula occurs only as the result of an inference rule that introduces the top level logical symbol of that formula, eg.
Clark, Shapiro, Ueda Kowalski, Colmerauer,… Jaffar, Lassez, Maher Maher, Saraswat Miller, Nadathur Saraswat, Lincoln Leach, Nieva, Rodriguez-Artalejo V. Saraswat (Some) Logic Programming Languages 1977-2005 Saraswat, Nadathur, Jagadeesan
The “Histogram” problem [PINGALI] Given: A[1..n] taking values in 1..mCompute IN PARALLEL : B[1..m] such that B[j] = {i | A[i] = j}
Default CC • [TELL] a: • [ASK] if a then A[PARALLEL]: A || B[DEFAULT] if a else A
Default CC: flavors of indeterminacy • if a ELSE a NO SOLUTIONSif a ELSE b, if b ELSE a TWO SOLUTION
Default CC • [TELL] a: • [ASK] if a then A[PARALLEL]: A || B • [DEFAULT] if a else A
Logic: Reiter’s default logic Proof search interpretation of default cc not explored. Ma: if a else a
Model Store is reborn at each instant At each instant: synchronyRun program to quiescence to get current store and a continutation for the future P0 P1 P2 P3
Payoff: an analysis of synchronous programming [Berry, Benveniste] • The multiform nature of time . ``Any signal can serve as a notion of time’’ • TIME A ON a: A runs only at those instants when store entails “a”
Payoff: an analysis of synchronous programming [Berry, Benveniste] • The multiform nature of time . ``Any signal can serve as a notion of time’’ • do A watching a: A runs only at those instants when store entails “a”
Payoff: an analysis of synchronous programming [Berry, Benveniste] • The multiform nature of time . ``Any signal can serve as a notion of time’’ • suspend A on a activate b: A runs only at those instants when store entails “a”
Payoff: an analysis of synchronous programming • Causality issues in synchronous programming ==== Determinacy issues of default logic
TCC for complex event processing Paper in proceeding
Examples • Declare the sensor as faulty if no reading has been received for 500ms • Every tenth time the price drops within an hour emit volatility warning. Sea of asynchronous events, correlate different event streams, detect absence of events permit aggregations over sliding windows, specify dependent sliding windows
Liberating programmer from forward-looking and event-driven rules • Maintaining the past information. [Nielsen, Palamidessi, Valencia] • Moving “back-and-forth” in the past • ``Order a review if the last time that IBM stock price dropped by $10 in a day, there was more than $20 increase in trading volume for Oracle the following day." • “If the merchant has been tenured less than 90 days, and the sum of the transactions in the last 7 days is much higher than the 7 day average for the last 90 days, then investigate a 7 day hit and run possibility.”
THE PAPER • An operational semantics • Conservativity over Timed CC