Probabilità e Nondeterminismo nella teoria dei domini



Similar documents
The Basics of Graphical Models

A Framework for the Semantics of Behavioral Contracts

Master of Science in Computer Science

Modern Optimization Methods for Big Data Problems MATH11146 The University of Edinburgh

This asserts two sets are equal iff they have the same elements, that is, a set is determined by its elements.

1 if 1 x 0 1 if 0 x 1

Local periods and binary partial words: An algorithm

2.1 Complexity Classes

A domain of spacetime intervals in general relativity

Doctor of Philosophy in Computer Science

On Probabilistic Distributed Strategies

INTRODUCTORY SET THEORY

Table of Contents. Preface. Chapter 1 Introduction 1.1 Background. 1.2 Problem description. 1.3 The role of standardization. 1.4 Scope and objectives

Software Modeling and Verification

Basic Concepts of Point Set Topology Notes for OU course Math 4853 Spring 2011

WHAT ARE MATHEMATICAL PROOFS AND WHY THEY ARE IMPORTANT?

Class notes Program Analysis course given by Prof. Mooly Sagiv Computer Science Department, Tel Aviv University second lecture 8/3/2007

Overview Motivating Examples Interleaving Model Semantics of Correctness Testing, Debugging, and Verification

A Propositional Dynamic Logic for CCS Programs

P NP for the Reals with various Analytic Functions

Introduction to Formal Methods. Các Phương Pháp Hình Thức Cho Phát Triển Phần Mềm

PROPERTECHNIQUEOFSOFTWARE INSPECTIONUSING GUARDED COMMANDLANGUAGE

Fuzzy Probability Distributions in Bayesian Analysis

BANACH AND HILBERT SPACE REVIEW

Separation Properties for Locally Convex Cones

Notes V General Equilibrium: Positive Theory. 1 Walrasian Equilibrium and Excess Demand

4.2 Description of the Event operation Network (EON)

Chapter ML:IV. IV. Statistical Learning. Probability Basics Bayes Classification Maximum a-posteriori Hypotheses

CHAPTER 7 GENERAL PROOF SYSTEMS

CPO Semantics of Timed Interactive Actor Networks

Kolmogorov Complexity and the Incompressibility Method

CS5236 Advanced Automata Theory

Rigorous Software Development CSCI-GA

6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, Class 4 Nancy Lynch

Signature-Free Asynchronous Binary Byzantine Consensus with t < n/3, O(n 2 ) Messages, and O(1) Expected Time

Address Taken FIAlias, which is equivalent to Steensgaard. CS553 Lecture Alias Analysis II 2

No: Bilkent University. Monotonic Extension. Farhad Husseinov. Discussion Papers. Department of Economics

Semantic Description of Distributed Business Processes

Data Modeling & Analysis Techniques. Probability & Statistics. Manfred Huber

Is Sometime Ever Better Than Alway?

Complete Redundancy Detection in Firewalls

Real Number Computability and Domain Theory

1. Prove that the empty set is a subset of every set.

Unified Language for Network Security Policy Implementation

Random vs. Structure-Based Testing of Answer-Set Programs: An Experimental Comparison

Basic Concepts of Set Theory, Functions and Relations

Repair Checking in Inconsistent Databases: Algorithms and Complexity

Chapter 6: Episode discovery process

Hint 1. Answer (b) first. Make the set as simple as possible and try to generalize the phenomena it exhibits. [Caution: the next hint is an answer to

Observational Program Calculi and the Correctness of Translations

STORM: Stochastic Optimization Using Random Models Katya Scheinberg Lehigh University. (Joint work with R. Chen and M. Menickelly)

FIBER PRODUCTS AND ZARISKI SHEAVES

Discussion on the paper Hypotheses testing by convex optimization by A. Goldenschluger, A. Juditsky and A. Nemirovski.

Automated Program Behavior Analysis

4. CLASSES OF RINGS 4.1. Classes of Rings class operator A-closed Example 1: product Example 2:

Mechanisms for Fair Attribution

SYNTACTIC THEORY FOR BIGRAPHS

Collatz Sequence. Fibbonacci Sequence. n is even; Recurrence Relation: a n+1 = a n + a n 1.

3 Extending the Refinement Calculus

Testing LTL Formula Translation into Büchi Automata

Regular Languages and Finite Automata

Verifying Semantic of System Composition for an Aspect-Oriented Approach

On a comparison result for Markov processes

Real-time Visual Tracker by Stream Processing

Formal Languages and Automata Theory - Regular Expressions and Finite Automata -

Low upper bound of ideals, coding into rich Π 0 1 classes

2. The Language of First-order Logic

Classification/Decision Trees (II)

SMT 2014 Algebra Test Solutions February 15, 2014

Convex analysis and profit/cost/support functions

Credal Networks for Operational Risk Measurement and Management

Understanding Basic Calculus

Mathematics for Econometrics, Fourth Edition

Simulation-Based Security with Inexhaustible Interactive Turing Machines

Lecture 15 An Arithmetic Circuit Lowerbound and Flows in Graphs

CHAPTER 2 Estimating Probabilities

Parametric Domain-theoretic models of Linear Abadi & Plotkin Logic

MA651 Topology. Lecture 6. Separation Axioms.

Transcription:

Probabilità e Nondeterminismo nella teoria dei domini Daniele Varacca ENS, Paris BRICS, Aarhus Parma, 15 giugno 2004 Probabilità e Nondeterminismo nella teoria dei domini p.1

Road Map Motivation Domain theory and denotational semantics Categorical Semantics and Monads Combining monads: Indexed valuations Orders on indexed valuation Probabilità e Nondeterminismo nella teoria dei domini p.2

The Nature of Computation It s a wild world out there: complex needs: precision, speed, security complex tools: languages, protocols, networks, channels What do computers do, really? Probabilità e Nondeterminismo nella teoria dei domini p.3

Semantics Semantics is a tool to find our way programs are associated to mathematical objects (the meaning) mathematical objects are parts of structures (the models) Goal: study the models to understand the programs Probabilità e Nondeterminismo nella teoria dei domini p.4

Semantics Requirements for the models models should be complex enough to reflect interesting properties of real computation models should be simple enough to be studied Right balance between abstraction and complexity Compositionality The meaning of a complex system is built using the meanings of simpler parts of the system. Probabilità e Nondeterminismo nella teoria dei domini p.5

Probability A model is probabilistic when different alternatives are represented every alternative is assigned a probability We need probability to model failures and unreliability to produce efficient algorithm to enhance security Probabilità e Nondeterminismo nella teoria dei domini p.6

Nondeterminism A model is nondeterministic when different alternatives are represented the way one alternative is chosen over the others is not specified We need nondeterminism to abstract away from details to achieve compositionality to model concurrency (sometimes) Probabilità e Nondeterminismo nella teoria dei domini p.7

Road Map Motivation Domain theory and denotational semantics Categorical Semantics and Monads Combining monads: Indexed valuations Orders on indexed valuation Probabilità e Nondeterminismo nella teoria dei domini p.8

Denotational semantics Idea: programs take in input values of type X and return values of type Y Programs are represented as function X p Y How do we represent recursive programs? fact(n) := if n == 0 then 1 else n fact(n 1) Probabilità e Nondeterminismo nella teoria dei domini p.9

Domain theory (Scott-Strachey late 60): recursive functions are fixed points of operators Ξ(f)(n) := if n == 0 then 1 else n f(n 1) Domain: a framework where fixed points exist Probabilità e Nondeterminismo nella teoria dei domini p.10

Domains DCPO: a partial order D, where every directed subset has a least upper bound. Continuous function f : D D - monotone function that preserves least upper bounds of directed sets. The Category of DCPO s and continuoud functions. Fact: every continuous function f : D D has a (least) fixed point. Probabilità e Nondeterminismo nella teoria dei domini p.11

Scott topology Continuous function f : D D = Continuous with respect to the Scott Topology. Scott closed sets: downward closed sets, closed by least upper bounds of directed sets. Scott open sets: upward closed sets, inaccessible from below. This topology is T 0 but not T 1. Probabilità e Nondeterminismo nella teoria dei domini p.12

Road Map Motivation Domain theory and denotational semantics Categorical Semantics and Monads Combining monads: Indexed valuations Orders on indexed valuation Probabilità e Nondeterminismo nella teoria dei domini p.13

Categorical semantics Idea: programs take in input values of type X and return values of type Y Programs are represented as arrows Programs compose: X p Y X p Y,Y q Z X p;q Z Examples: sets and functions DCPOs and continuous functions Probabilità e Nondeterminismo nella teoria dei domini p.14

Computational effects Programs can have effects nontermination nondeterminism probability permanent state Idea: programs take in input values of type X and return computations of type Y Probabilità e Nondeterminismo nella teoria dei domini p.15

Monads A monad consists of the operator T : if X represents values, T(X) represents computations the unit X η X T(X): values are special kinds of computations the extension ( ) : if X f T(Y ), then T(X) f T(Y ) satisfying some axioms Probabilità e Nondeterminismo nella teoria dei domini p.16

Monads The extension models sequential composition: X f T(Y ), Y g T(Z) X f T(Y ) g T(Z) Specific effects have also specific operations Probabilità e Nondeterminismo nella teoria dei domini p.17

Monads: examples The nondeterministic monad the operator is the finite nonempty powerset P(X) the unit: x {x} the extension: if X f P(Y ), and if A P(X), then f (A) = x Af(x) A program returns a set of values Choice is modelled by union of sets Probabilità e Nondeterminismo nella teoria dei domini p.18

Monads: examples The probabilistic monad the finite valuation operator V (X): functions f : X R + such that f(x) 0 for only finitely many x the unit x δ x the extension is obtained by weighted average A program returns a valuation over values Probabilistic choice x + p y is modelled by convex combination x + p x = x Probabilità e Nondeterminismo nella teoria dei domini p.19

Road Map Motivation Domain theory and denotational semantics Categorical Semantics and Monads Combining monads: indexed valuations Orders on indexed valuation Probabilità e Nondeterminismo nella teoria dei domini p.20

Combining monads We want a program return a set of valuations. the operator is the the composition of the operators P(V (X)) the unit is the composition of the units the extension Probabilità e Nondeterminismo nella teoria dei domini p.21

Combining monads We want a program return a set of valuations. the operator is the the composition of the operators P(V (X)) the unit is the composition of the units the extension does not work! We need to change something Probabilità e Nondeterminismo nella teoria dei domini p.21

Solutions Solution 1 (Tix, Mislove): change the sets. Use convex sets of distributions The operator P convex V form a monad Probabilità e Nondeterminismo nella teoria dei domini p.22

Solutions Solution 1 (Tix, Mislove): change the sets. Use convex sets of distributions The operator P convex V form a monad Solution 2 (Varacca, Winskel): change the valuations. Use indexed valuations Probabilità e Nondeterminismo nella teoria dei domini p.22

Indexed valuations An indexed valuation over a set X is given by a (finite) indexing set I an indexing function ind : I X a valuation over I Notation ν = (x i,p i ) i I Probabilità e Nondeterminismo nella teoria dei domini p.23

Indexed valuations Intuition: elements of X represent observations elements of I represent computations the indexing function associates computations to observations The probability on observations is gotten from the computations Like in a... random variable! Probabilità e Nondeterminismo nella teoria dei domini p.24

The monad We have a monad: the operator is IV (X) = {indexed valuations over X} the unit: x (x, 1) { } the extension is obtained via dosjoint union of indices The probabilistic choice is modelled by duplicating the indices x + p x x Probabilità e Nondeterminismo nella teoria dei domini p.25

Composing the monads We can compose IV and P and get a monad We can now model a programming language with sequential composition nondeterministic choice probabilistic choice Probabilità e Nondeterminismo nella teoria dei domini p.26

Ordering Which order on indexed valuations? Idea: the equation x + p x = x is weakened to x + p x x Morally: the more indices, the better This combines well with the Hoare order on sets A B A domain theory Probabilità e Nondeterminismo nella teoria dei domini p.27

Semantics A language c ::= skip X := a c;c if b then c else c. States: contents of the locations Semantics [c] : Σ Σ Probabilità e Nondeterminismo nella teoria dei domini p.28

Semantics A nondeterministic language c ::=... c or c. Semantics [c] : Σ P(Σ) Probabilità e Nondeterminismo nella teoria dei domini p.29

Semantics A probabilistic language c ::=... X := random. Semantics [c] : Σ V (Σ) Probabilità e Nondeterminismo nella teoria dei domini p.30

Semantics A nondeterministic and probabilistic language c ::=... c or c X := random. Semantics [c] : Σ P(V (Σ)) Probabilità e Nondeterminismo nella teoria dei domini p.31

Semantics A nondeterministic and probabilistic language c ::=... c or c X := random. Semantics [c] : Σ P(V (Σ)) Probabilità e Nondeterminismo nella teoria dei domini p.31

Semantics A nondeterministic and probabilistic language c ::=... c or c X := random. Semantics [c] : Σ P(IV (Σ)) Probabilità e Nondeterminismo nella teoria dei domini p.31

Semantics A language with recursion c ::=... while b do c. domain theory Probabilità e Nondeterminismo nella teoria dei domini p.32

Other issues equational theories other orderings relation with continuous valuations the problem of the concrete characterization operational intuition Probabilità e Nondeterminismo nella teoria dei domini p.33

Related work CSP group in Oxford Tix thesis and Mislove s paper Plotkin, Power, Hyland on monads and operations Probabilità e Nondeterminismo nella teoria dei domini p.34

Future work concrete characterization presheaf models? Probabilità e Nondeterminismo nella teoria dei domini p.35

Grazie Probabilità e Nondeterminismo nella teoria dei domini p.36