SlideShare a Scribd company logo
1 of 18
Download to read offline
Differential Semantics
John Bender
CS 239, Spring 2014
Semantics or Intent
Semantics Vs. Intent
Intent is often a limiting factor in reasoning about programs.
▶ optimizations
▶ useful error messages
▶ static & dynamic analysis
▶ declarative languages
Semantics or Intent
Sources of Both
Many resources for how programs behave, few for intended
behavior.
▶ program syntax
▶ inferred types & annotations
▶ concrete & symbolic execution
▶ tests, specs, contracts
Semantics or Intent
Constrained View
Reasoning about programs is most often done from a standing
start.
▶ single snapshot
▶ programs evolve
▶ state evolves
Semantics for Diffs
At a High Level
The idea is to assign meaning to patches in a way that
augments the runtime’s understanding of the programmers
intent.
▶ SQL DDL
▶ System Configuration (Chef)
▶ Dynamic Software Update (DSU)
SQL DLL
Declarative
SQL’s data definition language starts with a descriptive
approach to objects in a schema.
Example
-- not idempotent
create table foo (
bar int,
baz varchar(10)
);
SQL DLL
Declarativish
Degenerates quickly and reasoning about the schema is tough.
Example
-- idempotent
create table if not exists foo (
bar int,
baz varchar(10)
);
alter table foo add column bak varchar(10);
alter table foo drop column bak;
alter table foo add column baks varchar(20);
SQL DLL
Diff View
Looking at a diff of the table declaration suggests intent.
Bi-directional.
Example
create table foo (
bar int,
- baz varchar(10)
+ baz varchar(10),
+ bak varchar(10)
);
create table foo (
bar int,
baz varchar(10),
- bak varchar(10)
+ baks varchar(20)
);
DDL Wrappers
Hack Solutions
Database migrations are well established in industry. Captures
the idea but poorly.
Example
class AddBaksToFoo < ActiveRecord::Migration
def up
drop_column :foo, :bak
add_column :foo, :baks, varchar(20)
end
def down
add_column :foo, :bak, varchar(10)
remove_column :foo, :baks
end
end
DDL Semantics
Traditional Grammar
Program ::= Declaration;
Declaration ::= Declaration; Declaration | Create | Alter | Drop
Create ::= create table Identifier ( Column )
Drop ::= drop table Identifier
Column ::= Column, Column | Identifier Type
Alter ::= alter table Identifier add Identifier Type
| alter table Identifier drop Identifier
Type := int | varchar(10)
DDL Semantics
Denotational Semantics
S : Declaration → Schema → Schema
S [[D;]] s = S [[D]] s
S [[D1; D2]] s = S [[D2]] (S [[D1]] s)
S [[create table I ( C )]] s = schemaChg I (T [[C]] table) s
S [[drop table I]] s = schemaChg I ⊥s
S [[alter table I1 add I2 Ty]] s = schemaChg I1 (T [[I2 Ty]] (s I1)) s
S [[alter table I1 drop I2]] s = schemaChg I1 (tableChg I2 ⊥ (s I1)) s
T : Declaration → Table → Table
T [[C1, C2]] t = T [[C2]] (T [[C1]] t)
T [[I Ty]] t = tableChg I Ty t
DDL Semantics
Reduced Grammar
Program := Declaration;
Declaration := Declaration; Declaration | Create | Alter | Drop
Create := create table Identifier ( Column )
Column := Column, Column | Identifier Type
Type := int | varchar(10)
DDL Semantics
Denotational Semantics
δ ∈ {−, +, η}
S : Differential → Schema → Schema
S [[D;]]δ
s = T [[D]]δ
s
S [[D1; D2]]δ
s = T [[D2]]δ
(T [[D1]]δ
s)
S [[create table I ( C )]]−
s = schemaChg I ⊥ s
S [[create table I ( C )]]+
s = schemaChg I (T [[C]] table) s
S [[create table I ( C )]]η
s = schemaChg I (T [[C]] (s I))
T : Differential → Table → Table
T [[C1, C2]]δ
t = T [[C2]]δ
(T [[C1]]δ
t)
T [[I Ty]]−
t = tableChg I ⊥ t
T [[I Ty]]+
t = tableChg I Ty t
T [[I Ty]]η
t = t
System Configuration
System Configuration
The “DevOps” movement and server configuration as testable,
repeatable code.
▶ Millions in start-up funding
▶ Chef (63MM), Puppet(13.5MM), Ansible, Salt Stack
▶ Vagrant, Packer, Docker
▶ Predominantly declarative
System Configuration
System Configuration
Configuring things like package installation starts declarative.
Example
# clear/declarative
package "memcached"
# oops! artifacts
package "memcached" do
action :remove
end
Dynamic Software Update
Update In-Flight
Concerned with the process, implications, timing and
semantics of software updates.
▶ Security
▶ Uptime (server & PC)
▶ Chrome, Firefox
Dynamic Software Update
Type mismatch
Depending on the timing of an update an adapter may be
required.
Example
# old version
# (Int, Int) -> String
def op(n, m):
return str(sqrt(n, m))
# new version
# (Int, Int) -> Int
def op(n, m):
return sqrt(n, m)
Dynamic Software Update
Type mismatch
The diff suggests str as the adapter.
Example
def op(n, m):
- return str(sqrt(n, m))
+ return sqrt(n, m)

More Related Content

What's hot

What's hot (6)

11 library
11 library11 library
11 library
 
201801 CSE240 Lecture 14
201801 CSE240 Lecture 14201801 CSE240 Lecture 14
201801 CSE240 Lecture 14
 
Bcsl 033 data and file structures lab s2-1
Bcsl 033 data and file structures lab s2-1Bcsl 033 data and file structures lab s2-1
Bcsl 033 data and file structures lab s2-1
 
An introduction to matlab
An introduction to matlabAn introduction to matlab
An introduction to matlab
 
Bcsl 033 data and file structures lab s3-3
Bcsl 033 data and file structures lab s3-3Bcsl 033 data and file structures lab s3-3
Bcsl 033 data and file structures lab s3-3
 
Pratik Bakane C++
Pratik Bakane C++Pratik Bakane C++
Pratik Bakane C++
 

Similar to Differential Semantics

Evolutionary db development
Evolutionary db development Evolutionary db development
Evolutionary db development Open Party
 
C prog ppt
C prog pptC prog ppt
C prog pptxinoe
 
Database Fundamental
Database FundamentalDatabase Fundamental
Database FundamentalGong Haibing
 
Tactical data engineering
Tactical data engineeringTactical data engineering
Tactical data engineeringJulian Hyde
 
Automatically Documenting Program Changes
Automatically Documenting Program ChangesAutomatically Documenting Program Changes
Automatically Documenting Program ChangesRay Buse
 
Get up to Speed (Quick Guide to data.table in R and Pentaho PDI)
Get up to Speed (Quick Guide to data.table in R and Pentaho PDI)Get up to Speed (Quick Guide to data.table in R and Pentaho PDI)
Get up to Speed (Quick Guide to data.table in R and Pentaho PDI)Serban Tanasa
 
Spark Structured APIs
Spark Structured APIsSpark Structured APIs
Spark Structured APIsKnoldus Inc.
 
6_SQL.pdf
6_SQL.pdf6_SQL.pdf
6_SQL.pdfLPhct2
 
Introduction to programming c and data structures
Introduction to programming c and data structuresIntroduction to programming c and data structures
Introduction to programming c and data structuresPradipta Mishra
 
Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...
Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...
Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...Data Con LA
 
Introduction to programming c and data-structures
Introduction to programming c and data-structures Introduction to programming c and data-structures
Introduction to programming c and data-structures Pradipta Mishra
 
Lecture05sql 110406195130-phpapp02
Lecture05sql 110406195130-phpapp02Lecture05sql 110406195130-phpapp02
Lecture05sql 110406195130-phpapp02Lalit009kumar
 
DBIx-DataModel v2.0 in detail
DBIx-DataModel v2.0 in detail DBIx-DataModel v2.0 in detail
DBIx-DataModel v2.0 in detail Laurent Dami
 
Big Data Analytics with Scala at SCALA.IO 2013
Big Data Analytics with Scala at SCALA.IO 2013Big Data Analytics with Scala at SCALA.IO 2013
Big Data Analytics with Scala at SCALA.IO 2013Samir Bessalah
 
RDataMining slides-r-programming
RDataMining slides-r-programmingRDataMining slides-r-programming
RDataMining slides-r-programmingYanchang Zhao
 
Database queries
Database queriesDatabase queries
Database querieslaiba29012
 

Similar to Differential Semantics (20)

Evolutionary db development
Evolutionary db development Evolutionary db development
Evolutionary db development
 
C prog ppt
C prog pptC prog ppt
C prog ppt
 
Database Fundamental
Database FundamentalDatabase Fundamental
Database Fundamental
 
Tactical data engineering
Tactical data engineeringTactical data engineering
Tactical data engineering
 
Automatically Documenting Program Changes
Automatically Documenting Program ChangesAutomatically Documenting Program Changes
Automatically Documenting Program Changes
 
Get up to Speed (Quick Guide to data.table in R and Pentaho PDI)
Get up to Speed (Quick Guide to data.table in R and Pentaho PDI)Get up to Speed (Quick Guide to data.table in R and Pentaho PDI)
Get up to Speed (Quick Guide to data.table in R and Pentaho PDI)
 
Dfd2
Dfd2Dfd2
Dfd2
 
Spark Structured APIs
Spark Structured APIsSpark Structured APIs
Spark Structured APIs
 
6_SQL.pdf
6_SQL.pdf6_SQL.pdf
6_SQL.pdf
 
Introduction to programming c and data structures
Introduction to programming c and data structuresIntroduction to programming c and data structures
Introduction to programming c and data structures
 
ERTS UNIT 3.ppt
ERTS UNIT 3.pptERTS UNIT 3.ppt
ERTS UNIT 3.ppt
 
Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...
Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...
Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...
 
Introduction to programming c and data-structures
Introduction to programming c and data-structures Introduction to programming c and data-structures
Introduction to programming c and data-structures
 
Lecture05sql 110406195130-phpapp02
Lecture05sql 110406195130-phpapp02Lecture05sql 110406195130-phpapp02
Lecture05sql 110406195130-phpapp02
 
SCALA - Functional domain
SCALA -  Functional domainSCALA -  Functional domain
SCALA - Functional domain
 
DBIx-DataModel v2.0 in detail
DBIx-DataModel v2.0 in detail DBIx-DataModel v2.0 in detail
DBIx-DataModel v2.0 in detail
 
Big Data Analytics with Scala at SCALA.IO 2013
Big Data Analytics with Scala at SCALA.IO 2013Big Data Analytics with Scala at SCALA.IO 2013
Big Data Analytics with Scala at SCALA.IO 2013
 
RDataMining slides-r-programming
RDataMining slides-r-programmingRDataMining slides-r-programming
RDataMining slides-r-programming
 
report
reportreport
report
 
Database queries
Database queriesDatabase queries
Database queries
 

Recently uploaded

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 

Recently uploaded (20)

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 

Differential Semantics

  • 2. Semantics or Intent Semantics Vs. Intent Intent is often a limiting factor in reasoning about programs. ▶ optimizations ▶ useful error messages ▶ static & dynamic analysis ▶ declarative languages
  • 3. Semantics or Intent Sources of Both Many resources for how programs behave, few for intended behavior. ▶ program syntax ▶ inferred types & annotations ▶ concrete & symbolic execution ▶ tests, specs, contracts
  • 4. Semantics or Intent Constrained View Reasoning about programs is most often done from a standing start. ▶ single snapshot ▶ programs evolve ▶ state evolves
  • 5. Semantics for Diffs At a High Level The idea is to assign meaning to patches in a way that augments the runtime’s understanding of the programmers intent. ▶ SQL DDL ▶ System Configuration (Chef) ▶ Dynamic Software Update (DSU)
  • 6. SQL DLL Declarative SQL’s data definition language starts with a descriptive approach to objects in a schema. Example -- not idempotent create table foo ( bar int, baz varchar(10) );
  • 7. SQL DLL Declarativish Degenerates quickly and reasoning about the schema is tough. Example -- idempotent create table if not exists foo ( bar int, baz varchar(10) ); alter table foo add column bak varchar(10); alter table foo drop column bak; alter table foo add column baks varchar(20);
  • 8. SQL DLL Diff View Looking at a diff of the table declaration suggests intent. Bi-directional. Example create table foo ( bar int, - baz varchar(10) + baz varchar(10), + bak varchar(10) ); create table foo ( bar int, baz varchar(10), - bak varchar(10) + baks varchar(20) );
  • 9. DDL Wrappers Hack Solutions Database migrations are well established in industry. Captures the idea but poorly. Example class AddBaksToFoo < ActiveRecord::Migration def up drop_column :foo, :bak add_column :foo, :baks, varchar(20) end def down add_column :foo, :bak, varchar(10) remove_column :foo, :baks end end
  • 10. DDL Semantics Traditional Grammar Program ::= Declaration; Declaration ::= Declaration; Declaration | Create | Alter | Drop Create ::= create table Identifier ( Column ) Drop ::= drop table Identifier Column ::= Column, Column | Identifier Type Alter ::= alter table Identifier add Identifier Type | alter table Identifier drop Identifier Type := int | varchar(10)
  • 11. DDL Semantics Denotational Semantics S : Declaration → Schema → Schema S [[D;]] s = S [[D]] s S [[D1; D2]] s = S [[D2]] (S [[D1]] s) S [[create table I ( C )]] s = schemaChg I (T [[C]] table) s S [[drop table I]] s = schemaChg I ⊥s S [[alter table I1 add I2 Ty]] s = schemaChg I1 (T [[I2 Ty]] (s I1)) s S [[alter table I1 drop I2]] s = schemaChg I1 (tableChg I2 ⊥ (s I1)) s T : Declaration → Table → Table T [[C1, C2]] t = T [[C2]] (T [[C1]] t) T [[I Ty]] t = tableChg I Ty t
  • 12. DDL Semantics Reduced Grammar Program := Declaration; Declaration := Declaration; Declaration | Create | Alter | Drop Create := create table Identifier ( Column ) Column := Column, Column | Identifier Type Type := int | varchar(10)
  • 13. DDL Semantics Denotational Semantics δ ∈ {−, +, η} S : Differential → Schema → Schema S [[D;]]δ s = T [[D]]δ s S [[D1; D2]]δ s = T [[D2]]δ (T [[D1]]δ s) S [[create table I ( C )]]− s = schemaChg I ⊥ s S [[create table I ( C )]]+ s = schemaChg I (T [[C]] table) s S [[create table I ( C )]]η s = schemaChg I (T [[C]] (s I)) T : Differential → Table → Table T [[C1, C2]]δ t = T [[C2]]δ (T [[C1]]δ t) T [[I Ty]]− t = tableChg I ⊥ t T [[I Ty]]+ t = tableChg I Ty t T [[I Ty]]η t = t
  • 14. System Configuration System Configuration The “DevOps” movement and server configuration as testable, repeatable code. ▶ Millions in start-up funding ▶ Chef (63MM), Puppet(13.5MM), Ansible, Salt Stack ▶ Vagrant, Packer, Docker ▶ Predominantly declarative
  • 15. System Configuration System Configuration Configuring things like package installation starts declarative. Example # clear/declarative package "memcached" # oops! artifacts package "memcached" do action :remove end
  • 16. Dynamic Software Update Update In-Flight Concerned with the process, implications, timing and semantics of software updates. ▶ Security ▶ Uptime (server & PC) ▶ Chrome, Firefox
  • 17. Dynamic Software Update Type mismatch Depending on the timing of an update an adapter may be required. Example # old version # (Int, Int) -> String def op(n, m): return str(sqrt(n, m)) # new version # (Int, Int) -> Int def op(n, m): return sqrt(n, m)
  • 18. Dynamic Software Update Type mismatch The diff suggests str as the adapter. Example def op(n, m): - return str(sqrt(n, m)) + return sqrt(n, m)