Discussion Forum

Is grakn data model suitable for source code analysis?

looking on Grakn Knowledge Model in manual, I don’t see any elements suitable for modeling Conteiner data element in general (for example, ordered/unordered contailners like arrays and lists).

Is grakn data model suitable for source code analysis in total ?

What graph-based engine should I move to ?

In Grakn, these kinds of structures are modelled using relationships. For example, an unordered container could be represented as a relationship of multiple role-players:

container sub relationship, 
relates element;

something sub entity, 
plays element;

And some data:

$foo isa something;
$bar isa something;

(element: $foo, element: $bar) isa container;

To represent an ordered container, you could build a relationship with three role-players: the container, an element in the container and an index.

Hi @dponyatov,

Check out my answer in this other post. I think you may find it relevant.

And yes, Grakn is suitable for Source Code analysis. Check the work that these people are doing on Grakn: http://www.irongeek.com/i.php?page=videos/derbycon7/t116-aiding-static-analysis-discovering-vulnerabilities-in-binary-targets-through-knowledge-graph-inferences-john-toterhi