67,886 research outputs found

    On the Implementation of GNU Prolog

    Get PDF
    GNU Prolog is a general-purpose implementation of the Prolog language, which distinguishes itself from most other systems by being, above all else, a native-code compiler which produces standalone executables which don't rely on any byte-code emulator or meta-interpreter. Other aspects which stand out include the explicit organization of the Prolog system as a multipass compiler, where intermediate representations are materialized, in Unix compiler tradition. GNU Prolog also includes an extensible and high-performance finite domain constraint solver, integrated with the Prolog language but implemented using independent lower-level mechanisms. This article discusses the main issues involved in designing and implementing GNU Prolog: requirements, system organization, performance and portability issues as well as its position with respect to other Prolog system implementations and the ISO standardization initiative.Comment: 30 pages, 3 figures, To appear in Theory and Practice of Logic Programming (TPLP); Keywords: Prolog, logic programming system, GNU, ISO, WAM, native code compilation, Finite Domain constraint

    Computing Preferred Answer Sets by Meta-Interpretation in Answer Set Programming

    Full text link
    Most recently, Answer Set Programming (ASP) is attracting interest as a new paradigm for problem solving. An important aspect which needs to be supported is the handling of preferences between rules, for which several approaches have been presented. In this paper, we consider the problem of implementing preference handling approaches by means of meta-interpreters in Answer Set Programming. In particular, we consider the preferred answer set approaches by Brewka and Eiter, by Delgrande, Schaub and Tompits, and by Wang, Zhou and Lin. We present suitable meta-interpreters for these semantics using DLV, which is an efficient engine for ASP. Moreover, we also present a meta-interpreter for the weakly preferred answer set approach by Brewka and Eiter, which uses the weak constraint feature of DLV as a tool for expressing and solving an underlying optimization problem. We also consider advanced meta-interpreters, which make use of graph-based characterizations and often allow for more efficient computations. Our approach shows the suitability of ASP in general and of DLV in particular for fast prototyping. This can be fruitfully exploited for experimenting with new languages and knowledge-representation formalisms.Comment: 34 pages, appeared as a Technical Report at KBS of the Vienna University of Technology, see http://www.kr.tuwien.ac.at/research/reports

    Extending the relational model with constraint satisfaction

    Get PDF
    We propose a new approach to data driven constraint programming. By extending the relational model to handle constraints and variables as first class citizens, we are able to express first order logic SAT problems using an extended SQL which we refer to as SAT/SQL. With SAT/SQL, one can efficiently solve a wide range of practical constraint and optimization problems. SAT/SQL integrates both SAT solver and relational data processing to enable efficient and large scale data driven constraint programming. Furthermore, our research presents two novel meta-programming operators: MINREPAIR and MIN-CONFLICT which are iterative debugging facilities for constraint programming with SAT/SQL

    Constraint specification by example in a Meta-CASE tool

    Get PDF
    CASE tools are very helpful to software engineers in different ways and in different phases of software development. However, they are not easy to specialise to meet the needs of particular application domains or particular software modelling requirements. Meta-CASE tools offer a way of providing such specialisation by enabling a designer to specify a tool which is then generated automatically. Constraints are often used in such meta-CASE tools as a technique for governing the syntax and semantics of model elements and the values of their attributes. However, although constraint definition is a difficult process it has attracted relatively little research attention. The PhD research described here presents an approach for improving the process of CASE tool constraint specification based on the notion of programming by example (or demonstration). The feasibility of the approach will be demonstrated via experiments with a prototype using the meta-CASE tool Diagram Editor Constraints System (DECS) as context

    Closures are Needed for Closed Module Systems

    Get PDF
    In a classical paper of D.H.D. Warren, the higher-order extensions of Prolog were questioned as they do not really provide more expressive power than meta-programming predicates. Without disputing this argumentation in the context of a logic programming system without modules, we show that the situation is different in a closed module system. By closed we mean the property that the module system is able to prevent any call to the private predicates of a module from the other modules, in particular through meta-programming predicates. We show that this property necessitates to distinguish the execution of a term (meta-programming predicate call) from the execution of a closure (higher order). We propose a module system for Constraint Logic Programming with a notion of closures inspired from Linear Concurrent Constraint programming. This module system is quite simple and pretty independent of a precise language (it is currently implemented for GNU-Prolog). Although this system can be seen as a simple layer of syntactic sugar, it does provide a discipline for naming predicates and hiding code, making possible the development of libraries and facilitating the safe re-use of existing code. Furthermore we provide the module system with logical and operational semantics. This formal setting is used in the paper to compare our approach to the other module systems proposed for Prolog, which generally do not ensure full code protection

    Why It's Nice to be Quoted: Quasiquoting for Prolog

    Get PDF
    Prolog's support for dynamic programming, meta programming and text processing using context free grammars make the language highly suitable for defining domain specific languages (DSL) as well as analysing, refactoring or generating expression states in other (programming) languages. Well known DSLs are the DCG (Definite Clause Grammar) notation and constraint languages such as CHR. These extensions use Prolog operator declarations and the {...} notation to realise a good syntax. When external languages, such as HTML, SQL or JavaScript enter the picture, operators no longer satisfy for embedding snippets of these languages into a Prolog source file. In addition, Prolog has poor support for quoting long text fragments. Haskell introduced quasi quotationsto resolve this problem. In this paper we `ported' the Haskell mechanism for quasi quoting to Prolog. We show that this can be done cleanly and that quasi quoting can solve the above mentioned problems.Comment: Part of WLPE 2013 proceedings (arXiv:1308.2055

    Integration of operations research and artificial intelligence approaches to solve the nurse rostering problem

    Get PDF
    Please note, incorrect date on spine and title page (2016). Degree was awarded in 2019.Nurse Rostering can be defined as assigning a series of shift sequences (schedules)to several nurses over a planning horizon according to some limitations and preferences. The inherent benefits of generating higher-quality rosters are a reduction in outsourcing costs and an increase in job satisfaction of employees.This problem is often very dicult to solve in practice, particularly by applying a sole approach. This dissertation discusses two hybrid solution methods to solve the Nurse Rostering Problem which are designed based on Integer Programming,Constraint Programming, and Meta-heuristics. The current research contributes to the scientific and practical aspects of the state of the art of nurse rostering. The present dissertation tries to address two research questions. First, we study the extension of the reach of exact method through hybridisation. That said, we hybridise Integer and Constraint Programming to exploit their complementary strengths in finding optimal and feasible solutions, respectively. Second,we introduce a new solution evaluation mechanism designed based on the problem structure. That said, we hybridise Integer Programming and Variable Neighbourhood Search reinforced with the new solution evaluation method to efficiently deal with the problem. To benchmark the hybrid algorithms, three different datasets with different characteristics are used. Computational experiments illustrate the effectiveness and versatility of the proposed approaches on a large variety of benchmark instancesNurse Rostering can be defined as assigning a series of shift sequences (schedules)to several nurses over a planning horizon according to some limitations and preferences. The inherent benefits of generating higher-quality rosters are a reduction in outsourcing costs and an increase in job satisfaction of employees.This problem is often very dicult to solve in practice, particularly by applying a sole approach. This dissertation discusses two hybrid solution methods to solve the Nurse Rostering Problem which are designed based on Integer Programming,Constraint Programming, and Meta-heuristics. The current research contributes to the scientific and practical aspects of the state of the art of nurse rostering. The present dissertation tries to address two research questions. First, we study the extension of the reach of exact method through hybridisation. That said, we hybridise Integer and Constraint Programming to exploit their complementary strengths in finding optimal and feasible solutions, respectively. Second,we introduce a new solution evaluation mechanism designed based on the problem structure. That said, we hybridise Integer Programming and Variable Neighbourhood Search reinforced with the new solution evaluation method to efficiently deal with the problem. To benchmark the hybrid algorithms, three different datasets with different characteristics are used. Computational experiments illustrate the effectiveness and versatility of the proposed approaches on a large variety of benchmark instance

    The falling tide algorithm: A new multi-objective approach for complex workforce scheduling

    Get PDF
    We present a hybrid approach of goal programming and meta-heuristic search to find compromise solutions for a difficult employee scheduling problem, i.e. nurse rostering with many hard and soft constraints. By employing a goal programming model with different parameter settings in its objective function, we can easily obtain a coarse solution where only the system constraints (i.e. hard constraints) are satisfied and an ideal objective-value vector where each single goal (i.e. each soft constraint) reaches its optimal value. The coarse solution is generally unusable in practise, but it can act as an initial point for the subsequent meta-heuristic search to speed up the convergence. Also, the ideal objective-value vector is, of course, usually unachievable, but it can help a multi-criteria search method (i.e. compromise programming) to evaluate the fitness of obtained solutions more efficiently. By incorporating three distance metrics with changing weight vectors, we propose a new time-predefined meta-heuristic approach, which we call the falling tide algorithm, and apply it under a multi-objective framework to find various compromise solutions. By this approach, not only can we achieve a trade off between the computational time and the solution quality, but also we can achieve a trade off between the conflicting objectives to enable better decision-making

    Solving integrated process planning and scheduling problem with constraint programming

    Get PDF
    Session - Scheduling and Sequencing 3: paper no. T3D3The APIEMS 2012 Conference proceedings' website is located at http://apiems.net/conf2012/Process planning and scheduling are two important manufacturing functions which are usually performed sequentially. However, due to the uncertainties and disturbances frequently occurring in the manufacturing environment, the separately conducted process plan and shopfloor schedule may lose their optimality, becoming ineffective or even infeasible. Researchers have considered the potential of integrated process planning and scheduling (IPPS) to conduct the two manufacturing planning activities concurrently instead of sequentially. That is, to integrate process planning with dynamic shopfloor scheduling to cope with the realtimeshopfloor status. The IPPS problem is very complex and it has been regarded as an NP-hard problem. Many researchers have attempted to solve the IPPS problem with intelligent approaches such as meta-heuristics and agent-based negotiation. In this paper, a constraint programming-based approach is proposed and implemented in the IPPS problem domain. Constraint programming (CP) features great modeling capabilities to reflect complex constraints of a problem, and there is a great potential for CP to be used to solve IPPS problems. The approach is implemented and tested on the IBM ILOG platform, and experimental results show that the CP can handle the IPPS problem efficiently and effectively.published_or_final_versio
    • …
    corecore