FASILL documentation Source fasill_linearization

Linearization

This library provides predicates for linearization of FASILL programs.

A term or atom is linear if it does not contain multiple occurrences of the same variable. Any term or atom that is not linear is said to be nonlinear. Given a nonlinear atom , the linearization of is a process by which the structure is computed, where: is a linear atom built from by replacing each one of the multiple occurrences of the same variable by new fresh variables ; and is a set of proximity constrains (with ). The operator "" is asserting the similarity of two terms and . Now, let be a rule and be the linearization of , where , . For a set of rules, .

Given a FASILL program , where is a set of rules, is a similarity relation, and is a complete lattice. Let be a cut value. The set of rules which are similar to the rules in , for a level , are reflecting the meaning induced by the similarity relation into the set of rules . Note that the concept of extended program, , is a purely instrumental notion, which does not take part in the definition of the operational semantics of the language.

For more details see:

  • Julián-Iranzo, Pascual, Ginés Moreno, and Jaime Penabad. "Thresholded semantic framework for a fully integrated fuzzy logic language." Journal of logical and algebraic methods in programming 93 (2017): 42-67. https://doi.org/10.1016/j.jlamp.2017.08.002

linearize_rename/3

linearize_rename( +Expression, ?Renamed, ?Substitution )

This predicate renames the expression Expression, replacing the variables of the expression by fresh variables. Renamed is the expression Expression with fresh variables.

linearize_substitution/2

linearize_substitution( ?Substitution, ?Body )

This predicate succeeds when ?Substitution is a FASILL substitution of variables and Body is the linearized body of the substitution.

linearize_head_rule/1

linearize_head_rule( +Rule )

This predicate succeeds linearizing the FASILL rule Rule. This predicate has the side effect of retracting the rule Rule and asserting the new linearized rule.

linearize_head_rule/2

linearize_head_rule( +Rule, ?Linearized )

This predicate succeeds when Rule is a FASILL rule and Linearized is a linearized rule of Rule.

linearize_head_rule_by_id/1

linearize_head_rule_by_id( ?Id )

This predicate succeeds linearizing the FASILL rule with identifier Id. This predicate has the side effect of retracting the rule and asserting the new linearized rule.

linearize_head_rule_by_id/2

linearize_head_rule_by_id( ?Id, ?Linearized )

This predicate succeeds when Id is the identifier of a FASILL rule and Linearized is a linearized rule.

linearize_head_program/0

linearize_head_program

This predicate succeeds linearizing the FASILL rules of the current program. This predicate has the side effect of retracting the rules and asserting the new linearized rules.

extend_term/3

extend_term( +Term, -ExtendedTerm, -TD )

This predicate succeeds when ExtendedTerm is an extended term of Term with truth degree TD. It can be used to generate, by reevaluation, all possible extended terms of a given term.

extend_rule/1

extend_rule( +Rule )

This predicate succeeds extending the FASILL rule Rule. This predicate has the side effect of retracting the rule Rule and asserting the new extended rules.

extend_rule/2

extend_rule( +Rule, ?Extended )

This predicate succeeds when Rule is a FASILL rule and Extended is an extended rule of Rule.

extend_rule_by_id/1

extend_rule_by_id( ?Id )

This predicate succeeds extending the FASILL rule with identifier Id. This predicate has the side effect of retracting the rule and asserting the new extended rules.

extend_rule_by_id/2

extend_rule_by_id( ?Id, ?Extended )

This predicate succeeds when Id is the identifier of a FASILL rule and Extended is a extended rule.

extend_program/0

extend_program

This predicate succeeds extending the FASILL rules of the current program. This predicate has the side effect of retracting the rules and asserting the new extended rules.