[Swift-commit] r2707 - in trunk: resources src/org/griphyn/vdl/engine tests/language-behaviour
noreply at svn.ci.uchicago.edu
noreply at svn.ci.uchicago.edu
Wed Mar 18 07:30:54 CDT 2009
Author: benc
Date: 2009-03-18 07:30:51 -0500 (Wed, 18 Mar 2009)
New Revision: 2707
Added:
trunk/tests/language-behaviour/00261-function-param-file.in
trunk/tests/language-behaviour/00261-function-param-file.swift
trunk/tests/language-behaviour/00262-function-param-file-many.in
trunk/tests/language-behaviour/00262-function-param-file-many.swift
Modified:
trunk/resources/Karajan.stg
trunk/src/org/griphyn/vdl/engine/Karajan.java
Log:
Intermediate datasets were not mapped, so worked for procedures
that returned in-memory values but not files. This commit maps them
using the concurrent mapper, like file variables.
Modified: trunk/resources/Karajan.stg
===================================================================
--- trunk/resources/Karajan.stg 2009-03-17 19:11:54 UTC (rev 2706)
+++ trunk/resources/Karajan.stg 2009-03-18 12:30:51 UTC (rev 2707)
@@ -294,10 +294,14 @@
</vdl:setfieldvalue>
>>
-callexpr(call, datatype, callID) ::= <<
+callexpr(call, datatype, callID, prefix) ::= <<
<sequential>
<set name="swift#callintermediate">
- <vdl:new type="$datatype$" dbgname="tmp"/>
+ <vdl:new type="$datatype$" dbgname="swift#callintermediate">
+ <vdl:mapping descriptor="concurrent_mapper">
+ <vdl:parameter name="prefix">_callintermediate-$prefix$</vdl:parameter>
+ </vdl:mapping>
+ </vdl:new>
</set>
$call$
<variable>swift#callintermediate</variable>
Modified: trunk/src/org/griphyn/vdl/engine/Karajan.java
===================================================================
--- trunk/src/org/griphyn/vdl/engine/Karajan.java 2009-03-17 19:11:54 UTC (rev 2706)
+++ trunk/src/org/griphyn/vdl/engine/Karajan.java 2009-03-18 12:30:51 UTC (rev 2707)
@@ -1138,6 +1138,7 @@
call.setAttribute("datatype", type);
call.setAttribute("call", call(c, subscope, true));
call.setAttribute("callID", new Integer(callID++));
+ call.setAttribute("prefix", UUIDGenerator.getInstance().generateRandomBasedUUID().toString());
return call;
} else {
throw new CompilationException("unknown expression implemented by class "+expression.getClass()+" with node name "+expressionQName +" and with content "+expression);
Added: trunk/tests/language-behaviour/00261-function-param-file.in
===================================================================
--- trunk/tests/language-behaviour/00261-function-param-file.in (rev 0)
+++ trunk/tests/language-behaviour/00261-function-param-file.in 2009-03-18 12:30:51 UTC (rev 2707)
@@ -0,0 +1,4 @@
+a
+b
+c
+d
Added: trunk/tests/language-behaviour/00261-function-param-file.swift
===================================================================
--- trunk/tests/language-behaviour/00261-function-param-file.swift (rev 0)
+++ trunk/tests/language-behaviour/00261-function-param-file.swift 2009-03-18 12:30:51 UTC (rev 2707)
@@ -0,0 +1,14 @@
+type file;
+
+app (file editedParams) setTemps ( file inParams )
+{
+cat stdin=@inParams stdout=@editedParams;
+}
+
+file inParams<single_file_mapper; file="00261-function-param-file.in" >;
+
+string config [] = readData( setTemps(inParams ) );
+
+trace(0,config[0]);
+trace(1,config[1]);
+
Added: trunk/tests/language-behaviour/00262-function-param-file-many.in
===================================================================
--- trunk/tests/language-behaviour/00262-function-param-file-many.in (rev 0)
+++ trunk/tests/language-behaviour/00262-function-param-file-many.in 2009-03-18 12:30:51 UTC (rev 2707)
@@ -0,0 +1,4 @@
+a
+b
+c
+d
Added: trunk/tests/language-behaviour/00262-function-param-file-many.swift
===================================================================
--- trunk/tests/language-behaviour/00262-function-param-file-many.swift (rev 0)
+++ trunk/tests/language-behaviour/00262-function-param-file-many.swift 2009-03-18 12:30:51 UTC (rev 2707)
@@ -0,0 +1,14 @@
+type file;
+
+app (file editedParams) cat ( file inParams )
+{
+cat stdin=@inParams stdout=@editedParams;
+}
+
+file inParams<single_file_mapper; file="00262-function-param-file-many.in" >;
+
+string config [] = readData( cat(cat(cat(inParams ) )));
+
+trace(0,config[0]);
+trace(1,config[1]);
+
More information about the Swift-commit
mailing list