Skip to main content
Erschienen in:
Buchtitelbild

2017 | OriginalPaper | Buchkapitel

Partial Evaluation of Order-Sorted Equational Programs Modulo Axioms

verfasst von : María Alpuente, Angel Cuenca-Ortega, Santiago Escobar, José Meseguer

Erschienen in: Logic-Based Program Synthesis and Transformation

Verlag: Springer International Publishing

Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.

search-config
loading …

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.

Sie haben noch keine Lizenz? Dann Informieren Sie sich jetzt über unsere Produkte:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Fußnoten
1
In Maude 2.7, only equations with the variant attribute are used by the folding variant narrowing strategy, which is the only narrowing strategy considered in this paper. We sometimes remove the variant attribute for saving space.
 
2
We assume there are no two grammar productions of the form N -> E.M \(_1\) and N -> E.M \(_2\).
 
3
We show narrowing steps in solid arrows and rewriting steps in dotted arrows.
 
4
From now on, we attach a label to each equation.
 
5
To ease reading, the arcs of the narrowing tree are decorated with the label of the corresponding equation applied at the narrowing step.
 
6
Note that this is only true because pattern matching modulo ACU is used for testing closedness.
 
7
The expression X : S represents an explicit definition of a variable X of sort S. It is worth noting that Maude automatically provides B-coherence completion of rules.
 
Literatur
1.
Zurück zum Zitat Albert, E., Hanus, M., Vidal, G.: A practical partial evaluation scheme for multi-paradigm declarative languages. J. Funct. Logic Programm. 2002 (2002) Albert, E., Hanus, M., Vidal, G.: A practical partial evaluation scheme for multi-paradigm declarative languages. J. Funct. Logic Programm. 2002 (2002)
2.
Zurück zum Zitat Alpuente, M., Escobar, S., Espert, J., Meseguer, J.: A modular order-sorted equational generalization algorithm. Inf. Comput. 235, 98–136 (2014)MathSciNetCrossRefMATH Alpuente, M., Escobar, S., Espert, J., Meseguer, J.: A modular order-sorted equational generalization algorithm. Inf. Comput. 235, 98–136 (2014)MathSciNetCrossRefMATH
3.
Zurück zum Zitat Alpuente, M., Falaschi, M., Vidal, G.: Partial evaluation of functional logic programs. ACM Trans. Program. Lang. Syst. 20(4), 768–844 (1998)CrossRef Alpuente, M., Falaschi, M., Vidal, G.: Partial evaluation of functional logic programs. ACM Trans. Program. Lang. Syst. 20(4), 768–844 (1998)CrossRef
4.
Zurück zum Zitat Alpuente, M., Falaschi, M., Vidal, G.: A unifying view of functional and logic program specialization. ACM Comput. Surv. 30(3es), 9es (1998) Alpuente, M., Falaschi, M., Vidal, G.: A unifying view of functional and logic program specialization. ACM Comput. Surv. 30(3es), 9es (1998)
5.
Zurück zum Zitat Clavel, M., Durán, F., Eker, S., Escobar, S., Lincoln, P., Martí-Oliet, N., Meseguer, J., Talcott, C.: Maude Manual (version 2.7), March 2015 Clavel, M., Durán, F., Eker, S., Escobar, S., Lincoln, P., Martí-Oliet, N., Meseguer, J., Talcott, C.: Maude Manual (version 2.7), March 2015
6.
Zurück zum Zitat Escobar, S., Sasse, R., Meseguer, J.: Folding variant narrowing and optimal variant termination. J. Log. Algebr. Program. 81(7–8), 898–928 (2012)MathSciNetCrossRefMATH Escobar, S., Sasse, R., Meseguer, J.: Folding variant narrowing and optimal variant termination. J. Log. Algebr. Program. 81(7–8), 898–928 (2012)MathSciNetCrossRefMATH
7.
Zurück zum Zitat Jones, N.D., Gomard, C.K., Sestoft, P.: Partial Evaluation and Automatic Program Generation. Prentice-Hall, Englewood Cliffs (1993)MATH Jones, N.D., Gomard, C.K., Sestoft, P.: Partial Evaluation and Automatic Program Generation. Prentice-Hall, Englewood Cliffs (1993)MATH
8.
Zurück zum Zitat 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 CrossRef 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 CrossRef
10.
Zurück zum Zitat Slagle, J.R.: Automated theorem-proving for theories with simplifiers, commutativity and associativity. J. ACM 21(4), 622–642 (1974)MathSciNetCrossRefMATH Slagle, J.R.: Automated theorem-proving for theories with simplifiers, commutativity and associativity. J. ACM 21(4), 622–642 (1974)MathSciNetCrossRefMATH
Metadaten
Titel
Partial Evaluation of Order-Sorted Equational Programs Modulo Axioms
verfasst von
María Alpuente
Angel Cuenca-Ortega
Santiago Escobar
José Meseguer
Copyright-Jahr
2017
DOI
https://doi.org/10.1007/978-3-319-63139-4_1