Install & Run: http://dev.grakn.ai/docs/running-grakn/install-and-run
New Features
-
Include rule in explanation.
When returning an explanation, we now return the rule from which the explanation is derived.
Requires:
vaticle/typedb-protocol#24
vaticle/typedb-driver#81 -
Add stricter rule validation for unplayable roles.
Validate rules more strictly, banning all occurences of rules that infer a role that can never be played for any possible type that the role player variable may be.
Bugs Fixed
-
Defer db completeness check in query cache when fetching.
When fetching answers from the query cache, we are currently checking for query completeness at the very beginning of the call. What is possible however is that we propagate answers from a complete parent and hence acknowledge a child complete. As a result, currently we would still resort to doing a DB lookup where all answers are actually available in the cache. Here, we correct this behaviour by deferring the completeness check to after potential answer propagation. -
Validate resolution profiler answers.
Resolve issues with incomplete/out of sync answers in the resolution profiler. -
Make resolution query profiler output directional.
We make the resolution query profile explicitly directional (edges have a strict direction). It helps removing ambiguity when reading. -
Add query profiler based on resolution tree.
To add a better way of examining query execution with reasoning by providing a way of outputting the resolution tree in a graphical-friendly form. The tree contains both answer and processing time per node information. -
Fix the equality comparison of AttributeAtoms with differing attribute variables 2.
We add a fix for the comparison of AttributeAtoms with different variables, but the same owner variable, and the same attribute type. -
Fix and Implement Direct Sub.
#5628 flags that direct sub is broken, and #4473 indicates reasoning is not able to handle direct Sub at all. This PR implements direct Sub in reasoner, and removes the reasoning code from the non-reasoning code path to fix the direct sub when reasoning is disabled. -
Do not parse patterns when converting attributes to isas.
To avoid parsing patterns when doingAttributeAtom
->IsaAtom
conversion as it is expensive. Instead, we try to use atoms at hand. -
Remove excess unification when comparing RelationAtoms.
We remove an accidentally introduced extra unification step when comparingRelationAtom
s introduced in one of the previous PRs. -
Store labels instead of ids in atoms.
To storeSchemaConcept
labels instead of their ids in atoms.
Reasons:- ids carry little information and require further manipulation (lookups) to extract their meaning
- we often want to use the label which then requires doing a lookup via
ConceptManager
.
As we trim down the number of dependencies onConceptManager
, this change also should allow to removeReasoningContext
out of atoms and instead inject it to functions that require it.
-
Also log the type of a Thing that needs a key.
We have improved the error message that is displayed when you're not inserting the key of a concept that needs it. Not knowing the type of the concept you are trying to insert as you try to fix the query is quite painful.
The error message before this PR:Thing [V4320] does not have exactly one key of type [symbol]. It either has no keys assigned to it, or it has more than one.
The error message after this PR:
Thing [V4320] of type [commit] does not have exactly one key of type [symbol]. It either has no keys assigned to it, or it has more than one.
Code Refactors
-
Abstract atom conversions.
To delegate the atom conversion task inAtom
s to a newAtomConverter
entity so that theAtom
implementations are simpler so and we can eventually make them sole data classes. -
Removed unused dependencies in Java classes.
We would like to clean-up all unused dependencies in Java class import statements, so that we can start refactoring the codebase to find package boundaries. -
Abstract type reasoning in atoms.
To delegate the type inference tasks inAtom
s to a newTypeReasoner
entity so that theAtom
implementations hold less responsibility and are less crowded - easier to maintain and understand. -
Remove operator package.
We remove the operator package from the repo as it is going to be used in multiple different projects and henceforth deserves a separate repo. -
Simplification of Grakn MapReduce Framework.
Our MapReduce framework, which previously sits in a package called//graph-hadoop
(with package address (grakn.core.graph.hadoop
), was inherited from JanusGraph and has a very complex implementation. This PR attempts to simplify the codebase by simplifying the high-level structure of the class hierarchy and dependency. The package is now called//mapreduce
. -
Extract TraversalExecutor from QueryExecutor.
RefactorQueryExecutorImpl
, which is instantiated per-query with aninfer
flag. Interally it used to perform traversals on the backend, which was completely independent of inference. This PR extractsTraversalExecutor
out ofQueryExecutor
, which has the side effect of removingExecutorFactory
from much of reasoner and only passing aTraversalExecutor
directly. This makes more sense than before, as the semantics of holding aExecutorFactory
indicates reasoner might perform read, write, or compute queries where it really only needs to perform read traversals using theTraversalFactory
. -
remove all usage and references to old benchmark.
Remove old references to old benchmarking code, including tracing and benchmark flag. -
Merge Query Execution Code Paths for Reasoning and Non-reasoning.
This PR merges the entry point for reasoning and non-reasoning queries to use the type inference code, but then diverges in theresolve()
method withinReasonerQueryImpl
. This means we push theinfer=true/false
flag further down the stack, using aResolutionIterator
to resolve with inferece versustraverse(pattern)
to just read the DB. -
Remove BasicSemanticProcessor.
Remove theBasicSemanticProcessor
so that the unification flow is clearer. -
Cleanup atomic hashing.
To simplify and clarify our atom hashing functions. -
Flatten RelationAtom.
Instead of extendingIsaAtom
, we make theRelationAtom
contain the associatedIsaAtom
. As a result the Atom hierarchy is more flat and simple and we enable further simplifications. -
Merge Binary and TypeAtom.
We mergeBinary
andTypeAtom
as the differentiation is needless and they share exactly the same children. -
Flatten AttributeAtom.
Instead of extendingBinary
, we make theAttributeAtom
contain relevantIsaAtom
s so that theAtom
hierarchy is simpler and we enable further simplifications. -
Atom cleanup.
Cleanup the code after introducing the differenttask
abstractions in previous PRs.
Other Improvements
-
Fix release validation for @graknlabs_console.
Allow us to proceed with release -
Fix the path to bash.exe in test-assembly-windows-zip.
We have fixed the path tobash.exe
to point to the correct path. -
CI fixes.
Previously, CI failed because of changes caused by Bazel upgrade. Additionally, Bazel on Windows also needs to be bumped to the latest version -
Fix excessive rebuilding.
Previously, when switching between IDE and terminal builds, build cache would be fully invalidated. due to changed $PATH which defeats the sole purpose of caching. As per suggestion in this thread, we're enabling strict environment for actions (which sets PATH alongside with other variables to minimally viable preconfigured values). -
Update GenerativeOperationalIT to use the new fuzzying operator.
To update thegraknlabs/verification
dependency to use the updated fuzzying operator. -
Add extra equivalence tests to GenerativeOperationIT.
To add more equivalence tests to our reasoner operational test suite. -
Fix nondeterministic query resolution by extending requiresReiteration.
Issue #5502 highlights a flaky test in reasoning that throws when a particular order of query resolution is picked. This is fixed by extending the reiteration criterion, which re-performs the resolution to find answers that might have been missed the first time around. -
Add grabl tracing.
To addgrabl-tracing
to grakn server. The tracing continues from ditributed trace data sent over theprotocol
's metadata. -
Checkstyle: update copyright header to 2020.
In order for build not to break after vaticle/dependencies#122, copyright headers need to be updated. -
Make generative tests exhaustive for the binary starting relation.
Increase the set of test pairs inGenerativeOperationIT
so that we can test between (child, parent) pairs across the whole generated pattern tree. -
Add basic reasoner operational test for attributes.
To use the newly definedGeneraliseAttributeOperator
to test unification facilities in the context of attribute atoms. We want to extend theGenerativeOperationalIT
to cover basic cases with attributes. -
Add alpha-equivalence generative test.
We use theVariableFuzzyingOperator
to randomise variables of patterns created forGenerativeOperationalIT
so that we can test exact unification and alpha-equivalence. -
Introduce generated reasoner operational tests.
Using our subsumptionoperator
tool, we generate large number of query pattern pairs (currently a subset of all possibilities) such that each pair is in a subsumption relationship (one pattern generifies the other). Knowing that this property holds between the pairs, we can then test our query subsumption, query unification and query equivalence algorithms as their output is known based on the subsumption relationship.