From subexponentials in linear logic to concurrent constraint - - PowerPoint PPT Presentation

from subexponentials in linear logic to concurrent
SMART_READER_LITE
LIVE PREVIEW

From subexponentials in linear logic to concurrent constraint - - PowerPoint PPT Presentation

From subexponentials in linear logic to concurrent constraint programming and back Carlos Olarte Joint work with Elaine Pimentel and Vivek Nigam ECT, Universidade Federal do Rio Grande do Norte October 13, 2015 Workshop on Logic, Language and


slide-1
SLIDE 1

From subexponentials in linear logic to concurrent constraint programming and back

Carlos Olarte Joint work with Elaine Pimentel and Vivek Nigam

ECT, Universidade Federal do Rio Grande do Norte

October 13, 2015 Workshop on Logic, Language and Information

Carlos Olarte (UFRN) CCP& SELL WoLLI2015 1 / 29

slide-2
SLIDE 2

Motivation

Our objetive

Languages and reasoning techniques for the specification and verification

  • f concurrent systems where different modalities can be combined.

Potential target applications: Multimedia Interactive Systems Biochemical Systems Mobile systems, Social Networks, distributed systems. Spatial modalities: locations, places, devices, biochemical interaction domains.... Epistemic modalities: beliefs, opinions, facts, lies... Temporal modalities: System’s configuration evolves along time-units.

Carlos Olarte (UFRN) CCP& SELL WoLLI2015 2 / 29

slide-3
SLIDE 3

Motivation

Concurrent Constraint Programming (CCP)

A simple and powerful model of concurrency tied to logic: Systems are specified by constraints (i.e., formulas in logic) representing partial information on the variables of the system. Agents tell and ask constraints on a shared store of constraints.

Carlos Olarte (UFRN) CCP& SELL WoLLI2015 3 / 29

slide-4
SLIDE 4

Motivation

Concurrent Constraint Programming (CCP)

A simple and powerful model of concurrency tied to logic: Systems are specified by constraints (i.e., formulas in logic) representing partial information on the variables of the system. Agents tell and ask constraints on a shared store of constraints.

tell temperature > 42 ask temperature = 50 then P ask 0<temperature<100 then Q temperature=? tell temperature < 70

Carlos Olarte (UFRN) CCP& SELL WoLLI2015 3 / 29

slide-5
SLIDE 5

Motivation

Concurrent Constraint Programming (CCP)

A simple and powerful model of concurrency tied to logic: Systems are specified by constraints (i.e., formulas in logic) representing partial information on the variables of the system. Agents tell and ask constraints on a shared store of constraints.

ask temperature = 50 then P ask 0<temperature<100 then Q 42 <temperature<70

Carlos Olarte (UFRN) CCP& SELL WoLLI2015 3 / 29

slide-6
SLIDE 6

Motivation

Concurrent Constraint Programming (CCP)

A simple and powerful model of concurrency tied to logic: Systems are specified by constraints (i.e., formulas in logic) representing partial information on the variables of the system. Agents tell and ask constraints on a shared store of constraints.

ask temperature = 50 then P Q 42 <temperature<70

Remains Blocked

Carlos Olarte (UFRN) CCP& SELL WoLLI2015 3 / 29

slide-7
SLIDE 7

Motivation

CCP Calculi

CCP has been extended to deal with different application domains: tcc: Reactive and timed systems [SJG94]. pccp: Probabilistic choices [GJS97]. lccp: Linearity and resources [FRS01]. ntcc: Time, non-determinsim and asynchrony [NPV02]. cc-pi, utcc: Mobility [BM07, OV08]. soft-ccp : Soft constraints and preferences [BMR06]. eccp and sccp: Epistemic and Spatial reasoning [KPPV12].

Carlos Olarte (UFRN) CCP& SELL WoLLI2015 4 / 29

slide-8
SLIDE 8

Motivation

CCP Calculi

CCP has been extended to deal with different application domains: tcc: Reactive and timed systems [SJG94]. pccp: Probabilistic choices [GJS97]. lccp: Linearity and resources [FRS01]. ntcc: Time, non-determinsim and asynchrony [NPV02]. cc-pi, utcc: Mobility [BM07, OV08]. soft-ccp : Soft constraints and preferences [BMR06]. eccp and sccp: Epistemic and Spatial reasoning [KPPV12].

The idea

Reason about different CCP systems in one logical framework.

Carlos Olarte (UFRN) CCP& SELL WoLLI2015 4 / 29

slide-9
SLIDE 9

Motivation

Subexponentials in Linear Logic (SELL)

Linear logic: Formulas are seen as resources, e.g., c ⊗ c ⊢ c. Classical reasoning is recovered by the use of exponentials: !c ⊢ c ⊗ c

Subexponentials [DJS93]

Intuitively, !aF means “F holds in location a”. Such exponentials are not canonical: (in general) !ac ≡!bc if a = b

Carlos Olarte (UFRN) CCP& SELL WoLLI2015 5 / 29

slide-10
SLIDE 10

Motivation

Subexponentials in Linear Logic (SELL)

Linear logic: Formulas are seen as resources, e.g., c ⊗ c ⊢ c. Classical reasoning is recovered by the use of exponentials: !c ⊢ c ⊗ c

Subexponentials [DJS93]

Intuitively, !aF means “F holds in location a”. Such exponentials are not canonical: (in general) !ac ≡!bc if a = b

The Idea

Quantification on location may allow the specification of interesting behaviours in concurrency.

Carlos Olarte (UFRN) CCP& SELL WoLLI2015 5 / 29

slide-11
SLIDE 11

This work is about

SELL (!s, ?s) SELL⋓ (!s,?s,⋒, ⋓) Proof systems for:        (linear) ccp Epistemic ccp Spatial ccp Timed ccp New ccp models:        distributed ccp linear sccp soft constraints dynamic shared-spaces Quantification on subexp. ccp ⇒ SELL⋓ ▽l, SELL⋓ ⇒ ccp SELL⋓ const. sys.

Carlos Olarte (UFRN) CCP& SELL WoLLI2015 6 / 29

slide-12
SLIDE 12

Outline

1

Modalities in CCP

2

SELL interpretation of CCP processes

3

SELL as Constraint System

4

Concluding Remarks

Carlos Olarte (UFRN) CCP& SELL WoLLI2015 7 / 29

slide-13
SLIDE 13

CCP: The language of Processes

Concurrent Constraint Programming

tell(c) adds c to the store (d) leading to d ∧ c. The process ask c then P evolves into P if c can be deduced from the store. This is a simple and powerful synchronization mechanism. P Q: parallel execution of P and Q. (local x) P: local variables. Given a definition, p(y) def = P, the process p(x) reduces to P[x/y].

A simple example: Classical coffee machine

(tell(coin) ask coin then tell(coffee), true) − → (ask coin then tell(coffee), coin) − → (skip, coin ∧ coffee)

Carlos Olarte (UFRN) CCP& SELL WoLLI2015 8 / 29

slide-14
SLIDE 14

Outline

1

Modalities in CCP

2

SELL interpretation of CCP processes

3

SELL as Constraint System

4

Concluding Remarks

Carlos Olarte (UFRN) CCP& SELL WoLLI2015 9 / 29

slide-15
SLIDE 15

Linear CCP [FRS01]

Constraints as formulae in (a fragment of) Girard’s ILL: Ask agents consume information when evolving.

The linear coffee machine

(tell(coin) ask coin then coffee, true) − → (ask coin then coffee, coin) − → (skip, coffee)

Declarative Reading of lcc processes

[FRS01] showed that (L)CCP processes can be read as formulae in ILL: (P, c) − →∗ (Q, d) iff L[ [P] ] ⊗ c ⊢ L[ [Q] ] ⊗ d

Carlos Olarte (UFRN) CCP& SELL WoLLI2015 10 / 29

slide-16
SLIDE 16

Focusing and Adequacy

Logical and operational steps do not correspond (closely) to each other: Process: P = tell(c) ask c then tell(d) ask d then tell(e) Operational side: P ⇓e (P outpus e). Logical side c ⊗ (c −

  • d) ⊗ (d −
  • e) ⊢ e, but:

e ⊢ e c ⊢ c d ⊢ d c, c −

  • d ⊢ d

c, c −

  • d, d −
  • e ⊢ e

Andreoli’s focusing system [And92]: negative connectives ⊸, &, ⊤, ∀, ... positive connectives: ⊗, ⊕, ∃, ....

Carlos Olarte (UFRN) CCP& SELL WoLLI2015 11 / 29

slide-17
SLIDE 17

Focusing and Adequacy

Negative Phase [K : Γ], ∆, F, G − → R [K : Γ], ∆, F ⊗ G − → R ⊗L [K : Γ], ∆, F − → G [K : Γ], ∆ − → F ⊸ G ⊸R [K : Γ], ∆ − → G[xe/x] [K : Γ], ∆ − → ∀x.G ∀R

Positive Phase [K1 : Γ1]−F→ [K2 : Γ2]−G→ [K1 ⊗ K2 : Γ1, Γ2]−F⊗G→ ⊗R [K1 : Γ1]−F→ [K2 : Γ2] H − → G [K1 ⊗ K2 : Γ1, Γ2] F⊸H − − − → G ⊸L

If we decide to focus on c ⊗ (c −

  • d) ⊗ (d −
  • e) ⊢ e, the atom d must be

already in the context!

Declarative Reading of lcc processes [OP15]

Focused proofs corresponds, one-to-one, to operational steps in (l)CCP. (P, c) − →∗ (Q, d) iff L[ [P] ] ⊗ c ⊢ L[ [Q] ] ⊗ d

Carlos Olarte (UFRN) CCP& SELL WoLLI2015 12 / 29

slide-18
SLIDE 18

Modalities in CCP

Epistemic and Spatial behavior in CCP

Assume a set of agents A={i,j,k...}, [P]i means P runs in the space-agent i. si(c) means the constraint (information) c holds for agent i. Constraints are of the form si(c). Two possible interpretations:

1 Epistemic: ◮ si(c): i knows c (and then, c is true). ◮ sj(si(c)): j knows that i knows c (and then, j knows c). 2 Spatial ◮ si(c): c holds in the space of i. ◮ sj(si(c)): c holds in the space that j conferred to i but c does not

necessarily hold in j.

Carlos Olarte (UFRN) CCP& SELL WoLLI2015 13 / 29

slide-19
SLIDE 19

Epistemic CCP

Some properties for si:

1 si(c) ⊢∆e c (believes are facts) 2 si(si(c)) = si(c) (idempotence)

In eccp, knowledge of agents becomes a fact and information propagates to outermost spaces: (ask coin then tell(coffee) [tell(coin)]i, true) − → (ask coin then tell(coffee) , si(coin)) − → (tell(coffee), si(coin)) − → (skip, si(coin) ∧ coffee)

Carlos Olarte (UFRN) CCP& SELL WoLLI2015 14 / 29

slide-20
SLIDE 20

Spatial CCP (Information Confinment)

In sccp, inconsistency (and information) is confined:

1 si(0) ⊢∆s sj(0) (false is not propagated outside locations). 2 si(0) ⊢∆s 0 (falsity is not global)

(ask coin then tell(coffee) [tell(coin)]i, true) − → (ask coin then tell(coffee), si(coin)) − → How to give a declarative interpretation of such modalities ?

Carlos Olarte (UFRN) CCP& SELL WoLLI2015 15 / 29

slide-21
SLIDE 21

Outline

1

Modalities in CCP

2

SELL interpretation of CCP processes

3

SELL as Constraint System

4

Concluding Remarks

Carlos Olarte (UFRN) CCP& SELL WoLLI2015 16 / 29

slide-22
SLIDE 22

Subexponentials [DJS93] in Linear Logic

Subexponential Signature

Σ = I, , U where I is a set of labels, U ⊆ I set of unbounded subexp and is a pre-order among the elements of I. Γ, F − → G Γ, !aF − → G !aL !a1F1, . . . , !anFn − → F !a1F1, . . . , !anFn − → !aF !aR, provided a ai Γ − → G Γ, !bF − → G W Γ, !bF, !bF − → G Γ, !bF − → G C Assume now two separated rooms a and b, i.e., a b and b a. (!acoin−

  • !acoffee)⊗!bcoin ⊢!bcoffee

What about a specification like ∀l.(!lcoin−

  • !lcoffee) ?

We need a theory for existential/universal quantification on subexponentials.

Carlos Olarte (UFRN) CCP& SELL WoLLI2015 17 / 29

slide-23
SLIDE 23

Quantification on Locations [NOP13]

A; L; Γ, P[l/x] ⊢ G A; L; Γ, ⋓x : a.P ⊢ G ⋓L A, le : a; L; Γ ⊢ P[le/x] A; L; Γ ⊢ ⋓x : a.P ⋓R A, le : a; L; Γ, P[le/x] ⊢ G A; L; Γ, ⋒x : a.P ⊢ G ⋒L A; L; Γ ⊢ P[l/x] A; L; Γ ⊢ ⋒x : a.P ⋒R Creating “new” locations: Γ, ⋒l.(F) ⊢ G Asserting something about all locations: Γ, ⋓l.(F) ⊢ G Proving that all locations satisfies G: Γ ⊢ ⋓l.(G) Proving that G holds in some location: Γ ⊢ ⋒l.(G)

Theorem (Cut-elimination) [NOP13]

For any signature Σ, the proof system SELL⋓ admits cut-elimination.

Carlos Olarte (UFRN) CCP& SELL WoLLI2015 18 / 29

slide-24
SLIDE 24

Epistemic and Spatial Encodings

The intuition

Connective Meaning

  • s = !s

!sP is located at s.

  • s =!s?s

!s?sP is confined to s. ⋓l : a P P can move to locations below (outside) a Epistemic Modalities

  • Meaning

a.a ∼ a Modalities are idempotent: [[P]a]a ∼ [P]a a a.b Processes move outside [[P]b]a − → [P [P]b]a Spatial Modalities

  • Meaning

a b P does not communicate with Q in [P]a [Q]b a.a ∼ a Modalities are not necessarily idempotent. a a.b Processes are confined: [[P]b]a ∼ [P [P]b]a

Carlos Olarte (UFRN) CCP& SELL WoLLI2015 19 / 29

slide-25
SLIDE 25

Adequacy

Take for instance: P[ [tell(c)] ]a = !p(a)⋓s : a.(C[ [c] ]s) We get the following (focused) derivation in SELL⋓: [C′, D, P] − → [G] [C, D, P], C[ [c] ]s − → [G] n × ∃l, m × ⊗l, j × !l [C, D, P]

⋓s:a.C[ [c] ]s

− − − − − − → [G] ⋓L, Rl [C, D, P+p(a)⋓s : a.C[ [c] ]s] − → [G] D

Theorem (Adequacy)

Let P be an eccp/sccp process, then, P ⇓c iff P[ [P] ] − → C[ [c] ]nil

Carlos Olarte (UFRN) CCP& SELL WoLLI2015 20 / 29

slide-26
SLIDE 26

Timed Modalities in SELLF

The tcc calculus

P, Q, ... := tell(c).... | ◦ P | ✷ P

l∞ l1+ l1 l2+ l2 · · ·

P[ [c] ]l =

  • l c = !l?lc

P[ [◦P] ]i = P[ [P] ]i+1 P[ [✷ P] ]i = !p(∞)⋓l : i+(P[ [P] ]l)

Theorem (Adequacy)

Let P be a timed process, (Ct, ∆t) be a CS. Then P ⇓c iff !c(∞)∆t, P[ [P] ]1 − → ⋒l : 1+.!c(l)?c(l)c ⊗ ⊤.

Carlos Olarte (UFRN) CCP& SELL WoLLI2015 21 / 29

slide-27
SLIDE 27

Outline

1

Modalities in CCP

2

SELL interpretation of CCP processes

3

SELL as Constraint System

4

Concluding Remarks

Carlos Olarte (UFRN) CCP& SELL WoLLI2015 22 / 29

slide-28
SLIDE 28

Subexponential CCP

From SELL⋓ to CCP

Assume a constraint system where subexponentials are allowed: F := 1 | A | F ⊗ F | ∃x.F | !aF | !s?sF !ac = ( |c| )a: c holds (is believed) with preference a. !s?s′c = [c]s

s′: c holds in any space in the hierarchy s′ : s.

Processes are allowed to create and communicate locations: P, Q := tell(c) | (local x; l) Q | (abs x; l; c) Q | P Q | [P]s

What do we get?

A declarative model for concurrency where different modalities can be combined!

Carlos Olarte (UFRN) CCP& SELL WoLLI2015 23 / 29

slide-29
SLIDE 29

Programming Examples

Sharing Information

Assume that s′′ s′ s:

1 [c]s

s′ ⊢∆ [c]s′ (information c can be propagated to the inner/lower

space s′);

2 [c]s

s′′ ⊢∆ [c]s′ (information c can be propagated to the intermediate

location in the hierarchy);

3 [c]s ⊢∆ [c]s

s′ (information is confined if sharing is not explicit);

Example (Agent 86’s Coffee Machine)

(local l : m/c, l′ : m/c) tell([coin]l) ask [coin]l then tell([coffee]l′)

Example (Nested Locations)

(local l : m/c, l′ : l) tell([coin]l) ask [coin]l then tell([coffee]l′)

Carlos Olarte (UFRN) CCP& SELL WoLLI2015 24 / 29

slide-30
SLIDE 30

Programming Examples

Temporal and Spatial Dependencies

Example

[[c]2]sa ⊗ [[d]3+]sa′ means that c holds for agent a in time-unit 2 while d holds for a′ in all future time-unit t ≥ 3. This is useful for describing sets

  • f biochemical reactions ([CFHO15]).

Mobility for names: ∃x.P ∧ ∀y.Q ❀ ∃x.(P ∧ Q) for locations: ⋒l.

l P ∧ ⋓w. w Q

❀ ⋒l.(

l P ∧ l Q)

Example (Service Oriented Computing)

request(a, b)

def

= (local x, l : {a, b}) (tell([com(x)]b) ask [com(x)]a then (tell([com(x)]l) P)) accept(a, b)

def

= (abs y : b; [com(y)]b) (tell([com(y)]a) (abs k : b; [com(y)]k) Q)

Carlos Olarte (UFRN) CCP& SELL WoLLI2015 25 / 29

slide-31
SLIDE 31

Preferences and Soft Constraints

Using a c-semiring as a subexponential signature, agents can tell/ask preferences:

Examples of c-semirings A, +, ×, ⊥A, ⊤A

Fuzzy: SF = [0, 1], max, min, 0, 1 – Preferences Probabilistic: SP = [0, 1], max, ×, 0, 1 Weighted: Sw = R−, max, +, −∞, 0 – Costs

SELLS System [PON14], Promotion Rule

!a1F1, · · · , !anFn − → G !a1F1, · · · , !anFn − → !bG b a1 × ... × an

1 Fuzzy: (

|c| )0.7 ⊢∆ ( |c| )0.5 (if c is added with a higher preference a′, then it can be deduced with a lower preference a);

2 Probabilistic: (

|c| )0.7 ⊗ ( |d| )0.3 ⊢∆ ( |c ⊗ d| )a (a ≤ 0.21). s

Carlos Olarte (UFRN) CCP& SELL WoLLI2015 26 / 29

slide-32
SLIDE 32

Outline

1

Modalities in CCP

2

SELL interpretation of CCP processes

3

SELL as Constraint System

4

Concluding Remarks

Carlos Olarte (UFRN) CCP& SELL WoLLI2015 27 / 29

slide-33
SLIDE 33

Concluding Remarks

We showed that subexponentials can express interesting behaviors in concurrency. The resulting system turned out to be a nice proof system for different flavors of CCP:

◮ Spatial modalities, where nested locations can be dynamically created

and shared.

◮ Knowledge ◮ Temporal Modalities ◮ Soft constraints and preferences

The logical system guided the design for new (still declarative) constructors for CCP. Two concrete applications so far: logic/CCP semantics for:

◮ P-Systems. ◮ Reactive Scores. Carlos Olarte (UFRN) CCP& SELL WoLLI2015 28 / 29

slide-34
SLIDE 34

Thank you!

Carlos Olarte (UFRN) CCP& SELL WoLLI2015 29 / 29

slide-35
SLIDE 35

Jean-Marc Andreoli. Logic programming with focusing proofs in linear logic.

  • J. Log. Comput., 2(3):297–347, 1992.

Maria Grazia Buscemi and Ugo Montanari. Cc-pi: A constraint-based language for specifying service level agreements. In Rocco De Nicola, editor, ESOP, volume 4421 of Lecture Notes in Computer Science, pages 18–32. Springer, 2007. Stefano Bistarelli, Ugo Montanari, and Francesca Rossi. Soft concurrent constraint programming. ACM Trans. Comput. Log., 7(3):563–589, 2006. Davide Chiarugi, Moreno Falaschi, Diana Hermith, and Carlos Olarte. Verification of spatial and temporal modalities in biochemical systems.

  • Electr. Notes Theor. Comput. Sci., 316:29–44, 2015.

Vincent Danos, Jean-Baptiste Joinet, and Harold Schellinx. The structure of exponentials: Uncovering the dynamics of linear logic proofs.

Carlos Olarte (UFRN) CCP& SELL WoLLI2015 29 / 29

slide-36
SLIDE 36

In Georg Gottlob, Alexander Leitsch, and Daniele Mundici, editors, Computational Logic and Proof Theory, Third Kurt G¨

  • del Colloquium,

KGC’93, Brno, Czech Republic, August 24-27, 1993, Proceedings, volume 713 of Lecture Notes in Computer Science, pages 159–171. Springer, 1993. Francois Fages, Paul Ruet, and Sylvain Soliman. Linear concurrent constraint programming: Operational and phase semantics. Information and Computation, 165, 2001. Vineet Gupta, Radha Jagadeesan, and Vijay A. Saraswat. Probabilistic concurrent constraint programming. In Proc. of CONCUR 97, London, UK, 1997. Springer-Verlag. Sophia Knight, Catuscia Palamidessi, Prakash Panangaden, and Frank D. Valencia. Spatial and epistemic modalities in constraint-based process calculi. In Maciej Koutny and Irek Ulidowski, editors, CONCUR, volume 7454

  • f Lecture Notes in Computer Science, pages 317–332. Springer, 2012.

Carlos Olarte (UFRN) CCP& SELL WoLLI2015 29 / 29

slide-37
SLIDE 37

Vivek Nigam, Carlos Olarte, and Elaine Pimentel. A general proof system for modalities in concurrent constraint programming. In Pedro R. D’Argenio and Hern´ an C. Melgratti, editors, CONCUR 2013 - Concurrency Theory - 24th International Conference, CONCUR 2013, Buenos Aires, Argentina, August 27-30, 2013. Proceedings, volume 8052 of Lecture Notes in Computer Science, pages 410–424. Springer, 2013.

  • M. Nielsen, C. Palamidessi, and F.D. Valencia.

Temporal concurrent constraint programming: Denotation, logic and applications. Nordic Journal of Computing, 9(1), 2002. Carlos Olarte and Elaine Pimentel. Proving concurrent constraint programming correct, revisited.

  • Electr. Notes Theor. Comput. Sci., 312:179–195, 2015.

Carlos Olarte and Frank D. Valencia.

Carlos Olarte (UFRN) CCP& SELL WoLLI2015 29 / 29

slide-38
SLIDE 38

Universal concurrent constraint programing: Symbolic semantics and applications to security. In Proc. of SAC 2008. ACM, 2008. Elaine Pimentel, Carlos Olarte, and Vivek Nigam. A proof theoretic study of soft concurrent constraint programming. TPLP, 14(4-5):649–663, 2014. Vijay Saraswat, Radha Jagadeesan, and Vineet Gupta. Foundations of timed concurrent constraint programming. In Proc. of LICS’94. IEEE CS, 1994.

Carlos Olarte (UFRN) CCP& SELL WoLLI2015 29 / 29