Skip to main content Accessibility help
×
Home
Hostname: page-component-78dcdb465f-hcvhd Total loading time: 2.694 Render date: 2021-04-20T05:25:16.374Z Has data issue: true Feature Flags: { "shouldUseShareProductTool": true, "shouldUseHypothesis": true, "isUnsiloEnabled": true, "metricsAbstractViews": false, "figures": false, "newCiteModal": false, "newCitedByModal": true }

Improving precision of type analysis using non-discriminative union

Published online by Cambridge University Press:  01 January 2008

LUNJIN LU
Affiliation:
Department of Computer Science and Engineering, Oakland University, Rochester, MI 48309, USA (email: lunjin@acm.org)
Corresponding
E-mail address:

Abstract

This paper presents a new type analysis for logic programs. The analysis is performed with a priori type definitions; and type expressions are formed from a fixed alphabet of type constructors. Non-discriminative union is used to join type information from different sources without loss of precision. An operation that is performed repeatedly during an analysis is to detect if a fixpoint has been reached. This is reduced to checking the emptiness of types. Due to the use of non-discriminative union, the fundamental problem of checking the emptiness of types is more complex in the proposed type analysis than in other type analyses with a priori type definitions. The experimental results, however, show that use of tabling reduces the effect to a small fraction of analysis time on a set of benchmarks.

Type
Regular Papers
Copyright
Copyright © Cambridge University Press 2007

Access options

Get access to the full version of this content by using one of the access options below.

References

Aiken, A. and Lakshman, T. 1994. Directional type checking of logic programs. In Proceedings of the First International Static Analysis Symposium, Le Charlier, B., Ed. Lecture Notes in Computer Science, vol. 864. Springer, pp. 4360.Google Scholar
Barbuti, R. and Giacobazzi, R. 1992. A bottom-up polymorphic type inference in logic programming. Science of Computer Programming 19, 3, 133181.CrossRefGoogle Scholar
Barbuti, R., Giacobazzi, R. and Levi, G. 1993. A general framework for semantics-based bottom-up abstract interpretation of logic programs. ACM Transactions on Programming Languages and Systems 15, 1, 133181.CrossRefGoogle Scholar
Boye, J. and Malúszynski, J. 1996. Two aspects of directional types. In Proceedings of the Twelfth International Conference on Logic Programming. The MIT Press, pp. 747761.Google Scholar
Bronsard, F., Lakshman, T. K. and Reddy, U. S. 1992. A framework of directionality for proving termination of logic programs. In Proceedings of the Joint International Conference and Symposium on Logic Programming, Apt, K., Ed. The MIT Press, pp. 321335.Google Scholar
Bruynooghe, M. 1991. A practical framework for the abstract interpretation of logic progams. Journal of Logic Programming 10, 2, 91124.CrossRefGoogle Scholar
Charatonik, W. and Podelski, A. 1998. Directional type inference for logic programs. In Proceedings of the Fifth International Symposium on Static Analysis, Levi, G., Ed. Lecture Notes in Computer Science, vol. 1503. Springer, pp. 278294.Google Scholar
Codish, M. and Demoen, B. 1994. Deriving polymorphic type dependencies for logic programs using multiple incarnations of Prop. In Proceedings of the First International Static Analysis Symposium, Le Charlier, B., Ed. Lecture Notes in Computer Science, vol. 864. Springer, pp. 281297.Google Scholar
Codish, M. and Lagoon, V. 2000. Type dependencies for logic programs using ACI-unification. \itTheoretical Computer Science 238, 1–2, 131159.CrossRefGoogle Scholar
Comon, H., Dauchet, M., Gilleron, R., Jacquemard, F., Lugiez, D., Tison, S. and Tommasi, M. 2002. Tree automata techniques and applications. http://www.grappa.univ-lille3.fr/tata.Google Scholar
Cousot, P. and Cousot, R. 1977. Abstract interpretation: a unified framework for static analysis of programs by construction or approximation of fixpoints. In Principles of Programming Languages. The ACM Press, pp. 238252.Google Scholar
Cousot, P. and Cousot, R. 1992. Abstract interpretation and application to logic programs. Journal of Logic Programming 13, 1–4, 103179.CrossRefGoogle Scholar
Cousot, P. and Cousot, R. 1995. Formal language, grammar and set-constraint-based program analysis by abstract interpretation. In Proceedings of the Seventh ACM Conference on Functional Programming Languages and Computer Architecture. The ACM Press, pp. 170181.Google Scholar
Dart, P. and Zobel, J. 1992a. Efficient runtime type checking of typed logic programs. Journal of Logic Programming 14, 1–2, 3169.CrossRefGoogle Scholar
Dart, P. and Zobel, J. 1992b. A regular type language for logic programs. In Types in Logic Programming, Pfenning, F., Ed. The MIT Press, pp. 157189.Google Scholar
Eder, E. 1985. Properties of substitutions and unifications. Journal of Symbolic Computation 1, 1, 3146.CrossRefGoogle Scholar
Fages, F. and Coquery, E. 2001. Typing constraint logic programs. Theory and Practice of Logic Programming 1, 6, 751777.CrossRefGoogle Scholar
Frühwirth, T., Shapiro, E., Vardi, M. and Yardeni, E. 1991. Logic programs as types for logic programs. In Proceedings of the Sixth Annual IEEE Symposium on Logic in Computer Science. The IEEE Computer Society Press, pp. 300309.CrossRefGoogle Scholar
Gallagher, J. and deWaal, D. Waal, D. 1994. Fast and precise regular approximations of logic programs. In Proceedings of the Eleventh International Conference on Logic Programming, Bruynooghe, M., Ed. The MIT Press, pp. 599613.Google Scholar
Gallagher, J. P., Boulanger, D., and Saglam, H. 1995. Practical model-based static analysis for definite logic programs. In Proceedings of the Fifteenth International Symposium on Logic Programming, Lloyd, J. W., Ed. The MIT Press, pp. 351368.Google Scholar
Gallagher, J. P. and Puebla, G. 2002. Abstract interpretation over non-deterministic finite tree automata for set-based analysis of logic programs. In Proceedings of the Fourth International Symposium on Practical Aspects of Declarative Languages, Krishnamurthi, S. and Ramakrishnan, C. R., Eds. Lecture Notes in Computer Science, vol. 2257. Springer, pp. 243261.CrossRefGoogle Scholar
Gécseg, F. and Steinby, M. 1984. Tree Automata. Akadémiai Kiadó.Google Scholar
Heintze, N. and Jaffar, J. 1990. A finite presentation theorem for approximating logic programs. In Principles of Programming Languages. The ACM Press, pp. 197209.Google Scholar
Heintze, N. and Jaffar, J. 1992. Semantic types for logic programs. In Types in Logic Programming, Pfenning, F., Ed. The MIT Press, pp. 141155.Google Scholar
Hermenegildo, M., Warren, R. and Debray, S. 1992. Global flow analysis as a practical compilation tool. Journal of Logic Programming 13, 1–4, 349366.CrossRefGoogle Scholar
Hermenegildo, M. V., Bueno, F., Puebla, G. and López, P. 1999. Program analysis, debugging, and optimization using the Ciao system preprocessor. In Proceedings of the 1999 International Conference on Logic Programming. The MIT Press, pp. 5265.Google Scholar
Hill, P. and Lloyd, J. 1994. The Gödel Programming Language. The MIT Press.Google Scholar
Hill, P. M. and Spoto, F. 2002. Generalising Def and Pos to type analysis. Journal of Logic and Computation 12, 3, 497542.CrossRefGoogle Scholar
Horiuchi, K. and Kanamori, T. 1988. Polymorphic type inference in Prolog by abstract interpretation. In Proceedings of the Sixth Conference on Logic Programming, Furukawa, K., Tanaka, H., and Fujisaki, T., Eds. Lecture Notes in Computer Science, vol. 315. Springer, pp. 195214.Google Scholar
Janssens, G. and Bruynooghe, M. 1992. Deriving descriptions of possible values of program variables by means of abstract interpretation. Journal of Logic Programming 13, 1–4, 205258.CrossRefGoogle Scholar
Kahrs, S. 1996. Limits of ML-definability. In Proceedings of the Eighth International Symposium on Programming Languages: Implementation, Logic and Programs, Kuchen, H. and Swierstra, S. D., Eds. Lecture Notes in Computer Science, vol. 1140. Springer, pp. 1731.CrossRefGoogle Scholar
Kanamori, T. and Horiuchi, K. 1985. Type inference in Prolog and its application. In Proceedings of the Ninth International Joint Conference on Artificial Intelligence, Joshi, A., Ed. Morgan Kaufmann, pp. 704707.Google Scholar
Kanamori, T. and Kawamura, T. 1993. Abstract interpretation based on OLDT resolution. Journal of Logic Programming 15, 1 & 2, 130.CrossRefGoogle Scholar
Lagoon, V. and Stuckey, P. J. 2001. A framework for analysis of typed logic programs. In Proceedings of the Fifth International Symposium on Functional and Logic Programming, Kuchen, H. and Ueda, K., Eds. Lecture Notes in Computer Science, vol. 2024. Springer, pp. 296310.CrossRefGoogle Scholar
Lloyd, J. 1987. Foundations of Logic Programming. Springer-Verlag.CrossRefGoogle Scholar
Lu, L. 1995. Type analysis of logic programs in the presence of type definitions. In Proceedings of the 1995 ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation. The ACM Press, pp. 241252.CrossRefGoogle Scholar
Lu, L. 1998. A polymorphic type analysis in logic programs by abstract interpretation. Journal of Logic Programming 36, 1, 154.CrossRefGoogle Scholar
Lu, L. 2003. Path dependent analysis of logic programs. Higher-Order and Symbolic Computation 16, 341377.CrossRefGoogle Scholar
Lu, L. and Cleary, J. 1998. An emptiness algorithm for regular types with set operators. Technical report, Department of Computer Science, The University of Waikato. http://xxx.lanl.gov/abs/cs.LO/9811015.Google Scholar
Marriott, K. and Søndergaard, H. 1989. Semantics-based dataflow analysis of logic programs. In Information Processing 89, Proceedings of the Eleventh IFIP World Computer Congress, Ritter, G., Ed. North-Holland, pp. 601606.Google Scholar
Mishra, P. 1984. Towards a theory of types in Prolog. In Proceedings of the IEEE International Symposium on Logic Programming. IEEE Computer Society Press, pp. 289–298.Google Scholar
Mycroft, A. and O'Keefe, R. 1984. A polymorphic type system for Prolog. Artificial Intelligence 23, 3, 295307.CrossRefGoogle Scholar
Nilsson, U. 1988. Towards a framework for abstract interpretation of logic programs. In Proceedings of the First International Workshop on Programming Language Implementation and Logic Programming, Deransart, P., Lorho, B., and Małuszynski, J., Eds. Lecture Notes in Computer Science, vol. 348. Springer, pp. 6882.CrossRefGoogle Scholar
Reddy, U. 1990. Types for logic programs. In Proceedings of the 1990 North American Conference on Logic Programming. The MIT Press, pp. 836–40.Google Scholar
Rychlikowski, P. and Truderung, T. 2001. Polymorphic directional types for logic programming. In Proceedings of the Third ACM SIGPLAN International Conference on Principles and Practice of Declarative Programming. The ACM Press, pp. 61–72.Google Scholar
Saglam, H. and Gallagher, J. 1995. Approximating constraint logic programs using polymorphic types and regular descriptions. Technical report CSTR-95-017, Department of Computer Science, University of Bristol.Google Scholar
Smaus, J.-G. 2001. Analysis of polymorphically typed logic programs using ACI-unification. In Proceedings of the Eighth International Conference on Logic for Programming, Artificial Intelligence, and Reasoning. Lecture Notes in Artificial Intelligence, vol. 2250. Springer, pp. 282–298.Google Scholar
Somogyi, Z., Henderson, F. and Conway, T. 1996. The execution algorithm of Mercury: An efficient purely declarative logic programming language. Journal of Logic Programming 29, 1–3, 1964.CrossRefGoogle Scholar
Van Hentenryck, P., Cortesi, A. and Le Charlier, B. 1995. Type analysis of Prolog using type graphs. Journal of Logic Programming 22, 3, 179208.CrossRefGoogle Scholar
Warren, D. S. 1992. Memoing for logic programs. Communications of the ACM 35, 3, 93111.CrossRefGoogle Scholar
Yardeni, E., Frühwirth, T., and Shapiro, E. 1991. Polymorphically typed logic programs. In Proceedings of the Eighth International Conference on Logic Programming, Furukawa, K., Ed. The MIT Press, pp. 379–93.Google Scholar
Yardeni, E. and Shapiro, E. 1991. A type system for logic programs. Journal of Logic Programming 10, 2, 125153.CrossRefGoogle Scholar
Zobel, J. 1987. Derivation of polymorphic types for Prolog programs. In Proceedings of the Fourth International Conference on Logic Programming, Lassez, J., Ed. The MIT Press, pp. 817838.Google Scholar

Full text views

Full text views reflects PDF downloads, PDFs sent to Google Drive, Dropbox and Kindle and HTML full text views.

Total number of HTML views: 0
Total number of PDF views: 13 *
View data table for this chart

* Views captured on Cambridge Core between September 2016 - 20th April 2021. This data will be updated every 24 hours.

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.

Improving precision of type analysis using non-discriminative union
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.

Improving precision of type analysis using non-discriminative union
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.

Improving precision of type analysis using non-discriminative union
Available formats
×
×

Reply to: Submit a response


Your details


Conflicting interests

Do you have any conflicting interests? *