Advertisement

Partial Evaluation of Order-Sorted Equational Programs Modulo Axioms

  • María Alpuente
  • Angel Cuenca-OrtegaEmail author
  • Santiago Escobar
  • José Meseguer
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10184)

Abstract

Partial evaluation (PE) is a powerful and general program optimization technique with many successful applications. However, it has never been investigated in the context of expressive rule-based languages like Maude, CafeOBJ, OBJ, ASF+SDF, and ELAN, which support: rich type structures with sorts, subsorts and overloading; and equational rewriting modulo axioms such as commutativity, associativity–commutativity, and associativity–commutativity–identity. In this paper, we illustrate the key concepts by showing how they apply to partial evaluation of expressive rule-based programs written in Maude. Our partial evaluation scheme is based on an automatic unfolding algorithm that computes term variants and relies on equational least general generalization for ensuring global termination. We demonstrate the use of the resulting partial evaluator for program optimization on several examples where it shows significant speed-ups.

References

  1. 1.
    Albert, E., Hanus, M., Vidal, G.: A practical partial evaluation scheme for multi-paradigm declarative languages. J. Funct. Logic Programm. 2002 (2002)Google Scholar
  2. 2.
    Alpuente, M., Escobar, S., Espert, J., Meseguer, J.: A modular order-sorted equational generalization algorithm. Inf. Comput. 235, 98–136 (2014)MathSciNetCrossRefzbMATHGoogle Scholar
  3. 3.
    Alpuente, M., Falaschi, M., Vidal, G.: Partial evaluation of functional logic programs. ACM Trans. Program. Lang. Syst. 20(4), 768–844 (1998)CrossRefGoogle Scholar
  4. 4.
    Alpuente, M., Falaschi, M., Vidal, G.: A unifying view of functional and logic program specialization. ACM Comput. Surv. 30(3es), 9es (1998)Google Scholar
  5. 5.
    Clavel, M., Durán, F., Eker, S., Escobar, S., Lincoln, P., Martí-Oliet, N., Meseguer, J., Talcott, C.: Maude Manual (version 2.7), March 2015Google Scholar
  6. 6.
    Escobar, S., Sasse, R., Meseguer, J.: Folding variant narrowing and optimal variant termination. J. Log. Algebr. Program. 81(7–8), 898–928 (2012)MathSciNetCrossRefzbMATHGoogle Scholar
  7. 7.
    Jones, N.D., Gomard, C.K., Sestoft, P.: Partial Evaluation and Automatic Program Generation. Prentice-Hall, Englewood Cliffs (1993)zbMATHGoogle Scholar
  8. 8.
    Jørgensen, J., Leuschel, M., Martens, B.: Conjunctive partial deduction in practice. In: Gallagher, J. (ed.) LOPSTR 1996. LNCS, vol. 1207, pp. 59–82. Springer, Heidelberg (1997). doi: 10.1007/3-540-62718-9_5 CrossRefGoogle Scholar
  9. 9.
    Leuschel, M.: Improving homeomorphic embedding for online termination. In: Flener, P. (ed.) LOPSTR 1998. LNCS, vol. 1559, pp. 199–218. Springer, Heidelberg (1999). doi: 10.1007/3-540-48958-4_11 CrossRefGoogle Scholar
  10. 10.
    Slagle, J.R.: Automated theorem-proving for theories with simplifiers, commutativity and associativity. J. ACM 21(4), 622–642 (1974)MathSciNetCrossRefzbMATHGoogle Scholar

Copyright information

© Springer International Publishing AG 2017

Authors and Affiliations

  • María Alpuente
    • 1
  • Angel Cuenca-Ortega
    • 1
    • 3
    Email author
  • Santiago Escobar
    • 1
  • José Meseguer
    • 2
  1. 1.DSIC-ELPUniversitat Politècnica de ValènciaValenciaSpain
  2. 2.University of Illinois at Urbana-ChampaignChampaignUSA
  3. 3.Universidad de GuayaquilGuayaquilEcuador

Personalised recommendations