neurolang.utils.testing.logic module

This module exposes utility functions for tests on logic expressions.

It should not be used for any other purpose than testing.

neurolang.utils.testing.logic.logic_exp_commutative_equal(exp1, exp2)

Compare two expressions using the commutativity property of logic operators.

The two expressions do not need to be purely equal if the order of the formulas of a commutative logic operator is not the same in the two expressions.

Apart from commutative logic operators, the comparison between the two expressions remains the same as the equality comparison.

Parameters:
exp1Expression

First expression.

exp2Expression

Second expression.