6 research outputs found

    Adding plural arguments to Curry programs

    Get PDF
    Functional logic languages combine lazy (demand-driven) evaluation strategies from functional programming with non-deterministic computations from logic programming. To provide a strategy-independent semantics, most languages are based on the call-time choice semantics where parameters are passed as values. From an implementation point of view, the call-time choice semantics fits well with sharing performed by lazy languages. On the other hand, there are also situations where it is intended to pass non-deterministic arguments as sets of values in order to exploit the power of non-deterministic programming. This alternative parameter passing model is known under the name "plural" arguments. In this paper, we show how both mechanisms can be integrated in a single language. In particular, we present a novel technique to implement plural arguments in a call-time choice language so that existing implementations of contemporary functional logic languages can be easily re-used to implement plural parameter passing

    Acute: High-level programming language design for distributed computation : Design rationale and language definition

    Get PDF
    This paper studies key issues for distributed programming in high-level languages. We discuss the design space and describe an experimental language, Acute, which we have defined and implemented. Acute extends an OCaml core to support distributed development, deployment, and execution, allowing type-safe interaction between separately-built programs. It is expressive enough to enable a wide variety of distributed infrastructure layers to be written as simple library code above the byte-string network and persistent store APIs, disentangling the language runtime from communication. This requires a synthesis of novel and existing features: (1) type-safe marshalling of values between programs; (2) dynamic loading and controlled rebinding to local resources; (3) modules and abstract types with abstraction boundaries that are respected by interaction; (4) global names, generated either freshly or based on module hashes: at the type level, as runtime names for abstract types; and at the term level, as channel names and other interaction handles; (5) versions and version constraints, integrated with type identity; (6) local concurrency and thread thunkification; and (7) second-order polymorphism with a namecase construct. We deal with the interplay among these features and the core, and develop a semantic definition that tracks abstraction boundaries, global names, and hashes throughout compilation and execution, but which still admits an efficient implementation strategy

    Towards secure distributed computations

    Get PDF
    Nowadays, there are plenty of networks that work in a cooperative way and form what we know as grids of computers. These grids are serving a lot of purposes, and they are used with good results for intensive calculation, because the joined computing power aids in solving complex functions. To cope with these new requirements and facilities, programming languages had to evolve to new paradigms, including facilities to do distributed computing in a straightforward way. Functional programming is a paradigm that treats computation as the evaluation of mathematical functions. Functional programming languages implement the concepts introduced by this paradigm. Usually they are modeled using I» calculus, but other variants exist. In this line we have languages like ML, Haskell and (Pure)Lisp. This work has its focus on ML-like languages. As part of the evolution in grid computing, some functional programming languages were adapted to handle these new requirements. To be used in distributed contexts, the calculi had to be extended with new paradigms. Theoretic support for concurrent and distributed programming was conceived. For concurrent programming the I_ calculus was created, and this formalism was extended for mobility on the Ambient calculus. From these approaches, new functional languages were created. Examples of concurrent programming languages are Pict, occam-pi and Concurrent Haskell. In the case of distributed programming languages, we can mention Nomadic Pict, Alice and Acute. After the creation and utilization of such languages, an aspect remaining to be introduced is the security properties of these computations. The security properties of languages that execute on a single machine are difficult to achieve. Increased precautions must be take into account when dealing with lots of hosts and complex networks.Distributed programming languages must achieve, among other properties, correctness in its own abstractions: they must satisfy type-safety and abstraction safety. This work is concerned with correctness and safety in distributed languages, with focus on ML-like languages and the properties they have. To this aim, we have focused on a language called Acute. This language was born for doing research in distributed programming, and was created as a joint effort of the University of Cambridge and INRIA Rocquencourt. In Acute we have modern primitives for interaction between cooperating programs. Two primitives, marshal and unmarshal, have been introduced with this in mind. Acute has powerful properties: type and abstraction safety are guaranteed along the distributed system. But this only happens when there are no entities that can tamper with data transmitted between hosts. If this situation occurs, safety can be no longer guaranteed. The Acute language typechecks values at unmarshal time, to ensure its correctness. This can be made with values of concrete types, but if we have values of abstract types the situation os different: we may have only partial information to check, or the representation could be not available at all. So, how can values of abstract types be secured, in the context of a distributed programming language? We propose the use of a novel technique, called Proof Carrying Results. This technique is based on Neculaâ_Ts proof carrying code. Basically, the result of some computation comes equipped with a certificate, or witness, that can be used with abstract types.If the value comes with a witness that the computation was performed correctly, the caller can verify this witness and know that the value was generated in a good way. Throughout this thesis work, we will show how to add the PCR technique to a distributed programming language. The supporting infrastructure for the technique is introduced along with it. For checking the values and associated witnesses produced by some host, we use the COQ proof checker for a precise and reliable verification

    Annotated Type Systems for Program Analysis

    Get PDF
    In this Ph.D. thesis, we study four program analyses. Three of them are specified by annotated type systems and the last one by abstract interpretation.We present a combined strictness and totality analysis. We are specifying the analysis as an annotated type system. The type system allows conjunctions of annotated types, but only at the top-level. The analysis is somewhat more powerful than the strictness analysis by Kuo and Mishra due to the conjunctions and in that we also consider totality. The analysis is shown sound with respect to a natural-style operational semantics. The analysis is not immediately extendable to full conjunction.The second analysis is also a combined strictness and totality analysis, however with ``full´´ conjunction. Soundness of the analysis is shown with respect to a denotational semantics. The analysis is more powerful than the strictness analyses by Jensen and Benton in that it in addition to strictness considers totality. So far we have only specified the analyses, however in order for the analyses to be practically useful we need an algorithm for inferring the annotated types. We construct an algorithm for the second analysis using the lazy type approach by Hankin and Le Métayer. The reason for choosing the second analysis from the thesis is that the approach is not applicable to the first analysis.The third analysis we study is a binding time analysis. We take the analysis specified by Nielson and Nielson and we construct a more efficient algorithm than the one proposed by Nielson and Nielson. The algorithm collects constraints in a structural manner like the type inference algorithm by Damas. Afterwards the minimal solution to the set of constraints is found.The last analysis in the thesis is specified by abstract interpretation. Hunt shows that projection based analyses are subsumed by PER (partial equivalence relation) based analyses using abstract interpretation. The PERs used by Hunt are strict, i.e. bottom is related to bottom. Here we lift this restriction by requiring the PERs to be uniform, in the sense that they treat all the integers equally. By allowing non-strict PERs we get three properties on the integers, corresponding to the three annotations used in the first and second analysis in the thesis

    Minimal thunkification

    No full text
    corecore