8 research outputs found

    On the topological aspects of the theory of represented spaces

    Get PDF
    Represented spaces form the general setting for the study of computability derived from Turing machines. As such, they are the basic entities for endeavors such as computable analysis or computable measure theory. The theory of represented spaces is well-known to exhibit a strong topological flavour. We present an abstract and very succinct introduction to the field; drawing heavily on prior work by Escard\'o, Schr\"oder, and others. Central aspects of the theory are function spaces and various spaces of subsets derived from other represented spaces, and -- closely linked to these -- properties of represented spaces such as compactness, overtness and separation principles. Both the derived spaces and the properties are introduced by demanding the computability of certain mappings, and it is demonstrated that typically various interesting mappings induce the same property.Comment: Earlier versions were titled "Compactness and separation for represented spaces" and "A new introduction to the theory of represented spaces

    Exhaustible sets in higher-type computation

    Full text link
    We say that a set is exhaustible if it admits algorithmic universal quantification for continuous predicates in finite time, and searchable if there is an algorithm that, given any continuous predicate, either selects an element for which the predicate holds or else tells there is no example. The Cantor space of infinite sequences of binary digits is known to be searchable. Searchable sets are exhaustible, and we show that the converse also holds for sets of hereditarily total elements in the hierarchy of continuous functionals; moreover, a selection functional can be constructed uniformly from a quantification functional. We prove that searchable sets are closed under intersections with decidable sets, and under the formation of computable images and of finite and countably infinite products. This is related to the fact, established here, that exhaustible sets are topologically compact. We obtain a complete description of exhaustible total sets by developing a computational version of a topological Arzela--Ascoli type characterization of compact subsets of function spaces. We also show that, in the non-empty case, they are precisely the computable images of the Cantor space. The emphasis of this paper is on the theory of exhaustible and searchable sets, but we also briefly sketch applications

    Computable decision making on the reals and other spaces via partiality and nondeterminism

    Full text link
    Though many safety-critical software systems use floating point to represent real-world input and output, programmers usually have idealized versions in mind that compute with real numbers. Significant deviations from the ideal can cause errors and jeopardize safety. Some programming systems implement exact real arithmetic, which resolves this matter but complicates others, such as decision making. In these systems, it is impossible to compute (total and deterministic) discrete decisions based on connected spaces such as R\mathbb{R}. We present programming-language semantics based on constructive topology with variants allowing nondeterminism and/or partiality. Either nondeterminism or partiality suffices to allow computable decision making on connected spaces such as R\mathbb{R}. We then introduce pattern matching on spaces, a language construct for creating programs on spaces, generalizing pattern matching in functional programming, where patterns need not represent decidable predicates and also may overlap or be inexhaustive, giving rise to nondeterminism or partiality, respectively. Nondeterminism and/or partiality also yield formal logics for constructing approximate decision procedures. We implemented these constructs in the Marshall language for exact real arithmetic.Comment: This is an extended version of a paper due to appear in the proceedings of the ACM/IEEE Symposium on Logic in Computer Science (LICS) in July 201

    Infinite sets that admit fast exhaustive search

    No full text
    Abstract. Perhaps surprisingly, there are infinite sets that admit mechanical exhaustive search in finite time. An old example is the Cantor space of infinite sequences of binary digits. We investigate three related questions, in the realm of higher-type computation: (i) What kinds of infinite sets are exhaustible? It turns out that they have to be compact in the topological sense. A complete description is obtained by developing a computational version of an Arzela–Ascoli type characterization of compact subsets of function spaces. Another, less explicit, one is perhaps more appealing: a non-empty set is exhaustible if and only if it is a computable image of the Cantor space. (ii) How do we systematically build infinite exhaustible sets? Here some well-known topological closure properties of compact sets are shown to hold for exhaustible sets. This includes a computational version of the Tychonoff theorem, asserting that exhaustible sets are closed under countable products. (iii) How fast can exhaustive search over infinite sets be performed? Although exhaustive search over infinite sets is of course intractable, as is the case for finite sets, algorithms that are fast in surprising classes of instances are exhibited. We formulate time-complexity conjectures, which are backed by experiments, where the size of the input predicate for the search algorithm is taken as its modulus of uniform continuity. Keywords. Higher-type computability and complexity, Kleene–Kreisel functional, PCF, domain theory, programminglanguage semantics, topology, k-space, compactly generated space, Haskell, functional programming

    Effects for Efficiency: Asymptotic Speedup with First-Class Control

    Get PDF
    We study the fundamental efficiency of delimited control. Specifically, we show that effect handlers enable an asymptotic improvement in runtime complexity for a certain class of functions. We consider the generic count problem using a pure PCF-like base language λb\lambda_b and its extension with effect handlers λh\lambda_h. We show that λh\lambda_h admits an asymptotically more efficient implementation of generic count than any λb\lambda_b implementation. We also show that this efficiency gap remains when λb\lambda_b is extended with mutable state. To our knowledge this result is the first of its kind for control operators

    Validating Brouwer's Continuity Principle for Numbers Using Named Exceptions

    Get PDF
    This paper extends the Nuprl proof assistant (a system representative of the class of extensional type theories with dependent types) withnamed exceptionsandhandlers, as well as a nominalfreshoperator. Using these new features, we prove a version of Brouwer's continuity principle for numbers. We also provide a simpler proof of a weaker version of this principle that only uses diverging terms. We prove these two principles in Nuprl's metatheory using our formalization of Nuprl in Coq and reflect these metatheoretical results in the Nuprl theory as derivation rules. We also show that these additions preserve Nuprl's key metatheoretical properties, in particular consistency and the congruence of Howe's computational equivalence relation. Using continuity and the fan theorem, we prove important results of Intuitionistic Mathematics: Brouwer's continuity theorem, bar induction on monotone bars and the negation of the law of excluded middle.</jats:p

    Foundations for programming and implementing effect handlers

    Get PDF
    First-class control operators provide programmers with an expressive and efficient means for manipulating control through reification of the current control state as a first-class object, enabling programmers to implement their own computational effects and control idioms as shareable libraries. Effect handlers provide a particularly structured approach to programming with first-class control by naming control reifying operations and separating from their handling. This thesis is composed of three strands of work in which I develop operational foundations for programming and implementing effect handlers as well as exploring the expressive power of effect handlers. The first strand develops a fine-grain call-by-value core calculus of a statically typed programming language with a structural notion of effect types, as opposed to the nominal notion of effect types that dominates the literature. With the structural approach, effects need not be declared before use. The usual safety properties of statically typed programming are retained by making crucial use of row polymorphism to build and track effect signatures. The calculus features three forms of handlers: deep, shallow, and parameterised. They each offer a different approach to manipulate the control state of programs. Traditional deep handlers are defined by folds over computation trees, and are the original con-struct proposed by Plotkin and Pretnar. Shallow handlers are defined by case splits (rather than folds) over computation trees. Parameterised handlers are deep handlers extended with a state value that is threaded through the folds over computation trees. To demonstrate the usefulness of effects and handlers as a practical programming abstraction I implement the essence of a small UNIX-style operating system complete with multi-user environment, time-sharing, and file I/O. The second strand studies continuation passing style (CPS) and abstract machine semantics, which are foundational techniques that admit a unified basis for implementing deep, shallow, and parameterised effect handlers in the same environment. The CPS translation is obtained through a series of refinements of a basic first-order CPS translation for a fine-grain call-by-value language into an untyped language. Each refinement moves toward a more intensional representation of continuations eventually arriving at the notion of generalised continuation, which admit simultaneous support for deep, shallow, and parameterised handlers. The initial refinement adds support for deep handlers by representing stacks of continuations and handlers as a curried sequence of arguments. The image of the resulting translation is not properly tail-recursive, meaning some function application terms do not appear in tail position. To rectify this the CPS translation is refined once more to obtain an uncurried representation of stacks of continuations and handlers. Finally, the translation is made higher-order in order to contract administrative redexes at translation time. The generalised continuation representation is used to construct an abstract machine that provide simultaneous support for deep, shallow, and parameterised effect handlers. kinds of effect handlers. The third strand explores the expressiveness of effect handlers. First, I show that deep, shallow, and parameterised notions of handlers are interdefinable by way of typed macro-expressiveness, which provides a syntactic notion of expressiveness that affirms the existence of encodings between handlers, but it provides no information about the computational content of the encodings. Second, using the semantic notion of expressiveness I show that for a class of programs a programming language with first-class control (e.g. effect handlers) admits asymptotically faster implementations than possible in a language without first-class control
    corecore