next_inactive up previous






Computational Logic:
(Constraint) Logic Programming
Theory, practice, and implementation


Abstract Specialization
and its Applications

Program Optimization and Specialization

Some Techniques for Program Specialization

Partial Evaluation

Abstract Specialization

Abstract Interpretation / Safe Approximation [CC77]

Abstract Interpretation (cont.)

A Simple Motivating Example

Partial Evaluation of Our Simple Example

The need for Abstract Values

The Substitutions Computed by Abstract Interpretation

p(Value,Res) :-
             true(( term(Value), term(Res), term(Tmp) )),
        Tmp is Value * 3,
             true(( arithexpression(Value), term(Res), num(Tmp) )),
        plus1(Tmp,Res),
             true((arithexpression(Value), arithexpression(Res),num(Tmp))).
plus1(X,Y) :-
             true(( num(X), term(Y) )),
        ground(X),
             true(( num(X), term(Y) )),
        Y is X+1,
             true(( num(X), num(Y) )).
plus1(X,Y) :-
             true(( num(X), term(Y) )),
        var(X),
             true(( num(X), term(Y) )),
        X is Y-1,
             true(( num(X), arithexpression(Y) )).

Program Specialized w.r.t. Abstract Values

Abstract Executability

The Need for Approximating Success Substitutions

The Need for Polyvariant Specialization

The Need for Polyvariant Specialization (Cont.)

The Need for Polyvariant Specialization (Cont.)

The Need for Polyvariant Specialization (Cont.)

Which Additional Versions Should We Generate?

Difficulties in Controlling Polyvariance: Spurious Versions

Difficulties in Controlling Polyvariance: Insufficient Versions

Difficulties in Controlling Polyvariance: Insufficient Versions

<<580>>

Polyvariant Abstract Interpretation

Abstract Interpretation based on And-Or Graphs

The Polyvariant Program Induced by Abstract Interpretation

The Need for a Minimizing Algorithm

DEMO: Automatic Parallelization

<<609>>

<605>>

Automatic Program Parallelization



figure=par_process_wide.ps,height=0.4

Automatic Program Parallelization (Contd.)

&-Prolog/Ciao parallelizer overview

figure=/home/clip/Slides/nmsu_lectures/par/Figs/apcompiler.ps,width=0.7

Optimization of Dynamic Scheduling

<583>>

Dynamic Scheduling - Intro

Dynamic Scheduling - Reordering

Dynamic Scheduling - Difficulties for Reordering

Integration with Partial Evaluation

Drawbacks of Traditional On-line PE (1/2)

Drawbacks of Traditional On-line PE (2/2)

And-Or Graphs Vs. SLD Trees

Integrating PE into Abstract Interpretation

<584>>

Another Example

Related Work on Integration of PE and AI

Ongoing and Future Work

The ASAP Project

Comparison with On-Line Partial Evaluation


Feature PE AS
Information captured concrete abstract
Propagation of information unfolding abstract interpretation
Polyvariance control global control abstract domain
Guaranteeing termination generalization widening
Version selection renaming renaming
Materializing optimizations unfolding abstract executability
Fixpoint computations no yes
Propagation among atoms no yes
Infinite failure non observable observable
Low level optimization non-applicable applicable
Minimization of versions no/yes yes

Conclusions

»²¹حت¸¸¥

1
F. Bueno, D. Cabeza, M. Carro, M. Hermenegildo, P. López-García, and G. Puebla.
The Ciao Prolog System. Reference Manual.
The Ciao System Documentation Series-TR CLIP3/97.1, School of Computer Science, Technical University of Madrid (UPM), August 1997.
System and on-line version of the manual available at http://clip.dia.fi.upm.es/Software/Ciao/.

2
F. Bueno, D. Cabeza, M. Hermenegildo, and G. Puebla.
Global Analysis of Standard Prolog Programs.
In European Symposium on Programming, number 1058 in LNCS, pages 108-124, Sweden, April 1996. Springer-Verlag.

3
F. Bueno, M. García de la Banda, M. Hermenegildo, K. Marriott, G. Puebla, and P. Stuckey.
A Model for Inter-module Analysis and Optimizing Compilation.
In Logic-based Program Synthesis and Transformation, number 2042 in LNCS, pages 86-102. Springer-Verlag, March 2001.

4
M. Hermenegildo, G. Puebla, and F. Bueno.
Using Global Analysis, Partial Specifications, and an Extensible Assertion Language for Program Validation and Debugging.
In K. R. Apt, V. Marek, M. Truszczynski, and D. S. Warren, editors, The Logic Programming Paradigm: a 25-Year Perspective, pages 161-192. Springer-Verlag, July 1999.

5
M. Hermenegildo, G. Puebla, F. Bueno, and P. López-García.
Abstract Verification and Debugging of Constraint Logic Programs.
In Recent Advances in Constraints, number 2627 in LNCS, pages 1-14. Springer-Verlag, January 2003.

6
M. Hermenegildo, G. Puebla, F. Bueno, and P. López-García.
Program Development Using Abstract Interpretation (and The Ciao System Preprocessor).
In 10th International Static Analysis Symposium (SAS'03), number 2694 in LNCS, pages 127-152. Springer-Verlag, June 2003.

7
M. Hermenegildo, G. Puebla, K. Marriott, and P. Stuckey.
Incremental Analysis of Logic Programs.
In International Conference on Logic Programming, pages 797-811. MIT Press, June 1995.

8
G. Puebla, F. Bueno, and M. Hermenegildo.
A Generic Preprocessor for Program Validation and Debugging.
In P. Deransart, M. Hermenegildo, and J. Maluszynski, editors, Analysis and Visualization Tools for Constraint Programming, number 1870 in LNCS, pages 63-107. Springer-Verlag, September 2000.

9
G. Puebla, F. Bueno, and M. Hermenegildo.
An Assertion Language for Constraint Logic Programs.
In P. Deransart, M. Hermenegildo, and J. Maluszynski, editors, Analysis and Visualization Tools for Constraint Programming, number 1870 in LNCS, pages 23-61. Springer-Verlag, September 2000.

10
G. Puebla, F. Bueno, and M. Hermenegildo.
Combined Static and Dynamic Assertion-Based Debugging of Constraint Logic Programs.
In Logic-based Program Synthesis and Transformation (LOPSTR'99), number 1817 in LNCS, pages 273-292. Springer-Verlag, March 2000.

11
G. Puebla, M. García de la Banda, K. Marriott, and P. Stuckey.
Optimization of Logic Programs with Dynamic Scheduling.
In 1997 International Conference on Logic Programming, pages 93-107, Cambridge, MA, June 1997. MIT Press.

12
G. Puebla, J. Gallagher, and M. Hermenegildo.
Towards Integrating Partial Evaluation in a Specialization Framework based on Generic Abstract Interpretation.
In M. Leuschel, editor, Proceedings of the ILPS'97 Workshop on Specialization of Declarative Programs, October 1997.
Post ILPS'97 Workshop.

13
G. Puebla and M. Hermenegildo.
Implementation of Multiple Specialization in Logic Programs.
In Proc. ACM SIGPLAN Symposium on Partial Evaluation and Semantics Based Program Manipulation, pages 77-87. ACM Press, June 1995.

14
G. Puebla and M. Hermenegildo.
Automatic Optimization of Dynamic Scheduling in Logic Programs.
In Programming Languages: Implementation, Logics, and Programs, number 1140 in LNCS, Aachen, Germany, September 1996. Springer-Verlag.
Poster abstract.

15
G. Puebla and M. Hermenegildo.
Abstract Specialization and its Application to Program Parallelization.
In J. Gallagher, editor, Logic Program Synthesis and Transformation, number 1207 in LNCS, pages 169-186. Springer-Verlag, 1997.

16
G. Puebla and M. Hermenegildo.
Abstract Multiple Specialization and its Application to Program Parallelization.
J. of Logic Programming. Special Issue on Synthesis, Transformation and Analysis of Logic Programs, 41(2&3):279-316, November 1999.

17
G. Puebla and M. Hermenegildo.
Some Issues in Analysis and Specialization of Modular Ciao-Prolog Programs.
In Special Issue on Optimization and Implementation of Declarative Programming Languages, volume 30 of Electronic Notes in Theoretical Computer Science. Elsevier - North Holland, March 2000.

18
G. Puebla and M. Hermenegildo.
Abstract Specialization and its Applications.
In ACM Partial Evaluation and Semantics based Program Manipulation (PEPM'03), pages 29-43. ACM Press, June 2003.
Invited talk.

19
G. Puebla, M. Hermenegildo, and J. Gallagher.
An Integration of Partial Evaluation in a Generic Abstract Interpretation Framework.
In O Danvy, editor, ACM SIGPLAN Workshop on Partial Evaluation and Semantics-Based Program Manipulation (PEPM'99), number NS-99-1 in BRISC Series, pages 75-85. University of Aarhus, Denmark, January 1999.

Downloading the systems


next_inactive up previous
Last modification: Thu Nov 23 00:08:03 CET 2006 <webmaster@clip.dia.fi.upm.es>[CLIP] [FIM] [UNM]