Uploaded image for project: 'yangtools'
  1. yangtools
  2. YANGTOOLS-784

Defer statement initialization in InferredStatementContext

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved
    • Highest
    • Resolution: Done
    • None
    • 7.0.0
    • None
    • None
    • Operating System: All
      Platform: All

    Description

      In order to implement efficient grouping inlining with working augment/deviate statements, we need to have the concept of a node which represents a tree of potential nodes. This cannot be realized via internals of parser.stmt.reactor because it changes the mechanics of how NamespaceBehaviours work.

      Current design assumption is that namespaces are populated eagerly with key/value pairs and inference actions can be registered to respond to those key/values.

      Efficient inlining (YANGTOOLS-694) requires that not all nodes are instantiated, which would lead to under-populated namespaces and listeners not triggering, all of which is centered about StmtContext and StmtContext.Mutable.

      Currently the only use of listeners is to perform mutation, which simplifies the contract, as we really need to have a way to:

      • understand that a node represents a tree (and is otherwise a StmtContext.Mutable)
      • understand that a listener is interested in some of its children
      • request such a node to give us a StmtContext.Mutable representation of its specific child (potentially again a MutableTree)

      Further simplification comes from the fact that we need this to work only in one specific namespace, which is ChildSchemaNodeNamespace.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              miro.kovac Miroslav Kovac
              rovarga Robert Varga
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: