Network


Latest external collaboration on country level. Dive into details by clicking on the dots.

Hotspot


Dive into the research topics where Juan Rodríguez-Hortalá is active.

Publication


Featured researches published by Juan Rodríguez-Hortalá.


principles and practice of declarative programming | 2007

A simple rewrite notion for call-time choice semantics

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.


workshop on functional and constraint logic programming | 2009

New results on type systems for functional logic programming

Francisco Javier López-Fraguas; Enrique Martin-Martin; Juan Rodríguez-Hortalá

Type systems are widely used in programming languages as a powerful tool providing safety to programs, and forcing the programmers to write code in a clearer way. Functional logic languages have inherited Damas & Milner type system from their functional part due to its simplicity and popularity. In this paper we address a couple of aspects that can be subject of improvement. One is related to a problematic feature of functional logic languages not taken under consideration by standard systems: it is known that the use of opaque HO patterns in left-hand sides of program rules may produce undesirable effects from the point of view of types. We re-examine the problem, and propose a Damas & Milner-like type system where certain uses of HO patterns (even opaque) are permitted while preserving type safety, as proved by a subject reduction result that uses HO-let-rewriting, a recently proposed reduction mechanism for HO functional logic programs. The other aspect is the different ways in which polymorphism of local definitions can be handled. At the same time that we formalize the type system, we have made the effort of technically clarifying the overall process of type inference in a whole program.


partial evaluation and semantic-based program manipulation | 2009

A flexible framework for programming with non-deterministicfunctions

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.


foundations of software technology and theoretical computer science | 2008

A Hierarchy of Semantics for Non-deterministic Term Rewriting Systems.

Juan Rodríguez-Hortalá

Formalisms involving some degree of nondeterminism are frequent in computer science. In particular, various programming or specification languages are based on term rewriting systems where confluence is not required. In this paper we examine three concrete possible semantics for non-determinism that can be assigned to those programs. Two of them --call-time choice and run-time choice-- are quite well-known, while the third one --plural semantics-- is investigated for the first time in the context of term rewriting based programming languages. We investigate some basic intrinsic properties of the semantics and establish some relationships between them: we show that the three semantics form a hierarchy in the sense of set inclusion, and we prove that call-time choice and plural semantics enjoy a remarkable compositionality property that fails for run-time choice; finally, we show how to express plural semantics within run-time choice by means of a program transformation, for which we prove its adequacy.


partial evaluation and semantic-based program manipulation | 2010

Programming with singular and plural non-deterministic functions

Adrián Riesco; Juan Rodríguez-Hortalá

Non-strict non-deterministic functions are one of the most distinctive features of functional-logic languages. Traditionally, two semantic alternatives have been considered for this kind of functions: call-time choice and run-time choice. While the former is the standard choice of modern implementations of FLP, the latter lacks some basic properties--mainly compositionality--that have prevented its use in practical FLP implementations. Recently, a new compositional plural semantics for FLP has been proposed. Although this semantics allows an elegant encoding of some problems--in particular those with an implicit manipulation of sets of values--, call-time choice still remains the best option for many common programming patterns. In this paper we explore the expressive possibilities of the combination of singular and plural non-determinism. After formalizing the intended semantics by means of a logic calculus, several significant examples exploiting the capabilities of the semantics are presented. These examples have been tested and developed in a Maude-based prototype whose implementation is outlined.


Electronic Notes in Theoretical Computer Science | 2010

A Natural Implementation of Plural Semantics in Maude

Adrián Riesco; Juan Rodríguez-Hortalá

Recently, a new semantics for non-deterministic lazy functional(-logic) programming has been presented, in which the treatment of parameter passing was different to previous proposals like call-time choice (CRWL) and run-time choice (term rewriting). There, the semantics was formalized through the @pCRWL calculus, and a program transformation to simulate @pCRWL with term rewriting was proposed. In the present work we use the Maude system to implement that transformation and to get an interpreter for @pCRWL, thus providing a first implementation of this new semantics. Besides, in order to improve the performance of the prototype, an implementation of the natural rewriting on-demand strategy has been developed, therefore taking the first steps towards obtaining a framework for on-demand evaluation of Maude system modules.


rewriting techniques and applications | 2009

A Fully Abstract Semantics for Constructor Systems

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.


Theory and Practice of Logic Programming | 2014

Rewriting and narrowing for constructor systems with call-time choice semantics

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).


partial evaluation and semantic-based program manipulation | 2012

Well-typed narrowing with extra variables in functional-logic programming

Francisco Javier López-Fraguas; Enrique Martin-Martin; Juan Rodríguez-Hortalá

Narrowing is the usual computation mechanism in functional-logic programming (FLP), where bindings for free variables are found at the same time that expressions are reduced. These free variables may be already present in the goal expression, but they can also be introduced during computations by the use of program rules with extra variables. However, it is known that narrowing in FLP generates problems from the point of view of types, problems that can only be avoided using type information at run-time. Nevertheless, most FLP systems use static typing based on Damas-Milner type system and they do not carry any type information in execution, thus ill-typed reductions may be performed in these systems. In this paper we prove, using the let-narrowing relation as the operational mechanism, that types are preserved in narrowing reductions provided the substitutions used preserve types. Based on this result, we prove that types are also preserved in narrowing reductions without type checks at run-time when higher order (HO) variable bindings are not performed and most general unifiers are used in unifications, for programs with transparent patterns. Then we characterize a restricted class of programs for which no binding of HO variables happens in reductions, identifying some problems encountered in the definition of this class. To conclude, we use the previous results to show that a simulation of needed narrowing via program transformation also preserves types.


Applications of Declarative Programming and Knowledge Management | 2009

Narrowing for First Order Functional Logic Programs with Call-Time Choice Semantics

Francisco Javier López-Fraguas; Juan Rodríguez-Hortalá; Jaime Sánchez-Hernández

In a recent work we have proposed let -rewriting, a simple one-step relation close to ordinary term rewriting but able, via local bindings, to express sharing of computed values. In this way, let -rewriting reflects the call-time choice semantics for non-determinism adopted by modern functional logic languages, where programs are rewrite systems possibly non-confluent and non-terminating. In this paper we extend that work providing 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. Completeness is based on a lifting lemma for let -rewriting similar to Hullots lifting lemma for ordinary rewriting and narrowing. Our work copes with first order, left linear, constructor-based rewrite systems with no other restrictions about confluence, termination or presence of extra variables in right-hand sides of rules.

Collaboration


Dive into the Juan Rodríguez-Hortalá's collaboration.

Top Co-Authors

Avatar
Top Co-Authors

Avatar

Jaime Sánchez-Hernández

Complutense University of Madrid

View shared research outputs
Top Co-Authors

Avatar

Enrique Martin-Martin

Complutense University of Madrid

View shared research outputs
Top Co-Authors

Avatar

Adrián Riesco

Complutense University of Madrid

View shared research outputs
Top Co-Authors

Avatar

Manuel Montenegro

Complutense University of Madrid

View shared research outputs
Top Co-Authors

Avatar

Stephan Merz

Complutense University of Madrid

View shared research outputs
Researchain Logo
Decentralizing Knowledge