{
  "context": [
    {
      "type": "contextDef",
      "subType": "prefix",
      "key": "",
      "value": {
        "type": "term",
        "subType": "namedNode",
        "value": "http://example.com/ns#",
        "loc": {
          "sourceLocationType": "source",
          "start": 9,
          "end": 33
        }
      },
      "loc": {
        "sourceLocationType": "source",
        "start": 0,
        "end": 33
      }
    }
  ],
  "subType": "construct",
  "template": {
    "type": "pattern",
    "subType": "bgp",
    "triples": [
      {
        "type": "triple",
        "subject": {
          "type": "term",
          "subType": "namedNode",
          "value": "s",
          "loc": {
            "sourceLocationType": "source",
            "start": 56,
            "end": 58
          },
          "prefix": ""
        },
        "predicate": {
          "type": "term",
          "subType": "variable",
          "value": "q",
          "loc": {
            "sourceLocationType": "source",
            "start": 59,
            "end": 61
          }
        },
        "object": {
          "type": "term",
          "subType": "triple",
          "subject": {
            "type": "term",
            "subType": "variable",
            "value": "s",
            "loc": {
              "sourceLocationType": "source",
              "start": 65,
              "end": 67
            }
          },
          "predicate": {
            "type": "term",
            "subType": "variable",
            "value": "p",
            "loc": {
              "sourceLocationType": "source",
              "start": 68,
              "end": 70
            }
          },
          "object": {
            "type": "term",
            "subType": "namedNode",
            "value": "o",
            "loc": {
              "sourceLocationType": "source",
              "start": 71,
              "end": 73
            },
            "prefix": ""
          },
          "loc": {
            "sourceLocationType": "source",
            "start": 62,
            "end": 77
          }
        },
        "annotations": [],
        "loc": {
          "sourceLocationType": "source",
          "start": 56,
          "end": 77
        }
      },
      {
        "type": "triple",
        "subject": {
          "type": "term",
          "subType": "variable",
          "value": "a",
          "loc": {
            "sourceLocationType": "source",
            "start": 83,
            "end": 85
          }
        },
        "predicate": {
          "type": "term",
          "subType": "variable",
          "value": "b",
          "loc": {
            "sourceLocationType": "source",
            "start": 86,
            "end": 88
          }
        },
        "object": {
          "type": "term",
          "subType": "triple",
          "subject": {
            "type": "term",
            "subType": "variable",
            "value": "s",
            "loc": {
              "sourceLocationType": "source",
              "start": 92,
              "end": 94
            }
          },
          "predicate": {
            "type": "term",
            "subType": "variable",
            "value": "p",
            "loc": {
              "sourceLocationType": "source",
              "start": 95,
              "end": 97
            }
          },
          "object": {
            "type": "term",
            "subType": "variable",
            "value": "o",
            "loc": {
              "sourceLocationType": "source",
              "start": 98,
              "end": 100
            }
          },
          "loc": {
            "sourceLocationType": "source",
            "start": 89,
            "end": 104
          }
        },
        "annotations": [],
        "loc": {
          "sourceLocationType": "source",
          "start": 83,
          "end": 104
        }
      }
    ],
    "loc": {
      "sourceLocationType": "source",
      "start": 56,
      "end": 106
    }
  },
  "datasets": {
    "type": "datasetClauses",
    "clauses": [],
    "loc": {
      "sourceLocationType": "noMaterialize"
    }
  },
  "where": {
    "type": "pattern",
    "subType": "group",
    "patterns": [
      {
        "type": "pattern",
        "subType": "bgp",
        "triples": [
          {
            "type": "triple",
            "subject": {
              "type": "term",
              "subType": "namedNode",
              "value": "s",
              "loc": {
                "sourceLocationType": "source",
                "start": 56,
                "end": 58
              },
              "prefix": ""
            },
            "predicate": {
              "type": "term",
              "subType": "variable",
              "value": "q",
              "loc": {
                "sourceLocationType": "source",
                "start": 59,
                "end": 61
              }
            },
            "object": {
              "type": "term",
              "subType": "triple",
              "subject": {
                "type": "term",
                "subType": "variable",
                "value": "s",
                "loc": {
                  "sourceLocationType": "source",
                  "start": 65,
                  "end": 67
                }
              },
              "predicate": {
                "type": "term",
                "subType": "variable",
                "value": "p",
                "loc": {
                  "sourceLocationType": "source",
                  "start": 68,
                  "end": 70
                }
              },
              "object": {
                "type": "term",
                "subType": "namedNode",
                "value": "o",
                "loc": {
                  "sourceLocationType": "source",
                  "start": 71,
                  "end": 73
                },
                "prefix": ""
              },
              "loc": {
                "sourceLocationType": "source",
                "start": 62,
                "end": 77
              }
            },
            "annotations": [],
            "loc": {
              "sourceLocationType": "source",
              "start": 56,
              "end": 77
            }
          },
          {
            "type": "triple",
            "subject": {
              "type": "term",
              "subType": "variable",
              "value": "a",
              "loc": {
                "sourceLocationType": "source",
                "start": 83,
                "end": 85
              }
            },
            "predicate": {
              "type": "term",
              "subType": "variable",
              "value": "b",
              "loc": {
                "sourceLocationType": "source",
                "start": 86,
                "end": 88
              }
            },
            "object": {
              "type": "term",
              "subType": "triple",
              "subject": {
                "type": "term",
                "subType": "variable",
                "value": "s",
                "loc": {
                  "sourceLocationType": "source",
                  "start": 92,
                  "end": 94
                }
              },
              "predicate": {
                "type": "term",
                "subType": "variable",
                "value": "p",
                "loc": {
                  "sourceLocationType": "source",
                  "start": 95,
                  "end": 97
                }
              },
              "object": {
                "type": "term",
                "subType": "variable",
                "value": "o",
                "loc": {
                  "sourceLocationType": "source",
                  "start": 98,
                  "end": 100
                }
              },
              "loc": {
                "sourceLocationType": "source",
                "start": 89,
                "end": 104
              }
            },
            "annotations": [],
            "loc": {
              "sourceLocationType": "source",
              "start": 83,
              "end": 104
            }
          }
        ],
        "loc": {
          "sourceLocationType": "source",
          "start": 56,
          "end": 106
        }
      }
    ],
    "loc": {
      "sourceLocationType": "noMaterialize"
    }
  },
  "solutionModifiers": {},
  "loc": {
    "sourceLocationType": "inlinedSource",
    "newSource": "PREFIX : <http://example.com/ns#>\n\nCONSTRUCT WHERE {\n   :s ?q <<(?s ?p :o )>> .\n   ?a ?b <<(?s ?p ?o )>> .\n}\n",
    "start": 0,
    "end": 9007199254740991,
    "loc": {
      "sourceLocationType": "source",
      "start": 0,
      "end": 108
    },
    "startOnNew": 0,
    "endOnNew": 108
  },
  "type": "query"
}
