Jaime Sánchez-Hernández
Complutense University of Madrid
Network
Latest external collaboration on country level. Dive into details by clicking on the dots.
Publication
Featured researches published by Jaime Sánchez-Hernández.
principles and practice of declarative programming | 2007
Francisco Javier López-Fraguas; Juan Rodríguez-Hortalá; Jaime Sánchez-Hernández
Non-confluent and non-terminating rewrite systems are interesting from the point of view of programming. In particular, existing functional logic languages use such kind of rewrite systems to define possibly non-strict non-deterministic functions. The semantics adopted for non-determinism is call-time choice, whose combination with non-strictness is not a trivial issue that has been addressed from a semantic point of view in the Constructor-based Rewriting Logic (CRWL) framework. We investigate here how to express call-time choice and non-strict semantics from a point of view closer to classical rewriting. The proposed notion of rewriting uses an explicit representation for sharing with let-constructions and is proved to be equivalent to the CRWL approach. Moreover, we relate this let-rewriting relation (and hence CRWL) with ordinary rewriting, providing in particular soundness and completeness of let-rewriting with respect to rewriting for a class of programs which are confluent in a certain semantic sense.
Theory and Practice of Logic Programming | 2004
Francisco Javier López-Fraguas; Jaime Sánchez-Hernández
How to extract negative information from programs is an important issue in logic programming. Here we address the problem for functional logic programs, from a proof-theoretic perspective. The starting point of our work is CRWL (Constructor based ReWriting Logic), a well established theoretical framework for functional logic programming, whose fundamental notion is that of non-strict non-deterministic function. We present a proof calculus, CRWLF, which is able to deduce negative information from CRWL-programs. In particular, CRWLF is able to prove ‘finite’ failure of reduction within CRWL.
international conference on logic programming | 2001
Francisco Javier López-Fraguas; Jaime Sánchez-Hernández
Finite failure of computations plays an important role as programming construct in the logic programming paradigm, and it has been shown that this also extends to the case of the functional logic programming paradigm. In particular we have considered CRWLF, a previous proof-theoretic semantic framework able to deduce negative (failure) information from functional logic programs. The non-deterministic nature of functions considered in CRWLF leads naturally to set-valued semantic description of expressions. Here we reformulate the framework to stress that set flavour, both at syntactic and semantic levels. The given approach, for which we obtain equivalence results with respect to the previous one, increases the expressiveness for writing programs and (hopefully) clarifies the understanding of the semantics given to nondeterministic functions, since classical mathematical notions like union of sets or families of sets are used. An important step in the reformulation is a useful program transformation which is proved to be correct within the framework.
partial evaluation and semantic-based program manipulation | 2009
Francisco Javier López-Fraguas; Juan Rodríguez-Hortalá; Jaime Sánchez-Hernández
The possibility of non-deterministic reductions is a distinctive feature of some declarative languages. Two semantics commonly adopted for non-determinism are call-time choice-- a notion that at the operational level is related to the sharing mechanism of lazy evaluation in functional languages-- and run-time choice, which corresponds closely to ordinary term rewriting. But there are practical situations where neither semantics is appropriate, if used in isolation. In this paper we propose to annotate functions in a program with the semantics most adequate to its intended use. Annotated programs are then mapped into a unified core language (but still high level), designed to achieve a careful but neat combination of ordinary rewriting --to cope with run-time choice-- with local bindings via a let-construct devised to express call-time choice. The result is a flexible framework into which existing languages using pure run-time or call-time choice can be embedded, either directly --in the case of run-time choice-- or by means of a simple program transformation introducing lets in function definitions --for the case of call-time choice--. We prove the adequacy of the embedding, as well as other relevant properties of the framework.
international symposium on functional and logic programming | 2008
Susana Nieva; Jaime Sánchez-Hernández; Fernando Sáenz-Pérez
In this paper, we present an extension of the scheme HH(C) (Hereditary Harrop formulas with Constraints) with a suitable formulation of negation in order to obtain a constraint deductive database query language. In addition to constraints, our proposal includes logical connectives (implication and quantifiers) for defining databases and queries, which altogether are unavailable in current database query languages. We define a proof theoretic semantic framework based on a sequent calculus, that allows to represent the meaning of a database query by means of a derived constraint answer in the sense of CLP. We also introduce an appropriate notion of stratification, which provides a starting point for suitable operational semantics dealing with recursion and negation. We formalize a fixed point semantics for stratifiable databases, whose fixpoint operator is applied stratum by stratum. This semantics is proved to be sound and complete with respect to derivability in the sequent calculus, and it provides the required support for actual implementations, as the prototype we have developed already and introduce in this paper.
Electronic Notes in Theoretical Computer Science | 2003
Francisco Javier López-Fraguas; Jaime Sánchez-Hernández
Constructive failure has been proposed recently as a programming construct useful for functional logic programming, playing a role similar to that of constructive negation in logic programming. On the other hand, almost any functional logic program requires the use of some kind of equality test between expressions. We face in this work in a rigorous way the interaction of failure and equality (even for non-ground expressions), which is a non trivial issue, requiring in particular the use of disequality conditions at the level of the operational mechanism of constructive failure. As an interesting side product, we develop a novel treatment of equality and disequality in functional logic programming, by giving them a functional status, which is better suited for practice than previous proposals.
rewriting techniques and applications | 2009
Francisco Javier López-Fraguas; Juan Rodríguez-Hortalá; Jaime Sánchez-Hernández
Constructor-based term rewriting systems are a useful subclass of TRS, in particular for programming purposes. In this kind of systems constructors determine a universe of values, which are the expected output of the computations. Then it would be natural to think of a semantics associating each expression to the set of its reachable values. Somehow surprisingly, the resulting semantics has poor properties, for it is not compositional nor fully abstract when non-confluent systems are considered. In this paper we propose a novel semantics for expressions in constructor systems, which is compositional and fully abstract (with respect to sensible observation functions, in particular the set of reachable values for an expression), and therefore can serve as appropriate basis for semantic based analysis or manipulation of such kind of rewrite systems.
international symposium on functional and logic programming | 2002
Francisco Javier López-Fraguas; Jaime Sánchez-Hernández
Negation as failure is an important language feature within the logic programming paradigm. The natural notion generalizing negation as failure in a functional logic setting is that of finite failure of reduction. In previous works we have shown the interest of using such programming construct when writing functional logic programs, and we have given a logical status to failure by means of proof calculi designed to deduce failures from programs. In this paper we address the problem of the operational mechanism for the execution of functional logic programs using failure. Our main contribution is the proposal of a narrowing relation able to deal with failures, which is constructive in the usual sense of the term in the context of negation, that is, narrowing is able to find substitutions for variables even in presence of failures. As main technical results, we prove correctness and completeness of the narrowing relation with respect to the proof-theoretic semantics.
Theory and Practice of Logic Programming | 2014
Francisco Javier López-Fraguas; Enrique Martin-Martin; Juan Rodríguez-Hortalá; Jaime Sánchez-Hernández
Non-confluent and non-terminating constructor-based term rewrite systems are useful for the purpose of specification and programming. In particular, existing functional logic languages use such kind of rewrite systems to define possibly non-strict non-deterministic functions. The semantics adopted for non-determinism is call-time choice, whose combination with non-strictness is a non trivial issue, addressed years ago from a semantic point of view with the Constructor-based Rewriting Logic (CRWL), a well-known semantic framework commonly accepted as suitable semantic basis of modern functional logic languages. A drawback of CRWL is that it does not come with a proper notion of one-step reduction, which would be very useful to understand and reason about how computations proceed. In this paper we develop thoroughly the theory for the first order version of let-rewriting, a simple reduction notion close to that of classical term rewriting, but extended with a let-binding construction to adequately express the combination of call-time choice with non-strict semantics. Let-rewriting can be seen as a particular textual presentation of term graph rewriting. We investigate the properties of let-rewriting, most remarkably their equivalence with respect to a conservative extension of the CRWL-semantics coping with let-bindings, and we show by some case studies that having two interchangeable formal views (reduction/semantics) of the same language is a powerful reasoning tool. After that, we provide a notion of let-narrowing which is adequate for call-time choice as proved by soundness and completeness results of let-narrowing with respect to let-rewriting. Moreover, we relate those let-rewriting and let-narrowing relations (and hence CRWL) with ordinary term rewriting and narrowing (..) To appear in Theory and Practice of Logic Programming (TPLP).
practical aspects of declarative languages | 2013
Gabriel Aranda; Susana Nieva; Fernando Sáenz-Pérez; Jaime Sánchez-Hernández
SQL is the de facto standard language for relational databases and has evolved by introducing new resources and expressive capabilities, such as recursive definitions in queries and views. Recursion was included in the SQL-99 standard, but this approach is limited as only linear recursion is allowed, mutual recursion is not supported, and negation cannot be combined with recursion. In this work, we propose a new approach, called R-SQL, aimed to overcome these limitations and others, allowing in particular cycles in recursive definitions of graphs and mutually recursive relation definitions. In order to combine recursion and negation, we import ideas from the deductive database field, such as stratified negation, based on the definition of a dependency graph between relations involved in the database. We develop a formal framework using a stratified fixpoint semantics and introduce a proof-of-concept implementation.