diff --git a/engines/algebra-sparql-1-1/README.md b/engines/algebra-sparql-1-1/README.md
index 5c04c971..5065fbaa 100644
--- a/engines/algebra-sparql-1-1/README.md
+++ b/engines/algebra-sparql-1-1/README.md
@@ -119,6 +119,7 @@ indicating whether patterns should be translated to triple or quad patterns.
In the case of quads the `graph` operation will be removed
and embedded into the patterns it contained.
The default value for this parameter is `false`.
+For update queries, even in the case of `quad: false`, the target triple patterns are converted to quads.
```
PREFIX :
@@ -252,4 +253,4 @@ and the project operation always gets used (even in the case of `SELECT *`).
## A note on tests
Every test consists of a sparql file and a corresponding json file containing the algebra result.
-Tests ending with `(quads)` in their name are tested/generated with `quads: true` in the options.
+Tests ending with `-quads` in their name are tested/generated with `quads: true` in the options.
diff --git a/engines/algebra-sparql-1-1/lib/toAlgebra.ts b/engines/algebra-sparql-1-1/lib/toAlgebra.ts
index e089fa32..4147590e 100644
--- a/engines/algebra-sparql-1-1/lib/toAlgebra.ts
+++ b/engines/algebra-sparql-1-1/lib/toAlgebra.ts
@@ -97,7 +97,8 @@ export const toAlgebra11Builder = IndirBuilder
* @param options - Optional options object. Current options:
* @param options.dataFactory - The Datafactory used to generate terms. Default @rdfjs/data-model.
* @param options.quads - Boolean indicating whether triples should be converted to Quads
- * (consumes GRAPH statements). Default false.
+ * (consuming the GRAPH statements).
+ * Default false. - In case of false, graph targets of updates are still pushed down
* @param options.prefixes - Pre-defined prefixes for the given query. Default empty.
* @param options.baseIRI - Base IRI that should be used for the query.
* Default undefined (throws error if required).
diff --git a/engines/algebra-sparql-1-1/test/algebra.test.ts b/engines/algebra-sparql-1-1/test/algebra.test.ts
index 76932465..e18c7224 100644
--- a/engines/algebra-sparql-1-1/test/algebra.test.ts
+++ b/engines/algebra-sparql-1-1/test/algebra.test.ts
@@ -19,12 +19,12 @@ describe('algebra output', () => {
describe(suite, () => {
for (const blankToVariable of [ true, false ]) {
for (const test of sparqlAlgebraTests(suite, blankToVariable, true)) {
- const { name, json, sparql: query } = test;
+ const { name, json, quads, sparql: query } = test;
it(`${name}${blankToVariable ? ' (no blanks)' : ''}`, ({ expect }) => {
const ast = parser.parse(query);
const algebra = algebraUtils.objectify(
toAlgebra(ast, {
- quads: name.endsWith('-quads'),
+ quads,
blankToVariable,
}),
);
diff --git a/engines/algebra-sparql-1-1/test/extraCoverage.test.ts b/engines/algebra-sparql-1-1/test/extraCoverage.test.ts
index 98e2761b..cb43ce0e 100644
--- a/engines/algebra-sparql-1-1/test/extraCoverage.test.ts
+++ b/engines/algebra-sparql-1-1/test/extraCoverage.test.ts
@@ -70,12 +70,21 @@ GROUP BY ( ?y AS ?x )`);
});
});
- describe('insert/DELETE without quads option throws', () => {
- it('toAlgebra throws when INSERT DATA is converted without quads option', ({ expect }) => {
+ describe('insert/DELETE without quads option works', () => {
+ it('toAlgebra succeeds when INSERT DATA is converted without quads option', ({ expect }) => {
const ast = parser.parse('INSERT DATA { }');
- expect(() => toAlgebra(ast, { quads: false })).toThrowError(
- /INSERT\/DELETE operations are only supported with quads option enabled/u,
- );
+ const result = algebraUtils.objectify(toAlgebra(ast, { quads: false }));
+ expect(result).toMatchObject({
+ type: 'deleteinsert',
+ insert: [{
+ type: 'pattern',
+ termType: 'Quad',
+ subject: { termType: 'NamedNode', value: 'http://s' },
+ predicate: { termType: 'NamedNode', value: 'http://p' },
+ object: { termType: 'NamedNode', value: 'http://o' },
+ graph: { termType: 'DefaultGraph', value: '' },
+ }],
+ });
});
});
diff --git a/engines/algebra-sparql-1-1/test/generateJson.test.ts b/engines/algebra-sparql-1-1/test/generateJson.test.ts
index 692302ce..a7cf56d8 100644
--- a/engines/algebra-sparql-1-1/test/generateJson.test.ts
+++ b/engines/algebra-sparql-1-1/test/generateJson.test.ts
@@ -25,43 +25,46 @@ describe.skip('algebra test generate', () => {
for (const suite of suites) {
describe(suite, () => {
for (const { query, name } of sparqlQueries(suite)) {
- for (const blankToVariable of [ false, true ]) {
- it(`${name} - blankToVar: ${blankToVariable}`, ({ expect }) => {
- expect(() => {
- astFactory.resetBlankNodeCounter();
- const ast = parser.parse(query, { astFactory });
- const algebra = algebraUtils.objectify(toAlgebra(ast, {
- quads: name.endsWith('-quads'),
- blankToVariable,
- }));
- const canonicalString = generator.generate(toAst(algebra));
+ for (const quads of [ false, true ]) {
+ for (const blankToVariable of [ false, true ]) {
+ const suffix = quads ? '-quads' : '';
+ it(`${name}${suffix} - blankToVar: ${blankToVariable}`, ({ expect }) => {
+ expect(() => {
+ astFactory.resetBlankNodeCounter();
+ const ast = parser.parse(query, { astFactory });
+ const algebra = algebraUtils.objectify(toAlgebra(ast, {
+ quads,
+ blankToVariable,
+ }));
+ const canonicalString = generator.generate(toAst(algebra));
- const algebraFileName = `${name}.json`;
- let newPath = blankToVariable ? rootJsonBlankToVariable : rootJson;
- let newPathCanonical = blankToVariable ? canonicalSparqlBlankToVar : canonicalSparqlBase;
- for (const piece of name.split(sep).slice(0, -1)) {
- newPath = join(newPath, piece);
- if (!existsSync(newPath)) {
- mkdirSync(newPath);
+ const algebraFileName = `${name}${suffix}.json`;
+ let newPath = blankToVariable ? rootJsonBlankToVariable : rootJson;
+ let newPathCanonical = blankToVariable ? canonicalSparqlBlankToVar : canonicalSparqlBase;
+ for (const piece of name.split(sep).slice(0, -1)) {
+ newPath = join(newPath, piece);
+ if (!existsSync(newPath)) {
+ mkdirSync(newPath);
+ }
}
- }
- for (const piece of name.split(sep).slice(0, -1)) {
- newPathCanonical = join(newPathCanonical, piece);
- if (!existsSync(newPathCanonical)) {
- mkdirSync(newPathCanonical);
+ for (const piece of name.split(sep).slice(0, -1)) {
+ newPathCanonical = join(newPathCanonical, piece);
+ if (!existsSync(newPathCanonical)) {
+ mkdirSync(newPathCanonical);
+ }
}
- }
- writeFileSync(
- join(blankToVariable ? rootJsonBlankToVariable : rootJson, algebraFileName),
- JSON.stringify(algebra, null, 2),
- );
- writeFileSync(
- join(blankToVariable ? canonicalSparqlBlankToVar : canonicalSparqlBase, `${name}.sparql`),
- canonicalString,
- );
- }).not.toThrow();
- });
+ writeFileSync(
+ join(blankToVariable ? rootJsonBlankToVariable : rootJson, algebraFileName),
+ JSON.stringify(algebra, null, 2),
+ );
+ writeFileSync(
+ join(blankToVariable ? canonicalSparqlBlankToVar : canonicalSparqlBase, `${name}${suffix}.sparql`),
+ canonicalString,
+ );
+ }).not.toThrow();
+ });
+ }
}
}
});
diff --git a/engines/algebra-sparql-1-2/lib/toAlgebra12.ts b/engines/algebra-sparql-1-2/lib/toAlgebra12.ts
index 0fa248ce..d2b74cbe 100644
--- a/engines/algebra-sparql-1-2/lib/toAlgebra12.ts
+++ b/engines/algebra-sparql-1-2/lib/toAlgebra12.ts
@@ -120,7 +120,8 @@ export const toAlgebra12Builder = IndirBuilder
* @param options - Optional options object. Current options:
* @param options.dataFactory - The Datafactory used to generate terms. Default @rdfjs/data-model.
* @param options.quads - Boolean indicating whether triples should be converted to Quads
- * (consumes GRAPH statements). Default false.
+ * (consuming the GRAPH statements).
+ * Default false. - In case of false, graph targets of updates are still pushed down
* @param options.prefixes - Pre-defined prefixes for the given query. Default empty.
* @param options.baseIRI - Base IRI that should be used for the query.
* Default undefined (throws error if required).
diff --git a/engines/algebra-sparql-1-2/test/algebra.test.ts b/engines/algebra-sparql-1-2/test/algebra.test.ts
index 81f4d1c8..36194641 100644
--- a/engines/algebra-sparql-1-2/test/algebra.test.ts
+++ b/engines/algebra-sparql-1-2/test/algebra.test.ts
@@ -25,16 +25,12 @@ describe('algebra output 1.2', () => {
describe(suite, () => {
for (const blankToVariable of [ true, false ]) {
for (const test of sparqlAlgebraTests(suite, blankToVariable, true)) {
- const { name, json, sparql: query } = test;
- // If (!name.includes('sparql-1-2-syntax-nested-anonreifier-01') ||
- // blankToVariable || name.includes('-quads')) {
- // continue;
- // }
+ const { name, json, quads, sparql: query } = test;
it(`${name}${blankToVariable ? ' (no blanks)' : ''}`, ({ expect }) => {
const ast = parser.parse(query);
const algebra = algebraUtils.objectify(
toAlgebra(ast, {
- quads: name.endsWith('-quads'),
+ quads,
blankToVariable,
}),
);
diff --git a/engines/algebra-sparql-1-2/test/generateJson.test.ts b/engines/algebra-sparql-1-2/test/generateJson.test.ts
index ae9ddde7..123e5b3b 100644
--- a/engines/algebra-sparql-1-2/test/generateJson.test.ts
+++ b/engines/algebra-sparql-1-2/test/generateJson.test.ts
@@ -1,6 +1,6 @@
import { existsSync, mkdirSync, writeFileSync } from 'node:fs';
import { join, sep } from 'node:path';
-import { algebraUtils } from '@traqula/algebra-transformations-1-1';
+import { algebraUtils } from '@traqula/algebra-transformations-1-2';
import { Generator } from '@traqula/generator-sparql-1-2';
import { Parser } from '@traqula/parser-sparql-1-2';
import { AstFactory } from '@traqula/rules-sparql-1-2';
@@ -27,43 +27,46 @@ describe.skip('algebra 1.2 test generate', () => {
for (const suite of suites) {
describe(suite, () => {
for (const { query, name } of sparqlQueries(suite)) {
- for (const blankToVariable of [ false, true ]) {
- it(`${name} - blankToVar: ${blankToVariable}`, ({ expect }) => {
- expect(() => {
- astFactory.resetBlankNodeCounter();
- const ast = parser.parse(query, { astFactory });
- const algebra = algebraUtils.objectify(toAlgebra(ast, {
- quads: name.endsWith('-quads'),
- blankToVariable,
- }));
- const canonicalString = generator.generate(toAst(algebra));
+ for (const quads of [ false, true ]) {
+ for (const blankToVariable of [ false, true ]) {
+ const suffix = quads ? '-quads' : '';
+ it(`${name}${suffix} - blankToVar: ${blankToVariable}`, ({ expect }) => {
+ expect(() => {
+ astFactory.resetBlankNodeCounter();
+ const ast = parser.parse(query, { astFactory });
+ const algebra = algebraUtils.objectify(toAlgebra(ast, {
+ quads,
+ blankToVariable,
+ }));
+ const canonicalString = generator.generate(toAst(algebra));
- const algebraFileName = `${name}.json`;
- let newPath = blankToVariable ? rootJsonBlankToVariable : rootJson;
- let newPathCanonical = blankToVariable ? canonicalSparqlBlankToVar : canonicalSparqlBase;
- for (const piece of name.split(sep).slice(0, -1)) {
- newPath = join(newPath, piece);
- if (!existsSync(newPath)) {
- mkdirSync(newPath);
+ const algebraFileName = `${name}${suffix}.json`;
+ let newPath = blankToVariable ? rootJsonBlankToVariable : rootJson;
+ let newPathCanonical = blankToVariable ? canonicalSparqlBlankToVar : canonicalSparqlBase;
+ for (const piece of name.split(sep).slice(0, -1)) {
+ newPath = join(newPath, piece);
+ if (!existsSync(newPath)) {
+ mkdirSync(newPath);
+ }
}
- }
- for (const piece of name.split(sep).slice(0, -1)) {
- newPathCanonical = join(newPathCanonical, piece);
- if (!existsSync(newPathCanonical)) {
- mkdirSync(newPathCanonical);
+ for (const piece of name.split(sep).slice(0, -1)) {
+ newPathCanonical = join(newPathCanonical, piece);
+ if (!existsSync(newPathCanonical)) {
+ mkdirSync(newPathCanonical);
+ }
}
- }
- writeFileSync(
- join(blankToVariable ? rootJsonBlankToVariable : rootJson, algebraFileName),
- JSON.stringify(algebra, null, 2),
- );
- writeFileSync(
- join(blankToVariable ? canonicalSparqlBlankToVar : canonicalSparqlBase, `${name}.sparql`),
- canonicalString,
- );
- }).not.toThrow();
- });
+ writeFileSync(
+ join(blankToVariable ? rootJsonBlankToVariable : rootJson, algebraFileName),
+ JSON.stringify(algebra, null, 2),
+ );
+ writeFileSync(
+ join(blankToVariable ? canonicalSparqlBlankToVar : canonicalSparqlBase, `${name}${suffix}.sparql`),
+ canonicalString,
+ );
+ }).not.toThrow();
+ });
+ }
}
}
});
diff --git a/packages/algebra-transformations-1-1/lib/toAlgebra/updates.ts b/packages/algebra-transformations-1-1/lib/toAlgebra/updates.ts
index 33979fc3..6e302748 100644
--- a/packages/algebra-transformations-1-1/lib/toAlgebra/updates.ts
+++ b/packages/algebra-transformations-1-1/lib/toAlgebra/updates.ts
@@ -88,11 +88,9 @@ Algebra.Update,
[UpdateOperationInsertData | UpdateOperationDeleteData | UpdateOperationDeleteWhere | UpdateOperationModify]
> = {
name: 'translateInsertDelete',
- fun: ({ SUBRULE }) => ({ useQuads, algebraFactory: AF, astFactory: F }, op) => {
- if (!useQuads) {
- throw new Error('INSERT/DELETE operations are only supported with quads option enabled');
- }
-
+ fun: ({ SUBRULE }) => ({ algebraFactory: AF, astFactory: F, useQuads }, op) => {
+ // `useQuads: false` is supported in update queries,
+ // but within the target, the quad push down is still performed.
const deleteTriples: Algebra.Pattern[] = [];
const insertTriples: Algebra.Pattern[] = [];
let where: Algebra.Operation | undefined;
@@ -114,8 +112,11 @@ Algebra.Update,
if (use.default.length > 0 || use.named.length > 0) {
where = AF.createFrom(where, use.default, use.named);
} else if (F.isUpdateOperationModify(op) && op.graph) {
- // This is equivalent
- where = SUBRULE(recurseGraph, where, SUBRULE(translateNamed, op.graph), undefined);
+ if (useQuads) {
+ where = SUBRULE(recurseGraph, where, SUBRULE(translateNamed, op.graph), undefined);
+ } else {
+ where = AF.createGraph(where, SUBRULE(translateNamed, op.graph));
+ }
}
}
}
diff --git a/packages/test-utils/lib/generators/algebraGenerators.ts b/packages/test-utils/lib/generators/algebraGenerators.ts
index 96541491..ee3c83a1 100644
--- a/packages/test-utils/lib/generators/algebraGenerators.ts
+++ b/packages/test-utils/lib/generators/algebraGenerators.ts
@@ -25,6 +25,8 @@ export type AlgebraTestSuite = 'dawg-syntax' | 'sparql-1.1' | 'sparql11-query' |
/**
* Yields algebra-level test cases from the static test fixtures.
* Each test provides a SPARQL query, expected algebra JSON, and optionally a canonical SPARQL string.
+ * For each unique base test name, yields both a `quads: false` and a `quads: true` variant
+ * when the corresponding expected algebra fixture exists.
* @param suite - The test suite to iterate.
* @param blankToVariable - Whether to use the blank-to-variable fixture variant.
* @param getSPARQL - Whether to load the SPARQL and canonical SPARQL strings.
@@ -35,32 +37,41 @@ export function sparqlAlgebraTests(suite: AlgebraTestSuite, blankToVariable: boo
Generator;
export function* sparqlAlgebraTests(suite: AlgebraTestSuite, blankToVariable: boolean, getSPARQL: boolean):
Generator {
+ const jsonRoot = blankToVariable ? rootJsonBlankToVariable : rootJson;
+
// Relative path starting from roots declared above.
function* subGen(relativePath: string): Generator {
- const absolutePath = join(blankToVariable ? rootJsonBlankToVariable : rootJson, relativePath);
+ const absolutePath = join(rootSparql, relativePath);
if (lstatSync(absolutePath).isDirectory()) {
// Recursion
for (const sub of readdirSync(absolutePath)) {
+ // Relative path appended with sub
yield* subGen(join(relativePath, sub));
}
} else {
- const name = relativePath.replace(/\.json$/u, '');
- const sparqlPath = join(rootSparql, relativePath.replace(/\.json/u, '.sparql'));
- const canonicalSparqlPath = join(
- blankToVariable ? rootCanonicalSparqlBlankToVar : rootCanonicalSparql,
- relativePath.replace(/\.json/u, '.sparql'),
- );
- yield {
- name,
- json: JSON.parse(readFileSync(absolutePath)),
- sparql: getSPARQL ? readFileSync(sparqlPath, 'utf8') : undefined,
- canonicalSparql: getSPARQL ? readFileSync(canonicalSparqlPath, 'utf-8') : undefined,
- quads: name.endsWith('-quads'),
- };
+ // Emit tests
+ const baseName = relativePath.replace(/\.sparql$/u, '');
+
+ for (const suffix of [ '', '-quads' ]) {
+ const name = `${baseName}${suffix}`;
+ const jsonPath = join(jsonRoot, `${name}.json`);
+ const canonicalSparqlPath = join(
+ blankToVariable ? rootCanonicalSparqlBlankToVar : rootCanonicalSparql,
+ `${name}.sparql`,
+ );
+
+ yield {
+ name,
+ json: JSON.parse(readFileSync(jsonPath)),
+ sparql: getSPARQL ? readFileSync(absolutePath, 'utf8') : undefined,
+ canonicalSparql: getSPARQL ? readFileSync(canonicalSparqlPath, 'utf-8') : undefined,
+ quads: suffix === '-quads',
+ };
+ }
}
}
- const subfolders = readdirSync(blankToVariable ? rootJsonBlankToVariable : rootJson);
+ const subfolders = readdirSync(rootSparql);
if (subfolders.includes(suite)) {
yield* subGen(suite);
}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/basic/01-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/basic/01-quads.json
new file mode 100644
index 00000000..f7112b5a
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/basic/01-quads.json
@@ -0,0 +1,8 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": []
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/basic/02-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/basic/02-quads.json
new file mode 100644
index 00000000..f7112b5a
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/basic/02-quads.json
@@ -0,0 +1,8 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": []
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/basic/03-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/basic/03-quads.json
new file mode 100644
index 00000000..503eb4f6
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/basic/03-quads.json
@@ -0,0 +1,42 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "y"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "x"
+ },
+ {
+ "termType": "Variable",
+ "value": "y"
+ },
+ {
+ "termType": "Variable",
+ "value": "z"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/basic/04-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/basic/04-quads.json
new file mode 100644
index 00000000..503eb4f6
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/basic/04-quads.json
@@ -0,0 +1,42 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "y"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "x"
+ },
+ {
+ "termType": "Variable",
+ "value": "y"
+ },
+ {
+ "termType": "Variable",
+ "value": "z"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/basic/05-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/basic/05-quads.json
new file mode 100644
index 00000000..0b1a5bbf
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/basic/05-quads.json
@@ -0,0 +1,74 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "y"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "a"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "b"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "a"
+ },
+ {
+ "termType": "Variable",
+ "value": "b"
+ },
+ {
+ "termType": "Variable",
+ "value": "c"
+ },
+ {
+ "termType": "Variable",
+ "value": "x"
+ },
+ {
+ "termType": "Variable",
+ "value": "y"
+ },
+ {
+ "termType": "Variable",
+ "value": "z"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/basic/06-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/basic/06-quads.json
new file mode 100644
index 00000000..0b1a5bbf
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/basic/06-quads.json
@@ -0,0 +1,74 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "y"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "a"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "b"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "a"
+ },
+ {
+ "termType": "Variable",
+ "value": "b"
+ },
+ {
+ "termType": "Variable",
+ "value": "c"
+ },
+ {
+ "termType": "Variable",
+ "value": "x"
+ },
+ {
+ "termType": "Variable",
+ "value": "y"
+ },
+ {
+ "termType": "Variable",
+ "value": "z"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/bnodes/01-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/bnodes/01-quads.json
new file mode 100644
index 00000000..93f5d857
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/bnodes/01-quads.json
@@ -0,0 +1,29 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#p"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#q"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/bnodes/02-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/bnodes/02-quads.json
new file mode 100644
index 00000000..93f5d857
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/bnodes/02-quads.json
@@ -0,0 +1,29 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#p"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#q"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/bnodes/03-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/bnodes/03-quads.json
new file mode 100644
index 00000000..ef2ceefd
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/bnodes/03-quads.json
@@ -0,0 +1,86 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "y"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_1"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "pa"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "b"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "g_1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "b"
+ },
+ {
+ "termType": "Variable",
+ "value": "pa"
+ },
+ {
+ "termType": "Variable",
+ "value": "x"
+ },
+ {
+ "termType": "Variable",
+ "value": "y"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/bnodes/04-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/bnodes/04-quads.json
new file mode 100644
index 00000000..93f5d857
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/bnodes/04-quads.json
@@ -0,0 +1,29 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#p"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#q"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/bnodes/05-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/bnodes/05-quads.json
new file mode 100644
index 00000000..c040eb7f
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/bnodes/05-quads.json
@@ -0,0 +1,49 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "e_a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#p1"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#q1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "e_a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#p2"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#q2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/bnodes/06-clash-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/bnodes/06-clash-quads.json
new file mode 100644
index 00000000..1aeb709f
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/bnodes/06-clash-quads.json
@@ -0,0 +1,82 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "e_b"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "b"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "e_b"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "b0"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "e_b0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "b1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "b"
+ },
+ {
+ "termType": "Variable",
+ "value": "b0"
+ },
+ {
+ "termType": "Variable",
+ "value": "b1"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/expr/01-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/expr/01-quads.json
new file mode 100644
index 00000000..52591fc4
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/expr/01-quads.json
@@ -0,0 +1,53 @@
+{
+ "type": "project",
+ "input": {
+ "type": "filter",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ },
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/expr/02-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/expr/02-quads.json
new file mode 100644
index 00000000..e00f8267
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/expr/02-quads.json
@@ -0,0 +1,72 @@
+{
+ "type": "project",
+ "input": {
+ "type": "filter",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "regex",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "foo",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ },
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/expr/03-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/expr/03-quads.json
new file mode 100644
index 00000000..1e0bb985
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/expr/03-quads.json
@@ -0,0 +1,85 @@
+{
+ "type": "project",
+ "input": {
+ "type": "filter",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "regex",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "foo",
+ "language": "en",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"
+ }
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "i",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ },
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/expr/04-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/expr/04-quads.json
new file mode 100644
index 00000000..3d41b23f
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/expr/04-quads.json
@@ -0,0 +1,63 @@
+{
+ "type": "project",
+ "input": {
+ "type": "filter",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "named",
+ "name": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ },
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ }
+ ]
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ },
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/expr/05-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/expr/05-quads.json
new file mode 100644
index 00000000..2608b3f4
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/expr/05-quads.json
@@ -0,0 +1,71 @@
+{
+ "type": "project",
+ "input": {
+ "type": "filter",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "named",
+ "name": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#myFunc"
+ },
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "s"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ }
+ ]
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ },
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/forms/01-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/forms/01-quads.json
new file mode 100644
index 00000000..f48844af
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/forms/01-quads.json
@@ -0,0 +1,210 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "y"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#first"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "g_0"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_2"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "pa"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "b"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_3"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#first"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "g_2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_3"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "g_4"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_4"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#first"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "57",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_4"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "g_3"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "b"
+ },
+ {
+ "termType": "Variable",
+ "value": "pa"
+ },
+ {
+ "termType": "Variable",
+ "value": "x"
+ },
+ {
+ "termType": "Variable",
+ "value": "y"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/forms/02-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/forms/02-quads.json
new file mode 100644
index 00000000..41a28ed0
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/forms/02-quads.json
@@ -0,0 +1,89 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_2"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#first"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "g_0"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_2"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "g_3"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_3"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#first"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "g_1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_3"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/limit-offset/01-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/limit-offset/01-quads.json
new file mode 100644
index 00000000..0128d13b
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/limit-offset/01-quads.json
@@ -0,0 +1,60 @@
+{
+ "type": "slice",
+ "input": {
+ "type": "project",
+ "input": {
+ "type": "orderby",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "expressions": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ },
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+ },
+ "start": 0,
+ "length": 5
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/limit-offset/02-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/limit-offset/02-quads.json
new file mode 100644
index 00000000..bc85510a
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/limit-offset/02-quads.json
@@ -0,0 +1,60 @@
+{
+ "type": "slice",
+ "input": {
+ "type": "project",
+ "input": {
+ "type": "orderby",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "expressions": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ },
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+ },
+ "start": 3,
+ "length": 5
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/limit-offset/03-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/limit-offset/03-quads.json
new file mode 100644
index 00000000..bc85510a
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/limit-offset/03-quads.json
@@ -0,0 +1,60 @@
+{
+ "type": "slice",
+ "input": {
+ "type": "project",
+ "input": {
+ "type": "orderby",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "expressions": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ },
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+ },
+ "start": 3,
+ "length": 5
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/limit-offset/04-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/limit-offset/04-quads.json
new file mode 100644
index 00000000..a5255065
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/limit-offset/04-quads.json
@@ -0,0 +1,59 @@
+{
+ "type": "slice",
+ "input": {
+ "type": "project",
+ "input": {
+ "type": "orderby",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "expressions": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ },
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+ },
+ "start": 3
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lists/01-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lists/01-quads.json
new file mode 100644
index 00000000..d8c13710
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lists/01-quads.json
@@ -0,0 +1,78 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#first"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "x"
+ },
+ {
+ "termType": "Variable",
+ "value": "z"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lists/02-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lists/02-quads.json
new file mode 100644
index 00000000..250ca4b9
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lists/02-quads.json
@@ -0,0 +1,78 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#first"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "g_0"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "x"
+ },
+ {
+ "termType": "Variable",
+ "value": "z"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lists/03-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lists/03-quads.json
new file mode 100644
index 00000000..13adc631
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lists/03-quads.json
@@ -0,0 +1,54 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#first"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "z"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lists/04-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lists/04-quads.json
new file mode 100644
index 00000000..ef1c69db
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lists/04-quads.json
@@ -0,0 +1,94 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#first"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#first"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "g_0"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "z"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lists/05-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lists/05-quads.json
new file mode 100644
index 00000000..5fabed5d
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lists/05-quads.json
@@ -0,0 +1,49 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#first"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/01-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/01-quads.json
new file mode 100644
index 00000000..8aa2feb7
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/01-quads.json
@@ -0,0 +1,33 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#p"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "x",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/02-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/02-quads.json
new file mode 100644
index 00000000..8aa2feb7
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/02-quads.json
@@ -0,0 +1,33 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#p"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "x",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/03-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/03-quads.json
new file mode 100644
index 00000000..373b8701
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/03-quads.json
@@ -0,0 +1,33 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#p"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "x\"y'z",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/04-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/04-quads.json
new file mode 100644
index 00000000..373b8701
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/04-quads.json
@@ -0,0 +1,33 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#p"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "x\"y'z",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/05-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/05-quads.json
new file mode 100644
index 00000000..f0cde265
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/05-quads.json
@@ -0,0 +1,33 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#p"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "x\"",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/06-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/06-quads.json
new file mode 100644
index 00000000..3ec541ea
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/06-quads.json
@@ -0,0 +1,33 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#p"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "x'",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/07-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/07-quads.json
new file mode 100644
index 00000000..fe51fd0c
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/07-quads.json
@@ -0,0 +1,33 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#p"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "123",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/08-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/08-quads.json
new file mode 100644
index 00000000..fe51fd0c
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/08-quads.json
@@ -0,0 +1,33 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#p"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "123",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/09-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/09-quads.json
new file mode 100644
index 00000000..34b5894c
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/09-quads.json
@@ -0,0 +1,33 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#p"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Long\n\"\"\nLiteral\n",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/10-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/10-quads.json
new file mode 100644
index 00000000..97bc2ef7
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/10-quads.json
@@ -0,0 +1,33 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#p"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Long\n'' \"\"\"\nLiteral\n",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/11-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/11-quads.json
new file mode 100644
index 00000000..700fbacb
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/11-quads.json
@@ -0,0 +1,33 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#p"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Long\"\"\"Literal",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/12-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/12-quads.json
new file mode 100644
index 00000000..1f3f1edf
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/12-quads.json
@@ -0,0 +1,33 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#p"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Long'''Literal",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/13-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/13-quads.json
new file mode 100644
index 00000000..700fbacb
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/13-quads.json
@@ -0,0 +1,33 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#p"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Long\"\"\"Literal",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/14-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/14-quads.json
new file mode 100644
index 00000000..1f3f1edf
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/14-quads.json
@@ -0,0 +1,33 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#p"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Long'''Literal",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/15-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/15-quads.json
new file mode 100644
index 00000000..db5350c5
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/15-quads.json
@@ -0,0 +1,33 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#p"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Long '' Literal",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/16-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/16-quads.json
new file mode 100644
index 00000000..f47a4a6d
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/16-quads.json
@@ -0,0 +1,33 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#p"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Long ' Literal",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/17-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/17-quads.json
new file mode 100644
index 00000000..3acdf11e
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/17-quads.json
@@ -0,0 +1,33 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#p"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Long''\\Literal with '\\ single quotes ",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/18-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/18-quads.json
new file mode 100644
index 00000000..5dfa5f4a
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/18-quads.json
@@ -0,0 +1,33 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#p"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Long \"\" Literal",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/19-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/19-quads.json
new file mode 100644
index 00000000..ea5bd788
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/19-quads.json
@@ -0,0 +1,33 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#p"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Long \" Literal",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/20-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/20-quads.json
new file mode 100644
index 00000000..951638b1
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/lit/20-quads.json
@@ -0,0 +1,33 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#p"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Long\"\"\\Literal with \"\\ single quotes",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/opt-filter/01-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/opt-filter/01-quads.json
new file mode 100644
index 00000000..8f3f0c5c
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/opt-filter/01-quads.json
@@ -0,0 +1,103 @@
+{
+ "type": "project",
+ "input": {
+ "type": "leftjoin",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example/p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "v"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "y"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example/q"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "w"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ],
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "v"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "2",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "v"
+ },
+ {
+ "termType": "Variable",
+ "value": "w"
+ },
+ {
+ "termType": "Variable",
+ "value": "x"
+ },
+ {
+ "termType": "Variable",
+ "value": "y"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/opt-filter/02-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/opt-filter/02-quads.json
new file mode 100644
index 00000000..6ee01438
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/opt-filter/02-quads.json
@@ -0,0 +1,137 @@
+{
+ "type": "project",
+ "input": {
+ "type": "leftjoin",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example/p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "v"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "y"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example/q"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "w"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ],
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "&&",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "v"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "2",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ }
+ }
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "w"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "3",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ }
+ }
+ }
+ ]
+ }
+ ]
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "v"
+ },
+ {
+ "termType": "Variable",
+ "value": "w"
+ },
+ {
+ "termType": "Variable",
+ "value": "x"
+ },
+ {
+ "termType": "Variable",
+ "value": "y"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/order/01-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/order/01-quads.json
new file mode 100644
index 00000000..54490640
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/order/01-quads.json
@@ -0,0 +1,55 @@
+{
+ "type": "project",
+ "input": {
+ "type": "orderby",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "expressions": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ },
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/order/02-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/order/02-quads.json
new file mode 100644
index 00000000..dd075c68
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/order/02-quads.json
@@ -0,0 +1,74 @@
+{
+ "type": "project",
+ "input": {
+ "type": "orderby",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "expressions": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "+",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "5",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ }
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ },
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/order/03-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/order/03-quads.json
new file mode 100644
index 00000000..54490640
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/order/03-quads.json
@@ -0,0 +1,55 @@
+{
+ "type": "project",
+ "input": {
+ "type": "orderby",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "expressions": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ },
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/order/04-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/order/04-quads.json
new file mode 100644
index 00000000..d9db9c40
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/order/04-quads.json
@@ -0,0 +1,62 @@
+{
+ "type": "project",
+ "input": {
+ "type": "orderby",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "expressions": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "desc",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ },
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/order/05-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/order/05-quads.json
new file mode 100644
index 00000000..106079c5
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/order/05-quads.json
@@ -0,0 +1,80 @@
+{
+ "type": "project",
+ "input": {
+ "type": "orderby",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "expressions": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "desc",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "named",
+ "name": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#func"
+ },
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "s"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ },
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/order/06-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/order/06-quads.json
new file mode 100644
index 00000000..313944f6
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/order/06-quads.json
@@ -0,0 +1,107 @@
+{
+ "type": "project",
+ "input": {
+ "type": "orderby",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "expressions": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "desc",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "+",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "57",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ }
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "named",
+ "name": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#func2"
+ },
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "s"
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ },
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/order/07-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/order/07-quads.json
new file mode 100644
index 00000000..49b1ad51
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/order/07-quads.json
@@ -0,0 +1,62 @@
+{
+ "type": "project",
+ "input": {
+ "type": "orderby",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "expressions": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "str",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ },
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/pat/01-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/pat/01-quads.json
new file mode 100644
index 00000000..f7112b5a
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/pat/01-quads.json
@@ -0,0 +1,8 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": []
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/pat/02-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/pat/02-quads.json
new file mode 100644
index 00000000..048c81ef
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/pat/02-quads.json
@@ -0,0 +1,102 @@
+{
+ "type": "project",
+ "input": {
+ "type": "join",
+ "input": [
+ {
+ "type": "leftjoin",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#b"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#y"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#x"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "y"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "a"
+ },
+ {
+ "termType": "Variable",
+ "value": "y"
+ },
+ {
+ "termType": "Variable",
+ "value": "z"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/pat/03-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/pat/03-quads.json
new file mode 100644
index 00000000..a10bf885
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/pat/03-quads.json
@@ -0,0 +1,128 @@
+{
+ "type": "project",
+ "input": {
+ "type": "join",
+ "input": [
+ {
+ "type": "leftjoin",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": []
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#y"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#b"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "union",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#x1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#y1"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#z1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#x2"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#y2"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#z2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "a"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/reduced/01-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/reduced/01-quads.json
new file mode 100644
index 00000000..4096c168
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/reduced/01-quads.json
@@ -0,0 +1,45 @@
+{
+ "type": "reduced",
+ "input": {
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "y"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "x"
+ },
+ {
+ "termType": "Variable",
+ "value": "y"
+ },
+ {
+ "termType": "Variable",
+ "value": "z"
+ }
+ ]
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/struct/01-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/struct/01-quads.json
new file mode 100644
index 00000000..b1118f7d
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/struct/01-quads.json
@@ -0,0 +1,17 @@
+{
+ "type": "project",
+ "input": {
+ "type": "leftjoin",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": []
+ },
+ {
+ "type": "bgp",
+ "patterns": []
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/struct/02-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/struct/02-quads.json
new file mode 100644
index 00000000..30591a3f
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/struct/02-quads.json
@@ -0,0 +1,38 @@
+{
+ "type": "project",
+ "input": {
+ "type": "leftjoin",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": []
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#b"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/struct/13-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/struct/13-quads.json
new file mode 100644
index 00000000..1f67975b
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/dawg-syntax/struct/13-quads.json
@@ -0,0 +1,119 @@
+{
+ "type": "project",
+ "input": {
+ "type": "leftjoin",
+ "input": [
+ {
+ "type": "join",
+ "input": [
+ {
+ "type": "leftjoin",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#p"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#q"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#r"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#b"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#p"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#q"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#r"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#b"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/aggregates/agg-empty-group-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/aggregates/agg-empty-group-quads.json
new file mode 100644
index 00000000..7e2ac101
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/aggregates/agg-empty-group-quads.json
@@ -0,0 +1,82 @@
+{
+ "type": "project",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "group",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "value"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "x"
+ }
+ ],
+ "aggregates": [
+ {
+ "type": "expression",
+ "subType": "aggregate",
+ "aggregator": "max",
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "value"
+ }
+ },
+ "distinct": false,
+ "variable": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ ]
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "max"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "x"
+ },
+ {
+ "termType": "Variable",
+ "value": "max"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/aggregates/avg-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/aggregates/avg-quads.json
new file mode 100644
index 00000000..89580e08
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/aggregates/avg-quads.json
@@ -0,0 +1,73 @@
+{
+ "type": "project",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "group",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/dec"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [],
+ "aggregates": [
+ {
+ "type": "expression",
+ "subType": "aggregate",
+ "aggregator": "avg",
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ },
+ "distinct": false,
+ "variable": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ ]
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "avg"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "avg"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/aggregates/avg-with-group-by-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/aggregates/avg-with-group-by-quads.json
new file mode 100644
index 00000000..1e86b2bc
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/aggregates/avg-with-group-by-quads.json
@@ -0,0 +1,112 @@
+{
+ "type": "project",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "group",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ],
+ "aggregates": [
+ {
+ "type": "expression",
+ "subType": "aggregate",
+ "aggregator": "avg",
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ },
+ "distinct": false,
+ "variable": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "<=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "2.0",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#decimal"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "avg"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "s"
+ },
+ {
+ "termType": "Variable",
+ "value": "avg"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/aggregates/count-3-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/aggregates/count-3-quads.json
new file mode 100644
index 00000000..fbd72b53
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/aggregates/count-3-quads.json
@@ -0,0 +1,112 @@
+{
+ "type": "project",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "group",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "P"
+ }
+ ],
+ "aggregates": [
+ {
+ "type": "expression",
+ "subType": "aggregate",
+ "aggregator": "count",
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "O"
+ }
+ },
+ "distinct": false,
+ "variable": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": ">",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "2",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "C"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "P"
+ },
+ {
+ "termType": "Variable",
+ "value": "C"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/aggregates/count-8b-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/aggregates/count-8b-quads.json
new file mode 100644
index 00000000..835371bb
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/aggregates/count-8b-quads.json
@@ -0,0 +1,145 @@
+{
+ "type": "project",
+ "input": {
+ "type": "orderby",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "group",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "S"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "O1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "S"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/q"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "O2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "O12"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "+",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "O1"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "O2"
+ }
+ }
+ ]
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "O12"
+ }
+ ],
+ "aggregates": [
+ {
+ "type": "expression",
+ "subType": "aggregate",
+ "aggregator": "count",
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "O1"
+ }
+ },
+ "distinct": false,
+ "variable": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ ]
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "C"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ },
+ "expressions": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "O12"
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "O12"
+ },
+ {
+ "termType": "Variable",
+ "value": "C"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/aggregates/error-in-avg-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/aggregates/error-in-avg-quads.json
new file mode 100644
index 00000000..5976243a
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/aggregates/error-in-avg-quads.json
@@ -0,0 +1,171 @@
+{
+ "type": "project",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "group",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/data/#p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "g"
+ }
+ ],
+ "aggregates": [
+ {
+ "type": "expression",
+ "subType": "aggregate",
+ "aggregator": "avg",
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "p"
+ }
+ },
+ "distinct": false,
+ "variable": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "aggregate",
+ "aggregator": "min",
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "p"
+ }
+ },
+ "distinct": false,
+ "variable": {
+ "termType": "Variable",
+ "value": "var1"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "aggregate",
+ "aggregator": "max",
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "p"
+ }
+ },
+ "distinct": false,
+ "variable": {
+ "termType": "Variable",
+ "value": "var2"
+ }
+ }
+ ]
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "avg"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "c"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "/",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "+",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "var1"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "var2"
+ }
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "2",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "g"
+ },
+ {
+ "termType": "Variable",
+ "value": "avg"
+ },
+ {
+ "termType": "Variable",
+ "value": "c"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/aggregates/group-concat-1-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/aggregates/group-concat-1-quads.json
new file mode 100644
index 00000000..60747933
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/aggregates/group-concat-1-quads.json
@@ -0,0 +1,141 @@
+{
+ "type": "ask",
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "project",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "group",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/p1"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [],
+ "aggregates": [
+ {
+ "type": "expression",
+ "subType": "aggregate",
+ "aggregator": "group_concat",
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ },
+ "separator": " ",
+ "distinct": false,
+ "variable": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ ]
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "g"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "g"
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "||",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "g"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "1 22",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ }
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "g"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "22 1",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ }
+ }
+ ]
+ }
+ ]
+ }
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/aggregates/group-concat-2-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/aggregates/group-concat-2-quads.json
new file mode 100644
index 00000000..50396824
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/aggregates/group-concat-2-quads.json
@@ -0,0 +1,458 @@
+{
+ "type": "project",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "group",
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "project",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "group",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "p"
+ }
+ ],
+ "aggregates": [
+ {
+ "type": "expression",
+ "subType": "aggregate",
+ "aggregator": "group_concat",
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ },
+ "separator": " ",
+ "distinct": false,
+ "variable": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ ]
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "g"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "g"
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "||",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "&&",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "p"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/p1"
+ }
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "||",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "g"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "1 22",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ }
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "g"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "22 1",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "&&",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "p"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/p2"
+ }
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "||",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "||",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "||",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "||",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "||",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "g"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "aaa bb c",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ }
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "g"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "aaa c bb",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "g"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "bb aaa c",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "g"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "bb c aaa",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "g"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "c aaa bb",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "g"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "c bb aaa",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ },
+ "variables": [],
+ "aggregates": [
+ {
+ "type": "expression",
+ "subType": "aggregate",
+ "aggregator": "count",
+ "expression": {
+ "type": "expression",
+ "subType": "wildcard",
+ "wildcard": {
+ "type": "wildcard"
+ }
+ },
+ "distinct": false,
+ "variable": {
+ "termType": "Variable",
+ "value": "var1"
+ }
+ }
+ ]
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "c"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "var1"
+ }
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "c"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/aggregates/group-concat-with-separator-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/aggregates/group-concat-with-separator-quads.json
new file mode 100644
index 00000000..46e130ca
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/aggregates/group-concat-with-separator-quads.json
@@ -0,0 +1,141 @@
+{
+ "type": "ask",
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "project",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "group",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/p1"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [],
+ "aggregates": [
+ {
+ "type": "expression",
+ "subType": "aggregate",
+ "aggregator": "group_concat",
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ },
+ "separator": ":",
+ "distinct": false,
+ "variable": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ ]
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "g"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "g"
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "||",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "g"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "1:22",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ }
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "g"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "22:1",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ }
+ }
+ ]
+ }
+ ]
+ }
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/aggregates/protect-from-error-in-avg-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/aggregates/protect-from-error-in-avg-quads.json
new file mode 100644
index 00000000..c41b028d
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/aggregates/protect-from-error-in-avg-quads.json
@@ -0,0 +1,141 @@
+{
+ "type": "project",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "group",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/data/#p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "g"
+ }
+ ],
+ "aggregates": [
+ {
+ "type": "expression",
+ "subType": "aggregate",
+ "aggregator": "avg",
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "if",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "isnumeric",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "p"
+ }
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "p"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "coalesce",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "named",
+ "name": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#double"
+ },
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "p"
+ }
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "0",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ }
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "distinct": false,
+ "variable": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ ]
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "avg"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "g"
+ },
+ {
+ "termType": "Variable",
+ "value": "avg"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/aggregates/sample-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/aggregates/sample-quads.json
new file mode 100644
index 00000000..9cff0f3c
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/aggregates/sample-quads.json
@@ -0,0 +1,174 @@
+{
+ "type": "ask",
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "project",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "group",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/dec"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [],
+ "aggregates": [
+ {
+ "type": "expression",
+ "subType": "aggregate",
+ "aggregator": "sample",
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ },
+ "distinct": false,
+ "variable": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ ]
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "sample"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "sample"
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "||",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "||",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "sample"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "1.0",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#decimal"
+ }
+ }
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "sample"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "2.2",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#decimal"
+ }
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "sample"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "3.5",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#decimal"
+ }
+ }
+ }
+ ]
+ }
+ ]
+ }
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/ask/group-concat-1-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/ask/group-concat-1-quads.json
new file mode 100644
index 00000000..60747933
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/ask/group-concat-1-quads.json
@@ -0,0 +1,141 @@
+{
+ "type": "ask",
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "project",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "group",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/p1"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [],
+ "aggregates": [
+ {
+ "type": "expression",
+ "subType": "aggregate",
+ "aggregator": "group_concat",
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ },
+ "separator": " ",
+ "distinct": false,
+ "variable": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ ]
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "g"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "g"
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "||",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "g"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "1 22",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ }
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "g"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "22 1",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ }
+ }
+ ]
+ }
+ ]
+ }
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/ask/in-1-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/ask/in-1-quads.json
new file mode 100644
index 00000000..610efe2a
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/ask/in-1-quads.json
@@ -0,0 +1,65 @@
+{
+ "type": "ask",
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "bgp",
+ "patterns": []
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "in",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "2",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ }
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "1",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ }
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "2",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ }
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "3",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ }
+ }
+ }
+ ]
+ }
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/ask/not-in-1-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/ask/not-in-1-quads.json
new file mode 100644
index 00000000..8fa3a32b
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/ask/not-in-1-quads.json
@@ -0,0 +1,29 @@
+{
+ "type": "ask",
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "bgp",
+ "patterns": []
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "notin",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "2",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ }
+ }
+ }
+ ]
+ }
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/ask/sparqldl-05.rq-simple-undistinguished-variable-test-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/ask/sparqldl-05.rq-simple-undistinguished-variable-test-quads.json
new file mode 100644
index 00000000..865fa029
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/ask/sparqldl-05.rq-simple-undistinguished-variable-test-quads.json
@@ -0,0 +1,28 @@
+{
+ "type": "ask",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "e_a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.org/test#Person"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/ask/sparqldl-06.rq-cycle-of-undistinguished-variables-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/ask/sparqldl-06.rq-cycle-of-undistinguished-variables-quads.json
new file mode 100644
index 00000000..2226d0d7
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/ask/sparqldl-06.rq-cycle-of-undistinguished-variables-quads.json
@@ -0,0 +1,88 @@
+{
+ "type": "ask",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/test#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/test#p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "e_aa"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "e_aa"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/test#r"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "e_dd"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "e_dd"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/test#t"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "e_bb"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "e_bb"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/test#s"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.org/test#a"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/ask/syn-pname-01-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/ask/syn-pname-01-quads.json
new file mode 100644
index 00000000..cba62ea6
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/ask/syn-pname-01-quads.json
@@ -0,0 +1,7 @@
+{
+ "type": "ask",
+ "input": {
+ "type": "bgp",
+ "patterns": []
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/bind/01-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/bind/01-quads.json
new file mode 100644
index 00000000..0b544ca2
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/bind/01-quads.json
@@ -0,0 +1,68 @@
+{
+ "type": "project",
+ "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": "10",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "z"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/bind/02-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/bind/02-quads.json
new file mode 100644
index 00000000..46a73ebf
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/bind/02-quads.json
@@ -0,0 +1,110 @@
+{
+ "type": "project",
+ "input": {
+ "type": "extend",
+ "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": "10",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "z2"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "+",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "100",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ },
+ {
+ "termType": "Variable",
+ "value": "z"
+ },
+ {
+ "termType": "Variable",
+ "value": "z2"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/bind/03-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/bind/03-quads.json
new file mode 100644
index 00000000..fc7d5061
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/bind/03-quads.json
@@ -0,0 +1,102 @@
+{
+ "type": "project",
+ "input": {
+ "type": "join",
+ "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"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s1"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p1"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "z"
+ },
+ {
+ "termType": "Variable",
+ "value": "s1"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/bind/04-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/bind/04-quads.json
new file mode 100644
index 00000000..9c3ce9f0
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/bind/04-quads.json
@@ -0,0 +1,61 @@
+{
+ "type": "project",
+ "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": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "nova"
+ }
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ },
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ },
+ {
+ "termType": "Variable",
+ "value": "z"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/bind/05-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/bind/05-quads.json
new file mode 100644
index 00000000..5d0d50ec
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/bind/05-quads.json
@@ -0,0 +1,110 @@
+{
+ "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"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/bind/07-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/bind/07-quads.json
new file mode 100644
index 00000000..130d3532
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/bind/07-quads.json
@@ -0,0 +1,132 @@
+{
+ "type": "project",
+ "input": {
+ "type": "join",
+ "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": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "union",
+ "input": [
+ {
+ "type": "extend",
+ "input": {
+ "type": "bgp",
+ "patterns": []
+ },
+ "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"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "type": "extend",
+ "input": {
+ "type": "bgp",
+ "patterns": []
+ },
+ "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": "2",
+ "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"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/bind/08-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/bind/08-quads.json
new file mode 100644
index 00000000..5d0d50ec
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/bind/08-quads.json
@@ -0,0 +1,110 @@
+{
+ "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"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/bind/10-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/bind/10-quads.json
new file mode 100644
index 00000000..8435a129
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/bind/10-quads.json
@@ -0,0 +1,96 @@
+{
+ "type": "project",
+ "input": {
+ "type": "join",
+ "input": [
+ {
+ "type": "extend",
+ "input": {
+ "type": "bgp",
+ "patterns": []
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "z"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "4",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ }
+ }
+ }
+ },
+ {
+ "type": "filter",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "v"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "v"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "z"
+ }
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "s"
+ },
+ {
+ "termType": "Variable",
+ "value": "v"
+ },
+ {
+ "termType": "Variable",
+ "value": "z"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/bind/11-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/bind/11-quads.json
new file mode 100644
index 00000000..98d3b627
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/bind/11-quads.json
@@ -0,0 +1,96 @@
+{
+ "type": "project",
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "join",
+ "input": [
+ {
+ "type": "extend",
+ "input": {
+ "type": "bgp",
+ "patterns": []
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "z"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "4",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ }
+ }
+ }
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "v"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "v"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "z"
+ }
+ }
+ ]
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "s"
+ },
+ {
+ "termType": "Variable",
+ "value": "v"
+ },
+ {
+ "termType": "Variable",
+ "value": "z"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/construct/construct-from-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/construct/construct-from-quads.json
new file mode 100644
index 00000000..dd3dfe7c
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/construct/construct-from-quads.json
@@ -0,0 +1,65 @@
+{
+ "type": "from",
+ "input": {
+ "type": "slice",
+ "input": {
+ "type": "construct",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "template": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "start": 0,
+ "length": 100
+ },
+ "default": [
+ {
+ "termType": "NamedNode",
+ "value": "http://example.com/data"
+ }
+ ],
+ "named": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/construct/construct-slice-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/construct/construct-slice-quads.json
new file mode 100644
index 00000000..9bded160
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/construct/construct-slice-quads.json
@@ -0,0 +1,55 @@
+{
+ "type": "slice",
+ "input": {
+ "type": "construct",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "template": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "start": 0,
+ "length": 100
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/construct/constructwhere01-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/construct/constructwhere01-quads.json
new file mode 100644
index 00000000..c55afa28
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/construct/constructwhere01-quads.json
@@ -0,0 +1,50 @@
+{
+ "type": "construct",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "template": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/construct/constructwhere02-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/construct/constructwhere02-quads.json
new file mode 100644
index 00000000..0bc95dd6
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/construct/constructwhere02-quads.json
@@ -0,0 +1,90 @@
+{
+ "type": "construct",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/s1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s2"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "template": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/s1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s2"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/construct/constructwhere03-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/construct/constructwhere03-quads.json
new file mode 100644
index 00000000..707122ca
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/construct/constructwhere03-quads.json
@@ -0,0 +1,90 @@
+{
+ "type": "construct",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/s2"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/s2"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "template": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/s2"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/s2"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/construct/constructwhere05-modified-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/construct/constructwhere05-modified-quads.json
new file mode 100644
index 00000000..a03e854d
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/construct/constructwhere05-modified-quads.json
@@ -0,0 +1,76 @@
+{
+ "type": "construct",
+ "input": {
+ "type": "filter",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "NamedNode",
+ "value": "http://example.org/o1"
+ }
+ }
+ ]
+ }
+ },
+ "template": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/construct/constructwhere06-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/construct/constructwhere06-quads.json
new file mode 100644
index 00000000..154da845
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/construct/constructwhere06-quads.json
@@ -0,0 +1,50 @@
+{
+ "type": "construct",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "e_s_b"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "e_o_b"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "template": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "e_s_b"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "BlankNode",
+ "value": "e_o_b"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/delete/delete-with-02.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/delete/delete-with-02.json
new file mode 100644
index 00000000..07927ef9
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/delete/delete-with-02.json
@@ -0,0 +1,84 @@
+{
+ "type": "deleteinsert",
+ "delete": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example.org/g1"
+ }
+ }
+ ],
+ "where": {
+ "type": "graph",
+ "input": {
+ "type": "graph",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/knows"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "name": {
+ "termType": "NamedNode",
+ "value": "http://example.org/g1"
+ }
+ },
+ "name": {
+ "termType": "NamedNode",
+ "value": "http://example.org/g2"
+ }
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/delete/delete-with-03-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/delete/delete-with-03-quads.json
new file mode 100644
index 00000000..2d8afb2a
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/delete/delete-with-03-quads.json
@@ -0,0 +1,70 @@
+{
+ "type": "deleteinsert",
+ "delete": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example.org/g2"
+ }
+ }
+ ],
+ "where": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/knows"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example.org/g1"
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example.org/g1"
+ }
+ }
+ ]
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/delete/delete-with-03.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/delete/delete-with-03.json
new file mode 100644
index 00000000..fc02d376
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/delete/delete-with-03.json
@@ -0,0 +1,84 @@
+{
+ "type": "deleteinsert",
+ "delete": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example.org/g2"
+ }
+ }
+ ],
+ "where": {
+ "type": "graph",
+ "input": {
+ "type": "graph",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/knows"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "name": {
+ "termType": "NamedNode",
+ "value": "http://example.org/g1"
+ }
+ },
+ "name": {
+ "termType": "NamedNode",
+ "value": "http://example.org/g2"
+ }
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/exists/nested-negative-exists-in-positive-exists-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/exists/nested-negative-exists-in-positive-exists-quads.json
new file mode 100644
index 00000000..c81d2577
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/exists/nested-negative-exists-in-positive-exists-quads.json
@@ -0,0 +1,104 @@
+{
+ "type": "project",
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "existence",
+ "not": false,
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/o1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "existence",
+ "not": true,
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/o2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/exists/nested-positive-exists-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/exists/nested-positive-exists-quads.json
new file mode 100644
index 00000000..6be0fbc6
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/exists/nested-positive-exists-quads.json
@@ -0,0 +1,104 @@
+{
+ "type": "project",
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "existence",
+ "not": false,
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/o1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "existence",
+ "not": false,
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/o2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/functions/bnode-str-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/functions/bnode-str-quads.json
new file mode 100644
index 00000000..86a76b90
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/functions/bnode-str-quads.json
@@ -0,0 +1,226 @@
+{
+ "type": "project",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/str"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "s1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "b"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/str"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "s2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "&&",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "||",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "a"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "NamedNode",
+ "value": "http://example.org/s1"
+ }
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "a"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "NamedNode",
+ "value": "http://example.org/s3"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "||",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "b"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "NamedNode",
+ "value": "http://example.org/s1"
+ }
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "b"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "NamedNode",
+ "value": "http://example.org/s3"
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "b1"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "bnode",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "s1"
+ }
+ }
+ ]
+ }
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "b2"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "bnode",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "s2"
+ }
+ }
+ ]
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "s1"
+ },
+ {
+ "termType": "Variable",
+ "value": "s2"
+ },
+ {
+ "termType": "Variable",
+ "value": "b1"
+ },
+ {
+ "termType": "Variable",
+ "value": "b2"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/functions/now-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/functions/now-quads.json
new file mode 100644
index 00000000..75aa2b1c
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/functions/now-quads.json
@@ -0,0 +1,53 @@
+{
+ "type": "ask",
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "bgp",
+ "patterns": []
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "n"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "now",
+ "args": []
+ }
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "datatype",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "n"
+ }
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#dateTime"
+ }
+ }
+ ]
+ }
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/functions/strlang-str-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/functions/strlang-str-quads.json
new file mode 100644
index 00000000..7e3c87ca
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/functions/strlang-str-quads.json
@@ -0,0 +1,116 @@
+{
+ "type": "project",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/str"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "str"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "langmatches",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "lang",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "str"
+ }
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "en",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "s2"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "strlang",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "str",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "str"
+ }
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "en-US",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "s"
+ },
+ {
+ "termType": "Variable",
+ "value": "s2"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/group/01-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/group/01-quads.json
new file mode 100644
index 00000000..7db4ae79
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/group/01-quads.json
@@ -0,0 +1,44 @@
+{
+ "type": "project",
+ "input": {
+ "type": "group",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example/p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "v"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ],
+ "aggregates": []
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/group/03-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/group/03-quads.json
new file mode 100644
index 00000000..acf7d314
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/group/03-quads.json
@@ -0,0 +1,112 @@
+{
+ "type": "project",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "group",
+ "input": {
+ "type": "leftjoin",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example/p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "v"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example/q"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "w"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "w"
+ }
+ ],
+ "aggregates": [
+ {
+ "type": "expression",
+ "subType": "aggregate",
+ "aggregator": "sample",
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "v"
+ }
+ },
+ "distinct": false,
+ "variable": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ ]
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "S"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "w"
+ },
+ {
+ "termType": "Variable",
+ "value": "S"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/group/04-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/group/04-quads.json
new file mode 100644
index 00000000..c68d680a
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/group/04-quads.json
@@ -0,0 +1,146 @@
+{
+ "type": "project",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "group",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "leftjoin",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example/p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "v"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example/q"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "w"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "X"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "coalesce",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "w"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "1605-11-05",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#date"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "X"
+ }
+ ],
+ "aggregates": [
+ {
+ "type": "expression",
+ "subType": "aggregate",
+ "aggregator": "sample",
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "v"
+ }
+ },
+ "distinct": false,
+ "variable": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ ]
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "S"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "X"
+ },
+ {
+ "termType": "Variable",
+ "value": "S"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/negation/calculate-which-sets-have-the-same-elements-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/negation/calculate-which-sets-have-the-same-elements-quads.json
new file mode 100644
index 00000000..07a62d5d
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/negation/calculate-which-sets-have-the-same-elements-quads.json
@@ -0,0 +1,307 @@
+{
+ "type": "distinct",
+ "input": {
+ "type": "project",
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "minus",
+ "input": [
+ {
+ "type": "minus",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s2"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example/Set"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example/Set"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "filter",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example/Set"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s2"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example/Set"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example/member"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "existence",
+ "not": true,
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s2"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example/member"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ {
+ "type": "filter",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example/Set"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s2"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example/Set"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s2"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example/member"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "existence",
+ "not": true,
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example/member"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "<",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "str",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "s1"
+ }
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "str",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "s2"
+ }
+ }
+ ]
+ }
+ ]
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "s1"
+ },
+ {
+ "termType": "Variable",
+ "value": "s2"
+ }
+ ]
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/negation/medical-temporal-proximity-by-exclusion-not-exists-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/negation/medical-temporal-proximity-by-exclusion-not-exists-quads.json
new file mode 100644
index 00000000..b4c4f20a
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/negation/medical-temporal-proximity-by-exclusion-not-exists-quads.json
@@ -0,0 +1,191 @@
+{
+ "type": "project",
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "exam"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2009/sparql/docs/tests/data-sparql11/negation#PhysicalExamination"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "exam"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://purl.org/dc/elements/1.1/date"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "date"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "exam"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2009/sparql/docs/tests/data-sparql11/negation#precedes"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2009/sparql/docs/tests/data-sparql11/negation#operation1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "op"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2009/sparql/docs/tests/data-sparql11/negation#SurgicalProcedure"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "op"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://purl.org/dc/elements/1.1/date"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "opDT"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "existence",
+ "not": true,
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "otherExam"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2009/sparql/docs/tests/data-sparql11/negation#PhysicalExamination"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "otherExam"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2009/sparql/docs/tests/data-sparql11/negation#follows"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "exam"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "otherExam"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2009/sparql/docs/tests/data-sparql11/negation#precedes"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2009/sparql/docs/tests/data-sparql11/negation#operation1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "exam"
+ },
+ {
+ "termType": "Variable",
+ "value": "date"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/negation/simple-minus-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/negation/simple-minus-quads.json
new file mode 100644
index 00000000..7c7c7be9
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/negation/simple-minus-quads.json
@@ -0,0 +1,68 @@
+{
+ "type": "project",
+ "input": {
+ "type": "minus",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "uri"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2004/02/skos/core#prefLabel"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "prefLabel"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "uri"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2004/02/skos/core#broader"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "https://test.com/"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "prefLabel"
+ },
+ {
+ "termType": "Variable",
+ "value": "uri"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/negation/subtraction-with-minus-from-a-fully-bound-minuend-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/negation/subtraction-with-minus-from-a-fully-bound-minuend-quads.json
new file mode 100644
index 00000000..c121e4c1
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/negation/subtraction-with-minus-from-a-fully-bound-minuend-quads.json
@@ -0,0 +1,165 @@
+{
+ "type": "project",
+ "input": {
+ "type": "orderby",
+ "input": {
+ "type": "minus",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example/p1"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "b"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example/p2"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "leftjoin",
+ "input": [
+ {
+ "type": "leftjoin",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "d"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example/Sub"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "d"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example/q1"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "b"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "d"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example/q2"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ "expressions": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "a"
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "a"
+ },
+ {
+ "termType": "Variable",
+ "value": "b"
+ },
+ {
+ "termType": "Variable",
+ "value": "c"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/negation/subtraction-with-minus-from-a-partially-bound-minuend-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/negation/subtraction-with-minus-from-a-partially-bound-minuend-quads.json
new file mode 100644
index 00000000..dfdec0c3
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/negation/subtraction-with-minus-from-a-partially-bound-minuend-quads.json
@@ -0,0 +1,205 @@
+{
+ "type": "project",
+ "input": {
+ "type": "orderby",
+ "input": {
+ "type": "minus",
+ "input": [
+ {
+ "type": "leftjoin",
+ "input": [
+ {
+ "type": "leftjoin",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example/Min"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example/p1"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "b"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example/p2"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "leftjoin",
+ "input": [
+ {
+ "type": "leftjoin",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "d"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example/Sub"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "d"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example/q1"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "b"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "d"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example/q2"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ "expressions": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "a"
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "a"
+ },
+ {
+ "termType": "Variable",
+ "value": "b"
+ },
+ {
+ "termType": "Variable",
+ "value": "c"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/paths/01-simple-path-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/paths/01-simple-path-quads.json
new file mode 100644
index 00000000..11cc1f67
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/paths/01-simple-path-quads.json
@@ -0,0 +1,74 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/instance#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/schema#p1"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "var0"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "var0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/schema#p2"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "var1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "var1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/schema#p3"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "x"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/paths/02-star-path-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/paths/02-star-path-quads.json
new file mode 100644
index 00000000..44377d96
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/paths/02-star-path-quads.json
@@ -0,0 +1,53 @@
+{
+ "type": "project",
+ "input": {
+ "type": "path",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/instance#a"
+ },
+ "predicate": {
+ "type": "ZeroOrMorePath",
+ "path": {
+ "type": "seq",
+ "input": [
+ {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/schema#p1"
+ }
+ },
+ {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/schema#p2"
+ }
+ },
+ {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/schema#p3"
+ }
+ }
+ ]
+ }
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "x"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/paths/08-reverse-path-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/paths/08-reverse-path-quads.json
new file mode 100644
index 00000000..83437c53
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/paths/08-reverse-path-quads.json
@@ -0,0 +1,28 @@
+{
+ "type": "ask",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/instance#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/schema#p"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/instance#b"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/paths/09-reverse-sequence-path-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/paths/09-reverse-sequence-path-quads.json
new file mode 100644
index 00000000..f1eb8a73
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/paths/09-reverse-sequence-path-quads.json
@@ -0,0 +1,54 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/schema#p1"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "var0"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "var0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/schema#p2"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/instance#c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "x"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/paths/10-path-with-negation-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/paths/10-path-with-negation-quads.json
new file mode 100644
index 00000000..451a2339
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/paths/10-path-with-negation-quads.json
@@ -0,0 +1,37 @@
+{
+ "type": "project",
+ "input": {
+ "type": "path",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/instance#a"
+ },
+ "predicate": {
+ "type": "nps",
+ "iris": [
+ {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/schema#p1"
+ },
+ {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/schema#p2"
+ }
+ ]
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "x"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/paths/12-variable-length-path-and-two-paths-to-same-target-node-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/paths/12-variable-length-path-and-two-paths-to-same-target-node-quads.json
new file mode 100644
index 00000000..82aa2465
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/paths/12-variable-length-path-and-two-paths-to-same-target-node-quads.json
@@ -0,0 +1,46 @@
+{
+ "type": "project",
+ "input": {
+ "type": "path",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/instance#a"
+ },
+ "predicate": {
+ "type": "OneOrMorePath",
+ "path": {
+ "type": "seq",
+ "input": [
+ {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/schema#p1"
+ }
+ },
+ {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/schema#p2"
+ }
+ }
+ ]
+ }
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "x"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/paths/14-star-path-over-foaf-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/paths/14-star-path-over-foaf-quads.json
new file mode 100644
index 00000000..04526770
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/paths/14-star-path-over-foaf-quads.json
@@ -0,0 +1,59 @@
+{
+ "type": "project",
+ "input": {
+ "type": "orderby",
+ "input": {
+ "type": "path",
+ "subject": {
+ "termType": "Variable",
+ "value": "X"
+ },
+ "predicate": {
+ "type": "ZeroOrMorePath",
+ "path": {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/knows"
+ }
+ }
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "Y"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "expressions": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "X"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "Y"
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "X"
+ },
+ {
+ "termType": "Variable",
+ "value": "Y"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/paths/14-star-path-over-foafknows-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/paths/14-star-path-over-foafknows-quads.json
new file mode 100644
index 00000000..04526770
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/paths/14-star-path-over-foafknows-quads.json
@@ -0,0 +1,59 @@
+{
+ "type": "project",
+ "input": {
+ "type": "orderby",
+ "input": {
+ "type": "path",
+ "subject": {
+ "termType": "Variable",
+ "value": "X"
+ },
+ "predicate": {
+ "type": "ZeroOrMorePath",
+ "path": {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/knows"
+ }
+ }
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "Y"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "expressions": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "X"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "Y"
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "X"
+ },
+ {
+ "termType": "Variable",
+ "value": "Y"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/paths/28a-diamond-with-loop-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/paths/28a-diamond-with-loop-quads.json
new file mode 100644
index 00000000..62938da0
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/paths/28a-diamond-with-loop-quads.json
@@ -0,0 +1,46 @@
+{
+ "type": "project",
+ "input": {
+ "type": "path",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example/a"
+ },
+ "predicate": {
+ "type": "ZeroOrOnePath",
+ "path": {
+ "type": "seq",
+ "input": [
+ {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://example/p"
+ }
+ },
+ {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://example/p"
+ }
+ }
+ ]
+ }
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "t"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "t"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/paths/30-operator-precedence-1-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/paths/30-operator-precedence-1-quads.json
new file mode 100644
index 00000000..e1ea7b85
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/paths/30-operator-precedence-1-quads.json
@@ -0,0 +1,62 @@
+{
+ "type": "project",
+ "input": {
+ "type": "path",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/a"
+ },
+ "predicate": {
+ "type": "alt",
+ "input": [
+ {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/p1"
+ }
+ },
+ {
+ "type": "seq",
+ "input": [
+ {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/p2"
+ }
+ },
+ {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/p3"
+ }
+ }
+ ]
+ },
+ {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/p4"
+ }
+ }
+ ]
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "t"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "t"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/paths/31-operator-precedence-2-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/paths/31-operator-precedence-2-quads.json
new file mode 100644
index 00000000..d03e78f7
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/paths/31-operator-precedence-2-quads.json
@@ -0,0 +1,82 @@
+{
+ "type": "project",
+ "input": {
+ "type": "join",
+ "input": [
+ {
+ "type": "path",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/a"
+ },
+ "predicate": {
+ "type": "alt",
+ "input": [
+ {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/p1"
+ }
+ },
+ {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/p2"
+ }
+ }
+ ]
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "var0"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "path",
+ "subject": {
+ "termType": "Variable",
+ "value": "var0"
+ },
+ "predicate": {
+ "type": "alt",
+ "input": [
+ {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/p3"
+ }
+ },
+ {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/p4"
+ }
+ }
+ ]
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "t"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "t"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/paths/32-operator-precedence-3-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/paths/32-operator-precedence-3-quads.json
new file mode 100644
index 00000000..7b22d376
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/paths/32-operator-precedence-3-quads.json
@@ -0,0 +1,65 @@
+{
+ "type": "project",
+ "input": {
+ "type": "path",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/a"
+ },
+ "predicate": {
+ "type": "alt",
+ "input": [
+ {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/p0"
+ }
+ },
+ {
+ "type": "seq",
+ "input": [
+ {
+ "type": "inv",
+ "path": {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/p1"
+ }
+ }
+ },
+ {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/p2"
+ }
+ }
+ ]
+ },
+ {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/p3"
+ }
+ }
+ ]
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "t"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "t"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/paths/33-operator-precedence-4-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/paths/33-operator-precedence-4-quads.json
new file mode 100644
index 00000000..75418d8c
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/paths/33-operator-precedence-4-quads.json
@@ -0,0 +1,70 @@
+{
+ "type": "project",
+ "input": {
+ "type": "path",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/a"
+ },
+ "predicate": {
+ "type": "alt",
+ "input": [
+ {
+ "type": "seq",
+ "input": [
+ {
+ "type": "alt",
+ "input": [
+ {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/p0"
+ }
+ },
+ {
+ "type": "inv",
+ "path": {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/p1"
+ }
+ }
+ }
+ ]
+ },
+ {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/p2"
+ }
+ }
+ ]
+ },
+ {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/p3"
+ }
+ }
+ ]
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "t"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "t"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/paths/37-nested-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/paths/37-nested-quads.json
new file mode 100644
index 00000000..3b9c839f
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/paths/37-nested-quads.json
@@ -0,0 +1,50 @@
+{
+ "type": "project",
+ "input": {
+ "type": "orderby",
+ "input": {
+ "type": "path",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/A0"
+ },
+ "predicate": {
+ "type": "ZeroOrMorePath",
+ "path": {
+ "type": "ZeroOrMorePath",
+ "path": {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://example.org/P"
+ }
+ }
+ }
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "X"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "expressions": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "X"
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "X"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/paths/path-union-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/paths/path-union-quads.json
new file mode 100644
index 00000000..a94af203
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/paths/path-union-quads.json
@@ -0,0 +1,98 @@
+{
+ "type": "project",
+ "input": {
+ "type": "union",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "item"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.wikidata.org/prop/direct/P31"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.wikidata.org/entity/Q486972"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "join",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "item"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.wikidata.org/prop/direct/P31"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "instanceOf"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "path",
+ "subject": {
+ "termType": "Variable",
+ "value": "instanceOf"
+ },
+ "predicate": {
+ "type": "OneOrMorePath",
+ "path": {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://www.wikidata.org/prop/direct/P279"
+ }
+ }
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.wikidata.org/entity/Q486972"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "instanceOf"
+ },
+ {
+ "termType": "Variable",
+ "value": "item"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/service/service01-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/service/service01-quads.json
new file mode 100644
index 00000000..30d0f9ac
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/service/service01-quads.json
@@ -0,0 +1,80 @@
+{
+ "type": "project",
+ "input": {
+ "type": "join",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p1"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "service",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p2"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "name": {
+ "termType": "NamedNode",
+ "value": "http://example.org/sparql"
+ },
+ "silent": false
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "s"
+ },
+ {
+ "termType": "Variable",
+ "value": "o1"
+ },
+ {
+ "termType": "Variable",
+ "value": "o2"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/service/service02-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/service/service02-quads.json
new file mode 100644
index 00000000..37509a0b
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/service/service02-quads.json
@@ -0,0 +1,88 @@
+{
+ "type": "project",
+ "input": {
+ "type": "leftjoin",
+ "input": [
+ {
+ "type": "service",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "name": {
+ "termType": "NamedNode",
+ "value": "http://example1.org/sparql"
+ },
+ "silent": false
+ },
+ {
+ "type": "service",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p2"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "name": {
+ "termType": "NamedNode",
+ "value": "http://example2.org/sparql"
+ },
+ "silent": false
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "s"
+ },
+ {
+ "termType": "Variable",
+ "value": "o1"
+ },
+ {
+ "termType": "Variable",
+ "value": "o2"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/service/service03-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/service/service03-quads.json
new file mode 100644
index 00000000..463994c5
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/service/service03-quads.json
@@ -0,0 +1,88 @@
+{
+ "type": "project",
+ "input": {
+ "type": "service",
+ "input": {
+ "type": "leftjoin",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "service",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p2"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "name": {
+ "termType": "NamedNode",
+ "value": "http://example2.org/sparql"
+ },
+ "silent": false
+ }
+ ]
+ },
+ "name": {
+ "termType": "NamedNode",
+ "value": "http://example1.org/sparql"
+ },
+ "silent": false
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "s"
+ },
+ {
+ "termType": "Variable",
+ "value": "o1"
+ },
+ {
+ "termType": "Variable",
+ "value": "o2"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/service/service04-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/service/service04-quads.json
new file mode 100644
index 00000000..a6804739
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/service/service04-quads.json
@@ -0,0 +1,102 @@
+{
+ "type": "project",
+ "input": {
+ "type": "join",
+ "input": [
+ {
+ "type": "leftjoin",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p1"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "service",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/knows"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "name": {
+ "termType": "NamedNode",
+ "value": "http://example.org/sparql"
+ },
+ "silent": false
+ }
+ ]
+ },
+ {
+ "type": "values",
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o2"
+ }
+ ],
+ "bindings": [
+ {
+ "o2": {
+ "termType": "NamedNode",
+ "value": "http://example.org/b"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "s"
+ },
+ {
+ "termType": "Variable",
+ "value": "o1"
+ },
+ {
+ "termType": "Variable",
+ "value": "o2"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/service/service05-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/service/service05-quads.json
new file mode 100644
index 00000000..86ba7859
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/service/service05-quads.json
@@ -0,0 +1,126 @@
+{
+ "type": "project",
+ "input": {
+ "type": "join",
+ "input": [
+ {
+ "type": "filter",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://purl.org/dc/elements/1.1/subject"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "projectSubject"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://rdfs.org/ns/void#sparqlEndpoint"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "service"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "regex",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "projectSubject"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "remote",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "type": "service",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "project"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://usefulinc.com/ns/doap#name"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "title"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "name": {
+ "termType": "Variable",
+ "value": "service"
+ },
+ "silent": false
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "service"
+ },
+ {
+ "termType": "Variable",
+ "value": "title"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/service/service06-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/service/service06-quads.json
new file mode 100644
index 00000000..52c7932b
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/service/service06-quads.json
@@ -0,0 +1,88 @@
+{
+ "type": "project",
+ "input": {
+ "type": "service",
+ "input": {
+ "type": "leftjoin",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "service",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p2"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "name": {
+ "termType": "NamedNode",
+ "value": "http://invalid.endpoint.org/sparql"
+ },
+ "silent": true
+ }
+ ]
+ },
+ "name": {
+ "termType": "NamedNode",
+ "value": "http://example1.org/sparql"
+ },
+ "silent": false
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "s"
+ },
+ {
+ "termType": "Variable",
+ "value": "o1"
+ },
+ {
+ "termType": "Variable",
+ "value": "o2"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/service/service07-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/service/service07-quads.json
new file mode 100644
index 00000000..e2e30718
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/service/service07-quads.json
@@ -0,0 +1,80 @@
+{
+ "type": "project",
+ "input": {
+ "type": "join",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "service",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p2"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "name": {
+ "termType": "NamedNode",
+ "value": "http://invalid.endpoint.org/sparql"
+ },
+ "silent": true
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "s"
+ },
+ {
+ "termType": "Variable",
+ "value": "o1"
+ },
+ {
+ "termType": "Variable",
+ "value": "o2"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/subqueries/06-subquery-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/subqueries/06-subquery-quads.json
new file mode 100644
index 00000000..50b54865
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/subqueries/06-subquery-quads.json
@@ -0,0 +1,51 @@
+{
+ "type": "project",
+ "input": {
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "y"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "x"
+ },
+ {
+ "termType": "Variable",
+ "value": "y"
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "x"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/subqueries/08-subquery-with-aggregate-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/subqueries/08-subquery-with-aggregate-quads.json
new file mode 100644
index 00000000..d7dcad97
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/subqueries/08-subquery-with-aggregate-quads.json
@@ -0,0 +1,116 @@
+{
+ "type": "project",
+ "input": {
+ "type": "join",
+ "input": [
+ {
+ "type": "project",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "group",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/schema#p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "y"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [],
+ "aggregates": [
+ {
+ "type": "expression",
+ "subType": "aggregate",
+ "aggregator": "max",
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "y"
+ }
+ },
+ "distinct": false,
+ "variable": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ ]
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "max"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "max"
+ }
+ ]
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/schema#p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "max"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "x"
+ },
+ {
+ "termType": "Variable",
+ "value": "max"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/subqueries/09-nested-subqueries-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/subqueries/09-nested-subqueries-quads.json
new file mode 100644
index 00000000..e851a62d
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/subqueries/09-nested-subqueries-quads.json
@@ -0,0 +1,86 @@
+{
+ "type": "project",
+ "input": {
+ "type": "join",
+ "input": [
+ {
+ "type": "project",
+ "input": {
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/schema#q"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "t"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "x"
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "x"
+ }
+ ]
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/schema#p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "y"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "x"
+ },
+ {
+ "termType": "Variable",
+ "value": "y"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/subqueries/11-subquery-limit-per-resource-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/subqueries/11-subquery-limit-per-resource-quads.json
new file mode 100644
index 00000000..f1d0f6a0
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/subqueries/11-subquery-limit-per-resource-quads.json
@@ -0,0 +1,127 @@
+{
+ "type": "project",
+ "input": {
+ "type": "orderby",
+ "input": {
+ "type": "join",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2000/01/rdf-schema#label"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "L"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "O"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.example.orghasItem"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "g_0"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "slice",
+ "input": {
+ "type": "distinct",
+ "input": {
+ "type": "project",
+ "input": {
+ "type": "orderby",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "O"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.example.orgOrder"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "expressions": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "O"
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "O"
+ }
+ ]
+ }
+ },
+ "start": 0,
+ "length": 2
+ }
+ ]
+ },
+ "expressions": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "L"
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "L"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/syntax/aggregate-15-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/syntax/aggregate-15-quads.json
new file mode 100644
index 00000000..75624028
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/syntax/aggregate-15-quads.json
@@ -0,0 +1,53 @@
+{
+ "type": "project",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "group",
+ "input": {
+ "type": "bgp",
+ "patterns": []
+ },
+ "variables": [],
+ "aggregates": [
+ {
+ "type": "expression",
+ "subType": "aggregate",
+ "aggregator": "group_concat",
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "x"
+ }
+ },
+ "separator": ";",
+ "distinct": false,
+ "variable": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ ]
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "y"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "y"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/syntax/bindscope1-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/syntax/bindscope1-quads.json
new file mode 100644
index 00000000..fc48b935
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/syntax/bindscope1-quads.json
@@ -0,0 +1,102 @@
+{
+ "type": "project",
+ "input": {
+ "type": "join",
+ "input": [
+ {
+ "type": "extend",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://www.example.orgs"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.example.orgp"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "o1"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "+",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "1",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ }
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://www.example.orgs"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.example.orgq"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ },
+ {
+ "termType": "Variable",
+ "value": "o1"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/syntax/syntax-oneof-01-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/syntax/syntax-oneof-01-quads.json
new file mode 100644
index 00000000..ecdf2b37
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/syntax/syntax-oneof-01-quads.json
@@ -0,0 +1,111 @@
+{
+ "type": "project",
+ "input": {
+ "type": "filter",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "notin",
+ "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"
+ }
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "2",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ }
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "+",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "s"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "57",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ }
+ }
+ }
+ ]
+ }
+ ]
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ },
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/syntax/syntax-oneof-03-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/syntax/syntax-oneof-03-quads.json
new file mode 100644
index 00000000..8d2b15ab
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/syntax/syntax-oneof-03-quads.json
@@ -0,0 +1,80 @@
+{
+ "type": "project",
+ "input": {
+ "type": "filter",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "in",
+ "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"
+ }
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "NamedNode",
+ "value": "x:x"
+ }
+ }
+ ]
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ },
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/syntax/syntax-subquery-02-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/syntax/syntax-subquery-02-quads.json
new file mode 100644
index 00000000..84c54ac1
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/syntax/syntax-subquery-02-quads.json
@@ -0,0 +1,59 @@
+{
+ "type": "project",
+ "input": {
+ "type": "project",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ },
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ },
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/values/01-bind-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/values/01-bind-quads.json
new file mode 100644
index 00000000..696ed8e9
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/values/01-bind-quads.json
@@ -0,0 +1,84 @@
+{
+ "type": "project",
+ "input": {
+ "type": "join",
+ "input": [
+ {
+ "type": "values",
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "book"
+ }
+ ],
+ "bindings": [
+ {
+ "book": {
+ "termType": "NamedNode",
+ "value": "http://example.org/book/book1"
+ }
+ }
+ ]
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "book"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://purl.org/dc/elements/1.1/title"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "title"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "book"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#price"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "price"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "book"
+ },
+ {
+ "termType": "Variable",
+ "value": "title"
+ },
+ {
+ "termType": "Variable",
+ "value": "price"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/values/post-query-values-with-2-obj-vars-1-row-with-undef-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/values/post-query-values-with-2-obj-vars-1-row-with-undef-quads.json
new file mode 100644
index 00000000..b03aa727
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/values/post-query-values-with-2-obj-vars-1-row-with-undef-quads.json
@@ -0,0 +1,92 @@
+{
+ "type": "project",
+ "input": {
+ "type": "join",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p1"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p2"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "values",
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o1"
+ },
+ {
+ "termType": "Variable",
+ "value": "o2"
+ }
+ ],
+ "bindings": [
+ {
+ "o1": {
+ "termType": "Literal",
+ "value": "Alan",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "s"
+ },
+ {
+ "termType": "Variable",
+ "value": "o1"
+ },
+ {
+ "termType": "Variable",
+ "value": "o2"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/values/post-query-values-with-2-obj-vars-2-rows-with-undef-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/values/post-query-values-with-2-obj-vars-2-rows-with-undef-quads.json
new file mode 100644
index 00000000..e3db1304
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/values/post-query-values-with-2-obj-vars-2-rows-with-undef-quads.json
@@ -0,0 +1,98 @@
+{
+ "type": "project",
+ "input": {
+ "type": "join",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p1"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p2"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "values",
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o1"
+ },
+ {
+ "termType": "Variable",
+ "value": "o2"
+ }
+ ],
+ "bindings": [
+ {
+ "o2": {
+ "termType": "Literal",
+ "value": "Alan",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ }
+ },
+ {
+ "o1": {
+ "termType": "NamedNode",
+ "value": "http://example.org/b"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "s"
+ },
+ {
+ "termType": "Variable",
+ "value": "o1"
+ },
+ {
+ "termType": "Variable",
+ "value": "o2"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/values/post-query-values-with-optional-obj-var-1-row-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/values/post-query-values-with-optional-obj-var-1-row-quads.json
new file mode 100644
index 00000000..43067ff4
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/values/post-query-values-with-optional-obj-var-1-row-quads.json
@@ -0,0 +1,94 @@
+{
+ "type": "project",
+ "input": {
+ "type": "join",
+ "input": [
+ {
+ "type": "leftjoin",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p1"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/knows"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "values",
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o2"
+ }
+ ],
+ "bindings": [
+ {
+ "o2": {
+ "termType": "NamedNode",
+ "value": "http://example.org/b"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "s"
+ },
+ {
+ "termType": "Variable",
+ "value": "o1"
+ },
+ {
+ "termType": "Variable",
+ "value": "o2"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/values/post-query-values-with-subj-var-1-row-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/values/post-query-values-with-subj-var-1-row-quads.json
new file mode 100644
index 00000000..c4202e0c
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/values/post-query-values-with-subj-var-1-row-quads.json
@@ -0,0 +1,84 @@
+{
+ "type": "project",
+ "input": {
+ "type": "join",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "book"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://purl.org/dc/elements/1.1/title"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "title"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "book"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#price"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "price"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "values",
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "book"
+ }
+ ],
+ "bindings": [
+ {
+ "book": {
+ "termType": "NamedNode",
+ "value": "http://example.org/book/book1"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "book"
+ },
+ {
+ "termType": "Variable",
+ "value": "title"
+ },
+ {
+ "termType": "Variable",
+ "value": "price"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/values/post-subquery-values-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/values/post-subquery-values-quads.json
new file mode 100644
index 00000000..34242ed2
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/values/post-subquery-values-quads.json
@@ -0,0 +1,77 @@
+{
+ "type": "project",
+ "input": {
+ "type": "project",
+ "input": {
+ "type": "join",
+ "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": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "values",
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ }
+ ],
+ "bindings": [
+ {
+ "o": {
+ "termType": "NamedNode",
+ "value": "http://example.org/b"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ },
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "s"
+ },
+ {
+ "termType": "Variable",
+ "value": "o"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/values/values-many-once-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/values/values-many-once-quads.json
new file mode 100644
index 00000000..2455a10a
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql-1.1/values/values-many-once-quads.json
@@ -0,0 +1,38 @@
+{
+ "type": "project",
+ "input": {
+ "type": "values",
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "y"
+ },
+ {
+ "termType": "Variable",
+ "value": "z"
+ }
+ ],
+ "bindings": [
+ {
+ "y": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "z": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "y"
+ },
+ {
+ "termType": "Variable",
+ "value": "z"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/describe/16.4.1-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/describe/16.4.1-quads.json
new file mode 100644
index 00000000..4d1a81aa
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/describe/16.4.1-quads.json
@@ -0,0 +1,13 @@
+{
+ "type": "describe",
+ "input": {
+ "type": "bgp",
+ "patterns": []
+ },
+ "terms": [
+ {
+ "termType": "NamedNode",
+ "value": "http://example.org/"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/describe/16.4.2a-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/describe/16.4.2a-quads.json
new file mode 100644
index 00000000..73a557d8
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/describe/16.4.2a-quads.json
@@ -0,0 +1,34 @@
+{
+ "type": "describe",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/mbox"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "mailto:alice@org"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "terms": [
+ {
+ "termType": "Variable",
+ "value": "x"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/describe/16.4.2c-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/describe/16.4.2c-quads.json
new file mode 100644
index 00000000..5963b35f
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/describe/16.4.2c-quads.json
@@ -0,0 +1,42 @@
+{
+ "type": "describe",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/knows"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "y"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "terms": [
+ {
+ "termType": "Variable",
+ "value": "x"
+ },
+ {
+ "termType": "Variable",
+ "value": "y"
+ },
+ {
+ "termType": "NamedNode",
+ "value": "http://example.org/"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/describe/star-empty-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/describe/star-empty-quads.json
new file mode 100644
index 00000000..26ca801b
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/describe/star-empty-quads.json
@@ -0,0 +1,8 @@
+{
+ "type": "describe",
+ "input": {
+ "type": "bgp",
+ "patterns": []
+ },
+ "terms": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/describe/star-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/describe/star-quads.json
new file mode 100644
index 00000000..3c081186
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/describe/star-quads.json
@@ -0,0 +1,38 @@
+{
+ "type": "describe",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "y"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "terms": [
+ {
+ "termType": "Variable",
+ "value": "x"
+ },
+ {
+ "termType": "Variable",
+ "value": "y"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/empty-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/empty-quads.json
new file mode 100644
index 00000000..0bb9155f
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/empty-quads.json
@@ -0,0 +1,3 @@
+{
+ "type": "nop"
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/existence-subquery-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/existence-subquery-quads.json
new file mode 100644
index 00000000..7a597c7c
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/existence-subquery-quads.json
@@ -0,0 +1,148 @@
+{
+ "type": "project",
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "https://mydom2#predB"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "b"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "existence",
+ "not": false,
+ "input": {
+ "type": "join",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "var0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "https://mydom2#predN"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "q"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "project",
+ "input": {
+ "type": "extend",
+ "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": "q2"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "_s"
+ }
+ }
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "var0"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "_o"
+ }
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "q2"
+ },
+ {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ ]
+ }
+ ]
+ }
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "s"
+ },
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "o"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/filter-union-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/filter-union-quads.json
new file mode 100644
index 00000000..f1e5d560
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/filter-union-quads.json
@@ -0,0 +1,63 @@
+{
+ "type": "project",
+ "input": {
+ "type": "union",
+ "input": [
+ {
+ "type": "filter",
+ "input": {
+ "type": "bgp",
+ "patterns": []
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "false",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#boolean"
+ }
+ }
+ }
+ },
+ {
+ "type": "filter",
+ "input": {
+ "type": "bgp",
+ "patterns": []
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "this"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "NamedNode",
+ "value": "http://example.org/InvalidResource"
+ }
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "this"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/from/13.2.1-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/from/13.2.1-quads.json
new file mode 100644
index 00000000..b94a2fce
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/from/13.2.1-quads.json
@@ -0,0 +1,44 @@
+{
+ "type": "from",
+ "input": {
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/name"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "name"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "name"
+ }
+ ]
+ },
+ "default": [
+ {
+ "termType": "NamedNode",
+ "value": "http://example.org/foaf/aliceFoaf"
+ }
+ ],
+ "named": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/from/13.2.2-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/from/13.2.2-quads.json
new file mode 100644
index 00000000..943b2e7e
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/from/13.2.2-quads.json
@@ -0,0 +1,48 @@
+{
+ "type": "from",
+ "input": {
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/name"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "name"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "name"
+ }
+ ]
+ },
+ "default": [],
+ "named": [
+ {
+ "termType": "NamedNode",
+ "value": "http://example.org/alice"
+ },
+ {
+ "termType": "NamedNode",
+ "value": "http://example.org/bob"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/from/13.2.3-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/from/13.2.3-quads.json
new file mode 100644
index 00000000..6d107fed
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/from/13.2.3-quads.json
@@ -0,0 +1,81 @@
+{
+ "type": "from",
+ "input": {
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://purl.org/dc/elements/1.1/publisher"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "who"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/mbox"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "mbox"
+ },
+ "graph": {
+ "termType": "Variable",
+ "value": "g"
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "who"
+ },
+ {
+ "termType": "Variable",
+ "value": "g"
+ },
+ {
+ "termType": "Variable",
+ "value": "mbox"
+ }
+ ]
+ },
+ "default": [
+ {
+ "termType": "NamedNode",
+ "value": "http://example.org/dft.ttl"
+ }
+ ],
+ "named": [
+ {
+ "termType": "NamedNode",
+ "value": "http://example.org/alice"
+ },
+ {
+ "termType": "NamedNode",
+ "value": "http://example.org/bob"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/from/13.3.1-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/from/13.3.1-quads.json
new file mode 100644
index 00000000..1cbac971
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/from/13.3.1-quads.json
@@ -0,0 +1,72 @@
+{
+ "type": "from",
+ "input": {
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/mbox"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "mailto:bob@work.example"
+ },
+ "graph": {
+ "termType": "Variable",
+ "value": "src"
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/nick"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "bobNick"
+ },
+ "graph": {
+ "termType": "Variable",
+ "value": "src"
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "src"
+ },
+ {
+ "termType": "Variable",
+ "value": "bobNick"
+ }
+ ]
+ },
+ "default": [],
+ "named": [
+ {
+ "termType": "NamedNode",
+ "value": "http://example.org/foaf/aliceFoaf"
+ },
+ {
+ "termType": "NamedNode",
+ "value": "http://example.org/foaf/bobFoaf"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/from/13.3.2-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/from/13.3.2-quads.json
new file mode 100644
index 00000000..8010b45e
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/from/13.3.2-quads.json
@@ -0,0 +1,68 @@
+{
+ "type": "from",
+ "input": {
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/mbox"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "mailto:bob@work.example"
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example.org/foaf/bobFoaf"
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/nick"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "nick"
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example.org/foaf/bobFoaf"
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "nick"
+ }
+ ]
+ },
+ "default": [],
+ "named": [
+ {
+ "termType": "NamedNode",
+ "value": "http://example.org/foaf/aliceFoaf"
+ },
+ {
+ "termType": "NamedNode",
+ "value": "http://example.org/foaf/bobFoaf"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/from/13.3.3-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/from/13.3.3-quads.json
new file mode 100644
index 00000000..2c88d1d1
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/from/13.3.3-quads.json
@@ -0,0 +1,176 @@
+{
+ "type": "from",
+ "input": {
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "alice"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/mbox"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "mailto:alice@work.example"
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example.org/foaf/aliceFoaf"
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "alice"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/knows"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "whom"
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example.org/foaf/aliceFoaf"
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "whom"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/mbox"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "mbox"
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example.org/foaf/aliceFoaf"
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "whom"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2000/01/rdf-schema#seeAlso"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "ppd"
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example.org/foaf/aliceFoaf"
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "ppd"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/PersonalProfileDocument"
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example.org/foaf/aliceFoaf"
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "w"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/mbox"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "mbox"
+ },
+ "graph": {
+ "termType": "Variable",
+ "value": "ppd"
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "w"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/nick"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "nick"
+ },
+ "graph": {
+ "termType": "Variable",
+ "value": "ppd"
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "mbox"
+ },
+ {
+ "termType": "Variable",
+ "value": "nick"
+ },
+ {
+ "termType": "Variable",
+ "value": "ppd"
+ }
+ ]
+ },
+ "default": [],
+ "named": [
+ {
+ "termType": "NamedNode",
+ "value": "http://example.org/foaf/aliceFoaf"
+ },
+ {
+ "termType": "NamedNode",
+ "value": "http://example.org/foaf/bobFoaf"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/from/13.3.4-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/from/13.3.4-quads.json
new file mode 100644
index 00000000..0208594f
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/from/13.3.4-quads.json
@@ -0,0 +1,102 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://purl.org/dc/elements/1.1/publisher"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "name"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://purl.org/dc/elements/1.1/date"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "date"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "person"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/name"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "name"
+ },
+ "graph": {
+ "termType": "Variable",
+ "value": "g"
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "person"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/mbox"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "mbox"
+ },
+ "graph": {
+ "termType": "Variable",
+ "value": "g"
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "name"
+ },
+ {
+ "termType": "Variable",
+ "value": "mbox"
+ },
+ {
+ "termType": "Variable",
+ "value": "date"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/group-by-no-var-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/group-by-no-var-quads.json
new file mode 100644
index 00000000..9970c161
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/group-by-no-var-quads.json
@@ -0,0 +1,100 @@
+{
+ "type": "project",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "group",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "y"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "var1"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "str",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "x"
+ }
+ }
+ ]
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "var1"
+ }
+ ],
+ "aggregates": [
+ {
+ "type": "expression",
+ "subType": "aggregate",
+ "aggregator": "max",
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "y"
+ }
+ },
+ "distinct": false,
+ "variable": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ ]
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "yy"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "yy"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/negate-and-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/negate-and-quads.json
new file mode 100644
index 00000000..28c57bf3
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/negate-and-quads.json
@@ -0,0 +1,117 @@
+{
+ "type": "slice",
+ "input": {
+ "type": "project",
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "c"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2002/07/owl#Class"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "!",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "&&",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "bound",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "c"
+ }
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "regex",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "str",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "c"
+ }
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "^toto",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "i",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "c"
+ }
+ ]
+ },
+ "start": 0,
+ "length": 10
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/negated-path-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/negated-path-quads.json
new file mode 100644
index 00000000..7e1f68fb
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/negated-path-quads.json
@@ -0,0 +1,38 @@
+{
+ "type": "slice",
+ "input": {
+ "type": "project",
+ "input": {
+ "type": "path",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://dbpedia.org/resource/12_Monkeys"
+ },
+ "predicate": {
+ "type": "nps",
+ "iris": [
+ {
+ "termType": "NamedNode",
+ "value": "http://dbpedia.org/ontology/starring"
+ }
+ ]
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ }
+ ]
+ },
+ "start": 0,
+ "length": 100
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/nested-union-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/nested-union-quads.json
new file mode 100644
index 00000000..9bfbb998
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/nested-union-quads.json
@@ -0,0 +1,196 @@
+{
+ "type": "project",
+ "input": {
+ "type": "union",
+ "input": [
+ {
+ "type": "join",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xlabelA"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "pLabel"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "union",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xlabelC"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "Label"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xlabelD"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "label"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "join",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xlabelB"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "pLabel"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "union",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xlabelC"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "Label"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xlabelD"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "label"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "label"
+ },
+ {
+ "termType": "Variable",
+ "value": "Label"
+ },
+ {
+ "termType": "Variable",
+ "value": "pLabel"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/path-inverse-negation-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/path-inverse-negation-quads.json
new file mode 100644
index 00000000..50ec3bdc
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/path-inverse-negation-quads.json
@@ -0,0 +1,50 @@
+{
+ "type": "project",
+ "input": {
+ "type": "path",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/instance#a"
+ },
+ "predicate": {
+ "type": "alt",
+ "input": [
+ {
+ "type": "nps",
+ "iris": [
+ {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/schema#p1"
+ }
+ ]
+ },
+ {
+ "type": "inv",
+ "path": {
+ "type": "nps",
+ "iris": [
+ {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/schema#p2"
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "x"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/project-filter-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/project-filter-quads.json
new file mode 100644
index 00000000..046560a4
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/project-filter-quads.json
@@ -0,0 +1,97 @@
+{
+ "type": "project",
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "n"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "existence",
+ "not": true,
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/q"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "m"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "n"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "m"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "n"
+ },
+ {
+ "termType": "Variable",
+ "value": "x"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/unused-extend-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/unused-extend-quads.json
new file mode 100644
index 00000000..18831483
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/unused-extend-quads.json
@@ -0,0 +1,99 @@
+{
+ "type": "project",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://mydom#startTime"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "st"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://mydom#endTime"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "et"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "duration"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "-",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "et"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "st"
+ }
+ }
+ ]
+ }
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "d"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "duration"
+ }
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "d"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/clear-drop-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/clear-drop-quads.json
new file mode 100644
index 00000000..0e95dea8
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/clear-drop-quads.json
@@ -0,0 +1,74 @@
+{
+ "type": "compositeupdate",
+ "updates": [
+ {
+ "type": "create",
+ "source": {
+ "termType": "NamedNode",
+ "value": "ex:graph"
+ },
+ "silent": true
+ },
+ {
+ "type": "create",
+ "source": {
+ "termType": "NamedNode",
+ "value": "ex:graph"
+ }
+ },
+ {
+ "type": "clear",
+ "source": {
+ "termType": "NamedNode",
+ "value": "ex:graph"
+ },
+ "silent": true
+ },
+ {
+ "type": "clear",
+ "source": {
+ "termType": "NamedNode",
+ "value": "ex:graph"
+ }
+ },
+ {
+ "type": "clear",
+ "source": "DEFAULT"
+ },
+ {
+ "type": "clear",
+ "source": "NAMED"
+ },
+ {
+ "type": "clear",
+ "source": "ALL"
+ },
+ {
+ "type": "drop",
+ "source": {
+ "termType": "NamedNode",
+ "value": "ex:graph"
+ },
+ "silent": true
+ },
+ {
+ "type": "drop",
+ "source": {
+ "termType": "NamedNode",
+ "value": "ex:graph"
+ }
+ },
+ {
+ "type": "drop",
+ "source": "DEFAULT"
+ },
+ {
+ "type": "drop",
+ "source": "NAMED"
+ },
+ {
+ "type": "drop",
+ "source": "ALL"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/insert-blank-where.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/insert-blank-where.json
new file mode 100644
index 00000000..a05bb85b
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/insert-blank-where.json
@@ -0,0 +1,50 @@
+{
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "class"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2000/01/rdf-schema#Class"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ],
+ "where": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "class"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/insert-blanks.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/insert-blanks.json
new file mode 100644
index 00000000..bb0ac897
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/insert-blanks.json
@@ -0,0 +1,53 @@
+{
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "e_b"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://purl.org/dc/elements/1.1/title"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "A new book",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "e_b"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://purl.org/dc/elements/1.1/creator"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "A.N.Other",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/load-into-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/load-into-quads.json
new file mode 100644
index 00000000..758d75c1
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/load-into-quads.json
@@ -0,0 +1,11 @@
+{
+ "type": "load",
+ "source": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/TR/skos-reference/skos.rdf"
+ },
+ "destination": {
+ "termType": "NamedNode",
+ "value": "urn:namespaces:skos"
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/load-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/load-quads.json
new file mode 100644
index 00000000..ea77c14e
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/load-quads.json
@@ -0,0 +1,7 @@
+{
+ "type": "load",
+ "source": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/TR/skos-reference/skos.rdf"
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/sparql-update-1-1-1.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/sparql-update-1-1-1.json
new file mode 100644
index 00000000..826a58c6
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/sparql-update-1-1-1.json
@@ -0,0 +1,29 @@
+{
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example/egbook"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://purl.org/dc/elements/1.1/title"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "This is an example title",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/sparql-update-3-1-1a.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/sparql-update-3-1-1a.json
new file mode 100644
index 00000000..412b1720
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/sparql-update-3-1-1a.json
@@ -0,0 +1,53 @@
+{
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example/book1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://purl.org/dc/elements/1.1/title"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "A new book",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example/book1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://purl.org/dc/elements/1.1/creator"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "A.N.Other",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/sparql-update-3-1-1b.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/sparql-update-3-1-1b.json
new file mode 100644
index 00000000..9512517e
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/sparql-update-3-1-1b.json
@@ -0,0 +1,29 @@
+{
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example/book1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#price"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "42",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ }
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example/bookStore"
+ }
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/sparql-update-3-1-2a.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/sparql-update-3-1-2a.json
new file mode 100644
index 00000000..694c57f7
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/sparql-update-3-1-2a.json
@@ -0,0 +1,53 @@
+{
+ "type": "deleteinsert",
+ "delete": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example/book2"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://purl.org/dc/elements/1.1/title"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "David Copperfield",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example/book2"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://purl.org/dc/elements/1.1/creator"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Edmund Wells",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/sparql-update-3-1-2b.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/sparql-update-3-1-2b.json
new file mode 100644
index 00000000..43cc3e82
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/sparql-update-3-1-2b.json
@@ -0,0 +1,63 @@
+{
+ "type": "compositeupdate",
+ "updates": [
+ {
+ "type": "deleteinsert",
+ "delete": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example/book1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://purl.org/dc/elements/1.1/title"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Fundamentals of Compiler Desing",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example/bookStore"
+ }
+ }
+ ]
+ },
+ {
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example/book1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://purl.org/dc/elements/1.1/title"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Fundamentals of Compiler Design",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example/bookStore"
+ }
+ }
+ ]
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/sparql-update-3-1-3-1a.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/sparql-update-3-1-3-1a.json
new file mode 100644
index 00000000..09312f31
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/sparql-update-3-1-3-1a.json
@@ -0,0 +1,100 @@
+{
+ "type": "deleteinsert",
+ "delete": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "book"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "v"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ],
+ "where": {
+ "type": "filter",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "book"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://purl.org/dc/elements/1.1/date"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "date"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "book"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "v"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": ">",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "date"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "1970-01-01T00:00:00-02:00",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#dateTime"
+ }
+ }
+ }
+ ]
+ }
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/sparql-update-3-1-3-1b.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/sparql-update-3-1-3-1b.json
new file mode 100644
index 00000000..ea0534fa
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/sparql-update-3-1-3-1b.json
@@ -0,0 +1,81 @@
+{
+ "type": "deleteinsert",
+ "delete": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "person"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "property"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "value"
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example/addresses"
+ }
+ }
+ ],
+ "where": {
+ "type": "graph",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "person"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "property"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "value"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "person"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/givenName"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Fred",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "name": {
+ "termType": "NamedNode",
+ "value": "http://example/addresses"
+ }
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/sparql-update-3-1-3-2a.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/sparql-update-3-1-3-2a.json
new file mode 100644
index 00000000..63f7a007
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/sparql-update-3-1-3-2a.json
@@ -0,0 +1,107 @@
+{
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "book"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "v"
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example/bookStore2"
+ }
+ }
+ ],
+ "where": {
+ "type": "graph",
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "book"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://purl.org/dc/elements/1.1/date"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "date"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "book"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "v"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": ">",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "date"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "1970-01-01T00:00:00-02:00",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#dateTime"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "name": {
+ "termType": "NamedNode",
+ "value": "http://example/bookStore"
+ }
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/sparql-update-3-1-3-2b.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/sparql-update-3-1-3-2b.json
new file mode 100644
index 00000000..c4165c81
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/sparql-update-3-1-3-2b.json
@@ -0,0 +1,107 @@
+{
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "person"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/name"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "name"
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example/addresses"
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "person"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/mbox"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "email"
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example/addresses"
+ }
+ }
+ ],
+ "where": {
+ "type": "graph",
+ "input": {
+ "type": "leftjoin",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "person"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/name"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "name"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "person"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/mbox"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "email"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "name": {
+ "termType": "NamedNode",
+ "value": "http://example/people"
+ }
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/sparql-update-3-1-3-2c.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/sparql-update-3-1-3-2c.json
new file mode 100644
index 00000000..eb55473d
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/sparql-update-3-1-3-2c.json
@@ -0,0 +1,239 @@
+{
+ "type": "compositeupdate",
+ "updates": [
+ {
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "book"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "v"
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example/bookStore2"
+ }
+ }
+ ],
+ "where": {
+ "type": "graph",
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "book"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://purl.org/dc/elements/1.1/date"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "date"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "book"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "v"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "<",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "date"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "2000-01-01T00:00:00-02:00",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#dateTime"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "name": {
+ "termType": "NamedNode",
+ "value": "http://example/bookStore"
+ }
+ }
+ },
+ {
+ "type": "deleteinsert",
+ "delete": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "book"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "v"
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example/bookStore"
+ }
+ }
+ ],
+ "where": {
+ "type": "graph",
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "book"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://purl.org/dc/elements/1.1/date"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "date"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "book"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://purl.org/dc/elements/1.1/type"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://purl.org/dc/dcmitype/PhysicalObject"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "book"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "v"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "<",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "date"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "2000-01-01T00:00:00-02:00",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#dateTime"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "name": {
+ "termType": "NamedNode",
+ "value": "http://example/bookStore"
+ }
+ }
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/sparql-update-3-1-3-3a.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/sparql-update-3-1-3-3a.json
new file mode 100644
index 00000000..347f3ce7
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/sparql-update-3-1-3-3a.json
@@ -0,0 +1,98 @@
+{
+ "type": "deleteinsert",
+ "delete": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "person"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/givenName"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Fred",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "person"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "property"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "value"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ],
+ "where": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "person"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/givenName"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Fred",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "person"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "property"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "value"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/sparql-update-3-1-3-3b.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/sparql-update-3-1-3-3b.json
new file mode 100644
index 00000000..e53c1c54
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/sparql-update-3-1-3-3b.json
@@ -0,0 +1,138 @@
+{
+ "type": "deleteinsert",
+ "delete": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "person"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/givenName"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Fred",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example.com/names"
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "person"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "property1"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "value1"
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example.com/names"
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "person"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "property2"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "value2"
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example.com/addresses"
+ }
+ }
+ ],
+ "where": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "person"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/givenName"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Fred",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example.com/names"
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "person"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "property1"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "value1"
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example.com/names"
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "person"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "property2"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "value2"
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example.com/addresses"
+ }
+ }
+ ]
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/sparql-update-3-1-3.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/sparql-update-3-1-3.json
new file mode 100644
index 00000000..47e9c70d
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/sparql-update-3-1-3.json
@@ -0,0 +1,91 @@
+{
+ "type": "deleteinsert",
+ "delete": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "person"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/givenName"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Bill",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example/addresses"
+ }
+ }
+ ],
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "person"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/givenName"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "William",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example/addresses"
+ }
+ }
+ ],
+ "where": {
+ "type": "graph",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "person"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/givenName"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Bill",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "name": {
+ "termType": "NamedNode",
+ "value": "http://example/addresses"
+ }
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/sparql-update-3-2-3-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/sparql-update-3-2-3-quads.json
new file mode 100644
index 00000000..76fa3d37
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/sparql-update-3-2-3-quads.json
@@ -0,0 +1,8 @@
+{
+ "type": "copy",
+ "source": "DEFAULT",
+ "destination": {
+ "termType": "NamedNode",
+ "value": "http://example.org/named"
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/sparql-update-3-2-4-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/sparql-update-3-2-4-quads.json
new file mode 100644
index 00000000..8b856ab1
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/sparql-update-3-2-4-quads.json
@@ -0,0 +1,8 @@
+{
+ "type": "move",
+ "source": "DEFAULT",
+ "destination": {
+ "termType": "NamedNode",
+ "value": "http://example.org/named"
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/sparql-update-3-2-5-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/sparql-update-3-2-5-quads.json
new file mode 100644
index 00000000..aa34669f
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/sparql-update-3-2-5-quads.json
@@ -0,0 +1,8 @@
+{
+ "type": "add",
+ "source": "DEFAULT",
+ "destination": {
+ "termType": "NamedNode",
+ "value": "http://example.org/named"
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/sparql-update-4-2-4.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/sparql-update-4-2-4.json
new file mode 100644
index 00000000..1fb84ff3
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/sparql-update-4-2-4.json
@@ -0,0 +1,68 @@
+{
+ "type": "deleteinsert",
+ "delete": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "S"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "O"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ],
+ "where": {
+ "type": "filter",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "isblank",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "S"
+ }
+ }
+ ]
+ }
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/using.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/using.json
new file mode 100644
index 00000000..be69e298
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql11-query/update/using.json
@@ -0,0 +1,65 @@
+{
+ "type": "deleteinsert",
+ "delete": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "foo:bar"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "urn:one:graph"
+ }
+ }
+ ],
+ "where": {
+ "type": "from",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "foo:bar"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "default": [
+ {
+ "termType": "NamedNode",
+ "value": "urn:another:graph"
+ }
+ ],
+ "named": [
+ {
+ "termType": "NamedNode",
+ "value": "urn:anamed:graph"
+ }
+ ]
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-ar-langdir-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-ar-langdir-quads.json
new file mode 100644
index 00000000..1eb220da
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-ar-langdir-quads.json
@@ -0,0 +1,44 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Ù…Ø±ØØ¨Ø§",
+ "language": "ar",
+ "direction": "rtl",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#dirLangString"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-ar-langdir.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-ar-langdir.json
index 72ec2e04..1eb220da 100644
--- a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-ar-langdir.json
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-ar-langdir.json
@@ -17,8 +17,8 @@
"object": {
"termType": "Literal",
"value": "Ù…Ø±ØØ¨Ø§",
- "direction": "rtl",
"language": "ar",
+ "direction": "rtl",
"datatype": {
"termType": "NamedNode",
"value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#dirLangString"
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-en-langdir-quads.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-en-langdir-quads.json
new file mode 100644
index 00000000..559665eb
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-en-langdir-quads.json
@@ -0,0 +1,44 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "hello",
+ "language": "en",
+ "direction": "ltr",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#dirLangString"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-en-langdir.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-en-langdir.json
index bd18dab3..559665eb 100644
--- a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-en-langdir.json
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-en-langdir.json
@@ -17,8 +17,8 @@
"object": {
"termType": "Literal",
"value": "hello",
- "direction": "ltr",
"language": "en",
+ "direction": "ltr",
"datatype": {
"termType": "NamedNode",
"value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#dirLangString"
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-anonreifier-01.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-anonreifier-01.json
new file mode 100644
index 00000000..cf342069
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-anonreifier-01.json
@@ -0,0 +1,61 @@
+{
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#p"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-anonreifier-02.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-anonreifier-02.json
new file mode 100644
index 00000000..9fdecef4
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-anonreifier-02.json
@@ -0,0 +1,81 @@
+{
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#p"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#p"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#y"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-anonreifier-03.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-anonreifier-03.json
new file mode 100644
index 00000000..bb8cc58f
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-anonreifier-03.json
@@ -0,0 +1,234 @@
+{
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_1"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "Y"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "Z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ],
+ "where": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_2"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_2"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_3"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_2"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_3"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "Y"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "Z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-anonreifier-04.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-anonreifier-04.json
new file mode 100644
index 00000000..3362713f
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-anonreifier-04.json
@@ -0,0 +1,306 @@
+{
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_2"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#s1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#p1"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "Z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_1"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "Y"
+ },
+ "object": {
+ "termType": "BlankNode",
+ "value": "g_2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ],
+ "where": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_3"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_3"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_4"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_3"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_5"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#s1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#p1"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "Z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_4"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "Y"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "g_5"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-anonreifier-05.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-anonreifier-05.json
new file mode 100644
index 00000000..e7617aaf
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-anonreifier-05.json
@@ -0,0 +1,234 @@
+{
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "O"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "S"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "S"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_1"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "Y"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "Z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ],
+ "where": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_2"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "O"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "S"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "g_2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_3"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "S"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "g_2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_3"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "Y"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "Z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-anonreifier-06.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-anonreifier-06.json
new file mode 100644
index 00000000..164dc3cb
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-anonreifier-06.json
@@ -0,0 +1,130 @@
+{
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#r"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#r"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#added"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Property :r",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ],
+ "where": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "var0"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "var0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#q"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-reifier-01.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-reifier-01.json
new file mode 100644
index 00000000..aa685c39
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-reifier-01.json
@@ -0,0 +1,61 @@
+{
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#p"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-reifier-02.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-reifier-02.json
new file mode 100644
index 00000000..f7a9d03c
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-reifier-02.json
@@ -0,0 +1,81 @@
+{
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#p"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#p"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#y"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-reifier-03.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-reifier-03.json
new file mode 100644
index 00000000..be910712
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-reifier-03.json
@@ -0,0 +1,234 @@
+{
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "Y"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "Z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ],
+ "where": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_1"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "Y"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "Z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-reifier-04.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-reifier-04.json
new file mode 100644
index 00000000..b1256825
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-reifier-04.json
@@ -0,0 +1,306 @@
+{
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "e_bnode"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "e_bnode"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "e_bnode"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#s1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#p1"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "Z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "Y"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ],
+ "where": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "e_bnode"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "e_bnode"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "e_bnode"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#s1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#p1"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "Z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_1"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "Y"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-reifier-05.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-reifier-05.json
new file mode 100644
index 00000000..a473f95c
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-reifier-05.json
@@ -0,0 +1,234 @@
+{
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "O"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "S"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "S"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "Y"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "Z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ],
+ "where": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "O"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "S"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "S"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_1"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "Y"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "Z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-reifier-06.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-reifier-06.json
new file mode 100644
index 00000000..f20606c3
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-reifier-06.json
@@ -0,0 +1,130 @@
+{
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#r"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#r"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#added"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Property :r",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ],
+ "where": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "var0"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "var0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#q"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-reifier-07.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-reifier-07.json
new file mode 100644
index 00000000..1a9c10f2
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-reifier-07.json
@@ -0,0 +1,180 @@
+{
+ "type": "deleteinsert",
+ "delete": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#r"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#r"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#added"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Property :r",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ],
+ "where": {
+ "type": "join",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "path",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "predicate": {
+ "type": "OneOrMorePath",
+ "path": {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#q1"
+ }
+ }
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "ABC",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-reifier-08.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-reifier-08.json
new file mode 100644
index 00000000..7afee6ed
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-reifier-08.json
@@ -0,0 +1,175 @@
+{
+ "type": "compositeupdate",
+ "updates": [
+ {
+ "type": "deleteinsert",
+ "delete": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#p"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#p"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#added"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Test",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#p"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#p"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#added"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Test",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-tripleterm-01.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-tripleterm-01.json
new file mode 100644
index 00000000..1fa27c58
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-tripleterm-01.json
@@ -0,0 +1,41 @@
+{
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#p"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-tripleterm-03.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-tripleterm-03.json
new file mode 100644
index 00000000..7aa579f3
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-tripleterm-03.json
@@ -0,0 +1,226 @@
+{
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "S"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "S"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "Y"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "Z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ],
+ "where": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_1"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "Y"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "Z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-tripleterm-04.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-tripleterm-04.json
new file mode 100644
index 00000000..585d363a
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-tripleterm-04.json
@@ -0,0 +1,258 @@
+{
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "Y"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#s1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#p1"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "Z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ],
+ "where": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_1"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "Y"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#s1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#p1"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "Z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-tripleterm-05.json b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-tripleterm-05.json
new file mode 100644
index 00000000..642d58a7
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra-blank-to-var/sparql12/sparql-1-2-syntax-update-tripleterm-05.json
@@ -0,0 +1,226 @@
+{
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "S"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "O"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "S"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "O"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "Y"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "Z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ],
+ "where": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "S"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "O"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "S"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "O"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g_1"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "Y"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "Z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/basic/01-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/basic/01-quads.json
new file mode 100644
index 00000000..f7112b5a
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/basic/01-quads.json
@@ -0,0 +1,8 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": []
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/basic/02-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/basic/02-quads.json
new file mode 100644
index 00000000..f7112b5a
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/basic/02-quads.json
@@ -0,0 +1,8 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": []
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/basic/03-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/basic/03-quads.json
new file mode 100644
index 00000000..503eb4f6
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/basic/03-quads.json
@@ -0,0 +1,42 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "y"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "x"
+ },
+ {
+ "termType": "Variable",
+ "value": "y"
+ },
+ {
+ "termType": "Variable",
+ "value": "z"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/basic/04-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/basic/04-quads.json
new file mode 100644
index 00000000..503eb4f6
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/basic/04-quads.json
@@ -0,0 +1,42 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "y"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "x"
+ },
+ {
+ "termType": "Variable",
+ "value": "y"
+ },
+ {
+ "termType": "Variable",
+ "value": "z"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/basic/05-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/basic/05-quads.json
new file mode 100644
index 00000000..0b1a5bbf
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/basic/05-quads.json
@@ -0,0 +1,74 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "y"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "a"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "b"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "a"
+ },
+ {
+ "termType": "Variable",
+ "value": "b"
+ },
+ {
+ "termType": "Variable",
+ "value": "c"
+ },
+ {
+ "termType": "Variable",
+ "value": "x"
+ },
+ {
+ "termType": "Variable",
+ "value": "y"
+ },
+ {
+ "termType": "Variable",
+ "value": "z"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/basic/06-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/basic/06-quads.json
new file mode 100644
index 00000000..0b1a5bbf
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/basic/06-quads.json
@@ -0,0 +1,74 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "y"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "a"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "b"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "a"
+ },
+ {
+ "termType": "Variable",
+ "value": "b"
+ },
+ {
+ "termType": "Variable",
+ "value": "c"
+ },
+ {
+ "termType": "Variable",
+ "value": "x"
+ },
+ {
+ "termType": "Variable",
+ "value": "y"
+ },
+ {
+ "termType": "Variable",
+ "value": "z"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/bnodes/01-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/bnodes/01-quads.json
new file mode 100644
index 00000000..acd884f1
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/bnodes/01-quads.json
@@ -0,0 +1,29 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#p"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#q"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/bnodes/02-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/bnodes/02-quads.json
new file mode 100644
index 00000000..acd884f1
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/bnodes/02-quads.json
@@ -0,0 +1,29 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#p"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#q"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/bnodes/03-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/bnodes/03-quads.json
new file mode 100644
index 00000000..e6509525
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/bnodes/03-quads.json
@@ -0,0 +1,86 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "y"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_1"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "pa"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "b"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#p"
+ },
+ "object": {
+ "termType": "BlankNode",
+ "value": "g_1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "b"
+ },
+ {
+ "termType": "Variable",
+ "value": "pa"
+ },
+ {
+ "termType": "Variable",
+ "value": "x"
+ },
+ {
+ "termType": "Variable",
+ "value": "y"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/bnodes/04-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/bnodes/04-quads.json
new file mode 100644
index 00000000..acd884f1
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/bnodes/04-quads.json
@@ -0,0 +1,29 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#p"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#q"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/bnodes/05-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/bnodes/05-quads.json
new file mode 100644
index 00000000..1a2815b7
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/bnodes/05-quads.json
@@ -0,0 +1,49 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "e_a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#p1"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#q1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "e_a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#p2"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#q2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/bnodes/06-clash-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/bnodes/06-clash-quads.json
new file mode 100644
index 00000000..9e6f5f40
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/bnodes/06-clash-quads.json
@@ -0,0 +1,82 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "e_b"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "b"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "e_b"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "b0"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "e_b0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "b1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "b"
+ },
+ {
+ "termType": "Variable",
+ "value": "b0"
+ },
+ {
+ "termType": "Variable",
+ "value": "b1"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/expr/01-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/expr/01-quads.json
new file mode 100644
index 00000000..52591fc4
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/expr/01-quads.json
@@ -0,0 +1,53 @@
+{
+ "type": "project",
+ "input": {
+ "type": "filter",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ },
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/expr/02-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/expr/02-quads.json
new file mode 100644
index 00000000..e00f8267
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/expr/02-quads.json
@@ -0,0 +1,72 @@
+{
+ "type": "project",
+ "input": {
+ "type": "filter",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "regex",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "foo",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ },
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/expr/03-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/expr/03-quads.json
new file mode 100644
index 00000000..1e0bb985
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/expr/03-quads.json
@@ -0,0 +1,85 @@
+{
+ "type": "project",
+ "input": {
+ "type": "filter",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "regex",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "foo",
+ "language": "en",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"
+ }
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "i",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ },
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/expr/04-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/expr/04-quads.json
new file mode 100644
index 00000000..3d41b23f
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/expr/04-quads.json
@@ -0,0 +1,63 @@
+{
+ "type": "project",
+ "input": {
+ "type": "filter",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "named",
+ "name": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ },
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ }
+ ]
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ },
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/expr/05-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/expr/05-quads.json
new file mode 100644
index 00000000..2608b3f4
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/expr/05-quads.json
@@ -0,0 +1,71 @@
+{
+ "type": "project",
+ "input": {
+ "type": "filter",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "named",
+ "name": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#myFunc"
+ },
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "s"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ }
+ ]
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ },
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/forms/01-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/forms/01-quads.json
new file mode 100644
index 00000000..87b21758
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/forms/01-quads.json
@@ -0,0 +1,210 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "y"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#first"
+ },
+ "object": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_2"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "pa"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "b"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_3"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#first"
+ },
+ "object": {
+ "termType": "BlankNode",
+ "value": "g_2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_3"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"
+ },
+ "object": {
+ "termType": "BlankNode",
+ "value": "g_4"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_4"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#first"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "57",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_4"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#p"
+ },
+ "object": {
+ "termType": "BlankNode",
+ "value": "g_3"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "b"
+ },
+ {
+ "termType": "Variable",
+ "value": "pa"
+ },
+ {
+ "termType": "Variable",
+ "value": "x"
+ },
+ {
+ "termType": "Variable",
+ "value": "y"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/forms/02-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/forms/02-quads.json
new file mode 100644
index 00000000..56b554f9
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/forms/02-quads.json
@@ -0,0 +1,89 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_2"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#first"
+ },
+ "object": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_2"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"
+ },
+ "object": {
+ "termType": "BlankNode",
+ "value": "g_3"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_3"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#first"
+ },
+ "object": {
+ "termType": "BlankNode",
+ "value": "g_1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_3"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/limit-offset/01-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/limit-offset/01-quads.json
new file mode 100644
index 00000000..0128d13b
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/limit-offset/01-quads.json
@@ -0,0 +1,60 @@
+{
+ "type": "slice",
+ "input": {
+ "type": "project",
+ "input": {
+ "type": "orderby",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "expressions": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ },
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+ },
+ "start": 0,
+ "length": 5
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/limit-offset/02-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/limit-offset/02-quads.json
new file mode 100644
index 00000000..bc85510a
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/limit-offset/02-quads.json
@@ -0,0 +1,60 @@
+{
+ "type": "slice",
+ "input": {
+ "type": "project",
+ "input": {
+ "type": "orderby",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "expressions": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ },
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+ },
+ "start": 3,
+ "length": 5
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/limit-offset/03-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/limit-offset/03-quads.json
new file mode 100644
index 00000000..bc85510a
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/limit-offset/03-quads.json
@@ -0,0 +1,60 @@
+{
+ "type": "slice",
+ "input": {
+ "type": "project",
+ "input": {
+ "type": "orderby",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "expressions": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ },
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+ },
+ "start": 3,
+ "length": 5
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/limit-offset/04-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/limit-offset/04-quads.json
new file mode 100644
index 00000000..a5255065
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/limit-offset/04-quads.json
@@ -0,0 +1,59 @@
+{
+ "type": "slice",
+ "input": {
+ "type": "project",
+ "input": {
+ "type": "orderby",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "expressions": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ },
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+ },
+ "start": 3
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/lists/01-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/lists/01-quads.json
new file mode 100644
index 00000000..8d69886a
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/lists/01-quads.json
@@ -0,0 +1,78 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#first"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "x"
+ },
+ {
+ "termType": "Variable",
+ "value": "z"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/lists/02-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/lists/02-quads.json
new file mode 100644
index 00000000..58c0af7b
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/lists/02-quads.json
@@ -0,0 +1,78 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#first"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#p"
+ },
+ "object": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "x"
+ },
+ {
+ "termType": "Variable",
+ "value": "z"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/lists/03-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/lists/03-quads.json
new file mode 100644
index 00000000..a9f4e42b
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/lists/03-quads.json
@@ -0,0 +1,54 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#first"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "z"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/lists/04-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/lists/04-quads.json
new file mode 100644
index 00000000..04bc0f98
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/lists/04-quads.json
@@ -0,0 +1,94 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#first"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#first"
+ },
+ "object": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "z"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/lists/05-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/lists/05-quads.json
new file mode 100644
index 00000000..f6c62e65
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/lists/05-quads.json
@@ -0,0 +1,49 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#first"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/01-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/01-quads.json
new file mode 100644
index 00000000..8aa2feb7
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/01-quads.json
@@ -0,0 +1,33 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#p"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "x",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/02-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/02-quads.json
new file mode 100644
index 00000000..8aa2feb7
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/02-quads.json
@@ -0,0 +1,33 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#p"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "x",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/03-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/03-quads.json
new file mode 100644
index 00000000..373b8701
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/03-quads.json
@@ -0,0 +1,33 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#p"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "x\"y'z",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/04-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/04-quads.json
new file mode 100644
index 00000000..373b8701
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/04-quads.json
@@ -0,0 +1,33 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#p"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "x\"y'z",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/05-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/05-quads.json
new file mode 100644
index 00000000..f0cde265
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/05-quads.json
@@ -0,0 +1,33 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#p"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "x\"",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/06-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/06-quads.json
new file mode 100644
index 00000000..3ec541ea
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/06-quads.json
@@ -0,0 +1,33 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#p"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "x'",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/07-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/07-quads.json
new file mode 100644
index 00000000..fe51fd0c
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/07-quads.json
@@ -0,0 +1,33 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#p"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "123",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/08-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/08-quads.json
new file mode 100644
index 00000000..fe51fd0c
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/08-quads.json
@@ -0,0 +1,33 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#p"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "123",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/09-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/09-quads.json
new file mode 100644
index 00000000..34b5894c
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/09-quads.json
@@ -0,0 +1,33 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#p"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Long\n\"\"\nLiteral\n",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/10-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/10-quads.json
new file mode 100644
index 00000000..97bc2ef7
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/10-quads.json
@@ -0,0 +1,33 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#p"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Long\n'' \"\"\"\nLiteral\n",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/11-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/11-quads.json
new file mode 100644
index 00000000..700fbacb
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/11-quads.json
@@ -0,0 +1,33 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#p"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Long\"\"\"Literal",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/12-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/12-quads.json
new file mode 100644
index 00000000..1f3f1edf
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/12-quads.json
@@ -0,0 +1,33 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#p"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Long'''Literal",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/13-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/13-quads.json
new file mode 100644
index 00000000..700fbacb
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/13-quads.json
@@ -0,0 +1,33 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#p"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Long\"\"\"Literal",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/14-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/14-quads.json
new file mode 100644
index 00000000..1f3f1edf
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/14-quads.json
@@ -0,0 +1,33 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#p"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Long'''Literal",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/15-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/15-quads.json
new file mode 100644
index 00000000..db5350c5
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/15-quads.json
@@ -0,0 +1,33 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#p"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Long '' Literal",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/16-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/16-quads.json
new file mode 100644
index 00000000..f47a4a6d
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/16-quads.json
@@ -0,0 +1,33 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#p"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Long ' Literal",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/17-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/17-quads.json
new file mode 100644
index 00000000..3acdf11e
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/17-quads.json
@@ -0,0 +1,33 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#p"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Long''\\Literal with '\\ single quotes ",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/18-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/18-quads.json
new file mode 100644
index 00000000..5dfa5f4a
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/18-quads.json
@@ -0,0 +1,33 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#p"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Long \"\" Literal",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/19-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/19-quads.json
new file mode 100644
index 00000000..ea5bd788
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/19-quads.json
@@ -0,0 +1,33 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#p"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Long \" Literal",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/20-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/20-quads.json
new file mode 100644
index 00000000..951638b1
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/lit/20-quads.json
@@ -0,0 +1,33 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/#p"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Long\"\"\\Literal with \"\\ single quotes",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/opt-filter/01-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/opt-filter/01-quads.json
new file mode 100644
index 00000000..8f3f0c5c
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/opt-filter/01-quads.json
@@ -0,0 +1,103 @@
+{
+ "type": "project",
+ "input": {
+ "type": "leftjoin",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example/p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "v"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "y"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example/q"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "w"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ],
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "v"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "2",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "v"
+ },
+ {
+ "termType": "Variable",
+ "value": "w"
+ },
+ {
+ "termType": "Variable",
+ "value": "x"
+ },
+ {
+ "termType": "Variable",
+ "value": "y"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/opt-filter/02-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/opt-filter/02-quads.json
new file mode 100644
index 00000000..6ee01438
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/opt-filter/02-quads.json
@@ -0,0 +1,137 @@
+{
+ "type": "project",
+ "input": {
+ "type": "leftjoin",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example/p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "v"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "y"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example/q"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "w"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ],
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "&&",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "v"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "2",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ }
+ }
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "w"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "3",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ }
+ }
+ }
+ ]
+ }
+ ]
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "v"
+ },
+ {
+ "termType": "Variable",
+ "value": "w"
+ },
+ {
+ "termType": "Variable",
+ "value": "x"
+ },
+ {
+ "termType": "Variable",
+ "value": "y"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/order/01-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/order/01-quads.json
new file mode 100644
index 00000000..54490640
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/order/01-quads.json
@@ -0,0 +1,55 @@
+{
+ "type": "project",
+ "input": {
+ "type": "orderby",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "expressions": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ },
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/order/02-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/order/02-quads.json
new file mode 100644
index 00000000..dd075c68
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/order/02-quads.json
@@ -0,0 +1,74 @@
+{
+ "type": "project",
+ "input": {
+ "type": "orderby",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "expressions": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "+",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "5",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ }
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ },
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/order/03-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/order/03-quads.json
new file mode 100644
index 00000000..54490640
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/order/03-quads.json
@@ -0,0 +1,55 @@
+{
+ "type": "project",
+ "input": {
+ "type": "orderby",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "expressions": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ },
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/order/04-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/order/04-quads.json
new file mode 100644
index 00000000..d9db9c40
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/order/04-quads.json
@@ -0,0 +1,62 @@
+{
+ "type": "project",
+ "input": {
+ "type": "orderby",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "expressions": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "desc",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ },
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/order/05-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/order/05-quads.json
new file mode 100644
index 00000000..106079c5
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/order/05-quads.json
@@ -0,0 +1,80 @@
+{
+ "type": "project",
+ "input": {
+ "type": "orderby",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "expressions": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "desc",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "named",
+ "name": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#func"
+ },
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "s"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ },
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/order/06-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/order/06-quads.json
new file mode 100644
index 00000000..313944f6
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/order/06-quads.json
@@ -0,0 +1,107 @@
+{
+ "type": "project",
+ "input": {
+ "type": "orderby",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "expressions": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "desc",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "+",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "57",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ }
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "named",
+ "name": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#func2"
+ },
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "s"
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ },
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/order/07-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/order/07-quads.json
new file mode 100644
index 00000000..49b1ad51
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/order/07-quads.json
@@ -0,0 +1,62 @@
+{
+ "type": "project",
+ "input": {
+ "type": "orderby",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "expressions": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "str",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ },
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/pat/01-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/pat/01-quads.json
new file mode 100644
index 00000000..f7112b5a
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/pat/01-quads.json
@@ -0,0 +1,8 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": []
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/pat/02-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/pat/02-quads.json
new file mode 100644
index 00000000..048c81ef
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/pat/02-quads.json
@@ -0,0 +1,102 @@
+{
+ "type": "project",
+ "input": {
+ "type": "join",
+ "input": [
+ {
+ "type": "leftjoin",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#b"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#y"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#x"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "y"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "a"
+ },
+ {
+ "termType": "Variable",
+ "value": "y"
+ },
+ {
+ "termType": "Variable",
+ "value": "z"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/pat/03-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/pat/03-quads.json
new file mode 100644
index 00000000..a10bf885
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/pat/03-quads.json
@@ -0,0 +1,128 @@
+{
+ "type": "project",
+ "input": {
+ "type": "join",
+ "input": [
+ {
+ "type": "leftjoin",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": []
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#y"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#b"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "union",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#x1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#y1"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#z1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#x2"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#y2"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#z2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "a"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/reduced/01-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/reduced/01-quads.json
new file mode 100644
index 00000000..4096c168
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/reduced/01-quads.json
@@ -0,0 +1,45 @@
+{
+ "type": "reduced",
+ "input": {
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "y"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "x"
+ },
+ {
+ "termType": "Variable",
+ "value": "y"
+ },
+ {
+ "termType": "Variable",
+ "value": "z"
+ }
+ ]
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/struct/01-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/struct/01-quads.json
new file mode 100644
index 00000000..b1118f7d
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/struct/01-quads.json
@@ -0,0 +1,17 @@
+{
+ "type": "project",
+ "input": {
+ "type": "leftjoin",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": []
+ },
+ {
+ "type": "bgp",
+ "patterns": []
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/struct/02-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/struct/02-quads.json
new file mode 100644
index 00000000..30591a3f
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/struct/02-quads.json
@@ -0,0 +1,38 @@
+{
+ "type": "project",
+ "input": {
+ "type": "leftjoin",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": []
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#b"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra/dawg-syntax/struct/13-quads.json b/packages/test-utils/statics/algebra/algebra/dawg-syntax/struct/13-quads.json
new file mode 100644
index 00000000..1f67975b
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/dawg-syntax/struct/13-quads.json
@@ -0,0 +1,119 @@
+{
+ "type": "project",
+ "input": {
+ "type": "leftjoin",
+ "input": [
+ {
+ "type": "join",
+ "input": [
+ {
+ "type": "leftjoin",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#p"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#q"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#r"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#b"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#p"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#q"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#r"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#b"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "variables": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/aggregates/agg-empty-group-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/aggregates/agg-empty-group-quads.json
new file mode 100644
index 00000000..7e2ac101
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/aggregates/agg-empty-group-quads.json
@@ -0,0 +1,82 @@
+{
+ "type": "project",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "group",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "value"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "x"
+ }
+ ],
+ "aggregates": [
+ {
+ "type": "expression",
+ "subType": "aggregate",
+ "aggregator": "max",
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "value"
+ }
+ },
+ "distinct": false,
+ "variable": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ ]
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "max"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "x"
+ },
+ {
+ "termType": "Variable",
+ "value": "max"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/aggregates/avg-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/aggregates/avg-quads.json
new file mode 100644
index 00000000..89580e08
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/aggregates/avg-quads.json
@@ -0,0 +1,73 @@
+{
+ "type": "project",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "group",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/dec"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [],
+ "aggregates": [
+ {
+ "type": "expression",
+ "subType": "aggregate",
+ "aggregator": "avg",
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ },
+ "distinct": false,
+ "variable": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ ]
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "avg"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "avg"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/aggregates/avg-with-group-by-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/aggregates/avg-with-group-by-quads.json
new file mode 100644
index 00000000..1e86b2bc
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/aggregates/avg-with-group-by-quads.json
@@ -0,0 +1,112 @@
+{
+ "type": "project",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "group",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ],
+ "aggregates": [
+ {
+ "type": "expression",
+ "subType": "aggregate",
+ "aggregator": "avg",
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ },
+ "distinct": false,
+ "variable": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "<=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "2.0",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#decimal"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "avg"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "s"
+ },
+ {
+ "termType": "Variable",
+ "value": "avg"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/aggregates/count-3-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/aggregates/count-3-quads.json
new file mode 100644
index 00000000..fbd72b53
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/aggregates/count-3-quads.json
@@ -0,0 +1,112 @@
+{
+ "type": "project",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "group",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "P"
+ }
+ ],
+ "aggregates": [
+ {
+ "type": "expression",
+ "subType": "aggregate",
+ "aggregator": "count",
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "O"
+ }
+ },
+ "distinct": false,
+ "variable": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": ">",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "2",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "C"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "P"
+ },
+ {
+ "termType": "Variable",
+ "value": "C"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/aggregates/count-8b-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/aggregates/count-8b-quads.json
new file mode 100644
index 00000000..835371bb
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/aggregates/count-8b-quads.json
@@ -0,0 +1,145 @@
+{
+ "type": "project",
+ "input": {
+ "type": "orderby",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "group",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "S"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "O1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "S"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/q"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "O2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "O12"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "+",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "O1"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "O2"
+ }
+ }
+ ]
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "O12"
+ }
+ ],
+ "aggregates": [
+ {
+ "type": "expression",
+ "subType": "aggregate",
+ "aggregator": "count",
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "O1"
+ }
+ },
+ "distinct": false,
+ "variable": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ ]
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "C"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ },
+ "expressions": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "O12"
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "O12"
+ },
+ {
+ "termType": "Variable",
+ "value": "C"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/aggregates/error-in-avg-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/aggregates/error-in-avg-quads.json
new file mode 100644
index 00000000..5976243a
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/aggregates/error-in-avg-quads.json
@@ -0,0 +1,171 @@
+{
+ "type": "project",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "group",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/data/#p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "g"
+ }
+ ],
+ "aggregates": [
+ {
+ "type": "expression",
+ "subType": "aggregate",
+ "aggregator": "avg",
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "p"
+ }
+ },
+ "distinct": false,
+ "variable": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "aggregate",
+ "aggregator": "min",
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "p"
+ }
+ },
+ "distinct": false,
+ "variable": {
+ "termType": "Variable",
+ "value": "var1"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "aggregate",
+ "aggregator": "max",
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "p"
+ }
+ },
+ "distinct": false,
+ "variable": {
+ "termType": "Variable",
+ "value": "var2"
+ }
+ }
+ ]
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "avg"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "c"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "/",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "+",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "var1"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "var2"
+ }
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "2",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "g"
+ },
+ {
+ "termType": "Variable",
+ "value": "avg"
+ },
+ {
+ "termType": "Variable",
+ "value": "c"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/aggregates/group-concat-1-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/aggregates/group-concat-1-quads.json
new file mode 100644
index 00000000..6059ac47
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/aggregates/group-concat-1-quads.json
@@ -0,0 +1,141 @@
+{
+ "type": "ask",
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "project",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "group",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/p1"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [],
+ "aggregates": [
+ {
+ "type": "expression",
+ "subType": "aggregate",
+ "aggregator": "group_concat",
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ },
+ "separator": " ",
+ "distinct": false,
+ "variable": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ ]
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "g"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "g"
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "||",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "g"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "1 22",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ }
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "g"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "22 1",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ }
+ }
+ ]
+ }
+ ]
+ }
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/aggregates/group-concat-2-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/aggregates/group-concat-2-quads.json
new file mode 100644
index 00000000..aab9b64c
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/aggregates/group-concat-2-quads.json
@@ -0,0 +1,458 @@
+{
+ "type": "project",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "group",
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "project",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "group",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "p"
+ }
+ ],
+ "aggregates": [
+ {
+ "type": "expression",
+ "subType": "aggregate",
+ "aggregator": "group_concat",
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ },
+ "separator": " ",
+ "distinct": false,
+ "variable": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ ]
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "g"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "g"
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "||",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "&&",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "p"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/p1"
+ }
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "||",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "g"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "1 22",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ }
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "g"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "22 1",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "&&",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "p"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/p2"
+ }
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "||",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "||",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "||",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "||",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "||",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "g"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "aaa bb c",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ }
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "g"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "aaa c bb",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "g"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "bb aaa c",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "g"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "bb c aaa",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "g"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "c aaa bb",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "g"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "c bb aaa",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ },
+ "variables": [],
+ "aggregates": [
+ {
+ "type": "expression",
+ "subType": "aggregate",
+ "aggregator": "count",
+ "expression": {
+ "type": "expression",
+ "subType": "wildcard",
+ "wildcard": {
+ "type": "wildcard"
+ }
+ },
+ "distinct": false,
+ "variable": {
+ "termType": "Variable",
+ "value": "var1"
+ }
+ }
+ ]
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "c"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "var1"
+ }
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "c"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/aggregates/group-concat-with-separator-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/aggregates/group-concat-with-separator-quads.json
new file mode 100644
index 00000000..d2f2c704
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/aggregates/group-concat-with-separator-quads.json
@@ -0,0 +1,141 @@
+{
+ "type": "ask",
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "project",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "group",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/p1"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [],
+ "aggregates": [
+ {
+ "type": "expression",
+ "subType": "aggregate",
+ "aggregator": "group_concat",
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ },
+ "separator": ":",
+ "distinct": false,
+ "variable": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ ]
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "g"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "g"
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "||",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "g"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "1:22",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ }
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "g"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "22:1",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ }
+ }
+ ]
+ }
+ ]
+ }
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/aggregates/protect-from-error-in-avg-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/aggregates/protect-from-error-in-avg-quads.json
new file mode 100644
index 00000000..c41b028d
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/aggregates/protect-from-error-in-avg-quads.json
@@ -0,0 +1,141 @@
+{
+ "type": "project",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "group",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/data/#p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "g"
+ }
+ ],
+ "aggregates": [
+ {
+ "type": "expression",
+ "subType": "aggregate",
+ "aggregator": "avg",
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "if",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "isnumeric",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "p"
+ }
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "p"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "coalesce",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "named",
+ "name": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#double"
+ },
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "p"
+ }
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "0",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ }
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "distinct": false,
+ "variable": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ ]
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "avg"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "g"
+ },
+ {
+ "termType": "Variable",
+ "value": "avg"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/aggregates/sample-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/aggregates/sample-quads.json
new file mode 100644
index 00000000..9cff0f3c
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/aggregates/sample-quads.json
@@ -0,0 +1,174 @@
+{
+ "type": "ask",
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "project",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "group",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/dec"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [],
+ "aggregates": [
+ {
+ "type": "expression",
+ "subType": "aggregate",
+ "aggregator": "sample",
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ },
+ "distinct": false,
+ "variable": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ ]
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "sample"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "sample"
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "||",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "||",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "sample"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "1.0",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#decimal"
+ }
+ }
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "sample"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "2.2",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#decimal"
+ }
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "sample"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "3.5",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#decimal"
+ }
+ }
+ }
+ ]
+ }
+ ]
+ }
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/ask/group-concat-1-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/ask/group-concat-1-quads.json
new file mode 100644
index 00000000..6059ac47
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/ask/group-concat-1-quads.json
@@ -0,0 +1,141 @@
+{
+ "type": "ask",
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "project",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "group",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/p1"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [],
+ "aggregates": [
+ {
+ "type": "expression",
+ "subType": "aggregate",
+ "aggregator": "group_concat",
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ },
+ "separator": " ",
+ "distinct": false,
+ "variable": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ ]
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "g"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "g"
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "||",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "g"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "1 22",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ }
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "g"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "22 1",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ }
+ }
+ ]
+ }
+ ]
+ }
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/ask/in-1-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/ask/in-1-quads.json
new file mode 100644
index 00000000..610efe2a
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/ask/in-1-quads.json
@@ -0,0 +1,65 @@
+{
+ "type": "ask",
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "bgp",
+ "patterns": []
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "in",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "2",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ }
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "1",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ }
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "2",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ }
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "3",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ }
+ }
+ }
+ ]
+ }
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/ask/not-in-1-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/ask/not-in-1-quads.json
new file mode 100644
index 00000000..8fa3a32b
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/ask/not-in-1-quads.json
@@ -0,0 +1,29 @@
+{
+ "type": "ask",
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "bgp",
+ "patterns": []
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "notin",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "2",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ }
+ }
+ }
+ ]
+ }
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/ask/sparqldl-05.rq-simple-undistinguished-variable-test-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/ask/sparqldl-05.rq-simple-undistinguished-variable-test-quads.json
new file mode 100644
index 00000000..4b017492
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/ask/sparqldl-05.rq-simple-undistinguished-variable-test-quads.json
@@ -0,0 +1,28 @@
+{
+ "type": "ask",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "e_a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.org/test#Person"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/ask/sparqldl-06.rq-cycle-of-undistinguished-variables-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/ask/sparqldl-06.rq-cycle-of-undistinguished-variables-quads.json
new file mode 100644
index 00000000..7faca6df
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/ask/sparqldl-06.rq-cycle-of-undistinguished-variables-quads.json
@@ -0,0 +1,88 @@
+{
+ "type": "ask",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/test#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/test#p"
+ },
+ "object": {
+ "termType": "BlankNode",
+ "value": "e_aa"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "e_aa"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/test#r"
+ },
+ "object": {
+ "termType": "BlankNode",
+ "value": "e_dd"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "e_dd"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/test#t"
+ },
+ "object": {
+ "termType": "BlankNode",
+ "value": "e_bb"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "e_bb"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/test#s"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.org/test#a"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/ask/syn-pname-01-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/ask/syn-pname-01-quads.json
new file mode 100644
index 00000000..cba62ea6
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/ask/syn-pname-01-quads.json
@@ -0,0 +1,7 @@
+{
+ "type": "ask",
+ "input": {
+ "type": "bgp",
+ "patterns": []
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/bind/01-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/bind/01-quads.json
new file mode 100644
index 00000000..0b544ca2
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/bind/01-quads.json
@@ -0,0 +1,68 @@
+{
+ "type": "project",
+ "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": "10",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "z"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/bind/02-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/bind/02-quads.json
new file mode 100644
index 00000000..46a73ebf
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/bind/02-quads.json
@@ -0,0 +1,110 @@
+{
+ "type": "project",
+ "input": {
+ "type": "extend",
+ "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": "10",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "z2"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "+",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "100",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ },
+ {
+ "termType": "Variable",
+ "value": "z"
+ },
+ {
+ "termType": "Variable",
+ "value": "z2"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/bind/03-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/bind/03-quads.json
new file mode 100644
index 00000000..fc7d5061
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/bind/03-quads.json
@@ -0,0 +1,102 @@
+{
+ "type": "project",
+ "input": {
+ "type": "join",
+ "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"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s1"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p1"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "z"
+ },
+ {
+ "termType": "Variable",
+ "value": "s1"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/bind/04-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/bind/04-quads.json
new file mode 100644
index 00000000..9c3ce9f0
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/bind/04-quads.json
@@ -0,0 +1,61 @@
+{
+ "type": "project",
+ "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": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "nova"
+ }
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ },
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ },
+ {
+ "termType": "Variable",
+ "value": "z"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/bind/05-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/bind/05-quads.json
new file mode 100644
index 00000000..5d0d50ec
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/bind/05-quads.json
@@ -0,0 +1,110 @@
+{
+ "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"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/bind/07-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/bind/07-quads.json
new file mode 100644
index 00000000..130d3532
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/bind/07-quads.json
@@ -0,0 +1,132 @@
+{
+ "type": "project",
+ "input": {
+ "type": "join",
+ "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": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "union",
+ "input": [
+ {
+ "type": "extend",
+ "input": {
+ "type": "bgp",
+ "patterns": []
+ },
+ "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"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "type": "extend",
+ "input": {
+ "type": "bgp",
+ "patterns": []
+ },
+ "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": "2",
+ "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"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/bind/08-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/bind/08-quads.json
new file mode 100644
index 00000000..5d0d50ec
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/bind/08-quads.json
@@ -0,0 +1,110 @@
+{
+ "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"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/bind/10-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/bind/10-quads.json
new file mode 100644
index 00000000..8435a129
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/bind/10-quads.json
@@ -0,0 +1,96 @@
+{
+ "type": "project",
+ "input": {
+ "type": "join",
+ "input": [
+ {
+ "type": "extend",
+ "input": {
+ "type": "bgp",
+ "patterns": []
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "z"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "4",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ }
+ }
+ }
+ },
+ {
+ "type": "filter",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "v"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "v"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "z"
+ }
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "s"
+ },
+ {
+ "termType": "Variable",
+ "value": "v"
+ },
+ {
+ "termType": "Variable",
+ "value": "z"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/bind/11-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/bind/11-quads.json
new file mode 100644
index 00000000..98d3b627
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/bind/11-quads.json
@@ -0,0 +1,96 @@
+{
+ "type": "project",
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "join",
+ "input": [
+ {
+ "type": "extend",
+ "input": {
+ "type": "bgp",
+ "patterns": []
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "z"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "4",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ }
+ }
+ }
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "v"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "v"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "z"
+ }
+ }
+ ]
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "s"
+ },
+ {
+ "termType": "Variable",
+ "value": "v"
+ },
+ {
+ "termType": "Variable",
+ "value": "z"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/construct/construct-from-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/construct/construct-from-quads.json
new file mode 100644
index 00000000..dd3dfe7c
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/construct/construct-from-quads.json
@@ -0,0 +1,65 @@
+{
+ "type": "from",
+ "input": {
+ "type": "slice",
+ "input": {
+ "type": "construct",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "template": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "start": 0,
+ "length": 100
+ },
+ "default": [
+ {
+ "termType": "NamedNode",
+ "value": "http://example.com/data"
+ }
+ ],
+ "named": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/construct/construct-slice-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/construct/construct-slice-quads.json
new file mode 100644
index 00000000..9bded160
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/construct/construct-slice-quads.json
@@ -0,0 +1,55 @@
+{
+ "type": "slice",
+ "input": {
+ "type": "construct",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "template": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "start": 0,
+ "length": 100
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/construct/constructwhere01-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/construct/constructwhere01-quads.json
new file mode 100644
index 00000000..c55afa28
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/construct/constructwhere01-quads.json
@@ -0,0 +1,50 @@
+{
+ "type": "construct",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "template": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/construct/constructwhere02-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/construct/constructwhere02-quads.json
new file mode 100644
index 00000000..0bc95dd6
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/construct/constructwhere02-quads.json
@@ -0,0 +1,90 @@
+{
+ "type": "construct",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/s1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s2"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "template": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/s1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s2"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/construct/constructwhere03-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/construct/constructwhere03-quads.json
new file mode 100644
index 00000000..707122ca
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/construct/constructwhere03-quads.json
@@ -0,0 +1,90 @@
+{
+ "type": "construct",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/s2"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/s2"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "template": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/s2"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/s2"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/construct/constructwhere05-modified-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/construct/constructwhere05-modified-quads.json
new file mode 100644
index 00000000..a03e854d
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/construct/constructwhere05-modified-quads.json
@@ -0,0 +1,76 @@
+{
+ "type": "construct",
+ "input": {
+ "type": "filter",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "NamedNode",
+ "value": "http://example.org/o1"
+ }
+ }
+ ]
+ }
+ },
+ "template": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/construct/constructwhere06-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/construct/constructwhere06-quads.json
new file mode 100644
index 00000000..b46e8721
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/construct/constructwhere06-quads.json
@@ -0,0 +1,50 @@
+{
+ "type": "construct",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "e_s_b"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "BlankNode",
+ "value": "e_o_b"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "template": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "e_s_b"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "BlankNode",
+ "value": "e_o_b"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/delete/delete-with-02.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/delete/delete-with-02.json
new file mode 100644
index 00000000..07927ef9
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/delete/delete-with-02.json
@@ -0,0 +1,84 @@
+{
+ "type": "deleteinsert",
+ "delete": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example.org/g1"
+ }
+ }
+ ],
+ "where": {
+ "type": "graph",
+ "input": {
+ "type": "graph",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/knows"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "name": {
+ "termType": "NamedNode",
+ "value": "http://example.org/g1"
+ }
+ },
+ "name": {
+ "termType": "NamedNode",
+ "value": "http://example.org/g2"
+ }
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/delete/delete-with-03-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/delete/delete-with-03-quads.json
new file mode 100644
index 00000000..2d8afb2a
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/delete/delete-with-03-quads.json
@@ -0,0 +1,70 @@
+{
+ "type": "deleteinsert",
+ "delete": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example.org/g2"
+ }
+ }
+ ],
+ "where": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/knows"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example.org/g1"
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example.org/g1"
+ }
+ }
+ ]
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/delete/delete-with-03.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/delete/delete-with-03.json
new file mode 100644
index 00000000..fc02d376
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/delete/delete-with-03.json
@@ -0,0 +1,84 @@
+{
+ "type": "deleteinsert",
+ "delete": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example.org/g2"
+ }
+ }
+ ],
+ "where": {
+ "type": "graph",
+ "input": {
+ "type": "graph",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/knows"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "name": {
+ "termType": "NamedNode",
+ "value": "http://example.org/g1"
+ }
+ },
+ "name": {
+ "termType": "NamedNode",
+ "value": "http://example.org/g2"
+ }
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/exists/nested-negative-exists-in-positive-exists-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/exists/nested-negative-exists-in-positive-exists-quads.json
new file mode 100644
index 00000000..c81d2577
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/exists/nested-negative-exists-in-positive-exists-quads.json
@@ -0,0 +1,104 @@
+{
+ "type": "project",
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "existence",
+ "not": false,
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/o1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "existence",
+ "not": true,
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/o2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/exists/nested-positive-exists-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/exists/nested-positive-exists-quads.json
new file mode 100644
index 00000000..6be0fbc6
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/exists/nested-positive-exists-quads.json
@@ -0,0 +1,104 @@
+{
+ "type": "project",
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "existence",
+ "not": false,
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/o1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "existence",
+ "not": false,
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/o2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/functions/bnode-str-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/functions/bnode-str-quads.json
new file mode 100644
index 00000000..86a76b90
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/functions/bnode-str-quads.json
@@ -0,0 +1,226 @@
+{
+ "type": "project",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/str"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "s1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "b"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/str"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "s2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "&&",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "||",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "a"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "NamedNode",
+ "value": "http://example.org/s1"
+ }
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "a"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "NamedNode",
+ "value": "http://example.org/s3"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "||",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "b"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "NamedNode",
+ "value": "http://example.org/s1"
+ }
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "b"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "NamedNode",
+ "value": "http://example.org/s3"
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "b1"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "bnode",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "s1"
+ }
+ }
+ ]
+ }
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "b2"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "bnode",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "s2"
+ }
+ }
+ ]
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "s1"
+ },
+ {
+ "termType": "Variable",
+ "value": "s2"
+ },
+ {
+ "termType": "Variable",
+ "value": "b1"
+ },
+ {
+ "termType": "Variable",
+ "value": "b2"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/functions/now-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/functions/now-quads.json
new file mode 100644
index 00000000..75aa2b1c
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/functions/now-quads.json
@@ -0,0 +1,53 @@
+{
+ "type": "ask",
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "bgp",
+ "patterns": []
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "n"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "now",
+ "args": []
+ }
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "datatype",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "n"
+ }
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#dateTime"
+ }
+ }
+ ]
+ }
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/functions/strlang-str-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/functions/strlang-str-quads.json
new file mode 100644
index 00000000..7e3c87ca
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/functions/strlang-str-quads.json
@@ -0,0 +1,116 @@
+{
+ "type": "project",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/str"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "str"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "langmatches",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "lang",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "str"
+ }
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "en",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "s2"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "strlang",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "str",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "str"
+ }
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "en-US",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "s"
+ },
+ {
+ "termType": "Variable",
+ "value": "s2"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/group/01-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/group/01-quads.json
new file mode 100644
index 00000000..7db4ae79
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/group/01-quads.json
@@ -0,0 +1,44 @@
+{
+ "type": "project",
+ "input": {
+ "type": "group",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example/p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "v"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ],
+ "aggregates": []
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/group/03-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/group/03-quads.json
new file mode 100644
index 00000000..acf7d314
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/group/03-quads.json
@@ -0,0 +1,112 @@
+{
+ "type": "project",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "group",
+ "input": {
+ "type": "leftjoin",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example/p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "v"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example/q"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "w"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "w"
+ }
+ ],
+ "aggregates": [
+ {
+ "type": "expression",
+ "subType": "aggregate",
+ "aggregator": "sample",
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "v"
+ }
+ },
+ "distinct": false,
+ "variable": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ ]
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "S"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "w"
+ },
+ {
+ "termType": "Variable",
+ "value": "S"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/group/04-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/group/04-quads.json
new file mode 100644
index 00000000..c68d680a
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/group/04-quads.json
@@ -0,0 +1,146 @@
+{
+ "type": "project",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "group",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "leftjoin",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example/p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "v"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example/q"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "w"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "X"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "coalesce",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "w"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "1605-11-05",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#date"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "X"
+ }
+ ],
+ "aggregates": [
+ {
+ "type": "expression",
+ "subType": "aggregate",
+ "aggregator": "sample",
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "v"
+ }
+ },
+ "distinct": false,
+ "variable": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ ]
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "S"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "X"
+ },
+ {
+ "termType": "Variable",
+ "value": "S"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/negation/calculate-which-sets-have-the-same-elements-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/negation/calculate-which-sets-have-the-same-elements-quads.json
new file mode 100644
index 00000000..07a62d5d
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/negation/calculate-which-sets-have-the-same-elements-quads.json
@@ -0,0 +1,307 @@
+{
+ "type": "distinct",
+ "input": {
+ "type": "project",
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "minus",
+ "input": [
+ {
+ "type": "minus",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s2"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example/Set"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example/Set"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "filter",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example/Set"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s2"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example/Set"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example/member"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "existence",
+ "not": true,
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s2"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example/member"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ {
+ "type": "filter",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example/Set"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s2"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example/Set"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s2"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example/member"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "existence",
+ "not": true,
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example/member"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "<",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "str",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "s1"
+ }
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "str",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "s2"
+ }
+ }
+ ]
+ }
+ ]
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "s1"
+ },
+ {
+ "termType": "Variable",
+ "value": "s2"
+ }
+ ]
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/negation/medical-temporal-proximity-by-exclusion-not-exists-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/negation/medical-temporal-proximity-by-exclusion-not-exists-quads.json
new file mode 100644
index 00000000..b4c4f20a
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/negation/medical-temporal-proximity-by-exclusion-not-exists-quads.json
@@ -0,0 +1,191 @@
+{
+ "type": "project",
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "exam"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2009/sparql/docs/tests/data-sparql11/negation#PhysicalExamination"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "exam"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://purl.org/dc/elements/1.1/date"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "date"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "exam"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2009/sparql/docs/tests/data-sparql11/negation#precedes"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2009/sparql/docs/tests/data-sparql11/negation#operation1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "op"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2009/sparql/docs/tests/data-sparql11/negation#SurgicalProcedure"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "op"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://purl.org/dc/elements/1.1/date"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "opDT"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "existence",
+ "not": true,
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "otherExam"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2009/sparql/docs/tests/data-sparql11/negation#PhysicalExamination"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "otherExam"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2009/sparql/docs/tests/data-sparql11/negation#follows"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "exam"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "otherExam"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2009/sparql/docs/tests/data-sparql11/negation#precedes"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2009/sparql/docs/tests/data-sparql11/negation#operation1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "exam"
+ },
+ {
+ "termType": "Variable",
+ "value": "date"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/negation/simple-minus-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/negation/simple-minus-quads.json
new file mode 100644
index 00000000..7c7c7be9
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/negation/simple-minus-quads.json
@@ -0,0 +1,68 @@
+{
+ "type": "project",
+ "input": {
+ "type": "minus",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "uri"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2004/02/skos/core#prefLabel"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "prefLabel"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "uri"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2004/02/skos/core#broader"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "https://test.com/"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "prefLabel"
+ },
+ {
+ "termType": "Variable",
+ "value": "uri"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/negation/subtraction-with-minus-from-a-fully-bound-minuend-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/negation/subtraction-with-minus-from-a-fully-bound-minuend-quads.json
new file mode 100644
index 00000000..c121e4c1
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/negation/subtraction-with-minus-from-a-fully-bound-minuend-quads.json
@@ -0,0 +1,165 @@
+{
+ "type": "project",
+ "input": {
+ "type": "orderby",
+ "input": {
+ "type": "minus",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example/p1"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "b"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example/p2"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "leftjoin",
+ "input": [
+ {
+ "type": "leftjoin",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "d"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example/Sub"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "d"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example/q1"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "b"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "d"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example/q2"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ "expressions": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "a"
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "a"
+ },
+ {
+ "termType": "Variable",
+ "value": "b"
+ },
+ {
+ "termType": "Variable",
+ "value": "c"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/negation/subtraction-with-minus-from-a-partially-bound-minuend-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/negation/subtraction-with-minus-from-a-partially-bound-minuend-quads.json
new file mode 100644
index 00000000..dfdec0c3
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/negation/subtraction-with-minus-from-a-partially-bound-minuend-quads.json
@@ -0,0 +1,205 @@
+{
+ "type": "project",
+ "input": {
+ "type": "orderby",
+ "input": {
+ "type": "minus",
+ "input": [
+ {
+ "type": "leftjoin",
+ "input": [
+ {
+ "type": "leftjoin",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example/Min"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example/p1"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "b"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example/p2"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "leftjoin",
+ "input": [
+ {
+ "type": "leftjoin",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "d"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example/Sub"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "d"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example/q1"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "b"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "d"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example/q2"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ "expressions": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "a"
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "a"
+ },
+ {
+ "termType": "Variable",
+ "value": "b"
+ },
+ {
+ "termType": "Variable",
+ "value": "c"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/paths/01-simple-path-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/paths/01-simple-path-quads.json
new file mode 100644
index 00000000..11cc1f67
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/paths/01-simple-path-quads.json
@@ -0,0 +1,74 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/instance#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/schema#p1"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "var0"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "var0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/schema#p2"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "var1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "var1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/schema#p3"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "x"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/paths/02-star-path-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/paths/02-star-path-quads.json
new file mode 100644
index 00000000..44377d96
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/paths/02-star-path-quads.json
@@ -0,0 +1,53 @@
+{
+ "type": "project",
+ "input": {
+ "type": "path",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/instance#a"
+ },
+ "predicate": {
+ "type": "ZeroOrMorePath",
+ "path": {
+ "type": "seq",
+ "input": [
+ {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/schema#p1"
+ }
+ },
+ {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/schema#p2"
+ }
+ },
+ {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/schema#p3"
+ }
+ }
+ ]
+ }
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "x"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/paths/08-reverse-path-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/paths/08-reverse-path-quads.json
new file mode 100644
index 00000000..83437c53
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/paths/08-reverse-path-quads.json
@@ -0,0 +1,28 @@
+{
+ "type": "ask",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/instance#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/schema#p"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/instance#b"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/paths/09-reverse-sequence-path-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/paths/09-reverse-sequence-path-quads.json
new file mode 100644
index 00000000..f1eb8a73
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/paths/09-reverse-sequence-path-quads.json
@@ -0,0 +1,54 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/schema#p1"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "var0"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "var0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/schema#p2"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/instance#c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "x"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/paths/10-path-with-negation-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/paths/10-path-with-negation-quads.json
new file mode 100644
index 00000000..451a2339
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/paths/10-path-with-negation-quads.json
@@ -0,0 +1,37 @@
+{
+ "type": "project",
+ "input": {
+ "type": "path",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/instance#a"
+ },
+ "predicate": {
+ "type": "nps",
+ "iris": [
+ {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/schema#p1"
+ },
+ {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/schema#p2"
+ }
+ ]
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "x"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/paths/12-variable-length-path-and-two-paths-to-same-target-node-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/paths/12-variable-length-path-and-two-paths-to-same-target-node-quads.json
new file mode 100644
index 00000000..82aa2465
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/paths/12-variable-length-path-and-two-paths-to-same-target-node-quads.json
@@ -0,0 +1,46 @@
+{
+ "type": "project",
+ "input": {
+ "type": "path",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/instance#a"
+ },
+ "predicate": {
+ "type": "OneOrMorePath",
+ "path": {
+ "type": "seq",
+ "input": [
+ {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/schema#p1"
+ }
+ },
+ {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/schema#p2"
+ }
+ }
+ ]
+ }
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "x"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/paths/14-star-path-over-foaf-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/paths/14-star-path-over-foaf-quads.json
new file mode 100644
index 00000000..04526770
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/paths/14-star-path-over-foaf-quads.json
@@ -0,0 +1,59 @@
+{
+ "type": "project",
+ "input": {
+ "type": "orderby",
+ "input": {
+ "type": "path",
+ "subject": {
+ "termType": "Variable",
+ "value": "X"
+ },
+ "predicate": {
+ "type": "ZeroOrMorePath",
+ "path": {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/knows"
+ }
+ }
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "Y"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "expressions": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "X"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "Y"
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "X"
+ },
+ {
+ "termType": "Variable",
+ "value": "Y"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/paths/14-star-path-over-foafknows-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/paths/14-star-path-over-foafknows-quads.json
new file mode 100644
index 00000000..04526770
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/paths/14-star-path-over-foafknows-quads.json
@@ -0,0 +1,59 @@
+{
+ "type": "project",
+ "input": {
+ "type": "orderby",
+ "input": {
+ "type": "path",
+ "subject": {
+ "termType": "Variable",
+ "value": "X"
+ },
+ "predicate": {
+ "type": "ZeroOrMorePath",
+ "path": {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/knows"
+ }
+ }
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "Y"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "expressions": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "X"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "Y"
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "X"
+ },
+ {
+ "termType": "Variable",
+ "value": "Y"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/paths/28a-diamond-with-loop-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/paths/28a-diamond-with-loop-quads.json
new file mode 100644
index 00000000..62938da0
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/paths/28a-diamond-with-loop-quads.json
@@ -0,0 +1,46 @@
+{
+ "type": "project",
+ "input": {
+ "type": "path",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example/a"
+ },
+ "predicate": {
+ "type": "ZeroOrOnePath",
+ "path": {
+ "type": "seq",
+ "input": [
+ {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://example/p"
+ }
+ },
+ {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://example/p"
+ }
+ }
+ ]
+ }
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "t"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "t"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/paths/30-operator-precedence-1-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/paths/30-operator-precedence-1-quads.json
new file mode 100644
index 00000000..e1ea7b85
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/paths/30-operator-precedence-1-quads.json
@@ -0,0 +1,62 @@
+{
+ "type": "project",
+ "input": {
+ "type": "path",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/a"
+ },
+ "predicate": {
+ "type": "alt",
+ "input": [
+ {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/p1"
+ }
+ },
+ {
+ "type": "seq",
+ "input": [
+ {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/p2"
+ }
+ },
+ {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/p3"
+ }
+ }
+ ]
+ },
+ {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/p4"
+ }
+ }
+ ]
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "t"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "t"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/paths/31-operator-precedence-2-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/paths/31-operator-precedence-2-quads.json
new file mode 100644
index 00000000..d03e78f7
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/paths/31-operator-precedence-2-quads.json
@@ -0,0 +1,82 @@
+{
+ "type": "project",
+ "input": {
+ "type": "join",
+ "input": [
+ {
+ "type": "path",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/a"
+ },
+ "predicate": {
+ "type": "alt",
+ "input": [
+ {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/p1"
+ }
+ },
+ {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/p2"
+ }
+ }
+ ]
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "var0"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "path",
+ "subject": {
+ "termType": "Variable",
+ "value": "var0"
+ },
+ "predicate": {
+ "type": "alt",
+ "input": [
+ {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/p3"
+ }
+ },
+ {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/p4"
+ }
+ }
+ ]
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "t"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "t"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/paths/32-operator-precedence-3-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/paths/32-operator-precedence-3-quads.json
new file mode 100644
index 00000000..7b22d376
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/paths/32-operator-precedence-3-quads.json
@@ -0,0 +1,65 @@
+{
+ "type": "project",
+ "input": {
+ "type": "path",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/a"
+ },
+ "predicate": {
+ "type": "alt",
+ "input": [
+ {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/p0"
+ }
+ },
+ {
+ "type": "seq",
+ "input": [
+ {
+ "type": "inv",
+ "path": {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/p1"
+ }
+ }
+ },
+ {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/p2"
+ }
+ }
+ ]
+ },
+ {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/p3"
+ }
+ }
+ ]
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "t"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "t"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/paths/33-operator-precedence-4-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/paths/33-operator-precedence-4-quads.json
new file mode 100644
index 00000000..75418d8c
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/paths/33-operator-precedence-4-quads.json
@@ -0,0 +1,70 @@
+{
+ "type": "project",
+ "input": {
+ "type": "path",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/a"
+ },
+ "predicate": {
+ "type": "alt",
+ "input": [
+ {
+ "type": "seq",
+ "input": [
+ {
+ "type": "alt",
+ "input": [
+ {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/p0"
+ }
+ },
+ {
+ "type": "inv",
+ "path": {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/p1"
+ }
+ }
+ }
+ ]
+ },
+ {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/p2"
+ }
+ }
+ ]
+ },
+ {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/p3"
+ }
+ }
+ ]
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "t"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "t"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/paths/37-nested-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/paths/37-nested-quads.json
new file mode 100644
index 00000000..3b9c839f
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/paths/37-nested-quads.json
@@ -0,0 +1,50 @@
+{
+ "type": "project",
+ "input": {
+ "type": "orderby",
+ "input": {
+ "type": "path",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.org/A0"
+ },
+ "predicate": {
+ "type": "ZeroOrMorePath",
+ "path": {
+ "type": "ZeroOrMorePath",
+ "path": {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://example.org/P"
+ }
+ }
+ }
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "X"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "expressions": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "X"
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "X"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/paths/path-union-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/paths/path-union-quads.json
new file mode 100644
index 00000000..a94af203
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/paths/path-union-quads.json
@@ -0,0 +1,98 @@
+{
+ "type": "project",
+ "input": {
+ "type": "union",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "item"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.wikidata.org/prop/direct/P31"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.wikidata.org/entity/Q486972"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "join",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "item"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.wikidata.org/prop/direct/P31"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "instanceOf"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "path",
+ "subject": {
+ "termType": "Variable",
+ "value": "instanceOf"
+ },
+ "predicate": {
+ "type": "OneOrMorePath",
+ "path": {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://www.wikidata.org/prop/direct/P279"
+ }
+ }
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.wikidata.org/entity/Q486972"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "instanceOf"
+ },
+ {
+ "termType": "Variable",
+ "value": "item"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/service/service01-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/service/service01-quads.json
new file mode 100644
index 00000000..30d0f9ac
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/service/service01-quads.json
@@ -0,0 +1,80 @@
+{
+ "type": "project",
+ "input": {
+ "type": "join",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p1"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "service",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p2"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "name": {
+ "termType": "NamedNode",
+ "value": "http://example.org/sparql"
+ },
+ "silent": false
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "s"
+ },
+ {
+ "termType": "Variable",
+ "value": "o1"
+ },
+ {
+ "termType": "Variable",
+ "value": "o2"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/service/service02-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/service/service02-quads.json
new file mode 100644
index 00000000..37509a0b
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/service/service02-quads.json
@@ -0,0 +1,88 @@
+{
+ "type": "project",
+ "input": {
+ "type": "leftjoin",
+ "input": [
+ {
+ "type": "service",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "name": {
+ "termType": "NamedNode",
+ "value": "http://example1.org/sparql"
+ },
+ "silent": false
+ },
+ {
+ "type": "service",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p2"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "name": {
+ "termType": "NamedNode",
+ "value": "http://example2.org/sparql"
+ },
+ "silent": false
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "s"
+ },
+ {
+ "termType": "Variable",
+ "value": "o1"
+ },
+ {
+ "termType": "Variable",
+ "value": "o2"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/service/service03-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/service/service03-quads.json
new file mode 100644
index 00000000..463994c5
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/service/service03-quads.json
@@ -0,0 +1,88 @@
+{
+ "type": "project",
+ "input": {
+ "type": "service",
+ "input": {
+ "type": "leftjoin",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "service",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p2"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "name": {
+ "termType": "NamedNode",
+ "value": "http://example2.org/sparql"
+ },
+ "silent": false
+ }
+ ]
+ },
+ "name": {
+ "termType": "NamedNode",
+ "value": "http://example1.org/sparql"
+ },
+ "silent": false
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "s"
+ },
+ {
+ "termType": "Variable",
+ "value": "o1"
+ },
+ {
+ "termType": "Variable",
+ "value": "o2"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/service/service04-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/service/service04-quads.json
new file mode 100644
index 00000000..a6804739
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/service/service04-quads.json
@@ -0,0 +1,102 @@
+{
+ "type": "project",
+ "input": {
+ "type": "join",
+ "input": [
+ {
+ "type": "leftjoin",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p1"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "service",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/knows"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "name": {
+ "termType": "NamedNode",
+ "value": "http://example.org/sparql"
+ },
+ "silent": false
+ }
+ ]
+ },
+ {
+ "type": "values",
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o2"
+ }
+ ],
+ "bindings": [
+ {
+ "o2": {
+ "termType": "NamedNode",
+ "value": "http://example.org/b"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "s"
+ },
+ {
+ "termType": "Variable",
+ "value": "o1"
+ },
+ {
+ "termType": "Variable",
+ "value": "o2"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/service/service05-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/service/service05-quads.json
new file mode 100644
index 00000000..86ba7859
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/service/service05-quads.json
@@ -0,0 +1,126 @@
+{
+ "type": "project",
+ "input": {
+ "type": "join",
+ "input": [
+ {
+ "type": "filter",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://purl.org/dc/elements/1.1/subject"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "projectSubject"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://rdfs.org/ns/void#sparqlEndpoint"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "service"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "regex",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "projectSubject"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "remote",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "type": "service",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "project"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://usefulinc.com/ns/doap#name"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "title"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "name": {
+ "termType": "Variable",
+ "value": "service"
+ },
+ "silent": false
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "service"
+ },
+ {
+ "termType": "Variable",
+ "value": "title"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/service/service06-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/service/service06-quads.json
new file mode 100644
index 00000000..52c7932b
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/service/service06-quads.json
@@ -0,0 +1,88 @@
+{
+ "type": "project",
+ "input": {
+ "type": "service",
+ "input": {
+ "type": "leftjoin",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "service",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p2"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "name": {
+ "termType": "NamedNode",
+ "value": "http://invalid.endpoint.org/sparql"
+ },
+ "silent": true
+ }
+ ]
+ },
+ "name": {
+ "termType": "NamedNode",
+ "value": "http://example1.org/sparql"
+ },
+ "silent": false
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "s"
+ },
+ {
+ "termType": "Variable",
+ "value": "o1"
+ },
+ {
+ "termType": "Variable",
+ "value": "o2"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/service/service07-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/service/service07-quads.json
new file mode 100644
index 00000000..e2e30718
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/service/service07-quads.json
@@ -0,0 +1,80 @@
+{
+ "type": "project",
+ "input": {
+ "type": "join",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "service",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p2"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "name": {
+ "termType": "NamedNode",
+ "value": "http://invalid.endpoint.org/sparql"
+ },
+ "silent": true
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "s"
+ },
+ {
+ "termType": "Variable",
+ "value": "o1"
+ },
+ {
+ "termType": "Variable",
+ "value": "o2"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/subqueries/06-subquery-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/subqueries/06-subquery-quads.json
new file mode 100644
index 00000000..50b54865
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/subqueries/06-subquery-quads.json
@@ -0,0 +1,51 @@
+{
+ "type": "project",
+ "input": {
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "y"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "x"
+ },
+ {
+ "termType": "Variable",
+ "value": "y"
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "x"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/subqueries/08-subquery-with-aggregate-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/subqueries/08-subquery-with-aggregate-quads.json
new file mode 100644
index 00000000..d7dcad97
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/subqueries/08-subquery-with-aggregate-quads.json
@@ -0,0 +1,116 @@
+{
+ "type": "project",
+ "input": {
+ "type": "join",
+ "input": [
+ {
+ "type": "project",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "group",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/schema#p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "y"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [],
+ "aggregates": [
+ {
+ "type": "expression",
+ "subType": "aggregate",
+ "aggregator": "max",
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "y"
+ }
+ },
+ "distinct": false,
+ "variable": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ ]
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "max"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "max"
+ }
+ ]
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/schema#p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "max"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "x"
+ },
+ {
+ "termType": "Variable",
+ "value": "max"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/subqueries/09-nested-subqueries-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/subqueries/09-nested-subqueries-quads.json
new file mode 100644
index 00000000..e851a62d
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/subqueries/09-nested-subqueries-quads.json
@@ -0,0 +1,86 @@
+{
+ "type": "project",
+ "input": {
+ "type": "join",
+ "input": [
+ {
+ "type": "project",
+ "input": {
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/schema#q"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "t"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "x"
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "x"
+ }
+ ]
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/schema#p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "y"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "x"
+ },
+ {
+ "termType": "Variable",
+ "value": "y"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/subqueries/11-subquery-limit-per-resource-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/subqueries/11-subquery-limit-per-resource-quads.json
new file mode 100644
index 00000000..cbd4e8b1
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/subqueries/11-subquery-limit-per-resource-quads.json
@@ -0,0 +1,127 @@
+{
+ "type": "project",
+ "input": {
+ "type": "orderby",
+ "input": {
+ "type": "join",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2000/01/rdf-schema#label"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "L"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "O"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.example.orghasItem"
+ },
+ "object": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "slice",
+ "input": {
+ "type": "distinct",
+ "input": {
+ "type": "project",
+ "input": {
+ "type": "orderby",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "O"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.example.orgOrder"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "expressions": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "O"
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "O"
+ }
+ ]
+ }
+ },
+ "start": 0,
+ "length": 2
+ }
+ ]
+ },
+ "expressions": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "L"
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "L"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/syntax/aggregate-15-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/syntax/aggregate-15-quads.json
new file mode 100644
index 00000000..75624028
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/syntax/aggregate-15-quads.json
@@ -0,0 +1,53 @@
+{
+ "type": "project",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "group",
+ "input": {
+ "type": "bgp",
+ "patterns": []
+ },
+ "variables": [],
+ "aggregates": [
+ {
+ "type": "expression",
+ "subType": "aggregate",
+ "aggregator": "group_concat",
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "x"
+ }
+ },
+ "separator": ";",
+ "distinct": false,
+ "variable": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ ]
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "y"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "y"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/syntax/bindscope1-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/syntax/bindscope1-quads.json
new file mode 100644
index 00000000..fc48b935
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/syntax/bindscope1-quads.json
@@ -0,0 +1,102 @@
+{
+ "type": "project",
+ "input": {
+ "type": "join",
+ "input": [
+ {
+ "type": "extend",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://www.example.orgs"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.example.orgp"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "o1"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "+",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "1",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ }
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "o"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://www.example.orgs"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.example.orgq"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ },
+ {
+ "termType": "Variable",
+ "value": "o1"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/syntax/syntax-oneof-01-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/syntax/syntax-oneof-01-quads.json
new file mode 100644
index 00000000..ecdf2b37
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/syntax/syntax-oneof-01-quads.json
@@ -0,0 +1,111 @@
+{
+ "type": "project",
+ "input": {
+ "type": "filter",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "notin",
+ "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"
+ }
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "2",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ }
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "+",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "s"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "57",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ }
+ }
+ }
+ ]
+ }
+ ]
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ },
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/syntax/syntax-oneof-03-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/syntax/syntax-oneof-03-quads.json
new file mode 100644
index 00000000..8d2b15ab
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/syntax/syntax-oneof-03-quads.json
@@ -0,0 +1,80 @@
+{
+ "type": "project",
+ "input": {
+ "type": "filter",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "in",
+ "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"
+ }
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "NamedNode",
+ "value": "x:x"
+ }
+ }
+ ]
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ },
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/syntax/syntax-subquery-02-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/syntax/syntax-subquery-02-quads.json
new file mode 100644
index 00000000..84c54ac1
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/syntax/syntax-subquery-02-quads.json
@@ -0,0 +1,59 @@
+{
+ "type": "project",
+ "input": {
+ "type": "project",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ },
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ },
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/values/01-bind-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/values/01-bind-quads.json
new file mode 100644
index 00000000..696ed8e9
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/values/01-bind-quads.json
@@ -0,0 +1,84 @@
+{
+ "type": "project",
+ "input": {
+ "type": "join",
+ "input": [
+ {
+ "type": "values",
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "book"
+ }
+ ],
+ "bindings": [
+ {
+ "book": {
+ "termType": "NamedNode",
+ "value": "http://example.org/book/book1"
+ }
+ }
+ ]
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "book"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://purl.org/dc/elements/1.1/title"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "title"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "book"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#price"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "price"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "book"
+ },
+ {
+ "termType": "Variable",
+ "value": "title"
+ },
+ {
+ "termType": "Variable",
+ "value": "price"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/values/post-query-values-with-2-obj-vars-1-row-with-undef-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/values/post-query-values-with-2-obj-vars-1-row-with-undef-quads.json
new file mode 100644
index 00000000..b03aa727
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/values/post-query-values-with-2-obj-vars-1-row-with-undef-quads.json
@@ -0,0 +1,92 @@
+{
+ "type": "project",
+ "input": {
+ "type": "join",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p1"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p2"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "values",
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o1"
+ },
+ {
+ "termType": "Variable",
+ "value": "o2"
+ }
+ ],
+ "bindings": [
+ {
+ "o1": {
+ "termType": "Literal",
+ "value": "Alan",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "s"
+ },
+ {
+ "termType": "Variable",
+ "value": "o1"
+ },
+ {
+ "termType": "Variable",
+ "value": "o2"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/values/post-query-values-with-2-obj-vars-2-rows-with-undef-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/values/post-query-values-with-2-obj-vars-2-rows-with-undef-quads.json
new file mode 100644
index 00000000..e3db1304
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/values/post-query-values-with-2-obj-vars-2-rows-with-undef-quads.json
@@ -0,0 +1,98 @@
+{
+ "type": "project",
+ "input": {
+ "type": "join",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p1"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p2"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "values",
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o1"
+ },
+ {
+ "termType": "Variable",
+ "value": "o2"
+ }
+ ],
+ "bindings": [
+ {
+ "o2": {
+ "termType": "Literal",
+ "value": "Alan",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ }
+ },
+ {
+ "o1": {
+ "termType": "NamedNode",
+ "value": "http://example.org/b"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "s"
+ },
+ {
+ "termType": "Variable",
+ "value": "o1"
+ },
+ {
+ "termType": "Variable",
+ "value": "o2"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/values/post-query-values-with-optional-obj-var-1-row-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/values/post-query-values-with-optional-obj-var-1-row-quads.json
new file mode 100644
index 00000000..43067ff4
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/values/post-query-values-with-optional-obj-var-1-row-quads.json
@@ -0,0 +1,94 @@
+{
+ "type": "project",
+ "input": {
+ "type": "join",
+ "input": [
+ {
+ "type": "leftjoin",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p1"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/knows"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "values",
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o2"
+ }
+ ],
+ "bindings": [
+ {
+ "o2": {
+ "termType": "NamedNode",
+ "value": "http://example.org/b"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "s"
+ },
+ {
+ "termType": "Variable",
+ "value": "o1"
+ },
+ {
+ "termType": "Variable",
+ "value": "o2"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/values/post-query-values-with-subj-var-1-row-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/values/post-query-values-with-subj-var-1-row-quads.json
new file mode 100644
index 00000000..c4202e0c
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/values/post-query-values-with-subj-var-1-row-quads.json
@@ -0,0 +1,84 @@
+{
+ "type": "project",
+ "input": {
+ "type": "join",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "book"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://purl.org/dc/elements/1.1/title"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "title"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "book"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#price"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "price"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "values",
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "book"
+ }
+ ],
+ "bindings": [
+ {
+ "book": {
+ "termType": "NamedNode",
+ "value": "http://example.org/book/book1"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "book"
+ },
+ {
+ "termType": "Variable",
+ "value": "title"
+ },
+ {
+ "termType": "Variable",
+ "value": "price"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/values/post-subquery-values-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/values/post-subquery-values-quads.json
new file mode 100644
index 00000000..34242ed2
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/values/post-subquery-values-quads.json
@@ -0,0 +1,77 @@
+{
+ "type": "project",
+ "input": {
+ "type": "project",
+ "input": {
+ "type": "join",
+ "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": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "values",
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ }
+ ],
+ "bindings": [
+ {
+ "o": {
+ "termType": "NamedNode",
+ "value": "http://example.org/b"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ },
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "s"
+ },
+ {
+ "termType": "Variable",
+ "value": "o"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql-1.1/values/values-many-once-quads.json b/packages/test-utils/statics/algebra/algebra/sparql-1.1/values/values-many-once-quads.json
new file mode 100644
index 00000000..2455a10a
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql-1.1/values/values-many-once-quads.json
@@ -0,0 +1,38 @@
+{
+ "type": "project",
+ "input": {
+ "type": "values",
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "y"
+ },
+ {
+ "termType": "Variable",
+ "value": "z"
+ }
+ ],
+ "bindings": [
+ {
+ "y": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "z": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "y"
+ },
+ {
+ "termType": "Variable",
+ "value": "z"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql11-query/describe/16.4.1-quads.json b/packages/test-utils/statics/algebra/algebra/sparql11-query/describe/16.4.1-quads.json
new file mode 100644
index 00000000..4d1a81aa
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql11-query/describe/16.4.1-quads.json
@@ -0,0 +1,13 @@
+{
+ "type": "describe",
+ "input": {
+ "type": "bgp",
+ "patterns": []
+ },
+ "terms": [
+ {
+ "termType": "NamedNode",
+ "value": "http://example.org/"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql11-query/describe/16.4.2a-quads.json b/packages/test-utils/statics/algebra/algebra/sparql11-query/describe/16.4.2a-quads.json
new file mode 100644
index 00000000..73a557d8
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql11-query/describe/16.4.2a-quads.json
@@ -0,0 +1,34 @@
+{
+ "type": "describe",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/mbox"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "mailto:alice@org"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "terms": [
+ {
+ "termType": "Variable",
+ "value": "x"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql11-query/describe/16.4.2c-quads.json b/packages/test-utils/statics/algebra/algebra/sparql11-query/describe/16.4.2c-quads.json
new file mode 100644
index 00000000..5963b35f
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql11-query/describe/16.4.2c-quads.json
@@ -0,0 +1,42 @@
+{
+ "type": "describe",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/knows"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "y"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "terms": [
+ {
+ "termType": "Variable",
+ "value": "x"
+ },
+ {
+ "termType": "Variable",
+ "value": "y"
+ },
+ {
+ "termType": "NamedNode",
+ "value": "http://example.org/"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql11-query/describe/star-empty-quads.json b/packages/test-utils/statics/algebra/algebra/sparql11-query/describe/star-empty-quads.json
new file mode 100644
index 00000000..26ca801b
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql11-query/describe/star-empty-quads.json
@@ -0,0 +1,8 @@
+{
+ "type": "describe",
+ "input": {
+ "type": "bgp",
+ "patterns": []
+ },
+ "terms": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql11-query/describe/star-quads.json b/packages/test-utils/statics/algebra/algebra/sparql11-query/describe/star-quads.json
new file mode 100644
index 00000000..3c081186
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql11-query/describe/star-quads.json
@@ -0,0 +1,38 @@
+{
+ "type": "describe",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "y"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "terms": [
+ {
+ "termType": "Variable",
+ "value": "x"
+ },
+ {
+ "termType": "Variable",
+ "value": "y"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql11-query/empty-quads.json b/packages/test-utils/statics/algebra/algebra/sparql11-query/empty-quads.json
new file mode 100644
index 00000000..0bb9155f
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql11-query/empty-quads.json
@@ -0,0 +1,3 @@
+{
+ "type": "nop"
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql11-query/existence-subquery-quads.json b/packages/test-utils/statics/algebra/algebra/sparql11-query/existence-subquery-quads.json
new file mode 100644
index 00000000..7a597c7c
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql11-query/existence-subquery-quads.json
@@ -0,0 +1,148 @@
+{
+ "type": "project",
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "https://mydom2#predB"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "b"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "existence",
+ "not": false,
+ "input": {
+ "type": "join",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "var0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "https://mydom2#predN"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "q"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "project",
+ "input": {
+ "type": "extend",
+ "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": "q2"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "_s"
+ }
+ }
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "var0"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "_o"
+ }
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "q2"
+ },
+ {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ ]
+ }
+ ]
+ }
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "s"
+ },
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "o"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql11-query/filter-union-quads.json b/packages/test-utils/statics/algebra/algebra/sparql11-query/filter-union-quads.json
new file mode 100644
index 00000000..f1e5d560
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql11-query/filter-union-quads.json
@@ -0,0 +1,63 @@
+{
+ "type": "project",
+ "input": {
+ "type": "union",
+ "input": [
+ {
+ "type": "filter",
+ "input": {
+ "type": "bgp",
+ "patterns": []
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "false",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#boolean"
+ }
+ }
+ }
+ },
+ {
+ "type": "filter",
+ "input": {
+ "type": "bgp",
+ "patterns": []
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "this"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "NamedNode",
+ "value": "http://example.org/InvalidResource"
+ }
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "this"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql11-query/from/13.2.1-quads.json b/packages/test-utils/statics/algebra/algebra/sparql11-query/from/13.2.1-quads.json
new file mode 100644
index 00000000..b94a2fce
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql11-query/from/13.2.1-quads.json
@@ -0,0 +1,44 @@
+{
+ "type": "from",
+ "input": {
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/name"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "name"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "name"
+ }
+ ]
+ },
+ "default": [
+ {
+ "termType": "NamedNode",
+ "value": "http://example.org/foaf/aliceFoaf"
+ }
+ ],
+ "named": []
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql11-query/from/13.2.2-quads.json b/packages/test-utils/statics/algebra/algebra/sparql11-query/from/13.2.2-quads.json
new file mode 100644
index 00000000..943b2e7e
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql11-query/from/13.2.2-quads.json
@@ -0,0 +1,48 @@
+{
+ "type": "from",
+ "input": {
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/name"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "name"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "name"
+ }
+ ]
+ },
+ "default": [],
+ "named": [
+ {
+ "termType": "NamedNode",
+ "value": "http://example.org/alice"
+ },
+ {
+ "termType": "NamedNode",
+ "value": "http://example.org/bob"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql11-query/from/13.2.3-quads.json b/packages/test-utils/statics/algebra/algebra/sparql11-query/from/13.2.3-quads.json
new file mode 100644
index 00000000..6d107fed
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql11-query/from/13.2.3-quads.json
@@ -0,0 +1,81 @@
+{
+ "type": "from",
+ "input": {
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://purl.org/dc/elements/1.1/publisher"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "who"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/mbox"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "mbox"
+ },
+ "graph": {
+ "termType": "Variable",
+ "value": "g"
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "who"
+ },
+ {
+ "termType": "Variable",
+ "value": "g"
+ },
+ {
+ "termType": "Variable",
+ "value": "mbox"
+ }
+ ]
+ },
+ "default": [
+ {
+ "termType": "NamedNode",
+ "value": "http://example.org/dft.ttl"
+ }
+ ],
+ "named": [
+ {
+ "termType": "NamedNode",
+ "value": "http://example.org/alice"
+ },
+ {
+ "termType": "NamedNode",
+ "value": "http://example.org/bob"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql11-query/from/13.3.1-quads.json b/packages/test-utils/statics/algebra/algebra/sparql11-query/from/13.3.1-quads.json
new file mode 100644
index 00000000..1cbac971
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql11-query/from/13.3.1-quads.json
@@ -0,0 +1,72 @@
+{
+ "type": "from",
+ "input": {
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/mbox"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "mailto:bob@work.example"
+ },
+ "graph": {
+ "termType": "Variable",
+ "value": "src"
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/nick"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "bobNick"
+ },
+ "graph": {
+ "termType": "Variable",
+ "value": "src"
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "src"
+ },
+ {
+ "termType": "Variable",
+ "value": "bobNick"
+ }
+ ]
+ },
+ "default": [],
+ "named": [
+ {
+ "termType": "NamedNode",
+ "value": "http://example.org/foaf/aliceFoaf"
+ },
+ {
+ "termType": "NamedNode",
+ "value": "http://example.org/foaf/bobFoaf"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql11-query/from/13.3.2-quads.json b/packages/test-utils/statics/algebra/algebra/sparql11-query/from/13.3.2-quads.json
new file mode 100644
index 00000000..8010b45e
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql11-query/from/13.3.2-quads.json
@@ -0,0 +1,68 @@
+{
+ "type": "from",
+ "input": {
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/mbox"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "mailto:bob@work.example"
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example.org/foaf/bobFoaf"
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/nick"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "nick"
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example.org/foaf/bobFoaf"
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "nick"
+ }
+ ]
+ },
+ "default": [],
+ "named": [
+ {
+ "termType": "NamedNode",
+ "value": "http://example.org/foaf/aliceFoaf"
+ },
+ {
+ "termType": "NamedNode",
+ "value": "http://example.org/foaf/bobFoaf"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql11-query/from/13.3.3-quads.json b/packages/test-utils/statics/algebra/algebra/sparql11-query/from/13.3.3-quads.json
new file mode 100644
index 00000000..2c88d1d1
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql11-query/from/13.3.3-quads.json
@@ -0,0 +1,176 @@
+{
+ "type": "from",
+ "input": {
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "alice"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/mbox"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "mailto:alice@work.example"
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example.org/foaf/aliceFoaf"
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "alice"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/knows"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "whom"
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example.org/foaf/aliceFoaf"
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "whom"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/mbox"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "mbox"
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example.org/foaf/aliceFoaf"
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "whom"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2000/01/rdf-schema#seeAlso"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "ppd"
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example.org/foaf/aliceFoaf"
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "ppd"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/PersonalProfileDocument"
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example.org/foaf/aliceFoaf"
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "w"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/mbox"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "mbox"
+ },
+ "graph": {
+ "termType": "Variable",
+ "value": "ppd"
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "w"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/nick"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "nick"
+ },
+ "graph": {
+ "termType": "Variable",
+ "value": "ppd"
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "mbox"
+ },
+ {
+ "termType": "Variable",
+ "value": "nick"
+ },
+ {
+ "termType": "Variable",
+ "value": "ppd"
+ }
+ ]
+ },
+ "default": [],
+ "named": [
+ {
+ "termType": "NamedNode",
+ "value": "http://example.org/foaf/aliceFoaf"
+ },
+ {
+ "termType": "NamedNode",
+ "value": "http://example.org/foaf/bobFoaf"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql11-query/from/13.3.4-quads.json b/packages/test-utils/statics/algebra/algebra/sparql11-query/from/13.3.4-quads.json
new file mode 100644
index 00000000..0208594f
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql11-query/from/13.3.4-quads.json
@@ -0,0 +1,102 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://purl.org/dc/elements/1.1/publisher"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "name"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "g"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://purl.org/dc/elements/1.1/date"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "date"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "person"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/name"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "name"
+ },
+ "graph": {
+ "termType": "Variable",
+ "value": "g"
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "person"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/mbox"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "mbox"
+ },
+ "graph": {
+ "termType": "Variable",
+ "value": "g"
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "name"
+ },
+ {
+ "termType": "Variable",
+ "value": "mbox"
+ },
+ {
+ "termType": "Variable",
+ "value": "date"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql11-query/group-by-no-var-quads.json b/packages/test-utils/statics/algebra/algebra/sparql11-query/group-by-no-var-quads.json
new file mode 100644
index 00000000..9970c161
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql11-query/group-by-no-var-quads.json
@@ -0,0 +1,100 @@
+{
+ "type": "project",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "group",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "y"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "var1"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "str",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "x"
+ }
+ }
+ ]
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "var1"
+ }
+ ],
+ "aggregates": [
+ {
+ "type": "expression",
+ "subType": "aggregate",
+ "aggregator": "max",
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "y"
+ }
+ },
+ "distinct": false,
+ "variable": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ ]
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "yy"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "var0"
+ }
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "yy"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql11-query/negate-and-quads.json b/packages/test-utils/statics/algebra/algebra/sparql11-query/negate-and-quads.json
new file mode 100644
index 00000000..28c57bf3
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql11-query/negate-and-quads.json
@@ -0,0 +1,117 @@
+{
+ "type": "slice",
+ "input": {
+ "type": "project",
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "c"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2002/07/owl#Class"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "!",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "&&",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "bound",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "c"
+ }
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "regex",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "str",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "c"
+ }
+ }
+ ]
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "^toto",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "i",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "c"
+ }
+ ]
+ },
+ "start": 0,
+ "length": 10
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql11-query/negated-path-quads.json b/packages/test-utils/statics/algebra/algebra/sparql11-query/negated-path-quads.json
new file mode 100644
index 00000000..7e1f68fb
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql11-query/negated-path-quads.json
@@ -0,0 +1,38 @@
+{
+ "type": "slice",
+ "input": {
+ "type": "project",
+ "input": {
+ "type": "path",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://dbpedia.org/resource/12_Monkeys"
+ },
+ "predicate": {
+ "type": "nps",
+ "iris": [
+ {
+ "termType": "NamedNode",
+ "value": "http://dbpedia.org/ontology/starring"
+ }
+ ]
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "o"
+ }
+ ]
+ },
+ "start": 0,
+ "length": 100
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql11-query/nested-union-quads.json b/packages/test-utils/statics/algebra/algebra/sparql11-query/nested-union-quads.json
new file mode 100644
index 00000000..9bfbb998
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql11-query/nested-union-quads.json
@@ -0,0 +1,196 @@
+{
+ "type": "project",
+ "input": {
+ "type": "union",
+ "input": [
+ {
+ "type": "join",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xlabelA"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "pLabel"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "union",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xlabelC"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "Label"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xlabelD"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "label"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "join",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xlabelB"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "pLabel"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "union",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xlabelC"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "Label"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xlabelD"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "label"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "label"
+ },
+ {
+ "termType": "Variable",
+ "value": "Label"
+ },
+ {
+ "termType": "Variable",
+ "value": "pLabel"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql11-query/path-inverse-negation-quads.json b/packages/test-utils/statics/algebra/algebra/sparql11-query/path-inverse-negation-quads.json
new file mode 100644
index 00000000..50ec3bdc
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql11-query/path-inverse-negation-quads.json
@@ -0,0 +1,50 @@
+{
+ "type": "project",
+ "input": {
+ "type": "path",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/instance#a"
+ },
+ "predicate": {
+ "type": "alt",
+ "input": [
+ {
+ "type": "nps",
+ "iris": [
+ {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/schema#p1"
+ }
+ ]
+ },
+ {
+ "type": "inv",
+ "path": {
+ "type": "nps",
+ "iris": [
+ {
+ "termType": "NamedNode",
+ "value": "http://www.example.org/schema#p2"
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "x"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql11-query/project-filter-quads.json b/packages/test-utils/statics/algebra/algebra/sparql11-query/project-filter-quads.json
new file mode 100644
index 00000000..046560a4
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql11-query/project-filter-quads.json
@@ -0,0 +1,97 @@
+{
+ "type": "project",
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "n"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "existence",
+ "not": true,
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "x"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/q"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "m"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "=",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "n"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "m"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "n"
+ },
+ {
+ "termType": "Variable",
+ "value": "x"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql11-query/unused-extend-quads.json b/packages/test-utils/statics/algebra/algebra/sparql11-query/unused-extend-quads.json
new file mode 100644
index 00000000..18831483
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql11-query/unused-extend-quads.json
@@ -0,0 +1,99 @@
+{
+ "type": "project",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "extend",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://mydom#startTime"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "st"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://mydom#endTime"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "et"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "duration"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "-",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "et"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "st"
+ }
+ }
+ ]
+ }
+ },
+ "variable": {
+ "termType": "Variable",
+ "value": "d"
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "duration"
+ }
+ }
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "d"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql11-query/update/clear-drop-quads.json b/packages/test-utils/statics/algebra/algebra/sparql11-query/update/clear-drop-quads.json
new file mode 100644
index 00000000..0e95dea8
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql11-query/update/clear-drop-quads.json
@@ -0,0 +1,74 @@
+{
+ "type": "compositeupdate",
+ "updates": [
+ {
+ "type": "create",
+ "source": {
+ "termType": "NamedNode",
+ "value": "ex:graph"
+ },
+ "silent": true
+ },
+ {
+ "type": "create",
+ "source": {
+ "termType": "NamedNode",
+ "value": "ex:graph"
+ }
+ },
+ {
+ "type": "clear",
+ "source": {
+ "termType": "NamedNode",
+ "value": "ex:graph"
+ },
+ "silent": true
+ },
+ {
+ "type": "clear",
+ "source": {
+ "termType": "NamedNode",
+ "value": "ex:graph"
+ }
+ },
+ {
+ "type": "clear",
+ "source": "DEFAULT"
+ },
+ {
+ "type": "clear",
+ "source": "NAMED"
+ },
+ {
+ "type": "clear",
+ "source": "ALL"
+ },
+ {
+ "type": "drop",
+ "source": {
+ "termType": "NamedNode",
+ "value": "ex:graph"
+ },
+ "silent": true
+ },
+ {
+ "type": "drop",
+ "source": {
+ "termType": "NamedNode",
+ "value": "ex:graph"
+ }
+ },
+ {
+ "type": "drop",
+ "source": "DEFAULT"
+ },
+ {
+ "type": "drop",
+ "source": "NAMED"
+ },
+ {
+ "type": "drop",
+ "source": "ALL"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql11-query/update/insert-blank-where.json b/packages/test-utils/statics/algebra/algebra/sparql11-query/update/insert-blank-where.json
new file mode 100644
index 00000000..b6cb97b1
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql11-query/update/insert-blank-where.json
@@ -0,0 +1,50 @@
+{
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "class"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2000/01/rdf-schema#Class"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ],
+ "where": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "class"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql11-query/update/insert-blanks.json b/packages/test-utils/statics/algebra/algebra/sparql11-query/update/insert-blanks.json
new file mode 100644
index 00000000..bb0ac897
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql11-query/update/insert-blanks.json
@@ -0,0 +1,53 @@
+{
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "e_b"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://purl.org/dc/elements/1.1/title"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "A new book",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "e_b"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://purl.org/dc/elements/1.1/creator"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "A.N.Other",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql11-query/update/load-into-quads.json b/packages/test-utils/statics/algebra/algebra/sparql11-query/update/load-into-quads.json
new file mode 100644
index 00000000..758d75c1
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql11-query/update/load-into-quads.json
@@ -0,0 +1,11 @@
+{
+ "type": "load",
+ "source": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/TR/skos-reference/skos.rdf"
+ },
+ "destination": {
+ "termType": "NamedNode",
+ "value": "urn:namespaces:skos"
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql11-query/update/load-quads.json b/packages/test-utils/statics/algebra/algebra/sparql11-query/update/load-quads.json
new file mode 100644
index 00000000..ea77c14e
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql11-query/update/load-quads.json
@@ -0,0 +1,7 @@
+{
+ "type": "load",
+ "source": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/TR/skos-reference/skos.rdf"
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql11-query/update/sparql-update-1-1-1.json b/packages/test-utils/statics/algebra/algebra/sparql11-query/update/sparql-update-1-1-1.json
new file mode 100644
index 00000000..826a58c6
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql11-query/update/sparql-update-1-1-1.json
@@ -0,0 +1,29 @@
+{
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example/egbook"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://purl.org/dc/elements/1.1/title"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "This is an example title",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql11-query/update/sparql-update-3-1-1a.json b/packages/test-utils/statics/algebra/algebra/sparql11-query/update/sparql-update-3-1-1a.json
new file mode 100644
index 00000000..412b1720
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql11-query/update/sparql-update-3-1-1a.json
@@ -0,0 +1,53 @@
+{
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example/book1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://purl.org/dc/elements/1.1/title"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "A new book",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example/book1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://purl.org/dc/elements/1.1/creator"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "A.N.Other",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql11-query/update/sparql-update-3-1-1b.json b/packages/test-utils/statics/algebra/algebra/sparql11-query/update/sparql-update-3-1-1b.json
new file mode 100644
index 00000000..9512517e
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql11-query/update/sparql-update-3-1-1b.json
@@ -0,0 +1,29 @@
+{
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example/book1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.org/ns#price"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "42",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#integer"
+ }
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example/bookStore"
+ }
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql11-query/update/sparql-update-3-1-2a.json b/packages/test-utils/statics/algebra/algebra/sparql11-query/update/sparql-update-3-1-2a.json
new file mode 100644
index 00000000..694c57f7
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql11-query/update/sparql-update-3-1-2a.json
@@ -0,0 +1,53 @@
+{
+ "type": "deleteinsert",
+ "delete": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example/book2"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://purl.org/dc/elements/1.1/title"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "David Copperfield",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example/book2"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://purl.org/dc/elements/1.1/creator"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Edmund Wells",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql11-query/update/sparql-update-3-1-2b.json b/packages/test-utils/statics/algebra/algebra/sparql11-query/update/sparql-update-3-1-2b.json
new file mode 100644
index 00000000..43cc3e82
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql11-query/update/sparql-update-3-1-2b.json
@@ -0,0 +1,63 @@
+{
+ "type": "compositeupdate",
+ "updates": [
+ {
+ "type": "deleteinsert",
+ "delete": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example/book1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://purl.org/dc/elements/1.1/title"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Fundamentals of Compiler Desing",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example/bookStore"
+ }
+ }
+ ]
+ },
+ {
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example/book1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://purl.org/dc/elements/1.1/title"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Fundamentals of Compiler Design",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example/bookStore"
+ }
+ }
+ ]
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql11-query/update/sparql-update-3-1-3-1a.json b/packages/test-utils/statics/algebra/algebra/sparql11-query/update/sparql-update-3-1-3-1a.json
new file mode 100644
index 00000000..09312f31
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql11-query/update/sparql-update-3-1-3-1a.json
@@ -0,0 +1,100 @@
+{
+ "type": "deleteinsert",
+ "delete": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "book"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "v"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ],
+ "where": {
+ "type": "filter",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "book"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://purl.org/dc/elements/1.1/date"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "date"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "book"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "v"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": ">",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "date"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "1970-01-01T00:00:00-02:00",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#dateTime"
+ }
+ }
+ }
+ ]
+ }
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql11-query/update/sparql-update-3-1-3-1b.json b/packages/test-utils/statics/algebra/algebra/sparql11-query/update/sparql-update-3-1-3-1b.json
new file mode 100644
index 00000000..ea0534fa
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql11-query/update/sparql-update-3-1-3-1b.json
@@ -0,0 +1,81 @@
+{
+ "type": "deleteinsert",
+ "delete": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "person"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "property"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "value"
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example/addresses"
+ }
+ }
+ ],
+ "where": {
+ "type": "graph",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "person"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "property"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "value"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "person"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/givenName"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Fred",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "name": {
+ "termType": "NamedNode",
+ "value": "http://example/addresses"
+ }
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql11-query/update/sparql-update-3-1-3-2a.json b/packages/test-utils/statics/algebra/algebra/sparql11-query/update/sparql-update-3-1-3-2a.json
new file mode 100644
index 00000000..63f7a007
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql11-query/update/sparql-update-3-1-3-2a.json
@@ -0,0 +1,107 @@
+{
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "book"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "v"
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example/bookStore2"
+ }
+ }
+ ],
+ "where": {
+ "type": "graph",
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "book"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://purl.org/dc/elements/1.1/date"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "date"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "book"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "v"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": ">",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "date"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "1970-01-01T00:00:00-02:00",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#dateTime"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "name": {
+ "termType": "NamedNode",
+ "value": "http://example/bookStore"
+ }
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql11-query/update/sparql-update-3-1-3-2b.json b/packages/test-utils/statics/algebra/algebra/sparql11-query/update/sparql-update-3-1-3-2b.json
new file mode 100644
index 00000000..c4165c81
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql11-query/update/sparql-update-3-1-3-2b.json
@@ -0,0 +1,107 @@
+{
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "person"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/name"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "name"
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example/addresses"
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "person"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/mbox"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "email"
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example/addresses"
+ }
+ }
+ ],
+ "where": {
+ "type": "graph",
+ "input": {
+ "type": "leftjoin",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "person"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/name"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "name"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "person"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/mbox"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "email"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "name": {
+ "termType": "NamedNode",
+ "value": "http://example/people"
+ }
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql11-query/update/sparql-update-3-1-3-2c.json b/packages/test-utils/statics/algebra/algebra/sparql11-query/update/sparql-update-3-1-3-2c.json
new file mode 100644
index 00000000..eb55473d
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql11-query/update/sparql-update-3-1-3-2c.json
@@ -0,0 +1,239 @@
+{
+ "type": "compositeupdate",
+ "updates": [
+ {
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "book"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "v"
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example/bookStore2"
+ }
+ }
+ ],
+ "where": {
+ "type": "graph",
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "book"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://purl.org/dc/elements/1.1/date"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "date"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "book"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "v"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "<",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "date"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "2000-01-01T00:00:00-02:00",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#dateTime"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "name": {
+ "termType": "NamedNode",
+ "value": "http://example/bookStore"
+ }
+ }
+ },
+ {
+ "type": "deleteinsert",
+ "delete": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "book"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "v"
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example/bookStore"
+ }
+ }
+ ],
+ "where": {
+ "type": "graph",
+ "input": {
+ "type": "filter",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "book"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://purl.org/dc/elements/1.1/date"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "date"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "book"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://purl.org/dc/elements/1.1/type"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://purl.org/dc/dcmitype/PhysicalObject"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "book"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "v"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "<",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "date"
+ }
+ },
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Literal",
+ "value": "2000-01-01T00:00:00-02:00",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#dateTime"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "name": {
+ "termType": "NamedNode",
+ "value": "http://example/bookStore"
+ }
+ }
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql11-query/update/sparql-update-3-1-3-3a.json b/packages/test-utils/statics/algebra/algebra/sparql11-query/update/sparql-update-3-1-3-3a.json
new file mode 100644
index 00000000..347f3ce7
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql11-query/update/sparql-update-3-1-3-3a.json
@@ -0,0 +1,98 @@
+{
+ "type": "deleteinsert",
+ "delete": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "person"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/givenName"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Fred",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "person"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "property"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "value"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ],
+ "where": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "person"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/givenName"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Fred",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "person"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "property"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "value"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql11-query/update/sparql-update-3-1-3-3b.json b/packages/test-utils/statics/algebra/algebra/sparql11-query/update/sparql-update-3-1-3-3b.json
new file mode 100644
index 00000000..e53c1c54
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql11-query/update/sparql-update-3-1-3-3b.json
@@ -0,0 +1,138 @@
+{
+ "type": "deleteinsert",
+ "delete": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "person"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/givenName"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Fred",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example.com/names"
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "person"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "property1"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "value1"
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example.com/names"
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "person"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "property2"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "value2"
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example.com/addresses"
+ }
+ }
+ ],
+ "where": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "person"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/givenName"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Fred",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example.com/names"
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "person"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "property1"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "value1"
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example.com/names"
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "person"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "property2"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "value2"
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example.com/addresses"
+ }
+ }
+ ]
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql11-query/update/sparql-update-3-1-3.json b/packages/test-utils/statics/algebra/algebra/sparql11-query/update/sparql-update-3-1-3.json
new file mode 100644
index 00000000..47e9c70d
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql11-query/update/sparql-update-3-1-3.json
@@ -0,0 +1,91 @@
+{
+ "type": "deleteinsert",
+ "delete": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "person"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/givenName"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Bill",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example/addresses"
+ }
+ }
+ ],
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "person"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/givenName"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "William",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "http://example/addresses"
+ }
+ }
+ ],
+ "where": {
+ "type": "graph",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "person"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://xmlns.com/foaf/0.1/givenName"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Bill",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "name": {
+ "termType": "NamedNode",
+ "value": "http://example/addresses"
+ }
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql11-query/update/sparql-update-3-2-3-quads.json b/packages/test-utils/statics/algebra/algebra/sparql11-query/update/sparql-update-3-2-3-quads.json
new file mode 100644
index 00000000..76fa3d37
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql11-query/update/sparql-update-3-2-3-quads.json
@@ -0,0 +1,8 @@
+{
+ "type": "copy",
+ "source": "DEFAULT",
+ "destination": {
+ "termType": "NamedNode",
+ "value": "http://example.org/named"
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql11-query/update/sparql-update-3-2-4-quads.json b/packages/test-utils/statics/algebra/algebra/sparql11-query/update/sparql-update-3-2-4-quads.json
new file mode 100644
index 00000000..8b856ab1
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql11-query/update/sparql-update-3-2-4-quads.json
@@ -0,0 +1,8 @@
+{
+ "type": "move",
+ "source": "DEFAULT",
+ "destination": {
+ "termType": "NamedNode",
+ "value": "http://example.org/named"
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql11-query/update/sparql-update-3-2-5-quads.json b/packages/test-utils/statics/algebra/algebra/sparql11-query/update/sparql-update-3-2-5-quads.json
new file mode 100644
index 00000000..aa34669f
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql11-query/update/sparql-update-3-2-5-quads.json
@@ -0,0 +1,8 @@
+{
+ "type": "add",
+ "source": "DEFAULT",
+ "destination": {
+ "termType": "NamedNode",
+ "value": "http://example.org/named"
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql11-query/update/sparql-update-4-2-4.json b/packages/test-utils/statics/algebra/algebra/sparql11-query/update/sparql-update-4-2-4.json
new file mode 100644
index 00000000..1fb84ff3
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql11-query/update/sparql-update-4-2-4.json
@@ -0,0 +1,68 @@
+{
+ "type": "deleteinsert",
+ "delete": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "S"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "O"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ],
+ "where": {
+ "type": "filter",
+ "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": ""
+ }
+ }
+ ]
+ },
+ "expression": {
+ "type": "expression",
+ "subType": "operator",
+ "operator": "isblank",
+ "args": [
+ {
+ "type": "expression",
+ "subType": "term",
+ "term": {
+ "termType": "Variable",
+ "value": "S"
+ }
+ }
+ ]
+ }
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql11-query/update/using.json b/packages/test-utils/statics/algebra/algebra/sparql11-query/update/using.json
new file mode 100644
index 00000000..be69e298
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql11-query/update/using.json
@@ -0,0 +1,65 @@
+{
+ "type": "deleteinsert",
+ "delete": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "foo:bar"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "NamedNode",
+ "value": "urn:one:graph"
+ }
+ }
+ ],
+ "where": {
+ "type": "from",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "foo:bar"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "default": [
+ {
+ "termType": "NamedNode",
+ "value": "urn:another:graph"
+ }
+ ],
+ "named": [
+ {
+ "termType": "NamedNode",
+ "value": "urn:anamed:graph"
+ }
+ ]
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-ar-langdir-quads.json b/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-ar-langdir-quads.json
new file mode 100644
index 00000000..1eb220da
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-ar-langdir-quads.json
@@ -0,0 +1,44 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Ù…Ø±ØØ¨Ø§",
+ "language": "ar",
+ "direction": "rtl",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#dirLangString"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-ar-langdir.json b/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-ar-langdir.json
index 72ec2e04..1eb220da 100644
--- a/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-ar-langdir.json
+++ b/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-ar-langdir.json
@@ -17,8 +17,8 @@
"object": {
"termType": "Literal",
"value": "Ù…Ø±ØØ¨Ø§",
- "direction": "rtl",
"language": "ar",
+ "direction": "rtl",
"datatype": {
"termType": "NamedNode",
"value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#dirLangString"
diff --git a/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-en-langdir-quads.json b/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-en-langdir-quads.json
new file mode 100644
index 00000000..559665eb
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-en-langdir-quads.json
@@ -0,0 +1,44 @@
+{
+ "type": "project",
+ "input": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "p"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "hello",
+ "language": "en",
+ "direction": "ltr",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#dirLangString"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ "variables": [
+ {
+ "termType": "Variable",
+ "value": "p"
+ },
+ {
+ "termType": "Variable",
+ "value": "s"
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-en-langdir.json b/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-en-langdir.json
index bd18dab3..559665eb 100644
--- a/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-en-langdir.json
+++ b/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-en-langdir.json
@@ -17,8 +17,8 @@
"object": {
"termType": "Literal",
"value": "hello",
- "direction": "ltr",
"language": "en",
+ "direction": "ltr",
"datatype": {
"termType": "NamedNode",
"value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#dirLangString"
diff --git a/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-anonreifier-01.json b/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-anonreifier-01.json
new file mode 100644
index 00000000..cf342069
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-anonreifier-01.json
@@ -0,0 +1,61 @@
+{
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#p"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-anonreifier-02.json b/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-anonreifier-02.json
new file mode 100644
index 00000000..9fdecef4
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-anonreifier-02.json
@@ -0,0 +1,81 @@
+{
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#p"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#p"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#y"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-anonreifier-03.json b/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-anonreifier-03.json
new file mode 100644
index 00000000..25fa2b5d
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-anonreifier-03.json
@@ -0,0 +1,234 @@
+{
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_1"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "Y"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "Z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ],
+ "where": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_2"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_2"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_3"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_2"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_3"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "Y"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "Z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-anonreifier-04.json b/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-anonreifier-04.json
new file mode 100644
index 00000000..2882becc
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-anonreifier-04.json
@@ -0,0 +1,306 @@
+{
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_2"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#s1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#p1"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "Z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_1"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "Y"
+ },
+ "object": {
+ "termType": "BlankNode",
+ "value": "g_2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ],
+ "where": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_3"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_3"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_4"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_3"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_5"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#s1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#p1"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "Z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_4"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "Y"
+ },
+ "object": {
+ "termType": "BlankNode",
+ "value": "g_5"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-anonreifier-05.json b/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-anonreifier-05.json
new file mode 100644
index 00000000..057dfd5f
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-anonreifier-05.json
@@ -0,0 +1,234 @@
+{
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "O"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "S"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "S"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_1"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "Y"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "Z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ],
+ "where": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_2"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "O"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "S"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "termType": "BlankNode",
+ "value": "g_2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_3"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "S"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "termType": "BlankNode",
+ "value": "g_2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_3"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "Y"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "Z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-anonreifier-06.json b/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-anonreifier-06.json
new file mode 100644
index 00000000..164dc3cb
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-anonreifier-06.json
@@ -0,0 +1,130 @@
+{
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#r"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#r"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#added"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Property :r",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ],
+ "where": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "var0"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "var0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#q"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-reifier-01.json b/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-reifier-01.json
new file mode 100644
index 00000000..aa685c39
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-reifier-01.json
@@ -0,0 +1,61 @@
+{
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#p"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-reifier-02.json b/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-reifier-02.json
new file mode 100644
index 00000000..f7a9d03c
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-reifier-02.json
@@ -0,0 +1,81 @@
+{
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#p"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#p"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#y"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-reifier-03.json b/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-reifier-03.json
new file mode 100644
index 00000000..066570d8
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-reifier-03.json
@@ -0,0 +1,234 @@
+{
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "Y"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "Z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ],
+ "where": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_1"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "Y"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "Z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-reifier-04.json b/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-reifier-04.json
new file mode 100644
index 00000000..9e82861d
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-reifier-04.json
@@ -0,0 +1,306 @@
+{
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "e_bnode"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "e_bnode"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "e_bnode"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#s1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#p1"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "Z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "Y"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ],
+ "where": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "e_bnode"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "e_bnode"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "e_bnode"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#s1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#p1"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "Z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_1"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "Y"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-reifier-05.json b/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-reifier-05.json
new file mode 100644
index 00000000..db8a059a
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-reifier-05.json
@@ -0,0 +1,234 @@
+{
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "O"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "S"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "S"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "Y"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "Z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ],
+ "where": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "O"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "S"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "S"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_1"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "Y"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "Z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-reifier-06.json b/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-reifier-06.json
new file mode 100644
index 00000000..f20606c3
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-reifier-06.json
@@ -0,0 +1,130 @@
+{
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#r"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#r"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#added"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Property :r",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ],
+ "where": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "var0"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "var0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#q"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-reifier-07.json b/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-reifier-07.json
new file mode 100644
index 00000000..1a9c10f2
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-reifier-07.json
@@ -0,0 +1,180 @@
+{
+ "type": "deleteinsert",
+ "delete": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#r"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#r"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#added"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Property :r",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ],
+ "where": {
+ "type": "join",
+ "input": [
+ {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#p"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "o"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "path",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "predicate": {
+ "type": "OneOrMorePath",
+ "path": {
+ "type": "link",
+ "iri": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#q1"
+ }
+ }
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "ABC",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-reifier-08.json b/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-reifier-08.json
new file mode 100644
index 00000000..7afee6ed
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-reifier-08.json
@@ -0,0 +1,175 @@
+{
+ "type": "compositeupdate",
+ "updates": [
+ {
+ "type": "deleteinsert",
+ "delete": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#p"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#p"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o1"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#added"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Test",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ },
+ {
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#p"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#p"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#o2"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#iri"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#added"
+ },
+ "object": {
+ "termType": "Literal",
+ "value": "Test",
+ "datatype": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/2001/XMLSchema#string"
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-tripleterm-01.json b/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-tripleterm-01.json
new file mode 100644
index 00000000..1fa27c58
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-tripleterm-01.json
@@ -0,0 +1,41 @@
+{
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#s"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#p"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-tripleterm-03.json b/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-tripleterm-03.json
new file mode 100644
index 00000000..d351bc86
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-tripleterm-03.json
@@ -0,0 +1,226 @@
+{
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "S"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "S"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "Y"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "Z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ],
+ "where": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_1"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "Y"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "Z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-tripleterm-04.json b/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-tripleterm-04.json
new file mode 100644
index 00000000..c2a1388a
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-tripleterm-04.json
@@ -0,0 +1,258 @@
+{
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "Y"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#s1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#p1"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "Z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ],
+ "where": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "s"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#c"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_1"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "Y"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#s1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#p1"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "Z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+}
diff --git a/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-tripleterm-05.json b/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-tripleterm-05.json
new file mode 100644
index 00000000..378d287c
--- /dev/null
+++ b/packages/test-utils/statics/algebra/algebra/sparql12/sparql-1-2-syntax-update-tripleterm-05.json
@@ -0,0 +1,226 @@
+{
+ "type": "deleteinsert",
+ "insert": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "S"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "O"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "S"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "O"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_0"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "Y"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "Z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ],
+ "where": {
+ "type": "bgp",
+ "patterns": [
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "S"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "O"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_1"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "Variable",
+ "value": "S"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "P"
+ },
+ "object": {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#a"
+ },
+ "predicate": {
+ "termType": "NamedNode",
+ "value": "http://example.com/ns#b"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "O"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ },
+ {
+ "type": "pattern",
+ "termType": "Quad",
+ "subject": {
+ "termType": "BlankNode",
+ "value": "g_1"
+ },
+ "predicate": {
+ "termType": "Variable",
+ "value": "Y"
+ },
+ "object": {
+ "termType": "Variable",
+ "value": "Z"
+ },
+ "graph": {
+ "termType": "DefaultGraph",
+ "value": ""
+ }
+ }
+ ]
+ }
+}
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/basic/01-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/basic/01-quads.sparql
new file mode 100644
index 00000000..81fe9632
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/basic/01-quads.sparql
@@ -0,0 +1,2 @@
+SELECT * WHERE {
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/basic/02-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/basic/02-quads.sparql
new file mode 100644
index 00000000..81fe9632
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/basic/02-quads.sparql
@@ -0,0 +1,2 @@
+SELECT * WHERE {
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/basic/03-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/basic/03-quads.sparql
new file mode 100644
index 00000000..00bd8ee8
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/basic/03-quads.sparql
@@ -0,0 +1,3 @@
+SELECT ?x ?y ?z WHERE {
+ ?x ?y ?z .
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/basic/04-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/basic/04-quads.sparql
new file mode 100644
index 00000000..00bd8ee8
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/basic/04-quads.sparql
@@ -0,0 +1,3 @@
+SELECT ?x ?y ?z WHERE {
+ ?x ?y ?z .
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/basic/05-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/basic/05-quads.sparql
new file mode 100644
index 00000000..89de5cd3
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/basic/05-quads.sparql
@@ -0,0 +1,4 @@
+SELECT ?a ?b ?c ?x ?y ?z WHERE {
+ ?x ?y ?z .
+ ?a ?b ?c .
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/basic/06-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/basic/06-quads.sparql
new file mode 100644
index 00000000..89de5cd3
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/basic/06-quads.sparql
@@ -0,0 +1,4 @@
+SELECT ?a ?b ?c ?x ?y ?z WHERE {
+ ?x ?y ?z .
+ ?a ?b ?c .
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/bnodes/01-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/bnodes/01-quads.sparql
new file mode 100644
index 00000000..7f985da1
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/bnodes/01-quads.sparql
@@ -0,0 +1,3 @@
+SELECT * WHERE {
+ _:g_0 .
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/bnodes/02-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/bnodes/02-quads.sparql
new file mode 100644
index 00000000..7f985da1
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/bnodes/02-quads.sparql
@@ -0,0 +1,3 @@
+SELECT * WHERE {
+ _:g_0 .
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/bnodes/03-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/bnodes/03-quads.sparql
new file mode 100644
index 00000000..8a57744b
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/bnodes/03-quads.sparql
@@ -0,0 +1,5 @@
+SELECT ?b ?pa ?x ?y WHERE {
+ _:g_0 ?x ?y .
+ _:g_1 ?pa ?b .
+ _:g_0 _:g_1 .
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/bnodes/04-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/bnodes/04-quads.sparql
new file mode 100644
index 00000000..7f985da1
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/bnodes/04-quads.sparql
@@ -0,0 +1,3 @@
+SELECT * WHERE {
+ _:g_0 .
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/bnodes/05-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/bnodes/05-quads.sparql
new file mode 100644
index 00000000..497d75c6
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/bnodes/05-quads.sparql
@@ -0,0 +1,4 @@
+SELECT * WHERE {
+ _:e_a .
+ _:e_a .
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/bnodes/06-clash-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/bnodes/06-clash-quads.sparql
new file mode 100644
index 00000000..7086a69b
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/bnodes/06-clash-quads.sparql
@@ -0,0 +1,5 @@
+SELECT ?b ?b0 ?b1 WHERE {
+ _:e_b ?b .
+ _:e_b ?b0 .
+ _:e_b0 ?b1 .
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/expr/01-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/expr/01-quads.sparql
new file mode 100644
index 00000000..3b42a085
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/expr/01-quads.sparql
@@ -0,0 +1,4 @@
+SELECT ?o ?p ?s WHERE {
+ ?s ?p ?o .
+ FILTER ( ?o )
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/expr/02-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/expr/02-quads.sparql
new file mode 100644
index 00000000..cced0298
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/expr/02-quads.sparql
@@ -0,0 +1,4 @@
+SELECT ?o ?p ?s WHERE {
+ ?s ?p ?o .
+ FILTER ( REGEX( ?o , "foo"^^ ) )
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/expr/03-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/expr/03-quads.sparql
new file mode 100644
index 00000000..55d0b4bc
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/expr/03-quads.sparql
@@ -0,0 +1,4 @@
+SELECT ?o ?p ?s WHERE {
+ ?s ?p ?o .
+ FILTER ( REGEX( ?o , "foo"@en , "i"^^ ) )
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/expr/04-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/expr/04-quads.sparql
new file mode 100644
index 00000000..8d8f4a5c
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/expr/04-quads.sparql
@@ -0,0 +1,4 @@
+SELECT ?o ?p ?s WHERE {
+ ?s ?p ?o .
+ FILTER ( ( ?o ) )
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/expr/05-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/expr/05-quads.sparql
new file mode 100644
index 00000000..9287e44f
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/expr/05-quads.sparql
@@ -0,0 +1,4 @@
+SELECT ?o ?p ?s WHERE {
+ ?s ?p ?o .
+ FILTER ( ( ?s , ?o ) )
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/forms/01-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/forms/01-quads.sparql
new file mode 100644
index 00000000..01093619
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/forms/01-quads.sparql
@@ -0,0 +1,11 @@
+SELECT ?b ?pa ?x ?y WHERE {
+ _:g_0 ?x ?y .
+ _:g_1 _:g_0 .
+ _:g_1 .
+ _:g_2 ?pa ?b .
+ _:g_3 _:g_2 .
+ _:g_3 _:g_4 .
+ _:g_4 "57"^^ .
+ _:g_4 .
+ _:g_1 _:g_3 .
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/forms/02-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/forms/02-quads.sparql
new file mode 100644
index 00000000..ff57c96b
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/forms/02-quads.sparql
@@ -0,0 +1,6 @@
+SELECT * WHERE {
+ _:g_2 _:g_0 .
+ _:g_2 _:g_3 .
+ _:g_3 _:g_1 .
+ _:g_3 .
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/limit-offset/01-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/limit-offset/01-quads.sparql
new file mode 100644
index 00000000..1da2a1a2
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/limit-offset/01-quads.sparql
@@ -0,0 +1,5 @@
+SELECT ?o ?p ?s WHERE {
+ ?s ?p ?o .
+}
+ORDER BY ASC ( ?o )
+LIMIT 5
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/limit-offset/02-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/limit-offset/02-quads.sparql
new file mode 100644
index 00000000..55736f1d
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/limit-offset/02-quads.sparql
@@ -0,0 +1,5 @@
+SELECT ?o ?p ?s WHERE {
+ ?s ?p ?o .
+}
+ORDER BY ASC ( ?o )
+LIMIT 5 OFFSET 3
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/limit-offset/03-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/limit-offset/03-quads.sparql
new file mode 100644
index 00000000..55736f1d
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/limit-offset/03-quads.sparql
@@ -0,0 +1,5 @@
+SELECT ?o ?p ?s WHERE {
+ ?s ?p ?o .
+}
+ORDER BY ASC ( ?o )
+LIMIT 5 OFFSET 3
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/limit-offset/04-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/limit-offset/04-quads.sparql
new file mode 100644
index 00000000..87d5af00
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/limit-offset/04-quads.sparql
@@ -0,0 +1,5 @@
+SELECT ?o ?p ?s WHERE {
+ ?s ?p ?o .
+}
+ORDER BY ASC ( ?o )
+OFFSET 3
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lists/01-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lists/01-quads.sparql
new file mode 100644
index 00000000..88d95d1c
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lists/01-quads.sparql
@@ -0,0 +1,5 @@
+SELECT ?x ?z WHERE {
+ _:g_0 ?x .
+ _:g_0 .
+ _:g_0 ?z .
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lists/02-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lists/02-quads.sparql
new file mode 100644
index 00000000..d18a8bd7
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lists/02-quads.sparql
@@ -0,0 +1,5 @@
+SELECT ?x ?z WHERE {
+ _:g_0 ?z .
+ _:g_0 .
+ ?x _:g_0 .
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lists/03-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lists/03-quads.sparql
new file mode 100644
index 00000000..bf76f3af
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lists/03-quads.sparql
@@ -0,0 +1,4 @@
+SELECT ?z WHERE {
+ _:g_0 ?z .
+ _:g_0 .
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lists/04-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lists/04-quads.sparql
new file mode 100644
index 00000000..ebabbbc4
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lists/04-quads.sparql
@@ -0,0 +1,6 @@
+SELECT ?z WHERE {
+ _:g_0 ?z .
+ _:g_0 .
+ _:g_1 _:g_0 .
+ _:g_1 .
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lists/05-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lists/05-quads.sparql
new file mode 100644
index 00000000..c462fb9f
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lists/05-quads.sparql
@@ -0,0 +1,4 @@
+SELECT * WHERE {
+ _:g_0 .
+ _:g_0 .
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/01-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/01-quads.sparql
new file mode 100644
index 00000000..d55f7df9
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/01-quads.sparql
@@ -0,0 +1,3 @@
+SELECT * WHERE {
+ "x"^^ .
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/02-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/02-quads.sparql
new file mode 100644
index 00000000..d55f7df9
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/02-quads.sparql
@@ -0,0 +1,3 @@
+SELECT * WHERE {
+ "x"^^ .
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/03-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/03-quads.sparql
new file mode 100644
index 00000000..f8e69d2e
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/03-quads.sparql
@@ -0,0 +1,3 @@
+SELECT * WHERE {
+ "x\"y'z"^^ .
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/04-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/04-quads.sparql
new file mode 100644
index 00000000..f8e69d2e
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/04-quads.sparql
@@ -0,0 +1,3 @@
+SELECT * WHERE {
+ "x\"y'z"^^ .
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/05-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/05-quads.sparql
new file mode 100644
index 00000000..5fbc9899
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/05-quads.sparql
@@ -0,0 +1,3 @@
+SELECT * WHERE {
+ "x\""^^ .
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/06-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/06-quads.sparql
new file mode 100644
index 00000000..b54a89ce
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/06-quads.sparql
@@ -0,0 +1,3 @@
+SELECT * WHERE {
+ "x'"^^ .
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/07-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/07-quads.sparql
new file mode 100644
index 00000000..90a70666
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/07-quads.sparql
@@ -0,0 +1,3 @@
+SELECT * WHERE {
+ "123"^^ .
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/08-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/08-quads.sparql
new file mode 100644
index 00000000..90a70666
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/08-quads.sparql
@@ -0,0 +1,3 @@
+SELECT * WHERE {
+ "123"^^ .
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/09-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/09-quads.sparql
new file mode 100644
index 00000000..0b142e30
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/09-quads.sparql
@@ -0,0 +1,3 @@
+SELECT * WHERE {
+ "Long\n\"\"\nLiteral\n"^^ .
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/10-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/10-quads.sparql
new file mode 100644
index 00000000..1c36cd23
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/10-quads.sparql
@@ -0,0 +1,3 @@
+SELECT * WHERE {
+ "Long\n'' \"\"\"\nLiteral\n"^^ .
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/11-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/11-quads.sparql
new file mode 100644
index 00000000..0c2b58d5
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/11-quads.sparql
@@ -0,0 +1,3 @@
+SELECT * WHERE {
+ "Long\"\"\"Literal"^^ .
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/12-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/12-quads.sparql
new file mode 100644
index 00000000..c5b2fefb
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/12-quads.sparql
@@ -0,0 +1,3 @@
+SELECT * WHERE {
+ "Long'''Literal"^^ .
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/13-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/13-quads.sparql
new file mode 100644
index 00000000..0c2b58d5
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/13-quads.sparql
@@ -0,0 +1,3 @@
+SELECT * WHERE {
+ "Long\"\"\"Literal"^^ .
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/14-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/14-quads.sparql
new file mode 100644
index 00000000..c5b2fefb
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/14-quads.sparql
@@ -0,0 +1,3 @@
+SELECT * WHERE {
+ "Long'''Literal"^^ .
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/15-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/15-quads.sparql
new file mode 100644
index 00000000..ecaa4886
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/15-quads.sparql
@@ -0,0 +1,3 @@
+SELECT * WHERE {
+ "Long '' Literal"^^ .
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/16-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/16-quads.sparql
new file mode 100644
index 00000000..4def5fef
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/16-quads.sparql
@@ -0,0 +1,3 @@
+SELECT * WHERE {
+ "Long ' Literal"^^ .
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/17-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/17-quads.sparql
new file mode 100644
index 00000000..613d210d
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/17-quads.sparql
@@ -0,0 +1,3 @@
+SELECT * WHERE {
+ "Long''\\Literal with '\\ single quotes "^^ .
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/18-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/18-quads.sparql
new file mode 100644
index 00000000..64b6b5d9
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/18-quads.sparql
@@ -0,0 +1,3 @@
+SELECT * WHERE {
+ "Long \"\" Literal"^^ .
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/19-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/19-quads.sparql
new file mode 100644
index 00000000..c83c8d11
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/19-quads.sparql
@@ -0,0 +1,3 @@
+SELECT * WHERE {
+ "Long \" Literal"^^ .
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/20-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/20-quads.sparql
new file mode 100644
index 00000000..1b9796a9
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/lit/20-quads.sparql
@@ -0,0 +1,3 @@
+SELECT * WHERE {
+ "Long\"\"\\Literal with \"\\ single quotes"^^ .
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/opt-filter/01-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/opt-filter/01-quads.sparql
new file mode 100644
index 00000000..db53fb56
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/opt-filter/01-quads.sparql
@@ -0,0 +1,7 @@
+SELECT ?v ?w ?x ?y WHERE {
+ ?x ?v .
+ OPTIONAL {
+ ?y ?w .
+ FILTER ( ( ?v = "2"^^ ) )
+ }
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/opt-filter/02-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/opt-filter/02-quads.sparql
new file mode 100644
index 00000000..9055e1ca
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/opt-filter/02-quads.sparql
@@ -0,0 +1,7 @@
+SELECT ?v ?w ?x ?y WHERE {
+ ?x ?v .
+ OPTIONAL {
+ ?y ?w .
+ FILTER ( ( ( ?v = "2"^^ ) && ( ?w = "3"^^ ) ) )
+ }
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/order/01-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/order/01-quads.sparql
new file mode 100644
index 00000000..acad388d
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/order/01-quads.sparql
@@ -0,0 +1,4 @@
+SELECT ?o ?p ?s WHERE {
+ ?s ?p ?o .
+}
+ORDER BY ASC ( ?o )
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/order/02-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/order/02-quads.sparql
new file mode 100644
index 00000000..61af29dc
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/order/02-quads.sparql
@@ -0,0 +1,4 @@
+SELECT ?o ?p ?s WHERE {
+ ?s ?p ?o .
+}
+ORDER BY ASC ( ( ?o + "5"^^ ) )
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/order/03-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/order/03-quads.sparql
new file mode 100644
index 00000000..acad388d
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/order/03-quads.sparql
@@ -0,0 +1,4 @@
+SELECT ?o ?p ?s WHERE {
+ ?s ?p ?o .
+}
+ORDER BY ASC ( ?o )
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/order/04-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/order/04-quads.sparql
new file mode 100644
index 00000000..1d38f219
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/order/04-quads.sparql
@@ -0,0 +1,4 @@
+SELECT ?o ?p ?s WHERE {
+ ?s ?p ?o .
+}
+ORDER BY DESC ( ?o )
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/order/05-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/order/05-quads.sparql
new file mode 100644
index 00000000..8b1154f6
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/order/05-quads.sparql
@@ -0,0 +1,4 @@
+SELECT ?o ?p ?s WHERE {
+ ?s ?p ?o .
+}
+ORDER BY DESC ( ( ?s , ?o ) )
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/order/06-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/order/06-quads.sparql
new file mode 100644
index 00000000..6b136c4a
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/order/06-quads.sparql
@@ -0,0 +1,4 @@
+SELECT ?o ?p ?s WHERE {
+ ?s ?p ?o .
+}
+ORDER BY DESC ( ( ?o + "57"^^ ) ) ASC ( ( ?o ) ) ASC ( ?s )
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/order/07-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/order/07-quads.sparql
new file mode 100644
index 00000000..6b07b084
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/order/07-quads.sparql
@@ -0,0 +1,4 @@
+SELECT ?o ?p ?s WHERE {
+ ?s ?p ?o .
+}
+ORDER BY ASC ( STR( ?o ) )
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/pat/01-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/pat/01-quads.sparql
new file mode 100644
index 00000000..81fe9632
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/pat/01-quads.sparql
@@ -0,0 +1,2 @@
+SELECT * WHERE {
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/pat/02-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/pat/02-quads.sparql
new file mode 100644
index 00000000..97298f7d
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/pat/02-quads.sparql
@@ -0,0 +1,7 @@
+SELECT ?a ?y ?z WHERE {
+ ?a .
+ OPTIONAL {
+ .
+ }
+ ?y ?z .
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/pat/03-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/pat/03-quads.sparql
new file mode 100644
index 00000000..55fd3bcd
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/pat/03-quads.sparql
@@ -0,0 +1,12 @@
+SELECT ?a WHERE {
+ OPTIONAL {
+ .
+ }
+ ?a .
+ {
+ .
+ }
+ UNION {
+ .
+ }
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/reduced/01-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/reduced/01-quads.sparql
new file mode 100644
index 00000000..a6282993
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/reduced/01-quads.sparql
@@ -0,0 +1,3 @@
+SELECT REDUCED ?x ?y ?z WHERE {
+ ?x ?y ?z .
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/struct/01-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/struct/01-quads.sparql
new file mode 100644
index 00000000..67042389
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/struct/01-quads.sparql
@@ -0,0 +1,4 @@
+SELECT * WHERE {
+ OPTIONAL {
+ }
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/struct/02-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/struct/02-quads.sparql
new file mode 100644
index 00000000..d8de8eec
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/struct/02-quads.sparql
@@ -0,0 +1,5 @@
+SELECT * WHERE {
+ OPTIONAL {
+ .
+ }
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/struct/13-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/struct/13-quads.sparql
new file mode 100644
index 00000000..8ef2d34a
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/dawg-syntax/struct/13-quads.sparql
@@ -0,0 +1,10 @@
+SELECT * WHERE {
+ .
+ OPTIONAL {
+ .
+ }
+ .
+ OPTIONAL {
+ .
+ }
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/aggregates/agg-empty-group-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/aggregates/agg-empty-group-quads.sparql
new file mode 100644
index 00000000..f75e34da
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/aggregates/agg-empty-group-quads.sparql
@@ -0,0 +1,4 @@
+SELECT ?x ( MAX( ?value ) AS ?max ) WHERE {
+ ?x ?value .
+}
+GROUP BY ?x
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/aggregates/avg-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/aggregates/avg-quads.sparql
new file mode 100644
index 00000000..6fcfd8c9
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/aggregates/avg-quads.sparql
@@ -0,0 +1,3 @@
+SELECT ( AVG( ?o ) AS ?avg ) WHERE {
+ ?s ?o .
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/aggregates/avg-with-group-by-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/aggregates/avg-with-group-by-quads.sparql
new file mode 100644
index 00000000..5c14a29a
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/aggregates/avg-with-group-by-quads.sparql
@@ -0,0 +1,5 @@
+SELECT ?s ( AVG( ?o ) AS ?avg ) WHERE {
+ ?s ?p ?o .
+}
+GROUP BY ?s
+HAVING ( AVG( ?o ) <= "2.0"^^ )
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/aggregates/count-3-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/aggregates/count-3-quads.sparql
new file mode 100644
index 00000000..382ce20b
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/aggregates/count-3-quads.sparql
@@ -0,0 +1,5 @@
+SELECT ?P ( COUNT( ?O ) AS ?C ) WHERE {
+ ?S ?P ?O .
+}
+GROUP BY ?P
+HAVING ( COUNT( ?O ) > "2"^^ )
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/aggregates/count-8b-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/aggregates/count-8b-quads.sparql
new file mode 100644
index 00000000..097a965c
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/aggregates/count-8b-quads.sparql
@@ -0,0 +1,7 @@
+SELECT ?O12 ( COUNT( ?O1 ) AS ?C ) WHERE {
+ ?S ?O1 .
+ ?S ?O2 .
+ BIND( ( ?O1 + ?O2 ) AS ?O12 )
+}
+GROUP BY ?O12
+ORDER BY ASC ( ?O12 )
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/aggregates/error-in-avg-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/aggregates/error-in-avg-quads.sparql
new file mode 100644
index 00000000..8f276200
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/aggregates/error-in-avg-quads.sparql
@@ -0,0 +1,4 @@
+SELECT ?g ( AVG( ?p ) AS ?avg ) ( ( ( MIN( ?p ) + MAX( ?p ) ) / "2"^^ ) AS ?c ) WHERE {
+ ?g ?p .
+}
+GROUP BY ?g
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/aggregates/group-concat-1-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/aggregates/group-concat-1-quads.sparql
new file mode 100644
index 00000000..60f51627
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/aggregates/group-concat-1-quads.sparql
@@ -0,0 +1,8 @@
+ASK WHERE {
+ {
+ SELECT ( GROUP_CONCAT( ?o ;SEPARATOR=" " ) AS ?g ) WHERE {
+ _:g_0 ?o .
+ }
+ }
+ FILTER ( ( ( ?g = "1 22"^^ ) || ( ?g = "22 1"^^ ) ) )
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/aggregates/group-concat-2-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/aggregates/group-concat-2-quads.sparql
new file mode 100644
index 00000000..ebeb6fd5
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/aggregates/group-concat-2-quads.sparql
@@ -0,0 +1,9 @@
+SELECT ( COUNT( * ) AS ?c ) WHERE {
+ {
+ SELECT ?p ( GROUP_CONCAT( ?o ;SEPARATOR=" " ) AS ?g ) WHERE {
+ _:g_0 ?p ?o .
+ }
+ GROUP BY ?p
+ }
+ FILTER ( ( ( ( ?p = ) && ( ( ?g = "1 22"^^ ) || ( ?g = "22 1"^^ ) ) ) || ( ( ?p = ) && ( ( ( ( ( ( ?g = "aaa bb c"^^ ) || ( ?g = "aaa c bb"^^ ) ) || ( ?g = "bb aaa c"^^ ) ) || ( ?g = "bb c aaa"^^ ) ) || ( ?g = "c aaa bb"^^ ) ) || ( ?g = "c bb aaa"^^ ) ) ) ) )
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/aggregates/group-concat-with-separator-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/aggregates/group-concat-with-separator-quads.sparql
new file mode 100644
index 00000000..d8545b53
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/aggregates/group-concat-with-separator-quads.sparql
@@ -0,0 +1,8 @@
+ASK WHERE {
+ {
+ SELECT ( GROUP_CONCAT( ?o ;SEPARATOR=":" ) AS ?g ) WHERE {
+ _:g_0 ?o .
+ }
+ }
+ FILTER ( ( ( ?g = "1:22"^^ ) || ( ?g = "22:1"^^ ) ) )
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/aggregates/protect-from-error-in-avg-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/aggregates/protect-from-error-in-avg-quads.sparql
new file mode 100644
index 00000000..1ee5d1f1
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/aggregates/protect-from-error-in-avg-quads.sparql
@@ -0,0 +1,4 @@
+SELECT ?g ( AVG( IF( ISNUMERIC( ?p ) , ?p , COALESCE( ( ?p ) , "0"^^ ) ) ) AS ?avg ) WHERE {
+ ?g ?p .
+}
+GROUP BY ?g
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/aggregates/sample-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/aggregates/sample-quads.sparql
new file mode 100644
index 00000000..60a7538c
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/aggregates/sample-quads.sparql
@@ -0,0 +1,8 @@
+ASK WHERE {
+ {
+ SELECT ( SAMPLE( ?o ) AS ?sample ) WHERE {
+ ?s ?o .
+ }
+ }
+ FILTER ( ( ( ( ?sample = "1.0"^^ ) || ( ?sample = "2.2"^^ ) ) || ( ?sample = "3.5"^^ ) ) )
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/ask/group-concat-1-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/ask/group-concat-1-quads.sparql
new file mode 100644
index 00000000..60f51627
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/ask/group-concat-1-quads.sparql
@@ -0,0 +1,8 @@
+ASK WHERE {
+ {
+ SELECT ( GROUP_CONCAT( ?o ;SEPARATOR=" " ) AS ?g ) WHERE {
+ _:g_0 ?o .
+ }
+ }
+ FILTER ( ( ( ?g = "1 22"^^ ) || ( ?g = "22 1"^^ ) ) )
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/ask/in-1-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/ask/in-1-quads.sparql
new file mode 100644
index 00000000..59107b98
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/ask/in-1-quads.sparql
@@ -0,0 +1,3 @@
+ASK WHERE {
+ FILTER ( ( "2"^^ IN ( "1"^^ , "2"^^ , "3"^^ ) ) )
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/ask/not-in-1-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/ask/not-in-1-quads.sparql
new file mode 100644
index 00000000..b042305e
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/ask/not-in-1-quads.sparql
@@ -0,0 +1,3 @@
+ASK WHERE {
+ FILTER ( ( "2"^^ NOT IN ( ) ) )
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/ask/sparqldl-05.rq-simple-undistinguished-variable-test-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/ask/sparqldl-05.rq-simple-undistinguished-variable-test-quads.sparql
new file mode 100644
index 00000000..883c6cfc
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/ask/sparqldl-05.rq-simple-undistinguished-variable-test-quads.sparql
@@ -0,0 +1,3 @@
+ASK WHERE {
+ _:e_a .
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/ask/sparqldl-06.rq-cycle-of-undistinguished-variables-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/ask/sparqldl-06.rq-cycle-of-undistinguished-variables-quads.sparql
new file mode 100644
index 00000000..7fb3cfc4
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/ask/sparqldl-06.rq-cycle-of-undistinguished-variables-quads.sparql
@@ -0,0 +1,6 @@
+ASK WHERE {
+ _:e_aa .
+ _:e_aa _:e_dd .
+ _:e_dd _:e_bb .
+ _:e_bb .
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/ask/syn-pname-01-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/ask/syn-pname-01-quads.sparql
new file mode 100644
index 00000000..fcbeed5d
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/ask/syn-pname-01-quads.sparql
@@ -0,0 +1,2 @@
+ASK WHERE {
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/bind/01-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/bind/01-quads.sparql
new file mode 100644
index 00000000..dc685607
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/bind/01-quads.sparql
@@ -0,0 +1,3 @@
+SELECT ( ( ?o + "10"^^ ) AS ?z ) WHERE {
+ ?s ?p ?o .
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/bind/02-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/bind/02-quads.sparql
new file mode 100644
index 00000000..a635d356
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/bind/02-quads.sparql
@@ -0,0 +1,3 @@
+SELECT ?o ( ( ?o + "10"^^ ) AS ?z ) ( ( ?o + "100"^^ ) AS ?z2 ) WHERE {
+ ?s ?p ?o .
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/bind/03-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/bind/03-quads.sparql
new file mode 100644
index 00000000..4e13bdb6
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/bind/03-quads.sparql
@@ -0,0 +1,7 @@
+SELECT ?z ?s1 WHERE {
+ {
+ ?s ?p ?o .
+ BIND( ( ?o + "1"^^ ) AS ?z )
+ }
+ ?s1 ?p1 ?z .
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/bind/04-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/bind/04-quads.sparql
new file mode 100644
index 00000000..7d142d8f
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/bind/04-quads.sparql
@@ -0,0 +1,3 @@
+SELECT ?o ?p ?s ( ?nova AS ?z ) WHERE {
+ ?s ?p ?o .
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/bind/05-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/bind/05-quads.sparql
new file mode 100644
index 00000000..804c329b
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/bind/05-quads.sparql
@@ -0,0 +1,7 @@
+SELECT ?s ?p ?o ?z WHERE {
+ {
+ ?s ?p ?o .
+ BIND( ( ?o + "1"^^ ) AS ?z )
+ }
+ FILTER ( ( ?z = "3"^^ ) )
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/bind/07-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/bind/07-quads.sparql
new file mode 100644
index 00000000..e85b8dac
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/bind/07-quads.sparql
@@ -0,0 +1,9 @@
+SELECT ?s ?p ?o ?z WHERE {
+ ?s ?p ?o .
+ {
+ BIND( ( ?o + "1"^^ ) AS ?z )
+ }
+ UNION {
+ BIND( ( ?o + "2"^^ ) AS ?z )
+ }
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/bind/08-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/bind/08-quads.sparql
new file mode 100644
index 00000000..804c329b
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/bind/08-quads.sparql
@@ -0,0 +1,7 @@
+SELECT ?s ?p ?o ?z WHERE {
+ {
+ ?s ?p ?o .
+ BIND( ( ?o + "1"^^ ) AS ?z )
+ }
+ FILTER ( ( ?z = "3"^^ ) )
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/bind/10-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/bind/10-quads.sparql
new file mode 100644
index 00000000..19faf777
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/bind/10-quads.sparql
@@ -0,0 +1,9 @@
+SELECT ?s ?v ?z WHERE {
+ {
+ BIND( "4"^^ AS ?z )
+ }
+ {
+ ?s ?v .
+ FILTER ( ( ?v = ?z ) )
+ }
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/bind/11-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/bind/11-quads.sparql
new file mode 100644
index 00000000..c5b4e7bf
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/bind/11-quads.sparql
@@ -0,0 +1,7 @@
+SELECT ?s ?v ?z WHERE {
+ {
+ BIND( "4"^^ AS ?z )
+ }
+ ?s ?v .
+ FILTER ( ( ?v = ?z ) )
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/construct/construct-from-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/construct/construct-from-quads.sparql
new file mode 100644
index 00000000..13f2991b
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/construct/construct-from-quads.sparql
@@ -0,0 +1,7 @@
+CONSTRUCT {
+ ?s ?p ?o .
+}
+FROM WHERE {
+ ?s ?p ?o .
+}
+LIMIT 100
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/construct/construct-slice-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/construct/construct-slice-quads.sparql
new file mode 100644
index 00000000..0137b4ca
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/construct/construct-slice-quads.sparql
@@ -0,0 +1,7 @@
+CONSTRUCT {
+ ?s ?p ?o .
+}
+WHERE {
+ ?s ?p ?o .
+}
+LIMIT 100
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/construct/constructwhere01-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/construct/constructwhere01-quads.sparql
new file mode 100644
index 00000000..c20b63c8
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/construct/constructwhere01-quads.sparql
@@ -0,0 +1,6 @@
+CONSTRUCT {
+ ?s ?p ?o .
+}
+WHERE {
+ ?s ?p ?o .
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/construct/constructwhere02-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/construct/constructwhere02-quads.sparql
new file mode 100644
index 00000000..380ea468
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/construct/constructwhere02-quads.sparql
@@ -0,0 +1,8 @@
+CONSTRUCT {
+ ?o .
+ ?s2 ?o .
+}
+WHERE {
+ ?o .
+ ?s2 ?o .
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/construct/constructwhere03-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/construct/constructwhere03-quads.sparql
new file mode 100644
index 00000000..204f4d2f
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/construct/constructwhere03-quads.sparql
@@ -0,0 +1,8 @@
+CONSTRUCT {
+ ?o1 .
+ ?o2 .
+}
+WHERE {
+ ?o1 .
+ ?o2 .
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/construct/constructwhere05-modified-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/construct/constructwhere05-modified-quads.sparql
new file mode 100644
index 00000000..5937d55c
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/construct/constructwhere05-modified-quads.sparql
@@ -0,0 +1,9 @@
+CONSTRUCT {
+ ?s ?p ?o .
+}
+WHERE {
+ {
+ ?s ?p ?o .
+ FILTER ( ( ?o = ) )
+ }
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/construct/constructwhere06-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/construct/constructwhere06-quads.sparql
new file mode 100644
index 00000000..bed446cb
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/construct/constructwhere06-quads.sparql
@@ -0,0 +1,6 @@
+CONSTRUCT {
+ _:e_s_b ?p _:e_o_b .
+}
+WHERE {
+ _:e_s_b ?p _:e_o_b .
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/delete/delete-with-02.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/delete/delete-with-02.sparql
new file mode 100644
index 00000000..090e0c94
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/delete/delete-with-02.sparql
@@ -0,0 +1,13 @@
+DELETE {
+ GRAPH {
+ ?s ?p ?o .
+ }
+}
+WHERE {
+ GRAPH {
+ GRAPH {
+ ?s .
+ ?s ?p ?o .
+ }
+ }
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/delete/delete-with-03-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/delete/delete-with-03-quads.sparql
new file mode 100644
index 00000000..313ea4f6
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/delete/delete-with-03-quads.sparql
@@ -0,0 +1,11 @@
+DELETE {
+ GRAPH {
+ ?s ?p ?o .
+ }
+}
+WHERE {
+ GRAPH {
+ ?s .
+ ?s ?p ?o .
+ }
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/delete/delete-with-03.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/delete/delete-with-03.sparql
new file mode 100644
index 00000000..18a7bc4f
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/delete/delete-with-03.sparql
@@ -0,0 +1,13 @@
+DELETE {
+ GRAPH {
+ ?s ?p ?o .
+ }
+}
+WHERE {
+ GRAPH {
+ GRAPH {
+ ?s .
+ ?s ?p ?o .
+ }
+ }
+}
\ No newline at end of file
diff --git a/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/exists/nested-negative-exists-in-positive-exists-quads.sparql b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/exists/nested-negative-exists-in-positive-exists-quads.sparql
new file mode 100644
index 00000000..04cb6b00
--- /dev/null
+++ b/packages/test-utils/statics/algebra/canonical-sparql/base/sparql-1.1/exists/nested-negative-exists-in-positive-exists-quads.sparql
@@ -0,0 +1,13 @@
+SELECT ?p ?s WHERE {
+ ?s ?p