7 research outputs found

    The Ecce and Logen Partial Evaluators and their Web Interfaces

    No full text
    We present Ecce and Logen, two partial evaluators for Prolog using the online and offline approach respectively. We briefly present the foundations of these tools and discuss various applications. We also present new implementations of these tools, carried out in Ciao Prolog. In addition to a command-line interface new user-friendly web interfaces were developed. These enable non-expert users to specialise logic programs using a web browser, without the need for a local installation

    Supervising Offline Partial Evaluation of Logic Programs using Online Techniques

    No full text
    A major impediment for more widespread use of offline partial evaluation is the difficulty of obtaining and maintaining annotations for larger, realistic programs. Existing automatic binding-time analyses still only have limited applicability and annotations often have to be created or improved and maintained by hand, leading to errors. We present a technique to help overcome this problem by using online control techniques which supervise the specialisation process in order to help the development and maintenance of correct annotations by identifying errors. We discuss an implementation in the Logen system and show on a series of examples that this approach is effective: very few false alarms were raised while infinite loops were detected quickly. We also present the integration of this technique into a web interface, which highlights problematic annotations directly in the source code. A method to automatically fix incorrect annotations is presented, allowing the approach to be also used as a pragmatic binding time analysis. Finally we show how our method can be used for efficiently locating built-in errors in Prolog source code

    A hybrid approach to conjunctive partial evaluation of logic programs

    Full text link
    Conjunctive partial deduction is a well-known technique for the partial evaluation of logic programs. The original formulation follows the so called online approach where all termination decisions are taken on-the-fly. In contrast, offline partial evaluators first analyze the source program and produce an annotated version so that the partial evaluation phase should only follow these annotations to ensure the termination of the process. In this work, we introduce a lightweight approach to conjunctive partial deduction that combines some of the advantages of both online and offline styles of partial evaluation. © 2011 Springer-Verlag.This work has been partially supported by the Spanish Ministerio de Ciencia e Innovación under grant TIN2008-06622-C03-02 and by the Generalitat Valenciana under grant ACOMP/2010/042.Vidal Oriola, GF. (2011). A hybrid approach to conjunctive partial evaluation of logic programs. En Logic-Based Program Synthesis and Transformation. Springer Verlag (Germany). 6564:200-214. https://doi.org/10.1007/978-3-642-20551-4_13S2002146564Ben-Amram, A., Codish, M.: A SAT-Based Approach to Size Change Termination with Global Ranking Functions. In: Ramakrishnan, C.R., Rehof, J. (eds.) TACAS 2008. LNCS, vol. 4963, pp. 218–232. Springer, Heidelberg (2007)Bruynooghe, M., De Schreye, D., Martens, B.: A General Criterion for Avoiding Infinite Unfolding during Partial Deduction of Logic Programs. In: Saraswat, V., Ueda, K. (eds.) Proc. 1991 Int’l Symp. on Logic Programming, pp. 117–131 (1991)Christensen, N.H., Glück, R.: Offline Partial Evaluation Can Be as Accurate as Online Partial Evaluation. ACM Transactions on Programming Languages and Systems 26(1), 191–220 (2004)Codish, M., Taboch, C.: A Semantic Basis for the Termination Analysis of Logic Programs. Journal of Logic Programming 41(1), 103–123 (1999)De Schreye, D., Glück, R., Jørgensen, J., Leuschel, M., Martens, B., Sørensen, M.H.: Conjunctive Partial Deduction: Foundations, Control, Algorihtms, and Experiments. Journal of Logic Programming 41(2&3), 231–277 (1999)Hruza, J., Stepánek, P.: Speedup of logic programs by binarization and partial deduction. TPLP 4(3), 355–380 (2004)Jones, N.D., Gomard, C.K., Sestoft, P.: Partial Evaluation and Automatic Program Generation. Prentice-Hall, Englewood Cliffs (1993)Leuschel, M.: Homeomorphic Embedding for Online Termination of Symbolic Methods. In: Mogensen, T.Æ., Schmidt, D.A., Sudborough, I.H. (eds.) The Essence of Computation. LNCS, vol. 2566, pp. 379–403. Springer, Heidelberg (2002)Leuschel, M.: The DPPD (Dozens of Problems for Partial Deduction) Library of Benchmarks (2007), http://www.ecs.soton.ac.uk/~mal/systems/dppd.htmlLeuschel, M., Elphick, D., Varea, M., Craig, S., Fontaine, M.: The Ecce and Logen Partial Evaluators and Their Web Interfaces. In: Proc. of PEPM 2006, pp. 88–94. IBM Press (2006)Leuschel, M., Vidal, G.: Fast Offline Partial Evaluation of Large Logic Programs. In: Hanus, M. (ed.) LOPSTR 2008. LNCS, vol. 5438, pp. 119–134. Springer, Heidelberg (2009)Lloyd, J.W., Shepherdson, J.C.: Partial Evaluation in Logic Programming. Journal of Logic Programming 11, 217–242 (1991)Somogyi, Z.: A System of Precise Modes for Logic Programs. In: Shapiro, E.Y. (ed.) Proc. of Third Int’l Conf. on Logic Programming, pp. 769–787. The MIT Press, Cambridge (1986

    Annotation of logic programs for independent AND-Parallelism by partial evaluation

    Full text link
    Traditional approaches to automatic AND-parallelization of logic programs rely on some static analysis to identify independent goals that can be safely and efficiently run in parallel in any possible execution. In this paper, we present a novel technique for generating annotations for independent AND-parallelism that is based on partial evaluation. Basically, we augment a simple partial evaluation procedure with (run-time) groundness and variable sharing information so that parallel conjunctions are added to the residual clauses when the conditions for independence are met. In contrast to previous approaches, our partial evaluator is able to transform the source program in order to expose more opportunities for parallelism. To the best of our knowledge, we present the first approach to a parallelizing partial evaluator.This work has been partially supported by the Spanish Ministerio de Economia y Competitividad (Secretaria de Estado de Investigacion, Desarrollo e Innovacion) under grant TIN2008-06622-C03-02 and by the Generalitat Valenciana under grant PROMETEO/2011/052.Vidal Oriola, GF. (2012). Annotation of logic programs for independent AND-Parallelism by partial evaluation. Theory and Practice of Logic Programming. 12(4-5):583-600. https://doi.org/10.1017/S1471068412000191S583600124-5Gras, D. C., & Hermenegildo, M. V. (2009). Non-strict independence-based program parallelization using sharing and freeness information. Theoretical Computer Science, 410(46), 4704-4723. doi:10.1016/j.tcs.2009.07.044Muthukumar, K., Bueno, F., García de la Banda, M., & Hermenegildo, M. (1999). Automatic compile-time parallelization of logic programs for restricted, goal level, independent and parallelism. The Journal of Logic Programming, 38(2), 165-218. doi:10.1016/s0743-1066(98)10022-5Leuschel, M., Elphick, D., Varea, M., Craig, S.-J., & Fontaine, M. (2006). The Ecce and Logen partial evaluators and their web interfaces. Proceedings of the 2006 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation - PEPM ’06. doi:10.1145/1111542.1111557SWI Prolog 2012. URL: http://www.swi-prolog.org/.Consel, C., & Danvy, O. (1993). Partial evaluation in parallel. Lisp and Symbolic Computation, 5(4), 327-342. doi:10.1007/bf01806309De Schreye, D., Glück, R., Jørgensen, J., Leuschel, M., Martens, B., & Sørensen, M. H. (1999). Conjunctive partial deduction: foundations, control, algorithms, and experiments. The Journal of Logic Programming, 41(2-3), 231-277. doi:10.1016/s0743-1066(99)00030-8Debois, S. (2004). Imperative program optimization by partial evaluation. Proceedings of the 2004 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation - PEPM ’04. doi:10.1145/1014007.1014019Debray, S. K. (1989). Static inference of modes and data dependencies in logic programs. ACM Transactions on Programming Languages and Systems, 11(3), 418-450. doi:10.1145/65979.65983Gallagher, J. P. (1993). Tutorial on specialisation of logic programs. Proceedings of the 1993 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation - PEPM ’93. doi:10.1145/154630.154640Gurr C. 1994. A Self-Applicable Partial Evaluator for the Logic Programming Language Goedel. PhD Thesis, Department of Computer Science, University of Bristol.Jones, N. D. (2004). Transformation by interpreter specialisation. Science of Computer Programming, 52(1-3), 307-339. doi:10.1016/j.scico.2004.03.010Leuschel, M., & Vidal, G. (2009). Fast Offline Partial Evaluation of Large Logic Programs. Lecture Notes in Computer Science, 119-134. doi:10.1007/978-3-642-00515-2_9Lloyd, J. W., & Shepherdson, J. C. (1991). Partial evaluation in logic programming. The Journal of Logic Programming, 11(3-4), 217-242. doi:10.1016/0743-1066(91)90027-

    Analysis and Transformation Tools for Constrained Horn Clause Verification

    Get PDF
    Several techniques and tools have been developed for verification of properties expressed as Horn clauses with constraints over a background theory (CHC). Current CHC verification tools implement intricate algorithms and are often limited to certain subclasses of CHC problems. Our aim in this work is to investigate the use of a combination of off-the-shelf techniques from the literature in analysis and transformation of Constraint Logic Programs (CLPs) to solve challenging CHC verification problems. We find that many problems can be solved using a combination of tools based on well-known techniques from abstract interpretation, semantics-preserving transformations, program specialisation and query-answer transformations. This gives insights into the design of automatic, more general CHC verification tools based on a library of components.Comment: To appear in Theory and Practice of Logic Programming (TPLP

    Termination analysis of programs with complex control-flow

    Get PDF
    Tesis de la Universidad Complutense de Madrid, Facultad de Informática, leída el 22-01-2021El problema de la terminación de un programa es fundamental en la informática y ha sido objeto de estudio de numerosas investigaciones. La técnica mejor conocida, y más frecuentemente utilizada, para demostrar terminación es la del uso de funciones de clasificación (ranking functions). Estas funciones relacionan los estados del programa con los elementos de un conjunto ordenado bien-fundado, tal que el valor desciende en estado consecutivos del programa. Como descender en un conjunto ordenado bien-fundado no se puede hacer de manera infinita se demuestra la terminación del programa. Es esta tesis, abordamos el problema de terminación para Sistemas de Transiciones (Transition Systems) con valores numéricos, que son una representación de programas muy comúnmente utilizada en los análisis de programas. Los Sistemas de Transiciones están definidos por Grafos de Control de Flujo (Control-Flow Graph) donde las aristas están anotadas con fórmulas describiendo las transiciones que hay entre los nodos correspondientes...The problem of the program termination is fundamental in Computer Science and has been the subject of voluminous research. The best known, and often used technique for proving termination is that of ranking functions. These are functions that map the program states to the elements of a well-founded ordered set, such that the value descends on consecutive program states. Since descent in a well-founded set cannot be infinite, this proves terminatio. In this thesis, we address the termination problem for Transition Systems with numerical variables, which is a very common program representation that is often used in program analysis. They are defined by Control-Flow Graphs where edges are annotated with formulas describing transitions between corresponding nodes...Fac. de InformáticaTRUEunpu

    Components for automatic horn clause verification

    Get PDF
    corecore