Pola: A Language for PTIME Programming

نویسندگان

  • Michael J. Burrell
  • J. Robin B. Cockett
  • Brian F. Redmond
چکیده

Pola is a functional style programming language—currently under development—whose type system guarantees that all its programs run in polynomial time. Indeed, as every polynomial time (PTIME) algorithm can be rendered in Pola, the language is complete for polynomial time programming. Furthermore, to someone familiar with functional programming, Pola enforces a style of programming which is—relative to what is being achieved—quite natural. Pola was inspired by the realization that Bellantoni and Cook’s system of safe recursion [1] can be viewed as the proof theory of a polarized logic [4]. As polarized logic was developed to model games, Pola has inherited some game theoretic terminology. In particular, rather than having “safe” and “normal” types, Pola has “player” and “opponent” types. The game theoretic view is that the opponent drives the iteration of computation while the player responds in constant time (and space) in the context he is given. This semantics has a particularly appealing and simple categorical presentation using a fibration whose fibers are affine categories together with a notion of “comprehended” inductive fixed points. The development of implicit systems for PTIME programs has considerable history. In particular, Bellantoni and Cook’s system of safe recursion is a simplification of a slightly earlier system of Leivant [8]. That system used tiered recursion and supported a general class of inductive data. Bellantoni and Cook, besides simplifying the system of tiers by safe recursion, also abandoned general inductive data in favor of modeling binary numbers: this limits their system as a basis for programming. Hofmann, in his habilitationsschrift [6], aware of all the above, developed a modal type system for PTIME programs which he modeled in a presheaf topos. In particular, Hofmann suggested that constant time affine computations could be used as the basis for stepping up to polynomial time. Pola’s player world (in a given opponent context) is, as mentioned above, both affine and populated by constant time computations. Furthermore, in Pola these player worlds can additionally support arbitrary coinductive fixed points. An important step in the development of Pola was to provide uniform recursion schemes both for inductive and coinductive data. Pola’s recursion scheme derives from the circular proof systems of Luigi Santocanale [11], which also appeared earlier (with other schemes) in Varmo Vene’s thesis [12]. This recursion scheme, as used in Pola, is interesting as it has some built-in higher-order content which allows one to avoid Colson’s objection [5, 10] to first-order recursion schemes and to express recursive programs in a reasonably natural manner. The original motivation behind Pola was driven by the investigation of implicit type systems for low complexity programs. However, the fact that there is a relatively simple categorical semantics for this system, suggests another important direction: perhaps, categorical techniques can be usefully employed to obtain a deeper structural understanding of PTIME?

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Declarative PTIME Queries for Relational Databases using Quantifier Elimination

In this paper, we consider the problem of expressing and computing queries on relational deductive databases in a purely declarative query language, called SHQL (Semi-Horn Query Language). Assuming the relational databases in question are ordered, we show that all SHQL queries are computable in PTIME (polynomial time) and the whole class of PTIME queries is expressible in SHQL. Although similar...

متن کامل

PTIME Queries Revisited

The existence of a language expressing precisely the PTIME queries on arbitrary structures remains the central open problem in the theory of database query languages. As it turns out, two variants of this question have been formulated. Surprisingly, despite the importance of the problem, the relationship between these variants has not been systematically explored. A first contribution of the pr...

متن کامل

Logical foundations and complexity of 4QL, a query language with unrestricted negation

The paper discusses properties of a DATALOG¬¬-like query language 4QL, originally outlined by Małuszyński and Szałas [MS11]. 4QL allows one to use rules with negation in heads and bodies of rules. It is based on a simple and intuitive semantics and provides uniform tools for “lightweight” versions of known forms of nonmonotonic reasoning. Negated literals in heads of rules may naturally lead to...

متن کامل

Indexed Realizability for Bounded-Time Programming with References and Type Fixpoints

The field of implicit complexity has recently produced several bounded-complexity programming languages. This kind of language allows to implement exactly the functions belonging to a certain complexity class. We here present a realizability semantics for a higher-order functional language based on a fragment of linear logic called LAL which characterizes the complexity class PTIME. This langua...

متن کامل

Evaluating Intelligent Knowledge Systems

The article published in Knowledge and Information Systems examines the evaluation of a user-adaptive personal assistant agent designed to assist a busy knowledge worker in time management. The article examines the managerial and technical challenges of designing adequate evaluation and the tension of collecting adequate data without a fully functional, deployed system. The PTIME agent was part...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2009