Skip to content

Commit

Permalink
Fixes for
Browse files Browse the repository at this point in the history
  • Loading branch information
jjg-123 committed Dec 22, 2024
1 parent 51cc855 commit c0539dc
Show file tree
Hide file tree
Showing 11 changed files with 1,033 additions and 211 deletions.
4 changes: 2 additions & 2 deletions language/buildNumber.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#maven.buildNumber.plugin properties file
#Sun Dec 01 07:47:11 CST 2024
buildNumber\\d*=13741
#Thu Dec 19 11:09:25 CST 2024
buildNumber\\d*=13747
14 changes: 7 additions & 7 deletions language/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -201,22 +201,22 @@
<version>6.x-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<!-- <dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<version>1.4.20</version>
</dependency>-->

<dependency>
<groupId>edu.uiuc.ncsa.security</groupId>
<artifactId>util</artifactId>
<version>6.x-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<!-- <dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.30</version>
<!--<scope>provided</scope>-->
</dependency>-->
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<version>9.1.0</version>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
Expand Down
Binary file modified language/src/main/docs/crypto.odt
Binary file not shown.
Binary file modified language/src/main/docs/qdldb-extension.odt
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,22 @@ public List<Object> getEvaluatedArgs() {
public List<Object> evaluatedArgs(State state) {
evaluatedArgs = new ArrayList<>(getArgCount());
for (int i = 0; i < getArgCount(); i++) {
evaluatedArgs.add(evalArg(i, state));
// Fix https://github.com/ncsa/qdl/issues/87
Object eval = evalArg(i, state);
if(eval == null) {
Object x = getArgAt(i);
String message;
if(x instanceof VariableNode){
message = ((VariableNode)x).getVariableReference() + " at argument " + i + " not found";
}else{
message = "argument " + i + " not found";
}
// Found when a person assigned an empty set {} for an empty stem [] which was
// therefore not a variable. It should have failed here rather than sending a null to
// cause an NPE later.
throw new QDLExceptionWithTrace( message, getArguments().get(i));
}
evaluatedArgs.add(eval);
}
return evaluatedArgs;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,11 @@ ambient state so that, eventually, f(s) can be evaluated (s is in the ambient s
// g(x)->f(x)-x; // fails unless f is included in its state.

//newState.getVStack().append(ambientState.getVStack().getLocal()); // add in any passed in state (e.g. function arguments to module functions)

// Fix for https://github.com/ncsa/qdl/issues/89 -- be attentive to the fact that these are
// put into the state in reverse order!
newState.getVStack().appendTables(ambientState.getVStack()); // add in any passed in state for variables
newState.getVStack().appendTables(getAmbientState().getVStack()); // add in the state of the module
newState.getFTStack().appendTables(ambientState.getFTStack()); // add in any passed in state for functions
newState.getVStack().appendTables(ambientState.getVStack()); // add in any passed in state for variables
newState.setModuleState(true);
// Next line is for https://github.com/ncsa/qdl/issues/84
newState.setScriptArgs(ambientState.getScriptArgs());
Expand All @@ -239,6 +240,7 @@ ambient state so that, eventually, f(s) can be evaluated (s is in the ambient s
// send along evaluated args with ambient state, but do not allow
// ambient state to override internal module state for functions, loaded modules etc.
r = getExpression().evaluate(getModuleState());
//r = getExpression().evaluate(newState);
} else {
r = getExpression().evaluate(newState); // gets local overrides from ambient state
if (getExpression() instanceof DyadicFunctionReferenceNode) {
Expand Down
Loading

0 comments on commit c0539dc

Please sign in to comment.