Giter Site home page Giter Site logo

Recursive templates about enlivez HOT 4 CLOSED

cgrand avatar cgrand commented on September 23, 2024
Recursive templates

from enlivez.

Comments (4)

cgrand avatar cgrand commented on September 23, 2024

The tree of queries is used to generate paths and paths lead to components.

For a fragment, its paths are the paths of its children prefixed by the child index

paths_some_fragment(p) :- paths_child_0(p'), append([0], p', p)
...
paths_some_fragment(p) :- paths_child_N(p'), append([N], p', p)

from enlivez.

cgrand avatar cgrand commented on September 23, 2024

For a for, its paths are the paths of its children prefixed by the child key

paths_some_for(p) :- query_of_this_for(a_0, ..., a_N), paths_this_body(p'), append([a_k_0, .. a_k_M], p', p) 

Ok this shows up deficiencies in my above notation: some arguments ahave to be passed to the body.

from enlivez.

cgrand avatar cgrand commented on September 23, 2024
paths_node(self, p) :- paths_node_for1(self, p)
paths_node_for1(self, p) :- datom(self, :node/name, _), path_node_for2(self, p'), append([true], p', p)
paths_node_for2(self, p) :- datom(self, :node/children, child), paths_node(child, p'), append([child], p', p)

Replacing query trees by rules sounds like an option; the sue of the impure append may cause trouble if there's a cycle in data.

from enlivez.

cgrand avatar cgrand commented on September 23, 2024

implemented

from enlivez.

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.