This paper focuses on the integration of the (also integrated) declarative paradigms of functional-logic and fuzzy-logic programming, in order to obtain a richer and much more expressive programming scheme where mathematical functions cohabit with fuzzy-logic features. Our final goal is to achieve a fully integrated language amalgamating powerful programming resources from both worlds, including an efficient (lazy) evaluation mechanism, non-determinism, similarity relations, and so on. Starting with two representative languages from both settings, namely Curry and Likelog, we propose a hybrid dialect where a set of rewriting rules associated to the functional-logic dimension of the language, are accompanied with a set of similarity equations between symbols of the same nature and arity, which represents the fuzzy counterpart of the novel framework. Then, we directly act inside the kernel of the operational mechanism of the language, thus obtaining a fuzzy variant of needed narrowing which safely deals with similarity relations. A key point in the design of this last operational method is that, in contrast with the crisp case, the fuzzified version of the function which determines the set of tuples that enable new narrowing steps for a given goal, say λ fuzzy , must explicitly take care of binding variables belonging to both goals and program rules. This action is crucial to model the notion of needed narrowing with similarity relations step by means of a transition system whose final states are triples of the form 〈 value , substitution , similarity _ degree 〉 which collect the three relevant components of the new notion of fuzzy computed answer. Finally, we prove that the resulting strategy verifies that, apart from computing at least the same elements of the crisp case ( crispness), all similar terms of a given goal are completely treated too by fully exploiting the similarities collected in a given program ( fuzziness) while avoiding the risk of infinite loops associated to the intrinsic (reflexive, symmetric and transitive) properties of similarity relations ( termination).
Read full abstract