In this paper, we present our proposal to Constraint functional logic programming over Finite Domains (CFLP(FD)) with a lazy functional logic programming language which seamlessly embodies finite domain (FD) constrain...
详细信息
In this paper, we present our proposal to Constraint functional logic programming over Finite Domains (CFLP(FD)) with a lazy functional logic programming language which seamlessly embodies finite domain (FD) constraints. This proposal increases the expressiveness and power of constraint logicprogramming over finite domains (CLP(FD)) by combining functional and relational notation, curried expressions, higher-order functions, patterns, partial applications, non-determinism, lazy evaluation, logical variables, types, domain variables, constraint composition, and finite domain constraints. We describe the syntax of the language, its type discipline, and its declarative and operational semantics. We also describe TOY(FD), an implementation for CFLP(FD), and a comparison of our approach with respect to CLP(FD) from a programming point of view, showing the new features we introduce. And, finally, we show a performance analysis which demonstrates that our implementation is competitive with respect to existing CLP(FD) systems and that clearly outperforms the closer approach to CFLP(FD).
This paper presents a proposal for the cooperation of solvers in constraint functional logic programming, a quite expressive programming paradigm which combines functional, logic and constraint programming using const...
详细信息
This paper presents a proposal for the cooperation of solvers in constraint functional logic programming, a quite expressive programming paradigm which combines functional, logic and constraint programming using constraint lazy narrowing as goal solving mechanism. Cooperation of solvers for different constraint domains can improve the efficiency of implementations since solvers can take advantage of other solvers' deductions. We restrict our attention to the cooperation of three solvers, dealing with syntactic equality and disequality constraints, real arithmetic constraints, and finite domain (FD) constraints, respectively. As cooperation mechanism, we consider to propagate to the real solver the constraints which have been submitted to the FD solver (and viceversa), imposing special communication constraints to ensure that both solvers will allow the same integer values for all the variables involved in the cooperation.
Pull-tabbing is an evaluation approach for functionallogic computations, based on a graph transformation recently proposed, which avoids making irrevocable nondeterministic choices that would jeopardize the completen...
详细信息
Pull-tabbing is an evaluation approach for functionallogic computations, based on a graph transformation recently proposed, which avoids making irrevocable nondeterministic choices that would jeopardize the completeness of computations. In contrast to other approaches with this property, it does not require an upfront cloning of a possibly large portion of the choice's context. We formally define the pull-tab transformation, characterize the class of programs for which the transformation is intended, extend the computations in these programs to include the transformation, and prove the correctness of the extended computations.
In this paper we propose an extension of Answer Set programming (ASP) to deal with (possibly partial) evaluable functions. To this aim, we start from the most general logical counterpart of ASP, Quantified Equilibrium...
详细信息
In this paper we propose an extension of Answer Set programming (ASP) to deal with (possibly partial) evaluable functions. To this aim, we start from the most general logical counterpart of ASP, Quantified Equilibrium logic (QEL), and propose a variant QEL(F)(=) where the set of functions is partitioned into Herbrand functions (or constructors) and evaluable functions (or operations). We show how this extension has a direct connection to Scott's logic of Existence, and introduce several useful derived operators, some of them directly borrowed from Scott's formalisation. Using this general framework for arbitrary theories, we proceed to focus on a syntactic subclass that corresponds to normal logic programs with evaluable functions and equality. We provide a translation of this class into function-free normal programs and consider a safety condition so that the resulting program is also safe, under the usual meaning in ASP. Finally, we also establish a formal comparison to Lin and Wang's approach (FASP) dealing with evaluable total functions.
In this paper we propose an extension of Answer Set programming (ASP) to deal with (possibly partial) evaluable functions. To this aim, we start from the most general logical counterpart of ASP, Quantified Equilibrium...
详细信息
In this paper we propose an extension of Answer Set programming (ASP) to deal with (possibly partial) evaluable functions. To this aim, we start from the most general logical counterpart of ASP, Quantified Equilibrium logic (QEL), and propose a variant QEL(F)(=) where the set of functions is partitioned into Herbrand functions (or constructors) and evaluable functions (or operations). We show how this extension has a direct connection to Scott's logic of Existence, and introduce several useful derived operators, some of them directly borrowed from Scott's formalisation. Using this general framework for arbitrary theories, we proceed to focus on a syntactic subclass that corresponds to normal logic programs with evaluable functions and equality. We provide a translation of this class into function-free normal programs and consider a safety condition so that the resulting program is also safe, under the usual meaning in ASP. Finally, we also establish a formal comparison to Lin and Wang's approach (FASP) dealing with evaluable total functions.
Recycling has been gaining ground, thanks to the recent progress made in the related technology. However, a limiting factor to its wide adoption, is the lack of modern tools for managing the collection of recyclable r...
详细信息
ISBN:
(数字)9783642239601
ISBN:
(纸本)9783642239601;9783642239595
Recycling has been gaining ground, thanks to the recent progress made in the related technology. However, a limiting factor to its wide adoption, is the lack of modern tools for managing the collection of recyclable resources. In this paper, we present EcoTruck, a management system for the collection of recyclable paper products. EcoTruck is modelled as a multi-agent system and its implementation employs Erlang, a distribution-oriented declarative language. The system aims to automate communication and cooperation of parties involved in the collection process, as well as optimise vehicle routing. The latter have the effect of minimising vehicle travel distances and subsequently lowering transportation costs. By speeding up the overall recycling process, the system could increase the service throughput, eventually introducing recycling methods to a larger audience.
We present a generic scheme for the declarative debugging of programs that are written in rewriting-based languages that are equipped with narrowing. Our aim is to provide an integrated development environment in whic...
详细信息
We present a generic scheme for the declarative debugging of programs that are written in rewriting-based languages that are equipped with narrowing. Our aim is to provide an integrated development environment in which it is possible to debug a program and then correct it automatically. Our methodology is based on the combination (in a single framework) of a semantics-based diagnoser that identifies those parts of the code that contain errors and an inductive learner that tries to repair them, once the bugs have been located in the program. We develop our methodology in several steps. First, we associate with our programs a semantics that is based on a (continuous) immediate consequence operator, T-R, which models the answers computed by narrowing and is parametric w.r.t. the evaluation strategy, which can be eager or lazy. Then, we show that, given the intended specification of a program R, it is possible to check the correctness of R by a single step of T-R. In order to develop an effective debugging method, we approximate the computed answers semantics of R and derive a finitely terminating bottom-up abstract diagnosis method, which can be used statically. Finally, a bug-correction program synthesis methodology attempts to correct the erroneous components of the wrong code. We propose a hybrid, top-down (unfolding-based) as well as bottom-up (induction-based), correction approach that is driven by a set of evidence examples which are automatically produced as an outcome by the diagnoser. The resulting program is proven to be correct and complete w.r.t. the considered example sets. Our debugging framework does not require the user to provide error symptoms in advance or to answer difficult questions concerning program correctness. An implementation of our debugging system has been undertaken which demonstrates the workability of our approach. (C) 2010 Elsevier B.V. All rights reserved.
Narrowing is a computation implemented by some declarative programming languages. Research in the last decade has produced significant results on the theory and foundation of narrowing, but little has been published o...
详细信息
Narrowing is a computation implemented by some declarative programming languages. Research in the last decade has produced significant results on the theory and foundation of narrowing, but little has been published on the use of narrowing in programming. This paper introduces narrowing from a programmer's viewpoint;shows, by means of examples, when, why and how to use narrowing in a program;and discusses the impact of narrowing on software development activities such as design and maintenance. The examples are coded in the programming language Curry, which provides narrowing as a first class feature. (C) 2010 Elsevier Ltd. All rights reserved.
We propose a new type system for functional logic programming which is more liberal than the classical Damas-Milner usually adopted, but it is also restrictive enough to ensure type soundness. Starting from Damas-Miln...
详细信息
ISBN:
(纸本)9783642171635
We propose a new type system for functional logic programming which is more liberal than the classical Damas-Milner usually adopted, but it is also restrictive enough to ensure type soundness. Starting from Damas-Milner typing of expressions we propose a new notion of well-typed program that adds support for type-indexed functions, existential types, opaque higher-order patterns and generic functions-as shown by an extensive collection of examples that illustrate the possibilities of our proposal. In the negative side, the types of functions must be declared, and therefore types are checked but not inferred. Another consequence is that parametricity is lost, although the impact of this flaw is limited as "free theorems" were already compromised in functional logic programming because of non-determinism.
Recent advances in the foundations and the implementations of functional logic programming languages originate from far-reaching results on narrowing evaluation strategies. Narrowing is a computation similar to rewrit...
详细信息
Recent advances in the foundations and the implementations of functional logic programming languages originate from far-reaching results on narrowing evaluation strategies. Narrowing is a computation similar to rewriting which yields substitutions in addition to normal forms. In functional logic programming, the classes of rewrite systems to which narrowing is applied are, for the most part, subclasses of the constructor-based, possibly conditional, rewrite systems. Many interesting narrowing strategies, particularly for the smallest subclasses of the constructor-based rewrite systems, are generalizations of well-known rewrite strategies. However, some strategies for larger non-confluent subclasses have been developed just for functionallogic computations. This paper discusses the elements that play a relevant role in evaluation strategies for functionallogic computations, describes some important classes of rewrite systems that model functionallogic programs, shows examples of the differences in expressiveness provided by these classes, and reviews the characteristics of narrowing strategies proposed for each class of rewrite systems. (c) 2005 Elsevier Ltd. All rights reserved.
暂无评论