Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Explanations #307

Merged
merged 16 commits into from
Mar 31, 2021
Merged

Conversation

flyingsilverfin
Copy link
Member

@flyingsilverfin flyingsilverfin commented Mar 22, 2021

What is the goal of this PR?

Following typedb/typedb#6271 and the corresponding protocol change in typedb/typedb-protocol#131 we implement Explanations, Explainable concept maps, and the explain() query API, which allows users to stream Explanations on demand note: explain query or transaction option must be set to true

What are the changes implemented in this PR?

  • Implement Explanation objects, and extend ConceptMap to contain Explainables
  • Add the QueryManager.explain(Explainable) API to retrieve all direct explanations (1-rule layer)
  • update ClientTest to include a simple Explanation test

api/answer/ConceptMap.java Outdated Show resolved Hide resolved
api/query/QueryManager.java Outdated Show resolved Hide resolved
concept/answer/ConceptMapImpl.java Outdated Show resolved Hide resolved
logic/ExplanationImpl.java Outdated Show resolved Hide resolved
api/answer/ConceptMap.java Outdated Show resolved Hide resolved
api/logic/Explanation.java Show resolved Hide resolved
@flyingsilverfin flyingsilverfin marked this pull request as ready for review March 29, 2021 12:29
@flyingsilverfin flyingsilverfin changed the title Explanations rpc Implement Explanations Mar 29, 2021
@flyingsilverfin flyingsilverfin added this to the 2.0.0-alpha-13 milestone Mar 29, 2021
}, WRITE);

localhostGraknTx(tx -> {
GraqlInsert data = Graql.parseQuery(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unused, right?

@alexjpwalker alexjpwalker merged commit b1562c8 into typedb:master Mar 31, 2021
@alexjpwalker alexjpwalker deleted the explanations-rpc branch March 31, 2021 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants