210,018 research outputs found

    Optimal Placement of Valves in a Water Distribution Network with CLP(FD)

    Full text link
    This paper presents a new application of logic programming to a real-life problem in hydraulic engineering. The work is developed as a collaboration of computer scientists and hydraulic engineers, and applies Constraint Logic Programming to solve a hard combinatorial problem. This application deals with one aspect of the design of a water distribution network, i.e., the valve isolation system design. We take the formulation of the problem by Giustolisi and Savic (2008) and show how, thanks to constraint propagation, we can get better solutions than the best solution known in the literature for the Apulian distribution network. We believe that the area of the so-called hydroinformatics can benefit from the techniques developed in Constraint Logic Programming and possibly from other areas of logic programming, such as Answer Set Programming.Comment: Best paper award at the 27th International Conference on Logic Programming - ICLP 2011; Theory and Practice of Logic Programming, (ICLP'11) Special Issue, volume 11, issue 4-5, 201

    Combinatory logic: from philosophy and mathematics to computer science

    Get PDF
    In 1920, Moses Schönfinkel provided the first rough details of what later became known as combinatory logic. This endeavour was part of Hilbert’s program to formulate mathematics as a consistent logic system based on a finite set of axioms and inference rules. This program’s importance to the foundations and philosophical aspects of mathematics is still celebrated today. In the 1930s, Haskell Curry furthered Schönfinkel’s work on combinatory logic, attempting – and failing – to show that it can be used as a foundation for mathematics. However, in 1947, he described a high-level functional programming language based on combinatory logic. Research on functional programming languages continued, reaching a high point in the eighties. However, by this time, object-oriented programming languages began taking over and functional languages started to lose their appeal. Lately, however, a resurgence of functional languages is being noted. Indeed, many of the commonly-used programming languages nowadays incorporate functional programming elements in them, while functional languages such as Haskell, OCaml and Erlang are gaining in popularity. Thanks to this revival, it is appropriate to breathe new life into combinatory logic by presenting its main ideas and techniques in this paper.peer-reviewe

    Region-based memory management for Mercury programs

    Full text link
    Region-based memory management (RBMM) is a form of compile time memory management, well-known from the functional programming world. In this paper we describe our work on implementing RBMM for the logic programming language Mercury. One interesting point about Mercury is that it is designed with strong type, mode, and determinism systems. These systems not only provide Mercury programmers with several direct software engineering benefits, such as self-documenting code and clear program logic, but also give language implementors a large amount of information that is useful for program analyses. In this work, we make use of this information to develop program analyses that determine the distribution of data into regions and transform Mercury programs by inserting into them the necessary region operations. We prove the correctness of our program analyses and transformation. To execute the annotated programs, we have implemented runtime support that tackles the two main challenges posed by backtracking. First, backtracking can require regions removed during forward execution to be "resurrected"; and second, any memory allocated during a computation that has been backtracked over must be recovered promptly and without waiting for the regions involved to come to the end of their life. We describe in detail our solution of both these problems. We study in detail how our RBMM system performs on a selection of benchmark programs, including some well-known difficult cases for RBMM. Even with these difficult cases, our RBMM-enabled Mercury system obtains clearly faster runtimes for 15 out of 18 benchmarks compared to the base Mercury system with its Boehm runtime garbage collector, with an average runtime speedup of 24%, and an average reduction in memory requirements of 95%. In fact, our system achieves optimal memory consumption in some programs.Comment: 74 pages, 23 figures, 11 tables. A shorter version of this paper, without proofs, is to appear in the journal Theory and Practice of Logic Programming (TPLP

    The KB paradigm and its application to interactive configuration

    Full text link
    The knowledge base paradigm aims to express domain knowledge in a rich formal language, and to use this domain knowledge as a knowledge base to solve various problems and tasks that arise in the domain by applying multiple forms of inference. As such, the paradigm applies a strict separation of concerns between information and problem solving. In this paper, we analyze the principles and feasibility of the knowledge base paradigm in the context of an important class of applications: interactive configuration problems. In interactive configuration problems, a configuration of interrelated objects under constraints is searched, where the system assists the user in reaching an intended configuration. It is widely recognized in industry that good software solutions for these problems are very difficult to develop. We investigate such problems from the perspective of the KB paradigm. We show that multiple functionalities in this domain can be achieved by applying different forms of logical inferences on a formal specification of the configuration domain. We report on a proof of concept of this approach in a real-life application with a banking company. To appear in Theory and Practice of Logic Programming (TPLP).Comment: To appear in Theory and Practice of Logic Programming (TPLP

    An Implementation of Separation Logic in Coq

    Get PDF
    For certain applications, the correctness of software involved is crucial, particularly if human life is in danger. In order to achieve correctness, common practice is to gather evidence for program correctness by testing the system. Even though testing may find certain errors in the code, it cannot guarantee that the program is error-free. The program of formal verification is the act of proving or disproving the correctness of the system with respect to a formal specification. A logic for program verification is the so-called Hoare Logic. Hoare Logic can deal with programs that do not utilize pointers, i.e., it allows reasoning about programs that do not use shared mutable data structures. Separation Logic extends Hoare logic that allows pointers, including pointer arithmetic, in the programming language. It has four-pointer manipulating commands which perform the heap operations such as lookup, allocation, deallocation, and mutation. We introduce an implementation of separation logic in the interactive proof system Coq. Besides verifying that separation logic is correct, we will provide several examples of programs and their correctness proof

    Fuzzy logic controlled miniature LEGO robot for undergraduate training system

    Get PDF
    Fuzzy logic enables designers to control complex systems more effectively than traditional approaches as it provides a simple way to arrive at a definite conclusion upon ambiguous, imprecise or noisy information. In this paper, we describe the development of two miniature LEGO robots, which are the line following and the light searching mobile robots to provide a better understanding of fuzzy logic control theory and real life application for an undergraduate training system. This study is divided into two parts. In the first part, an object sorter robot is built to perform pick and place task to load different colour objects on a fuzzy logic controlled line following robot which then carries the preloaded objects to a goal by following a white line. In the second part, an intelligent fuzzy logic controlled light searching robot with the capability to navigate in a maze is developed. All of the robots are constructed by using the LEGO Mindstorms kit. Interactive C programming language is used to program fuzzy logic robots. Experimental results show that the robots has successfully track the predefined path and navigate towards light source under the influence of the fuzzy logic controller; and therefore can be used as a training system in undergraduate fuzzy logic class

    Enabling High-Level Application Development for the Internet of Things

    Get PDF
    Application development in the Internet of Things (IoT) is challenging because it involves dealing with a wide range of related issues such as lack of separation of concerns, and lack of high-level of abstractions to address both the large scale and heterogeneity. Moreover, stakeholders involved in the application development have to address issues that can be attributed to different life-cycles phases. when developing applications. First, the application logic has to be analyzed and then separated into a set of distributed tasks for an underlying network. Then, the tasks have to be implemented for the specific hardware. Apart from handling these issues, they have to deal with other aspects of life-cycle such as changes in application requirements and deployed devices. Several approaches have been proposed in the closely related fields of wireless sensor network, ubiquitous and pervasive computing, and software engineering in general to address the above challenges. However, existing approaches only cover limited subsets of the above mentioned challenges when applied to the IoT. This paper proposes an integrated approach for addressing the above mentioned challenges. The main contributions of this paper are: (1) a development methodology that separates IoT application development into different concerns and provides a conceptual framework to develop an application, (2) a development framework that implements the development methodology to support actions of stakeholders. The development framework provides a set of modeling languages to specify each development concern and abstracts the scale and heterogeneity related complexity. It integrates code generation, task-mapping, and linking techniques to provide automation. Code generation supports the application development phase by producing a programming framework that allows stakeholders to focus on the application logic, while our mapping and linking techniques together support the deployment phase by producing device-specific code to result in a distributed system collaboratively hosted by individual devices. Our evaluation based on two realistic scenarios shows that the use of our approach improves the productivity of stakeholders involved in the application development

    Global plant characterisation and distribution with evolution and climate

    Get PDF
    Since Arrhenius published seminal work in 1921, research interest in the description of plant traits and grouped characteristics of plant species has grown, underpinning diversity in trophic levels. Geographic exploration and diversity studies prior to and after 1921 culminated in biological, chemical and computer-simulated approaches describing rudiments of growth patterns within dynamic conditions of Earth. This thesis has two parts:- classical theory and multidisciplinary fusion to give mathematical strength to characterising plant species in space and time.Individual plant species occurrences are used to obtain a Species-Area Relationship. The use of both Boolean and logic-based mathematics is then integrated to describe classical methods and propose fuzzy logic control to predict species ordination. Having demonstrated a lack of significance between species and area for data modelled in this thesis a logic based approach is taken. Mamdani and T-S-K fuzzy system stability is verified by application to individual plant occurrences, validated by a multiple interfaced data portal. Quantitative mathematical models are differentiated with a genetic programming approach, enabling visualisation of multi-objective dispersal of plant strategies, plant metabolism and life-forms within the water-energy dynamic of a fixed time-scale scenario. The distributions of plant characteristics are functionally enriched through the use of Gaussian process models. A generic framework of a Geographic Information System is used to visualise distributions and it is noted that such systems can be used to assist in design and implementation of policies. The study has made use of field based data and the application of mathematic methods is shown to be appropriate and generative in the description of characteristics of plant species, with the aim of application of plant strategies, life-forms and photosynthetic types to a global framework. Novel application of fuzzy logic and related mathematic method to plant distribution and characteristics has been shown on a global scale. Quantification of the uncertainty gives novel insight through consequent trophic levels of biological systems, with great relevance to mathematic and geographic subject development. Informative value of Z matrices of plant distribution is increased substantiating sustainability and conservation policy value to ecosystems and human populations dependent upon them for their needs.Key words: sustainability, conservation policy, Boolean and logic-based, fuzzy logic, genetic programming, multi-objective dispersal, strategies, metabolism, life-forms

    Automated Translation of Safety Critical Application Software Specifications into PLC Ladder Logic

    Get PDF
    The numerous benefits of automatic application code generation are widely accepted within the software engineering community. A few of these benefits include raising the abstraction level of application programming, shorter product development time, lower maintenance costs, and increased code quality and consistency. Surprisingly, code generation concepts have not yet found wide acceptance and use in the field of programmable logic controller (PLC) software development. Software engineers at the NASA Kennedy Space Center (KSC) recognized the need for PLC code generation while developing their new ground checkout and launch processing system. They developed a process and a prototype software tool that automatically translates a high-level representation or specification of safety critical application software into ladder logic that executes on a PLC. This process and tool are expected to increase the reliability of the PLC code over that which is written manually, and may even lower life-cycle costs and shorten the development schedule of the new control system at KSC. This paper examines the problem domain and discusses the process and software tool that were prototyped by the KSC software engineers
    corecore