FASILL documentation Source fasill_inference

Inference

This library provides predicates for inference.

The procedural semantics of FASILL is defined in a stepwise manner. First, an operational stage is introduced which proceeds similarly to SLD resolution in pure logic programming, returning an expression still containing values and connectives. Then, an interpretive stage evaluates these connectives and produces a final answer.

is_fuzzy_computed_answer/1

is_fuzzy_computed_answer( +Expression )

This predicate succeeds when Expression is a (symbolic) fuzzy computed answer.

select_atom/4

select_atom( +Expression, ?ExprVar, ?Var, ?Atom )

This predicate selects an atom Atom from the expression Expression, where ExprVar is the expression Expression with the variable Var instead of the atom Atom.

select_expression/4

select_expression( +Expression, ?ExprVar, ?Var, ?Atom )

This predicate selects an interpretable expression Atom from the expression Expression, where ExprVar is the expression Expression with the variable Var instead of the atom Atom.

select_simplifiable/4

select_simplifiable( +Expression, ?ExprVar, ?Var, ?Atom )

This predicate selects a simplifiable expression Atom from the expression Expression, where ExprVar is the expression Expression with the variable Var instead of the atom Atom.

interpretable/1

interpretable( +Expression )

This predicate succeeds when the expression Expression can be interpreted (i.e., there is no atoms in the expression).

query/2

query( +Goal, ?Answer )

This predicate succeeds when Answer is a fuzzy computed answer (fca) for the goal Goal. A fca is a term of the form state(TD, Substitution), where TD is the truth degree.

derivation/4

derivation( +From, +State1, ?State2, ?Info )

This predicate performs a complete derivation from an initial state State1 to the final state State2. Info is a list containing the information of each step.

derivation/7

derivation( +DepthLimit, +From, +State1, ?State2, +CurrentDepth, ?ResultDepth, ?Info )

This predicate performs a complete derivation from an initial state State1 to the final state State2. Info is a list containing the information of each step.

inference/4

inference( +From, +State1, ?State2, ?Info )

This predicate performs an inference step from the initial state State1 to the final step State2. Info is an atom containg information about the rule used in the derivation.

operational_step/4

operational_step( +From, +State1, ?State2, ?Info )

This predicate performs an admissible step from the state State1 to the state State2. Info is an atom containg information about the rule used in the derivation.

simplification_step/4

simplification_step( +From, +State1, ?State2, ?Info )

This predicate performs a successful admissible step from the state State1 to the state State2. Info is an atom containg information about the rule used in the derivation.

success_step/4

success_step( +From, +State1, ?State2, ?Info )

This predicate performs a successful admissible step from the state State1 to the state State2. Info is an atom containg information about the rule used in the derivation.

failure_step/3

failure_step( +State1, ?State2, ?Info )

This predicate performs an unsuccessful admissible step from the state State1 to the state State2. Info is an atom containg information about the failure.

short_interpretive_step/4

short_interpretive_step( +From, +State1, ?State2, ?Info )

This predicate performs a short interpretive step from the state State1 to the state State2. Info is an atom containg information about the derivation. This steps only can be performed when there is no atoms to perform admissible steps.

long_interpretive_step/4

long_interpretive_step( +From, +State1, ?State2, ?Info )

This predicate performs a long interpretive step from the state State1 to the state State2. Info is an atom containg information about the derivation. This steps only can be performed when there is no atoms to perform admissible steps.

interpretive_step/4

interpretive_step( +From, +State1, ?State2, ?Info )

This predicate performs an interpretive step from the state State1 to the state State2. Info is an atom containg information about the derivation. This steps only can be performed when there is no atoms to perform admissible steps.

interpret/2

interpret( +Expression, ?Result )

This predicate interprets the expression Expression in the expression. Result is the resulting expression.

deep_interpret/2

deep_interpret( +Expression, ?Result )

This predicate fully interprets the expression Expression in the expression. Result is the resulting expression.

deep_simplify/4

deep_simplify( +Bot, +Top, +Expression, ?Result )

This predicate fully simplifies the expression Expression in the expression. Result is the simplified expression.

up_body/2

up_body( +Expression, ?ExpressionUp )

ExpressionUp is the result of interpreting the expression with no atoms, obtained from the body Expression by replacing each ocurrence of an atom by the top of the current lattice.

rename/2

rename( +Expression, ?Renamed )

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

rename/3

rename( +Variables, +Expression, ?Renamed )

This predicate renames the expression Expression, replacing the variables in Variables by fresh variables. Renamed is the expression +Expression with fresh variables.

is_rename/2

is_rename( +Term1, +Term2 )

This predicate succeeds when Term2 is a renamed version of Term1.

fasill_print_fca/1

fasill_print_fca( +State )

This predicate writes the FASILL fuzzy computed answer State for the standard output.

fasill_print_trace/1

fasill_print_trace( +Trace )

This predicate writes a FASILL trace Trace for the standard output.