An Experiment Combining Specialization with Abstract Interpretation

08/07/2020 ∙ by John P. Gallagher, et al. ∙ RUC Association for Computing Machinery 0

It was previously shown that control-flow refinement can be achieved by a program specializer incorporating property-based abstraction, to improve termination and complexity analysis tools. We now show that this purpose-built specializer can be reconstructed in a more modular way, and that the previous results can be achieved using an off-the-shelf partial evaluation tool, applied to an abstract interpreter. The key feature of the abstract interpreter is the abstract domain, which is the product of the property-based abstract domain with the concrete domain. This language-independent framework provides a practical approach to implementing a variety of powerful specializers, and contributes to a stream of research on using interpreters and specialization to achieve program transformations.

READ FULL TEXT VIEW PDF
POST COMMENT

Comments

There are no comments yet.

Authors

page 1

page 2

page 3

page 4

This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

References

  • [1]
  • [2] P. Cousot & R. Cousot (1977): Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In: POPL, pp. 238–252, doi:http://dx.doi.org/10.1145/512950.512973.
  • [3] J. J. Doménech, J. P. Gallagher & S. Genaim (2019): Control-Flow Refinement by Partial Evaluation, and its Application to Termination and Cost Analysis. TPLP 19(5-6), pp. 990–1005, doi:http://dx.doi.org/10.1017/S1471068419000310.
  • [4] F. Fioravanti, A. Pettorossi, M. Proietti & V. Senni (2013): Controlling Polyvariance for Specialization-based Verification. Fundam. Inform. 124(4), pp. 483–502, doi:http://dx.doi.org/10.3233/FI-2013-845.
  • [5] Y. Futamura (1971): Partial Evaluation of Computation Process - An Approach to a Compiler-Compiler. Systems, Computers, Controls 2(5), pp. 45–50.
  • [6] J. P. Gallagher (1986):

    Transforming Logic Programs by Specialising Interpreters

    .
    In:

    Proceedings of the 7th European Conference on Artificial Intelligence (ECAI-86), Brighton

    , pp. 109–122.
  • [7] J. P. Gallagher (2019): Polyvariant program specialisation with property-based abstraction. In A. Lisitsa & A. P. Nemytykh, editors: VPT-19, EPTCS 299, doi:http://dx.doi.org/10.4204/EPTCS.299.6.
  • [8] R. Glück (1994): On the generation of specializers. Journal of Functional Programming 4(4), pp. 499–514, doi:http://dx.doi.org/10.1017/S0956796800001167.
  • [9] R. Glück (2002): Jones Optimality, Binding-Time Improvements, and the Strength of Program Specializers. In: Proc. Asian Symposium on Partial Evaluation and Semantics-Based Program Manipulation, ACM, pp. 9–19, doi:http://dx.doi.org/10.1145/568173.568175.
  • [10] R. Glück & J. Jørgensen (1994): Generating transformers for deforestation and supercompilation. In B. Le Charlier, editor: Static Analysis. Proceedings, LNCS 864, Springer-Verlag, pp. 432–448, doi:http://dx.doi.org/10.1007/3-540-58485-4_57.
  • [11] J. Hatcliff, M. Dwyer & S. Laubach (1998): Staging static analyses using abstraction-based program specialization. In C. Palamidessi et al., editors: Principles of Declarative Programming, LNCS 1490, Springer, pp. 134–151, doi:http://dx.doi.org/10.1007/BFb0056612.
  • [12] N. D. Jones, C. Gomard & P. Sestoft (1993): Partial Evaluation and Automatic Software Generation. Prentice Hall, doi:http://dx.doi.org/10.1016/j.scico.2004.03.010.
  • [13] N. D. Jones (2004): Transformation by interpreter specialization. SCP 52(1-3), pp. 307–339, doi:http://dx.doi.org/10.1016/j.scico.2004.03.010.
  • [14] M. Leuschel (2004): A framework for the integration of partial evaluation and abstract interpretation of logic programs. ACM TOPLAS 26(3), pp. 413–463, doi:http://dx.doi.org/10.1145/982158.982159.
  • [15] M. Leuschel, D. Elphick, M. Varea, S. Craig & M. Fontaine (2006): The Ecce and Logen partial evaluators and their web interfaces. In J. Hatcliff & F. Tip, editors: PEPM, ACM, pp. 88–94, doi:http://dx.doi.org/10.1145/1111542.1111557.
  • [16] G. Puebla, M. Hermenegildo & J. P. Gallagher (1999): An integration of partial evaluation in a generic abstract interpretation framework. In O. Danvy, editor: PEPM’99, San Antonio, Texas, pp. 75–84.
  • [17] V. F. Turchin (1993): Program transformation with metasystem transitions. Journal of Functional Programming 3(3), pp. 283–313, doi:http://dx.doi.org/10.1017/S0956796800000757.