Strategies for Landing an Oracle DBA Job as a Fresher
S-CUBE LP: The Chemical Computing model and HOCL Programming
1. S-Cube Learning Package
The Chemical Computing model and HOCL
Programming
INRIA, CNR, SZTAKI
Zsolt Németh, SZTAKI
www.s-cube-network.eu
2. Learning Package Categorization
S-Cube
Service Infrastructure
Multi-level and self-adaptation
Supporting adaptation of
service-based applications
3. Learning Package Overview
The vision of chemical computing
Gamma
The γ-calculus
The Higher Order Chemical Language
4. Problem statement and motivation
Most algorithms are sequential even if the problem solving is
inherently parallel
Many algorithms are expressed in a cumbersome way
Declarative vs. imperative style of programming
Clear mathematical model for defining semantics
mxset: m:=a[1] mxset: if tail(l)=nil
i:=1 then head(l)
*{i<n → else max(head(l),mxset(tail(l)))
i:= i+1
m:=max(m, a[i])}
7. Why chemical
Concise problem description
Locality
– decisions on actual and timely conditions
– decisions on partial information
Self-evolving, autonomic, adaptive behaviour
Inherently parallel and concurrent
Highly dynamic
Coordinating problems
– large number of entities
– changing conditions
Beware! This model is not computational chemistry!
A large class of problems in SOA require unconventional approaches
– service composition, service coordination, service adaptation, workflow, etc.
8. Learning Package Overview
The vision of chemical computing
Gamma
The γ-calculus
The Higher Order Chemical Language
9. GAMMA
GAMMA (General Abstract Model for Multiset Manipulation)
multiset M
R(x1, x2,…xn) guard
A(x1, x2,…xn) action
(Ri, Ai) reaction
replace (x1, x2,…xn) in M
if R(x1, x2,…xn)
by A(x1, x2,…xn)
a large set of problems expressed in a concise way
– prime search, sorting, string processing, geometric problems, graph
algorithms, process control, etc.
10. GAMMA
The first language to capture the notion of chemical
programming
Now of merely historic value
Based on the idea of GAMMA
– the γ-calculus
- different of GAMMA
- higher order
- reaction rules = active molecules, part of the solution
- active molecules vanish in reactions
– Higher Order Chemical Language
- a language based on the γ-calculus
11. Learning Package Overview
The vision of chemical computing
Gamma
The γ-calculus
The Higher Order Chemical Language
12. The -calculus
captures the chemical notion
a declarative, functional formalism
inherently concurrent, indeterministic model
of computation
shows similarities to the λ-calculus
2
1 5
γx,y.x+y
8 7
13. The -calculus
2
1
basic data structure: multiset (chemical 5
solution) γx,y.x+y
8 7
– passive molecules: booleans, integers, tuples,
naming molecules
– active molecules: -abstraction 2
reaction: an active molecule captures others 1 5
and transforms γx,y.x+y
8 7
execution: perform reactions until a stable
(inert) chemical solution is resulted
2
reactions are independent concurrent and
indeterministic 6
8 7
14. Active molecules: -abstraction
P.M
– P is a pattern that selects elements for the reaction (head)
– M is the action (body)
– capture x and replace by its square: x . x*x
Conditional reactions: PC.M
– C is a condition; the reaction takes place if C is true
– capture x and if positive, replace by its square root: x x>0 . sqr(x)
15. Active molecules: -abstraction
Atomic capture: x1,x2,…xn.M
– a single reaction may capture multiple molecules
– capture x,y and replace them by their sum: x,y . x+y
Reaction: active molecules capture other molecules
– formal parameters are substituted in the body
– notion of free and bound variables
– x.M, N → M[x:=N]
– x,y . x+y, 2, 3 → 2+3
– 2, x,y . x+y, 3 → 2+3
– 3, 2, x,y . x+y → 2+3
– x,y . x.x+y, 2, 3 → x.x+2
– x,y . x.x+y, 2, 3 → x.x+3
16. The -calculus
2
1 5
-terms are γx,y.x+y
– Commutative: M1,M2≡M2,M1 8 7
– Associative: (M1,M2),M3≡M1,(M2,M3)
– Realize Brownian motion
γx,y.x+y
8
Reactions
1
– Locality: if M1→M2, then M,M1→M,M2 5
7
– Solution: if M1→M2, then <M1>→<M2> 2
γx,y.x+y
8
γx.x*x
3
1
5
5 7
7 2
6
17. Learning Package Overview
The vision of chemical computing
Gamma
The γ-calculus
The Higher Order Chemical Language
18. A chemical language: HOCL
• Higher Order Chemical Language (HOCL)
• Higher order: active molecules (procedures)
– capture other active molecules
– produce other active molecules
• Multiset rewriting
• Program: solution of atoms
• < A1, A2, …An>
19. HOCL
• replace P by M if C in <>
– P: pattern, captured molecules
– M: action, produced molecules
– C: condition
max = replace x,y by x if x ≥ y in
<1, 2, 3, 4, 5, 6, 7, 8, 9, max>
primes = replace x,y by y if x div y in
<1, 2, 3, 4, 5, 6, 7, 8, 9, primes>
21. The Dutch flag example
let r = replace <i,red>,<j,white> by <i,white>,<j,red> if i>j in
let w = replace <i,white>,<j, blue> by <i, blue>,<j,white> if i>j in
let b = replace <i,red>,<j,blue> by <i,blue>,<j,red> if i>j in
<<1,blue>,<2,white>,<3,white>,<4,red>,<5,blue>,<6,white>,r,w,b>
2
5 blue
white 6
1
r white
blue
white
3 4 b
w red
22. References
Jean-Pierre Banatre and Daniel LeMetayer. Programming by multiset transformation. Commun. ACM,
36(1):98–111, 1993.
Jean-Pierre Banatre, Pascal Fradet, and Yann Radenac. Generalized multisets for chemical programming.
Math. Struct. in Comp. Science, 16:557–580, 2006.
Jean-Pierre Banatre, Pascal Fradet, and Yann Radenac. Programming self-organizing systems with the
higher-order chemical language. International Journal of Unconventional Computing, 3(3):161–177, 2007
23. Acknowledgements
The research leading to these results has
received funding from the European
Community’s Seventh Framework
Programme [FP7/2007-2013] under grant
agreement 215483 (S-Cube).