Giter Club home page Giter Club logo

Comments (8)

s-arash avatar s-arash commented on August 29, 2024 1

Hi @brurucy, the index-sharing data structure provider has not been added to the repo yet. I'll try and rectify that whenever I get a chance.
In the meantime, you can check out the docker image https://hub.docker.com/r/arashsahebolamri/byods-artifact, which contains this code under /src/exps/ind-share

from ascent.

brurucy avatar brurucy commented on August 29, 2024 1

Perusing over byods was my main entertainment for a 13 hours flight that just landed. I think I get it now, and the index optimisation code is very portable. I'm snatching it.

Thanks @s-arash and @kmicinski.

Could you also tell me where does ascent the compiler compute the indexes? I can always guess it correctly, but the logic seems to be buried beneath so much parsing that I'm struggling to find the seemingly simple code that does that.

from ascent.

kmicinski avatar kmicinski commented on August 29, 2024

This should be in the ind_rel provider of the byods branch. I am busy with some end-of-semester business now, but I will try to get a concrete pointer into the code by the end of the week. Arash is looking at merging the byods branch into the main one proper--but I think that's still up in the air as to timeline.

from ascent.

brurucy avatar brurucy commented on August 29, 2024

Thanks Kristopher! Looking forward to it.

from ascent.

brurucy avatar brurucy commented on August 29, 2024

@s-arash could you also describe how do you go from Datalog program -> Indexes?

e.g. if you have the classic ancestor rule:

r1 - tc(?x, ?y) <- e(?x, ?y)
r2 - tc(?x, ?z) <- e(?x, ?y), tc(?y, ?z)

Are your indexes then ((key), (value)):
e [ ((1), (0)), ((0, 1), ) ]
tc [ ((0), (1)) ]

And plan:
r1 - Project identity
r2 - Project (e_((1), (0)) |><| tc_((0), (1)))

from ascent.

kmicinski avatar kmicinski commented on August 29, 2024

Hi Bruno,

Section 5.5 of this paper describes the key points of the implementation: https://kmicinski.com/assets/byods.pdf. There are a few differences compared to what Souffle is doing (e.g., using linked hashmaps rather than btrees/tries), but algorithmically it should follow https://www.vldb.org/pvldb/vol12/p141-subotic.pdf.

from ascent.

s-arash avatar s-arash commented on August 29, 2024

@brurucy, to add more context to Kris's answer, the Ascent compiler itself selects a set of logical indexes for each relation. In your example, it is as you described (i.e., for e the indexes are [{}, {1}, {0, 1}]). It is up to the data structure provider (index-sharing for example) to come up with physical indexes for this set. As Kris said, that process is described in the BYODS paper.

from ascent.

s-arash avatar s-arash commented on August 29, 2024

Could you also tell me where does ascent the compiler compute the indexes?

Look for it in ascent_hir.rs (no parsing there). Specifically, compile_rule_to_ir_rule() should be a good starting point.

from ascent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.