[Swift-commit] r6224 - branches/faster/resources
hategan at ci.uchicago.edu
hategan at ci.uchicago.edu
Sun Feb 3 23:26:10 CST 2013
Author: hategan
Date: 2013-02-03 23:26:09 -0600 (Sun, 03 Feb 2013)
New Revision: 6224
Modified:
branches/faster/resources/Karajan-no-provenance.stg
branches/faster/resources/Karajan.stg
Log:
fixed a bunch of issues in compilation
Modified: branches/faster/resources/Karajan-no-provenance.stg
===================================================================
--- branches/faster/resources/Karajan-no-provenance.stg 2013-02-04 02:09:36 UTC (rev 6223)
+++ branches/faster/resources/Karajan-no-provenance.stg 2013-02-04 05:26:09 UTC (rev 6224)
@@ -1,15 +1,14 @@
group Karajan-np;
-vdl_log_input() ::= << >>
+swift_log_inputs(params) ::= <<>>
+swift_log_outputs(params) ::= <<>>
-vdl_log_output() ::= << >>
-
callInternal_log_input() ::= <<$it$>>
callInternal_log_output() ::= <<$it$>>
variable_log() ::= << >>
-range_log(from, to, step) ::= << >>
+range(from, to, step, datatype) ::= <<swift:range($from$, $to$$if(step)$, step = $step$$endif$)>>
cs() ::= << >>
Modified: branches/faster/resources/Karajan.stg
===================================================================
--- branches/faster/resources/Karajan.stg 2013-02-04 02:09:36 UTC (rev 6223)
+++ branches/faster/resources/Karajan.stg 2013-02-04 05:26:09 UTC (rev 6224)
@@ -59,9 +59,9 @@
procedure(name, outputs, inputs, arguments, optargs, binding, declarations, statements, config, line, initWaitCounts, cleanups, closes) ::= <<
-$name$ := function($if(optargs)$ "$proc_oargs(args=optargs)$"$endif$$if(arguments)$ "$proc_args(args=arguments)$"$endif$) {
- $inputs:swift_log_input();separator="\n"$
- $outputs:swift_log_output();separator="\n"$
+$name$ := function($if(optargs)$$proc_oargs(args=optargs)$$if(arguments)$, $endif$$endif$$if(arguments)$$proc_args(args=arguments)$$endif$) {
+ $swift_log_inputs(inputs)$
+ $swift_log_outputs(outputs)$
$if(binding)$
$swift_execute(outputs=outputs,inputs=inputs,application=binding.application, name=name,line=line)$
$else$
@@ -70,6 +70,13 @@
}
>>
+swift_log_inputs(params) ::= <<
+$params:log_param("input");separator="\n"$
+>>
+swift_log_outputs(params) ::= <<
+$params:log_param("output");separator="\n"$
+>>
+
compound(outputs, inputs, declarations, statements, config, name, initWaitCounts, cleanups) ::= <<
unitStart("COMPOUND", name="$name$", outputs="$outputs:list();separator=","$")
$if(initWaitCounts)$
@@ -87,7 +94,7 @@
>>
proc_args(args) ::= <<
-$args:arg_name();separator=","$
+$args:arg_name();separator=", "$
>>
arg_name() ::= <<
@@ -115,14 +122,10 @@
unitEnd("PROCEDURE", name="$name$", line="$line$")
>>
-swift_log_input() ::= <<
-parameterLog("input", "$it.name$", swift:getDatasetProvenanceID($it.name$), currentThread())
+log_param(dir) ::= <<
+parameterLog("$dir$", "$it.name$", swift:getDatasetProvenanceID($it.name$))
>>
-swift_log_output() ::= <<
-parameterLog("output", "$it.name$", swift:getDatasetProvenanceID($it.name$), currentThread())
->>
-
swift_stagein() ::= <<
swift:stageIn($it.name$)
>>
@@ -144,14 +147,17 @@
swift_arguments(attributes,arguments,stdin,stdout,stderr) ::= <<
$attributes$
swift:arguments(
- $arguments;separator="\n"$
+ $arguments;separator=", "$
)
+
$if (stdin)$
swift:stdin($stdin$)
$endif$
+
$if (stdout)$
swift:stdout($stdout$)
$endif$
+
$if (stderr)$
swift:stderr($stderr$)
$endif$
@@ -175,9 +181,7 @@
$statements;separator="\n"$
)
$else$
-sequential(
- $statements$
-)
+$statements$
$endif$
>>
@@ -187,7 +191,7 @@
function(name, args, datatype, line) ::= <<
swiftscript:$name$(
- $if(args)$ $args$ $endif$
+ $if(args)$$args;separator=", "$$endif$
)
>>
@@ -214,6 +218,7 @@
$parallel(statements=statements)$
$cleanups:swift_cleandataset();separator="\n"$
$endif$
+
unitEnd("FOREACH_IT", line="$line$")
}
>>
@@ -237,14 +242,14 @@
callInternal_log_input() ::= <<
sequential(
- parameterLog("input", "TODO_name_or_pos", vdl:getDatasetProvenanceID($it$), currentThread())
+ parameterLog("input", "TODO_name_or_pos", vdl:getDatasetProvenanceID($it$))
$it$
)
>>
callInternal_log_output() ::= <<
sequential(
- parameterLog("output", "TODO_name_or_pos", vdl:getDatasetProvenanceID($it$), currentThread())
+ parameterLog("output", "TODO_name_or_pos", vdl:getDatasetProvenanceID($it$))
$it$
)
>>
@@ -252,9 +257,9 @@
callUserDefined(func, outputs, inputs, line, serialize, partialClose) ::= <<
$func$(
$if(!serialize)$parallel($endif$
- $outputs;separator="\n"$
- $inputs;separator="\n"$
- $if(!serialize)$)$endif$
+ $outputs;separator=", "$
+ $inputs;separator=", "$
+ $if(!serialize)$)$endif$
)
$if(partialClose)$
$partialClose$
@@ -276,35 +281,30 @@
variable(name, type, expr, mapping, nil, file, waitCount, input, datatype, isGlobal, line) ::= <<
$name$ :=
$if(mapping)$
- swift:new("$type$", dbgname="$name$"$if(waitCount)$, waitCount=$waitCount$$endif$, _defline="$line$"$if(input)$, input=true$endif$
+ swift:new("$type$", dbgname="$name$"$if(waitCount)$, waitCount=$waitCount$$endif$$if(line)$, _defline="$line$"$endif$$if(input)$, input=true$endif$
$swift_mapping(mapping=mapping, file=file)$
)
$else$
$if(file)$
- swift:new("$type$", dbgname="$name$"$if(waitCount)$, waitCount=$waitCount$$endif$, _defline="$line$"$if(input)$, input=true$endif$
+ swift:new("$type$", dbgname="$name$"$if(waitCount)$, waitCount=$waitCount$$endif$$if(line)$, _defline="$line$"$endif$$if(input)$, input=true$endif$
$swift_mapping(mapping=mapping, file=file)$
)
$else$
- swift:new("$type$", dbgname="$name$"$if(waitCount)$, waitCount=$waitCount$$endif$, _defline="$line$"$if(input)$, input=true$endif$)
+ swift:new("$type$", dbgname="$name$"$if(waitCount)$, waitCount=$waitCount$$endif$$if(line)$, _defline="$line$"$endif$$if(input)$, input=true$endif$)
$endif$
$endif$
$variable_log()$
>>
variable_log() ::= <<
- parameterLog("intermediate", "$name$", swift:getDatasetProvenanceID($name$), currentThread())
+ parameterLog("intermediate", "$name$", swift:getDatasetProvenanceID($name$))
>>
swift_mapping(mapping, file) ::= <<
$if(file)$
-swift:mapping("single_file_mapper",
- swift:parameter("file", "$file.name$")
- $if(file.params)$$file.params;separator="\n"$$endif$
-)
+swift:mapping("single_file_mapper", swift:parameter("file", "$file.name$") $if(file.params)$$file.params;separator="\n"$$endif$)
$else$
-swift:mapping("$mapping.descriptor$",
- $mapping.params;separator="\n"$
-)
+swift:mapping("$mapping.descriptor$", $mapping.params;separator="\n"$)
$endif$
>>
@@ -313,23 +313,23 @@
>>
assign(var, value, line, partialClose) ::= <<
- swift:setFieldValue($if(line)$_traceline="$line$"$else$_traceline="-1"$endif$
- $var$
- $value$
- )
- $if(partialClose)$
+swift:setFieldValue($if(line)$_traceline="$line$"$endif$
+ $var$
+ $value$
+)
+$if(partialClose)$
$partialClose$
- $endif$
+$endif$
>>
append(array, value, partialClose) ::= <<
- swift:appendArray(
- $array$
- $value$
- )
- $if(partialClose)$
+swift:appendArray(
+ $array$
+ $value$
+)
+$if(partialClose)$
$partialClose$
- $endif$
+$endif$
>>
callexpr(call, datatype, prefix) ::= <<
@@ -353,11 +353,11 @@
>>
range(from, to, step, datatype) ::= <<
- sequential(
- tmp := swift:range($from$, $to$$if(step)$, step = $step$$endif$)
- tmp
- $range_log()$
- )
+sequential(
+ tmp := swift:range($from$, $to$$if(step)$, step = $step$$endif$)
+ tmp
+ $range_log()$
+)
>>
range_log() ::= <<
@@ -408,9 +408,13 @@
// the wrapping layer disappers in the (perhaps common?) case of a
// single layer.
sequential(statements) ::= <<
- sequential(
- $statements;separator="\n"$
- )
+$if(rest(statements))$
+sequential(
+ $statements;separator="\n"$
+)
+$else$
+$statements$
+$endif$
>>
@@ -499,7 +503,8 @@
swift:new("boolean", value=$value$)
>>
+// Why is there a value attribute?
sConst(value,innervalue,datatype) ::= <<
-swift:new("string", value="$value$")
+swift:new("string", value="$innervalue$")
>>
More information about the Swift-commit
mailing list