Skip to main content Accessibility help
×
Home
Hostname: page-component-cf9d5c678-9z9qw Total loading time: 0.265 Render date: 2021-08-06T04:44:28.292Z Has data issue: true Feature Flags: { "shouldUseShareProductTool": true, "shouldUseHypothesis": true, "isUnsiloEnabled": true, "metricsAbstractViews": false, "figures": true, "newCiteModal": false, "newCitedByModal": true, "newEcommerce": true, "newUsageEvents": true }

Resource Usage Analysis of Logic Programs via Abstract Interpretation Using Sized Types*

Published online by Cambridge University Press:  21 July 2014

A. SERRANO
Affiliation:
Dept. of Information and Computing Sciences, Utrecht University (e-mail: A.SerranoMena@uu.nl)
P. LOPEZ-GARCIA
Affiliation:
IMDEA Software Institute (e-mail: pedro.lopez@imdea.org, manuel.hermenegildo@imdea.org) Spanish Council for Scientific Research (CSIC)
M. V. HERMENEGILDO
Affiliation:
Spanish Council for Scientific Research (CSIC) Technical University of Madrid (UPM) (e-mail: herme@fi.upm.es)

Abstract

We present a novel general resource analysis for logic programs based on sized types. Sized types are representations that incorporate structural (shape) information and allow expressing both lower and upper bounds on the size of a set of terms and their subterms at any position and depth. They also allow relating the sizes of terms and subterms occurring at different argument positions in logic predicates. Using these sized types, the resource analysis can infer both lower and upper bounds on the resources used by all the procedures in a program as functions on input term (and subterm) sizes, overcoming limitations of existing resource analyses and enhancing their precision. Our new resource analysis has been developed within the abstract interpretation framework, as an extension of the sized types abstract domain, and has been integrated into the Ciao preprocessor, CiaoPP. The abstract domain operations are integrated with the setting up and solving of recurrence equations for inferring both size and resource usage functions. We show that the analysis is an improvement over the previous resource analysis present in CiaoPP and compares well in power to state of the art systems.

Type
Regular Papers
Copyright
Copyright © Cambridge University Press 2014 

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Footnotes

A. Serrano performed this work during his former affiliation to the IMDEA Software Institute.

*

This research was supported in part by projects EU FP7 318337 ENTRA, Spanish MINECO TIN2012-39391 StrongSoft and TIN2008-05624 DOVES, and Madrid TIC/1465 PROMETIDOS-CM.

References

Albert, E., Genaim, S., and Masud, A. N. 2011. More Precise yet Widely Applicable Cost Analysis. In 12th Verification, Model Checking, and Abstract Interpretation (VMCAI'11), Jhala, R. and Schmidt, D., Eds. Lecture Notes in Computer Science, vol. 6538. Springer Verlag, 3853.CrossRefGoogle Scholar
Bagnara, R., Pescetti, A., Zaccagnini, A., and Zaffanella, E. 2005. PURRS: Towards Computer Algebra Support for Fully Automatic Worst-Case Complexity Analysis. Tech. rep. arXiv:cs/0512056 available from http://arxiv.org/ Google Scholar
Bruynooghe, M. 1991. A practical framework for the abstract interpretation of logic programs. J. Log. Program. 10, 2, 91124.CrossRefGoogle Scholar
Bueno, F., López-García, P., and Hermenegildo, M. 2004. Multivariant Non-Failure Analysis via Standard Abstract Interpretation. In 7th International Symposium on Functional and Logic Programming (FLOPS 2004). Number 2998 in LNCS. Springer-Verlag, Heidelberg, Germany, 100116.CrossRefGoogle Scholar
Cousot, P. and Cousot, R. 1992. Abstract Interpretation and Applications to Logic Programs. Journal of Logic Programming 13, 2-3, 103179.CrossRefGoogle Scholar
Dart, P. and Zobel, J. 1992. A Regular Type Language for Logic Programs. In Types in Logic Programming. MIT Press, 157187.Google Scholar
Debray, S. K. and Lin, N. W. 1993. Cost Analysis of Logic Programs. ACM Transactions on Programming Languages and Systems 15, 5 (November), 826875.CrossRefGoogle Scholar
Debray, S. K., Lin, N.-W., and Hermenegildo, M. 1990. Task Granularity Analysis in Logic Programs. In Proc. of the 1990 ACM Conf. on Programming Language Design and Implementation. ACM Press, 174188.Google Scholar
Debray, S. K., López-García, P., Hermenegildo, M., and Lin, N.-W. 1997. Lower Bound Cost Estimation for Logic Programs. In 1997 International Logic Programming Symposium. MIT Press, Cambridge, MA, 291305.Google Scholar
Giesl, J., Ströder, T., Schneider-Kamp, P., Emmes, F., and Fuhs, C. 2012. Symbolic evaluation graphs and term rewriting: a general methodology for analyzing logic programs. In PPDP. ACM, 112.Google Scholar
Grobauer, B. 2001. Cost recurrences for DML programs. In International Conference on Functional Programming. 253–264.Google Scholar
Hermenegildo, M. V., Bueno, F., Carro, M., López, P., Mera, E., Morales, J., and Puebla, G. 2012. An Overview of Ciao and its Design Philosophy. Theory and Practice of Logic Programming 12, 1–2 (January), 219252. http://arxiv.org/abs/1102.5497.CrossRefGoogle Scholar
Hoffmann, J., Aehlig, K., and Hofmann, M. 2012. Multivariate amortized resource analysis. ACM Trans. Program. Lang. Syst. 34, 3, 14.CrossRefGoogle Scholar
Igarashi, A. and Kobayashi, N. 2002. Resource usage analysis. In Symposium on Principles of Programming Languages. 331–342.Google Scholar
López-García, P., Bueno, F., and Hermenegildo, M. 2010. Automatic Inference of Determinacy and Mutual Exclusion for Logic Programs Using Mode and Type Information. New Generation Computing 28, 2, 117206.CrossRefGoogle Scholar
López-García, P., Darmawan, L., and Bueno, F. 2010. A Framework for Verification and Debugging of Resource Usage Properties. In Technical Communications of the 26th Int'l. Conference on Logic Programming (ICLP'10), Hermenegildo, M. and Schaub, T., Eds. Leibniz International Proceedings in Informatics (LIPIcs), vol. 7. Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik, Dagstuhl, Germany, 104113.Google Scholar
Muthukumar, K. and Hermenegildo, M. 1989. Determination of Variable Dependence Information at Compile-Time Through Abstract Interpretation. In 1989 North American Conference on Logic Programming. MIT Press, 166189.Google Scholar
Muthukumar, K. and Hermenegildo, M. 1992. Compile-time Derivation of Variable Dependency Using Abstract Interpretation. Journal of Logic Programming 13, 2/3 (July), 315347.CrossRefGoogle Scholar
Navas, J., Mera, E., López-García, P., and Hermenegildo, M. 2007. User-Definable Resource Bounds Analysis for Logic Programs. In 23rd International Conference on Logic Programming (ICLP'07). Lecture Notes in Computer Science, vol. 4670. Springer.Google Scholar
Nielson, F., Nielson, H. R., and Seidl, H. 2002. Automatic complexity analysis. In European Symposium on Programming. 243–261.Google Scholar
Puebla, G. and Hermenegildo, M. 1996. Optimized Algorithms for the Incremental Analysis of Logic Programs. In International Static Analysis Symposium (SAS 1996). Number 1145 in LNCS. Springer-Verlag, 270284.Google Scholar
Rosendahl, M. 1989. Automatic Complexity Analysis. In 4th ACM Conference on Functional Programming Languages and Computer Architecture (FPCA'89). ACM Press.Google Scholar
Serrano, A., Lopez-Garcia, P., Bueno, F., and Hermenegildo, M. 2013. Sized Type Analysis for Logic Programs (technical communication). In Theory and Practice of Logic Programming, 29th Int'l. Conference on Logic Programming (ICLP'13) Special Issue, On-line Supplement, Swift, T. and Lamma, E., Eds. Vol. 13 (4-5). Cambridge U. Press, 114.Google Scholar
Vasconcelos, P. B. and Hammond, K. 2003. Inferring cost equations for recursive, polymorphic and higher-order functional programs. In IFL, Trinder, P. W., Michaelson, G., and Pena, R., Eds. Lecture Notes in Computer Science, vol. 3145. Springer, 86101.Google Scholar
Vaucheret, C. and Bueno, F. 2002. More Precise yet Efficient Type Inference for Logic Programs. In International Static Analysis Symposium. Lecture Notes in Computer Science, vol. 2477. Springer-Verlag, 102116.CrossRefGoogle Scholar
Wegbreit, B. 1975. Mechanical Program Analysis. Communications of the ACM 18, 9 (September), 528539.CrossRefGoogle Scholar
Supplementary material: PDF

SERRANO et al.

Resource Usage Analysis of Logic Programs via Abstract Interpretation Using Sized Types

Download SERRANO et al.(PDF)
PDF 271 KB
14
Cited by

Send article to Kindle

To send this article to your Kindle, first ensure no-reply@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about sending to your Kindle. Find out more about sending to your Kindle.

Note you can select to send to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be sent to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

Resource Usage Analysis of Logic Programs via Abstract Interpretation Using Sized Types*
Available formats
×

Send article to Dropbox

To send this article to your Dropbox account, please select one or more formats and confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your <service> account. Find out more about sending content to Dropbox.

Resource Usage Analysis of Logic Programs via Abstract Interpretation Using Sized Types*
Available formats
×

Send article to Google Drive

To send this article to your Google Drive account, please select one or more formats and confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your <service> account. Find out more about sending content to Google Drive.

Resource Usage Analysis of Logic Programs via Abstract Interpretation Using Sized Types*
Available formats
×
×

Reply to: Submit a response

Please enter your response.

Your details

Please enter a valid email address.

Conflicting interests

Do you have any conflicting interests? *