From 5130a5eb729b0fa8b02c12dcc1bddcc77c3c0fea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Sch=C3=B6b?= Date: Wed, 30 Oct 2024 11:16:11 +0100 Subject: [PATCH 1/4] add this. to unqualified accesses --- .../java/org/rumbledb/compiler/ExecutionModeVisitor.java | 2 +- .../compiler/SequentialClassificationVisitor.java | 2 +- src/main/java/org/rumbledb/context/InScopeVariable.java | 2 +- .../rumbledb/expressions/module/VariableDeclaration.java | 4 ++-- .../expressions/scripting/annotations/Annotation.java | 4 ++-- .../scripting/declaration/CommaVariableDeclStatement.java | 6 +++--- .../scripting/declaration/VariableDeclStatement.java | 4 ++-- .../expressions/scripting/loops/FlowrStatement.java | 2 +- .../scripting/loops/ReturnStatementClause.java | 2 +- .../expressions/scripting/loops/WhileStatement.java | 8 ++++---- .../functions/StaticUserDefinedFunctionCallIterator.java | 2 +- .../org/rumbledb/runtime/scripting/ProgramIterator.java | 4 ++-- .../scripting/block/StatementsWithExprIterator.java | 2 +- .../runtime/scripting/loops/ExitStatementIterator.java | 2 +- .../java/org/rumbledb/runtime/typing/TreatIterator.java | 2 +- 15 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/main/java/org/rumbledb/compiler/ExecutionModeVisitor.java b/src/main/java/org/rumbledb/compiler/ExecutionModeVisitor.java index e96188dbc..db847abd4 100644 --- a/src/main/java/org/rumbledb/compiler/ExecutionModeVisitor.java +++ b/src/main/java/org/rumbledb/compiler/ExecutionModeVisitor.java @@ -657,7 +657,7 @@ public StaticContext visitProlog(Prolog prolog, StaticContext argument) { public StaticContext visitProgram(Program program, StaticContext argument) { visitDescendants(program, argument); ExecutionMode mergedExecutionMode = program.getStatementsAndOptionalExpr().getHighestExecutionMode(); - for (Statement statement : exitStatementChildren) { + for (Statement statement : this.exitStatementChildren) { ExecutionMode statementExecMode = statement.getHighestExecutionMode(this.visitorConfig); mergedExecutionMode = getHighestExecutionMode(mergedExecutionMode, statementExecMode); } diff --git a/src/main/java/org/rumbledb/compiler/SequentialClassificationVisitor.java b/src/main/java/org/rumbledb/compiler/SequentialClassificationVisitor.java index 812239241..72a47fa8b 100644 --- a/src/main/java/org/rumbledb/compiler/SequentialClassificationVisitor.java +++ b/src/main/java/org/rumbledb/compiler/SequentialClassificationVisitor.java @@ -57,7 +57,7 @@ public class SequentialClassificationVisitor extends AbstractNodeVisitor(); + this.variableBlockLevel = new HashMap<>(); } protected DescendentSequentialProperties defaultAction(Node node, DescendentSequentialProperties argument) { diff --git a/src/main/java/org/rumbledb/context/InScopeVariable.java b/src/main/java/org/rumbledb/context/InScopeVariable.java index 31510fc20..5edbf536f 100644 --- a/src/main/java/org/rumbledb/context/InScopeVariable.java +++ b/src/main/java/org/rumbledb/context/InScopeVariable.java @@ -83,6 +83,6 @@ public void read(Kryo kryo, Input input) { } public boolean isAssignable() { - return isAssignable; + return this.isAssignable; } } diff --git a/src/main/java/org/rumbledb/expressions/module/VariableDeclaration.java b/src/main/java/org/rumbledb/expressions/module/VariableDeclaration.java index 66b973b2a..e7c1f64f0 100644 --- a/src/main/java/org/rumbledb/expressions/module/VariableDeclaration.java +++ b/src/main/java/org/rumbledb/expressions/module/VariableDeclaration.java @@ -166,12 +166,12 @@ public void serializeToJSONiq(StringBuffer sb, int indent) { @Nullable public List getAnnotations() { - return annotations; + return this.annotations; } public boolean isAssignable() { - return isAssignable; + return this.isAssignable; } } diff --git a/src/main/java/org/rumbledb/expressions/scripting/annotations/Annotation.java b/src/main/java/org/rumbledb/expressions/scripting/annotations/Annotation.java index 888a0a073..d56dbf09e 100644 --- a/src/main/java/org/rumbledb/expressions/scripting/annotations/Annotation.java +++ b/src/main/java/org/rumbledb/expressions/scripting/annotations/Annotation.java @@ -20,11 +20,11 @@ public Annotation(Name annotationName, List literals) { } public Name getAnnotationName() { - return annotationName; + return this.annotationName; } public List getLiterals() { - return literals; + return this.literals; } public static boolean checkAssignable( diff --git a/src/main/java/org/rumbledb/expressions/scripting/declaration/CommaVariableDeclStatement.java b/src/main/java/org/rumbledb/expressions/scripting/declaration/CommaVariableDeclStatement.java index b39f605b6..5eb42d9bc 100644 --- a/src/main/java/org/rumbledb/expressions/scripting/declaration/CommaVariableDeclStatement.java +++ b/src/main/java/org/rumbledb/expressions/scripting/declaration/CommaVariableDeclStatement.java @@ -23,18 +23,18 @@ public T accept(AbstractNodeVisitor visitor, T argument) { @Override public List getChildren() { - return new ArrayList<>(variables); + return new ArrayList<>(this.variables); } @Override public void serializeToJSONiq(StringBuffer sb, int indent) { indentIt(sb, indent); - for (VariableDeclStatement variableDeclStatement : variables) { + for (VariableDeclStatement variableDeclStatement : this.variables) { variableDeclStatement.serializeToJSONiq(sb, 0); } } public List getVariables() { - return variables; + return this.variables; } } diff --git a/src/main/java/org/rumbledb/expressions/scripting/declaration/VariableDeclStatement.java b/src/main/java/org/rumbledb/expressions/scripting/declaration/VariableDeclStatement.java index 5f3d3fb7e..7aa12568d 100644 --- a/src/main/java/org/rumbledb/expressions/scripting/declaration/VariableDeclStatement.java +++ b/src/main/java/org/rumbledb/expressions/scripting/declaration/VariableDeclStatement.java @@ -103,10 +103,10 @@ public Expression getVariableExpression() { } public List getAnnotations() { - return annotations; + return this.annotations; } public boolean isAssignable() { - return isAssignable; + return this.isAssignable; } } diff --git a/src/main/java/org/rumbledb/expressions/scripting/loops/FlowrStatement.java b/src/main/java/org/rumbledb/expressions/scripting/loops/FlowrStatement.java index ab9c208e8..1954f52fa 100644 --- a/src/main/java/org/rumbledb/expressions/scripting/loops/FlowrStatement.java +++ b/src/main/java/org/rumbledb/expressions/scripting/loops/FlowrStatement.java @@ -48,6 +48,6 @@ public void serializeToJSONiq(StringBuffer sb, int indent) { } public ReturnStatementClause getReturnStatementClause() { - return returnStatementClause; + return this.returnStatementClause; } } diff --git a/src/main/java/org/rumbledb/expressions/scripting/loops/ReturnStatementClause.java b/src/main/java/org/rumbledb/expressions/scripting/loops/ReturnStatementClause.java index 6eb09f720..49c67fe7e 100644 --- a/src/main/java/org/rumbledb/expressions/scripting/loops/ReturnStatementClause.java +++ b/src/main/java/org/rumbledb/expressions/scripting/loops/ReturnStatementClause.java @@ -46,6 +46,6 @@ public void serializeToJSONiq(StringBuffer sb, int indent) { } public Statement getReturnStatement() { - return returnStatement; + return this.returnStatement; } } diff --git a/src/main/java/org/rumbledb/expressions/scripting/loops/WhileStatement.java b/src/main/java/org/rumbledb/expressions/scripting/loops/WhileStatement.java index dfbe3bc2a..72172b06b 100644 --- a/src/main/java/org/rumbledb/expressions/scripting/loops/WhileStatement.java +++ b/src/main/java/org/rumbledb/expressions/scripting/loops/WhileStatement.java @@ -27,8 +27,8 @@ public T accept(AbstractNodeVisitor visitor, T argument) { @Override public List getChildren() { List result = new ArrayList<>(); - result.add(testCondition); - result.add(statement); + result.add(this.testCondition); + result.add(this.statement); return result; } @@ -43,10 +43,10 @@ public void serializeToJSONiq(StringBuffer sb, int indent) { } public Expression getTestCondition() { - return testCondition; + return this.testCondition; } public Statement getStatement() { - return statement; + return this.statement; } } diff --git a/src/main/java/org/rumbledb/runtime/functions/StaticUserDefinedFunctionCallIterator.java b/src/main/java/org/rumbledb/runtime/functions/StaticUserDefinedFunctionCallIterator.java index 326e01ae7..c3e7af696 100644 --- a/src/main/java/org/rumbledb/runtime/functions/StaticUserDefinedFunctionCallIterator.java +++ b/src/main/java/org/rumbledb/runtime/functions/StaticUserDefinedFunctionCallIterator.java @@ -131,7 +131,7 @@ protected void closeLocal() { public void setNextResult() { this.nextResult = null; - if (!encounteredExitStatement) { + if (!this.encounteredExitStatement) { try { if (this.userDefinedFunctionCallIterator.hasNext()) { this.nextResult = this.userDefinedFunctionCallIterator.next(); diff --git a/src/main/java/org/rumbledb/runtime/scripting/ProgramIterator.java b/src/main/java/org/rumbledb/runtime/scripting/ProgramIterator.java index 91970ed72..0d7201275 100644 --- a/src/main/java/org/rumbledb/runtime/scripting/ProgramIterator.java +++ b/src/main/java/org/rumbledb/runtime/scripting/ProgramIterator.java @@ -89,7 +89,7 @@ private void setPULFromExitStatement(ExitStatementException exitStatementExcepti @Override protected Item nextLocal() { - if (!encounteredExitStatement) { + if (!this.encounteredExitStatement) { try { return this.statementsAndExprIterator.next(); } catch (ExitStatementException exitStatementException) { @@ -117,7 +117,7 @@ public boolean isUpdating() { @Override public PendingUpdateList getPendingUpdateList(DynamicContext context) { - if (!encounteredExitStatement) { + if (!this.encounteredExitStatement) { return this.statementsAndExprIterator.getPendingUpdateList(context); } return this.pendingUpdateList; diff --git a/src/main/java/org/rumbledb/runtime/scripting/block/StatementsWithExprIterator.java b/src/main/java/org/rumbledb/runtime/scripting/block/StatementsWithExprIterator.java index bf035392d..a80021b76 100644 --- a/src/main/java/org/rumbledb/runtime/scripting/block/StatementsWithExprIterator.java +++ b/src/main/java/org/rumbledb/runtime/scripting/block/StatementsWithExprIterator.java @@ -32,7 +32,7 @@ public StatementsWithExprIterator( this.children.addAll(statements); this.children.add(exprIterator); - for (RuntimeIterator child : children) { + for (RuntimeIterator child : this.children) { if (child.isSequential()) { this.isSequential = child.isSequential(); } diff --git a/src/main/java/org/rumbledb/runtime/scripting/loops/ExitStatementIterator.java b/src/main/java/org/rumbledb/runtime/scripting/loops/ExitStatementIterator.java index ca07d7336..c0e0f8614 100644 --- a/src/main/java/org/rumbledb/runtime/scripting/loops/ExitStatementIterator.java +++ b/src/main/java/org/rumbledb/runtime/scripting/loops/ExitStatementIterator.java @@ -72,7 +72,7 @@ protected Item nextLocal() { this.result = this.childIterator.materialize(this.currentDynamicContextForLocalExecution); this.pendingUpdateList = new PendingUpdateList(); if (this.childIterator.isUpdating()) { - pendingUpdateList = this.childIterator.getPendingUpdateList(this.currentDynamicContextForLocalExecution); + this.pendingUpdateList = this.childIterator.getPendingUpdateList(this.currentDynamicContextForLocalExecution); } throw new ExitStatementException( this.pendingUpdateList, diff --git a/src/main/java/org/rumbledb/runtime/typing/TreatIterator.java b/src/main/java/org/rumbledb/runtime/typing/TreatIterator.java index 39f972fe1..f3b9d643e 100644 --- a/src/main/java/org/rumbledb/runtime/typing/TreatIterator.java +++ b/src/main/java/org/rumbledb/runtime/typing/TreatIterator.java @@ -240,7 +240,7 @@ public JSoundDataFrame getDataFrame(DynamicContext dynamicContext) { @Override public PendingUpdateList getPendingUpdateList(DynamicContext context) { - return iterator.getPendingUpdateList(context); + return this.iterator.getPendingUpdateList(context); } /** From 3c8fad89fe979aef723fd1b306abd89e38e86c95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Sch=C3=B6b?= Date: Wed, 30 Oct 2024 11:17:09 +0100 Subject: [PATCH 2/4] spotless --- .../runtime/scripting/loops/ExitStatementIterator.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/rumbledb/runtime/scripting/loops/ExitStatementIterator.java b/src/main/java/org/rumbledb/runtime/scripting/loops/ExitStatementIterator.java index c0e0f8614..5500dedea 100644 --- a/src/main/java/org/rumbledb/runtime/scripting/loops/ExitStatementIterator.java +++ b/src/main/java/org/rumbledb/runtime/scripting/loops/ExitStatementIterator.java @@ -72,7 +72,9 @@ protected Item nextLocal() { this.result = this.childIterator.materialize(this.currentDynamicContextForLocalExecution); this.pendingUpdateList = new PendingUpdateList(); if (this.childIterator.isUpdating()) { - this.pendingUpdateList = this.childIterator.getPendingUpdateList(this.currentDynamicContextForLocalExecution); + this.pendingUpdateList = this.childIterator.getPendingUpdateList( + this.currentDynamicContextForLocalExecution + ); } throw new ExitStatementException( this.pendingUpdateList, From 6a048ee34d4cd6e6d580bfb85021685940729e6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Sch=C3=B6b?= Date: Wed, 30 Oct 2024 11:49:58 +0100 Subject: [PATCH 3/4] fix some versions and fix some warnings --- pom.xml | 16 +++++++++++++--- .../org/rumbledb/context/GlobalVariables.java | 2 +- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index d468b6ca8..58e7d86b0 100644 --- a/pom.xml +++ b/pom.xml @@ -46,9 +46,10 @@ eclipse 1.8 1.8 - - ${project.basedir}/org.eclipse.jdt.core.prefs - + + -properties + ${project.basedir}/org.eclipse.jdt.core.prefs + @@ -63,6 +64,14 @@ + + org.apache.maven.plugins + maven-resources-plugin + 3.3.1 + + UTF-8 + + org.apache.maven.plugins maven-jar-plugin @@ -150,6 +159,7 @@ org.apache.maven.plugins maven-release-plugin + 3.0.1 true false diff --git a/src/main/java/org/rumbledb/context/GlobalVariables.java b/src/main/java/org/rumbledb/context/GlobalVariables.java index ce93dec24..18754fb13 100644 --- a/src/main/java/org/rumbledb/context/GlobalVariables.java +++ b/src/main/java/org/rumbledb/context/GlobalVariables.java @@ -15,7 +15,7 @@ public class GlobalVariables implements Serializable, KryoSerializable { private Set globalVariables; public GlobalVariables() { - globalVariables = new HashSet<>(); + this.globalVariables = new HashSet<>(); } public void addGlobalVariable(Name globalVariable) { From 8c86f5aadc7ad406d4bd5ae0659402a7ca92a3ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Sch=C3=B6b?= Date: Wed, 30 Oct 2024 11:57:50 +0100 Subject: [PATCH 4/4] add my name to readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7e4866c15..d82971f2b 100644 --- a/README.md +++ b/README.md @@ -16,4 +16,4 @@ The documentation also contains an introduction specific to RumbleDB and how you [The documentation of the current master (for the adventurous and curious) is available here.](http://sparksoniq.readthedocs.io/en/latest/) -RumbleDB is an effort involving many researchers and ETH Zurich students: code and support by Stefan Irimescu, Ghislain Fourny, Gustavo Alonso, Renato Marroquin, Rodrigo Bruno, Falko Noé, Ioana Stefan, Andrea Rinaldi, Stevan Mihajlovic, Mario Arduini, Can Berker Çıkış, Elwin Stephan, David Dao, Zirun Wang, Ingo Müller, Dan-Ovidiu Graur, Thomas Zhou, Olivier Goerens, Alexandru Meterez, Remo Röthlisberger, Dominik Bruggisser, David Loughlin, David Buzatu. +RumbleDB is an effort involving many researchers and ETH Zurich students: code and support by Stefan Irimescu, Ghislain Fourny, Gustavo Alonso, Renato Marroquin, Rodrigo Bruno, Falko Noé, Ioana Stefan, Andrea Rinaldi, Stevan Mihajlovic, Mario Arduini, Can Berker Çıkış, Elwin Stephan, David Dao, Zirun Wang, Ingo Müller, Dan-Ovidiu Graur, Thomas Zhou, Olivier Goerens, Alexandru Meterez, Remo Röthlisberger, Dominik Bruggisser, David Loughlin, David Buzatu, Marco Schöb.