idp_server.Inferences

This module contains the logic for inferences that are specific for the Interactive Consultant.

idp_server.Inferences.split_constraints(constraints: idp_engine.utils.OrderedSet)idp_engine.utils.OrderedSet[source]

replace [.., a ∧ b, ..] by [.., a, b, ..]

This is to avoid dependencies between a and b (see issue #95).

Parameters

constraints (OrderedSet) – set of constraints that may contain conjunctions

Returns

set of constraints without top-level conjunctions

Return type

OrderedSet

idp_server.Inferences.get_relevant_questions(self: State)[source]

sets ‘relevant in self.assignments sets rank of symbols in self.relevant_symbols removes irrelevant constraints in self.constraints