neurolang.frontend.drs.translate_to_dl module¶
- class neurolang.frontend.drs.translate_to_dl.TransformIntoConjunctionOfDatalogSentences(*args, **kwargs)¶
Bases:
DistributeImplicationsWithConjunctiveHeads,DistributeUniversalQuantifiers,CollapseConjunctions,ExpressionWalkerA datalog-sentence in this case is a logical sentence which can be interpreted as datalog. The only 2 types of sentences supported are facts and rules. This rewrite allows to use conjunctions in a more flexible way, allowing to use them between facts and in implication heads, because then they will be properly distributed.
- Attributes:
patternsProperty holding an iterator of triplets
(pattern, guard, action).
Methods
match(expression)Find the action for a given expression by going through the
patterns.pattern_match(pattern, expression)Return
Trueifpatternmatchesexpression.conjunction
distribute_implication_with_conjunctive_head
distribute_universal_quantifier
pattern_match_expression
pattern_match_expression_parameters
pattern_match_expression_tuple
pattern_match_tuple
process_expression
process_iterable_argument
walk
- type = typing.Any¶