Пример #1
0
def test_unify_matrix_indexed_named_variable_int():
        with pytest.raises(IncompatibleTypes):
                tenv = {}
                Tmatrix().unify(Tindexed(Tnamed(tenv, "x")), tenv=tenv)
                Tindexed(Tnamed(tenv, "y")).unify(Tnamed(tenv, "x"), tenv=tenv)
                Tint().unify(Tnamed(tenv, "y"), tenv=tenv)
Пример #2
0
def test_unify_matrix_indexed_named_variable_real():
        tenv = {}
        Tmatrix().unify(Tindexed(Tnamed(tenv, "x")), tenv=tenv)
        Tindexed(Tnamed(tenv, "y")).unify(Tnamed(tenv, "x"), tenv=tenv)
        Treal().unify(Tnamed(tenv, "y"), tenv=tenv)
Пример #3
0
def test_unify_matrix_indexed_real2():
        Tmatrix().unify(Tindexed(Tindexed(Treal())))
Пример #4
0
def test_unify_matrix_indexed_real3():
        with pytest.raises(IncompatibleTypes):
                Tmatrix().unify(Tindexed(Tindexed(Tindexed(Treal()))))
Пример #5
0
def test_unify_matrix_indexed2():
        Tmatrix().unify(Tindexed(Tindexed()))