{
  "type": "project",
  "input": {
    "type": "filter",
    "input": {
      "type": "extend",
      "input": {
        "type": "bgp",
        "patterns": [
          {
            "type": "pattern",
            "termType": "Quad",
            "subject": {
              "termType": "Variable",
              "value": "s"
            },
            "predicate": {
              "termType": "Variable",
              "value": "p"
            },
            "object": {
              "termType": "Variable",
              "value": "o"
            },
            "graph": {
              "termType": "DefaultGraph",
              "value": ""
            }
          }
        ]
      },
      "variable": {
        "termType": "Variable",
        "value": "z"
      },
      "expression": {
        "type": "expression",
        "subType": "operator",
        "operator": "+",
        "args": [
          {
            "type": "expression",
            "subType": "term",
            "term": {
              "termType": "Variable",
              "value": "o"
            }
          },
          {
            "type": "expression",
            "subType": "term",
            "term": {
              "termType": "Literal",
              "value": "1",
              "datatype": {
                "termType": "NamedNode",
                "value": "http://www.w3.org/2001/XMLSchema#integer"
              }
            }
          }
        ]
      }
    },
    "expression": {
      "type": "expression",
      "subType": "operator",
      "operator": "=",
      "args": [
        {
          "type": "expression",
          "subType": "term",
          "term": {
            "termType": "Variable",
            "value": "z"
          }
        },
        {
          "type": "expression",
          "subType": "term",
          "term": {
            "termType": "Literal",
            "value": "3",
            "datatype": {
              "termType": "NamedNode",
              "value": "http://www.w3.org/2001/XMLSchema#integer"
            }
          }
        }
      ]
    }
  },
  "variables": [
    {
      "termType": "Variable",
      "value": "s"
    },
    {
      "termType": "Variable",
      "value": "p"
    },
    {
      "termType": "Variable",
      "value": "o"
    },
    {
      "termType": "Variable",
      "value": "z"
    }
  ]
}
