790 research outputs found

    Efficient local unfolding with ancestor stacks

    Get PDF
    The most successful unfolding rules used nowadays in the partial evaluation of logic programs are based on well quasi orders (wqo) applied over (covering) ancestors, i.e., a subsequence of the atoms selected during a derivation. Ancestor (sub)sequences are used to increase the specialization power of unfolding while still guaranteeing termination and also to reduce the number of atoms for which the wqo has to be checked. Unfortunately, maintaining the structure of the ancestor relation during unfolding introduces significant overhead. We propose an efficient, practical local unfolding rule based on the notion of covering ancestors which can be used in combination with a wqo and allows a stack-based implementation without losing any opportunities for specialization. Using our technique, certain non-leftmost unfoldings are allowed as long as local unfolding is performed, i.e., we cover depth-first strategies. To deal with practical programs, we propose assertion-based techniques which allow our approach to treat programs that include (Prolog) built-ins and external predicates in a very extensible manner, for the case of leftmost unfolding. Finally, we report on our mplementation of these techniques embedded in a practical partial evaluator, which shows that our techniques, in addition to dealing with practical programs, are also significantly more efficient in time and somewhat more efficient in memory than traditional tree-based implementations. To appear in Theory and Practice of Logic Programming (TPLP)

    Efficient local unfolding with ancestor stacks for full prolog

    Get PDF
    The integration of powerful partial evaluation methods into practical compilers for logic programs is still far from reality. This is related both to 1) efficiency issues and to 2) the complications of dealing with practical programs. Regarding efnciency, the most successful unfolding rules used nowadays are based on structural orders applied over (covering) ancestors, i.e., a subsequence of the atoms selected during a derivation. Unfortunately, maintaining the structure of the ancestor relation during unfolding introduces significant overhead. We propose an efficient, practical local unfolding rule based on the notion of covering ancestors which can be used in combination with any structural order and allows a stack-based implementation without losing any opportunities for specialization. Regarding the second issue, we propose assertion-based techniques which allow our approach to deal with real programs that include (Prolog) built-ins and external predicates in a very extensible manner. Finally, we report on our implementation of these techniques in a practical partial evaluator, embedded in a state of the art compiler which uses global analysis extensively (the Ciao compiler and, specifically, its preprocessor CiaoPP). The performance analysis of the resulting system shows that our techniques, in addition to dealing with practical programs, are also significantly more efficient in time and somewhat more efficient in memory than traditional tree-based implementations

    Test Data Generation of Bytecode by CLP Partial Evaluation

    Full text link
    We employ existing partial evaluation (PE) techniques developed for Constraint Logic Programming (CLP) in order to automatically generate test-case generators for glass-box testing of bytecode. Our approach consists of two independent CLP PE phases. (1) First, the bytecode is transformed into an equivalent (decompiled) CLP program. This is already a well studied transformation which can be done either by using an ad-hoc decompiler or by specialising a bytecode interpreter by means of existing PE techniques. (2) A second PE is performed in order to supervise the generation of test-cases by execution of the CLP decompiled program. Interestingly, we employ control strategies previously defined in the context of CLP PE in order to capture coverage criteria for glass-box testing of bytecode. A unique feature of our approach is that, this second PE phase allows generating not only test-cases but also test-case generators. To the best of our knowledge, this is the first time that (CLP) PE techniques are applied for test-case generation as well as to generate test-case generators

    Turchin's Relation for Call-by-Name Computations: A Formal Approach

    Full text link
    Supercompilation is a program transformation technique that was first described by V. F. Turchin in the 1970s. In supercompilation, Turchin's relation as a similarity relation on call-stack configurations is used both for call-by-value and call-by-name semantics to terminate unfolding of the program being transformed. In this paper, we give a formal grammar model of call-by-name stack behaviour. We classify the model in terms of the Chomsky hierarchy and then formally prove that Turchin's relation can terminate all computations generated by the model.Comment: In Proceedings VPT 2016, arXiv:1607.0183

    Grid Vertex-Unfolding Orthogonal Polyhedra

    Full text link
    An edge-unfolding of a polyhedron is produced by cutting along edges and flattening the faces to a *net*, a connected planar piece with no overlaps. A *grid unfolding* allows additional cuts along grid edges induced by coordinate planes passing through every vertex. A vertex-unfolding permits faces in the net to be connected at single vertices, not necessarily along edges. We show that any orthogonal polyhedron of genus zero has a grid vertex-unfolding. (There are orthogonal polyhedra that cannot be vertex-unfolded, so some type of "gridding" of the faces is necessary.) For any orthogonal polyhedron P with n vertices, we describe an algorithm that vertex-unfolds P in O(n^2) time. Enroute to explaining this algorithm, we present a simpler vertex-unfolding algorithm that requires a 3 x 1 refinement of the vertex grid.Comment: Original: 12 pages, 8 figures, 11 references. Revised: 22 pages, 16 figures, 12 references. New version is a substantial revision superceding the preliminary extended abstract that appeared in Lecture Notes in Computer Science, Volume 3884, Springer, Berlin/Heidelberg, Feb. 2006, pp. 264-27

    Stacks of group representations

    Full text link
    We start with a small paradigm shift about group representations, namely the observation that restriction to a subgroup can be understood as an extension-of-scalars. We deduce that, given a group GG, the derived and the stable categories of representations of a subgroup HH can be constructed out of the corresponding category for GG by a purely triangulated-categorical construction, analogous to \'etale extension in algebraic geometry. In the case of finite groups, we then use descent methods to investigate when modular representations of the subgroup HH can be extended to GG. We show that the presheaves of plain, derived and stable representations all form stacks on the category of finite GG-sets (or the orbit category of GG), with respect to a suitable Grothendieck topology that we call the sipp topology. When HH contains a Sylow subgroup of GG, we use sipp Cech cohomology to describe the kernel and the image of the homomorphism T(G)T(H)T(G)\to T(H), where T()T(-) denotes the group of endotrivial representations.Comment: Slightly revised version of the 2012 June 21 versio
    corecore