My research experience is focused on the field of declarative programming languages, the integration of paradigms (logical programming, functional programming and fuzzy logic), as well as the field of automatic program transformation.
These are the lines in which I have worked or I am working primarily:
FUZZY LOGIC PROGRAMMING
For more than a decade I have promoted the development of the fuzzy logic programming language Bousi~Prolog, both in its design and implementation aspects, actively participating in all stages. Bousi~Prolog uses an operational semantics based on what we call “weak resolution”. Weak resolution is a procedure in which the syntactic unification mechanism of the classic SLD resolution is replaced by a weak unification algorithm. The weak unification algorithm we use is based on the use of proximity relations (fuzzy relations that satisfy the reflexive and symmetric properties, but not necessarily the transitive one) on a syntactic domain. Proximity relations allow flexible query answering and are useful for modeling many real situations.
In recent years, we have made a significant advance in the theoretical foundation of a programming framework based on proximity relations, through the proposal of a new concept of proximity between expressions (terms or atomic formulas) and the definition of a new weak unification algorithm able to deal with proximity relations in a convenient way. The most relevant formal properties fulfilled by the proposed weak unification algorithm have been demonstrated. This algorithm ends, is correct (i.e., produces a weak unifier of two expressions, if these are unifiable) and is complete (i.e., is able to compute a weaker general unifier for two unifiable expressions). The importance of these results lies in the fact that, for the first time, they bring us closer to a path that can allow us the definition of an operational mechanism based on proximity relations which is sound and complete. Recently, we have managed to implement this proximity-based unification algorithm in an efficient way, overcoming one of the biggest impediments of this proposal.
Bousi~Prolog can contribute to solve a variety of problems extracted from application areas where is essential to deal with vagueness and uncertain knowledge, as happens with (flexible) deductive databases, knowledge-based systems, fuzzy control, information retrieval or approximate reasoning. Through this language it is possible to model uncertain knowledge through proximity relations and/or fuzzy sets (another of the characteristics integrated in our language) in a clear and simple way to understand, without the heavy syntactic component of other fuzzy logic programming languages. The use of fuzzy sets leads to a more declarative modeling of vagueness, without the need to specify the weights of the entries of a proximity relation in an “ad-hoc” way.
In order to extend the range of applicability of this language we have added graded rules (i.e., rules with truth degree annotations) and direct access to WordNet (a lexical database of English). The final image that is translated is that of a language well positioned for flexible query answering, linguistic processing and capable of addressing real-life applications.
FUZZY DEDUCTIVE DATABASES
Deductive databases have grown out of the desire to combine logic programming with relational databases. A deductive database is a database system that can make deductions (i.e., conclude additional facts) based on rules and facts stored in the (deductive) database. Datalog is the language typically used to specify facts, rules and queries in deductive databases.
Recently, we have developed a proposal for a deductive database system with fuzzy Datalog as its query language. Concepts supporting the fuzzy logic programming system Bousi∼Prolog have been tailored to the needs of the Datalog Educational System (DES). The DES system is a deductive database targeted at teaching databases and their query languages that has been implemented by Fernando Sáenz-Pérez.
Weak unification and weak SLD resolution are adapted for this setting, and extended to allow rules with truth degree annotations. This way, we provide a public implementation in Prolog of a fuzzy deductive database which is open-source, multiplatform, portable, and in-memory, featuring a graphical user interface.
FUNCTIONAL LOGIC PROGRAMMING
During the early stages of my professional career my research interest was centered in the area of functional logic programming The aim of functional logic programming is to integrate the best features of both functional and logic programming. Logic programming provides the use of predicates and logical formulas. Logic programs have a great expressive power thanks to the ability of logic languages of computing using logical variables, partial data structures, and an operational mechanism that permits a non deterministic search for answers. Functional programming are based on the concept of function. In a functional program functions are defined by means of equations. The deterministic evaluation of ground expressions increases the efficiency of functional programs. The concept of evaluation strategies, that also increase the efficiency of functional computations, relies on the existence and manipulation of nested terms. The combination of these features makes functional logic languages more expressive than functional languages and more efficient than traditional logic languages.
Functional logic languages use term rewriting systems as programs and (some variant) of narrowing as operational semantics. Narrowing extends the rewriting principle replacing pattern matching by unification, these two techniques coincide when they are applied on ground terms. Narrowing computes a suitable substitution which when is applied on a term it can be reduced on a rewriting step. Narrowing provides completeness in the sense of logic programming (computation of all answers -substitutions- to a query) and also in the sense of functional programming (computation of values or normal forms). Narrowing is a non determinist procedure, since there exists two levels of freedom: the choice of a reducible subterm and the choice of a rule which is used in the reduction. By this reason it generates a large search space. Many narrowing strategies have been defined in order to control the size of the search space, by erasing some useless derivations. A strategy is a position constraint that reduces the number of positions to be exploit.
My work in this area was centered in the formalization of a demand-driven narrowing strategy and the study of the formal relation between needed narrowing and this (not so lazy) demand-driven narrowing strategy which is the basis for popular implementations of non-strict functional logic languages. Also, I was interested on implementation aspects of narrowing strategies and on extensions of narrowing (e.g. to non deterministic computations).
PROGRAM TRANSFORMATION AND PARTIAL EVALUATION
The aim of program transformation is to derive a program semantically equivalent to the original program, but with a better behavior w.r.t. some determined properties (usually, we want that the transformed program may be executed more efficiently than the initial one). More accurately, given an initial program, P, we want to obtain a new program,P’, which computes the same results and answers as P for any input term. From a theoretical point of view, the most important property of a transformation is its correctness. We say that a transformation is strongly sound when, given a term, the results and answers computed by P’ are exactly the same as the ones computed by the original program P for that term. On the other hand we say that a transformation is weakly sound when for each result and answer computed by P’ there exists the same result but a more general computed answer in P.The definitions of (strong/weak) completeness are the reverse of the last concepts.
Partial evaluation is a program transformation technique, also known as program specialization, that aims to derive a specialized instance of a program w.r.t. a restricted set of inputs. Partial evaluation have been applied to all kind of programming languages, including imperative languages (see here for a standard reference).
Partial evaluation of functional logic languages was first formalized by Maria Alpuente and her fellows of the ELP group, I co-authored some of these papers. Indeed, my doctoral thesis was about a lazy extension of the method of Narrowing driven Partial Evaluation (NPE) of functional logic programs introduced by María Alpuente et al. This work consisted in giving a formal definition of the lazy narrowing strategy used as the operational mechanism of the lazy instance of the partial evaluator and in proving the formal correctness of the obtained lazy partial evaluator.
Later, I have investigated a program transformation technique to improve non deterministic computations.
Also, I was interested in the application of program transformation techniques in the context of narrowing implementations. The idea was to introduce transformation techniques inside the compilation process in order to improve the quality of the generated compiled code.
More recently, I have participated in the adaptation of program transformation techniques to the field of fuzzy logic programming. Mainly, we have formalized the unfolding transformation for the framework of multi-adjoint logic programming (MALP), a fuzzy logical programming language – developed by Medina et. alt. (2004) -. It is important to mention that these results are pioneers in the field of fuzzy logic programming and constitute a basis for the development of sophisticated tools for the optimization of multi-adjoint programs, such as folding/unfolding transformation systems or partial evaluators .
Also, I have applied partial evaluation techniques to improve the operational mechanism of the MALP language and unfolding techniques to analyze the semantic equivalence of fuzzy logic programs.