Skip to content

Booster's and Kore's "implies" endpoints disagree on a pyk integration test #3857

Description

@geo2a

The HB update pr to K fails two pyk integrations tests:

FAILED src/tests/integration/kore/test_kore_client.py::TestKoreClient::test_implies_error[booster-0 -> X]
FAILED src/tests/integration/proof/test_imp.py::TestImpProof::test_implies[booster-antecedent-bottom]

In the first test, Booster returns a non-empty substitution and an empty predicate, while Kore returns an empty substitution and #Bottom as predicate, which is also the expected output.

AssertionError: assert CSubst(subst=Subst(_subst=FrozenDict({'Y': KVariable(name='X', sort=KSort(name='Int'))})), constraints=()) == CSubst(subst=Subst(_subst=FrozenDict({})), constraints=(KApply(label=KLabel(name='#Bottom', params=(KSort(name='GeneratedTopCell'),)), args=()),))

In the second test, an error response (indicated by an exception in KoreClient) is expected, but no exception is raised. I've modified test to compare the output to None in order to see the responses:

FAILED src/tests/integration/kore/test_kore_client.py::TestKoreClient::test_implies_error[legacy-0 -> X] - pyk.kore.rpc.ImplicationError: Implication check error: The RHS must not have free variables not present in the LHS: Configx Context: LHS: \dv{SortInt{}}("0") ;; RHS: Configx:SortInt{} ;; existentials: []

FAILED src/tests/integration/kore/test_kore_client.py::TestKoreClient::test_implies_error[legacy-X -> Y] - pyk.kore.rpc.ImplicationError: Implication check error: The RHS must not have free variables not present in the LHS: Configy Context: LHS: Configx:SortInt{} ;; RHS: Configy:SortInt{} ;; existentials: []

FAILED src/tests/integration/kore/test_kore_client.py::TestKoreClient::test_implies_error[booster-0 -> X] - AssertionError: assert ImpliesResult(valid=True, implication=Implies(sort=SortApp(name='SortInt', sorts=()), left=DV(sort=SortApp(name='SortInt', sorts=()), value=String(value='0')), right=EVar(name='x', sort=SortApp(name='SortInt', sorts=()))), substitution=And(sort=SortApp(name='SortInt', sorts=()), ops=(Equals(op_sort=SortApp(name='SortInt', sorts=()), sort=SortApp(name='SortInt', sorts=()), left=EVar(name='x', sort=SortApp(name='SortInt', sorts=())), right=DV(sort=SortApp(name='SortInt', sorts=()), value=String(value='0'))),)), predicate=Top(sort=SortApp(name='SortInt', sorts=())), logs=()) == None

FAILED src/tests/integration/kore/test_kore_client.py::TestKoreClient::test_implies_error[booster-X -> Y] - AssertionError: assert ImpliesResult(valid=True, implication=Implies(sort=SortApp(name='SortInt', sorts=()), left=EVar(name='x', sort=SortApp(name='SortInt', sorts=())), right=EVar(name='y', sort=SortApp(name='SortInt', sorts=()))), substitution=And(sort=SortApp(name='SortInt', sorts=()), ops=(Equals(op_sort=SortApp(name='SortInt', sorts=()), sort=SortApp(name='SortInt', sorts=()), left=EVar(name='y', sort=SortApp(name='SortInt', sorts=())), right=EVar(name='x', sort=SortApp(name='SortInt', sorts=()))),)), predicate=Top(sort=SortApp(name='SortInt', sorts=())), logs=()) == None

this reveals that Kore returns an error, while Booster does not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions