tcc, with history radha jagadeesan (with vineet gupta and vijay saraswat)

37
TCC, With History RADHA JAGADEESAN (WITH VINEET GUPTA AND VIJAY SARASWAT)

Upload: sherilyn-brianna-barber

Post on 12-Jan-2016

223 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: TCC, With History RADHA JAGADEESAN (WITH VINEET GUPTA AND VIJAY SARASWAT)

TCC, With HistoryRADHA JAGADEESAN

(WITH VINEET GUPTA AND VIJAY SARASWAT)

Page 2: TCC, With History RADHA JAGADEESAN (WITH VINEET GUPTA AND VIJAY SARASWAT)

TCC, With HistoryA 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

Page 3: TCC, With History RADHA JAGADEESAN (WITH VINEET GUPTA AND VIJAY SARASWAT)

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!

Page 4: TCC, With History RADHA JAGADEESAN (WITH VINEET GUPTA AND VIJAY SARASWAT)

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[2]=array[5] x[1]=4X[0]=2

Page 5: TCC, With History RADHA JAGADEESAN (WITH VINEET GUPTA AND VIJAY SARASWAT)

Id [Arvind, Nikhil, Pingali, ~80s]

x

X[2]=array[5] x[1]=4X[0]=2

Write write conflicts: solved by unification

Read write conflicts: solved by blocking reads

Page 6: TCC, With History RADHA JAGADEESAN (WITH VINEET GUPTA AND VIJAY SARASWAT)

Id [Arvind, Nikhil, Pingali, ~80s]

xRead 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]

Page 7: TCC, With History RADHA JAGADEESAN (WITH VINEET GUPTA AND VIJAY SARASWAT)

Programs as constraints

xx = array(2*n), x[0] = 1for (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]

Page 8: TCC, With History RADHA JAGADEESAN (WITH VINEET GUPTA AND VIJAY SARASWAT)

Pingali: Constraints as closure operators

x

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 = array(2*n), x[0] = 1for (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]

Page 9: TCC, With History RADHA JAGADEESAN (WITH VINEET GUPTA AND VIJAY SARASWAT)

Closure operators via fixed points

xClosure 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] = 1for (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]

Page 10: TCC, With History RADHA JAGADEESAN (WITH VINEET GUPTA AND VIJAY SARASWAT)

Aside: Expressions. Input/Output Symmetry

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 array

Page 11: TCC, With History RADHA JAGADEESAN (WITH VINEET GUPTA AND VIJAY SARASWAT)

Research into (concurrent) constraint programming Generalizing shared store.

Weakening monotonicity

Adding time

Page 12: TCC, With History RADHA JAGADEESAN (WITH VINEET GUPTA AND VIJAY SARASWAT)

Shared Store == Constraint system

[Lassez, Maher][Panangaden, Saraswat, Scott, Seely]

Conjunction

Existentials

A database of logical facts.

Eg. HERBRANDT, RATIONAL TREES, SET CONSTRAINTS

Page 13: TCC, With History RADHA JAGADEESAN (WITH VINEET GUPTA AND VIJAY SARASWAT)

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

Page 14: TCC, With History RADHA JAGADEESAN (WITH VINEET GUPTA AND VIJAY SARASWAT)

Program execution as proof search

[Lincoln, Saraswat]

c A: implication

A || B: conjunction

Page 15: TCC, With History RADHA JAGADEESAN (WITH VINEET GUPTA AND VIJAY SARASWAT)

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.

Page 16: TCC, With History RADHA JAGADEESAN (WITH VINEET GUPTA AND VIJAY SARASWAT)

Horn Clauses

Page 17: TCC, With History RADHA JAGADEESAN (WITH VINEET GUPTA AND VIJAY SARASWAT)

Lambda Prolog

Page 18: TCC, With History RADHA JAGADEESAN (WITH VINEET GUPTA AND VIJAY SARASWAT)

18

BaseD ::= true | D and D G ::= true | G and G | G or G | exists X G

Recursive QueryD::= G-> A G::= AD::= forall X D

Constraint Query G::= c

eXtensible Query G::= D->G

Generic Query G::= forall X G

Recursive AgentD::= E | E -> D | t=tD::= forall X D

Tell AgentD::= c

Ask AgentD::= G-> D

LPConc LP

Conc LP w/ Tell

CCP

CLP

HH

HH CLP

Deep CCP

HH CCP

Deep CCP = CLP + CCPHH CLP = HH + CLPHH CCP = HH + CLP + CCP

1983 1977

1987 1987

19911991

2005 FSTTCS

2003

Kowalski, Colmerauer,…

Jaffar, Lassez, Maher

Miller, Nadathur

Clark,

Shapiro, Ueda

Maher, Saraswat

Saraswat, Lincoln

Leach, Nieva, Rodriguez-Artalejo

V. Saraswat

(Some) Logic Programming Languages 1977-2005 Saraswat, Nadathur, Jagadeesan

Page 19: TCC, With History RADHA JAGADEESAN (WITH VINEET GUPTA AND VIJAY SARASWAT)

Default Logic

Page 20: TCC, With History RADHA JAGADEESAN (WITH VINEET GUPTA AND VIJAY SARASWAT)

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}

Page 21: TCC, With History RADHA JAGADEESAN (WITH VINEET GUPTA AND VIJAY SARASWAT)

Default CC [TELL] a:

[ASK] if a then A

[PARALLEL]: A || B

[DEFAULT] if a else A

Page 22: TCC, With History RADHA JAGADEESAN (WITH VINEET GUPTA AND VIJAY SARASWAT)

Default CC: flavors of indeterminacy

if a ELSE a NO SOLUTIONS

if a ELSE b, if b ELSE a TWO SOLUTION

Page 23: TCC, With History RADHA JAGADEESAN (WITH VINEET GUPTA AND VIJAY SARASWAT)

Default CC [TELL] a:

[ASK] if a then A

[PARALLEL]: A || B

[DEFAULT] if a else A

Page 24: TCC, With History RADHA JAGADEESAN (WITH VINEET GUPTA AND VIJAY SARASWAT)

Logic: Reiter’s default logicProof search interpretation of default cc not explored.

Ma: if a else a

Page 25: TCC, With History RADHA JAGADEESAN (WITH VINEET GUPTA AND VIJAY SARASWAT)

Time!

Page 26: TCC, With History RADHA JAGADEESAN (WITH VINEET GUPTA AND VIJAY SARASWAT)

Model

P0

P1

P2

P3

Store is reborn at each instant

At each instant: synchrony

Run program to quiescence to get current store and a continutation for the future

Page 27: TCC, With History RADHA JAGADEESAN (WITH VINEET GUPTA AND VIJAY SARASWAT)

HENCE A = NEXT ( ALWAYS ( A))

Page 28: TCC, With History RADHA JAGADEESAN (WITH VINEET GUPTA AND VIJAY SARASWAT)

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”

Page 29: TCC, With History RADHA JAGADEESAN (WITH VINEET GUPTA AND VIJAY SARASWAT)

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”

Page 30: TCC, With History RADHA JAGADEESAN (WITH VINEET GUPTA AND VIJAY SARASWAT)

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”

Page 31: TCC, With History RADHA JAGADEESAN (WITH VINEET GUPTA AND VIJAY SARASWAT)

Payoff: an analysis of synchronous programming

Causality issues in synchronous programming ==== Determinacy issues of default logic

Page 32: TCC, With History RADHA JAGADEESAN (WITH VINEET GUPTA AND VIJAY SARASWAT)

TCC for complex event processingPAPER IN PROCEEDING

Page 33: TCC, With History RADHA JAGADEESAN (WITH VINEET GUPTA AND VIJAY SARASWAT)

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

Page 34: TCC, With History RADHA JAGADEESAN (WITH VINEET GUPTA AND VIJAY SARASWAT)

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.”

Page 35: TCC, With History RADHA JAGADEESAN (WITH VINEET GUPTA AND VIJAY SARASWAT)
Page 36: TCC, With History RADHA JAGADEESAN (WITH VINEET GUPTA AND VIJAY SARASWAT)

THE PAPER

An operational semantics

Conservativity over Timed CC

Page 37: TCC, With History RADHA JAGADEESAN (WITH VINEET GUPTA AND VIJAY SARASWAT)

QUESTIONS?