16
Anisa Allahdadi Thematic Seminar 21 June 2012

Programming from Galois Connections

Embed Size (px)

DESCRIPTION

Anisa Allahdadi Thematic Seminar 21 June 2012. Programming from Galois Connections. Objectives. Problem Statements: one defining a broad class of solutions ( the easy part) requesting one particular optimal solution , ( the hard part ) - PowerPoint PPT Presentation

Citation preview

Page 1: Programming from Galois Connections

Anisa AllahdadiThematic Seminar21 June 2012

Page 2: Programming from Galois Connections

Problem Statements: one defining a broad class of solutions

(the easy part) requesting one particular optimal

solution, (the hard part)This article introduces a binary

relational combinator which mirrors this linguistics structure and exploits its potential for calculating

programs by optimization.

Page 3: Programming from Galois Connections

Abstraction Abstract Modeling, in the early stages of

thinking about a software problem Induction

Solving a complex program by imagining some smaller parts already solved

Divide and conquer programming strategy

Page 4: Programming from Galois Connections

Whole number division: x ÷ y is the largest natural number when multiplied by y, is at most x

takeWhile p: longest prefix of the input list such that all elements satisfy predicate p

Scheduling: The best schedule for a collection of tasks, given their time spans and an acyclic graph

Page 5: Programming from Galois Connections

E: the collection of solution candidates

H: criteria under which a best solution is chosen

Page 6: Programming from Galois Connections

x ÷ y is the largest natural number that, when multiplied by y, is at most x.

Page 7: Programming from Galois Connections

A Galois connection is a pair of functions f and g satisfying:

f and g are adjoints of each other (f is the lower adjoint and g is the upper adjoint)

Page 8: Programming from Galois Connections

Indirect Equality

Galois connection blending with indirect equality

Page 9: Programming from Galois Connections
Page 10: Programming from Galois Connections

Take (n, x): yields the longest prefix of its input sequence up to some given length n.

Page 11: Programming from Galois Connections
Page 12: Programming from Galois Connections

Galois adjoints

By the easy part E is “shrunk” by the requirements of the hard part H

Page 13: Programming from Galois Connections

Factoring Galois connection into two parts

Page 14: Programming from Galois Connections

Abbreviate to : the left hand operator: the right hand operand:

Given two relations of and ,

“Shrunk by R”:

Page 15: Programming from Galois Connections

Galois connection as a well-known mathematical device capable of scaling up

“programming from Galois connections” is proposed as a way of calculating programs from specifications in form of Galois connections

The main contribution of this work: using the algebra of programming expressed in closed formula which records what is “easy” and “hard” to implement

A new relational combinator (shrinking) expressing such formula at pointfree level

Cons: not every problem casts into a Galois connection

Page 16: Programming from Galois Connections

Thanks for your time!