SlideShare a Scribd company logo
1 of 32
Download to read offline
Conditioned Slicing for
First-Order Functional Programs
Author: Diego Cheda
Supervisor: Germ´an Vidal
DSIC, Universidad Polit´ecnica de Valencia
Camino de Vera s/n, 46022, Valencia, Espa˜na.
— Septiembre de 2008 —
Conditioned Slicing for First-Order Functional Programs
Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions
Summary
1 Motivation
2 Contributions
3 Preliminaries
4 Conditioned Slicing
5 Computing Conditioned Slicing
6 Conclusions
Diego Cheda 2 / 32
Conditioned Slicing for First-Order Functional Programs
Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions
Motivation
Motivation
[Wadler, 1998] → Why No One Uses Functional Languages
[Peyton Jones et al, 2007] → A History of Haskell
[Cheda and Silva, 2008] → State of the Practice in Alg.
Debugging
Improvements to address effective and efficiently errors
detection in functional programs.
Functional programs debugging:
traditionals,
profiling,
tracing,
algorithmic debugging, and
program slicing.
Diego Cheda 3 / 32
Conditioned Slicing for First-Order Functional Programs
Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions
Motivation
Program Slicing [Mark Weiser, 1979]
Extract sentences that are related to some criterion
Slicing criterion
Example
P r o g r a m Slice
Slicing
Criterion
Applications
debugging,
comprehension,
maintenance,
testing,
parallelization,
integration,
reverse engineering,
program restructuring,
etc.
Diego Cheda 4 / 32
Conditioned Slicing for First-Order Functional Programs
Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions
Motivation
Static Slicing [Cheda, Silva and Vidal, 2006]
TDG
Slicing Criterion: (function, slicing pattern)
where
function is an initial function call, and
slicing pattern [Ochoa et al, 2004] denotes the shape of the
result (constructor term) by ignoring part of its term structure.
• ⊥ denotes a subexpression whose computation is not relevant.
• a subexpression which is relevant.
Diego Cheda 5 / 32
Conditioned Slicing for First-Order Functional Programs
Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions
Motivation
Example
Static Slicing Criterion: (triangle x y z, Pair ⊥ )
triangle x y z = Pair (sum x y z)(kind x y z)
sum x y z = add x (add y z)
add Zero x = x
add (Succ x) y = (Succ (add x y))
kind x y z = if (x == y) then
(if (y == z) then Equilateral else Isosceles)
else
(if (y == z) then Isosceles else Scalene)
Diego Cheda 6 / 32
Conditioned Slicing for First-Order Functional Programs
Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions
Motivation
Dynamic Slicing [Ochoa, Silva and Vidal, 2004]
Redex Trails
Slicing Criterion: (function, partial value, slicing pattern)
where
function is an initial function call with concrete argument
values, and
partial value is a partial value obtained as result,
slicing pattern denotes which part of the function result is
relevant or not.
Diego Cheda 7 / 32
Conditioned Slicing for First-Order Functional Programs
Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions
Motivation
Example
Dynamic Slicing Criterion: (main, Pair Equilateral, Pair ⊥ )
main = triangle (Succ Zero) (Succ Zero) (Succ Zero)
triangle x y z = Pair (sum x y z)(kind x y z)
sum x y z = add x (add y z)
add Zero x = x
add (Succ x) y = (Succ (add x y))
kind x y z = if (x == y) then
(if (y == z) then Equilateral else Isosceles)
else
(if (y == z) then Isosceles else Scalene)
Diego Cheda 8 / 32
Conditioned Slicing for First-Order Functional Programs
Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions
Motivation
Conditioned Slicing [Canfora et al, 1998]
Slicing Criterion: (function, logical formula, slicing pattern)
where
function is an initial function call,
logical formula is a logical formula on the input variables, and
slicing pattern denotes which part of the function result is
relevant or not.
Important
As far as we know, conditioned slicing has not been defined before
in the declarative paradigm.
Diego Cheda 9 / 32
Conditioned Slicing for First-Order Functional Programs
Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions
Motivation
Example
Conditioned Slicing Criterion: (triangles x y z, x==y, Pair ⊥ )
triangle x y z = Pair (sum x y z)(kind x y z)
sum x y z = add x (add y z)
add Zero x = x
add (Succ x) y = (Succ (add x y))
kind x y z = if (x == y) then
(if (y == z) then Equilateral else Isosceles)
else
(if (y == z) then Isosceles else Scalene)
Diego Cheda 10 / 32
Conditioned Slicing for First-Order Functional Programs
Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions
Contributions
Contributions
Definition of conditioned slicing for the domain of declarative
programming.
A slicing technique suitable to be applied to first-order
functional languages.
A prototype that implements the technique proposed in this
work.
Diego Cheda 11 / 32
Conditioned Slicing for First-Order Functional Programs
Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions
Syntax of a Simple Functional Language
(program) R ::= D1 . . . Dn
(functions) D ::= f (xn) = e
(expressions) e ::= t | case t of {pk → ek }
(terms) t :: = x | c(tn) | f (tn)
(patterns) p ::= c(xn)
Diego Cheda 12 / 32
Conditioned Slicing for First-Order Functional Programs
Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions
Semantics
Lazy Narrowing with Definitional Trees (LNT)
(fun eval) f(tn) =⇒id σ(e)
if f(xn) = e ∈ R, and σ = {xn → tn}
(case select) case c(tn) of {pk → ek } =⇒id σ(ei )
if pi = c(xn), c ∈ C, and σ = {xn → tn}
(case guess) case x of {pk → ek } =⇒σ σ(ei )
if σ = {x → pi }, and i ∈ {1, . . . , k}
(case eval) case t of {pk → ek } =⇒σ σ(case t of {pk → ek })
if t is not in head normal form and t =⇒σ t
LNT derivation, noted e0 =⇒∗
σ en, is a sequence
e0 =⇒σ1 . . . =⇒σn en, where σ = σn ◦ · · · ◦ σ1, and it is successful
when en is in head normal form.
Diego Cheda 13 / 32
Conditioned Slicing for First-Order Functional Programs
Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions
Slice Definition
Definition (Slice [Silva and Vidal, 2007])
Given a program R = Dn with Di = (f (xm) = e), R = Dn with
Di = (f (xm) = e ) is a slice of R, noted R R, iff e e
e e =



true if e = ⊥ or e = e
true if e = case x of {pk → ek},
e = case x of {pk → ek}, and
ek ek for all k.
false otherwise
Diego Cheda 14 / 32
Conditioned Slicing for First-Order Functional Programs
Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions
Conditioned Slicing Criterion
Definition (Conditioned Slicing Criterion)
Given a program R, a slicing criterion for R is (f (xn), φ, π) where
f is a function symbol such that f (xn) = e ∈ R, and
φ is a first-order logical formula on the arguments x1, . . . , xn
of f , and
π is a slicing pattern defined as follows:
π ∈ ⊥ | | c(πk)
where
c is a constructor symbol of arity k ≥ 0,
⊥ denotes a subexpression of the value whose computation is
not relevant, and
a subexpression which is relevant.
Diego Cheda 15 / 32
Conditioned Slicing for First-Order Functional Programs
Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions
Conditioned Slice
Definition (Conditioned Slice)
Given a program R, and SC = (f (xn), φ, π), R is a conditioned
slice w.r.t. (f (xn), φ, π), noted ¡(R, SC), iff
1 R R, and
2 xn satisfies φ, f (xn) =⇒∗
σ v with R, f (xn) =⇒∗
σ v with R ,
where v and v are values (i.e., in head normal form) such
that v = v , and σ = σ , and
3 v ∈ γ(π) and for all subterm v|p and π|q / p = q and
π|q = ⊥ where γ(π) is a concretization of π –i.e. v has the
shape of π–.
Diego Cheda 16 / 32
Conditioned Slicing for First-Order Functional Programs
Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions
Conditioned Slice
Example
¡(R, SC) with SC=(triangles x y z, x==y, Pair ⊥ ) is R :
triangle x y z = Pair (sum x y z)(kind x y z)
sum x y z = add x (add y z)
add Zero x = x
add (Succ x) y = (Succ (add x y))
kind x y z = if (x == y) then
(if (y == z) then Equilateral else Isosceles)
else
(if (y == z) then Isosceles else Scalene)
Diego Cheda 17 / 32
Conditioned Slicing for First-Order Functional Programs
Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions
Computing Conditioned Slicing
[Canfora et al, 1998]
Conditioned slice ∼ (forward) slice of a conditioned program.
Two phases slicing process:
1 We augment the language semantics to collect those part
of the program that can be executed when a logical formula
holds true.
We symbolically execute the program considering a logical
condition −→ conditioned program.
2 We (forward) slice the conditioned program w.r.t. a slicing
pattern in order to obtain the conditioned slice [Cheda, Silva
and Vidal, 2006].
Diego Cheda 18 / 32
Conditioned Slicing for First-Order Functional Programs
Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions
Augmented Semantics
Definition (Program Position [Ochoa el al, 2004])
A program position is a pair (f , q) where f is a function symbol
such that f (xn) = e and q is the position of a subterm of e.
Diego Cheda 19 / 32
Conditioned Slicing for First-Order Functional Programs
Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions
Augmented Semantics
(fun eval) f (tn), g, P, φ =⇒id σ(e), f , pp ∪ P, φ
if f (xn) = e ∈ R, σ = {xn → tn}, and
if f ∈ SC and φ ⇒ σ(xn) then pp = {(f , )} else pp = ∅
(case select) case c(tn) of {pk → ek }, g, P, φ =⇒id σ(ei ), g, pp ∪ P, φ
if pi = c(xn), c ∈ C, and σ = {xn → tn} then pp = {(g, 2.j) | j = i}
(case guess) case x of {pk → ek }, g, P, φ =⇒σ σ(ei ), g, pp ∪ P, φ
if σ = {x → pi }, i ∈ {1, . . . , k}, and
if g ∈ SC and φ ⇒ σ(x) then pp = {(g, 2.i)}, and φ = φ ∧ (x = pi )
else pp = ∅
(case eval) case t of {pk → ek }, g, P, φ =⇒σ σ(case t of {pk → ek }), g, P, φ
if t is not in head normal form and t =⇒σ t
Diego Cheda 20 / 32
Conditioned Slicing for First-Order Functional Programs
Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions
Conditioned Slicing Algorithm
Input: a program R, and SC = (f(xn), φ)
Output: conditioned program S
i = 0;
Si = { f (xn), f , , φ };
repeat
R = unfold(Si , R, φ);
Si+1 = abstract(Si , R );
i = i + 1;
until (Si = Si−1);
return build slice(Si ,R);
Diego Cheda 21 / 32
Conditioned Slicing for First-Order Functional Programs
Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions
Implementation
goal x = CSLICE (and x False) (x == False)
CSLICE x y = x
and x1 x2 = (FCase x1 of
(True -> (FCase x2 of
(True -> (True ))
(False -> (False ))
))
(False -> (FCase x2 of
(True -> (False ))
(False -> (False ))
Diego Cheda 22 / 32
Conditioned Slicing for First-Order Functional Programs
Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions
Implementation
goal x = CSLICE (and x False) (x == False)
CSLICE x y = x
In this function call:
(and x1 (False ))
this arguments x1, (False ), satisfy (== x1 (False )), ? [y / n] y
Diego Cheda 23 / 32
Conditioned Slicing for First-Order Functional Programs
Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions
Implementation
goal x = CSLICE (and x False) (x == False)
CSLICE x y = x
In this program fragment:
(FCase x1 of
(True -> (FCase (False ) of
(True -> (True ))
(False -> (False ))
)) )
if x1 is substituted by (-> x1 (True )), satisfy (== x1 (False )), ? [y
/ n] n
Diego Cheda 24 / 32
Conditioned Slicing for First-Order Functional Programs
Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions
Implementation
goal x = CSLICE (and x False) (x == False)
CSLICE x y = x
In this program fragment:
(FCase x1 of
(False -> (FCase (False ) of
(True -> (False ))
(False -> (False ))
))
)
if x1 is substituted by (-> x1 (False )), satisfy (== x1 (False )), ?
[y / n] y
Diego Cheda 25 / 32
Conditioned Slicing for First-Order Functional Programs
Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions
Implementation
goal x = CSLICE (and x False) (x == False)
CSLICE x y = x
[("and",[]),("and",[2,2]),("and",[2,2,2,2])]
and x1 x2 = (FCase x1 of
(True -> (FCase x2 of
(True -> (True ))
(False -> (False ))
))
(False -> (FCase x2 of
(True -> (False ))
(False -> (False ))
Diego Cheda 26 / 32
Conditioned Slicing for First-Order Functional Programs
Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions
Conclusions
We define conditioned slice for first-order functional programs.
We provide an algorithm to compute conditioned slice.
Conditioned slicing provides a common slicing framework for
both static and dynamic slices [Canfora et al, 1998].
Static slice can be computed using the conditioned slicing
criterion as (function, True, π),
Dynamic slice as (function, φ, π) where φ is composed by
concrete values on the inputs rather than a logical formula.
We implement a first prototype version of the conditioned
slicer.
Diego Cheda 27 / 32
Conditioned Slicing for First-Order Functional Programs
Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions
Publications
The following publications were made during the development of
the thesis project:
D. Cheda and S. Cavadini (INRIA),
Conditioned Slicing for First Order Functional Logic Languages.
In Proc. of the 17th Int’l WFLP 2008 - ENTCS.
D. Cheda and J. Silva,
An Evaluation of Algorithmic Debugger Implementations.
In Proc. of the 17th Int’l WFLP 2008 - ENTCS.
D. Cheda and J. Silva,
State of the Practice in Algorithmic Debugging. In PROLE 2007.
D. Cheda, J. Silva, and G. Vidal,
Static Slicing of Rewrite Systems. Proc. 15th Int’l WFLP 2006 -
ENTCS.
D. Cheda, J. Silva, and G. Vidal,
Term Dependence Graph. In PROLE 2006.
Diego Cheda 28 / 32
Conditioned Slicing for First-Order Functional Programs
Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions
Publications
Other publications:
S. Cavadini (INRIA) and D. Cheda,
Run-time Information Flow Monitoring based on Dynamic
Dependence Graphs,
3th Int’l Conference on Availability, Reliability and Security.
In IEEE Proceedings, pp. 586-591, 2008.
S. Cavadini (INRIA) and D. Cheda,
Program Slicing Based on Sentence Executability.
In XIII Congreso Argentino de Ciencias de la Computaci´on, 2007.
S. Cavadini (INRIA) and D. Cheda,
The Necessary Condition for Execution and its Use in Program
Slicing. In PROLE 2007.
Diego Cheda 29 / 32
Conditioned Slicing for First-Order Functional Programs
Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions
Future Work
We plan as future work:
Teorem Prover.
Abstract Interpretation.
Compare static and dynamic slices.
Diego Cheda 30 / 32
Thank you for your attention!
Conditioned Slicing for
First-Order Functional Programs
Author: Diego Cheda
Supervisor: Germ´an Vidal
DSIC, Universidad Polit´ecnica de Valencia
Camino de Vera s/n, 46022, Valencia, Espa˜na.
Conditioned Slicing for First-Order Functional Programs
Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions
Termination
Termination of the unfolding process (local termination), and
Termination of the repeat-until loop (global termination).
Diego Cheda 32 / 32

More Related Content

What's hot

ABC-Xian
ABC-XianABC-Xian
ABC-XianDeb Roy
 
ABC: How Bayesian can it be?
ABC: How Bayesian can it be?ABC: How Bayesian can it be?
ABC: How Bayesian can it be?Christian Robert
 
Lec 9 05_sept [compatibility mode]
Lec 9 05_sept [compatibility mode]Lec 9 05_sept [compatibility mode]
Lec 9 05_sept [compatibility mode]Palak Sanghani
 
Introduction to Stochastic calculus
Introduction to Stochastic calculusIntroduction to Stochastic calculus
Introduction to Stochastic calculusAshwin Rao
 
Multiclass Logistic Regression: Derivation and Apache Spark Examples
Multiclass Logistic Regression: Derivation and Apache Spark ExamplesMulticlass Logistic Regression: Derivation and Apache Spark Examples
Multiclass Logistic Regression: Derivation and Apache Spark ExamplesMarjan Sterjev
 
Several nonlinear models and methods for FDA
Several nonlinear models and methods for FDASeveral nonlinear models and methods for FDA
Several nonlinear models and methods for FDAtuxette
 
Signal Processing Course : Inverse Problems Regularization
Signal Processing Course : Inverse Problems RegularizationSignal Processing Course : Inverse Problems Regularization
Signal Processing Course : Inverse Problems RegularizationGabriel Peyré
 
Sums.of.equivalent.sequences.of.positive.operators.Taft.Beamer.Presentation
Sums.of.equivalent.sequences.of.positive.operators.Taft.Beamer.PresentationSums.of.equivalent.sequences.of.positive.operators.Taft.Beamer.Presentation
Sums.of.equivalent.sequences.of.positive.operators.Taft.Beamer.PresentationDragan (dragancn)
 
Derivative Free Optimization
Derivative Free OptimizationDerivative Free Optimization
Derivative Free OptimizationOlivier Teytaud
 
Investigación de Operaciones 022 programación lineal solución gráfica y geogebra
Investigación de Operaciones 022 programación lineal solución gráfica y geogebraInvestigación de Operaciones 022 programación lineal solución gráfica y geogebra
Investigación de Operaciones 022 programación lineal solución gráfica y geogebraJorge Pablo Rivas
 
Sequential experimentation in clinical trials
Sequential experimentation in clinical trialsSequential experimentation in clinical trials
Sequential experimentation in clinical trialsSpringer
 
Basic deep learning & Deep learning application to medicine
Basic deep learning & Deep learning application to medicineBasic deep learning & Deep learning application to medicine
Basic deep learning & Deep learning application to medicineHongyoon Choi
 
Low Complexity Regularization of Inverse Problems - Course #1 Inverse Problems
Low Complexity Regularization of Inverse Problems - Course #1 Inverse ProblemsLow Complexity Regularization of Inverse Problems - Course #1 Inverse Problems
Low Complexity Regularization of Inverse Problems - Course #1 Inverse ProblemsGabriel Peyré
 
Unit i
Unit i Unit i
Unit i sunmo
 
Discrete Logarithm Problem over Prime Fields, Non-canonical Lifts and Logarit...
Discrete Logarithm Problem over Prime Fields, Non-canonical Lifts and Logarit...Discrete Logarithm Problem over Prime Fields, Non-canonical Lifts and Logarit...
Discrete Logarithm Problem over Prime Fields, Non-canonical Lifts and Logarit...PadmaGadiyar
 
Eigen value , eigen vectors, caley hamilton theorem
Eigen value , eigen vectors, caley hamilton theoremEigen value , eigen vectors, caley hamilton theorem
Eigen value , eigen vectors, caley hamilton theoremgidc engineering college
 

What's hot (20)

ABC-Xian
ABC-XianABC-Xian
ABC-Xian
 
ABC: How Bayesian can it be?
ABC: How Bayesian can it be?ABC: How Bayesian can it be?
ABC: How Bayesian can it be?
 
Lec 9 05_sept [compatibility mode]
Lec 9 05_sept [compatibility mode]Lec 9 05_sept [compatibility mode]
Lec 9 05_sept [compatibility mode]
 
Stochastic calculus
Stochastic calculus Stochastic calculus
Stochastic calculus
 
Introduction to Stochastic calculus
Introduction to Stochastic calculusIntroduction to Stochastic calculus
Introduction to Stochastic calculus
 
Multiclass Logistic Regression: Derivation and Apache Spark Examples
Multiclass Logistic Regression: Derivation and Apache Spark ExamplesMulticlass Logistic Regression: Derivation and Apache Spark Examples
Multiclass Logistic Regression: Derivation and Apache Spark Examples
 
Several nonlinear models and methods for FDA
Several nonlinear models and methods for FDASeveral nonlinear models and methods for FDA
Several nonlinear models and methods for FDA
 
Signal Processing Course : Inverse Problems Regularization
Signal Processing Course : Inverse Problems RegularizationSignal Processing Course : Inverse Problems Regularization
Signal Processing Course : Inverse Problems Regularization
 
Sums.of.equivalent.sequences.of.positive.operators.Taft.Beamer.Presentation
Sums.of.equivalent.sequences.of.positive.operators.Taft.Beamer.PresentationSums.of.equivalent.sequences.of.positive.operators.Taft.Beamer.Presentation
Sums.of.equivalent.sequences.of.positive.operators.Taft.Beamer.Presentation
 
Derivative Free Optimization
Derivative Free OptimizationDerivative Free Optimization
Derivative Free Optimization
 
Investigación de Operaciones 022 programación lineal solución gráfica y geogebra
Investigación de Operaciones 022 programación lineal solución gráfica y geogebraInvestigación de Operaciones 022 programación lineal solución gráfica y geogebra
Investigación de Operaciones 022 programación lineal solución gráfica y geogebra
 
Sequential experimentation in clinical trials
Sequential experimentation in clinical trialsSequential experimentation in clinical trials
Sequential experimentation in clinical trials
 
QMC Opening Workshop, High Accuracy Algorithms for Interpolating and Integrat...
QMC Opening Workshop, High Accuracy Algorithms for Interpolating and Integrat...QMC Opening Workshop, High Accuracy Algorithms for Interpolating and Integrat...
QMC Opening Workshop, High Accuracy Algorithms for Interpolating and Integrat...
 
Basic deep learning & Deep learning application to medicine
Basic deep learning & Deep learning application to medicineBasic deep learning & Deep learning application to medicine
Basic deep learning & Deep learning application to medicine
 
Maths
MathsMaths
Maths
 
Low Complexity Regularization of Inverse Problems - Course #1 Inverse Problems
Low Complexity Regularization of Inverse Problems - Course #1 Inverse ProblemsLow Complexity Regularization of Inverse Problems - Course #1 Inverse Problems
Low Complexity Regularization of Inverse Problems - Course #1 Inverse Problems
 
Unit i
Unit i Unit i
Unit i
 
Discrete Logarithm Problem over Prime Fields, Non-canonical Lifts and Logarit...
Discrete Logarithm Problem over Prime Fields, Non-canonical Lifts and Logarit...Discrete Logarithm Problem over Prime Fields, Non-canonical Lifts and Logarit...
Discrete Logarithm Problem over Prime Fields, Non-canonical Lifts and Logarit...
 
E10
E10E10
E10
 
Eigen value , eigen vectors, caley hamilton theorem
Eigen value , eigen vectors, caley hamilton theoremEigen value , eigen vectors, caley hamilton theorem
Eigen value , eigen vectors, caley hamilton theorem
 

Viewers also liked

JN Hybrid Stove
JN Hybrid StoveJN Hybrid Stove
JN Hybrid StoveNaman Jain
 
Praktyczna komoda w domu - inspiracje
Praktyczna komoda w domu - inspiracjePraktyczna komoda w domu - inspiracje
Praktyczna komoda w domu - inspiracjeAAAA Sp.z o.o.
 
Speed & Conditioning Running
Speed & Conditioning RunningSpeed & Conditioning Running
Speed & Conditioning RunningAmy White
 
Dissertation writing tips
Dissertation writing tipsDissertation writing tips
Dissertation writing tipsSamuel Gibbs
 
Tax Myths and Facts-July 2016
Tax Myths and Facts-July 2016Tax Myths and Facts-July 2016
Tax Myths and Facts-July 2016Andrew Schwartz
 
Get started with dropbox
Get started with dropboxGet started with dropbox
Get started with dropboxjoydvn
 
Kinetic Asymmetries During Submaximal and Maximal Speed Running
Kinetic Asymmetries During Submaximal and Maximal Speed RunningKinetic Asymmetries During Submaximal and Maximal Speed Running
Kinetic Asymmetries During Submaximal and Maximal Speed RunningDevon Frayne, MSc.
 
Obavijest učenicima zimski praznici-2015-16
Obavijest učenicima zimski praznici-2015-16Obavijest učenicima zimski praznici-2015-16
Obavijest učenicima zimski praznici-2015-16Trgovacka skola - Zagreb
 
Business process reengineering
Business process reengineeringBusiness process reengineering
Business process reengineeringSamuel Gibbs
 
كتيب النقل البري الدولى
كتيب النقل البري الدولىكتيب النقل البري الدولى
كتيب النقل البري الدولىBahlol Services
 

Viewers also liked (16)

JN Hybrid Stove
JN Hybrid StoveJN Hybrid Stove
JN Hybrid Stove
 
Praktyczna komoda w domu - inspiracje
Praktyczna komoda w domu - inspiracjePraktyczna komoda w domu - inspiracje
Praktyczna komoda w domu - inspiracje
 
Speed & Conditioning Running
Speed & Conditioning RunningSpeed & Conditioning Running
Speed & Conditioning Running
 
Spain
SpainSpain
Spain
 
Odluka za-sistematski-pregled-2015
Odluka za-sistematski-pregled-2015Odluka za-sistematski-pregled-2015
Odluka za-sistematski-pregled-2015
 
Obrana zavrsni rad_2014-2015_zima
Obrana zavrsni rad_2014-2015_zimaObrana zavrsni rad_2014-2015_zima
Obrana zavrsni rad_2014-2015_zima
 
Dissertation writing tips
Dissertation writing tipsDissertation writing tips
Dissertation writing tips
 
Tax Myths and Facts-July 2016
Tax Myths and Facts-July 2016Tax Myths and Facts-July 2016
Tax Myths and Facts-July 2016
 
Get started with dropbox
Get started with dropboxGet started with dropbox
Get started with dropbox
 
Kinetic Asymmetries During Submaximal and Maximal Speed Running
Kinetic Asymmetries During Submaximal and Maximal Speed RunningKinetic Asymmetries During Submaximal and Maximal Speed Running
Kinetic Asymmetries During Submaximal and Maximal Speed Running
 
Obavijest učenicima zimski praznici-2015-16
Obavijest učenicima zimski praznici-2015-16Obavijest učenicima zimski praznici-2015-16
Obavijest učenicima zimski praznici-2015-16
 
Dasrat goswami (3)
Dasrat goswami (3)Dasrat goswami (3)
Dasrat goswami (3)
 
Business process reengineering
Business process reengineeringBusiness process reengineering
Business process reengineering
 
كتيب النقل البري الدولى
كتيب النقل البري الدولىكتيب النقل البري الدولى
كتيب النقل البري الدولى
 
Poziv 66. sjednica
Poziv   66. sjednicaPoziv   66. sjednica
Poziv 66. sjednica
 
Zapisnik sa 66. sjednice
Zapisnik sa 66. sjedniceZapisnik sa 66. sjednice
Zapisnik sa 66. sjednice
 

Similar to presentacion

Integral Calculus Anti Derivatives reviewer
Integral Calculus Anti Derivatives reviewerIntegral Calculus Anti Derivatives reviewer
Integral Calculus Anti Derivatives reviewerJoshuaAgcopra
 
Practical and Worst-Case Efficient Apportionment
Practical and Worst-Case Efficient ApportionmentPractical and Worst-Case Efficient Apportionment
Practical and Worst-Case Efficient ApportionmentRaphael Reitzig
 
Detecting Bugs in Binaries Using Decompilation and Data Flow Analysis
Detecting Bugs in Binaries Using Decompilation and Data Flow AnalysisDetecting Bugs in Binaries Using Decompilation and Data Flow Analysis
Detecting Bugs in Binaries Using Decompilation and Data Flow AnalysisSilvio Cesare
 
Low Complexity Regularization of Inverse Problems
Low Complexity Regularization of Inverse ProblemsLow Complexity Regularization of Inverse Problems
Low Complexity Regularization of Inverse ProblemsGabriel Peyré
 
Antidifferentiation.pptAntidifferentiation.pptAntidifferentiation.pptAntidiff...
Antidifferentiation.pptAntidifferentiation.pptAntidifferentiation.pptAntidiff...Antidifferentiation.pptAntidifferentiation.pptAntidifferentiation.pptAntidiff...
Antidifferentiation.pptAntidifferentiation.pptAntidifferentiation.pptAntidiff...DenmarkSantos3
 
Accelerating Metropolis Hastings with Lightweight Inference Compilation
Accelerating Metropolis Hastings with Lightweight Inference CompilationAccelerating Metropolis Hastings with Lightweight Inference Compilation
Accelerating Metropolis Hastings with Lightweight Inference CompilationFeynman Liang
 
Scala as a Declarative Language
Scala as a Declarative LanguageScala as a Declarative Language
Scala as a Declarative Languagevsssuresh
 
Container and algorithms(C++)
Container and algorithms(C++)Container and algorithms(C++)
Container and algorithms(C++)JerryHe
 
Murphy: Machine learning A probabilistic perspective: Ch.9
Murphy: Machine learning A probabilistic perspective: Ch.9Murphy: Machine learning A probabilistic perspective: Ch.9
Murphy: Machine learning A probabilistic perspective: Ch.9Daisuke Yoneoka
 
Day_1_-_Rules_for_Differentiation (1).ppt
Day_1_-_Rules_for_Differentiation (1).pptDay_1_-_Rules_for_Differentiation (1).ppt
Day_1_-_Rules_for_Differentiation (1).pptVenuAravind10A
 
Statement of stochastic programming problems
Statement of stochastic programming problemsStatement of stochastic programming problems
Statement of stochastic programming problemsSSA KPI
 
Problem Understanding through Landscape Theory
Problem Understanding through Landscape TheoryProblem Understanding through Landscape Theory
Problem Understanding through Landscape Theoryjfrchicanog
 
Rules_for_Differentiation.ppt
Rules_for_Differentiation.pptRules_for_Differentiation.ppt
Rules_for_Differentiation.pptjimj87313
 

Similar to presentacion (20)

Integral Calculus Anti Derivatives reviewer
Integral Calculus Anti Derivatives reviewerIntegral Calculus Anti Derivatives reviewer
Integral Calculus Anti Derivatives reviewer
 
Practical and Worst-Case Efficient Apportionment
Practical and Worst-Case Efficient ApportionmentPractical and Worst-Case Efficient Apportionment
Practical and Worst-Case Efficient Apportionment
 
Detecting Bugs in Binaries Using Decompilation and Data Flow Analysis
Detecting Bugs in Binaries Using Decompilation and Data Flow AnalysisDetecting Bugs in Binaries Using Decompilation and Data Flow Analysis
Detecting Bugs in Binaries Using Decompilation and Data Flow Analysis
 
Automatic bayesian cubature
Automatic bayesian cubatureAutomatic bayesian cubature
Automatic bayesian cubature
 
Low Complexity Regularization of Inverse Problems
Low Complexity Regularization of Inverse ProblemsLow Complexity Regularization of Inverse Problems
Low Complexity Regularization of Inverse Problems
 
Antidifferentiation.pptAntidifferentiation.pptAntidifferentiation.pptAntidiff...
Antidifferentiation.pptAntidifferentiation.pptAntidifferentiation.pptAntidiff...Antidifferentiation.pptAntidifferentiation.pptAntidifferentiation.pptAntidiff...
Antidifferentiation.pptAntidifferentiation.pptAntidifferentiation.pptAntidiff...
 
Antidifferentiation.ppt
Antidifferentiation.pptAntidifferentiation.ppt
Antidifferentiation.ppt
 
Accelerating Metropolis Hastings with Lightweight Inference Compilation
Accelerating Metropolis Hastings with Lightweight Inference CompilationAccelerating Metropolis Hastings with Lightweight Inference Compilation
Accelerating Metropolis Hastings with Lightweight Inference Compilation
 
Scala as a Declarative Language
Scala as a Declarative LanguageScala as a Declarative Language
Scala as a Declarative Language
 
Container and algorithms(C++)
Container and algorithms(C++)Container and algorithms(C++)
Container and algorithms(C++)
 
ML unit-1.pptx
ML unit-1.pptxML unit-1.pptx
ML unit-1.pptx
 
AlgorithmAnalysis2.ppt
AlgorithmAnalysis2.pptAlgorithmAnalysis2.ppt
AlgorithmAnalysis2.ppt
 
Murphy: Machine learning A probabilistic perspective: Ch.9
Murphy: Machine learning A probabilistic perspective: Ch.9Murphy: Machine learning A probabilistic perspective: Ch.9
Murphy: Machine learning A probabilistic perspective: Ch.9
 
Day_1_-_Rules_for_Differentiation (1).ppt
Day_1_-_Rules_for_Differentiation (1).pptDay_1_-_Rules_for_Differentiation (1).ppt
Day_1_-_Rules_for_Differentiation (1).ppt
 
R Language Introduction
R Language IntroductionR Language Introduction
R Language Introduction
 
Statement of stochastic programming problems
Statement of stochastic programming problemsStatement of stochastic programming problems
Statement of stochastic programming problems
 
Problem Understanding through Landscape Theory
Problem Understanding through Landscape TheoryProblem Understanding through Landscape Theory
Problem Understanding through Landscape Theory
 
ma112011id535
ma112011id535ma112011id535
ma112011id535
 
Rules_for_Differentiation.ppt
Rules_for_Differentiation.pptRules_for_Differentiation.ppt
Rules_for_Differentiation.ppt
 
Matlab integration
Matlab integrationMatlab integration
Matlab integration
 

presentacion

  • 1. Conditioned Slicing for First-Order Functional Programs Author: Diego Cheda Supervisor: Germ´an Vidal DSIC, Universidad Polit´ecnica de Valencia Camino de Vera s/n, 46022, Valencia, Espa˜na. — Septiembre de 2008 —
  • 2. Conditioned Slicing for First-Order Functional Programs Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions Summary 1 Motivation 2 Contributions 3 Preliminaries 4 Conditioned Slicing 5 Computing Conditioned Slicing 6 Conclusions Diego Cheda 2 / 32
  • 3. Conditioned Slicing for First-Order Functional Programs Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions Motivation Motivation [Wadler, 1998] → Why No One Uses Functional Languages [Peyton Jones et al, 2007] → A History of Haskell [Cheda and Silva, 2008] → State of the Practice in Alg. Debugging Improvements to address effective and efficiently errors detection in functional programs. Functional programs debugging: traditionals, profiling, tracing, algorithmic debugging, and program slicing. Diego Cheda 3 / 32
  • 4. Conditioned Slicing for First-Order Functional Programs Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions Motivation Program Slicing [Mark Weiser, 1979] Extract sentences that are related to some criterion Slicing criterion Example P r o g r a m Slice Slicing Criterion Applications debugging, comprehension, maintenance, testing, parallelization, integration, reverse engineering, program restructuring, etc. Diego Cheda 4 / 32
  • 5. Conditioned Slicing for First-Order Functional Programs Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions Motivation Static Slicing [Cheda, Silva and Vidal, 2006] TDG Slicing Criterion: (function, slicing pattern) where function is an initial function call, and slicing pattern [Ochoa et al, 2004] denotes the shape of the result (constructor term) by ignoring part of its term structure. • ⊥ denotes a subexpression whose computation is not relevant. • a subexpression which is relevant. Diego Cheda 5 / 32
  • 6. Conditioned Slicing for First-Order Functional Programs Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions Motivation Example Static Slicing Criterion: (triangle x y z, Pair ⊥ ) triangle x y z = Pair (sum x y z)(kind x y z) sum x y z = add x (add y z) add Zero x = x add (Succ x) y = (Succ (add x y)) kind x y z = if (x == y) then (if (y == z) then Equilateral else Isosceles) else (if (y == z) then Isosceles else Scalene) Diego Cheda 6 / 32
  • 7. Conditioned Slicing for First-Order Functional Programs Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions Motivation Dynamic Slicing [Ochoa, Silva and Vidal, 2004] Redex Trails Slicing Criterion: (function, partial value, slicing pattern) where function is an initial function call with concrete argument values, and partial value is a partial value obtained as result, slicing pattern denotes which part of the function result is relevant or not. Diego Cheda 7 / 32
  • 8. Conditioned Slicing for First-Order Functional Programs Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions Motivation Example Dynamic Slicing Criterion: (main, Pair Equilateral, Pair ⊥ ) main = triangle (Succ Zero) (Succ Zero) (Succ Zero) triangle x y z = Pair (sum x y z)(kind x y z) sum x y z = add x (add y z) add Zero x = x add (Succ x) y = (Succ (add x y)) kind x y z = if (x == y) then (if (y == z) then Equilateral else Isosceles) else (if (y == z) then Isosceles else Scalene) Diego Cheda 8 / 32
  • 9. Conditioned Slicing for First-Order Functional Programs Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions Motivation Conditioned Slicing [Canfora et al, 1998] Slicing Criterion: (function, logical formula, slicing pattern) where function is an initial function call, logical formula is a logical formula on the input variables, and slicing pattern denotes which part of the function result is relevant or not. Important As far as we know, conditioned slicing has not been defined before in the declarative paradigm. Diego Cheda 9 / 32
  • 10. Conditioned Slicing for First-Order Functional Programs Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions Motivation Example Conditioned Slicing Criterion: (triangles x y z, x==y, Pair ⊥ ) triangle x y z = Pair (sum x y z)(kind x y z) sum x y z = add x (add y z) add Zero x = x add (Succ x) y = (Succ (add x y)) kind x y z = if (x == y) then (if (y == z) then Equilateral else Isosceles) else (if (y == z) then Isosceles else Scalene) Diego Cheda 10 / 32
  • 11. Conditioned Slicing for First-Order Functional Programs Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions Contributions Contributions Definition of conditioned slicing for the domain of declarative programming. A slicing technique suitable to be applied to first-order functional languages. A prototype that implements the technique proposed in this work. Diego Cheda 11 / 32
  • 12. Conditioned Slicing for First-Order Functional Programs Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions Syntax of a Simple Functional Language (program) R ::= D1 . . . Dn (functions) D ::= f (xn) = e (expressions) e ::= t | case t of {pk → ek } (terms) t :: = x | c(tn) | f (tn) (patterns) p ::= c(xn) Diego Cheda 12 / 32
  • 13. Conditioned Slicing for First-Order Functional Programs Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions Semantics Lazy Narrowing with Definitional Trees (LNT) (fun eval) f(tn) =⇒id σ(e) if f(xn) = e ∈ R, and σ = {xn → tn} (case select) case c(tn) of {pk → ek } =⇒id σ(ei ) if pi = c(xn), c ∈ C, and σ = {xn → tn} (case guess) case x of {pk → ek } =⇒σ σ(ei ) if σ = {x → pi }, and i ∈ {1, . . . , k} (case eval) case t of {pk → ek } =⇒σ σ(case t of {pk → ek }) if t is not in head normal form and t =⇒σ t LNT derivation, noted e0 =⇒∗ σ en, is a sequence e0 =⇒σ1 . . . =⇒σn en, where σ = σn ◦ · · · ◦ σ1, and it is successful when en is in head normal form. Diego Cheda 13 / 32
  • 14. Conditioned Slicing for First-Order Functional Programs Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions Slice Definition Definition (Slice [Silva and Vidal, 2007]) Given a program R = Dn with Di = (f (xm) = e), R = Dn with Di = (f (xm) = e ) is a slice of R, noted R R, iff e e e e =    true if e = ⊥ or e = e true if e = case x of {pk → ek}, e = case x of {pk → ek}, and ek ek for all k. false otherwise Diego Cheda 14 / 32
  • 15. Conditioned Slicing for First-Order Functional Programs Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions Conditioned Slicing Criterion Definition (Conditioned Slicing Criterion) Given a program R, a slicing criterion for R is (f (xn), φ, π) where f is a function symbol such that f (xn) = e ∈ R, and φ is a first-order logical formula on the arguments x1, . . . , xn of f , and π is a slicing pattern defined as follows: π ∈ ⊥ | | c(πk) where c is a constructor symbol of arity k ≥ 0, ⊥ denotes a subexpression of the value whose computation is not relevant, and a subexpression which is relevant. Diego Cheda 15 / 32
  • 16. Conditioned Slicing for First-Order Functional Programs Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions Conditioned Slice Definition (Conditioned Slice) Given a program R, and SC = (f (xn), φ, π), R is a conditioned slice w.r.t. (f (xn), φ, π), noted ¡(R, SC), iff 1 R R, and 2 xn satisfies φ, f (xn) =⇒∗ σ v with R, f (xn) =⇒∗ σ v with R , where v and v are values (i.e., in head normal form) such that v = v , and σ = σ , and 3 v ∈ γ(π) and for all subterm v|p and π|q / p = q and π|q = ⊥ where γ(π) is a concretization of π –i.e. v has the shape of π–. Diego Cheda 16 / 32
  • 17. Conditioned Slicing for First-Order Functional Programs Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions Conditioned Slice Example ¡(R, SC) with SC=(triangles x y z, x==y, Pair ⊥ ) is R : triangle x y z = Pair (sum x y z)(kind x y z) sum x y z = add x (add y z) add Zero x = x add (Succ x) y = (Succ (add x y)) kind x y z = if (x == y) then (if (y == z) then Equilateral else Isosceles) else (if (y == z) then Isosceles else Scalene) Diego Cheda 17 / 32
  • 18. Conditioned Slicing for First-Order Functional Programs Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions Computing Conditioned Slicing [Canfora et al, 1998] Conditioned slice ∼ (forward) slice of a conditioned program. Two phases slicing process: 1 We augment the language semantics to collect those part of the program that can be executed when a logical formula holds true. We symbolically execute the program considering a logical condition −→ conditioned program. 2 We (forward) slice the conditioned program w.r.t. a slicing pattern in order to obtain the conditioned slice [Cheda, Silva and Vidal, 2006]. Diego Cheda 18 / 32
  • 19. Conditioned Slicing for First-Order Functional Programs Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions Augmented Semantics Definition (Program Position [Ochoa el al, 2004]) A program position is a pair (f , q) where f is a function symbol such that f (xn) = e and q is the position of a subterm of e. Diego Cheda 19 / 32
  • 20. Conditioned Slicing for First-Order Functional Programs Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions Augmented Semantics (fun eval) f (tn), g, P, φ =⇒id σ(e), f , pp ∪ P, φ if f (xn) = e ∈ R, σ = {xn → tn}, and if f ∈ SC and φ ⇒ σ(xn) then pp = {(f , )} else pp = ∅ (case select) case c(tn) of {pk → ek }, g, P, φ =⇒id σ(ei ), g, pp ∪ P, φ if pi = c(xn), c ∈ C, and σ = {xn → tn} then pp = {(g, 2.j) | j = i} (case guess) case x of {pk → ek }, g, P, φ =⇒σ σ(ei ), g, pp ∪ P, φ if σ = {x → pi }, i ∈ {1, . . . , k}, and if g ∈ SC and φ ⇒ σ(x) then pp = {(g, 2.i)}, and φ = φ ∧ (x = pi ) else pp = ∅ (case eval) case t of {pk → ek }, g, P, φ =⇒σ σ(case t of {pk → ek }), g, P, φ if t is not in head normal form and t =⇒σ t Diego Cheda 20 / 32
  • 21. Conditioned Slicing for First-Order Functional Programs Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions Conditioned Slicing Algorithm Input: a program R, and SC = (f(xn), φ) Output: conditioned program S i = 0; Si = { f (xn), f , , φ }; repeat R = unfold(Si , R, φ); Si+1 = abstract(Si , R ); i = i + 1; until (Si = Si−1); return build slice(Si ,R); Diego Cheda 21 / 32
  • 22. Conditioned Slicing for First-Order Functional Programs Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions Implementation goal x = CSLICE (and x False) (x == False) CSLICE x y = x and x1 x2 = (FCase x1 of (True -> (FCase x2 of (True -> (True )) (False -> (False )) )) (False -> (FCase x2 of (True -> (False )) (False -> (False )) Diego Cheda 22 / 32
  • 23. Conditioned Slicing for First-Order Functional Programs Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions Implementation goal x = CSLICE (and x False) (x == False) CSLICE x y = x In this function call: (and x1 (False )) this arguments x1, (False ), satisfy (== x1 (False )), ? [y / n] y Diego Cheda 23 / 32
  • 24. Conditioned Slicing for First-Order Functional Programs Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions Implementation goal x = CSLICE (and x False) (x == False) CSLICE x y = x In this program fragment: (FCase x1 of (True -> (FCase (False ) of (True -> (True )) (False -> (False )) )) ) if x1 is substituted by (-> x1 (True )), satisfy (== x1 (False )), ? [y / n] n Diego Cheda 24 / 32
  • 25. Conditioned Slicing for First-Order Functional Programs Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions Implementation goal x = CSLICE (and x False) (x == False) CSLICE x y = x In this program fragment: (FCase x1 of (False -> (FCase (False ) of (True -> (False )) (False -> (False )) )) ) if x1 is substituted by (-> x1 (False )), satisfy (== x1 (False )), ? [y / n] y Diego Cheda 25 / 32
  • 26. Conditioned Slicing for First-Order Functional Programs Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions Implementation goal x = CSLICE (and x False) (x == False) CSLICE x y = x [("and",[]),("and",[2,2]),("and",[2,2,2,2])] and x1 x2 = (FCase x1 of (True -> (FCase x2 of (True -> (True )) (False -> (False )) )) (False -> (FCase x2 of (True -> (False )) (False -> (False )) Diego Cheda 26 / 32
  • 27. Conditioned Slicing for First-Order Functional Programs Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions Conclusions We define conditioned slice for first-order functional programs. We provide an algorithm to compute conditioned slice. Conditioned slicing provides a common slicing framework for both static and dynamic slices [Canfora et al, 1998]. Static slice can be computed using the conditioned slicing criterion as (function, True, π), Dynamic slice as (function, φ, π) where φ is composed by concrete values on the inputs rather than a logical formula. We implement a first prototype version of the conditioned slicer. Diego Cheda 27 / 32
  • 28. Conditioned Slicing for First-Order Functional Programs Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions Publications The following publications were made during the development of the thesis project: D. Cheda and S. Cavadini (INRIA), Conditioned Slicing for First Order Functional Logic Languages. In Proc. of the 17th Int’l WFLP 2008 - ENTCS. D. Cheda and J. Silva, An Evaluation of Algorithmic Debugger Implementations. In Proc. of the 17th Int’l WFLP 2008 - ENTCS. D. Cheda and J. Silva, State of the Practice in Algorithmic Debugging. In PROLE 2007. D. Cheda, J. Silva, and G. Vidal, Static Slicing of Rewrite Systems. Proc. 15th Int’l WFLP 2006 - ENTCS. D. Cheda, J. Silva, and G. Vidal, Term Dependence Graph. In PROLE 2006. Diego Cheda 28 / 32
  • 29. Conditioned Slicing for First-Order Functional Programs Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions Publications Other publications: S. Cavadini (INRIA) and D. Cheda, Run-time Information Flow Monitoring based on Dynamic Dependence Graphs, 3th Int’l Conference on Availability, Reliability and Security. In IEEE Proceedings, pp. 586-591, 2008. S. Cavadini (INRIA) and D. Cheda, Program Slicing Based on Sentence Executability. In XIII Congreso Argentino de Ciencias de la Computaci´on, 2007. S. Cavadini (INRIA) and D. Cheda, The Necessary Condition for Execution and its Use in Program Slicing. In PROLE 2007. Diego Cheda 29 / 32
  • 30. Conditioned Slicing for First-Order Functional Programs Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions Future Work We plan as future work: Teorem Prover. Abstract Interpretation. Compare static and dynamic slices. Diego Cheda 30 / 32
  • 31. Thank you for your attention! Conditioned Slicing for First-Order Functional Programs Author: Diego Cheda Supervisor: Germ´an Vidal DSIC, Universidad Polit´ecnica de Valencia Camino de Vera s/n, 46022, Valencia, Espa˜na.
  • 32. Conditioned Slicing for First-Order Functional Programs Motivation Contributions Preliminaries Conditioned Slicing Computing Conditioned Slicing Conclusions Termination Termination of the unfolding process (local termination), and Termination of the repeat-until loop (global termination). Diego Cheda 32 / 32