28,100 research outputs found

    From Boolean Equalities to Constraints

    Get PDF
    Although functional as well as logic languages use equality to discriminate between logically different cases, the operational meaning of equality is different in such languages. Functional languages reduce equational expressions to their Boolean values, True or False, logic languages use unification to check the validity only and fail otherwise. Consequently, the language Curry, which amalgamates functional and logic programming features, offers two kinds of equational expressions so that the programmer has to distinguish between these uses. We show that this distinction can be avoided by providing an analysis and transformation method that automatically selects the appropriate operation. Without this distinction in source programs, the language design can be simplified and the execution of programs can be optimized. As a consequence, we show that one kind of equational expressions is sufficient and unification is nothing else than an optimization of Boolean equality

    Towards a Declarative Query and Transformation Language for XML and Semistructured Data: Simulation Unification

    Get PDF
    The growing importance of XML as a data interchange standard demands languages for data querying and transformation. Since the mid 90es, several such languages have been proposed that are inspired from functional languages (such as XSLT [1]) and/or database query languages (such as XQuery [2]). This paper addresses applying logic programming concepts and techniques to designing a declarative, rule-based query and transformation language for XML and semistructured data. The paper first introduces issues specific to XML and semistructured data such as the necessity of flexible “query terms” and of “construct terms”. Then, it is argued that logic programming concepts are particularly appropriate for a declarative query and transformation language for XML and semistructured data. Finally, a new form of unification, called “simulation unification”, is proposed for answering “query terms”, and it is illustrated on examples

    Lazy unification with inductive simplification

    No full text
    Unification in the presence of an equational theory is an important problem in theorem-proving and in the integration of functional and logic programming languages. This paper presents an improvement of the proposed lazy unification methods by incorporating simplification with inductive axioms into the unification process. Inductive simplification reduces the search space so that in some case infinite search spaces are reduced to finite ones. Consequently, more efficient unification algorithms can be achieved. We prove soundness and completeness of our method for equational theories represented by ground confluent and terminating rewrite systems

    Modelling the combination of functional and logic programming languages

    Get PDF
    The combination of functional and pure Horn clause logic languages is formally introduced. To give a framework for the investigation of implementations we define a complete and consistent model, which retains full invertibility and allows separation of logic and control. Some existing implementations are discussed from this viewpoint. An extended unification algorithm is suggested, which incorporates the features demanded by our model

    Carnap: an Open Framework for Formal Reasoning in the Browser

    Get PDF
    This paper presents an overview of Carnap, a free and open framework for the development of formal reasoning applications. Carnap’s design emphasizes flexibility, extensibility, and rapid prototyping. Carnap-based applications are written in Haskell, but can be compiled to JavaScript to run in standard web browsers. This combination of features makes Carnap ideally suited for educational applications, where ease-of-use is crucial for students and adaptability to different teaching strategies and classroom needs is crucial for instructors. The paper describes Carnap’s implementation, along with its current and projected pedagogical applications
    • …
    corecore