4 research outputs found

    An integration of reduction and logic for programming languages

    Get PDF
    A new declarative language is presented which captures the expressibility of both logic programming languages and functional languages. This is achieved by conditional graph rewriting, with full unification as the parameter passing mechanism. The syntax and semantics are described both formally and informally, and examples are offered to support the expressibility claim made above. The language design is of further interest due to its uniformity and the inclusion of a novel mechanism for type inference in the presence of derived type hierarchie

    The design and implementation of a relational programming system.

    Get PDF
    The declarative class of computer languages consists mainly of two paradigms - the logic and the functional. Much research has been devoted in recent years to the integration of the two with the aim of securing the advantages of both without retaining their disadvantages. To date this research has, arguably, been less fruitful than initially hoped. A large number of composite functional/logical languages have been proposed but have generally been marred by the lack of a firm, cohesive, mathematical basis. More recently new declarative paradigms, equational and constraint languages, have been advocated. These however do not fully encompass those features we perceive as being central to functional and logic languages. The crucial functional features are higher-order definitions, static polymorphic typing, applicative expressions and laziness. The crucial logic features are ability to reason about both functional and non-functional relationships and to handle computations involving search. This thesis advocates a new declarative paradigm which lies midway between functional and logic languages - the so-called relational paradigm. In a relationallanguage program and data alike are denoted by relations. All expressions are relations constructed from simpler expressions using operators which form a relational algebra. The impetus for use of relations in a declarative language comes from observations concerning their connection to functional and logic programming. Relations are mathematically more general than functions modelling non-functional as well as functional relationships. They also form the basis of many logic languages, for example, Prolog. This thesis proposes a new relational language based entirely on binary relations, named Drusilla. We demonstrate the functional and logic aspects of Drusilla. It retains the higher-order objects and polymorphism found in modern functional languages but handles non-determinism and models relationships between objects in the manner of a logic language with notion of algorithm being composed of logic and control elements. Different programming styles - functional, logic and relational- are illustrated. However, such expressive power does not come for free; it has associated with it a high cost of implementation. Two main techniques are used in the necessarily complex language interpreter. A type inference system checks programs to ensure they are meaningful and simultaneously performs automatic representation selection for relations. A symbolic manipulation system transforms programs to improve. efficiency of expressions and to increase the number of possible representations for relations while preserving program meaning

    The design and implementation of a multiparadigm programming language.

    Get PDF
    by Chi-keung Luk.Thesis (M.Phil.)--Chinese University of Hong Kong, 1993.Includes bibliographical references (leaves 169-174).Preface --- p.xiChapter 1 --- Introduction --- p.1Chapter 1.1 --- Programming Languages --- p.2Chapter 1.2 --- Programming Paradigms --- p.2Chapter 1.2.1 --- What is a programming paradigm --- p.2Chapter 1.2.2 --- Which came first? Languages or paradigms? --- p.2Chapter 1.2.3 --- Overview of some paradigms --- p.4Chapter 1.2.4 --- A spectrum of paradigms --- p.6Chapter 1.2.5 --- Mulitparadigm systems --- p.7Chapter 1.3 --- The Objectives of this research --- p.8Chapter 2 --- "Studies of the object-oriented, the logic and the functional paradigms" --- p.10Chapter 2.1 --- The Object-Oriented Paradigm --- p.10Chapter 2.1.1 --- Basic components --- p.10Chapter 2.1.2 --- Motivations --- p.11Chapter 2.1.3 --- Some related issues --- p.12Chapter 2.1.4 --- Computational models for object-oriented programming --- p.16Chapter 2.2 --- The Functional Paradigm --- p.18Chapter 2.2.1 --- Basic concepts --- p.18Chapter 2.2.2 --- Lambda calculus --- p.20Chapter 2.2.3 --- The characteristics of functional programs --- p.21Chapter 2.2.4 --- Practicality of functional programming --- p.25Chapter 2.3 --- The Logic Paradigm --- p.28Chapter 2.3.1 --- Relations --- p.28Chapter 2.3.2 --- Logic programs --- p.29Chapter 2.3.3 --- The opportunity for parallelism --- p.30Chapter 2.4 --- Summary --- p.31Chapter 3 --- A survey of some existing multiparadigm languages --- p.32Chapter 3.1 --- Logic + Object-Oriented --- p.33Chapter 3.1.1 --- LogiC++ --- p.33Chapter 3.1.2 --- Intermission --- p.34Chapter 3.1.3 --- Object-Oriented Programming in Prolog (OOPP) --- p.36Chapter 3.1.4 --- Communication Prolog Unit (CPU) --- p.37Chapter 3.1.5 --- DLP --- p.37Chapter 3.1.6 --- Representing Objects in a Logic Programming Language with Scoping Constructs (OLPSC) --- p.39Chapter 3.1.7 --- KSL/Logic --- p.40Chapter 3.1.8 --- Orient84/K --- p.41Chapter 3.1.9 --- Vulcan --- p.42Chapter 3.1.10 --- The Bridge approach --- p.43Chapter 3.1.11 --- Discussion --- p.44Chapter 3.2 --- Functional + Object-Oriented --- p.46Chapter 3.2.1 --- PROOF --- p.46Chapter 3.2.2 --- A Functional Language with Classes (FLC) --- p.47Chapter 3.2.3 --- Common Lisp Object System (CLOS) --- p.49Chapter 3.2.4 --- FOOPS --- p.50Chapter 3.2.5 --- Discussion --- p.51Chapter 3.3 --- Logic + Functional --- p.52Chapter 3.3.1 --- HOPE --- p.52Chapter 3.3.2 --- FUNLOG --- p.54Chapter 3.3.3 --- F* --- p.55Chapter 3.3.4 --- LEAF --- p.56Chapter 3.3.5 --- Applog --- p.57Chapter 3.3.6 --- Discussion --- p.58Chapter 3.4 --- Logic + Functional + Object-Oriented --- p.61Chapter 3.4.1 --- Paradise --- p.61Chapter 3.4.2 --- LIFE --- p.62Chapter 3.4.3 --- UNIFORM --- p.63Chapter 3.4.4 --- G --- p.64Chapter 3.4.5 --- FOOPlog --- p.66Chapter 3.4.6 --- Logic and Objects (L&O) --- p.66Chapter 3.4.7 --- Discussion --- p.67Chapter 4 --- The design of a multiparadigm language I --- p.70Chapter 4.1 --- An Object-Oriented Framework --- p.71Chapter 4.1.1 --- A hierarchy of classes --- p.71Chapter 4.1.2 --- Program structure --- p.71Chapter 4.1.3 --- Parametric classes --- p.72Chapter 4.1.4 --- Inheritance --- p.73Chapter 4.1.5 --- The meanings of classes and methods --- p.75Chapter 4.1.6 --- Objects and messages --- p.75Chapter 4.2 --- The logic Subclasses --- p.76Chapter 4.2.1 --- Syntax --- p.76Chapter 4.2.2 --- Distributed inference --- p.76Chapter 4.2.3 --- Adding functions and expressions to logic programs --- p.77Chapter 4.2.4 --- State modelling --- p.79Chapter 4.3 --- The functional Subclasses --- p.80Chapter 4.3.1 --- The syntax of functions --- p.80Chapter 4.3.2 --- Abstract data types --- p.81Chapter 4.3.3 --- Augmented list comprehensions --- p.82Chapter 4.4 --- The Semantic Foundation of I Programs --- p.84Chapter 4.4.1 --- T1* : Transform functions into Horn clauses --- p.84Chapter 4.4.2 --- T2*: Transform object-oriented features into pure logic --- p.85Chapter 4.5 --- Exploiting Parallelism in I Programs --- p.89Chapter 4.5.1 --- Inter-object parallelism --- p.89Chapter 4.5.2 --- Intra-object parallelism --- p.92Chapter 4.6 --- Discussion --- p.96Chapter 5 --- An implementation of a prototype of I --- p.99Chapter 5.1 --- System Overview --- p.99Chapter 5.2 --- I-to-Prolog Translation --- p.101Chapter 5.2.1 --- Pass 1 - lexical and syntax analysis --- p.101Chapter 5.2.2 --- Pass 2 - Class Table Construction and Semantic Checking --- p.101Chapter 5.2.3 --- Pass 3 - Determination of Multiple Inheritance Precedence --- p.105Chapter 5.2.4 --- Pass 4 - Translation of the directive part --- p.110Chapter 5.2.5 --- Pass 5 - Creation of Prolog source code for an I object --- p.110Chapter 5.2.6 --- Using expressions in logic methods --- p.112Chapter 5.3 --- I-to-LML Translation --- p.114Chapter 5.4 --- The Run-time Handler --- p.117Chapter 5.4.1 --- Object Management --- p.118Chapter 5.4.2 --- Process Management and Message Passing --- p.121Chapter 6 --- Some applications written in I --- p.125Chapter 6.1 --- Modeling of a State Space Search --- p.125Chapter 6.2 --- A Solution to the N-queen Problem --- p.129Chapter 6.3 --- Object-Oriented Modeling of a Database --- p.131Chapter 6.4 --- A Simple Expert System --- p.133Chapter 6.5 --- Summary --- p.138Chapter 7 --- Conclusion and future work --- p.139Chapter 7.1 --- Conclusion --- p.139Chapter 7.2 --- Future Work --- p.141Chapter A --- Language manual --- p.146Chapter A.1 --- Introduction --- p.146Chapter A.2 --- Syntax --- p.146Chapter A.2.1 --- The lexical specification --- p.146Chapter A.2.2 --- The syntax specification --- p.149Chapter A3 --- Classes --- p.152Chapter A.4 --- Object Creation and Method Invocation --- p.153Chapter A.5 --- The logic Subclasses --- p.155Chapter A.6 --- The functional Subclasses --- p.156Chapter A.7 --- Types --- p.158Chapter A.8 --- Mutable States --- p.158Chapter B --- User's guide --- p.160Chapter B.1 --- System Calls --- p.160Chapter B.2 --- Configuration Parameters --- p.162Chapter B.3 --- Errors --- p.163Chapter B.4 --- Implementation Limits --- p.164Chapter B.5 --- How to install the system --- p.164Chapter B.6 --- How to use the system --- p.164Chapter B.7 --- How to recompile the system --- p.166Chapter B.8 --- Directory arrangement --- p.167Chapter C --- List of publications --- p.168Bibliography --- p.16
    corecore