English
Related papers

Related papers: Transforming while/do/for/foreach-Loops into Recur…

200 papers

Given a simple recursive function, we show how to extract two interacting processes from it. The two processes can be described by means of iterative programs, one of which is intrinsically reversible, in a language that, up to minor…

Programming Languages · Computer Science 2021-02-19 Armando B. Matos , Luca Paolini , Luca Roversi

Looping is one of the fundamental logical instructions used for repeating a block of code. It is used in programs across all programming languages. Traditionally, in languages like C, the for loop is used extensively for repeated execution…

Programming Languages · Computer Science 2014-10-15 Rishabh Jain , Sakshi Gupta

Reflective systems allow their own structures to be altered from within. Here we are concerned with a style of reflection, called linguistic reflection, which is the ability of a running program to generate new program fragments and to…

Programming Languages · Computer Science 2007-05-23 G. N. C. Kirby , R. Morrison , D. W. Stemple

Indexed loop scopes have been shown to be a helpful tool in creating sound loop invariant rules in dynamic logic for programming languages with abrupt completion, such as Java. These rules do not require program transformation of the loop…

Programming Languages · Computer Science 2020-02-10 Nathan Wasser , Dominic Steinhöfel

Recursive calls over recursive data are useful for generating probability distributions, and probabilistic programming allows computations over these distributions to be expressed in a modular and intuitive way. Exact inference is also…

Programming Languages · Computer Science 2023-03-28 David Chiang , Colin McDonald , Chung-chieh Shan

Most modern (classical) programming languages support recursion. Recursion has also been successfully applied to the design of several quantum algorithms and introduced in a couple of quantum programming languages. So, it can be expected…

Logic in Computer Science · Computer Science 2018-12-11 Zhaowei Xu , Mingsheng Ying , Shenggang Ying

Loop invariants play a central role in the verification of imperative programs. However, finding these invariants is often a difficult and time-consuming task for the programmer. We have previously shown how program transformation can be…

Logic in Computer Science · Computer Science 2017-08-25 G. W. Hamilton

In this paper, we study three applications of recursion to problems in coding and random permutations. First, we consider locally recoverable codes with partial locality and use recursion to estimate the minimum distance of such codes. Next…

Combinatorics · Mathematics 2020-12-22 Ghurumuruhan Ganesan

Given a simple recursive function, we show how to extract from it a reversible and an classical iterative part. Those parts can synchronously cooperate under a Producer/Consumer pattern in order to implement the original recursive function.…

Programming Languages · Computer Science 2021-05-12 Armando B. Matos , Luca Paolini , Luca Roversi

A well-established approach to reasoning about loops during program analysis is to capture the effect of a loop by extracting recurrences from the loop; these express relationships between the values of variables, or program properties such…

Logic in Computer Science · Computer Science 2021-09-13 Bishoksan Kafle , John P. Gallagher , Manuel V. Hermenegildo , Maximiliano Klemen , Pedro López-García , José F. Morales

Pragmas for loop transformations, such as unrolling, are implemented in most mainstream compilers. They are used by application programmers because of their ease of use compared to directly modifying the source code of the relevant loops.…

Programming Languages · Computer Science 2019-01-31 Michael Kruse , Hal Finkel

While loops are present in virtually all imperative programming languages. They are important both for practical reasons (performing a number of iterations not known in advance) and theoretical reasons (achieving Turing completeness). In…

Programming Languages · Computer Science 2023-09-26 David Nowak , Vlad Rusu

The objective of this paper is to present general, mechanically verified, refinement rules for reasoning about recursive programs and while loops in the context of concurrency. Unlike many approaches to concurrency, we do not assume that…

Logic in Computer Science · Computer Science 2025-12-09 Ian J. Hayes , Larissa A. Meinicke , Cliff B. Jones

Throughout the history of functional programming, recursion has emerged as a natural method for describing loops in programs. However, there does often exist a substantial cognitive distance between the recursive definition and the simplest…

Programming Languages · Computer Science 2020-02-17 Satoshi Egi , Yuichi Nishiwaki

Many algorithmic steps require more than one statement to implement, but not big enough to be a method (e.g., add element, find the maximum, determine a value, etc.). These steps are generally implemented by loops. Internal comments for the…

Software Engineering · Computer Science 2019-04-02 Preetha Chatterjee

Formal Methods tools will never have as many users as tools for popular programming languages and so the effort spent on constructing Integrated Development Environments (IDEs) will be orders of magnitudes lower than that of programming…

We describe how to use refactoring tools to transform a Java program conforming to the Composite design pattern into a program conforming to the Visitor design pattern with the same external behavior. We also describe the inverse…

Software Engineering · Computer Science 2013-07-02 Akram Ajouli , Julien Cohen

Iterative algorithms are traditionally expressed in ACL2 using recursion. On the other hand, Common Lisp provides a construct, loop, which -- like most programming languages -- provides direct support for iteration. We describe an ACL2…

Logic in Computer Science · Computer Science 2020-09-30 Matt Kaufmann , J Strother Moore

Refactoring is an essential activity during software evolution. Frequently, practitioners rely on such transformations to improve source code maintainability and quality. As a consequence, this process may produce new source code entities…

Software Engineering · Computer Science 2020-03-11 Aline Brito , Andre Hora , Marco Tulio Valente

A circular program creates a data structure whose computation depends upon itself or refers to itself. The technique is used to implement the classic data structures circular and doubly-linked lists, threaded trees and queues, in a…

Programming Languages · Computer Science 2024-03-05 Lloyd Allison
‹ Prev 1 2 3 10 Next ›