From ketan at ci.uchicago.edu Fri Jul 1 23:16:21 2011 From: ketan at ci.uchicago.edu (ketan at ci.uchicago.edu) Date: Fri, 1 Jul 2011 23:16:21 -0500 (CDT) Subject: [Swift-commit] r4722 - trunk/libexec/log-processing Message-ID: <20110702041621.D69249CCCE@svn.ci.uchicago.edu> Author: ketan Date: 2011-07-01 23:16:21 -0500 (Fri, 01 Jul 2011) New Revision: 4722 Modified: trunk/libexec/log-processing/README.txt Log: added some comments in README.txt Modified: trunk/libexec/log-processing/README.txt =================================================================== --- trunk/libexec/log-processing/README.txt 2011-07-01 00:10:55 UTC (rev 4721) +++ trunk/libexec/log-processing/README.txt 2011-07-02 04:16:21 UTC (rev 4722) @@ -3,7 +3,9 @@ ============== To properly generate log plots, you must enable VDL/Karajan logging. +TODO:How? + You should check the scripts that you intend to use to determine what log lines they require and ensure that you are generating those lines via log4j.properties @@ -14,6 +16,7 @@ log4j.logger.org.globus.cog.abstraction.coaster.service.job.manager.Cpu=DEBUG log4j.logger.org.globus.cog.abstraction.coaster.service.job.manager.Block=DEBUG -------------------------------------- +TODO: Does it work for coasters-based runs only? Normalize event times in the log to the run start time ------------------------------------------------------ @@ -23,7 +26,9 @@ ------------------------------------------ ./normalize-log.pl file.contains.start.time swift-run.log > swift-run.norm ------------------------------------------ +TODO:In what format does the start time be in 'file.contains.start.time' + Make a basic load plot from Coasters Cpu log lines -------------------------------------------------- @@ -38,7 +43,9 @@ ------------------------------------------ swift_plotter.zsh -s load.cfg load.eps load.data ------------------------------------------ +Note: Th load.cfg is available from swift/libexec/log-processing/ + Make a basic job completion plot from Coasters Cpu log lines ------------------------------------------------------------ From hategan at ci.uchicago.edu Sat Jul 2 00:56:01 2011 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Sat, 2 Jul 2011 00:56:01 -0500 (CDT) Subject: [Swift-commit] r4723 - trunk/src/org/griphyn/vdl/mapping/file Message-ID: <20110702055601.9D1CE9CCCB@svn.ci.uchicago.edu> Author: hategan Date: 2011-07-02 00:55:59 -0500 (Sat, 02 Jul 2011) New Revision: 4723 Modified: trunk/src/org/griphyn/vdl/mapping/file/CSVMapper.java Log: fixed csv mapper (concurrent calls to map() when the file was not read would cause the internal structures to be a mix of what all the threads read from the file) Modified: trunk/src/org/griphyn/vdl/mapping/file/CSVMapper.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/file/CSVMapper.java 2011-07-02 04:16:21 UTC (rev 4722) +++ trunk/src/org/griphyn/vdl/mapping/file/CSVMapper.java 2011-07-02 05:55:59 UTC (rev 4723) @@ -61,7 +61,7 @@ } } - private void readFile() { + private synchronized void readFile() { if (read) { return; } From hategan at ci.uchicago.edu Sat Jul 2 12:19:35 2011 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Sat, 2 Jul 2011 12:19:35 -0500 (CDT) Subject: [Swift-commit] r4724 - trunk/tests/language/working Message-ID: <20110702171935.6E1BB9CCCE@svn.ci.uchicago.edu> Author: hategan Date: 2011-07-02 12:19:35 -0500 (Sat, 02 Jul 2011) New Revision: 4724 Modified: trunk/tests/language/working/007-procedure-invocation-with-assign-and-whitespace.swift Log: this hangs unless i is assigned to Modified: trunk/tests/language/working/007-procedure-invocation-with-assign-and-whitespace.swift =================================================================== --- trunk/tests/language/working/007-procedure-invocation-with-assign-and-whitespace.swift 2011-07-02 05:55:59 UTC (rev 4723) +++ trunk/tests/language/working/007-procedure-invocation-with-assign-and-whitespace.swift 2011-07-02 17:19:35 UTC (rev 4724) @@ -15,6 +15,6 @@ }} -int greetings; +int greetings = 1; file hw = echo(greetings); From hategan at ci.uchicago.edu Sat Jul 2 12:43:46 2011 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Sat, 2 Jul 2011 12:43:46 -0500 (CDT) Subject: [Swift-commit] r4725 - trunk/tests/language/working Message-ID: <20110702174346.BA8A19CCCE@svn.ci.uchicago.edu> Author: hategan Date: 2011-07-02 12:43:46 -0500 (Sat, 02 Jul 2011) New Revision: 4725 Modified: trunk/tests/language/working/014-mapper.swift Log: attempting to map multiple files to a piece of swift data with arity 1 fails, so use an array instead Modified: trunk/tests/language/working/014-mapper.swift =================================================================== --- trunk/tests/language/working/014-mapper.swift 2011-07-02 17:19:35 UTC (rev 4724) +++ trunk/tests/language/working/014-mapper.swift 2011-07-02 17:43:46 UTC (rev 4725) @@ -1,2 +1,2 @@ type myfile; -myfile v; +myfile v[] ; From hategan at ci.uchicago.edu Sat Jul 2 12:50:11 2011 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Sat, 2 Jul 2011 12:50:11 -0500 (CDT) Subject: [Swift-commit] r4726 - trunk/tests/language/working Message-ID: <20110702175011.9EC209CCCE@svn.ci.uchicago.edu> Author: hategan Date: 2011-07-02 12:50:11 -0500 (Sat, 02 Jul 2011) New Revision: 4726 Modified: trunk/tests/language/working/016-mapper-noparam.swift Log: ... idem Modified: trunk/tests/language/working/016-mapper-noparam.swift =================================================================== --- trunk/tests/language/working/016-mapper-noparam.swift 2011-07-02 17:43:46 UTC (rev 4725) +++ trunk/tests/language/working/016-mapper-noparam.swift 2011-07-02 17:50:11 UTC (rev 4726) @@ -1,2 +1,2 @@ type myfile; -myfile v; +myfile v[] ; From hategan at ci.uchicago.edu Sat Jul 2 13:14:52 2011 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Sat, 2 Jul 2011 13:14:52 -0500 (CDT) Subject: [Swift-commit] r4727 - trunk/tests/language/working Message-ID: <20110702181452.191EC9CCCB@svn.ci.uchicago.edu> Author: hategan Date: 2011-07-02 13:14:51 -0500 (Sat, 02 Jul 2011) New Revision: 4727 Added: trunk/tests/language/working/test.in Log: 060-stdinouterr needs this file Added: trunk/tests/language/working/test.in =================================================================== --- trunk/tests/language/working/test.in (rev 0) +++ trunk/tests/language/working/test.in 2011-07-02 18:14:51 UTC (rev 4727) @@ -0,0 +1 @@ +lorem ipsum From hategan at ci.uchicago.edu Sat Jul 2 13:25:54 2011 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Sat, 2 Jul 2011 13:25:54 -0500 (CDT) Subject: [Swift-commit] r4728 - trunk/tests/language/working Message-ID: <20110702182554.466EE9CCCB@svn.ci.uchicago.edu> Author: hategan Date: 2011-07-02 13:25:54 -0500 (Sat, 02 Jul 2011) New Revision: 4728 Added: trunk/tests/language/working/060-stdinouterr.setup.sh Log: ... and that Added: trunk/tests/language/working/060-stdinouterr.setup.sh =================================================================== --- trunk/tests/language/working/060-stdinouterr.setup.sh (rev 0) +++ trunk/tests/language/working/060-stdinouterr.setup.sh 2011-07-02 18:25:54 UTC (rev 4728) @@ -0,0 +1 @@ +cp $GROUP/test.in . \ No newline at end of file Property changes on: trunk/tests/language/working/060-stdinouterr.setup.sh ___________________________________________________________________ Added: svn:executable + * From hategan at ci.uchicago.edu Sat Jul 2 13:51:20 2011 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Sat, 2 Jul 2011 13:51:20 -0500 (CDT) Subject: [Swift-commit] r4729 - trunk/tests Message-ID: <20110702185120.3B8A39CCCB@svn.ci.uchicago.edu> Author: hategan Date: 2011-07-02 13:51:19 -0500 (Sat, 02 Jul 2011) New Revision: 4729 Modified: trunk/tests/suite.sh Log: mixed tc.data, some color, better default topdir Modified: trunk/tests/suite.sh =================================================================== --- trunk/tests/suite.sh 2011-07-02 18:25:54 UTC (rev 4728) +++ trunk/tests/suite.sh 2011-07-02 18:51:19 UTC (rev 4729) @@ -33,8 +33,9 @@ VERBOSE=0 TOTAL_TIME=0 INDIVIDUAL_TEST_TIME=0 +COLORIZE=0 # The directory in which to start: -TOPDIR=$PWD +TOPDIR=`readlink -f $PWD/../../../..` while [ $# -gt 0 ]; do case $1 in @@ -78,6 +79,9 @@ -v) VERBOSE=1 shift;; + -l) + COLORIZE=1 + shift;; *) GROUPARG=$1 shift;; @@ -89,6 +93,19 @@ HTML_COMMENTS=1 fi +if [ $COLORIZE ]; then + LGREEN="\033[1;32m" + YELLOW="\033[1;33m" + RED="\033[1;31m" + GRAY="\033[0;37m" +else + LGREEN="" + YELLOW="" + RED="" + GRAY="" +fi + + # Iterations per test (may want to run each test multiple times?) ITERS_LOCAL=1 @@ -347,7 +364,7 @@ if [ "$RESULT" == "Passed" ]; then printf %-10.10s "success">>$REPORT else - echo "FAILED" + echo -e "${RED}FAILED${GRAY}" cat $RUNDIR/$TEST_LOG < /dev/null printf %-10.10s "failure">>$REPORT fi @@ -364,7 +381,7 @@ html_td class "success" width 25 title "$CMD" html_a_href $TEST_LOG "$LABEL" else - echo "FAILED" + echo -e "${RED}FAILED${GRAY}" cat $RUNDIR/$TEST_LOG < /dev/null html_td class "failure" width 25 title "$CMD" html_a_href $TEST_LOG $LABEL @@ -381,8 +398,12 @@ start_group() { G=$1 echo - echo $G - echo + echo -e "${LGREEN}/----------------------------------------------------" + echo "|" + echo "| $G" + echo "|" + echo -e "\\----------------------------------------------------${GRAY}" + echo if [ $TEXTREPORT == 1 ]; then stars printf "$G\n">>$REPORT @@ -658,7 +679,7 @@ INDIVIDUAL_TEST_TIME=$(( STOP-START )) TOTAL_TIME=$(( INDIVIDUAL_TEST_TIME+TOTAL_TIME )) - echo "TOOK (seconds): $INDIVIDUAL_TEST_TIME" + echo -e "${YELLOW}TOOK (seconds): $INDIVIDUAL_TEST_TIME${GRAY}" RESULT=$( result ) #Verifies the value of $RESULT, if the test was successful @@ -889,6 +910,11 @@ cp -v $SWIFT_HOME/etc/tc.data . [ $? != 0 ] && crash "Could not copy tc.data!" fi + if [ -f $GROUP/tc.template.mix.data ]; then + sed "s at _DIR_@$GROUP@" < $GROUP/tc.template.mix.data >> tc.data + [ $? != 0 ] && crash "Could not create tc.data!" + echo "Mixing: $GROUP/tc.template.mix.data" + fi } # Generate the CDM file, fs.data @@ -962,9 +988,14 @@ TESTNAME=$( basename $TEST ) - echo -e "\nTest case: $TESTNAME" + echo + echo + echo "/--------------------------------------------------------------" + echo -e "| Test case: $LGREEN$TESTNAME$GRAY" + echo "\--------------------------------------------------------------" + echo - cp -v $GROUP/$TESTNAME . + cp $GROUP/$TESTNAME . TESTLINK=$TESTNAME start_row for (( i=0; $i<$ITERS_LOCAL; i=$i+1 )); do From hategan at ci.uchicago.edu Sat Jul 2 13:53:00 2011 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Sat, 2 Jul 2011 13:53:00 -0500 (CDT) Subject: [Swift-commit] r4730 - trunk/tests/language/working Message-ID: <20110702185300.5F2109CCCB@svn.ci.uchicago.edu> Author: hategan Date: 2011-07-02 13:53:00 -0500 (Sat, 02 Jul 2011) New Revision: 4730 Added: trunk/tests/language/working/combine trunk/tests/language/working/generate trunk/tests/language/working/process trunk/tests/language/working/tc.template.mix.data Log: made diamond work Added: trunk/tests/language/working/combine =================================================================== --- trunk/tests/language/working/combine (rev 0) +++ trunk/tests/language/working/combine 2011-07-02 18:53:00 UTC (rev 4730) @@ -0,0 +1,34 @@ +#!/bin/bash + +O="" +I="" +R="" + +while [ $# -gt 0 ]; do + echo $1 + case $1 in + -p) + P=$2 + shift 2;; + -i) + shift + while [ "${1:0:1}" != "-" ]; do + I="$I $1" + echo $1 + shift + done + ;; + -o) + O=$2 + shift 2;; + *) + R="$R$1" + shift;; + esac +done + +for J in $I; do + cat $J >> $O +done + +echo $R >> $O Property changes on: trunk/tests/language/working/combine ___________________________________________________________________ Added: svn:executable + * Added: trunk/tests/language/working/generate =================================================================== --- trunk/tests/language/working/generate (rev 0) +++ trunk/tests/language/working/generate 2011-07-02 18:53:00 UTC (rev 4730) @@ -0,0 +1,22 @@ +#!/bin/bash + +P="" +O="" +R="" + +while [ $# -gt 0 ]; do + case $1 in + -p) + P=$2 + shift 2;; + -o) + O=$2 + shift 2;; + *) + R="$R$1" + shift;; + esac +done + +echo $P >> $O +echo $R >> $O Property changes on: trunk/tests/language/working/generate ___________________________________________________________________ Added: svn:executable + * Added: trunk/tests/language/working/process =================================================================== --- trunk/tests/language/working/process (rev 0) +++ trunk/tests/language/working/process 2011-07-02 18:53:00 UTC (rev 4730) @@ -0,0 +1,27 @@ +#!/bin/bash + +P="" +O="" +I="" +R="" + +while [ $# -gt 0 ]; do + case $1 in + -p) + P=$2 + shift 2;; + -i) + I=$2 + shift 2;; + -o) + O=$2 + shift 2;; + *) + R="$R$1" + shift;; + esac +done + +cat $I > $O +echo $P >> $O +echo $R >> $O Property changes on: trunk/tests/language/working/process ___________________________________________________________________ Added: svn:executable + * Added: trunk/tests/language/working/tc.template.mix.data =================================================================== --- trunk/tests/language/working/tc.template.mix.data (rev 0) +++ trunk/tests/language/working/tc.template.mix.data 2011-07-02 18:53:00 UTC (rev 4730) @@ -0,0 +1,3 @@ +localhost generate _DIR_/generate INSTALLED INTEL32::LINUX null +localhost process _DIR_/process INSTALLED INTEL32::LINUX null +localhost combine _DIR_/combine INSTALLED INTEL32::LINUX null \ No newline at end of file From hategan at ci.uchicago.edu Sat Jul 2 17:28:51 2011 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Sat, 2 Jul 2011 17:28:51 -0500 (CDT) Subject: [Swift-commit] r4731 - trunk/tests Message-ID: <20110702222851.2B3479CCCB@svn.ci.uchicago.edu> Author: hategan Date: 2011-07-02 17:28:51 -0500 (Sat, 02 Jul 2011) New Revision: 4731 Modified: trunk/tests/suite.sh Log: add ability to specify comman line arguments for a test with "name.args" Modified: trunk/tests/suite.sh =================================================================== --- trunk/tests/suite.sh 2011-07-02 18:53:00 UTC (rev 4730) +++ trunk/tests/suite.sh 2011-07-02 22:28:51 UTC (rev 4731) @@ -722,6 +722,7 @@ CHECKSCRIPT=${SWIFTSCRIPT%.swift}.check.sh CLEANSCRIPT=${SWIFTSCRIPT%.swift}.clean.sh TIMEOUTFILE=${SWIFTSCRIPT%.swift}.timeout + ARGSFILE=${SWIFTSCRIPT%.swift}.args TEST_SHOULD_FAIL=0 if [ -x $GROUP/$SETUPSCRIPT ]; then @@ -731,6 +732,11 @@ html "  " html_~td fi + + ARGS="" + if [ -f $GROUP/$ARGSFILE ]; then + ARGS=`cat $GROUP/$ARGSFILE` + fi CDM= [ -r fs.data ] && CDM="-cdm.file fs.data" @@ -748,7 +754,7 @@ -config swift.properties \ -sites.file sites.xml \ -tc.file tc.data \ - $CDM $SWIFTSCRIPT + $CDM $SWIFTSCRIPT $ARGS TEST_SHOULD_FAIL=0 if [ -x $GROUP/$CHECKSCRIPT ]; then From hategan at ci.uchicago.edu Sat Jul 2 17:39:52 2011 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Sat, 2 Jul 2011 17:39:52 -0500 (CDT) Subject: [Swift-commit] r4732 - trunk/tests/language/working Message-ID: <20110702223952.BC0269CCCB@svn.ci.uchicago.edu> Author: hategan Date: 2011-07-02 17:39:52 -0500 (Sat, 02 Jul 2011) New Revision: 4732 Added: trunk/tests/language/working/file_counter.swift.disabled trunk/tests/language/working/q16.setup.sh trunk/tests/language/working/q17.setup.sh trunk/tests/language/working/q22.setup.sh trunk/tests/language/working/q23.args Removed: trunk/tests/language/working/file_counter.swift Modified: trunk/tests/language/working/q17.swift trunk/tests/language/working/q22.swift trunk/tests/language/working/q7.swift trunk/tests/language/working/tc.template.mix.data Log: updated tests Deleted: trunk/tests/language/working/file_counter.swift =================================================================== --- trunk/tests/language/working/file_counter.swift 2011-07-02 22:28:51 UTC (rev 4731) +++ trunk/tests/language/working/file_counter.swift 2011-07-02 22:39:52 UTC (rev 4732) @@ -1,20 +0,0 @@ -// a two-step workflow that essentially does -// ls "*.txt" | wc - -type file {} - -(file f) ls (string s) { - app { - ls s stdout=@filename(f); - } -} - -(file c) wc (file f) { - app { - wc stdin=@filename(f) stdout=@filename(c); - } -} - -file list, count; -list = ls("*.txt"); -count = wc(list); Copied: trunk/tests/language/working/file_counter.swift.disabled (from rev 4722, trunk/tests/language/working/file_counter.swift) =================================================================== --- trunk/tests/language/working/file_counter.swift.disabled (rev 0) +++ trunk/tests/language/working/file_counter.swift.disabled 2011-07-02 22:39:52 UTC (rev 4732) @@ -0,0 +1,20 @@ +// a two-step workflow that essentially does +// ls "*.txt" | wc + +type file {} + +(file f) ls (string s) { + app { + ls s stdout=@filename(f); + } +} + +(file c) wc (file f) { + app { + wc stdin=@filename(f) stdout=@filename(c); + } +} + +file list, count; +list = ls("*.txt"); +count = wc(list); Added: trunk/tests/language/working/q16.setup.sh =================================================================== --- trunk/tests/language/working/q16.setup.sh (rev 0) +++ trunk/tests/language/working/q16.setup.sh 2011-07-02 22:39:52 UTC (rev 4732) @@ -0,0 +1,3 @@ +#!/bin/bash + +echo "one two three" > q16.txt Property changes on: trunk/tests/language/working/q16.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: trunk/tests/language/working/q17.setup.sh =================================================================== --- trunk/tests/language/working/q17.setup.sh (rev 0) +++ trunk/tests/language/working/q17.setup.sh 2011-07-02 22:39:52 UTC (rev 4732) @@ -0,0 +1,5 @@ +#!/bin/bash + +echo "eye" > one.txt +echo "eye bee" > two.txt +echo "eye bee see" > three.txt \ No newline at end of file Property changes on: trunk/tests/language/working/q17.setup.sh ___________________________________________________________________ Added: svn:executable + * Modified: trunk/tests/language/working/q17.swift =================================================================== --- trunk/tests/language/working/q17.swift 2011-07-02 22:28:51 UTC (rev 4731) +++ trunk/tests/language/working/q17.swift 2011-07-02 22:39:52 UTC (rev 4732) @@ -7,7 +7,7 @@ } } -string inputNames = "one.txt two.txt three.txt"; +string inputNames[] = ["one.txt", "two.txt", "three.txt"]; messagefile inputfiles[] ; Added: trunk/tests/language/working/q22.setup.sh =================================================================== --- trunk/tests/language/working/q22.setup.sh (rev 0) +++ trunk/tests/language/working/q22.setup.sh 2011-07-02 22:39:52 UTC (rev 4732) @@ -0,0 +1,5 @@ +#!/bin/bash + +echo "eye" > one.txt +echo "eye bee" > two.txt +echo "eye bee see" > three.txt \ No newline at end of file Property changes on: trunk/tests/language/working/q22.setup.sh ___________________________________________________________________ Added: svn:executable + * Modified: trunk/tests/language/working/q22.swift =================================================================== --- trunk/tests/language/working/q22.swift 2011-07-02 22:28:51 UTC (rev 4731) +++ trunk/tests/language/working/q22.swift 2011-07-02 22:39:52 UTC (rev 4732) @@ -7,8 +7,8 @@ } } -string inputNames = "one.txt two.txt three.txt"; -string outputNames = "one.count two.count three.count"; +string inputNames[] = ["one.txt", "two.txt", "three.txt"]; +string outputNames[] = ["one.count", "two.count", "three.count"]; messagefile inputfiles[] ; countfile outputfiles[] ; Added: trunk/tests/language/working/q23.args =================================================================== --- trunk/tests/language/working/q23.args (rev 0) +++ trunk/tests/language/working/q23.args 2011-07-02 22:39:52 UTC (rev 4732) @@ -0,0 +1 @@ +-text=Hello \ No newline at end of file Modified: trunk/tests/language/working/q7.swift =================================================================== --- trunk/tests/language/working/q7.swift 2011-07-02 22:28:51 UTC (rev 4731) +++ trunk/tests/language/working/q7.swift 2011-07-02 22:39:52 UTC (rev 4732) @@ -6,7 +6,7 @@ } } -string outputNames = "one two three"; +string outputNames[] = ["one", "two", "three"]; file outputFiles[] ; Modified: trunk/tests/language/working/tc.template.mix.data =================================================================== --- trunk/tests/language/working/tc.template.mix.data 2011-07-02 22:28:51 UTC (rev 4731) +++ trunk/tests/language/working/tc.template.mix.data 2011-07-02 22:39:52 UTC (rev 4732) @@ -1,3 +1,4 @@ localhost generate _DIR_/generate INSTALLED INTEL32::LINUX null localhost process _DIR_/process INSTALLED INTEL32::LINUX null -localhost combine _DIR_/combine INSTALLED INTEL32::LINUX null \ No newline at end of file +localhost combine _DIR_/combine INSTALLED INTEL32::LINUX null +localhost wc /usr/bin/wc INSTALLED INTEL32::LINUX null From hategan at ci.uchicago.edu Sat Jul 2 19:29:25 2011 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Sat, 2 Jul 2011 19:29:25 -0500 (CDT) Subject: [Swift-commit] r4733 - trunk/tests Message-ID: <20110703002926.00D229CCCB@svn.ci.uchicago.edu> Author: hategan Date: 2011-07-02 19:29:25 -0500 (Sat, 02 Jul 2011) New Revision: 4733 Modified: trunk/tests/suite.sh Log: unnamed is so much worse than the path Modified: trunk/tests/suite.sh =================================================================== --- trunk/tests/suite.sh 2011-07-02 22:39:52 UTC (rev 4732) +++ trunk/tests/suite.sh 2011-07-03 00:29:25 UTC (rev 4733) @@ -36,6 +36,7 @@ COLORIZE=0 # The directory in which to start: TOPDIR=`readlink -f $PWD/../../../..` +CRTDIR=`pwd` while [ $# -gt 0 ]; do case $1 in @@ -950,7 +951,14 @@ if [ -r $GROUP/title.txt ]; then cat $GROUP/title.txt else - echo "untitled" + G=$GROUP + PIECES="" + while [ "$G" != "$CRTDIR" ]; do + PIECE=`basename $G` + PIECES="$PIECE $PIECES" + G=`dirname $G` + done + echo $PIECES fi } @@ -967,7 +975,11 @@ html_td class "success" html "$TESTSPASSED Tests succeeded." html_~td - html_td class "failure" + if [ "$TESTSFAILED" == "0" ]; then + html_td class "success" + else + html_td class "failure" + fi html "$TESTSFAILED Tests failed." html_~td html_td class "neutral" align left @@ -1144,6 +1156,7 @@ echo "GROUP: $GROUP" [ -d $GROUP ] || crash "Could not find GROUP: $GROUP" TITLE=$( group_title ) + start_group "Group $GROUPCOUNT: $TITLE" test_group (( GROUPCOUNT++ )) From hategan at ci.uchicago.edu Sat Jul 2 20:53:28 2011 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Sat, 2 Jul 2011 20:53:28 -0500 (CDT) Subject: [Swift-commit] r4734 - trunk/libexec Message-ID: <20110703015328.D1EDB9CCCE@svn.ci.uchicago.edu> Author: hategan Date: 2011-07-02 20:53:28 -0500 (Sat, 02 Jul 2011) New Revision: 4734 Modified: trunk/libexec/execute-default.k trunk/libexec/vdl-int-staging.k trunk/libexec/vdl-int.k Log: unwrap things earlier Modified: trunk/libexec/execute-default.k =================================================================== --- trunk/libexec/execute-default.k 2011-07-03 00:29:25 UTC (rev 4733) +++ trunk/libexec/execute-default.k 2011-07-03 01:53:28 UTC (rev 4734) @@ -20,7 +20,7 @@ parallelFor(i, replicationChannel ignoreErrors(match = "^Abort$" execute2( - tr, maybe(arguments=arguments), + tr, maybe(arguments=unwrapClosedList(arguments)), maybe(stdin=stdin), maybe(stdout=stdout), maybe(stderr=stderr), stagein, stageout, restartout, replicationGroup, replicationChannel ) Modified: trunk/libexec/vdl-int-staging.k =================================================================== --- trunk/libexec/vdl-int-staging.k 2011-07-03 00:29:25 UTC (rev 4733) +++ trunk/libexec/vdl-int-staging.k 2011-07-03 01:53:28 UTC (rev 4734) @@ -89,8 +89,8 @@ wrapper := "_swiftwrap.staging" wrapfile := "{ddir}/param-{jobid}" - stdout := try(stdout, "stdout.txt") - stderr := try(stderr, "stderr.txt") + stdout := try(getFieldValue(stdout), "stdout.txt") + stderr := try(getFieldValue(stderr), "stderr.txt") wfdir := "{VDL:SCRIPTNAME}-{VDL:RUNID}" tmpdir := dircat("{wfdir}/jobs/{jobdir}", jobid) @@ -108,8 +108,8 @@ vdl:siteprofile(rhost, "swift:wrapperInterpreterOptions"), wrapper, "-e", vdl:executable(tr, rhost), - "-out", getFieldValue(stdout), - "-err", getFieldValue(stderr), + "-out", stdout, + "-err", stderr, "-i", maybe(getFieldValue(stdin)), "-d", flatten(unique(outFileDirs(stageout))), "-if", flatten(infiles(stagein)), @@ -117,7 +117,7 @@ "-k", "-cdmfile", cdmfile, "-status", "provider" - "-a", maybe(each(unwrapClosedList(arguments))) + "-a", maybe(each(arguments)) ) directory = "{wfdir}-{jobdir}-{jobid}" redirect = false Modified: trunk/libexec/vdl-int.k =================================================================== --- trunk/libexec/vdl-int.k 2011-07-03 00:29:25 UTC (rev 4733) +++ trunk/libexec/vdl-int.k 2011-07-03 01:53:28 UTC (rev 4734) @@ -393,7 +393,7 @@ task:transfer(srchost=rhost, srcdir=srcdir, srcfile=recfile, destdir="{VDL:SCRIPTNAME}-{VDL:RUNID}.d/") ( maybe(file:remove(recfile)) - log(LOG:WARN, "Failed to write to {srcdir} on {rhost}. Verify that all directories specified in your sites file exist and are writable!") + log(LOG:WARN, "Failed to transfer wrapper log for job {jobid}") log(LOG:DEBUG, "Exception for wrapper log failure from {srcdir} on {rhost}: ", exception) ) ) @@ -424,8 +424,8 @@ wrapfile := "{ddir}/param-{jobid}" - stdout := try(stdout, "stdout.txt") - stderr := try(stderr, "stderr.txt") + stdout := try(getFieldValue(stdout), "stdout.txt") + stderr := try(getFieldValue(stderr), "stderr.txt") kickstart := vdl:kickstart(rhost) fileDirs := fileDirs(stagein, stageout) os := vdl:siteprofile(rhost, "SYSINFO:OS") @@ -435,8 +435,8 @@ sys:file:write(wrapfile, "-scratch ", try(vdl:siteprofile(rhost, "scratch"), ""), nl(), "-e ",vdl:executable(tr, rhost), nl(), - "-out ", getFieldValue(stdout), nl(), - "-err ", getFieldValue(stderr), nl(), + "-out ", stdout, nl(), + "-err ", stderr, nl(), "-i ", maybe(getFieldValue(stdin)), nl(), "-d ", flatten(each(fileDirs)), nl(), "-if ", flatten(infiles(stagein)), nl(), @@ -444,7 +444,7 @@ "-k ", kickstart, nl(), "-cdmfile ", cdm:file(), nl(), "-status ", statusMode, nl(), - for(a, unwrapClosedList(arguments), "-a ", a, nl()) + for(a, arguments, "-a ", a, nl()) ) ) ) @@ -495,8 +495,8 @@ "-jobdir", jobdir, "-scratch", try(vdl:siteprofile(rhost, "scratch"), "") "-e", vdl:executable(tr, rhost), - "-out", getFieldValue(stdout), - "-err", getFieldValue(stderr), + "-out", stdout, + "-err", stderr, "-i", maybe(getFieldValue(stdin)), "-d", flatten(each(fileDirs)), "-if", flatten(infiles(stagein)), @@ -504,7 +504,7 @@ "-k", kickstart, "-cdmfile", cdm:file(), "-status", statusMode, - "-a", maybe(each(unwrapClosedList(arguments))) + "-a", maybe(each(arguments)) ) directory=wfdir redirect=false @@ -556,7 +556,7 @@ catch("^(?!Abort$).*" vdl:setprogress("Failed but can retry") log(LOG:DEBUG, "APPLICATION_EXCEPTION jobid={jobid} - Application exception: ", exception) - echo(exception) + if(matches(exception,".*executable bit.*") generateError(exception) ) @@ -586,7 +586,7 @@ exception( concat( "Exception in {tr}:", nl(), - maybe("Arguments: ", unwrapClosedList(arguments), nl()), + maybe("Arguments: ", arguments, nl()), "Host: {rhost}", nl(), "Directory: {tmpdir}", "{outs}", nl(), From hategan at ci.uchicago.edu Sat Jul 2 20:54:49 2011 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Sat, 2 Jul 2011 20:54:49 -0500 (CDT) Subject: [Swift-commit] r4735 - trunk/src/org/griphyn/vdl/karajan Message-ID: <20110703015449.7834E9CCCE@svn.ci.uchicago.edu> Author: hategan Date: 2011-07-02 20:54:49 -0500 (Sat, 02 Jul 2011) New Revision: 4735 Modified: trunk/src/org/griphyn/vdl/karajan/FuturePairIterator.java Log: removed unused import Modified: trunk/src/org/griphyn/vdl/karajan/FuturePairIterator.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/FuturePairIterator.java 2011-07-03 01:53:28 UTC (rev 4734) +++ trunk/src/org/griphyn/vdl/karajan/FuturePairIterator.java 2011-07-03 01:54:49 UTC (rev 4735) @@ -3,7 +3,6 @@ */ package org.griphyn.vdl.karajan; -import org.globus.cog.karajan.stack.VariableNotFoundException; import org.globus.cog.karajan.stack.VariableStack; import org.globus.cog.karajan.workflow.futures.FutureEvaluationException; import org.globus.cog.karajan.workflow.futures.FutureIterator; From hategan at ci.uchicago.edu Sat Jul 2 20:56:38 2011 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Sat, 2 Jul 2011 20:56:38 -0500 (CDT) Subject: [Swift-commit] r4736 - trunk/src/org/griphyn/vdl/karajan Message-ID: <20110703015638.242369CCCE@svn.ci.uchicago.edu> Author: hategan Date: 2011-07-02 20:56:38 -0500 (Sat, 02 Jul 2011) New Revision: 4736 Modified: trunk/src/org/griphyn/vdl/karajan/PairIterator.java Log: generics Modified: trunk/src/org/griphyn/vdl/karajan/PairIterator.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/PairIterator.java 2011-07-03 01:54:49 UTC (rev 4735) +++ trunk/src/org/griphyn/vdl/karajan/PairIterator.java 2011-07-03 01:56:38 UTC (rev 4736) @@ -9,11 +9,11 @@ import org.globus.cog.karajan.util.KarajanIterator; public class PairIterator implements KarajanIterator { - private Iterator it; + private Iterator it; private int crt, count; private Pair crto; - public PairIterator(Map map) { + public PairIterator(Map map) { this.it = map.entrySet().iterator(); this.count = map.size(); } @@ -54,7 +54,7 @@ } private Pair convert(Object o) { - Map.Entry e = (Map.Entry) o; + Map.Entry e = (Map.Entry) o; return new Pair(e.getKey(), e.getValue()); } From hategan at ci.uchicago.edu Sat Jul 2 20:57:32 2011 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Sat, 2 Jul 2011 20:57:32 -0500 (CDT) Subject: [Swift-commit] r4737 - trunk/src/org/griphyn/vdl/karajan Message-ID: <20110703015732.E91669CCCE@svn.ci.uchicago.edu> Author: hategan Date: 2011-07-02 20:57:32 -0500 (Sat, 02 Jul 2011) New Revision: 4737 Modified: trunk/src/org/griphyn/vdl/karajan/WaitingThreadsMonitor.java Log: in some cases there is no stack Modified: trunk/src/org/griphyn/vdl/karajan/WaitingThreadsMonitor.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/WaitingThreadsMonitor.java 2011-07-03 01:56:38 UTC (rev 4736) +++ trunk/src/org/griphyn/vdl/karajan/WaitingThreadsMonitor.java 2011-07-03 01:57:32 UTC (rev 4737) @@ -14,7 +14,9 @@ private static Set threads; public synchronized static void addThread(VariableStack stack) { - getThreads().add(stack); + if (stack != null) { + getThreads().add(stack); + } } private static synchronized Set getThreads() { From hategan at ci.uchicago.edu Sat Jul 2 21:09:19 2011 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Sat, 2 Jul 2011 21:09:19 -0500 (CDT) Subject: [Swift-commit] r4739 - trunk/src/org/griphyn/vdl/karajan/lib Message-ID: <20110703020919.3B5FB9CCCB@svn.ci.uchicago.edu> Author: hategan Date: 2011-07-02 21:09:19 -0500 (Sat, 02 Jul 2011) New Revision: 4739 Modified: trunk/src/org/griphyn/vdl/karajan/lib/SetFieldValue.java Log: fixed multi-dimensional array assignment Modified: trunk/src/org/griphyn/vdl/karajan/lib/SetFieldValue.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/SetFieldValue.java 2011-07-03 02:08:41 UTC (rev 4738) +++ trunk/src/org/griphyn/vdl/karajan/lib/SetFieldValue.java 2011-07-03 02:09:19 UTC (rev 4739) @@ -42,9 +42,8 @@ // is a DSHandle. There is no need (I think? maybe numerical casting?) // for type conversion here; but would be useful to have // type checking. - value.waitFor(); - deepCopy(leaf, value, stack); + deepCopy(leaf, value, stack, 0); return null; } @@ -98,18 +97,19 @@ /** make dest look like source - if its a simple value, copy that and if its an array then recursively copy */ - void deepCopy(DSHandle dest, DSHandle source, VariableStack stack) throws ExecutionException { + void deepCopy(DSHandle dest, DSHandle source, VariableStack stack, int level) throws ExecutionException { + ((AbstractDataNode) source).waitFor(); if (source.getType().isPrimitive()) { dest.setValue(source.getValue()); } else if (source.getType().isArray()) { PairIterator it; - if (stack.isDefined("it")) { - it = (PairIterator) stack.getVar("it"); + if (stack.isDefined("it" + level)) { + it = (PairIterator) stack.getVar("it" + level); } else { it = new PairIterator(source.getArrayValue()); - stack.setVar("it", it); + stack.setVar("it" + level, it); } while (it.hasNext()) { Pair pair = (Pair) it.next(); @@ -129,8 +129,9 @@ catch (InvalidPathException ipe) { throw new ExecutionException("Could not get destination field",ipe); } - deepCopy(field, rhs, stack); + deepCopy(field, rhs, stack, level + 1); } + stack.currentFrame().deleteVar("it" + level); dest.closeShallow(); } else if (!source.getType().isComposite()) { @@ -161,14 +162,11 @@ stack.setVar("fc", fc); try { fc.start(); - throw new FutureNotYetAvailable(fc); } - catch (FutureNotYetAvailable e) { - throw e; - } catch (Exception e) { throw new ExecutionException("Failed to start file copy", e); } + throw new FutureNotYetAvailable(fc); } } } From hategan at ci.uchicago.edu Sat Jul 2 21:08:41 2011 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Sat, 2 Jul 2011 21:08:41 -0500 (CDT) Subject: [Swift-commit] r4738 - in trunk/src/org/griphyn/vdl: karajan karajan/lib karajan/lib/swiftscript mapping mapping/file Message-ID: <20110703020841.4D8FF9CCCB@svn.ci.uchicago.edu> Author: hategan Date: 2011-07-02 21:08:41 -0500 (Sat, 02 Jul 2011) New Revision: 4738 Added: trunk/src/org/griphyn/vdl/karajan/FutureTracker.java trunk/src/org/griphyn/vdl/karajan/FutureWrapper.java Removed: trunk/src/org/griphyn/vdl/karajan/WrapperMap.java Modified: trunk/src/org/griphyn/vdl/karajan/ArrayIndexFutureList.java trunk/src/org/griphyn/vdl/karajan/DSHandleFutureWrapper.java trunk/src/org/griphyn/vdl/karajan/HangChecker.java trunk/src/org/griphyn/vdl/karajan/Monitor.java trunk/src/org/griphyn/vdl/karajan/lib/CloseDataset.java trunk/src/org/griphyn/vdl/karajan/lib/CreateArray.java trunk/src/org/griphyn/vdl/karajan/lib/FringePaths.java trunk/src/org/griphyn/vdl/karajan/lib/GetArrayIterator.java trunk/src/org/griphyn/vdl/karajan/lib/GetFieldSubscript.java trunk/src/org/griphyn/vdl/karajan/lib/GetFieldValue.java trunk/src/org/griphyn/vdl/karajan/lib/IsDone.java trunk/src/org/griphyn/vdl/karajan/lib/Mark.java trunk/src/org/griphyn/vdl/karajan/lib/New.java trunk/src/org/griphyn/vdl/karajan/lib/Range.java trunk/src/org/griphyn/vdl/karajan/lib/SetFieldValue.java trunk/src/org/griphyn/vdl/karajan/lib/SetFutureFault.java trunk/src/org/griphyn/vdl/karajan/lib/SiteProfile.java trunk/src/org/griphyn/vdl/karajan/lib/SliceArray.java trunk/src/org/griphyn/vdl/karajan/lib/Stagein.java trunk/src/org/griphyn/vdl/karajan/lib/Stageout.java trunk/src/org/griphyn/vdl/karajan/lib/SwiftArg.java trunk/src/org/griphyn/vdl/karajan/lib/UnwrapClosedList.java trunk/src/org/griphyn/vdl/karajan/lib/VDLFunction.java trunk/src/org/griphyn/vdl/karajan/lib/WaitFieldValue.java trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Assert.java trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/ExtractInt.java trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/FileName.java trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Fprintf.java trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Java.java trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Misc.java trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/ReadData.java trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/ReadStructured.java trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Sprintf.java trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Tracef.java trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/WriteData.java trunk/src/org/griphyn/vdl/mapping/AbstractDataNode.java trunk/src/org/griphyn/vdl/mapping/ArrayDataNode.java trunk/src/org/griphyn/vdl/mapping/DSHandle.java trunk/src/org/griphyn/vdl/mapping/ExternalDataNode.java trunk/src/org/griphyn/vdl/mapping/MappingParam.java trunk/src/org/griphyn/vdl/mapping/RootArrayDataNode.java trunk/src/org/griphyn/vdl/mapping/RootDataNode.java trunk/src/org/griphyn/vdl/mapping/file/ArrayFileMapper.java Log: got rid of the wrapper map Modified: trunk/src/org/griphyn/vdl/karajan/ArrayIndexFutureList.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/ArrayIndexFutureList.java 2011-07-03 01:57:32 UTC (rev 4737) +++ trunk/src/org/griphyn/vdl/karajan/ArrayIndexFutureList.java 2011-07-03 02:08:41 UTC (rev 4738) @@ -5,6 +5,8 @@ import java.util.ArrayList; import java.util.HashSet; +import java.util.LinkedList; +import java.util.List; import java.util.Map; import java.util.Set; @@ -16,40 +18,34 @@ import org.globus.cog.karajan.workflow.futures.FutureListener; import org.globus.cog.karajan.workflow.futures.FutureNotYetAvailable; import org.globus.cog.karajan.workflow.futures.ListenerStackPair; -import org.griphyn.vdl.mapping.DSHandle; -import org.griphyn.vdl.mapping.DSHandleListener; +import org.griphyn.vdl.mapping.ArrayDataNode; -public class ArrayIndexFutureList implements FutureList, DSHandleListener { +public class ArrayIndexFutureList implements FutureList, FutureWrapper { private ArrayList keys; private Map values; - private boolean closed; - private ArrayList listeners; - private FutureEvaluationException exception; + private List listeners; + private ArrayDataNode node; - public ArrayIndexFutureList(DSHandle handle, Map values) { + public ArrayIndexFutureList(ArrayDataNode node, Map values) { + this.node = node; this.values = values; keys = new ArrayList(); - handle.addListener(this); } - private RuntimeException notYetAvailable() { - if (exception != null) { - return exception; - } - return new FutureNotYetAvailable(this); - } - public Object get(int index) { - if (exception != null) { - throw exception; + synchronized(node) { + Object v = node.getValue(); + if (v instanceof RuntimeException) { + throw (RuntimeException) v; + } + if (!node.isClosed() && index >= keys.size()) { + throw new FutureNotYetAvailable(this); + } + else { + Object key = keys.get(index); + return new Pair(key, values.get(key)); + } } - if (!closed && index >= keys.size()) { - throw notYetAvailable(); - } - else { - Object key = keys.get(index); - return new Pair(key, values.get(key)); - } } public int available() { @@ -70,43 +66,47 @@ } public void close() { - synchronized(this) { - closed = true; - Set allkeys = new HashSet(values.keySet()); - allkeys.removeAll(keys); - // remaining keys must be added - keys.addAll(allkeys); + synchronized(node) { + purge(); } notifyListeners(); } - public synchronized boolean isClosed() { - return closed; + private void purge() { + Set allkeys = new HashSet(values.keySet()); + allkeys.removeAll(keys); + // remaining keys must be added + keys.addAll(allkeys); } + public boolean isClosed() { + synchronized(node) { + return node.isClosed(); + } + } + public Object getValue() { return this; } - public void addModificationAction(FutureListener target, - VariableStack stack) { - synchronized(this) { + public void addModificationAction(FutureListener target, VariableStack stack) { + synchronized(node) { if (listeners == null) { - listeners = new ArrayList(); + listeners = new LinkedList(); } - listeners.add(new ListenerStackPair(target, stack)); - if (!closed) { + WaitingThreadsMonitor.addThread(stack); + if (!node.isClosed()) { return; } } - // closed + // closed == true; notifyListeners(); } - private void notifyListeners() { - ArrayList l; - synchronized (this) { + public void notifyListeners() { + List l; + synchronized(node) { if (listeners == null) { return; } @@ -114,23 +114,36 @@ l = listeners; listeners = null; } - + for (ListenerStackPair lsp : l) { + WaitingThreadsMonitor.removeThread(lsp.stack); lsp.listener.futureModified(this, lsp.stack); } } public EventTargetPair[] getListenerEvents() { - return listeners.toArray(new EventTargetPair[0]); + synchronized(node) { + if (listeners != null) { + return listeners.toArray(new EventTargetPair[0]); + } + else { + return null; + } + } } public int size() { - if (closed) { - return keys.size(); + synchronized(node) { + if (node.isClosed()) { + if (node.getValue() instanceof RuntimeException) { + throw (RuntimeException) node.getValue(); + } + return keys.size(); + } + else { + throw new FutureNotYetAvailable(this); + } } - else { - throw notYetAvailable(); - } } public String toString() { @@ -141,7 +154,7 @@ else { l = listeners.size() + " listeners"; } - if (!closed) { + if (!isClosed()) { return "Open, " + keys.size() + " elements, " + l; } else { @@ -153,15 +166,31 @@ } public void fail(FutureEvaluationException e) { - this.exception = e; - notifyListeners(); + synchronized(node) { + node.setValue(e); + } } public FutureEvaluationException getException() { - return exception; + synchronized(node) { + Object v = node.getValue(); + if (v instanceof FutureEvaluationException) { + return (FutureEvaluationException) v; + } + else { + return null; + } + } } - public void handleClosed(DSHandle handle) { - close(); + public int listenerCount() { + synchronized(node) { + if (listeners == null) { + return 0; + } + else { + return listeners.size(); + } + } } } Modified: trunk/src/org/griphyn/vdl/karajan/DSHandleFutureWrapper.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/DSHandleFutureWrapper.java 2011-07-03 01:57:32 UTC (rev 4737) +++ trunk/src/org/griphyn/vdl/karajan/DSHandleFutureWrapper.java 2011-07-03 02:08:41 UTC (rev 4738) @@ -8,120 +8,104 @@ import org.globus.cog.karajan.stack.VariableStack; import org.globus.cog.karajan.workflow.events.EventTargetPair; -import org.globus.cog.karajan.workflow.futures.Future; import org.globus.cog.karajan.workflow.futures.FutureEvaluationException; import org.globus.cog.karajan.workflow.futures.FutureListener; import org.globus.cog.karajan.workflow.futures.ListenerStackPair; -import org.griphyn.vdl.mapping.DSHandle; -import org.griphyn.vdl.mapping.DSHandleListener; +import org.griphyn.vdl.mapping.AbstractDataNode; -public class DSHandleFutureWrapper implements Future, DSHandleListener { - private DSHandle handle; - private LinkedList listeners; +public class DSHandleFutureWrapper implements FutureWrapper { + private LinkedList listeners; + private AbstractDataNode node; + + public DSHandleFutureWrapper(AbstractDataNode node) { + this.node = node; + } + + public void addModificationAction(FutureListener target, VariableStack stack) { + /** + * TODO So, the strategy is the following: getValue() or something else + * throws a future exception; then some entity catches that and calls + * this method. There is no way to ensure that the future was not closed + * in the mean time. What has to be done is that this method should + * check if the future was closed or modified at the time of the call of + * this method and call notifyListeners(). + */ + synchronized(node) { + if (listeners == null) { + listeners = new LinkedList(); + } + listeners.add(new ListenerStackPair(target, stack)); + WaitingThreadsMonitor.addThread(stack); + if (!node.isClosed()) { + return; + } + } + // closed == true; + notifyListeners(); + } - public DSHandleFutureWrapper(DSHandle handle) { - this.handle = handle; - handle.addListener(this); - } + public void notifyListeners() { + List l; + synchronized(node) { + if (listeners == null) { + return; + } + + l = listeners; + listeners = null; + } + + for (ListenerStackPair lsp : l) { + WaitingThreadsMonitor.removeThread(lsp.stack); + lsp.listener.futureModified(this, lsp.stack); + } + } - public synchronized void close() { - handle.closeShallow(); - } + public void close() { + node.closeShallow(); + } + + public boolean isClosed() { + return node.isClosed(); + } - public synchronized boolean isClosed() { - return handle.isClosed(); - } + public Object getValue() { + Object v = node.getValue(); + if (v instanceof RuntimeException) { + throw (RuntimeException) v; + } + return v; + } - public synchronized Object getValue() { - Object value = handle.getValue(); - if (value instanceof RuntimeException) { - throw (RuntimeException) value; - } - else { - return value; - } - } - - public void addModificationAction(FutureListener target, VariableStack stack) { - /** - * TODO So, the strategy is the following: getValue() or something else - * throws a future exception; then some entity catches that and calls - * this method. There is no way to ensure that the future was not closed - * in the mean time. What has to be done is that this method should - * check if the future was closed or modified at the time of the call of - * this method and call notifyListeners(). - */ - synchronized(this) { + public void fail(FutureEvaluationException e) { + node.setValue(e); + } + + public int listenerCount() { + synchronized(node) { if (listeners == null) { - listeners = new LinkedList(); + return 0; } - listeners.add(new ListenerStackPair(target, stack)); - WaitingThreadsMonitor.addThread(stack); - if (!handle.isClosed()) { - return; + else { + return listeners.size(); } } - // handle.isClosed(); - notifyListeners(); } + + private static final EventTargetPair[] EVENT_ARRAY = new EventTargetPair[0]; - private void notifyListeners() { - List l; - synchronized(this) { - if (listeners == null) { - return; - } - - l = listeners; - listeners = null; + public EventTargetPair[] getListenerEvents() { + synchronized(node) { + if (listeners != null) { + return listeners.toArray(EVENT_ARRAY); + } + else { + return null; + } } - - for (ListenerStackPair lsp : l) { - WaitingThreadsMonitor.removeThread(lsp.stack); - lsp.listener.futureModified(DSHandleFutureWrapper.this, lsp.stack); - } } - public synchronized int listenerCount() { - if (listeners == null) { - return 0; - } - else { - return listeners.size(); - } - } - - public synchronized EventTargetPair[] getListenerEvents() { - if (listeners != null) { - return (EventTargetPair[]) listeners.toArray(new EventTargetPair[0]); - } - else { - return null; - } - } - public String toString() { - String l; - if (listeners == null) { - l = "no listeners"; - } - else { - l = listeners.size() + " listeners"; - } - if (!isClosed()) { - return "Open, " + l; - } - else { - return "Closed, " + l; - } + return "F/" + node; } - - public void fail(FutureEvaluationException e) { - handle.setValue(e); - handle.closeShallow(); - } - - public void handleClosed(DSHandle handle) { - notifyListeners(); - } } Added: trunk/src/org/griphyn/vdl/karajan/FutureTracker.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/FutureTracker.java (rev 0) +++ trunk/src/org/griphyn/vdl/karajan/FutureTracker.java 2011-07-03 02:08:41 UTC (rev 4738) @@ -0,0 +1,49 @@ +//---------------------------------------------------------------------- +//This code is developed as part of the Java CoG Kit project +//The terms of the license can be found at http://www.cogkit.org/license +//This message may not be removed or altered. +//---------------------------------------------------------------------- + +/* + * Created on Jul 1, 2011 + */ +package org.griphyn.vdl.karajan; + +import java.util.HashMap; +import java.util.Map; + +import org.globus.cog.karajan.stack.VariableStack; +import org.globus.cog.karajan.workflow.futures.Future; +import org.griphyn.vdl.mapping.DSHandle; + +public class FutureTracker { + public static final String VAR_NAME = "#swift:futureTracker"; + + public static FutureTracker get(VariableStack stack) { + return (FutureTracker) stack.firstFrame().getVar(VAR_NAME); + } + + private static final FutureTracker ft = new FutureTracker(); + + public static FutureTracker get() { + return ft; + } + + private Map futures; + + public FutureTracker() { + futures = new HashMap(); + } + + public synchronized void add(DSHandle h, Future f) { + futures.put(h, f); + } + + public synchronized void remove(DSHandle h) { + futures.remove(h); + } + + public Map getMap() { + return futures; + } +} Added: trunk/src/org/griphyn/vdl/karajan/FutureWrapper.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/FutureWrapper.java (rev 0) +++ trunk/src/org/griphyn/vdl/karajan/FutureWrapper.java 2011-07-03 02:08:41 UTC (rev 4738) @@ -0,0 +1,21 @@ +//---------------------------------------------------------------------- +//This code is developed as part of the Java CoG Kit project +//The terms of the license can be found at http://www.cogkit.org/license +//This message may not be removed or altered. +//---------------------------------------------------------------------- + +/* + * Created on Jul 1, 2011 + */ +package org.griphyn.vdl.karajan; + +import org.globus.cog.karajan.workflow.events.EventTargetPair; +import org.globus.cog.karajan.workflow.futures.Future; + +public interface FutureWrapper extends Future { + void notifyListeners(); + + int listenerCount(); + + EventTargetPair[] getListenerEvents(); +} Modified: trunk/src/org/griphyn/vdl/karajan/HangChecker.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/HangChecker.java 2011-07-03 01:57:32 UTC (rev 4737) +++ trunk/src/org/griphyn/vdl/karajan/HangChecker.java 2011-07-03 02:08:41 UTC (rev 4738) @@ -28,12 +28,10 @@ public static final int CHECK_INTERVAL = 10000; private Timer timer; private long lastEventCount; - private WrapperMap map; private VariableStack stack; public HangChecker(VariableStack stack) throws ExecutionException { this.stack = stack; - map = VDLFunction.getFutureWrapperMap(stack); } public void start() { @@ -51,7 +49,7 @@ logger.warn("No events in " + (CHECK_INTERVAL / 1000) + "s."); ByteArrayOutputStream os = new ByteArrayOutputStream(); PrintStream ps = new PrintStream(os); - Monitor.dumpVariables(map, ps); + Monitor.dumpVariables(ps); Monitor.dumpThreads(ps); logger.warn(os.toString()); ps.close(); Modified: trunk/src/org/griphyn/vdl/karajan/Monitor.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/Monitor.java 2011-07-03 01:57:32 UTC (rev 4737) +++ trunk/src/org/griphyn/vdl/karajan/Monitor.java 2011-07-03 02:08:41 UTC (rev 4738) @@ -39,7 +39,6 @@ import org.globus.cog.karajan.util.ThreadingContext; import org.globus.cog.karajan.workflow.events.EventTargetPair; import org.globus.cog.karajan.workflow.futures.Future; -import org.griphyn.vdl.karajan.WrapperMap.FutureWrappers; import org.griphyn.vdl.mapping.AbstractDataNode; import org.griphyn.vdl.mapping.ArrayDataNode; import org.griphyn.vdl.mapping.DSHandle; @@ -55,10 +54,7 @@ private List wr, wt; private int crtdisp; - private WrapperMap map; - - public Monitor(WrapperMap map) { - this.map = map; + public Monitor() { Service s = new Service(); new Thread(s, "network debugger").start(); } @@ -99,20 +95,12 @@ crtdisp = VARS; ArrayList al = new ArrayList(); wr = new ArrayList(); + Map map = FutureTracker.get().getMap(); synchronized (map) { - Iterator i = map.entrySet().iterator(); - while (i.hasNext()) { + for (Map.Entry en : map.entrySet()) { List entry = new ArrayList(); - Map.Entry en = (Map.Entry) i.next(); - FutureWrappers fw = (FutureWrappers) en.getValue(); - Future f = null; - if (fw.nodeWrapper != null) { - f = fw.nodeWrapper; - } - else if (fw.arrayWrapper != null) { - f = fw.arrayWrapper; - } - DSHandle handle = (DSHandle) en.getKey(); + Future f = en.getValue(); + DSHandle handle = en.getKey(); String value = "-"; Object v; try { @@ -143,8 +131,8 @@ entry.add(f.isClosed() ? "Closed" : "Open"); entry.add(sz); String fs; - if (f instanceof DSHandleFutureWrapper) { - fs = String.valueOf(((DSHandleFutureWrapper) f).listenerCount()); + if (f instanceof FutureWrapper) { + fs = String.valueOf(((FutureWrapper) f).listenerCount()); } else { fs = f.toString(); @@ -209,25 +197,13 @@ public void dumpVariables() { dumpVariables(System.out); } - - public void dumpVariables(PrintStream ps) { - dumpVariables(map, ps); - } - public static void dumpVariables(WrapperMap map, PrintStream ps) { + public static void dumpVariables(PrintStream ps) { ps.println("\nRegistered futures:"); + Map map = FutureTracker.get().getMap(); synchronized (map) { - Iterator i = map.entrySet().iterator(); - while (i.hasNext()) { - Map.Entry en = (Map.Entry) i.next(); - FutureWrappers fw = (FutureWrappers) en.getValue(); - Future f = null; - if (fw.nodeWrapper != null) { - f = fw.nodeWrapper; - } - else if (fw.arrayWrapper != null) { - f = fw.arrayWrapper; - } + for (Map.Entry en : map.entrySet()) { + Future f = en.getValue(); AbstractDataNode handle = (AbstractDataNode) en.getKey(); String value = "-"; try { @@ -395,13 +371,12 @@ public EventTargetPair[] getListeners(int wrindex) { Object o = wr.get(wrindex); - if (o instanceof DSHandleFutureWrapper) { - return ((DSHandleFutureWrapper) o).getListenerEvents(); + if (o instanceof FutureWrapper) { + return ((FutureWrapper) o).getListenerEvents(); } - else if (o instanceof ArrayIndexFutureList) { - return ((ArrayIndexFutureList) o).getListenerEvents(); + else { + return null; } - return null; } public void mousePressed(MouseEvent e) { Deleted: trunk/src/org/griphyn/vdl/karajan/WrapperMap.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/WrapperMap.java 2011-07-03 01:57:32 UTC (rev 4737) +++ trunk/src/org/griphyn/vdl/karajan/WrapperMap.java 2011-07-03 02:08:41 UTC (rev 4738) @@ -1,104 +0,0 @@ -/* - * Created on Jul 6, 2006 - */ -package org.griphyn.vdl.karajan; - -import java.util.HashMap; -import java.util.Map; -import java.util.Set; - -import org.griphyn.vdl.mapping.DSHandle; - -public class WrapperMap { - private Map map; - - public WrapperMap() { - this.map = new HashMap(); - } - - public static class FutureWrappers { - public DSHandleFutureWrapper nodeWrapper; - public ArrayIndexFutureList arrayWrapper; - } - - public void close(DSHandle handle) { - DSHandleFutureWrapper nodeWrapper; - ArrayIndexFutureList arrayWrapper; - synchronized(this) { - FutureWrappers fw = map.get(handle); - if (fw == null) { - return; - } - nodeWrapper = fw.nodeWrapper; - arrayWrapper = fw.arrayWrapper; - } - if (nodeWrapper != null) { - nodeWrapper.close(); - } - if (arrayWrapper != null) { - arrayWrapper.close(); - } - } - - public boolean isClosed(DSHandle handle) { - DSHandleFutureWrapper nodeWrapper; - ArrayIndexFutureList arrayWrapper; - synchronized(this) { - FutureWrappers fw = map.get(handle); - if (fw == null) { - return false; - } - nodeWrapper = fw.nodeWrapper; - arrayWrapper = fw.arrayWrapper; - } - if (nodeWrapper != null) { - return nodeWrapper.isClosed(); - } - else if (arrayWrapper != null) { - return arrayWrapper.isClosed(); - } - else { - return false; - } - } - - public synchronized DSHandleFutureWrapper addNodeListener(DSHandle handle) { - FutureWrappers fw = map.get(handle); - if (fw == null) { - map.put(handle, fw = new FutureWrappers()); - } - if (fw.nodeWrapper == null) { - assert Thread.holdsLock(handle.getRoot()); // TODO should be on root or on handle? - fw.nodeWrapper = new DSHandleFutureWrapper(handle); - } - return fw.nodeWrapper; - } - - public synchronized ArrayIndexFutureList addFutureListListener(DSHandle handle, Map value) { - FutureWrappers fw = map.get(handle); - if (fw == null) { - map.put(handle, fw = new FutureWrappers()); - } - if (fw.arrayWrapper == null) { - assert Thread.holdsLock(handle.getRoot()); // TODO should be on root or on handle? - fw.arrayWrapper = new ArrayIndexFutureList(handle, value); - } - return fw.arrayWrapper; - } - - public synchronized void mergeListeners(DSHandle destination, DSHandle source) { - // TODO - throw new RuntimeException("not implemented"); - } - - public synchronized void markAsAvailable(DSHandle handle, Object key) { - FutureWrappers fw = map.get(handle); - if (fw != null && fw.arrayWrapper != null) { - fw.arrayWrapper.addKey(key); - } - } - - public Set> entrySet() { - return map.entrySet(); - } -} Modified: trunk/src/org/griphyn/vdl/karajan/lib/CloseDataset.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/CloseDataset.java 2011-07-03 01:57:32 UTC (rev 4737) +++ trunk/src/org/griphyn/vdl/karajan/lib/CloseDataset.java 2011-07-03 02:08:41 UTC (rev 4738) @@ -8,6 +8,7 @@ import org.globus.cog.karajan.stack.VariableStack; import org.globus.cog.karajan.util.TypeUtil; import org.globus.cog.karajan.workflow.ExecutionException; +import org.griphyn.vdl.mapping.AbstractDataNode; import org.griphyn.vdl.mapping.DSHandle; import org.griphyn.vdl.mapping.InvalidPathException; import org.griphyn.vdl.mapping.Path; @@ -31,10 +32,10 @@ var = var.getField(path); if (TypeUtil.toBoolean(OA_CHILDREN_ONLY.getValue(stack))) { - closeChildren(stack, var); + closeChildren(stack, (AbstractDataNode) var); } else { - closeDeep(stack, var); + var.closeDeep(); } } catch (InvalidPathException e) { Modified: trunk/src/org/griphyn/vdl/karajan/lib/CreateArray.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/CreateArray.java 2011-07-03 01:57:32 UTC (rev 4737) +++ trunk/src/org/griphyn/vdl/karajan/lib/CreateArray.java 2011-07-03 02:08:41 UTC (rev 4738) @@ -75,7 +75,7 @@ logger.info("CREATEARRAY MEMBER array="+handle.getIdentifier()+" index="+index+" member="+n.getIdentifier()); index++; } - closeShallow(stack, handle); + handle.closeShallow(); logger.info("CREATEARRAY COMPLETED array="+handle.getIdentifier()); return handle; @@ -84,5 +84,4 @@ throw new ExecutionException(e); } } - } Modified: trunk/src/org/griphyn/vdl/karajan/lib/FringePaths.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/FringePaths.java 2011-07-03 01:57:32 UTC (rev 4737) +++ trunk/src/org/griphyn/vdl/karajan/lib/FringePaths.java 2011-07-03 02:08:41 UTC (rev 4738) @@ -8,6 +8,7 @@ import org.globus.cog.karajan.arguments.Arg; import org.globus.cog.karajan.stack.VariableStack; import org.globus.cog.karajan.workflow.ExecutionException; +import org.globus.cog.karajan.workflow.futures.Future; import org.globus.cog.karajan.workflow.futures.FutureNotYetAvailable; import org.griphyn.vdl.mapping.DSHandle; import org.griphyn.vdl.mapping.HandleOpenException; @@ -34,9 +35,7 @@ throw new ExecutionException(e); } catch (HandleOpenException e) { - synchronized(root) { - throw new FutureNotYetAvailable(addFutureListener(stack, e.getSource())); - } + throw new FutureNotYetAvailable((Future) e.getSource()); } } } Modified: trunk/src/org/griphyn/vdl/karajan/lib/GetArrayIterator.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/GetArrayIterator.java 2011-07-03 01:57:32 UTC (rev 4737) +++ trunk/src/org/griphyn/vdl/karajan/lib/GetArrayIterator.java 2011-07-03 02:08:41 UTC (rev 4738) @@ -1,12 +1,11 @@ package org.griphyn.vdl.karajan.lib; -import java.util.Map; - import org.apache.log4j.Logger; import org.globus.cog.karajan.arguments.Arg; import org.globus.cog.karajan.stack.VariableStack; import org.globus.cog.karajan.workflow.ExecutionException; import org.griphyn.vdl.karajan.PairIterator; +import org.griphyn.vdl.mapping.ArrayDataNode; import org.griphyn.vdl.mapping.DSHandle; import org.griphyn.vdl.mapping.InvalidPathException; import org.griphyn.vdl.mapping.Path; @@ -34,18 +33,16 @@ } else { var = var.getField(path); - if (var.getType().isArray()) { - Map value = var.getArrayValue(); + if (!var.getType().isArray()) { + throw new RuntimeException("Cannot get array iterator for non-array"); + } + synchronized(var) { if (var.isClosed()) { - return new PairIterator(value); + return new PairIterator(var.getArrayValue()); } else { - synchronized(var.getRoot()) { - return addFutureListListener(stack, var, value); - } + return ((ArrayDataNode) var).getFutureList().futureIterator(); } - } else { - throw new RuntimeException("Cannot get array iterator for non-array"); } } } Modified: trunk/src/org/griphyn/vdl/karajan/lib/GetFieldSubscript.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/GetFieldSubscript.java 2011-07-03 01:57:32 UTC (rev 4737) +++ trunk/src/org/griphyn/vdl/karajan/lib/GetFieldSubscript.java 2011-07-03 02:08:41 UTC (rev 4738) @@ -28,20 +28,23 @@ Object index = PA_SUBSCRIPT.getValue(stack); try { -// TODO this is inefficient, but should expose the right semantics -// so can be fixed up later Path path; - if(index instanceof String) - path = parsePath("["+index+"]", stack); - else if(index instanceof Double) - path = parsePath("["+((Double)index).intValue()+"]", stack); - else - throw new RuntimeException("Cannot handle array index of Java type "+index.getClass()); + if (index instanceof String) { + path = Path.EMPTY_PATH.addFirst((String) index, true); + } + else if (index instanceof Double) { + path = Path.EMPTY_PATH.addFirst(String.valueOf(((Double) index).intValue()), true); + } + else { + throw new RuntimeException("Cannot handle array index of Java type " + index.getClass()); + } Collection fields = var.getFields(path); - if(fields.size() == 1) + if (fields.size() == 1) { return fields.iterator().next(); - else + } + else { return fields; + } } catch (InvalidPathException e) { throw new ExecutionException(e); Modified: trunk/src/org/griphyn/vdl/karajan/lib/GetFieldValue.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/GetFieldValue.java 2011-07-03 01:57:32 UTC (rev 4737) +++ trunk/src/org/griphyn/vdl/karajan/lib/GetFieldValue.java 2011-07-03 02:08:41 UTC (rev 4738) @@ -7,10 +7,9 @@ import org.globus.cog.karajan.arguments.Arg; import org.globus.cog.karajan.stack.VariableStack; import org.globus.cog.karajan.workflow.ExecutionException; -import org.globus.cog.karajan.workflow.futures.FutureNotYetAvailable; +import org.globus.cog.karajan.workflow.futures.FutureFault; +import org.griphyn.vdl.mapping.AbstractDataNode; import org.griphyn.vdl.mapping.DSHandle; -import org.griphyn.vdl.mapping.HandleOpenException; -import org.griphyn.vdl.mapping.InvalidPathException; import org.griphyn.vdl.mapping.Path; public class GetFieldValue extends VDLFunction { @@ -29,41 +28,27 @@ if (!(var1 instanceof DSHandle)) { return var1; } - DSHandle var = (DSHandle) var1; - DSHandle root = var.getRoot(); - synchronized(root) { - try { - Path path = parsePath(OA_PATH.getValue(stack), stack); - if (path.hasWildcards()) { - try { - return var.getFields(path).toArray(); - } - catch (HandleOpenException e) { - if (logger.isDebugEnabled()) { - logger.debug("Waiting for var=" + var + " path=" + path); - } - throw new FutureNotYetAvailable(addFutureListener(stack, e.getSource())); - } + AbstractDataNode var = (AbstractDataNode) var1; + + try { + Path path = parsePath(OA_PATH.getValue(stack), stack); + if (path.hasWildcards()) { + return var.getFields(path).toArray(); + } + else { + var = (AbstractDataNode) var.getField(path); + if (var.getType().isArray()) { + throw new RuntimeException("Getting value for array " + var + " which is not permitted."); } - else { - var = var.getField(path); - if (var.getType().isArray()) { - throw new RuntimeException("Getting value for array "+var+" which is not permitted."); - } - if (!var.isClosed()) { - if (logger.isDebugEnabled()) { - logger.debug("Waiting for " + var); - } - throw new FutureNotYetAvailable(addFutureListener(stack, var)); - } - else { - return var.getValue(); - } - } + var.waitFor(); + return var.getValue(); } - catch (InvalidPathException e) { - throw new ExecutionException(e); - } } + catch (FutureFault f) { + throw f; + } + catch (Exception e) { + throw new ExecutionException(e); + } } } Modified: trunk/src/org/griphyn/vdl/karajan/lib/IsDone.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/IsDone.java 2011-07-03 01:57:32 UTC (rev 4737) +++ trunk/src/org/griphyn/vdl/karajan/lib/IsDone.java 2011-07-03 02:08:41 UTC (rev 4738) @@ -21,8 +21,7 @@ } @Override - protected Object function(VariableStack stack) throws ExecutionException, - HandleOpenException { + protected Object function(VariableStack stack) throws ExecutionException { List files = TypeUtil.toList(STAGEOUT.getValue(stack)); for (Object f : files) { List pv = TypeUtil.toList(f); Modified: trunk/src/org/griphyn/vdl/karajan/lib/Mark.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/Mark.java 2011-07-03 01:57:32 UTC (rev 4737) +++ trunk/src/org/griphyn/vdl/karajan/lib/Mark.java 2011-07-03 02:08:41 UTC (rev 4738) @@ -25,8 +25,7 @@ } @Override - protected Object function(VariableStack stack) throws ExecutionException, - HandleOpenException { + protected Object function(VariableStack stack) throws ExecutionException { try { if (TypeUtil.toBoolean(ERR.getValue(stack))) { boolean mapping = TypeUtil.toBoolean(MAPPING.getValue(stack)); @@ -43,7 +42,7 @@ else { leaf.setValue(new DataDependentException(leaf, null)); } - closeShallow(stack, leaf); + leaf.closeShallow(); } } } Modified: trunk/src/org/griphyn/vdl/karajan/lib/New.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/New.java 2011-07-03 01:57:32 UTC (rev 4737) +++ trunk/src/org/griphyn/vdl/karajan/lib/New.java 2011-07-03 02:08:41 UTC (rev 4738) @@ -114,7 +114,7 @@ index++; } } - closeShallow(stack, handle); + handle.closeShallow(); } handle.init(mapping); @@ -127,7 +127,6 @@ handle.init(mapping); if (value != null) { handle.setValue(internalValue(type, value)); - closeShallow(stack, handle); } } Modified: trunk/src/org/griphyn/vdl/karajan/lib/Range.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/Range.java 2011-07-03 01:57:32 UTC (rev 4737) +++ trunk/src/org/griphyn/vdl/karajan/lib/Range.java 2011-07-03 02:08:41 UTC (rev 4738) @@ -47,13 +47,17 @@ handle = new RootArrayDataNode(type.arrayType()) { final DSHandle h = this; - public Collection getFields(Path path) - throws InvalidPathException, HandleOpenException { + { + closeShallow(); + } + + public Collection getFields(Path path) + throws InvalidPathException { if (path.size() > 1) { throw new InvalidPathException(path, this); } else if (path.equals(Path.EMPTY_PATH)) { - return Collections.singletonList(this); + return Collections.singletonList((DSHandle) this); } else { int index = Integer.parseInt(path.getFirst()); @@ -65,12 +69,12 @@ } } - public Map getArrayValue() { - return new AbstractMap() { - public Set entrySet() { - return new AbstractSet() { - public Iterator iterator() { - return new Iterator() { + public Map, DSHandle> getArrayValue() { + return new AbstractMap, DSHandle>() { + public Set, DSHandle>> entrySet() { + return new AbstractSet, DSHandle>>() { + public Iterator, DSHandle>> iterator() { + return new Iterator, DSHandle>>() { private double crt = start; private int index = 0; @@ -78,9 +82,9 @@ return crt <= stop; } - public Object next() { + public Map.Entry, DSHandle> next() { try { - Map.Entry e = new Map.Entry() { + Map.Entry, DSHandle> e = new Map.Entry, DSHandle>() { private DSHandle value; private int key; @@ -92,22 +96,22 @@ key = index; } - public Object getKey() { + public Comparable getKey() { return new Double(key); } - public Object getValue() { + public DSHandle getValue() { return value; } - public Object setValue(Object value) { + public DSHandle setValue(DSHandle value) { throw new UnsupportedOperationException(); } }; index++; crt += incr; if (crt > stop) { - VDLFunction.closeShallow(stack, h); + h.closeShallow(); } return e; } @@ -128,17 +132,7 @@ }; } }; - } - - public boolean isClosed() { - //the need for this lie arises from: - //1. adding fields to a truly closed array throws an exception - //2. this is a lazy array not a future array. Consequently, we - // want the consumer(s) of this array to think that all values - // in the array are available - return true; - } - + } }; return handle; } Modified: trunk/src/org/griphyn/vdl/karajan/lib/SetFieldValue.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/SetFieldValue.java 2011-07-03 01:57:32 UTC (rev 4737) +++ trunk/src/org/griphyn/vdl/karajan/lib/SetFieldValue.java 2011-07-03 02:08:41 UTC (rev 4738) @@ -10,10 +10,10 @@ import org.globus.cog.karajan.arguments.Arg; import org.globus.cog.karajan.stack.VariableStack; import org.globus.cog.karajan.workflow.ExecutionException; +import org.globus.cog.karajan.workflow.futures.FutureFault; import org.globus.cog.karajan.workflow.futures.FutureNotYetAvailable; import org.griphyn.vdl.karajan.Pair; import org.griphyn.vdl.karajan.PairIterator; -import org.griphyn.vdl.karajan.VDL2FutureException; import org.griphyn.vdl.mapping.AbstractDataNode; import org.griphyn.vdl.mapping.DSHandle; import org.griphyn.vdl.mapping.InvalidPathException; @@ -33,7 +33,7 @@ try { Path path = parsePath(OA_PATH.getValue(stack), stack); DSHandle leaf = var.getField(path); - DSHandle value = (DSHandle) PA_VALUE.getValue(stack); + AbstractDataNode value = (AbstractDataNode) PA_VALUE.getValue(stack); log(leaf, value); @@ -42,27 +42,14 @@ // is a DSHandle. There is no need (I think? maybe numerical casting?) // for type conversion here; but would be useful to have // type checking. - synchronized (value.getRoot()) { - if (!value.isClosed()) { - throw new FutureNotYetAvailable(addFutureListener(stack, value)); - } - } - try { - synchronized (var.getRoot()) { - deepCopy(leaf, value, stack); - if (var.getParent() != null && var.getParent().getType().isArray()) { - markAsAvailable(stack, leaf.getParent(), leaf.getPathFromRoot().getLast()); - } - } - } - catch (VDL2FutureException e) { - throw new FutureNotYetAvailable(addFutureListener(stack, e.getHandle())); - } + value.waitFor(); + deepCopy(leaf, value, stack); + return null; } - catch (FutureNotYetAvailable fnya) { - throw fnya; + catch (FutureFault f) { + throw f; } catch (Exception e) { // TODO tighten this throw new ExecutionException(e); @@ -144,7 +131,7 @@ } deepCopy(field, rhs, stack); } - closeShallow(stack, dest); + dest.closeShallow(); } else if (!source.getType().isComposite()) { Path dpath = dest.getPathFromRoot(); Modified: trunk/src/org/griphyn/vdl/karajan/lib/SetFutureFault.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/SetFutureFault.java 2011-07-03 01:57:32 UTC (rev 4737) +++ trunk/src/org/griphyn/vdl/karajan/lib/SetFutureFault.java 2011-07-03 02:08:41 UTC (rev 4738) @@ -40,7 +40,6 @@ else { leaf.setValue(new DataDependentException(leaf, (Exception) value)); } - closeShallow(stack, leaf); } } catch (Exception e) { Modified: trunk/src/org/griphyn/vdl/karajan/lib/SiteProfile.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/SiteProfile.java 2011-07-03 01:57:32 UTC (rev 4737) +++ trunk/src/org/griphyn/vdl/karajan/lib/SiteProfile.java 2011-07-03 02:08:41 UTC (rev 4738) @@ -5,25 +5,16 @@ import java.util.HashMap; import java.util.HashSet; -import java.util.Iterator; -import java.util.List; import java.util.Map; import java.util.Set; import org.apache.log4j.Logger; -import org.globus.cog.abstraction.impl.common.execution.WallTime; import org.globus.cog.karajan.arguments.Arg; -import org.globus.cog.karajan.arguments.ArgUtil; -import org.globus.cog.karajan.arguments.NamedArguments; import org.globus.cog.karajan.stack.VariableStack; import org.globus.cog.karajan.util.BoundContact; import org.globus.cog.karajan.util.TypeUtil; import org.globus.cog.karajan.workflow.ExecutionException; -import org.globus.cog.karajan.workflow.nodes.grid.GridExec; -import org.globus.swift.catalog.TCEntry; import org.globus.swift.catalog.types.Os; -import org.globus.swift.catalog.util.Profile; -import org.griphyn.vdl.karajan.TCCache; import org.griphyn.vdl.util.FQN; public class SiteProfile extends VDLFunction { Modified: trunk/src/org/griphyn/vdl/karajan/lib/SliceArray.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/SliceArray.java 2011-07-03 01:57:32 UTC (rev 4737) +++ trunk/src/org/griphyn/vdl/karajan/lib/SliceArray.java 2011-07-03 02:08:41 UTC (rev 4738) @@ -6,10 +6,9 @@ import org.globus.cog.karajan.arguments.Arg; import org.globus.cog.karajan.stack.VariableStack; import org.globus.cog.karajan.workflow.ExecutionException; -import org.globus.cog.karajan.workflow.futures.FutureNotYetAvailable; - import org.griphyn.vdl.karajan.Pair; import org.griphyn.vdl.karajan.PairIterator; +import org.griphyn.vdl.mapping.AbstractDataNode; import org.griphyn.vdl.mapping.DSHandle; import org.griphyn.vdl.mapping.InvalidPathException; import org.griphyn.vdl.mapping.Path; @@ -47,12 +46,8 @@ if(var1 instanceof DSHandle) { try { - DSHandle sourceArray = (DSHandle) var1; - synchronized(sourceArray.getRoot()) { - if(!sourceArray.isClosed()) { - throw new FutureNotYetAvailable(VDLFunction.addFutureListener(stack, sourceArray)); - } - } + AbstractDataNode sourceArray = (AbstractDataNode) var1; + sourceArray.waitFor(); Type sourceType = sourceArray.getType(); Modified: trunk/src/org/griphyn/vdl/karajan/lib/Stagein.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/Stagein.java 2011-07-03 01:57:32 UTC (rev 4737) +++ trunk/src/org/griphyn/vdl/karajan/lib/Stagein.java 2011-07-03 02:08:41 UTC (rev 4738) @@ -7,17 +7,15 @@ import org.apache.log4j.Logger; import org.globus.cog.karajan.arguments.Arg; +import org.globus.cog.karajan.arguments.Arg.Channel; import org.globus.cog.karajan.arguments.ArgUtil; import org.globus.cog.karajan.arguments.NamedArguments; -import org.globus.cog.karajan.arguments.Arg.Channel; import org.globus.cog.karajan.stack.VariableStack; import org.globus.cog.karajan.workflow.ExecutionException; -import org.globus.cog.karajan.workflow.futures.FutureNotYetAvailable; +import org.globus.cog.karajan.workflow.futures.FutureFault; import org.griphyn.vdl.mapping.AbstractDataNode; import org.griphyn.vdl.mapping.DSHandle; import org.griphyn.vdl.mapping.DependentException; -import org.griphyn.vdl.mapping.HandleOpenException; -import org.griphyn.vdl.mapping.InvalidPathException; import org.griphyn.vdl.mapping.MappingDependentException; import org.griphyn.vdl.mapping.Path; @@ -37,31 +35,8 @@ .isPrimitive()); } - private void waitFor(DSHandle var, VariableStack stack) - throws ExecutionException { - synchronized (var) { - if (!var.isClosed()) { - if (logger.isDebugEnabled()) { - logger.debug("Waiting for " + var); - } - throw new FutureNotYetAvailable(addFutureListener(stack, var)); - } - else { - Object v = var.getValue(); - if (logger.isDebugEnabled()) { - logger.debug("Do not need to wait for " + - var + " as it is closed and has value " + v + - (v != null ? " with class " + v.getClass() : "")); - } - if (v != null && v instanceof RuntimeException) { - throw (RuntimeException) v; - } - } - } - } - protected Object function(VariableStack stack) throws ExecutionException { - DSHandle var = (DSHandle) VAR.getValue(stack); + AbstractDataNode var = (AbstractDataNode) VAR.getValue(stack); if (!isPrimitive(var)) { boolean deperr = false; boolean mdeperr = false; @@ -69,7 +44,7 @@ Collection fp = var.getFringePaths(); try { for (Path p : fp) { - waitFor(var.getField(p), stack); + ((AbstractDataNode) var.getField(p)).waitFor(); } } catch (DependentException e) { @@ -79,15 +54,15 @@ STAGEIN.ret(stack, filename(stack, var.getField(p))[0]); } } + catch (FutureFault f) { + throw f; + } catch (MappingDependentException e) { logger.debug(e); deperr = true; mdeperr = true; } - catch (HandleOpenException e) { - throw new FutureNotYetAvailable(addFutureListener(stack, e.getSource())); - } - catch (InvalidPathException e) { + catch (Exception e) { throw new ExecutionException(e); } if (deperr || mdeperr) { @@ -98,7 +73,7 @@ } else { // we still wait until the primitive value is there - waitFor(var, stack); + var.waitFor(); } return null; } Modified: trunk/src/org/griphyn/vdl/karajan/lib/Stageout.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/Stageout.java 2011-07-03 01:57:32 UTC (rev 4737) +++ trunk/src/org/griphyn/vdl/karajan/lib/Stageout.java 2011-07-03 02:08:41 UTC (rev 4738) @@ -14,10 +14,9 @@ import org.globus.cog.karajan.arguments.NamedArguments; import org.globus.cog.karajan.stack.VariableStack; import org.globus.cog.karajan.workflow.ExecutionException; -import org.globus.cog.karajan.workflow.futures.FutureNotYetAvailable; import org.griphyn.vdl.mapping.AbstractDataNode; import org.griphyn.vdl.mapping.DSHandle; -import org.griphyn.vdl.mapping.HandleOpenException; +import org.griphyn.vdl.mapping.DataNode; import org.griphyn.vdl.mapping.MappingDependentException; import org.griphyn.vdl.mapping.Path; @@ -46,7 +45,7 @@ } protected Object function(VariableStack stack) throws ExecutionException { - DSHandle var = (DSHandle) VAR.getValue(stack); + AbstractDataNode var = (AbstractDataNode) VAR.getValue(stack); boolean deperr = false; boolean mdeperr = false; // currently only static arrays are supported as app returns @@ -55,12 +54,7 @@ // race conditions (e.g. if this array's mapper had some parameter // dependencies that weren't closed at the time the app was started). if (var.getType().isArray()) { - if (!var.isClosed()) { - if (logger.isDebugEnabled()) { - logger.debug("Waiting for array size from " + var); - } - throw new FutureNotYetAvailable(addFutureListener(stack, var)); - } + var.waitFor(); } try { if (!isPrimitive(var)) { @@ -90,9 +84,8 @@ channel.ret(stack, list(p, var)); } } - catch (HandleOpenException e) { - throw new FutureNotYetAvailable(addFutureListener(stack, e - .getSource())); + catch (Exception e) { + throw new ExecutionException(e); } } } Modified: trunk/src/org/griphyn/vdl/karajan/lib/SwiftArg.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/SwiftArg.java 2011-07-03 01:57:32 UTC (rev 4737) +++ trunk/src/org/griphyn/vdl/karajan/lib/SwiftArg.java 2011-07-03 02:08:41 UTC (rev 4738) @@ -6,7 +6,6 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; -import java.util.Map; import org.apache.log4j.Logger; import org.globus.cog.karajan.arguments.Arg; @@ -14,9 +13,10 @@ import org.globus.cog.karajan.arguments.VariableArguments; import org.globus.cog.karajan.stack.VariableStack; import org.globus.cog.karajan.workflow.ExecutionException; -import org.globus.cog.karajan.workflow.futures.FutureNotYetAvailable; -import org.griphyn.vdl.karajan.PairIterator; +import org.griphyn.vdl.mapping.AbstractDataNode; +import org.griphyn.vdl.mapping.ArrayDataNode; import org.griphyn.vdl.mapping.DSHandle; +import org.griphyn.vdl.mapping.DataNode; import org.griphyn.vdl.type.Type; import org.griphyn.vdl.type.Types; @@ -33,32 +33,17 @@ protected Object unwrap(VariableStack stack, Object val) throws ExecutionException { if (val instanceof DSHandle) { - DSHandle handle = (DSHandle) val; + AbstractDataNode handle = (AbstractDataNode) val; + if (logger.isDebugEnabled()) { + logger.debug("SwiftArg.getValue(" + handle + ")"); + } if (handle.getType().isArray()) { - Map value = handle.getArrayValue(); - synchronized(handle.getRoot()) { - if (handle.isClosed()) { - return new PairIterator(value); - } - else { - return VDLFunction.addFutureListListener(stack, handle, value); - } - } + return handle; } - if (logger.isDebugEnabled()) { - logger.debug("SwiftArg.getValue(" + handle + ")"); + else { + handle.waitFor(); + return handle.getValue(); } - synchronized (handle.getRoot()) { - if (!handle.isClosed()) { - if (logger.isDebugEnabled()) { - logger.debug("Waiting for " + handle); - } - throw new FutureNotYetAvailable(VDLFunction.addFutureListener(stack, handle)); - } - else { - return handle.getValue(); - } - } } else { throw new ExecutionException("Expected Swift data, but got some primitive type (" + val @@ -187,6 +172,15 @@ } return ret; } + + public AbstractDataNode[] asDataNodeArray(VariableStack stack) throws ExecutionException { + VariableArguments args = get(stack); + AbstractDataNode[] ret = new AbstractDataNode[args.size()]; + for (int i = 0; i < ret.length; i++) { + ret[i] = (AbstractDataNode) args.get(i); + } + return ret; + } public List asList(VariableStack stack) throws ExecutionException { VariableArguments args = get(stack); Modified: trunk/src/org/griphyn/vdl/karajan/lib/UnwrapClosedList.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/UnwrapClosedList.java 2011-07-03 01:57:32 UTC (rev 4737) +++ trunk/src/org/griphyn/vdl/karajan/lib/UnwrapClosedList.java 2011-07-03 02:08:41 UTC (rev 4738) @@ -30,7 +30,7 @@ for (DSHandle h : l) { if (h.getType().isArray()) { - Map m = h.getArrayValue(); + Map m = h.getArrayValue(); for (DSHandle h2 : m.values()) { r.add(h2.getValue()); } Modified: trunk/src/org/griphyn/vdl/karajan/lib/VDLFunction.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/VDLFunction.java 2011-07-03 01:57:32 UTC (rev 4737) +++ trunk/src/org/griphyn/vdl/karajan/lib/VDLFunction.java 2011-07-03 02:08:41 UTC (rev 4738) @@ -5,7 +5,6 @@ import java.util.Collections; import java.util.Comparator; import java.util.HashSet; -import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Map; @@ -24,9 +23,6 @@ import org.globus.cog.karajan.util.TypeUtil; import org.globus.cog.karajan.workflow.ExecutionException; import org.globus.cog.karajan.workflow.KarajanRuntimeException; -import org.globus.cog.karajan.workflow.futures.Future; -import org.globus.cog.karajan.workflow.futures.FutureIterator; -import org.globus.cog.karajan.workflow.futures.FutureNotYetAvailable; import org.globus.cog.karajan.workflow.nodes.SequentialWithArguments; import org.globus.cog.karajan.workflow.nodes.restartLog.RestartLog; import org.globus.swift.catalog.TCEntry; @@ -35,10 +31,9 @@ import org.griphyn.vdl.karajan.AssertFailedException; import org.griphyn.vdl.karajan.Loader; import org.griphyn.vdl.karajan.TCCache; -import org.griphyn.vdl.karajan.VDL2FutureException; -import org.griphyn.vdl.karajan.WrapperMap; import org.griphyn.vdl.karajan.functions.ConfigProperty; import org.griphyn.vdl.mapping.AbsFile; +import org.griphyn.vdl.mapping.AbstractDataNode; import org.griphyn.vdl.mapping.DSHandle; import org.griphyn.vdl.mapping.DependentException; import org.griphyn.vdl.mapping.GeneralizedFileFormat; @@ -74,9 +69,6 @@ logger.fatal("swift: assert failed: " + e.getMessage()); stack.getExecutionContext().failedQuietly(stack, e); } - catch (HandleOpenException e) { - throw new FutureNotYetAvailable(VDLFunction.addFutureListener(stack, e.getSource())); - } catch (DependentException e) { // This would not be the primal fault so in non-lazy errors mode it // should not matter @@ -104,8 +96,7 @@ } } - protected abstract Object function(VariableStack stack) throws ExecutionException, - HandleOpenException; + protected abstract Object function(VariableStack stack) throws ExecutionException; /* * This will likely break if the engine changes in fundamental ways. It also @@ -115,11 +106,11 @@ public static String getThreadPrefix(VariableStack stack) throws ExecutionException { stack = stack.copy(); ThreadingContext last = ThreadingContext.get(stack); - Stack s = new Stack(); + Stack s = new Stack(); while (stack.frameCount() > 1) { StackFrame frame = stack.currentFrame(); if (frame.isDefined("$")) { - List itv = (List) frame.getVar("$"); + List itv = (List) frame.getVar("$"); s.push(itv.get(0)); stack.leave(); last = ThreadingContext.get(stack); @@ -168,9 +159,6 @@ else if (Types.BOOLEAN.equals(type)) { return new Boolean(TypeUtil.toBoolean(value)); } - else if (value instanceof String) { - return (String) value; - } else { return value; } @@ -184,18 +172,10 @@ } public static String[] filename(VariableStack stack, DSHandle handle) throws ExecutionException { - try { - return filename(handle); - } - catch(VDL2FutureException ve) { - throw new FutureNotYetAvailable(addFutureListener(stack, ve.getHandle())); - } - catch (HandleOpenException e) { - throw new FutureNotYetAvailable(addFutureListener(stack, e.getSource())); - } + return filename(handle); } - public static String[] filename(DSHandle var) throws ExecutionException, HandleOpenException { + public static String[] filename(DSHandle var) throws ExecutionException { try { if (var.getType().isArray()) { return leavesFileNames(var); @@ -210,6 +190,9 @@ catch (DependentException e) { return new String[0]; } + catch (HandleOpenException e) { + throw new ExecutionException("The current implementation should not throw this exception", e); + } } private static String[] leavesFileNames(DSHandle var) throws ExecutionException, HandleOpenException { @@ -217,34 +200,30 @@ synchronized (var.getRoot()) { mapper = var.getMapper(); } - List l = new ArrayList(); - Iterator i; + List l = new ArrayList(); try { - Collection fp = var.getFringePaths(); - List src; + Collection fp = var.getFringePaths(); + List src; if (fp instanceof List) { - src = (List) fp; + src = (List) fp; } else { - src = new ArrayList(fp); + src = new ArrayList(fp); } Collections.sort(src, new PathComparator()); - i = src.iterator(); - while (i.hasNext()) { - Path p = (Path) i.next(); + + for (Path p : src) { l.add(leafFileName(var.getField(p), mapper)); } } catch (InvalidPathException e) { throw new ExecutionException("DSHandle is lying about its fringe paths"); } - return (String[]) l.toArray(EMPTY_STRING_ARRAY); + return l.toArray(EMPTY_STRING_ARRAY); } - private static class PathComparator implements Comparator { - public int compare(Object o1, Object o2) { - Path p1 = (Path) o1; - Path p2 = (Path) o2; + private static class PathComparator implements Comparator { + public int compare(Path p1, Path p2) { for (int i = 0; i < Math.min(p1.size(), p2.size()); i++) { int d; d = indexOrder(p1.isArrayIndex(i), p2.isArrayIndex(i)); @@ -288,11 +267,7 @@ } private static String leafFileName(DSHandle var) throws ExecutionException { - Mapper mapper; - synchronized (var.getRoot()) { - mapper = var.getMapper(); - } - return leafFileName(var, mapper); + return leafFileName(var, var.getMapper()); } private static String leafFileName(DSHandle var, Mapper mapper) throws ExecutionException { @@ -377,20 +352,6 @@ } } - public static final String VDL_FUTURE_WRAPPER_MAP = "#vdl:futureWrapperMap"; - - public static WrapperMap getFutureWrapperMap(VariableStack stack) throws ExecutionException { - synchronized (stack.getExecutionContext()) { - WrapperMap hash = (WrapperMap) stack.firstFrame().getVar(VDL_FUTURE_WRAPPER_MAP); - if (hash == null) { - hash = new WrapperMap(); - stack.firstFrame().setVar(VDL_FUTURE_WRAPPER_MAP, hash); - //InHook.install(new Monitor(hash)); - } - return hash; - } - } - protected static Map getLogData(VariableStack stack) throws ExecutionException { try { return (Map) stack.getDeepVar(RestartLog.LOG_DATA); @@ -426,114 +387,26 @@ } } - protected void closeChildren(VariableStack stack, DSHandle handle) throws ExecutionException, + protected void closeChildren(VariableStack stack, AbstractDataNode handle) throws ExecutionException, InvalidPathException { - WrapperMap hash = getFutureWrapperMap(stack); // Close the future - boolean closed; - synchronized(handle.getRoot()) { - closed = handle.isClosed(); - if (!closed) { - handle.closeShallow(); - hash.close(handle); - } + handle.closeShallow(); + // Mark all leaves + for (DSHandle child : handle.getFields(Path.CHILDREN)) { + child.closeShallow(); } - try { - // Mark all leaves - Iterator it = handle.getFields(Path.CHILDREN).iterator(); - while (it.hasNext()) { - DSHandle child = (DSHandle) it.next(); - child.closeShallow(); - hash.close(child); - } - } - catch (HandleOpenException e) { - throw new ExecutionException("Handle open in closeChildren",e); - } - - if (!closed) { - markToRoot(stack, handle); - } } - - protected void closeDeep(VariableStack stack, DSHandle handle) - throws ExecutionException, InvalidPathException { - synchronized(handle.getRoot()) { - closeDeep(stack, handle, getFutureWrapperMap(stack)); - } - } + + public static AbstractDataNode[] waitForAllVargs(VariableStack stack) throws ExecutionException { + AbstractDataNode[] args = SwiftArg.VARGS.asDataNodeArray(stack); - private void closeDeep(VariableStack stack, DSHandle handle, - WrapperMap wrapperMap) - throws InvalidPathException, ExecutionException { - handle.closeShallow(); - wrapperMap.close(handle); - try { - // Mark all children - for (DSHandle child : handle.getFields(Path.CHILDREN)) - closeDeep(stack, child, wrapperMap); + for (int i = 0; i < args.length; i++) { + args[i].waitFor(); } - catch (HandleOpenException e) { - throw new ExecutionException("Handle open in closeChildren", e); - } - } - - private void markToRoot(VariableStack stack, DSHandle handle) throws ExecutionException { - // Also mark all arrays from root - Path fullPath = handle.getPathFromRoot(); - DSHandle root = handle.getRoot(); - synchronized(root) { - for (int i = 0; i < fullPath.size(); i++) { - if (fullPath.isArrayIndex(i)) { - try { - markAsAvailable(stack, root.getField(fullPath.subPath(0, i)), - fullPath.getElement(i)); - } - catch (InvalidPathException e) { - e.printStackTrace(); - } - } - } - } + + return args; } - /** Returns the DSHandle that it is passed, but ensuring that it - is closed. If the handle is not closed, then execution will - be deferred/retried until it is. - */ - static public DSHandle waitFor(VariableStack stack, DSHandle handle) throws ExecutionException { - synchronized(handle.getRoot()) { - if (!handle.isClosed()) { - throw new FutureNotYetAvailable(addFutureListener(stack, handle)); - } - } - return handle; - } - - protected static void closeShallow(VariableStack stack, DSHandle handle) throws ExecutionException { - synchronized (handle.getRoot()) { - handle.closeShallow(); - getFutureWrapperMap(stack).close(handle); - } - } - - public static Future addFutureListener(VariableStack stack, DSHandle handle) - throws ExecutionException { - assert Thread.holdsLock(handle.getRoot()); - return getFutureWrapperMap(stack).addNodeListener(handle); - } - - protected static FutureIterator addFutureListListener(VariableStack stack, DSHandle handle, - Map value) throws ExecutionException { - assert Thread.holdsLock(handle.getRoot()); - return getFutureWrapperMap(stack).addFutureListListener(handle, value).futureIterator(stack); - } - - protected void markAsAvailable(VariableStack stack, DSHandle handle, Object key) - throws ExecutionException { - getFutureWrapperMap(stack).markAsAvailable(handle, key); - } - public static Path parsePath(Object o, VariableStack stack) throws ExecutionException { Path q = Path.EMPTY_PATH; Path p; Modified: trunk/src/org/griphyn/vdl/karajan/lib/WaitFieldValue.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/WaitFieldValue.java 2011-07-03 01:57:32 UTC (rev 4737) +++ trunk/src/org/griphyn/vdl/karajan/lib/WaitFieldValue.java 2011-07-03 02:08:41 UTC (rev 4738) @@ -4,8 +4,7 @@ import org.globus.cog.karajan.arguments.Arg; import org.globus.cog.karajan.stack.VariableStack; import org.globus.cog.karajan.workflow.ExecutionException; -import org.globus.cog.karajan.workflow.futures.FutureNotYetAvailable; -import org.griphyn.vdl.mapping.DSHandle; +import org.griphyn.vdl.mapping.AbstractDataNode; import org.griphyn.vdl.mapping.InvalidPathException; import org.griphyn.vdl.mapping.Path; @@ -21,29 +20,12 @@ * path. Path can contain wildcards, in which case an array is returned. */ public Object function(VariableStack stack) throws ExecutionException { - Object var1 = PA_VAR.getValue(stack); - if (!(var1 instanceof DSHandle)) { - throw new RuntimeException("Can only wait for DSHandles - was supplied "+var1.getClass()); - } - DSHandle var = (DSHandle) var1; + AbstractDataNode var = (AbstractDataNode) PA_VAR.getValue(stack); try { Path path = parsePath(OA_PATH.getValue(stack), stack); - var = var.getField(path); - synchronized (var.getRoot()) { - if (!var.isClosed()) { - logger.debug("Waiting for " + var); - throw new FutureNotYetAvailable(addFutureListener(stack, var)); - } - else { - Object v = var.getValue(); - logger.debug("Do not need to wait for " + var+" as it is closed and has value "+v + (v!=null ? " with class "+v.getClass() : "" )); - if(v !=null && v instanceof RuntimeException) { - throw (RuntimeException)v; - } else { - return null; - } - } - } + var = (AbstractDataNode) var.getField(path); + var.waitFor(); + return null; } catch (InvalidPathException e) { throw new ExecutionException(e); Modified: trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Assert.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Assert.java 2011-07-03 01:57:32 UTC (rev 4737) +++ trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Assert.java 2011-07-03 02:08:41 UTC (rev 4738) @@ -5,8 +5,8 @@ import org.globus.cog.karajan.stack.VariableStack; import org.globus.cog.karajan.workflow.ExecutionException; import org.griphyn.vdl.karajan.AssertFailedException; -import org.griphyn.vdl.karajan.lib.SwiftArg; import org.griphyn.vdl.karajan.lib.VDLFunction; +import org.griphyn.vdl.mapping.AbstractDataNode; import org.griphyn.vdl.mapping.DSHandle; import org.griphyn.vdl.type.Types; @@ -26,14 +26,9 @@ @Override protected Object function(VariableStack stack) throws ExecutionException { - DSHandle[] args = SwiftArg.VARGS.asDSHandleArray(stack); + AbstractDataNode[] args = waitForAllVargs(stack); String message = ""; - for (int i = 0; i < args.length; i++) { - DSHandle handle = args[i]; - VDLFunction.waitFor(stack, handle); - } - if (args.length == 2) if (args[1].getType() == Types.STRING) message = args[1].toString(); Modified: trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/ExtractInt.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/ExtractInt.java 2011-07-03 01:57:32 UTC (rev 4737) +++ trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/ExtractInt.java 2011-07-03 02:08:41 UTC (rev 4738) @@ -8,10 +8,9 @@ import org.globus.cog.karajan.arguments.Arg; import org.globus.cog.karajan.stack.VariableStack; import org.globus.cog.karajan.workflow.ExecutionException; -import org.globus.cog.karajan.workflow.futures.FutureNotYetAvailable; import org.griphyn.vdl.karajan.lib.VDLFunction; +import org.griphyn.vdl.mapping.AbstractDataNode; import org.griphyn.vdl.mapping.DSHandle; -import org.griphyn.vdl.mapping.HandleOpenException; import org.griphyn.vdl.mapping.RootDataNode; import org.griphyn.vdl.type.Types; @@ -21,26 +20,23 @@ setArguments(ExtractInt.class, new Arg[] { PA_VAR }); } - public Object function(VariableStack stack) throws ExecutionException, HandleOpenException { - DSHandle handle = null; + public Object function(VariableStack stack) throws ExecutionException { + AbstractDataNode handle = null; try { - handle = (DSHandle) PA_VAR.getValue(stack); - synchronized(handle.getRoot()) { - if (!handle.isClosed()) { - throw new FutureNotYetAvailable(addFutureListener(stack, handle)); - } - String fn = argList(filename(handle), true); - Reader freader = new FileReader(fn); - BufferedReader breader = new BufferedReader(freader); - String str = breader.readLine(); - freader.close(); - Double i = new Double(str); - DSHandle result = RootDataNode.newNode(Types.FLOAT, i); - int provid = VDLFunction.nextProvenanceID(); - VDLFunction.logProvenanceResult(provid, result, "extractint"); - VDLFunction.logProvenanceParameter(provid, handle, "filename"); - return result; - } + handle = (AbstractDataNode) PA_VAR.getValue(stack); + handle.waitFor(); + + String fn = argList(filename(handle), true); + Reader freader = new FileReader(fn); + BufferedReader breader = new BufferedReader(freader); + String str = breader.readLine(); + freader.close(); + Double i = new Double(str); + DSHandle result = RootDataNode.newNode(Types.FLOAT, i); + int provid = VDLFunction.nextProvenanceID(); + VDLFunction.logProvenanceResult(provid, result, "extractint"); + VDLFunction.logProvenanceParameter(provid, handle, "filename"); + return result; } catch (IOException ioe) { throw new ExecutionException("Reading integer content of file", ioe); Modified: trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/FileName.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/FileName.java 2011-07-03 01:57:32 UTC (rev 4737) +++ trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/FileName.java 2011-07-03 02:08:41 UTC (rev 4738) @@ -3,8 +3,6 @@ import org.globus.cog.karajan.arguments.Arg; import org.globus.cog.karajan.stack.VariableStack; import org.globus.cog.karajan.workflow.ExecutionException; -import org.globus.cog.karajan.workflow.futures.FutureNotYetAvailable; -import org.griphyn.vdl.karajan.VDL2FutureException; import org.griphyn.vdl.karajan.lib.VDLFunction; import org.griphyn.vdl.mapping.DSHandle; import org.griphyn.vdl.mapping.RootDataNode; @@ -16,17 +14,11 @@ } public Object function(VariableStack stack) throws ExecutionException { - try { - String s = argList(filename(stack), true); - DSHandle result = RootDataNode.newNode(Types.STRING, s); - int provid = VDLFunction.nextProvenanceID(); - //VDLFunction.logProvenanceParameter(provid, (DSHandle) PA_VAR.getValue(stack), "input"); - //VDLFunction.logProvenanceResult(provid, result, "filename"); - return result; - } catch(VDL2FutureException ve) { - synchronized(ve.getHandle().getRoot()) { - throw new FutureNotYetAvailable(addFutureListener(stack, ve.getHandle())); - } - } + String s = argList(filename(stack), true); + DSHandle result = RootDataNode.newNode(Types.STRING, s); + int provid = VDLFunction.nextProvenanceID(); + //VDLFunction.logProvenanceParameter(provid, (DSHandle) PA_VAR.getValue(stack), "input"); + //VDLFunction.logProvenanceResult(provid, result, "filename"); + return result; } } Modified: trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Fprintf.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Fprintf.java 2011-07-03 01:57:32 UTC (rev 4737) +++ trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Fprintf.java 2011-07-03 02:08:41 UTC (rev 4738) @@ -8,8 +8,8 @@ import org.globus.cog.karajan.arguments.Arg; import org.globus.cog.karajan.stack.VariableStack; import org.globus.cog.karajan.workflow.ExecutionException; -import org.griphyn.vdl.karajan.lib.SwiftArg; import org.griphyn.vdl.karajan.lib.VDLFunction; +import org.griphyn.vdl.mapping.AbstractDataNode; import org.griphyn.vdl.mapping.DSHandle; import org.griphyn.vdl.type.Types; @@ -35,13 +35,8 @@ @Override protected Object function(VariableStack stack) throws ExecutionException { - DSHandle[] args = SwiftArg.VARGS.asDSHandleArray(stack); - - for (int i = 0; i < args.length; i++) { - DSHandle handle = args[i]; - VDLFunction.waitFor(stack, handle); - } - + AbstractDataNode[] args = waitForAllVargs(stack); + check(args); String filename = args[0].toString(); Modified: trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Java.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Java.java 2011-07-03 01:57:32 UTC (rev 4737) +++ trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Java.java 2011-07-03 02:08:41 UTC (rev 4738) @@ -5,13 +5,11 @@ import org.globus.cog.karajan.arguments.Arg; import org.globus.cog.karajan.stack.VariableStack; import org.globus.cog.karajan.workflow.ExecutionException; -import org.griphyn.vdl.karajan.lib.SwiftArg; import org.griphyn.vdl.karajan.lib.VDLFunction; +import org.griphyn.vdl.mapping.AbstractDataNode; import org.griphyn.vdl.mapping.DSHandle; import org.griphyn.vdl.mapping.HandleOpenException; -import org.griphyn.vdl.mapping.InvalidPathException; import org.griphyn.vdl.mapping.RootDataNode; -import org.griphyn.vdl.type.NoSuchTypeException; import org.griphyn.vdl.type.Type; import org.griphyn.vdl.type.Types; @@ -21,14 +19,8 @@ setArguments(Java.class, new Arg[] { Arg.VARGS }); } - protected Object function(VariableStack stack) throws ExecutionException, - HandleOpenException { - DSHandle[] args = SwiftArg.VARGS.asDSHandleArray(stack); - - for (int i = 0; i < args.length; i++) { - DSHandle handle = args[i]; - VDLFunction.waitFor(stack, handle); - } + protected Object function(VariableStack stack) throws ExecutionException { + AbstractDataNode[] args = waitForAllVargs(stack); Method method = getMethod(args); Object[] p = convertInputs(method, args); Modified: trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Misc.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Misc.java 2011-07-03 01:57:32 UTC (rev 4737) +++ trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Misc.java 2011-07-03 02:08:41 UTC (rev 4738) @@ -1,7 +1,6 @@ package org.griphyn.vdl.karajan.lib.swiftscript; import java.io.IOException; - import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -13,8 +12,10 @@ import org.globus.cog.karajan.workflow.nodes.functions.FunctionsCollection; import org.griphyn.vdl.karajan.lib.SwiftArg; import org.griphyn.vdl.karajan.lib.VDLFunction; +import org.griphyn.vdl.mapping.AbsFile; +import org.griphyn.vdl.mapping.AbstractDataNode; +import org.griphyn.vdl.mapping.ArrayDataNode; import org.griphyn.vdl.mapping.DSHandle; -import org.griphyn.vdl.mapping.HandleOpenException; import org.griphyn.vdl.mapping.InvalidPathException; import org.griphyn.vdl.mapping.Path; import org.griphyn.vdl.mapping.RootArrayDataNode; @@ -22,11 +23,6 @@ import org.griphyn.vdl.type.Types; import org.griphyn.vdl.util.VDL2Config; -import org.griphyn.vdl.mapping.AbsFile; -import org.globus.cog.karajan.workflow.futures.FutureNotYetAvailable; - -import org.griphyn.vdl.mapping.ArrayDataNode; - public class Misc extends FunctionsCollection { private static final Logger logger = Logger.getLogger(Misc.class); @@ -34,6 +30,8 @@ public static final SwiftArg PA_INPUT = new SwiftArg.Positional("input"); public static final SwiftArg PA_PATTERN = new SwiftArg.Positional("regexp"); public static final SwiftArg PA_TRANSFORM = new SwiftArg.Positional("transform"); + public static final SwiftArg PA_FILE = new SwiftArg.Positional("file"); + public static final SwiftArg PA_ARRAY = new SwiftArg.Positional("array"); static { setArguments("swiftscript_trace", new Arg[] { Arg.VARGS }); @@ -48,9 +46,9 @@ setArguments("swiftscript_format", new Arg[] { PA_INPUT, PA_TRANSFORM }); setArguments("swiftscript_pad", new Arg[] { PA_INPUT, PA_TRANSFORM }); setArguments("swiftscript_tostring", new Arg[] { PA_INPUT }); - setArguments("swiftscript_dirname", new Arg[] { Arg.VARGS }); - setArguments("swiftscript_length", new Arg[] { Arg.VARGS }); - setArguments("swiftscript_existsfile", new Arg[] { Arg.VARGS }); + setArguments("swiftscript_dirname", new Arg[] { PA_FILE }); + setArguments("swiftscript_length", new Arg[] { PA_ARRAY }); + setArguments("swiftscript_existsfile", new Arg[] { PA_FILE }); } private static final Logger traceLogger = @@ -58,24 +56,37 @@ public DSHandle swiftscript_trace(VariableStack stack) throws ExecutionException { - DSHandle[] args = SwiftArg.VARGS.asDSHandleArray(stack); + AbstractDataNode[] args = VDLFunction.waitForAllVargs(stack); StringBuffer buf = new StringBuffer(); buf.append("SwiftScript trace: "); for (int i = 0; i < args.length; i++) { DSHandle handle = args[i]; - VDLFunction.waitFor(stack, handle); if (i != 0) { buf.append(", "); } Object v = args[i].getValue(); - buf.append(v == null ? args[i] : v); + //buf.append(v == null ? args[i] : v); + prettyPrint(buf, args[i]); } traceLogger.warn(buf); return null; } - public DSHandle swiftscript_strcat(VariableStack stack) throws ExecutionException { + private void prettyPrint(StringBuffer buf, DSHandle h) { + Object o = h.getValue(); + if (o == null) { + buf.append(h); + } + else { + if (h.getType().isPrimitive()) { + buf.append(o); + } + + } + } + + public DSHandle swiftscript_strcat(VariableStack stack) throws ExecutionException { if (logger.isDebugEnabled()) { logger.debug(stack); } @@ -344,30 +355,18 @@ throws ExecutionException { Object input = PA_INPUT.getValue(stack); DSHandle handle = new RootDataNode(Types.STRING); - handle.setValue(""+input); + handle.setValue(String.valueOf(input)); handle.closeShallow(); return handle; } public DSHandle swiftscript_dirname(VariableStack stack) throws ExecutionException { - DSHandle handle; - try - { - DSHandle[] args = SwiftArg.VARGS.asDSHandleArray(stack); - DSHandle arg = args[0]; - String[] input = VDLFunction.filename(arg); - String name = input[0]; - String result = new AbsFile(name).getDir(); - handle = new RootDataNode(Types.STRING); - handle.setValue(result); - handle.closeShallow(); - } - catch (HandleOpenException e) { - throw new FutureNotYetAvailable - (VDLFunction.addFutureListener(stack, e.getSource())); - } - return handle; + AbstractDataNode n = (AbstractDataNode) PA_FILE.getValue(stack); + n.waitFor(); + String name = VDLFunction.filename(n)[0]; + String result = new AbsFile(name).getDir(); + return RootDataNode.newNode(Types.STRING, result); } /* @@ -379,23 +378,11 @@ */ public DSHandle swiftscript_length(VariableStack stack) throws ExecutionException { - DSHandle handle; - DSHandle[] args = SwiftArg.VARGS.asDSHandleArray(stack); - DSHandle arg = args[0]; - ArrayDataNode adn = (ArrayDataNode)arg; + AbstractDataNode n = (AbstractDataNode) PA_ARRAY.getValue(stack); + n.waitFor(); + ArrayDataNode adn = (ArrayDataNode) n; - if( !( adn.isClosed() ) ) - { - throw new FutureNotYetAvailable - (VDLFunction.addFutureListener(stack, adn)); - } - - int result = adn.size(); - handle = new RootDataNode(Types.INT); - handle.setValue(result); - handle.closeShallow(); - - return handle; + return RootDataNode.newNode(Types.INT, Integer.valueOf(adn.size())); } public DSHandle swiftscript_existsfile(VariableStack stack) Modified: trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/ReadData.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/ReadData.java 2011-07-03 01:57:32 UTC (rev 4737) +++ trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/ReadData.java 2011-07-03 02:08:41 UTC (rev 4738) @@ -17,6 +17,7 @@ import org.globus.cog.karajan.workflow.ExecutionException; import org.griphyn.vdl.karajan.lib.VDLFunction; import org.griphyn.vdl.mapping.AbsFile; +import org.griphyn.vdl.mapping.AbstractDataNode; import org.griphyn.vdl.mapping.DSHandle; import org.griphyn.vdl.mapping.HandleOpenException; import org.griphyn.vdl.mapping.InvalidPathException; @@ -36,10 +37,10 @@ setArguments(ReadData.class, new Arg[] { DEST, SRC }); } - protected Object function(VariableStack stack) throws ExecutionException, HandleOpenException { + protected Object function(VariableStack stack) throws ExecutionException { DSHandle dest = (DSHandle) DEST.getValue(stack); - DSHandle src = (DSHandle) SRC.getValue(stack); - waitFor(stack, src); + AbstractDataNode src = (AbstractDataNode) SRC.getValue(stack); + src.waitFor(); if (src.getType().equals(Types.STRING)) { readData(dest, (String) src.getValue()); } Modified: trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/ReadStructured.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/ReadStructured.java 2011-07-03 01:57:32 UTC (rev 4737) +++ trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/ReadStructured.java 2011-07-03 02:08:41 UTC (rev 4738) @@ -14,6 +14,7 @@ import org.globus.cog.karajan.workflow.ExecutionException; import org.griphyn.vdl.karajan.lib.VDLFunction; import org.griphyn.vdl.mapping.AbsFile; +import org.griphyn.vdl.mapping.AbstractDataNode; import org.griphyn.vdl.mapping.DSHandle; import org.griphyn.vdl.mapping.HandleOpenException; import org.griphyn.vdl.mapping.Path; @@ -31,10 +32,10 @@ setArguments(ReadStructured.class, new Arg[] { DEST, SRC }); } - protected Object function(VariableStack stack) throws ExecutionException, HandleOpenException { + protected Object function(VariableStack stack) throws ExecutionException { DSHandle dest = (DSHandle) DEST.getValue(stack); - DSHandle src = (DSHandle) SRC.getValue(stack); - waitFor(stack, src); + AbstractDataNode src = (AbstractDataNode) SRC.getValue(stack); + src.waitFor(); if (src.getType().equals(Types.STRING)) { readData(dest, (String) src.getValue()); } Modified: trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Sprintf.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Sprintf.java 2011-07-03 01:57:32 UTC (rev 4737) +++ trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Sprintf.java 2011-07-03 02:08:41 UTC (rev 4738) @@ -4,8 +4,8 @@ import org.globus.cog.karajan.arguments.Arg; import org.globus.cog.karajan.stack.VariableStack; import org.globus.cog.karajan.workflow.ExecutionException; -import org.griphyn.vdl.karajan.lib.SwiftArg; import org.griphyn.vdl.karajan.lib.VDLFunction; +import org.griphyn.vdl.mapping.AbstractDataNode; import org.griphyn.vdl.mapping.ArrayDataNode; import org.griphyn.vdl.mapping.DSHandle; import org.griphyn.vdl.mapping.Path; @@ -41,12 +41,8 @@ @Override protected Object function(VariableStack stack) throws ExecutionException { - DSHandle[] args = SwiftArg.VARGS.asDSHandleArray(stack); - - for (int i = 0; i < args.length; i++) { - DSHandle handle = args[i]; - VDLFunction.waitFor(stack, handle); - } + AbstractDataNode[] args = waitForAllVargs(stack); + String msg = format(args); logger.debug("generated: " + msg); Modified: trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Tracef.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Tracef.java 2011-07-03 01:57:32 UTC (rev 4737) +++ trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Tracef.java 2011-07-03 02:08:41 UTC (rev 4738) @@ -4,9 +4,8 @@ import org.globus.cog.karajan.arguments.Arg; import org.globus.cog.karajan.stack.VariableStack; import org.globus.cog.karajan.workflow.ExecutionException; -import org.griphyn.vdl.karajan.lib.SwiftArg; import org.griphyn.vdl.karajan.lib.VDLFunction; -import org.griphyn.vdl.mapping.DSHandle; +import org.griphyn.vdl.mapping.AbstractDataNode; /** Formatted trace output.
@@ -30,13 +29,8 @@ @Override protected Object function(VariableStack stack) throws ExecutionException { - DSHandle[] args = SwiftArg.VARGS.asDSHandleArray(stack); + AbstractDataNode[] args = waitForAllVargs(stack); - for (int i = 0; i < args.length; i++) { - DSHandle handle = args[i]; - VDLFunction.waitFor(stack, handle); - } - String msg = Sprintf.format(args); logger.info(msg); System.out.print(msg); Modified: trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/WriteData.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/WriteData.java 2011-07-03 01:57:32 UTC (rev 4737) +++ trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/WriteData.java 2011-07-03 02:08:41 UTC (rev 4738) @@ -5,7 +5,6 @@ import java.io.FileWriter; import java.io.IOException; import java.util.Comparator; -import java.util.Iterator; import java.util.Map; import java.util.TreeMap; @@ -36,14 +35,14 @@ setArguments(WriteData.class, new Arg[] { DEST, SRC }); } - protected Object function(VariableStack stack) throws ExecutionException, HandleOpenException { + protected Object function(VariableStack stack) throws ExecutionException { // dest needs to be mapped to a file, or a string DSHandle dest = (DSHandle) DEST.getValue(stack); // src can be any of several forms of value - DSHandle src = (DSHandle) SRC.getValue(stack); + AbstractDataNode src = (AbstractDataNode) SRC.getValue(stack); - waitFor(stack, src); + src.waitFor(); if (dest.getType().equals(Types.STRING)) { writeData((String)dest.getValue(), src); @@ -113,8 +112,9 @@ private void writePrimitiveArray(BufferedWriter br, DSHandle src) throws IOException, ExecutionException { - Map m = ((AbstractDataNode) src).getArrayValue(); - Map c = new TreeMap(new ArrayIndexComparator()); + // this scheme currently only works properly if the keys are strings + Map, DSHandle> m = ((AbstractDataNode) src).getArrayValue(); + Map, DSHandle> c = new TreeMap, DSHandle>(new ArrayIndexComparator()); c.putAll(m); for (DSHandle h : c.values()) { br.write(h.getValue().toString()); @@ -125,8 +125,8 @@ private void writeStructArray(BufferedWriter br, DSHandle src) throws IOException, ExecutionException { writeStructHeader(src.getType().itemType(), br); - Map m = ((AbstractDataNode) src).getArrayValue(); - Map c = new TreeMap(new ArrayIndexComparator()); + Map, DSHandle> m = ((AbstractDataNode) src).getArrayValue(); + Map, DSHandle> c = new TreeMap, DSHandle>(new ArrayIndexComparator()); c.putAll(m); for (DSHandle h : c.values()) { writeStruct(br, h); @@ -156,10 +156,10 @@ } } - class ArrayIndexComparator implements Comparator { - public int compare(String o1, String o2) { - int i1 = Integer.parseInt(o1); - int i2 = Integer.parseInt(o2); + class ArrayIndexComparator implements Comparator> { + public int compare(Comparable o1, Comparable o2) { + int i1 = Integer.parseInt(String.valueOf(o1)); + int i2 = Integer.parseInt(String.valueOf(o2)); if(i1 < i2) return -1; if(i1 > i2) return 1; return 0; Modified: trunk/src/org/griphyn/vdl/mapping/AbstractDataNode.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/AbstractDataNode.java 2011-07-03 01:57:32 UTC (rev 4737) +++ trunk/src/org/griphyn/vdl/mapping/AbstractDataNode.java 2011-07-03 02:08:41 UTC (rev 4738) @@ -10,8 +10,13 @@ import java.util.Map; import org.apache.log4j.Logger; +import org.globus.cog.karajan.workflow.futures.Future; +import org.globus.cog.karajan.workflow.futures.FutureFault; +import org.globus.cog.karajan.workflow.futures.FutureNotYetAvailable; +import org.griphyn.vdl.karajan.DSHandleFutureWrapper; +import org.griphyn.vdl.karajan.FutureTracker; +import org.griphyn.vdl.karajan.FutureWrapper; import org.griphyn.vdl.karajan.Loader; -import org.griphyn.vdl.karajan.VDL2FutureException; import org.griphyn.vdl.type.Field; import org.griphyn.vdl.type.Type; import org.griphyn.vdl.util.VDL2Config; @@ -46,19 +51,21 @@ private static final String datasetIDPartialID = Loader.getUUID(); private Field field; - private Map handles; + private Map, DSHandle> handles; private Object value; private boolean closed; - private List listeners; final String identifierURI = makeIdentifierURIString(); private Path pathFromRoot; + + protected FutureWrapper wrapper; protected AbstractDataNode(Field field) { this.field = field; - handles = new HashMap(); + handles = new HashMap, DSHandle>(); } - public void init(Map params) { + public void init(Map params) { + throw new UnsupportedOperationException(); } public Type getType() { @@ -191,15 +198,13 @@ } } - public Collection getFields(Path path) - throws InvalidPathException, HandleOpenException { + public Collection getFields(Path path) throws InvalidPathException { List fields = new ArrayList(); getFields(fields, path); return fields; } - private void getFields(List fields, Path path) - throws InvalidPathException, HandleOpenException { + protected void getFields(List fields, Path path) throws InvalidPathException { if (path.isEmpty()) { fields.add(this); } @@ -207,7 +212,7 @@ Path rest = path.butFirst(); if (path.isWildcard(0)) { if (isArray() && !closed) { - throw new HandleOpenException(this); + throw new FutureNotYetAvailable(getFutureWrapper()); } for (DSHandle handle : handles.values()) { ((AbstractDataNode) handle).getFields(fields, rest); @@ -324,11 +329,10 @@ return value; } - public Map getArrayValue() { + public Map, DSHandle> getArrayValue() { checkDataException(); if (!field.getType().isArray()) { - throw new RuntimeException - ("getArrayValue called on a struct: " + this); + throw new RuntimeException("getArrayValue called on a non-array: " + this); } return handles; } @@ -448,7 +452,7 @@ try { m = this.getMapper(); } - catch (VDL2FutureException fe) { + catch (FutureFault fe) { m = null; // no mapping info if mapper isn't initialised yet } if (m != null) { @@ -562,55 +566,59 @@ return ((AbstractDataNode) getRoot()).getMapper(); } - protected Map getHandles() { + protected Map, DSHandle> getHandles() { return handles; } + + public String getIdentifier() { + return identifierURI; + } - public void addListener(DSHandleListener listener) { - if (logger.isDebugEnabled()) { - logger.debug("Adding handle listener \"" + listener + - "\" to \"" + getIdentifyingString() + "\""); - } - synchronized(this) { - if (listeners == null) { - listeners = new ArrayList(); - } - listeners.add(listener); - if (!closed) { - return; - } - } - // listeners != null, closed - notifyListeners(); + String makeIdentifierURIString() { + datasetIDCounter++; + return DATASET_URI_PREFIX + datasetIDPartialID + ":" + datasetIDCounter; } - - protected void notifyListeners() { - List l; - - synchronized(this) { - if (listeners == null) { - return; + + public synchronized void waitFor() { + if (!closed) { + if (logger.isDebugEnabled()) { + logger.debug("Waiting for " + this); } - - l = listeners; - listeners = null; + throw new FutureNotYetAvailable(getFutureWrapper()); } - - for (DSHandleListener listener : l) { + else { if (logger.isDebugEnabled()) { - logger.debug("Notifying listener \"" + listener - + "\" about \"" + getIdentifyingString() + "\""); + logger.debug("Do not need to wait for " + this); } - listener.handleClosed(this); + if (value instanceof RuntimeException) { + throw (RuntimeException) value; + } } } - - public String getIdentifier() { - return identifierURI; + + public void addListener(DSHandleListener listener) { + throw new UnsupportedOperationException(); } - - String makeIdentifierURIString() { - datasetIDCounter++; - return DATASET_URI_PREFIX + datasetIDPartialID + ":" + datasetIDCounter; + + protected synchronized Future getFutureWrapper() { + if (wrapper == null) { + wrapper = new DSHandleFutureWrapper(this); + FutureTracker.get().add(this, wrapper); + } + return wrapper; } + + protected void notifyListeners() { + FutureWrapper wrapper; + synchronized(this) { + wrapper = this.wrapper; + if (closed) { + FutureTracker.get().remove(this); + this.wrapper = null; + } + } + if (wrapper != null) { + wrapper.notifyListeners(); + } + } } Modified: trunk/src/org/griphyn/vdl/mapping/ArrayDataNode.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/ArrayDataNode.java 2011-07-03 01:57:32 UTC (rev 4737) +++ trunk/src/org/griphyn/vdl/mapping/ArrayDataNode.java 2011-07-03 02:08:41 UTC (rev 4738) @@ -3,10 +3,14 @@ */ package org.griphyn.vdl.mapping; -import java.util.Iterator; import java.util.List; import java.util.Map; +import org.globus.cog.karajan.workflow.futures.Future; +import org.globus.cog.karajan.workflow.futures.FutureList; +import org.globus.cog.karajan.workflow.futures.FutureNotYetAvailable; +import org.griphyn.vdl.karajan.ArrayIndexFutureList; +import org.griphyn.vdl.karajan.FutureTracker; import org.griphyn.vdl.type.Field; public class ArrayDataNode extends DataNode { @@ -14,18 +18,16 @@ super(field, root, parent); } - public void getFringePaths(List list, Path parentPath) throws HandleOpenException { + public void getFringePaths(List list, Path parentPath) throws HandleOpenException { checkMappingException(); if (!isClosed()) { - throw new HandleOpenException(this); + throw new FutureNotYetAvailable(getFutureWrapper()); } - Map handles = getHandles(); + Map, DSHandle> handles = getHandles(); synchronized (handles) { - Iterator i = handles.entrySet().iterator(); - while (i.hasNext()) { - Map.Entry e = (Map.Entry) i.next(); + for (Map.Entry, DSHandle> e : handles.entrySet()) { AbstractDataNode mapper = (AbstractDataNode) e.getValue(); - Path fullPath = parentPath.addLast((String) e.getKey(), getType().isArray()); + Path fullPath = parentPath.addLast(e.getKey().toString(), getType().isArray()); if (!mapper.isHandlesEmpty()) { mapper.getFringePaths(list, fullPath); } @@ -40,14 +42,10 @@ types. */ public void closeDeep() { assert(this.getType().isArray()); - if (!this.isClosed()) { - closeShallow(); - } - Map handles = getHandles(); + closeShallow(); + Map, DSHandle> handles = getHandles(); synchronized (handles) { - Iterator i = handles.entrySet().iterator(); - while (i.hasNext()) { - Map.Entry e = (Map.Entry) i.next(); + for (Map.Entry, DSHandle> e : handles.entrySet()) { AbstractDataNode child = (AbstractDataNode) e.getValue(); child.closeDeep(); } @@ -62,4 +60,39 @@ public int size() { return getHandles().size(); } + + @Override + protected void setField(String name, DSHandle handle) { + super.setField(name, handle); + addKey(name); + } + + private void addKey(String name) { + synchronized(this) { + if (wrapper != null) { + ((ArrayIndexFutureList) wrapper).addKey(name); + } + } + } + + @Override + public DSHandle createDSHandle(String fieldName) + throws NoSuchFieldException { + DSHandle h = super.createDSHandle(fieldName); + addKey(fieldName); + return h; + } + + @Override + protected synchronized Future getFutureWrapper() { + if (wrapper == null) { + wrapper = new ArrayIndexFutureList(this, this.getArrayValue()); + FutureTracker.get().add(this, wrapper); + } + return wrapper; + } + + public FutureList getFutureList() { + return (FutureList) getFutureWrapper(); + } } Modified: trunk/src/org/griphyn/vdl/mapping/DSHandle.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/DSHandle.java 2011-07-03 01:57:32 UTC (rev 4737) +++ trunk/src/org/griphyn/vdl/mapping/DSHandle.java 2011-07-03 02:08:41 UTC (rev 4738) @@ -67,7 +67,7 @@ public Collection getFringePaths() throws HandleOpenException; - public Map getArrayValue(); + public Map, DSHandle> getArrayValue(); public Path getPathFromRoot(); Modified: trunk/src/org/griphyn/vdl/mapping/ExternalDataNode.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/ExternalDataNode.java 2011-07-03 01:57:32 UTC (rev 4737) +++ trunk/src/org/griphyn/vdl/mapping/ExternalDataNode.java 2011-07-03 02:08:41 UTC (rev 4738) @@ -1,223 +1,80 @@ package org.griphyn.vdl.mapping; -import org.griphyn.vdl.karajan.Loader; - -import java.util.ArrayList; import java.util.Collection; -import java.util.Iterator; -import java.util.LinkedList; +import java.util.Collections; import java.util.List; import java.util.Map; import org.apache.log4j.Logger; -import org.griphyn.vdl.type.NoSuchTypeException; -import org.griphyn.vdl.type.Type; +import org.griphyn.vdl.karajan.Loader; import org.griphyn.vdl.type.Types; +import org.griphyn.vdl.type.impl.FieldImpl; -public class ExternalDataNode implements DSHandle { +public class ExternalDataNode extends AbstractDataNode { - private Map params; - - public void init(Map params) { - this.params = params; - } - static final String DATASET_URI_PREFIX = "dataset:external:"; public static final Logger logger = Logger.getLogger(ExternalDataNode.class); public static final MappingParam PARAM_PREFIX = new MappingParam("prefix", null); - /** Datasets are identified within a run by this sequence number and the - partial ID field. - The initial value is chosen to aid human recognition of sequence - numbers in the wild. There is no requirement that it start at this - (or any other) particular value. Note that this introduces a - maximum on the number of datasets which can be dealt with in any - run to be about 2^62. */ private static long datasetIDCounter = 850000000000l; - /** This is used to provide a (hopefully) globally unique identifier for - each time the datasetIDCounter is reset (whenever this class is - loaded, which will usually happen once per JVM). No meaning should be - inferred from this value - it exists purely for making unique URIs. */ private static final String datasetIDPartialID = Loader.getUUID(); + + private Map params; - private Map handles; - private Object value; - private boolean closed; - private List listeners; - final String identifierURI = makeIdentifierURIString(); - public ExternalDataNode() { + super(new FieldImpl("", Types.EXTERNAL)); } - public Type getType() { - try { - return Types.getType("external"); - } catch(NoSuchTypeException te) { - throw new RuntimeException(te); - } - } + @Override + public void init(Map params) { + this.params = params; + } - public boolean isPrimitive() { - return false; - } - - public boolean isRestartable() { + public boolean isRestartable() { return true; } - /** - * create a String representation of this node. If the node has a value, - * then uses the String representation of that value. Otherwise, generates a - * text description. - */ - public String toString() { - String prefix = this.getClass().getName(); - - prefix = prefix + " identifier "+this.getIdentifier(); - - prefix = prefix + " with no value at dataset="; - - prefix = prefix + getDisplayableName(); - - if (!Path.EMPTY_PATH.equals(getPathFromRoot())) { - prefix = prefix + " path="+ getPathFromRoot().toString(); - } - - if(closed) { - prefix = prefix + " (closed)"; - } - else { - prefix = prefix + " (not closed)"; - } - - return prefix; - } - - public String getIdentifyingString() { - return toString(); - } - public DSHandle getRoot() { return this; } - protected String getDisplayableName() { - String prefix = getRoot().getParam("dbgname"); - if (prefix == null) { - prefix = getRoot().getParam("prefix"); - } - if (prefix == null) { - prefix = "unnamed SwiftScript value"; - } - return prefix; - } - public DSHandle getField(Path path) throws InvalidPathException { if (path.isEmpty()) { return this; - } else { + } + else { throw new InvalidPathException(path, this); } } - - public Collection getFields(Path path) throws InvalidPathException, HandleOpenException { - List fields = new ArrayList(); - return fields; + + protected void getFields(List fields, Path path) throws InvalidPathException { + // nothing } public void set(DSHandle handle) { - throw new IllegalArgumentException(this.getDisplayableName() + " is an external dataset and cannot be set"); + throw new UnsupportedOperationException(this.getDisplayableName() + " is an external dataset and cannot be set"); } - protected void setField(String name, DSHandle handle) { - synchronized (handles) { - handles.put(name, handle); - } - } - - protected DSHandle getHandle(String name) { - synchronized (handles) { - return (DSHandle) handles.get(name); - } - } - - protected boolean isHandlesEmpty() { - synchronized (handles) { - return handles.isEmpty(); - } - } - - protected void checkDataException() { - if (value instanceof DependentException) { - throw (DependentException) value; - } - } - - protected void checkMappingException() { - if (value instanceof MappingDependentException) { - throw (MappingDependentException) value; - } - } - public Object getValue() { -logger.warn("getValue called in an external dataset"); -return value; -// throw new RuntimeException("cannot get value of external dataset"); + logger.warn("getValue called on an external dataset"); + return null; } - public Map getArrayValue() { -throw new RuntimeException("cannot get value of external dataset"); + public Map, DSHandle> getArrayValue() { + throw new UnsupportedOperationException("cannot get value of external dataset"); } public boolean isArray() { return false; } - public void setValue(Object value) { - if (this.closed) { - throw new IllegalArgumentException(this.getDisplayableName() - + " is closed with a value of "+this.value); - } - if (this.value != null) { - throw new IllegalArgumentException(this.getDisplayableName() - + " is already assigned with a value of " + this.value); - } - this.value = value; + public Collection getFringePaths() throws HandleOpenException { + return Collections.singletonList(Path.EMPTY_PATH); } - public Collection getFringePaths() throws HandleOpenException { - ArrayList list = new ArrayList(); - list.add(Path.EMPTY_PATH); - return list; - } - - public synchronized void closeShallow() { - this.closed = true; - notifyListeners(); - logger.info("closed "+this.getIdentifier()); - } - - public boolean isClosed() { - return closed; - } - - public void closeDeep() { - if (!this.closed) { - closeShallow(); - } - synchronized (handles) { - Iterator i = handles.entrySet().iterator(); - while (i.hasNext()) { - Map.Entry e = (Map.Entry) i.next(); - AbstractDataNode mapper = (AbstractDataNode) e.getValue(); - mapper.closeDeep(); - } - } - } - public Path getPathFromRoot() { return Path.EMPTY_PATH; } @@ -226,59 +83,24 @@ return null; } - protected Map getHandles() { - return handles; + protected String makeIdentifierURIString() { + datasetIDCounter++; + return DATASET_URI_PREFIX + datasetIDPartialID + ":" + datasetIDCounter; } - public synchronized void addListener(DSHandleListener listener) { - if (logger.isInfoEnabled()) { - logger.info("Adding handle listener \"" + listener + "\" to \"" + this + "\""); - } - if (listeners == null) { - listeners = new LinkedList(); - } - listeners.add(listener); - if (closed) { - notifyListeners(); - } + public DSHandle createDSHandle(String fieldName) { + throw new UnsupportedOperationException("cannot create new field in external dataset"); } - protected synchronized void notifyListeners() { - if (listeners != null) { - Iterator i = listeners.iterator(); - while (i.hasNext()) { - DSHandleListener listener = (DSHandleListener) i.next(); - i.remove(); - if (logger.isInfoEnabled()) { - logger.info("Notifying listener \"" + listener + "\" about \"" + this + "\""); - } - listener.handleClosed(this); - } - listeners = null; - } + public DSHandle getParent() { + return null; } - public String getIdentifier() { - return identifierURI; - } - - String makeIdentifierURIString() { - datasetIDCounter++; - return DATASET_URI_PREFIX + datasetIDPartialID + ":" + datasetIDCounter; - } - - public String getParam(String name) { - if (params == null) { - return null; - } - return (String) params.get(name); + @Override + public String getParam(String name) { + if (params == null) { + return null; } - - public DSHandle createDSHandle(String fieldName) { -throw new RuntimeException("cannot create new field in external dataset"); - } - - public DSHandle getParent() { - return null; - } + return (String) params.get(name); + } } Modified: trunk/src/org/griphyn/vdl/mapping/MappingParam.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/MappingParam.java 2011-07-03 01:57:32 UTC (rev 4737) +++ trunk/src/org/griphyn/vdl/mapping/MappingParam.java 2011-07-03 02:08:41 UTC (rev 4738) @@ -2,7 +2,6 @@ import java.util.Map; -import org.griphyn.vdl.karajan.VDL2FutureException; import org.griphyn.vdl.type.Types; /** The MappingParam class provides helper methods to deal with @@ -42,9 +41,9 @@ */ public Object getValue(Mapper mapper) { Object value = mapper.getParam(name); - if (value instanceof DSHandle) { - DSHandle handle = (DSHandle) value; - checkHandle(handle); + if (value instanceof AbstractDataNode) { + AbstractDataNode handle = (AbstractDataNode) value; + handle.waitFor(); if (handle.getType().equals(Types.INT)) { return Integer.valueOf(((Number) handle.getValue()).intValue()); } @@ -66,11 +65,11 @@ } } - public Object getValue(Map params) { + public Object getValue(Map params) { Object value = params.get(name); - if (value instanceof DSHandle) { - DSHandle handle = (DSHandle) value; - checkHandle(handle); + if (value instanceof AbstractDataNode) { + AbstractDataNode handle = (AbstractDataNode) value; + handle.waitFor(); return handle.getValue().toString(); } else if (value == null) { @@ -95,15 +94,6 @@ return mapper.getParam(name); } - - private void checkHandle(DSHandle handle) { - if (!handle.isClosed()) { - throw new VDL2FutureException(handle); - } - handle.getValue(); - // try to get value, so that the appropriate exceptions are thrown for futures - } - /** Returns the mapper parameter as a String. Other data types will be converted to a String as appropriate. */ public String getStringValue(Mapper mapper) { Modified: trunk/src/org/griphyn/vdl/mapping/RootArrayDataNode.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/RootArrayDataNode.java 2011-07-03 01:57:32 UTC (rev 4737) +++ trunk/src/org/griphyn/vdl/mapping/RootArrayDataNode.java 2011-07-03 02:08:41 UTC (rev 4738) @@ -1,21 +1,23 @@ package org.griphyn.vdl.mapping; -import java.util.Iterator; import java.util.Map; import org.apache.log4j.Logger; -import org.griphyn.vdl.karajan.VDL2FutureException; +import org.globus.cog.karajan.stack.VariableStack; +import org.globus.cog.karajan.workflow.futures.Future; +import org.globus.cog.karajan.workflow.futures.FutureListener; +import org.globus.cog.karajan.workflow.futures.FutureNotYetAvailable; import org.griphyn.vdl.type.Field; import org.griphyn.vdl.type.Type; -public class RootArrayDataNode extends ArrayDataNode implements DSHandleListener { +public class RootArrayDataNode extends ArrayDataNode implements FutureListener { Logger logger = Logger.getLogger(RootArrayDataNode.class); private boolean initialized = false; private Mapper mapper; private Map params; - private DSHandle waitingMapperParam; + private AbstractDataNode waitingMapperParam; /** * Instantiate a root array data node with specified type. @@ -37,13 +39,12 @@ private synchronized void innerInit() { logger.debug("innerInit: " + this); - Iterator i = params.entrySet().iterator(); - while(i.hasNext()) { - Map.Entry entry = (Map.Entry) i.next(); + + for (Map.Entry entry : params.entrySet()) { Object v = entry.getValue(); - if (v instanceof DSHandle && !((DSHandle) v).isClosed()) { - waitingMapperParam = (DSHandle) v; - waitingMapperParam.addListener(this); + if (v instanceof AbstractDataNode && !((AbstractDataNode) v).isClosed()) { + waitingMapperParam = (AbstractDataNode) v; + waitingMapperParam.getFutureWrapper().addModificationAction(this, null); return; } } @@ -70,19 +71,16 @@ try { RootDataNode.checkInputs(params, mapper, this); } - catch (VDL2FutureException e) { - e.getHandle().addListener(this); - } catch (DependentException e) { setValue(new MappingDependentException(this, e)); closeShallow(); } } + + public void futureModified(Future f, VariableStack stack) { + innerInit(); + } - public void handleClosed(DSHandle handle) { - innerInit(); - } - public String getParam(String name) { if (params == null) { return null; @@ -103,7 +101,7 @@ return mapper; } assert(waitingMapperParam != null); - throw new VDL2FutureException(waitingMapperParam); + throw new FutureNotYetAvailable(waitingMapperParam.getFutureWrapper()); } public boolean isArray() { @@ -115,7 +113,8 @@ initialized(); } - private void initialized() { + private synchronized void initialized() { initialized = true; + waitingMapperParam = null; } } Modified: trunk/src/org/griphyn/vdl/mapping/RootDataNode.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/RootDataNode.java 2011-07-03 01:57:32 UTC (rev 4737) +++ trunk/src/org/griphyn/vdl/mapping/RootDataNode.java 2011-07-03 02:08:41 UTC (rev 4738) @@ -3,22 +3,24 @@ */ package org.griphyn.vdl.mapping; -import java.util.Iterator; import java.util.Map; import org.apache.log4j.Logger; -import org.griphyn.vdl.karajan.VDL2FutureException; +import org.globus.cog.karajan.stack.VariableStack; +import org.globus.cog.karajan.workflow.futures.Future; +import org.globus.cog.karajan.workflow.futures.FutureListener; +import org.globus.cog.karajan.workflow.futures.FutureNotYetAvailable; import org.griphyn.vdl.type.Field; import org.griphyn.vdl.type.Type; -public class RootDataNode extends AbstractDataNode implements DSHandleListener { +public class RootDataNode extends AbstractDataNode implements FutureListener { static Logger logger = Logger.getLogger(RootDataNode.class); private boolean initialized=false; private Mapper mapper; private Map params; - private DSHandle waitingMapperParam; + private AbstractDataNode waitingMapperParam; public static DSHandle newNode(Type type, Object value) { DSHandle handle = new RootDataNode(type); @@ -45,12 +47,13 @@ /** must have this.params set to the appropriate parameters before being called. */ private synchronized void innerInit() { - logger.debug("innerInit: " + this); for (Object v : params.values()) { - if(v instanceof DSHandle && !((DSHandle) v).isClosed()) { - logger.debug("addListener: " + this + " " + v); - waitingMapperParam = (DSHandle) v; - waitingMapperParam.addListener(this); + if(v instanceof AbstractDataNode && !((AbstractDataNode) v).isClosed()) { + if (logger.isDebugEnabled()) { + logger.debug("addListener: " + this + " " + v); + } + waitingMapperParam = (AbstractDataNode) v; + waitingMapperParam.getFutureWrapper().addModificationAction(this, null); return; } } @@ -82,10 +85,6 @@ try { checkInputs(params, mapper, this); } - catch (VDL2FutureException e) { - logger.warn("Unexpected VDL2FutureException checking inputs for dataset "+this); - throw new RuntimeException("Got a VDL2FutureException but all parameters should have their values",e); - } catch (DependentException e) { setValue(new MappingDependentException(this, e)); closeShallow(); @@ -93,17 +92,15 @@ } } - public void handleClosed(DSHandle handle) { + public void futureModified(Future f, VariableStack stack) { innerInit(); } - static protected void checkInputs(Map params, Mapper mapper, AbstractDataNode root) { + static protected void checkInputs(Map params, Mapper mapper, AbstractDataNode root) { String input = (String) params.get("input"); if (input != null && Boolean.valueOf(input.trim()).booleanValue()) { - Iterator i = mapper.existing().iterator(); - while (i.hasNext()) { - Path p = (Path) i.next(); + for (Path p : mapper.existing()) { try { DSHandle field = root.getField(p); field.closeShallow(); @@ -112,8 +109,8 @@ } } catch (InvalidPathException e) { - throw new IllegalStateException("mapper.existing() returned a path " + p - + " that it cannot subsequently map"); + throw new IllegalStateException("Structure of mapped data is " + + "incompatible with the mapped variable type: " + e.getMessage()); } } root.closeDeep(); @@ -155,9 +152,7 @@ if (handle.getType().isArray()) { // any number of indices is ok try { - Iterator i = handle.getFields(Path.CHILDREN).iterator(); - while (i.hasNext()) { - DSHandle dh = (DSHandle) i.next(); + for (DSHandle dh : handle.getFields(Path.CHILDREN)) { Path path = dh.getPathFromRoot(); String index = path.getElement(path.size() - 1); try { @@ -182,9 +177,7 @@ else { // all fields must be present Type type = handle.getType(); - Iterator i = type.getFieldNames().iterator(); - while (i.hasNext()) { - String fieldName = (String) i.next(); + for (String fieldName : type.getFieldNames()) { Path fieldPath = Path.parse(fieldName); try { checkConsistency(handle.getField(fieldPath)); @@ -213,12 +206,12 @@ return null; } - public Mapper getMapper() { + public synchronized Mapper getMapper() { if (initialized) { return mapper; } assert (waitingMapperParam != null); - throw new VDL2FutureException(waitingMapperParam); + throw new FutureNotYetAvailable(waitingMapperParam.getFutureWrapper()); } public boolean isArray() { @@ -230,7 +223,7 @@ initialized(); } - private void initialized() { + private synchronized void initialized() { initialized = true; waitingMapperParam = null; } Modified: trunk/src/org/griphyn/vdl/mapping/file/ArrayFileMapper.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/file/ArrayFileMapper.java 2011-07-03 01:57:32 UTC (rev 4737) +++ trunk/src/org/griphyn/vdl/mapping/file/ArrayFileMapper.java 2011-07-03 02:08:41 UTC (rev 4738) @@ -27,12 +27,12 @@ if (dn == null) { throw new RuntimeException("Missing 'files' mapper attribute"); } - Map m = dn.getArrayValue(); - Set s = m.keySet(); - Iterator i = s.iterator(); + Map m = dn.getArrayValue(); + Set s = m.keySet(); + Iterator i = s.iterator(); while(i.hasNext()) { String nextKey = i.next().toString(); - l.add(Path.EMPTY_PATH.addLast(nextKey,true)); + l.add(Path.EMPTY_PATH.addLast(nextKey, true)); } return l; } From hategan at ci.uchicago.edu Sat Jul 2 21:24:54 2011 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Sat, 2 Jul 2011 21:24:54 -0500 (CDT) Subject: [Swift-commit] r4740 - trunk/tests/language-behaviour/broken Message-ID: <20110703022454.D407A9CCCB@svn.ci.uchicago.edu> Author: hategan Date: 2011-07-02 21:24:54 -0500 (Sat, 02 Jul 2011) New Revision: 4740 Added: trunk/tests/language-behaviour/broken/0753-filesystem-mapper.setup.sh Log: broken or not, it needs its input files Added: trunk/tests/language-behaviour/broken/0753-filesystem-mapper.setup.sh =================================================================== --- trunk/tests/language-behaviour/broken/0753-filesystem-mapper.setup.sh (rev 0) +++ trunk/tests/language-behaviour/broken/0753-filesystem-mapper.setup.sh 2011-07-03 02:24:54 UTC (rev 4740) @@ -0,0 +1,7 @@ +#!/bin/sh + +PREFIX="0753-filesystem-mapper" + +touch "$PREFIX.0.in" +touch "$PREFIX.1.in" +touch "$PREFIX.2.in" Property changes on: trunk/tests/language-behaviour/broken/0753-filesystem-mapper.setup.sh ___________________________________________________________________ Added: svn:executable + * From hategan at ci.uchicago.edu Sat Jul 2 21:34:09 2011 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Sat, 2 Jul 2011 21:34:09 -0500 (CDT) Subject: [Swift-commit] r4741 - trunk/tests/language-behaviour/IO Message-ID: <20110703023409.DB85C9CCCB@svn.ci.uchicago.edu> Author: hategan Date: 2011-07-02 21:34:09 -0500 (Sat, 02 Jul 2011) New Revision: 4741 Added: trunk/tests/language-behaviour/IO/061-cattwo.setup.sh Log: setup for 061-cattwo Added: trunk/tests/language-behaviour/IO/061-cattwo.setup.sh =================================================================== --- trunk/tests/language-behaviour/IO/061-cattwo.setup.sh (rev 0) +++ trunk/tests/language-behaviour/IO/061-cattwo.setup.sh 2011-07-03 02:34:09 UTC (rev 4741) @@ -0,0 +1,4 @@ +#!/bin/bash + +echo "one" > 061-cattwo.1.in +echo "two" > 061-cattwo.2.in \ No newline at end of file Property changes on: trunk/tests/language-behaviour/IO/061-cattwo.setup.sh ___________________________________________________________________ Added: svn:executable + * From hategan at ci.uchicago.edu Sat Jul 2 21:37:10 2011 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Sat, 2 Jul 2011 21:37:10 -0500 (CDT) Subject: [Swift-commit] r4742 - trunk/tests/sites Message-ID: <20110703023710.CB13F9CCCB@svn.ci.uchicago.edu> Author: hategan Date: 2011-07-02 21:37:10 -0500 (Sat, 02 Jul 2011) New Revision: 4742 Modified: trunk/tests/sites/localhost.xml Log: if the inital score is too low, failing jobs get throttled and the 30 second timeout kicks in instead of getting to a useful error message Modified: trunk/tests/sites/localhost.xml =================================================================== --- trunk/tests/sites/localhost.xml 2011-07-03 02:34:09 UTC (rev 4741) +++ trunk/tests/sites/localhost.xml 2011-07-03 02:37:10 UTC (rev 4742) @@ -7,6 +7,8 @@ _WORK_ + 0.08 + 10000 From hategan at ci.uchicago.edu Sat Jul 2 23:12:38 2011 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Sat, 2 Jul 2011 23:12:38 -0500 (CDT) Subject: [Swift-commit] r4743 - trunk/src/org/griphyn/vdl/mapping/file Message-ID: <20110703041238.03AC99CCCB@svn.ci.uchicago.edu> Author: hategan Date: 2011-07-02 23:12:37 -0500 (Sat, 02 Jul 2011) New Revision: 4743 Modified: trunk/src/org/griphyn/vdl/mapping/file/SimpleFileMapper.java Log: reverted previous change to the simple_mapper; it broke the fmri test and didn't really conform to what the documentation was saying (i.e. it couldn't map arrays of strucs)' Modified: trunk/src/org/griphyn/vdl/mapping/file/SimpleFileMapper.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/file/SimpleFileMapper.java 2011-07-03 02:37:10 UTC (rev 4742) +++ trunk/src/org/griphyn/vdl/mapping/file/SimpleFileMapper.java 2011-07-03 04:12:37 UTC (rev 4743) @@ -4,72 +4,19 @@ package org.griphyn.vdl.mapping.file; import java.util.Map; -import java.util.HashMap; -import org.griphyn.vdl.mapping.Path; -import org.griphyn.vdl.mapping.PhysicalFormat; -import org.griphyn.vdl.mapping.AbsFile; import org.griphyn.vdl.mapping.MappingParam; public class SimpleFileMapper extends AbstractFileMapper { public static final MappingParam PARAM_PADDING = new MappingParam("padding", new Integer(4)); - private Map filenames = new HashMap(); - private int count = 0; - private String isinput; public SimpleFileMapper() { super(); - - } public void setParams(Map params) { super.setParams(params); int precision = PARAM_PADDING.getIntValue(this); setElementMapper(new DefaultFileNameElementMapper(precision)); - this.isinput = (String)params.get("input"); } - - //all input filesnames will be parsed as strings and given numeric index - - public Path rmap(String name) { - if(this.isinput == null){ - return super.rmap(name); - } - if (name == null || name.equals("")) { - return null; - } - String index = String.valueOf(count); - filenames.put(index, name); - Path p = Path.EMPTY_PATH; - p = p.addFirst(index, true); - ++count; - return p; - } - - public PhysicalFormat map(Path path) { - if(this.isinput == null){ - return super.map(path); - } - if (path.size()!=1) { - return null; - } - if (!path.isArrayIndex(0)) { - return null; - } - String location = PARAM_LOCATION.getStringValue(this); - String index = path.getFirst(); - String filename = (String)filenames.get(index); - if (filename == null) { - return null; - } - if (location != null) { - if (!location.endsWith("/")) { - filename = location + '/' + filename; - } else { - filename = location + filename; - } - } - return new AbsFile(filename); - } } From hategan at ci.uchicago.edu Sat Jul 2 23:16:46 2011 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Sat, 2 Jul 2011 23:16:46 -0500 (CDT) Subject: [Swift-commit] r4744 - trunk/tests/language-behaviour/IO Message-ID: <20110703041646.4A2C79CCCB@svn.ci.uchicago.edu> Author: hategan Date: 2011-07-02 23:16:46 -0500 (Sat, 02 Jul 2011) New Revision: 4744 Modified: trunk/tests/language-behaviour/IO/q23.swift Log: shouldn't fail any more; there is a way to pass arguments now Modified: trunk/tests/language-behaviour/IO/q23.swift =================================================================== --- trunk/tests/language-behaviour/IO/q23.swift 2011-07-03 04:12:37 UTC (rev 4743) +++ trunk/tests/language-behaviour/IO/q23.swift 2011-07-03 04:16:46 UTC (rev 4744) @@ -1,5 +1,3 @@ -// THIS-SCRIPT-SHOULD-FAIL -// This script should fail because there is no way to pass an argument to a specific swift file within a group. type messagefile {} app (messagefile t) greeting (string s) { From hategan at ci.uchicago.edu Sat Jul 2 23:34:39 2011 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Sat, 2 Jul 2011 23:34:39 -0500 (CDT) Subject: [Swift-commit] r4745 - trunk/tests/language-behaviour/IO Message-ID: <20110703043439.4C5609CCCB@svn.ci.uchicago.edu> Author: hategan Date: 2011-07-02 23:34:39 -0500 (Sat, 02 Jul 2011) New Revision: 4745 Added: trunk/tests/language-behaviour/IO/130-fmri.0001.h.input.in trunk/tests/language-behaviour/IO/130-fmri.0001.v.input.in trunk/tests/language-behaviour/IO/130-fmri.0002.h.input.in trunk/tests/language-behaviour/IO/130-fmri.0002.v.input.in trunk/tests/language-behaviour/IO/130-fmri.0003.h.input.in trunk/tests/language-behaviour/IO/130-fmri.0003.v.input.in trunk/tests/language-behaviour/IO/130-fmri.0004.h.input.in trunk/tests/language-behaviour/IO/130-fmri.0004.v.input.in trunk/tests/language-behaviour/IO/130-fmri.h.template.in trunk/tests/language-behaviour/IO/130-fmri.v.template.in trunk/tests/language-behaviour/IO/q22.setup.sh trunk/tests/language-behaviour/IO/q23.args trunk/tests/language-behaviour/IO/tc.template.mix.data Removed: trunk/tests/language-behaviour/IO/0011-echo-20110603-1140-rr21aum3.log trunk/tests/language-behaviour/IO/0011-echo.kml trunk/tests/language-behaviour/IO/0011-echo.xml trunk/tests/language-behaviour/IO/0012-echo-map-20110603-1140-n9omdlcb.log trunk/tests/language-behaviour/IO/0012-echo-map.kml trunk/tests/language-behaviour/IO/0012-echo-map.xml trunk/tests/language-behaviour/IO/130-fmri.0001.h.in trunk/tests/language-behaviour/IO/130-fmri.0001.v.in trunk/tests/language-behaviour/IO/130-fmri.0002.h.in trunk/tests/language-behaviour/IO/130-fmri.0002.v.in trunk/tests/language-behaviour/IO/130-fmri.0003.h.in trunk/tests/language-behaviour/IO/130-fmri.0003.v.in trunk/tests/language-behaviour/IO/130-fmri.0004.h.in trunk/tests/language-behaviour/IO/130-fmri.0004.v.in trunk/tests/language-behaviour/IO/130-fmri.h.template trunk/tests/language-behaviour/IO/130-fmri.v.template Modified: trunk/tests/language-behaviour/IO/130-fmri.swift trunk/tests/language-behaviour/IO/q22.swift Log: fixed io tests Deleted: trunk/tests/language-behaviour/IO/0011-echo-20110603-1140-rr21aum3.log =================================================================== --- trunk/tests/language-behaviour/IO/0011-echo-20110603-1140-rr21aum3.log 2011-07-03 04:16:46 UTC (rev 4744) +++ trunk/tests/language-behaviour/IO/0011-echo-20110603-1140-rr21aum3.log 2011-07-03 04:34:39 UTC (rev 4745) @@ -1,111 +0,0 @@ -2011-06-03 11:40:08,649-0500 DEBUG Loader Max heap: 238616576 -2011-06-03 11:40:08,650-0500 DEBUG textfiles BEGIN SWIFTSCRIPT: -type messagefile; - -app (messagefile t) greeting() { - echo "hello" stdout=@filename(t); -} - -messagefile outfile <"0011-echo.out">; - -outfile = greeting(); - - - -2011-06-03 11:40:08,650-0500 DEBUG textfiles END SWIFTSCRIPT: -2011-06-03 11:40:08,650-0500 INFO Loader 0011-echo.swift: source file is new. Recompiling. -2011-06-03 11:40:09,279-0500 INFO Karajan Validation of XML intermediate file was successful -2011-06-03 11:40:09,475-0500 DEBUG Loader setting: tc.file to: ./tc.data -2011-06-03 11:40:09,475-0500 DEBUG textfiles using default sites file -2011-06-03 11:40:09,493-0500 INFO VDL2ExecutionContext Stack dump: -Level 1 -[iA = 0, iB = 0, bA = false, bB = false] - vdl:instanceconfig = Swift configuration [] - vdl:operation = run - PATH_SEPARATOR = / - swift.home = /home/Alberto/Swift/cog/modules/swift/dist/swift-svn/bin/.. - #vdl:futureWrapperMap = org.griphyn.vdl.karajan.WrapperMap at 171f189 - - -2011-06-03 11:40:10,075-0500 INFO unknown Using sites file: /home/Alberto/Swift/cog/modules/swift/dist/swift-svn/bin/../etc/sites.xml -2011-06-03 11:40:10,112-0500 INFO unknown Using tc.data: ./tc.data -2011-06-03 11:40:10,212-0500 INFO AbstractScheduler Setting resources to: {localhost=localhost} -2011-06-03 11:40:10,702-0500 INFO unknown Swift svn swift-r4543 cog-r3143 - -2011-06-03 11:40:10,703-0500 INFO unknown RUNID id=run:20110603-1140-rr21aum3 -2011-06-03 11:40:10,767-0500 DEBUG greeting PROCEDURE line=3 thread=0-1 name=greeting -2011-06-03 11:40:10,774-0500 INFO vdl:execute START thread=0-1 tr=echo -2011-06-03 11:40:10,798-0500 INFO WeightedHostScoreScheduler CONTACT_SELECTED host=localhost, score=1.000 -2011-06-03 11:40:10,802-0500 INFO GlobalSubmitQueue No global submit throttle set. Using default (1024) -2011-06-03 11:40:10,805-0500 INFO LateBindingScheduler JobQueue: 0 -2011-06-03 11:40:10,873-0500 INFO LateBindingScheduler JobQueue: 0 -2011-06-03 11:40:10,876-0500 INFO vdl:initshareddir START host=localhost - Initializing shared directory -2011-06-03 11:40:10,880-0500 INFO LateBindingScheduler JobQueue: 0 -2011-06-03 11:40:10,899-0500 INFO LateBindingScheduler JobQueue: 0 -2011-06-03 11:40:10,902-0500 INFO LateBindingScheduler JobQueue: 0 -2011-06-03 11:40:10,904-0500 INFO LateBindingScheduler JobQueue: 0 -2011-06-03 11:40:10,908-0500 INFO LateBindingScheduler JobQueue: 0 -2011-06-03 11:40:10,912-0500 INFO LateBindingScheduler JobQueue: 0 -2011-06-03 11:40:10,914-0500 INFO vdl:initshareddir END host=localhost - Done initializing shared directory -2011-06-03 11:40:10,917-0500 DEBUG vdl:execute2 THREAD_ASSOCIATION jobid=echo-1geu42bk thread=0-1-1 host=localhost replicationGroup=0geu42bk -2011-06-03 11:40:10,925-0500 INFO vdl:createdirset START jobid=echo-1geu42bk host=localhost - Initializing directory structure -2011-06-03 11:40:10,926-0500 INFO vdl:createdirset END jobid=echo-1geu42bk - Done initializing directory structure -2011-06-03 11:40:10,926-0500 INFO vdl:dostagein START jobid=echo-1geu42bk - Staging in files -2011-06-03 11:40:10,932-0500 INFO vdl:dostagein END jobid=echo-1geu42bk - Staging in finished -2011-06-03 11:40:10,934-0500 DEBUG vdl:execute2 JOB_START jobid=echo-1geu42bk tr=echo arguments=[?:string = hello - Closed] tmpdir=0011-echo-20110603-1140-rr21aum3/jobs/1/echo-1geu42bk host=localhost -2011-06-03 11:40:10,937-0500 DEBUG textfiles BEGIN TC: -#This is the transformation catalog. -# -#It comes pre-configured with a number of simple transformations with -#paths that are likely to work on a linux box. However, on some systems, -#the paths to these executables will be different (for example, sometimes -#some of these programs are found in /usr/bin rather than in /bin) -# -#NOTE WELL: fields in this file must be separated by tabs, not spaces; and -#there must be no trailing whitespace at the end of each line. -# -# sitename transformation path INSTALLED platform profiles -localhost echo /bin/echo INSTALLED INTEL32::LINUX null -localhost cat /bin/cat INSTALLED INTEL32::LINUX null -localhost ls /bin/ls INSTALLED INTEL32::LINUX null -localhost grep /bin/grep INSTALLED INTEL32::LINUX null -localhost sort /bin/sort INSTALLED INTEL32::LINUX null -localhost paste /bin/paste INSTALLED INTEL32::LINUX null -localhost cp /bin/cp INSTALLED INTEL32::LINUX null -localhost wc /usr/bin/wc INSTALLED INTEL32::LINUX null -localhost wc /usr/bin/wc INSTALLED INTEL32::LINUX null -localhost touch /bin/touch INSTALLED INTEL32::LINUX null -localhost sleep /bin/sleep INSTALLED INTEL32::LINUX null -localhost delayedcat /home/Alberto/Swift/cog/modules/swift/tests/language-behaviour/delayedcat.sh INSTALLED INTEL32::LINUX null - - -2011-06-03 11:40:10,937-0500 DEBUG textfiles END TC: -2011-06-03 11:40:10,946-0500 INFO GridExec TASK_DEFINITION: Task(type=JOB_SUBMISSION, identity=urn:0-1-1-1307119210103) is /bin/bash shared/_swiftwrap echo-1geu42bk -jobdir 1 -scratch -e /bin/echo -out 0011-echo.out -err stderr.txt -i -d -if -of 0011-echo.out -k -cdmfile -status files -a hello -2011-06-03 11:40:10,952-0500 INFO JobSubmissionTaskHandler Submit: in: /var/tmp/0011-echo-20110603-1140-rr21aum3 command: /bin/bash /var/tmp/0011-echo-20110603-1140-rr21aum3/shared/_swiftwrap echo-1geu42bk -jobdir 1 -scratch -e /bin/echo -out 0011-echo.out -err stderr.txt -i -d -if -of 0011-echo.out -k -cdmfile -status files -a hello -2011-06-03 11:40:11,045-0500 INFO LateBindingScheduler JobQueue: 0 -2011-06-03 11:40:11,048-0500 DEBUG vdl:checkjobstatus START jobid=echo-1geu42bk -2011-06-03 11:40:11,051-0500 INFO LateBindingScheduler JobQueue: 0 -2011-06-03 11:40:11,052-0500 INFO vdl:checkjobstatus SUCCESS jobid=echo-1geu42bk - Success file found -2011-06-03 11:40:11,053-0500 DEBUG vdl:execute2 STAGING_OUT jobid=echo-1geu42bk -2011-06-03 11:40:11,055-0500 INFO vdl:dostageout START jobid=echo-1geu42bk - Staging out files -2011-06-03 11:40:11,056-0500 DEBUG vdl:dostageout stageouts: [[$, outfile:messagefile = ? - Open]] -2011-06-03 11:40:11,064-0500 DEBUG vdl:dostageout FILE_STAGE_OUT_START srcname=0011-echo.out srcdir=0011-echo-20110603-1140-rr21aum3/shared/ srchost=localhost destdir= desthost=localhost provider=file -2011-06-03 11:40:11,065-0500 INFO LateBindingScheduler JobQueue: 0 -2011-06-03 11:40:11,077-0500 INFO LateBindingScheduler JobQueue: 0 -2011-06-03 11:40:11,078-0500 DEBUG vdl:dostageout FILE_STAGE_OUT_END srcname=0011-echo.out srcdir=0011-echo-20110603-1140-rr21aum3/shared/ srchost=localhost destdir= desthost=localhost provider=file -2011-06-03 11:40:11,083-0500 INFO LateBindingScheduler JobQueue: 0 -2011-06-03 11:40:11,092-0500 INFO vdl:dostageout END jobid=echo-1geu42bk - Staging out finished -2011-06-03 11:40:11,097-0500 DEBUG vdl:execute2 JOB_END jobid=echo-1geu42bk -2011-06-03 11:40:11,098-0500 INFO vdl:execute END_SUCCESS thread=0-1 tr=echo -2011-06-03 11:40:11,100-0500 DEBUG greeting PROCEDURE_END line=3 -2011-06-03 11:40:11,113-0500 DEBUG vdl:mains Starting cleanups -2011-06-03 11:40:11,116-0500 INFO vdl:cleanups START cleanups=[[0011-echo-20110603-1140-rr21aum3, localhost]] -2011-06-03 11:40:11,118-0500 INFO vdl:cleanup START dir=0011-echo-20110603-1140-rr21aum3 host=localhost -2011-06-03 11:40:11,119-0500 DEBUG vdl:cleanup cdmfile -2011-06-03 11:40:11,123-0500 INFO GridExec TASK_DEFINITION: Task(type=JOB_SUBMISSION, identity=urn:0-1-1307119210114) is /bin/rm -rf 0011-echo-20110603-1140-rr21aum3 -2011-06-03 11:40:11,123-0500 INFO JobSubmissionTaskHandler Submit: in: /var/tmp command: /bin/rm -rf 0011-echo-20110603-1140-rr21aum3 -2011-06-03 11:40:11,123-0500 INFO LateBindingScheduler JobQueue: 0 -2011-06-03 11:40:11,130-0500 INFO vdl:cleanup END dir=0011-echo-20110603-1140-rr21aum3 host=localhost -2011-06-03 11:40:11,131-0500 INFO vdl:cleanups END cleanups=[[0011-echo-20110603-1140-rr21aum3, localhost]] -2011-06-03 11:40:11,132-0500 DEBUG vdl:mains Ending cleanups -2011-06-03 11:40:11,158-0500 INFO Loader Swift finished with no errors Deleted: trunk/tests/language-behaviour/IO/0011-echo.kml =================================================================== --- trunk/tests/language-behaviour/IO/0011-echo.kml 2011-07-03 04:16:46 UTC (rev 4744) +++ trunk/tests/language-behaviour/IO/0011-echo.kml 2011-07-03 04:34:39 UTC (rev 4745) @@ -1,70 +0,0 @@ - - - - - - - - - - - - - - - - - - output - t - - {#thread} - - - - echo - - - swift#string#17000 - - - - t - - - - - - - - - - - - - - - intermediate - outfile - - {#thread} - - - - - - - - - - outfile - - - - - - - - - - Deleted: trunk/tests/language-behaviour/IO/0011-echo.xml =================================================================== --- trunk/tests/language-behaviour/IO/0011-echo.xml 2011-07-03 04:16:46 UTC (rev 4744) +++ trunk/tests/language-behaviour/IO/0011-echo.xml 2011-07-03 04:34:39 UTC (rev 4745) @@ -1,29 +0,0 @@ - - - - - messagefile - string - - - - - - - - - echo - - thello - - - - - outfile - - Deleted: trunk/tests/language-behaviour/IO/0012-echo-map-20110603-1140-n9omdlcb.log =================================================================== --- trunk/tests/language-behaviour/IO/0012-echo-map-20110603-1140-n9omdlcb.log 2011-07-03 04:16:46 UTC (rev 4744) +++ trunk/tests/language-behaviour/IO/0012-echo-map-20110603-1140-n9omdlcb.log 2011-07-03 04:34:39 UTC (rev 4745) @@ -1,33 +0,0 @@ -2011-06-03 11:40:12,099-0500 DEBUG Loader Max heap: 238616576 -2011-06-03 11:40:12,100-0500 DEBUG textfiles BEGIN SWIFTSCRIPT: -type messagefile; - -(messagefile t) greeting() { - app { - echo "hello" stdout=@filename(t); - } -} - -messagefile outfile <"0012-echo-map.out"> = greeting(); - - - - -2011-06-03 11:40:12,100-0500 DEBUG textfiles END SWIFTSCRIPT: -2011-06-03 11:40:12,101-0500 INFO Loader 0012-echo-map.swift: source file is new. Recompiling. -2011-06-03 11:40:12,683-0500 INFO Karajan Validation of XML intermediate file was successful -2011-06-03 11:40:12,882-0500 DEBUG Loader setting: tc.file to: ./tc.data -2011-06-03 11:40:12,882-0500 DEBUG textfiles using default sites file -2011-06-03 11:40:12,900-0500 INFO VDL2ExecutionContext Stack dump: -Level 1 -[iA = 0, iB = 0, bA = false, bB = false] - vdl:instanceconfig = Swift configuration [] - vdl:operation = run - PATH_SEPARATOR = / - swift.home = /home/Alberto/Swift/cog/modules/swift/dist/swift-svn/bin/.. - #vdl:futureWrapperMap = org.griphyn.vdl.karajan.WrapperMap at d56b37 - - -2011-06-03 11:40:13,570-0500 INFO unknown Using sites file: /home/Alberto/Swift/cog/modules/swift/dist/swift-svn/bin/../etc/sites.xml -2011-06-03 11:40:13,609-0500 INFO unknown Using tc.data: ./tc.data -2011-06-03 11:40:13,715-0500 INFO AbstractScheduler Setting resources to: {localhost=localhost} Deleted: trunk/tests/language-behaviour/IO/0012-echo-map.kml =================================================================== --- trunk/tests/language-behaviour/IO/0012-echo-map.kml 2011-07-03 04:16:46 UTC (rev 4744) +++ trunk/tests/language-behaviour/IO/0012-echo-map.kml 2011-07-03 04:34:39 UTC (rev 4745) @@ -1,70 +0,0 @@ - - - - - - - - - - - - - - - - - - output - t - - {#thread} - - - - echo - - - swift#string#17000 - - - - t - - - - - - - - - - - - - - - intermediate - outfile - - {#thread} - - - - - - - - - - outfile - - - - - - - - - - Deleted: trunk/tests/language-behaviour/IO/0012-echo-map.xml =================================================================== --- trunk/tests/language-behaviour/IO/0012-echo-map.xml 2011-07-03 04:16:46 UTC (rev 4744) +++ trunk/tests/language-behaviour/IO/0012-echo-map.xml 2011-07-03 04:34:39 UTC (rev 4745) @@ -1,29 +0,0 @@ - - - - - messagefile - string - - - - - - - - - echo - - thello - - - - - outfile - - Deleted: trunk/tests/language-behaviour/IO/130-fmri.0001.h.in =================================================================== --- trunk/tests/language-behaviour/IO/130-fmri.0001.h.in 2011-07-03 04:16:46 UTC (rev 4744) +++ trunk/tests/language-behaviour/IO/130-fmri.0001.h.in 2011-07-03 04:34:39 UTC (rev 4745) @@ -1 +0,0 @@ -qux Added: trunk/tests/language-behaviour/IO/130-fmri.0001.h.input.in =================================================================== --- trunk/tests/language-behaviour/IO/130-fmri.0001.h.input.in (rev 0) +++ trunk/tests/language-behaviour/IO/130-fmri.0001.h.input.in 2011-07-03 04:34:39 UTC (rev 4745) @@ -0,0 +1 @@ +qux Deleted: trunk/tests/language-behaviour/IO/130-fmri.0001.v.in =================================================================== --- trunk/tests/language-behaviour/IO/130-fmri.0001.v.in 2011-07-03 04:16:46 UTC (rev 4744) +++ trunk/tests/language-behaviour/IO/130-fmri.0001.v.in 2011-07-03 04:34:39 UTC (rev 4745) @@ -1 +0,0 @@ -qux Added: trunk/tests/language-behaviour/IO/130-fmri.0001.v.input.in =================================================================== --- trunk/tests/language-behaviour/IO/130-fmri.0001.v.input.in (rev 0) +++ trunk/tests/language-behaviour/IO/130-fmri.0001.v.input.in 2011-07-03 04:34:39 UTC (rev 4745) @@ -0,0 +1 @@ +qux Deleted: trunk/tests/language-behaviour/IO/130-fmri.0002.h.in =================================================================== --- trunk/tests/language-behaviour/IO/130-fmri.0002.h.in 2011-07-03 04:16:46 UTC (rev 4744) +++ trunk/tests/language-behaviour/IO/130-fmri.0002.h.in 2011-07-03 04:34:39 UTC (rev 4745) @@ -1 +0,0 @@ -qux Added: trunk/tests/language-behaviour/IO/130-fmri.0002.h.input.in =================================================================== --- trunk/tests/language-behaviour/IO/130-fmri.0002.h.input.in (rev 0) +++ trunk/tests/language-behaviour/IO/130-fmri.0002.h.input.in 2011-07-03 04:34:39 UTC (rev 4745) @@ -0,0 +1 @@ +qux Deleted: trunk/tests/language-behaviour/IO/130-fmri.0002.v.in =================================================================== --- trunk/tests/language-behaviour/IO/130-fmri.0002.v.in 2011-07-03 04:16:46 UTC (rev 4744) +++ trunk/tests/language-behaviour/IO/130-fmri.0002.v.in 2011-07-03 04:34:39 UTC (rev 4745) @@ -1 +0,0 @@ -qux Added: trunk/tests/language-behaviour/IO/130-fmri.0002.v.input.in =================================================================== --- trunk/tests/language-behaviour/IO/130-fmri.0002.v.input.in (rev 0) +++ trunk/tests/language-behaviour/IO/130-fmri.0002.v.input.in 2011-07-03 04:34:39 UTC (rev 4745) @@ -0,0 +1 @@ +qux Deleted: trunk/tests/language-behaviour/IO/130-fmri.0003.h.in =================================================================== --- trunk/tests/language-behaviour/IO/130-fmri.0003.h.in 2011-07-03 04:16:46 UTC (rev 4744) +++ trunk/tests/language-behaviour/IO/130-fmri.0003.h.in 2011-07-03 04:34:39 UTC (rev 4745) @@ -1 +0,0 @@ -qux Added: trunk/tests/language-behaviour/IO/130-fmri.0003.h.input.in =================================================================== --- trunk/tests/language-behaviour/IO/130-fmri.0003.h.input.in (rev 0) +++ trunk/tests/language-behaviour/IO/130-fmri.0003.h.input.in 2011-07-03 04:34:39 UTC (rev 4745) @@ -0,0 +1 @@ +qux Deleted: trunk/tests/language-behaviour/IO/130-fmri.0003.v.in =================================================================== --- trunk/tests/language-behaviour/IO/130-fmri.0003.v.in 2011-07-03 04:16:46 UTC (rev 4744) +++ trunk/tests/language-behaviour/IO/130-fmri.0003.v.in 2011-07-03 04:34:39 UTC (rev 4745) @@ -1 +0,0 @@ -qux Added: trunk/tests/language-behaviour/IO/130-fmri.0003.v.input.in =================================================================== --- trunk/tests/language-behaviour/IO/130-fmri.0003.v.input.in (rev 0) +++ trunk/tests/language-behaviour/IO/130-fmri.0003.v.input.in 2011-07-03 04:34:39 UTC (rev 4745) @@ -0,0 +1 @@ +qux Deleted: trunk/tests/language-behaviour/IO/130-fmri.0004.h.in =================================================================== --- trunk/tests/language-behaviour/IO/130-fmri.0004.h.in 2011-07-03 04:16:46 UTC (rev 4744) +++ trunk/tests/language-behaviour/IO/130-fmri.0004.h.in 2011-07-03 04:34:39 UTC (rev 4745) @@ -1 +0,0 @@ -qux Added: trunk/tests/language-behaviour/IO/130-fmri.0004.h.input.in =================================================================== --- trunk/tests/language-behaviour/IO/130-fmri.0004.h.input.in (rev 0) +++ trunk/tests/language-behaviour/IO/130-fmri.0004.h.input.in 2011-07-03 04:34:39 UTC (rev 4745) @@ -0,0 +1 @@ +qux Deleted: trunk/tests/language-behaviour/IO/130-fmri.0004.v.in =================================================================== --- trunk/tests/language-behaviour/IO/130-fmri.0004.v.in 2011-07-03 04:16:46 UTC (rev 4744) +++ trunk/tests/language-behaviour/IO/130-fmri.0004.v.in 2011-07-03 04:34:39 UTC (rev 4745) @@ -1 +0,0 @@ -qux Added: trunk/tests/language-behaviour/IO/130-fmri.0004.v.input.in =================================================================== --- trunk/tests/language-behaviour/IO/130-fmri.0004.v.input.in (rev 0) +++ trunk/tests/language-behaviour/IO/130-fmri.0004.v.input.in 2011-07-03 04:34:39 UTC (rev 4745) @@ -0,0 +1 @@ +qux Deleted: trunk/tests/language-behaviour/IO/130-fmri.h.template =================================================================== --- trunk/tests/language-behaviour/IO/130-fmri.h.template 2011-07-03 04:16:46 UTC (rev 4744) +++ trunk/tests/language-behaviour/IO/130-fmri.h.template 2011-07-03 04:34:39 UTC (rev 4745) @@ -1 +0,0 @@ -foo Added: trunk/tests/language-behaviour/IO/130-fmri.h.template.in =================================================================== --- trunk/tests/language-behaviour/IO/130-fmri.h.template.in (rev 0) +++ trunk/tests/language-behaviour/IO/130-fmri.h.template.in 2011-07-03 04:34:39 UTC (rev 4745) @@ -0,0 +1 @@ +foo Modified: trunk/tests/language-behaviour/IO/130-fmri.swift =================================================================== --- trunk/tests/language-behaviour/IO/130-fmri.swift 2011-07-03 04:16:46 UTC (rev 4744) +++ trunk/tests/language-behaviour/IO/130-fmri.swift 2011-07-03 04:34:39 UTC (rev 4745) @@ -16,8 +16,8 @@ // inputs: 4 volumes and a reference volume -volume inputs[] ; -volume template ; +volume inputs[] ; +volume template ; // align 4 volumes to reference volume Deleted: trunk/tests/language-behaviour/IO/130-fmri.v.template =================================================================== --- trunk/tests/language-behaviour/IO/130-fmri.v.template 2011-07-03 04:16:46 UTC (rev 4744) +++ trunk/tests/language-behaviour/IO/130-fmri.v.template 2011-07-03 04:34:39 UTC (rev 4745) @@ -1 +0,0 @@ -foo Added: trunk/tests/language-behaviour/IO/130-fmri.v.template.in =================================================================== --- trunk/tests/language-behaviour/IO/130-fmri.v.template.in (rev 0) +++ trunk/tests/language-behaviour/IO/130-fmri.v.template.in 2011-07-03 04:34:39 UTC (rev 4745) @@ -0,0 +1 @@ +foo Added: trunk/tests/language-behaviour/IO/q22.setup.sh =================================================================== --- trunk/tests/language-behaviour/IO/q22.setup.sh (rev 0) +++ trunk/tests/language-behaviour/IO/q22.setup.sh 2011-07-03 04:34:39 UTC (rev 4745) @@ -0,0 +1,5 @@ +#!/bin/bash + +echo "eye" > one.txt +echo "eye bee" > two.txt +echo "eye bee see" > three.txt \ No newline at end of file Property changes on: trunk/tests/language-behaviour/IO/q22.setup.sh ___________________________________________________________________ Added: svn:executable + * Modified: trunk/tests/language-behaviour/IO/q22.swift =================================================================== --- trunk/tests/language-behaviour/IO/q22.swift 2011-07-03 04:16:46 UTC (rev 4744) +++ trunk/tests/language-behaviour/IO/q22.swift 2011-07-03 04:34:39 UTC (rev 4745) @@ -5,8 +5,8 @@ wc "-w" @filename(f) stdout=@filename(t); } -string inputNames = "one.txt two.txt three.txt"; -string outputNames = "one.count two.count three.count"; +string inputNames[] = ["one.txt", "two.txt", "three.txt"]; +string outputNames[] = ["one.count", "two.count", "three.count"]; messagefile inputfiles[] ; countfile outputfiles[] ; Added: trunk/tests/language-behaviour/IO/q23.args =================================================================== --- trunk/tests/language-behaviour/IO/q23.args (rev 0) +++ trunk/tests/language-behaviour/IO/q23.args 2011-07-03 04:34:39 UTC (rev 4745) @@ -0,0 +1 @@ +-text=Hello \ No newline at end of file Added: trunk/tests/language-behaviour/IO/tc.template.mix.data =================================================================== --- trunk/tests/language-behaviour/IO/tc.template.mix.data (rev 0) +++ trunk/tests/language-behaviour/IO/tc.template.mix.data 2011-07-03 04:34:39 UTC (rev 4745) @@ -0,0 +1 @@ +localhost touch /usr/bin/touch INSTALLED INTEL32::LINUX null From hategan at ci.uchicago.edu Sun Jul 3 00:54:37 2011 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Sun, 3 Jul 2011 00:54:37 -0500 (CDT) Subject: [Swift-commit] r4746 - trunk/tests/language/working Message-ID: <20110703055437.79F569CCBF@svn.ci.uchicago.edu> Author: hategan Date: 2011-07-03 00:54:36 -0500 (Sun, 03 Jul 2011) New Revision: 4746 Modified: trunk/tests/language/working/tc.template.mix.data Log: just in case the other tc.data does not end in a newline Modified: trunk/tests/language/working/tc.template.mix.data =================================================================== --- trunk/tests/language/working/tc.template.mix.data 2011-07-03 04:34:39 UTC (rev 4745) +++ trunk/tests/language/working/tc.template.mix.data 2011-07-03 05:54:36 UTC (rev 4746) @@ -1,3 +1,4 @@ + localhost generate _DIR_/generate INSTALLED INTEL32::LINUX null localhost process _DIR_/process INSTALLED INTEL32::LINUX null localhost combine _DIR_/combine INSTALLED INTEL32::LINUX null From hategan at ci.uchicago.edu Sun Jul 3 00:55:00 2011 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Sun, 3 Jul 2011 00:55:00 -0500 (CDT) Subject: [Swift-commit] r4747 - trunk/tests/language/working Message-ID: <20110703055500.C8CB29CCBF@svn.ci.uchicago.edu> Author: hategan Date: 2011-07-03 00:55:00 -0500 (Sun, 03 Jul 2011) New Revision: 4747 Modified: trunk/tests/language/working/014-mapper.swift trunk/tests/language/working/016-mapper-noparam.swift trunk/tests/language/working/arraymapper.swift Log: I think we really wanted the filesys mapper there Modified: trunk/tests/language/working/014-mapper.swift =================================================================== --- trunk/tests/language/working/014-mapper.swift 2011-07-03 05:54:36 UTC (rev 4746) +++ trunk/tests/language/working/014-mapper.swift 2011-07-03 05:55:00 UTC (rev 4747) @@ -1,2 +1,2 @@ type myfile; -myfile v[] ; +myfile v[] ; Modified: trunk/tests/language/working/016-mapper-noparam.swift =================================================================== --- trunk/tests/language/working/016-mapper-noparam.swift 2011-07-03 05:54:36 UTC (rev 4746) +++ trunk/tests/language/working/016-mapper-noparam.swift 2011-07-03 05:55:00 UTC (rev 4747) @@ -1,2 +1,2 @@ type myfile; -myfile v[] ; +myfile v[] ; Modified: trunk/tests/language/working/arraymapper.swift =================================================================== --- trunk/tests/language/working/arraymapper.swift 2011-07-03 05:54:36 UTC (rev 4746) +++ trunk/tests/language/working/arraymapper.swift 2011-07-03 05:55:00 UTC (rev 4747) @@ -1,6 +1,6 @@ type file {}; -file files[]; +file files[]; foreach f in files { trace(f); From hategan at ci.uchicago.edu Sun Jul 3 01:49:23 2011 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Sun, 3 Jul 2011 01:49:23 -0500 (CDT) Subject: [Swift-commit] r4748 - trunk/src/org/griphyn/vdl/mapping Message-ID: <20110703064923.AFDA49CCC5@svn.ci.uchicago.edu> Author: hategan Date: 2011-07-03 01:49:23 -0500 (Sun, 03 Jul 2011) New Revision: 4748 Modified: trunk/src/org/griphyn/vdl/mapping/AbstractDataNode.java trunk/src/org/griphyn/vdl/mapping/RootArrayDataNode.java trunk/src/org/griphyn/vdl/mapping/RootDataNode.java Log: why were we instantiating an empty HashMap (5*pointer + one [16] array) for non-composite data? Modified: trunk/src/org/griphyn/vdl/mapping/AbstractDataNode.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/AbstractDataNode.java 2011-07-03 05:55:00 UTC (rev 4747) +++ trunk/src/org/griphyn/vdl/mapping/AbstractDataNode.java 2011-07-03 06:49:23 UTC (rev 4748) @@ -5,6 +5,7 @@ import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -22,6 +23,7 @@ import org.griphyn.vdl.util.VDL2Config; + public abstract class AbstractDataNode implements DSHandle { static final String DATASET_URI_PREFIX = "dataset:"; @@ -61,7 +63,12 @@ protected AbstractDataNode(Field field) { this.field = field; - handles = new HashMap, DSHandle>(); + if (field.getType().isComposite()) { + handles = new HashMap, DSHandle>(); + } + else { + handles = Collections.emptyMap(); + } } public void init(Map params) { Modified: trunk/src/org/griphyn/vdl/mapping/RootArrayDataNode.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/RootArrayDataNode.java 2011-07-03 05:55:00 UTC (rev 4747) +++ trunk/src/org/griphyn/vdl/mapping/RootArrayDataNode.java 2011-07-03 06:49:23 UTC (rev 4748) @@ -23,8 +23,7 @@ * Instantiate a root array data node with specified type. */ public RootArrayDataNode(Type type) { - super(Field.Factory.newInstance(), null, null); - getField().setType(type); + super(Field.Factory.createField(null, type), null, null); } public void init(Map params) { Modified: trunk/src/org/griphyn/vdl/mapping/RootDataNode.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/RootDataNode.java 2011-07-03 05:55:00 UTC (rev 4747) +++ trunk/src/org/griphyn/vdl/mapping/RootDataNode.java 2011-07-03 06:49:23 UTC (rev 4748) @@ -31,8 +31,7 @@ } public RootDataNode(Type type) { - super(Field.Factory.newInstance()); - getField().setType(type); + super(Field.Factory.createField(null, type)); } public void init(Map params) { From hategan at ci.uchicago.edu Sun Jul 3 12:46:48 2011 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Sun, 3 Jul 2011 12:46:48 -0500 (CDT) Subject: [Swift-commit] r4749 - trunk/tests Message-ID: <20110703174648.3D6699CCBF@svn.ci.uchicago.edu> Author: hategan Date: 2011-07-03 12:46:48 -0500 (Sun, 03 Jul 2011) New Revision: 4749 Modified: trunk/tests/suite.sh Log: automatically use .*.in files and automatically check .expected files Modified: trunk/tests/suite.sh =================================================================== --- trunk/tests/suite.sh 2011-07-03 06:49:23 UTC (rev 4748) +++ trunk/tests/suite.sh 2011-07-03 17:46:48 UTC (rev 4749) @@ -716,14 +716,50 @@ check_bailout } +stage_files() { + GROUP=$1 + NAME=$2 + + if [ -f $GROUP/$NAME.in ]; then + echo "Copying input: $NAME.in" + cp $GROUP/$NAME.in . + fi + for INPUT in $GROUP/$NAME.*.in; do + IN=`basename $INPUT` + echo "Copying input: $IN" + cp $INPUT . + done +} + +check_outputs() { + GROUP=$1 + NAME=$2 + + for EXPECTED in $GROUP/$NAME.*.expected; do + BNE=`basename $EXPECTED .expected` + echo -n "Checking output: $BNE " + diff $BNE $EXPECTED 2>&1 >> $OUTPUT + if [ "$?" != "0" ]; then + RESULT="Failed" + echo -e "${RED}Failed${GRAY}" + else + echo -e "${LGREEN}OK${GRAY}" + fi + done +} + # Execute Swift test case w/ setup, check, clean swift_test_case() { SWIFTSCRIPT=$1 - SETUPSCRIPT=${SWIFTSCRIPT%.swift}.setup.sh - CHECKSCRIPT=${SWIFTSCRIPT%.swift}.check.sh - CLEANSCRIPT=${SWIFTSCRIPT%.swift}.clean.sh - TIMEOUTFILE=${SWIFTSCRIPT%.swift}.timeout - ARGSFILE=${SWIFTSCRIPT%.swift}.args + NAME=${SWIFTSCRIPT%.swift} + + stage_files $GROUP $NAME + + SETUPSCRIPT=$NAME.setup.sh + CHECKSCRIPT=$NAME.check.sh + CLEANSCRIPT=$NAME.clean.sh + TIMEOUTFILE=$NAME.timeout + ARGSFILE=$NAME.args TEST_SHOULD_FAIL=0 if [ -x $GROUP/$SETUPSCRIPT ]; then @@ -738,7 +774,7 @@ if [ -f $GROUP/$ARGSFILE ]; then ARGS=`cat $GROUP/$ARGSFILE` fi - + CDM= [ -r fs.data ] && CDM="-cdm.file fs.data" @@ -764,6 +800,8 @@ html_td width 25 html "  " html_~td + + check_outputs $GROUP $NAME fi if [ -x $GROUP/$CLEANSCRIPT ]; then @@ -777,10 +815,14 @@ # Execute shell test case w/ setup, check, clean script_test_case() { SHELLSCRIPT=$1 - SETUPSCRIPT=${SHELLSCRIPT%.test.sh}.setup.sh - CHECKSCRIPT=${SHELLSCRIPT%.test.sh}.check.sh - CLEANSCRIPT=${SHELLSCRIPT%.test.sh}.clean.sh - TIMEOUTFILE=${SHELLSCRIPT%.test.sh}.timeout + NAME=${SWIFTSCRIPT%.swift} + + stage_files $GROUP $NAME + + SETUPSCRIPT=$NAME.setup.sh + CHECKSCRIPT=$NAME.check.sh + CLEANSCRIPT=$NAME.clean.sh + TIMEOUTFILE=$NAME.timeout TEST_SHOULD_FAIL=0 if [ -x $GROUP/$SETUPSCRIPT ]; then From hategan at ci.uchicago.edu Sun Jul 3 16:37:16 2011 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Sun, 3 Jul 2011 16:37:16 -0500 (CDT) Subject: [Swift-commit] r4750 - trunk/src/org/griphyn/vdl/engine Message-ID: <20110703213716.415069CCC5@svn.ci.uchicago.edu> Author: hategan Date: 2011-07-03 16:37:16 -0500 (Sun, 03 Jul 2011) New Revision: 4750 Modified: trunk/src/org/griphyn/vdl/engine/Karajan.java Log: complain at compile time about uninitialized but used variables Modified: trunk/src/org/griphyn/vdl/engine/Karajan.java =================================================================== --- trunk/src/org/griphyn/vdl/engine/Karajan.java 2011-07-03 17:46:48 UTC (rev 4749) +++ trunk/src/org/griphyn/vdl/engine/Karajan.java 2011-07-03 21:37:16 UTC (rev 4750) @@ -7,10 +7,11 @@ import java.io.InputStreamReader; import java.io.PrintStream; import java.util.ArrayList; -import java.util.LinkedList; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; +import java.util.LinkedList; +import java.util.List; import java.util.Map; import java.util.Set; import java.util.StringTokenizer; @@ -30,8 +31,6 @@ import org.apache.xmlbeans.XmlOptions; import org.apache.xmlbeans.XmlString; import org.globus.swift.language.*; -import org.globus.swift.language.Variable.Mapping; -import org.globus.swift.language.Variable.Mapping.Param; import org.globus.swift.language.If.Else; import org.globus.swift.language.If.Then; import org.globus.swift.language.ImportsDocument.Imports; @@ -40,8 +39,10 @@ import org.globus.swift.language.Switch.Default; import org.globus.swift.language.TypesDocument.Types; import org.globus.swift.language.TypesDocument.Types.Type; +import org.globus.swift.language.Variable.Mapping; +import org.globus.swift.language.Variable.Mapping.Param; +import org.griphyn.vdl.karajan.CompilationException; import org.griphyn.vdl.karajan.Loader; -import org.griphyn.vdl.karajan.CompilationException; import org.griphyn.vdl.toolkit.VDLt2VDLx; import org.safehaus.uuid.UUIDGenerator; import org.w3c.dom.Node; @@ -57,6 +58,9 @@ Map functionsMap = new HashMap(); Map typesMap = new HashMap(); + + List variables = new ArrayList(); + Set usedVariables = new HashSet(); public static final String TEMPLATE_FILE_NAME = "Karajan.stg"; @@ -269,13 +273,35 @@ processProcedures(program, scope); for (Program program : importList) statements(program, scope); - + + checkUninitializedVariables(); generateInternedConstants(scope.bodyTemplate); + return scope.bodyTemplate; } - public void procedure(Procedure proc, VariableScope containingScope) throws CompilationException { + private void checkUninitializedVariables() throws CompilationException { + for (StringTemplate var : variables) { + String name = (String) var.getAttribute("name"); + if (var.getAttribute("waitfor") == null) { + if (usedVariables.contains(name)) { + if (org.griphyn.vdl.type.Types.isPrimitive((String) var.getAttribute("type"))) { + throw new CompilationException("Uninitalized variable: " + name); + } + } + else { + logger.info("Unused variable " + name); + } + } + } + } + + private void setVariableUsed(String s) { + usedVariables.add(s); + } + + public void procedure(Procedure proc, VariableScope containingScope) throws CompilationException { VariableScope outerScope = new VariableScope(this, containingScope, VariableScope.ENCLOSURE_PROCEDURE); VariableScope innerScope = new VariableScope(this, outerScope, VariableScope.ENCLOSURE_NONE); StringTemplate procST = template("procedure"); @@ -340,6 +366,7 @@ variableST.setAttribute("name", var.getName()); variableST.setAttribute("type", var.getType().getLocalPart()); variableST.setAttribute("isGlobal", Boolean.valueOf(var.getIsGlobal())); + variables.add(variableST); if(!var.isNil()) { @@ -1095,6 +1122,8 @@ if(!scope.isVariableDefined(s)) { throw new CompilationException("Variable " + s + " is undefined."); } + + setVariableUsed(s); StringTemplate st = template("id"); st.setAttribute("var", s); String actualType; @@ -1272,7 +1301,7 @@ // which shows Compiler Exception and line number of error } - void checkTypesInCondExpr(String op, String left, String right, StringTemplate st) + void checkTypesInCondExpr(String op, String left, String right, StringTemplate st) throws CompilationException { if (left.equals(right)) st.setAttribute("datatype", "boolean"); From hategan at ci.uchicago.edu Sun Jul 3 16:38:49 2011 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Sun, 3 Jul 2011 16:38:49 -0500 (CDT) Subject: [Swift-commit] r4751 - trunk/tests/language/working Message-ID: <20110703213849.7E8289CCC5@svn.ci.uchicago.edu> Author: hategan Date: 2011-07-03 16:38:49 -0500 (Sun, 03 Jul 2011) New Revision: 4751 Modified: trunk/tests/language/working/0061-assignment.swift trunk/tests/language/working/case1.swift trunk/tests/language/working/case3.swift Log: initialize used variables Modified: trunk/tests/language/working/0061-assignment.swift =================================================================== --- trunk/tests/language/working/0061-assignment.swift 2011-07-03 21:37:16 UTC (rev 4750) +++ trunk/tests/language/working/0061-assignment.swift 2011-07-03 21:38:49 UTC (rev 4751) @@ -3,5 +3,5 @@ r=3; } -int s; +int s = 1; int a=echo(s); Modified: trunk/tests/language/working/case1.swift =================================================================== --- trunk/tests/language/working/case1.swift 2011-07-03 21:37:16 UTC (rev 4750) +++ trunk/tests/language/working/case1.swift 2011-07-03 21:38:49 UTC (rev 4751) @@ -4,7 +4,7 @@ int d = 5; int j,uuu; string s; -int g, t, e; +int g = 1, t, e; switch(d) { Modified: trunk/tests/language/working/case3.swift =================================================================== --- trunk/tests/language/working/case3.swift 2011-07-03 21:37:16 UTC (rev 4750) +++ trunk/tests/language/working/case3.swift 2011-07-03 21:38:49 UTC (rev 4751) @@ -4,9 +4,9 @@ f(int i) { int f=i;} int d=99; -int g; +int g = 1; int j; -int t,uuu,e; +int t= 2,uuu,e =5; string s; switch(d) From hategan at ci.uchicago.edu Sun Jul 3 16:40:53 2011 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Sun, 3 Jul 2011 16:40:53 -0500 (CDT) Subject: [Swift-commit] r4752 - trunk/tests/language/should-not-work Message-ID: <20110703214053.581259CCC5@svn.ci.uchicago.edu> Author: hategan Date: 2011-07-03 16:40:53 -0500 (Sun, 03 Jul 2011) New Revision: 4752 Modified: trunk/tests/language/should-not-work/033-assign.swift Log: changed comment Modified: trunk/tests/language/should-not-work/033-assign.swift =================================================================== --- trunk/tests/language/should-not-work/033-assign.swift 2011-07-03 21:38:49 UTC (rev 4751) +++ trunk/tests/language/should-not-work/033-assign.swift 2011-07-03 21:40:53 UTC (rev 4752) @@ -1,6 +1,6 @@ // THIS-SCRIPT-SHOULD-FAIL -// Hangs waiting for a,b +// ... because a is uninitialized (and so is b) int a,b; int i=(a + b) * 5; From hategan at ci.uchicago.edu Sun Jul 3 16:42:01 2011 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Sun, 3 Jul 2011 16:42:01 -0500 (CDT) Subject: [Swift-commit] r4753 - trunk/tests/local Message-ID: <20110703214201.66EB69CCC5@svn.ci.uchicago.edu> Author: hategan Date: 2011-07-03 16:42:01 -0500 (Sun, 03 Jul 2011) New Revision: 4753 Modified: trunk/tests/local/array_iteration.check.sh trunk/tests/local/filesysmapper.check.sh trunk/tests/local/range.check.sh Log: /bin/sh != /bin/bash Modified: trunk/tests/local/array_iteration.check.sh =================================================================== --- trunk/tests/local/array_iteration.check.sh 2011-07-03 21:40:53 UTC (rev 4752) +++ trunk/tests/local/array_iteration.check.sh 2011-07-03 21:42:01 UTC (rev 4753) @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -x Modified: trunk/tests/local/filesysmapper.check.sh =================================================================== --- trunk/tests/local/filesysmapper.check.sh 2011-07-03 21:40:53 UTC (rev 4752) +++ trunk/tests/local/filesysmapper.check.sh 2011-07-03 21:42:01 UTC (rev 4753) @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -x Modified: trunk/tests/local/range.check.sh =================================================================== --- trunk/tests/local/range.check.sh 2011-07-03 21:40:53 UTC (rev 4752) +++ trunk/tests/local/range.check.sh 2011-07-03 21:42:01 UTC (rev 4753) @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -x From hategan at ci.uchicago.edu Sun Jul 3 16:50:37 2011 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Sun, 3 Jul 2011 16:50:37 -0500 (CDT) Subject: [Swift-commit] r4754 - trunk/tests/language-behaviour/mappers Message-ID: <20110703215037.984799CCC5@svn.ci.uchicago.edu> Author: hategan Date: 2011-07-03 16:50:37 -0500 (Sun, 03 Jul 2011) New Revision: 4754 Removed: trunk/tests/language-behaviour/mappers/07511-fixed-array-mapper-input.clean.sh Log: that cleanup script removes the input files from the source directory making subsequent tests fail ?? Deleted: trunk/tests/language-behaviour/mappers/07511-fixed-array-mapper-input.clean.sh =================================================================== --- trunk/tests/language-behaviour/mappers/07511-fixed-array-mapper-input.clean.sh 2011-07-03 21:42:01 UTC (rev 4753) +++ trunk/tests/language-behaviour/mappers/07511-fixed-array-mapper-input.clean.sh 2011-07-03 21:50:37 UTC (rev 4754) @@ -1,11 +0,0 @@ -#!/bin/bash - -set -x - -rm -v $GROUP/07511-fixed-array-mapper-input.*.in || exit 1 - -exit 0 -#!/bin/bash -set -x -rm -r 07511-fixed-array-mapper-input-* 07511-fixed-array-mapper-input.*ml 07511-fixed-array-mapper-input.out || exit 1 -exit 0 From hategan at ci.uchicago.edu Sun Jul 3 16:51:26 2011 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Sun, 3 Jul 2011 16:51:26 -0500 (CDT) Subject: [Swift-commit] r4755 - trunk/tests/language-behaviour/mappers Message-ID: <20110703215126.F2B9C9CCC5@svn.ci.uchicago.edu> Author: hategan Date: 2011-07-03 16:51:26 -0500 (Sun, 03 Jul 2011) New Revision: 4755 Removed: trunk/tests/language-behaviour/mappers/07511-fixed-array-mapper-input.setup.sh Log: .in files are now automatically copied Deleted: trunk/tests/language-behaviour/mappers/07511-fixed-array-mapper-input.setup.sh =================================================================== --- trunk/tests/language-behaviour/mappers/07511-fixed-array-mapper-input.setup.sh 2011-07-03 21:50:37 UTC (rev 4754) +++ trunk/tests/language-behaviour/mappers/07511-fixed-array-mapper-input.setup.sh 2011-07-03 21:51:26 UTC (rev 4755) @@ -1,7 +0,0 @@ -#!/bin/bash - -set -x - -cp -v $GROUP/07511-fixed-array-mapper-input.*.in . || exit 1 - -exit 0 From hategan at ci.uchicago.edu Sun Jul 3 19:21:48 2011 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Sun, 3 Jul 2011 19:21:48 -0500 (CDT) Subject: [Swift-commit] r4756 - in trunk/src/org/griphyn/vdl/karajan/lib: . swiftscript Message-ID: <20110704002148.542479CCBF@svn.ci.uchicago.edu> Author: hategan Date: 2011-07-03 19:21:48 -0500 (Sun, 03 Jul 2011) New Revision: 4756 Modified: trunk/src/org/griphyn/vdl/karajan/lib/SwiftArg.java trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Misc.java Log: fixed dirname() Modified: trunk/src/org/griphyn/vdl/karajan/lib/SwiftArg.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/SwiftArg.java 2011-07-03 21:51:26 UTC (rev 4755) +++ trunk/src/org/griphyn/vdl/karajan/lib/SwiftArg.java 2011-07-04 00:21:48 UTC (rev 4756) @@ -53,8 +53,12 @@ public Object getValue(VariableStack stack) throws ExecutionException { Object v = super.getValue(stack); - if(v == null) return v; - else return unwrap(stack, super.getValue(stack)); + if (v == null) { + return v; + } + else { + return unwrap(stack, super.getValue(stack)); + } } public double getDoubleValue(VariableStack stack) throws ExecutionException { Modified: trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Misc.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Misc.java 2011-07-03 21:51:26 UTC (rev 4755) +++ trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Misc.java 2011-07-04 00:21:48 UTC (rev 4756) @@ -1,6 +1,7 @@ package org.griphyn.vdl.karajan.lib.swiftscript; import java.io.IOException; +import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -378,11 +379,8 @@ */ public DSHandle swiftscript_length(VariableStack stack) throws ExecutionException { - AbstractDataNode n = (AbstractDataNode) PA_ARRAY.getValue(stack); - n.waitFor(); - ArrayDataNode adn = (ArrayDataNode) n; - - return RootDataNode.newNode(Types.INT, Integer.valueOf(adn.size())); + Map n = (Map) PA_ARRAY.getValue(stack); + return RootDataNode.newNode(Types.INT, Integer.valueOf(n.size())); } public DSHandle swiftscript_existsfile(VariableStack stack) From hategan at ci.uchicago.edu Sun Jul 3 19:32:17 2011 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Sun, 3 Jul 2011 19:32:17 -0500 (CDT) Subject: [Swift-commit] r4757 - trunk/tests/language-behaviour/mappers Message-ID: <20110704003217.A21D09CCBF@svn.ci.uchicago.edu> Author: hategan Date: 2011-07-03 19:32:17 -0500 (Sun, 03 Jul 2011) New Revision: 4757 Added: trunk/tests/language-behaviour/mappers/0752-csv-mapper.csv.in trunk/tests/language-behaviour/mappers/0754-csv-mapper.csv.in trunk/tests/language-behaviour/mappers/07551-ext-mapper-single.sh.in trunk/tests/language-behaviour/mappers/07552-ext-mapper-numeric.sh.in trunk/tests/language-behaviour/mappers/07554-ext-mapper-struct.sh.in trunk/tests/language-behaviour/mappers/07555-ext-mapper-twostruct.sh.in trunk/tests/language-behaviour/mappers/0756-ext-mapper-slow.sh.in trunk/tests/language-behaviour/mappers/0757-ext-mapper-array.sh.in trunk/tests/language-behaviour/mappers/0758-ext-mapper-array.sh.in trunk/tests/language-behaviour/mappers/0759-ext-mapper-array.sh.in trunk/tests/language-behaviour/mappers/07591-ext-mapper-multidimensional-array.sh.in trunk/tests/language-behaviour/mappers/07592-ext-mapper-multidimensional-array-structs.sh.in trunk/tests/language-behaviour/mappers/tc.template.mix.data Removed: trunk/tests/language-behaviour/mappers/071-singlefilemapper-input.check.sh trunk/tests/language-behaviour/mappers/071-singlefilemapper-input.clean.sh trunk/tests/language-behaviour/mappers/0752-csv-mapper.csv trunk/tests/language-behaviour/mappers/0754-csv-mapper-input.swift trunk/tests/language-behaviour/mappers/0754-csv-mapper.csv trunk/tests/language-behaviour/mappers/07551-ext-mapper-single.sh trunk/tests/language-behaviour/mappers/07552-ext-mapper-numeric.sh trunk/tests/language-behaviour/mappers/07554-ext-mapper-struct.sh trunk/tests/language-behaviour/mappers/07555-ext-mapper-twostruct.sh trunk/tests/language-behaviour/mappers/0756-ext-mapper-slow.sh trunk/tests/language-behaviour/mappers/0757-ext-mapper-array.sh trunk/tests/language-behaviour/mappers/0758-ext-mapper-array.sh trunk/tests/language-behaviour/mappers/0759-ext-mapper-array.sh trunk/tests/language-behaviour/mappers/07591-ext-mapper-multidimensional-array.sh trunk/tests/language-behaviour/mappers/07592-ext-mapper-multidimensional-array-structs.sh Modified: trunk/tests/language-behaviour/mappers/0032-strcat-mapper-param.1.out.expected trunk/tests/language-behaviour/mappers/070-singlefilemapper.out.expected trunk/tests/language-behaviour/mappers/07511-fixed-array-mapper-input.check.sh trunk/tests/language-behaviour/mappers/0752-csv-mapper.swift trunk/tests/language-behaviour/mappers/0755-ext-mapper.swift trunk/tests/language-behaviour/mappers/07551-ext-mapper-single.swift trunk/tests/language-behaviour/mappers/07552-ext-mapper-numeric.swift trunk/tests/language-behaviour/mappers/07554-ext-mapper-struct.swift trunk/tests/language-behaviour/mappers/07555-ext-mapper-twostruct.swift trunk/tests/language-behaviour/mappers/075551-ext-mapper-twostruct-singleproducer.swift trunk/tests/language-behaviour/mappers/0756-ext-mapper-slow.swift trunk/tests/language-behaviour/mappers/0757-ext-mapper-array.swift trunk/tests/language-behaviour/mappers/0758-ext-mapper-array.swift trunk/tests/language-behaviour/mappers/0759-ext-mapper-array.swift trunk/tests/language-behaviour/mappers/07591-ext-mapper-multidimensional-array.swift trunk/tests/language-behaviour/mappers/07592-ext-mapper-multidimensional-array-structs.swift trunk/tests/language-behaviour/mappers/T079-simplemapper-nosuffix_exception.swift Log: updated tests Modified: trunk/tests/language-behaviour/mappers/0032-strcat-mapper-param.1.out.expected =================================================================== --- trunk/tests/language-behaviour/mappers/0032-strcat-mapper-param.1.out.expected 2011-07-04 00:21:48 UTC (rev 4756) +++ trunk/tests/language-behaviour/mappers/0032-strcat-mapper-param.1.out.expected 2011-07-04 00:32:17 UTC (rev 4757) @@ -1,4 +1 @@ -#!/bin/bash -set -x -cat 0032-strcat-mapper-param.1.out | grep 0032-strcat-mapper-param.1 || exit 1 -exit 0 +0032-strcat-mapper-param.1 Modified: trunk/tests/language-behaviour/mappers/070-singlefilemapper.out.expected =================================================================== --- trunk/tests/language-behaviour/mappers/070-singlefilemapper.out.expected 2011-07-04 00:21:48 UTC (rev 4756) +++ trunk/tests/language-behaviour/mappers/070-singlefilemapper.out.expected 2011-07-04 00:32:17 UTC (rev 4757) @@ -1,4 +1 @@ -#!/bin/bash -set -x -cat 070-singlefilemapper.out | grep 070-singlefilemapper.out || exit 1 -exit 0 +070-singlefilemapper.out Deleted: trunk/tests/language-behaviour/mappers/071-singlefilemapper-input.check.sh =================================================================== --- trunk/tests/language-behaviour/mappers/071-singlefilemapper-input.check.sh 2011-07-04 00:21:48 UTC (rev 4756) +++ trunk/tests/language-behaviour/mappers/071-singlefilemapper-input.check.sh 2011-07-04 00:32:17 UTC (rev 4757) @@ -1,4 +0,0 @@ -#!/bin/bash -set -x -cat 071-singlefilemapper-input.out | grep || exit 1 -exit 0 Deleted: trunk/tests/language-behaviour/mappers/071-singlefilemapper-input.clean.sh =================================================================== --- trunk/tests/language-behaviour/mappers/071-singlefilemapper-input.clean.sh 2011-07-04 00:21:48 UTC (rev 4756) +++ trunk/tests/language-behaviour/mappers/071-singlefilemapper-input.clean.sh 2011-07-04 00:32:17 UTC (rev 4757) @@ -1,12 +0,0 @@ -#!/bin/bash - -set -x - -rm -v 071-singlefilemapper-input.in \ - 071-singlefilemapper-input.out || exit 1 - -exit 0 -#!/bin/bash -set -x -rm -r 071-singlefilemapper-input-* 071-singlefilemapper-input.*ml 071-singlefilemapper-input.out || exit 1 -exit 0 Modified: trunk/tests/language-behaviour/mappers/07511-fixed-array-mapper-input.check.sh =================================================================== --- trunk/tests/language-behaviour/mappers/07511-fixed-array-mapper-input.check.sh 2011-07-04 00:21:48 UTC (rev 4756) +++ trunk/tests/language-behaviour/mappers/07511-fixed-array-mapper-input.check.sh 2011-07-04 00:32:17 UTC (rev 4757) @@ -1,4 +1,6 @@ #!/bin/bash set -x -cat 07511-fixed-array-mapper-input.out | grep || exit 1 +cat $OUTPUT | grep "file: 07511-fixed-array-mapper-input.first.in" || exit 1 +cat $OUTPUT | grep "file: 07511-fixed-array-mapper-input.second.in" || exit 1 +cat $OUTPUT | grep "file: 07511-fixed-array-mapper-input.third.in" || exit 1 exit 0 Deleted: trunk/tests/language-behaviour/mappers/0752-csv-mapper.csv =================================================================== --- trunk/tests/language-behaviour/mappers/0752-csv-mapper.csv 2011-07-04 00:21:48 UTC (rev 4756) +++ trunk/tests/language-behaviour/mappers/0752-csv-mapper.csv 2011-07-04 00:32:17 UTC (rev 4757) @@ -1,4 +0,0 @@ -l,r -0752-csv-mapper.left-zero.out,0752-csv-mapper.right-zero.out -0752-csv-mapper.left-one.out,0752-csv-mapper.right-one.out -0752-csv-mapper.left-two.out,0752-csv-mapper.right-two.out Copied: trunk/tests/language-behaviour/mappers/0752-csv-mapper.csv.in (from rev 4748, trunk/tests/language-behaviour/mappers/0752-csv-mapper.csv) =================================================================== --- trunk/tests/language-behaviour/mappers/0752-csv-mapper.csv.in (rev 0) +++ trunk/tests/language-behaviour/mappers/0752-csv-mapper.csv.in 2011-07-04 00:32:17 UTC (rev 4757) @@ -0,0 +1,4 @@ +l,r +0752-csv-mapper.left-zero.out,0752-csv-mapper.right-zero.out +0752-csv-mapper.left-one.out,0752-csv-mapper.right-one.out +0752-csv-mapper.left-two.out,0752-csv-mapper.right-two.out Modified: trunk/tests/language-behaviour/mappers/0752-csv-mapper.swift =================================================================== --- trunk/tests/language-behaviour/mappers/0752-csv-mapper.swift 2011-07-04 00:21:48 UTC (rev 4756) +++ trunk/tests/language-behaviour/mappers/0752-csv-mapper.swift 2011-07-04 00:32:17 UTC (rev 4757) @@ -11,7 +11,7 @@ } } -cols outfile[] ; +cols outfile[] ; outfile[0].l = write("slot 0"); outfile[1].r = write("slot 1"); Deleted: trunk/tests/language-behaviour/mappers/0754-csv-mapper-input.swift =================================================================== --- trunk/tests/language-behaviour/mappers/0754-csv-mapper-input.swift 2011-07-04 00:21:48 UTC (rev 4756) +++ trunk/tests/language-behaviour/mappers/0754-csv-mapper-input.swift 2011-07-04 00:32:17 UTC (rev 4757) @@ -1,19 +0,0 @@ -type messagefile; - -type cols { - messagefile l; - messagefile r; -} - -(messagefile t) write(messagefile s) { - app { - cat stdin=@filename(s) stdout=@filename(t); - } -} - -cols infiles[] ; - -messagefile outfile <"0754-csv-mapper-input.out">; - -outfile = write(infiles[1].r); - Deleted: trunk/tests/language-behaviour/mappers/0754-csv-mapper.csv =================================================================== --- trunk/tests/language-behaviour/mappers/0754-csv-mapper.csv 2011-07-04 00:21:48 UTC (rev 4756) +++ trunk/tests/language-behaviour/mappers/0754-csv-mapper.csv 2011-07-04 00:32:17 UTC (rev 4757) @@ -1,4 +0,0 @@ -l,r -0754-csv-mapper.left-zero.in,0754-csv-mapper.right-zero.in -0754-csv-mapper.left-one.in,0754-csv-mapper.right-one.in -0754-csv-mapper.left-two.in,0754-csv-mapper.right-two.in Copied: trunk/tests/language-behaviour/mappers/0754-csv-mapper.csv.in (from rev 4748, trunk/tests/language-behaviour/mappers/0754-csv-mapper.csv) =================================================================== --- trunk/tests/language-behaviour/mappers/0754-csv-mapper.csv.in (rev 0) +++ trunk/tests/language-behaviour/mappers/0754-csv-mapper.csv.in 2011-07-04 00:32:17 UTC (rev 4757) @@ -0,0 +1,4 @@ +l,r +0754-csv-mapper.left-zero.in,0754-csv-mapper.right-zero.in +0754-csv-mapper.left-one.in,0754-csv-mapper.right-one.in +0754-csv-mapper.left-two.in,0754-csv-mapper.right-two.in Modified: trunk/tests/language-behaviour/mappers/0755-ext-mapper.swift =================================================================== --- trunk/tests/language-behaviour/mappers/0755-ext-mapper.swift 2011-07-04 00:21:48 UTC (rev 4756) +++ trunk/tests/language-behaviour/mappers/0755-ext-mapper.swift 2011-07-04 00:32:17 UTC (rev 4757) @@ -11,7 +11,7 @@ } } -cols outfile[] ; +cols outfile[] ; outfile[0].l = write("slot 0"); outfile[1].r = write("slot 1"); Deleted: trunk/tests/language-behaviour/mappers/07551-ext-mapper-single.sh =================================================================== --- trunk/tests/language-behaviour/mappers/07551-ext-mapper-single.sh 2011-07-04 00:21:48 UTC (rev 4756) +++ trunk/tests/language-behaviour/mappers/07551-ext-mapper-single.sh 2011-07-04 00:32:17 UTC (rev 4757) @@ -1,2 +0,0 @@ -#!/bin/bash -echo "$ 07551-ext-mapper-single.out" Copied: trunk/tests/language-behaviour/mappers/07551-ext-mapper-single.sh.in (from rev 4748, trunk/tests/language-behaviour/mappers/07551-ext-mapper-single.sh) =================================================================== --- trunk/tests/language-behaviour/mappers/07551-ext-mapper-single.sh.in (rev 0) +++ trunk/tests/language-behaviour/mappers/07551-ext-mapper-single.sh.in 2011-07-04 00:32:17 UTC (rev 4757) @@ -0,0 +1,2 @@ +#!/bin/bash +echo "$ 07551-ext-mapper-single.out" Modified: trunk/tests/language-behaviour/mappers/07551-ext-mapper-single.swift =================================================================== --- trunk/tests/language-behaviour/mappers/07551-ext-mapper-single.swift 2011-07-04 00:21:48 UTC (rev 4756) +++ trunk/tests/language-behaviour/mappers/07551-ext-mapper-single.swift 2011-07-04 00:32:17 UTC (rev 4757) @@ -6,7 +6,7 @@ } } -messagefile outfile ; +messagefile outfile ; outfile = write("slot 0"); Deleted: trunk/tests/language-behaviour/mappers/07552-ext-mapper-numeric.sh =================================================================== --- trunk/tests/language-behaviour/mappers/07552-ext-mapper-numeric.sh 2011-07-04 00:21:48 UTC (rev 4756) +++ trunk/tests/language-behaviour/mappers/07552-ext-mapper-numeric.sh 2011-07-04 00:32:17 UTC (rev 4757) @@ -1,6 +0,0 @@ -#!/bin/bash - -echo $@ > 07552-ext-mapper-numeric.mapper.out - -echo "$ 07552-ext-mapper-numeric.inside.out" - Copied: trunk/tests/language-behaviour/mappers/07552-ext-mapper-numeric.sh.in (from rev 4748, trunk/tests/language-behaviour/mappers/07552-ext-mapper-numeric.sh) =================================================================== --- trunk/tests/language-behaviour/mappers/07552-ext-mapper-numeric.sh.in (rev 0) +++ trunk/tests/language-behaviour/mappers/07552-ext-mapper-numeric.sh.in 2011-07-04 00:32:17 UTC (rev 4757) @@ -0,0 +1,6 @@ +#!/bin/bash + +echo $@ > 07552-ext-mapper-numeric.mapper.out + +echo "$ 07552-ext-mapper-numeric.inside.out" + Modified: trunk/tests/language-behaviour/mappers/07552-ext-mapper-numeric.swift =================================================================== --- trunk/tests/language-behaviour/mappers/07552-ext-mapper-numeric.swift 2011-07-04 00:21:48 UTC (rev 4756) +++ trunk/tests/language-behaviour/mappers/07552-ext-mapper-numeric.swift 2011-07-04 00:32:17 UTC (rev 4757) @@ -7,7 +7,7 @@ } int n = 5000; -messagefile outfile ; +messagefile outfile ; outfile = greeting(n); Deleted: trunk/tests/language-behaviour/mappers/07554-ext-mapper-struct.sh =================================================================== --- trunk/tests/language-behaviour/mappers/07554-ext-mapper-struct.sh 2011-07-04 00:21:48 UTC (rev 4756) +++ trunk/tests/language-behaviour/mappers/07554-ext-mapper-struct.sh 2011-07-04 00:32:17 UTC (rev 4757) @@ -1,3 +0,0 @@ -#!/bin/bash -echo "eerste 07554-ext-mapper-struct.a.out" -echo "twede 07554-ext-mapper-struct.b.out" Copied: trunk/tests/language-behaviour/mappers/07554-ext-mapper-struct.sh.in (from rev 4748, trunk/tests/language-behaviour/mappers/07554-ext-mapper-struct.sh) =================================================================== --- trunk/tests/language-behaviour/mappers/07554-ext-mapper-struct.sh.in (rev 0) +++ trunk/tests/language-behaviour/mappers/07554-ext-mapper-struct.sh.in 2011-07-04 00:32:17 UTC (rev 4757) @@ -0,0 +1,3 @@ +#!/bin/bash +echo "eerste 07554-ext-mapper-struct.a.out" +echo "twede 07554-ext-mapper-struct.b.out" Modified: trunk/tests/language-behaviour/mappers/07554-ext-mapper-struct.swift =================================================================== --- trunk/tests/language-behaviour/mappers/07554-ext-mapper-struct.swift 2011-07-04 00:21:48 UTC (rev 4756) +++ trunk/tests/language-behaviour/mappers/07554-ext-mapper-struct.swift 2011-07-04 00:32:17 UTC (rev 4757) @@ -11,7 +11,7 @@ } } -struct outfiles ; +struct outfiles ; outfiles.eerste = write("1st"); outfiles.twede = write("2nd"); Deleted: trunk/tests/language-behaviour/mappers/07555-ext-mapper-twostruct.sh =================================================================== --- trunk/tests/language-behaviour/mappers/07555-ext-mapper-twostruct.sh 2011-07-04 00:21:48 UTC (rev 4756) +++ trunk/tests/language-behaviour/mappers/07555-ext-mapper-twostruct.sh 2011-07-04 00:32:17 UTC (rev 4757) @@ -1,5 +0,0 @@ -#!/bin/bash -echo "eerste 07555-ext-mapper-twostruct.a.out" -echo "twede 07555-ext-mapper-twostruct.b.out" -echo "derde.links 07555-ext-mapper-twostruct.cl.out" -echo "derde.rechts 07555-ext-mapper-twostruct.cr.out" Copied: trunk/tests/language-behaviour/mappers/07555-ext-mapper-twostruct.sh.in (from rev 4748, trunk/tests/language-behaviour/mappers/07555-ext-mapper-twostruct.sh) =================================================================== --- trunk/tests/language-behaviour/mappers/07555-ext-mapper-twostruct.sh.in (rev 0) +++ trunk/tests/language-behaviour/mappers/07555-ext-mapper-twostruct.sh.in 2011-07-04 00:32:17 UTC (rev 4757) @@ -0,0 +1,5 @@ +#!/bin/bash +echo "eerste 07555-ext-mapper-twostruct.a.out" +echo "twede 07555-ext-mapper-twostruct.b.out" +echo "derde.links 07555-ext-mapper-twostruct.cl.out" +echo "derde.rechts 07555-ext-mapper-twostruct.cr.out" Modified: trunk/tests/language-behaviour/mappers/07555-ext-mapper-twostruct.swift =================================================================== --- trunk/tests/language-behaviour/mappers/07555-ext-mapper-twostruct.swift 2011-07-04 00:21:48 UTC (rev 4756) +++ trunk/tests/language-behaviour/mappers/07555-ext-mapper-twostruct.swift 2011-07-04 00:32:17 UTC (rev 4757) @@ -17,7 +17,7 @@ } } -struct outfiles ; +struct outfiles ; outfiles.eerste = write("1st"); outfiles.twede = write("2nd"); Modified: trunk/tests/language-behaviour/mappers/075551-ext-mapper-twostruct-singleproducer.swift =================================================================== --- trunk/tests/language-behaviour/mappers/075551-ext-mapper-twostruct-singleproducer.swift 2011-07-04 00:21:48 UTC (rev 4756) +++ trunk/tests/language-behaviour/mappers/075551-ext-mapper-twostruct-singleproducer.swift 2011-07-04 00:32:17 UTC (rev 4757) @@ -17,7 +17,7 @@ } } -struct outfiles ; +struct outfiles ; outfiles = singlewrite(); Deleted: trunk/tests/language-behaviour/mappers/0756-ext-mapper-slow.sh =================================================================== --- trunk/tests/language-behaviour/mappers/0756-ext-mapper-slow.sh 2011-07-04 00:21:48 UTC (rev 4756) +++ trunk/tests/language-behaviour/mappers/0756-ext-mapper-slow.sh 2011-07-04 00:32:17 UTC (rev 4757) @@ -1,8 +0,0 @@ -#!/bin/bash -sleep 10s -echo "[0].l 0756-ext-mapper.AAA.out" -sleep 10s -echo "[1].r 0756-ext-mapper.0.3.2.1.out" -sleep 10s -echo "[2].l 0756-ext-mapper.____.out" -sleep 10s Copied: trunk/tests/language-behaviour/mappers/0756-ext-mapper-slow.sh.in (from rev 4748, trunk/tests/language-behaviour/mappers/0756-ext-mapper-slow.sh) =================================================================== --- trunk/tests/language-behaviour/mappers/0756-ext-mapper-slow.sh.in (rev 0) +++ trunk/tests/language-behaviour/mappers/0756-ext-mapper-slow.sh.in 2011-07-04 00:32:17 UTC (rev 4757) @@ -0,0 +1,8 @@ +#!/bin/bash +sleep 10s +echo "[0].l 0756-ext-mapper.AAA.out" +sleep 10s +echo "[1].r 0756-ext-mapper.0.3.2.1.out" +sleep 10s +echo "[2].l 0756-ext-mapper.____.out" +sleep 10s Modified: trunk/tests/language-behaviour/mappers/0756-ext-mapper-slow.swift =================================================================== --- trunk/tests/language-behaviour/mappers/0756-ext-mapper-slow.swift 2011-07-04 00:21:48 UTC (rev 4756) +++ trunk/tests/language-behaviour/mappers/0756-ext-mapper-slow.swift 2011-07-04 00:32:17 UTC (rev 4757) @@ -11,7 +11,7 @@ } } -cols outfile[] ; +cols outfile[] ; outfile[0].l = write("slot 0"); outfile[1].r = write("slot 1"); Deleted: trunk/tests/language-behaviour/mappers/0757-ext-mapper-array.sh =================================================================== --- trunk/tests/language-behaviour/mappers/0757-ext-mapper-array.sh 2011-07-04 00:21:48 UTC (rev 4756) +++ trunk/tests/language-behaviour/mappers/0757-ext-mapper-array.sh 2011-07-04 00:32:17 UTC (rev 4757) @@ -1,4 +0,0 @@ -echo "[0] 0757-ext-mapper-array.AAA.out" -echo "[1] 0757-ext-mapper-array.0.3.2.1.out" -echo "[2] 0757-ext-mapper-array.____.out" - Copied: trunk/tests/language-behaviour/mappers/0757-ext-mapper-array.sh.in (from rev 4748, trunk/tests/language-behaviour/mappers/0757-ext-mapper-array.sh) =================================================================== --- trunk/tests/language-behaviour/mappers/0757-ext-mapper-array.sh.in (rev 0) +++ trunk/tests/language-behaviour/mappers/0757-ext-mapper-array.sh.in 2011-07-04 00:32:17 UTC (rev 4757) @@ -0,0 +1,4 @@ +echo "[0] 0757-ext-mapper-array.AAA.out" +echo "[1] 0757-ext-mapper-array.0.3.2.1.out" +echo "[2] 0757-ext-mapper-array.____.out" + Modified: trunk/tests/language-behaviour/mappers/0757-ext-mapper-array.swift =================================================================== --- trunk/tests/language-behaviour/mappers/0757-ext-mapper-array.swift 2011-07-04 00:21:48 UTC (rev 4756) +++ trunk/tests/language-behaviour/mappers/0757-ext-mapper-array.swift 2011-07-04 00:32:17 UTC (rev 4757) @@ -6,7 +6,7 @@ } } -messagefile outfile[] ; +messagefile outfile[] ; outfile[0] = write("slot 0"); outfile[1] = write("slot 1"); Deleted: trunk/tests/language-behaviour/mappers/0758-ext-mapper-array.sh =================================================================== --- trunk/tests/language-behaviour/mappers/0758-ext-mapper-array.sh 2011-07-04 00:21:48 UTC (rev 4756) +++ trunk/tests/language-behaviour/mappers/0758-ext-mapper-array.sh 2011-07-04 00:32:17 UTC (rev 4757) @@ -1,4 +0,0 @@ -echo "[0] 0757-ext-mapper-array.AAA.out" -echo "[1] 0757-ext-mapper-array.0.3.2.1.out" -echo "[2] 0757-ext-mapper-array.____.out" - Copied: trunk/tests/language-behaviour/mappers/0758-ext-mapper-array.sh.in (from rev 4748, trunk/tests/language-behaviour/mappers/0758-ext-mapper-array.sh) =================================================================== --- trunk/tests/language-behaviour/mappers/0758-ext-mapper-array.sh.in (rev 0) +++ trunk/tests/language-behaviour/mappers/0758-ext-mapper-array.sh.in 2011-07-04 00:32:17 UTC (rev 4757) @@ -0,0 +1,4 @@ +echo "[0] 0757-ext-mapper-array.AAA.out" +echo "[1] 0757-ext-mapper-array.0.3.2.1.out" +echo "[2] 0757-ext-mapper-array.____.out" + Modified: trunk/tests/language-behaviour/mappers/0758-ext-mapper-array.swift =================================================================== --- trunk/tests/language-behaviour/mappers/0758-ext-mapper-array.swift 2011-07-04 00:21:48 UTC (rev 4756) +++ trunk/tests/language-behaviour/mappers/0758-ext-mapper-array.swift 2011-07-04 00:32:17 UTC (rev 4757) @@ -6,7 +6,7 @@ } } -messagefile outfile[] ; +messagefile outfile[] ; foreach f,i in [0:2] { outfile[i] = write("slot X"); Deleted: trunk/tests/language-behaviour/mappers/0759-ext-mapper-array.sh =================================================================== --- trunk/tests/language-behaviour/mappers/0759-ext-mapper-array.sh 2011-07-04 00:21:48 UTC (rev 4756) +++ trunk/tests/language-behaviour/mappers/0759-ext-mapper-array.sh 2011-07-04 00:32:17 UTC (rev 4757) @@ -1,3 +0,0 @@ -#!/bin/bash -echo [0] 0759-ext-mapper-array.a.out -echo [1] 0759-ext-mapper-array.q.out Copied: trunk/tests/language-behaviour/mappers/0759-ext-mapper-array.sh.in (from rev 4748, trunk/tests/language-behaviour/mappers/0759-ext-mapper-array.sh) =================================================================== --- trunk/tests/language-behaviour/mappers/0759-ext-mapper-array.sh.in (rev 0) +++ trunk/tests/language-behaviour/mappers/0759-ext-mapper-array.sh.in 2011-07-04 00:32:17 UTC (rev 4757) @@ -0,0 +1,3 @@ +#!/bin/bash +echo [0] 0759-ext-mapper-array.a.out +echo [1] 0759-ext-mapper-array.q.out Modified: trunk/tests/language-behaviour/mappers/0759-ext-mapper-array.swift =================================================================== --- trunk/tests/language-behaviour/mappers/0759-ext-mapper-array.swift 2011-07-04 00:21:48 UTC (rev 4756) +++ trunk/tests/language-behaviour/mappers/0759-ext-mapper-array.swift 2011-07-04 00:32:17 UTC (rev 4757) @@ -6,7 +6,7 @@ } } -file outfile[] ; +file outfile[] ; outfile = write(); Deleted: trunk/tests/language-behaviour/mappers/07591-ext-mapper-multidimensional-array.sh =================================================================== --- trunk/tests/language-behaviour/mappers/07591-ext-mapper-multidimensional-array.sh 2011-07-04 00:21:48 UTC (rev 4756) +++ trunk/tests/language-behaviour/mappers/07591-ext-mapper-multidimensional-array.sh 2011-07-04 00:32:17 UTC (rev 4757) @@ -1,5 +0,0 @@ -#!/bin/bash -echo [0][0].a out.n/1foo/0/00/00/ST.TU.pdt -echo [0][0].b out.n/1foo/0/00/00/ST.TU.rmsd - - Copied: trunk/tests/language-behaviour/mappers/07591-ext-mapper-multidimensional-array.sh.in (from rev 4748, trunk/tests/language-behaviour/mappers/07591-ext-mapper-multidimensional-array.sh) =================================================================== --- trunk/tests/language-behaviour/mappers/07591-ext-mapper-multidimensional-array.sh.in (rev 0) +++ trunk/tests/language-behaviour/mappers/07591-ext-mapper-multidimensional-array.sh.in 2011-07-04 00:32:17 UTC (rev 4757) @@ -0,0 +1,5 @@ +#!/bin/bash +echo [0][0].a out.n/1foo/0/00/00/ST.TU.pdt +echo [0][0].b out.n/1foo/0/00/00/ST.TU.rmsd + + Modified: trunk/tests/language-behaviour/mappers/07591-ext-mapper-multidimensional-array.swift =================================================================== --- trunk/tests/language-behaviour/mappers/07591-ext-mapper-multidimensional-array.swift 2011-07-04 00:21:48 UTC (rev 4756) +++ trunk/tests/language-behaviour/mappers/07591-ext-mapper-multidimensional-array.swift 2011-07-04 00:32:17 UTC (rev 4757) @@ -10,7 +10,7 @@ touch @filenames(output); } -S o[][] ; +S o[][] ; o = touch(); Deleted: trunk/tests/language-behaviour/mappers/07592-ext-mapper-multidimensional-array-structs.sh =================================================================== --- trunk/tests/language-behaviour/mappers/07592-ext-mapper-multidimensional-array-structs.sh 2011-07-04 00:21:48 UTC (rev 4756) +++ trunk/tests/language-behaviour/mappers/07592-ext-mapper-multidimensional-array-structs.sh 2011-07-04 00:32:17 UTC (rev 4757) @@ -1,6 +0,0 @@ -#!/bin/bash -echo [0][0].a out.n/1foo/0/00/00/ST.TU.pdt -echo [0][0].b out.n/1foo/0/00/00/ST.TU.rmsd -echo [0][0].c[0] out.n/1foo/0/00/00/ST.TU.rmsd2 - - Copied: trunk/tests/language-behaviour/mappers/07592-ext-mapper-multidimensional-array-structs.sh.in (from rev 4748, trunk/tests/language-behaviour/mappers/07592-ext-mapper-multidimensional-array-structs.sh) =================================================================== --- trunk/tests/language-behaviour/mappers/07592-ext-mapper-multidimensional-array-structs.sh.in (rev 0) +++ trunk/tests/language-behaviour/mappers/07592-ext-mapper-multidimensional-array-structs.sh.in 2011-07-04 00:32:17 UTC (rev 4757) @@ -0,0 +1,6 @@ +#!/bin/bash +echo [0][0].a out.n/1foo/0/00/00/ST.TU.pdt +echo [0][0].b out.n/1foo/0/00/00/ST.TU.rmsd +echo [0][0].c[0] out.n/1foo/0/00/00/ST.TU.rmsd2 + + Modified: trunk/tests/language-behaviour/mappers/07592-ext-mapper-multidimensional-array-structs.swift =================================================================== --- trunk/tests/language-behaviour/mappers/07592-ext-mapper-multidimensional-array-structs.swift 2011-07-04 00:21:48 UTC (rev 4756) +++ trunk/tests/language-behaviour/mappers/07592-ext-mapper-multidimensional-array-structs.swift 2011-07-04 00:32:17 UTC (rev 4757) @@ -11,7 +11,7 @@ touch @filenames(output); } -S o[][] ; +S o[][] ; o = touch(); Modified: trunk/tests/language-behaviour/mappers/T079-simplemapper-nosuffix_exception.swift =================================================================== --- trunk/tests/language-behaviour/mappers/T079-simplemapper-nosuffix_exception.swift 2011-07-04 00:21:48 UTC (rev 4756) +++ trunk/tests/language-behaviour/mappers/T079-simplemapper-nosuffix_exception.swift 2011-07-04 00:32:17 UTC (rev 4757) @@ -1,3 +1,5 @@ +// THIS-SCRIPT-SHOULD-FAIL + // this one is like test T078-simplemapper-nosuffix, but demonstrates the // mapping exception on invalid values type messagefile; Added: trunk/tests/language-behaviour/mappers/tc.template.mix.data =================================================================== --- trunk/tests/language-behaviour/mappers/tc.template.mix.data (rev 0) +++ trunk/tests/language-behaviour/mappers/tc.template.mix.data 2011-07-04 00:32:17 UTC (rev 4757) @@ -0,0 +1,2 @@ + +localhost echo_sh _DIR_/760-csv-mapper.sh INSTALLED INTEL32::LINUX null From hategan at ci.uchicago.edu Mon Jul 4 01:40:57 2011 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Mon, 4 Jul 2011 01:40:57 -0500 (CDT) Subject: [Swift-commit] r4758 - trunk/src/org/griphyn/vdl/karajan/lib/swiftscript Message-ID: <20110704064057.3158D9CCBF@svn.ci.uchicago.edu> Author: hategan Date: 2011-07-04 01:40:56 -0500 (Mon, 04 Jul 2011) New Revision: 4758 Modified: trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Misc.java Log: oops; missed the actual fix Modified: trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Misc.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Misc.java 2011-07-04 00:32:17 UTC (rev 4757) +++ trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Misc.java 2011-07-04 06:40:56 UTC (rev 4758) @@ -363,7 +363,7 @@ public DSHandle swiftscript_dirname(VariableStack stack) throws ExecutionException { - AbstractDataNode n = (AbstractDataNode) PA_FILE.getValue(stack); + AbstractDataNode n = (AbstractDataNode) PA_FILE.getRawValue(stack); n.waitFor(); String name = VDLFunction.filename(n)[0]; String result = new AbsFile(name).getDir(); From hategan at ci.uchicago.edu Mon Jul 4 02:18:15 2011 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Mon, 4 Jul 2011 02:18:15 -0500 (CDT) Subject: [Swift-commit] r4759 - trunk/tests Message-ID: <20110704071815.1E8BF9CD04@svn.ci.uchicago.edu> Author: hategan Date: 2011-07-04 02:18:14 -0500 (Mon, 04 Jul 2011) New Revision: 4759 Modified: trunk/tests/suite.sh Log: test suite updates Modified: trunk/tests/suite.sh =================================================================== --- trunk/tests/suite.sh 2011-07-04 06:40:56 UTC (rev 4758) +++ trunk/tests/suite.sh 2011-07-04 07:18:14 UTC (rev 4759) @@ -381,6 +381,10 @@ if [ "$RESULT" == "Passed" ]; then html_td class "success" width 25 title "$CMD" html_a_href $TEST_LOG "$LABEL" + elif [ "$RESULT" == "None" ]; then + html_td width 25 + html "  " + html_~td else echo -e "${RED}FAILED${GRAY}" cat $RUNDIR/$TEST_LOG < /dev/null @@ -693,8 +697,8 @@ fi + LASTCMD="$@" test_log - LASTCMD="$@" output_report test $SEQ "$LASTCMD" $RESULT $TEST_LOG check_bailout @@ -710,7 +714,6 @@ process_exec $SCRIPT RESULT=$( result ) - test_log output_report test "$SYMBOL" "$LASTCMD" $RESULT check_bailout @@ -720,32 +723,62 @@ GROUP=$1 NAME=$2 + RESULT="None" + if [ -f $GROUP/$NAME.in ]; then echo "Copying input: $NAME.in" - cp $GROUP/$NAME.in . + cp -v $GROUP/$NAME.in . 2>&1 >> $OUTPUT + if [ "$?" != 0 ]; then + RESULT="Failed" + fi + if [ "$RESULT" == "None" ]; then + RESULT="Passed" + fi fi for INPUT in $GROUP/$NAME.*.in; do IN=`basename $INPUT` echo "Copying input: $IN" - cp $INPUT . + cp -v $INPUT . 2>&1 >> $OUTPUT + if [ "$?" != 0 ]; then + RESULT="Failed" + fi + if [ "$RESULT" == "None" ]; then + RESULT="Passed" + fi done + + output_report test "s" "setup" $RESULT + + check_bailout } check_outputs() { GROUP=$1 NAME=$2 + RESULT="None" + for EXPECTED in $GROUP/$NAME.*.expected; do BNE=`basename $EXPECTED .expected` echo -n "Checking output: $BNE " diff $BNE $EXPECTED 2>&1 >> $OUTPUT if [ "$?" != "0" ]; then RESULT="Failed" - echo -e "${RED}Failed${GRAY}" - else - echo -e "${LGREEN}OK${GRAY}" fi + if [ "$RESULT" == "None" ]; then + RESULT="Passed" + fi done + + if [ "$RESULT" == "None" ]; then + html_td width 25 + html "  " + html_~td + fi + + output_report test "√" "check" $RESULT + + check_bailout } # Execute Swift test case w/ setup, check, clean @@ -753,8 +786,6 @@ SWIFTSCRIPT=$1 NAME=${SWIFTSCRIPT%.swift} - stage_files $GROUP $NAME - SETUPSCRIPT=$NAME.setup.sh CHECKSCRIPT=$NAME.check.sh CLEANSCRIPT=$NAME.clean.sh @@ -765,9 +796,7 @@ if [ -x $GROUP/$SETUPSCRIPT ]; then script_exec $GROUP/$SETUPSCRIPT "S" else - html_td width 25 - html "  " - html_~td + stage_files $GROUP $NAME fi ARGS="" @@ -795,13 +824,10 @@ TEST_SHOULD_FAIL=0 if [ -x $GROUP/$CHECKSCRIPT ]; then + export OUTPUT script_exec $GROUP/$CHECKSCRIPT "√" else - html_td width 25 - html "  " - html_~td - - check_outputs $GROUP $NAME + check_outputs $GROUP $NAME fi if [ -x $GROUP/$CLEANSCRIPT ]; then From hategan at ci.uchicago.edu Mon Jul 4 02:19:20 2011 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Mon, 4 Jul 2011 02:19:20 -0500 (CDT) Subject: [Swift-commit] r4760 - trunk/tests/language-behaviour/arrays Message-ID: <20110704071920.BA0779CD04@svn.ci.uchicago.edu> Author: hategan Date: 2011-07-04 02:19:20 -0500 (Mon, 04 Jul 2011) New Revision: 4760 Removed: trunk/tests/language-behaviour/arrays/array_multidimensional_index.check.sh Modified: trunk/tests/language-behaviour/arrays/029-array-assignment-sequence.clean.sh trunk/tests/language-behaviour/arrays/array_multidimensional_index.out.expected Log: fixed some array tests Modified: trunk/tests/language-behaviour/arrays/029-array-assignment-sequence.clean.sh =================================================================== --- trunk/tests/language-behaviour/arrays/029-array-assignment-sequence.clean.sh 2011-07-04 07:18:14 UTC (rev 4759) +++ trunk/tests/language-behaviour/arrays/029-array-assignment-sequence.clean.sh 2011-07-04 07:19:20 UTC (rev 4760) @@ -1,4 +1,4 @@ #!/bin/bash set -x -rm 029-array-assignment-* 029-array-assignment.kml 029-array-assignment.xml || exit 1 +rm 029-array-assignment-sequence* || exit 1 exit 0 Deleted: trunk/tests/language-behaviour/arrays/array_multidimensional_index.check.sh =================================================================== --- trunk/tests/language-behaviour/arrays/array_multidimensional_index.check.sh 2011-07-04 07:18:14 UTC (rev 4759) +++ trunk/tests/language-behaviour/arrays/array_multidimensional_index.check.sh 2011-07-04 07:19:20 UTC (rev 4760) @@ -1,4 +0,0 @@ -#!/bin/bash -set -x -grep array_multidemnsional_index.out | grep 'left up down' || exit 1 -exit 0 Modified: trunk/tests/language-behaviour/arrays/array_multidimensional_index.out.expected =================================================================== --- trunk/tests/language-behaviour/arrays/array_multidimensional_index.out.expected 2011-07-04 07:18:14 UTC (rev 4759) +++ trunk/tests/language-behaviour/arrays/array_multidimensional_index.out.expected 2011-07-04 07:19:20 UTC (rev 4760) @@ -1 +1 @@ -left up down +left right up down From jonmon at ci.uchicago.edu Tue Jul 5 13:01:06 2011 From: jonmon at ci.uchicago.edu (jonmon at ci.uchicago.edu) Date: Tue, 5 Jul 2011 13:01:06 -0500 (CDT) Subject: [Swift-commit] r4765 - SwiftApps/GOSwift/pykoa/tools Message-ID: <20110705180106.746519CCC5@svn.ci.uchicago.edu> Author: jonmon Date: 2011-07-05 13:01:06 -0500 (Tue, 05 Jul 2011) New Revision: 4765 Modified: SwiftApps/GOSwift/pykoa/tools/koa_goswift.py Log: o the goswift command now parse the swift package file via stdin(and only stdin) Modified: SwiftApps/GOSwift/pykoa/tools/koa_goswift.py =================================================================== --- SwiftApps/GOSwift/pykoa/tools/koa_goswift.py 2011-07-05 06:07:34 UTC (rev 4764) +++ SwiftApps/GOSwift/pykoa/tools/koa_goswift.py 2011-07-05 18:01:06 UTC (rev 4765) @@ -55,7 +55,97 @@ return (parser, options, args) -# Do not know what this syntax is +def parse_stdin(): + lines = [] + index = 0 + + while True: + try: + lines.append( raw_input() ) + except EOFError: + break + + tc = extract_tc( lines ) + sites_file = extract_sites( lines ) + config = extract_config( lines ) + script = extract_script( lines ) + + + return ( tc, sites_file, config, script ) + +def extract_tc( lines ): + begin_tc = False + tc = "" + + for line in lines: + + if line == "# begin tc": + begin_tc = True + + elif line == "# end tc": + begin_tc = False + break + + elif begin_tc: + tc += line + "\n" + + return tc + +def extract_sites( lines ): + begin_sites = False + sites = "" + + for line in lines: + + if line == "# begin sites": + begin_sites = True + + elif line == "# end sites": + begin_sites = False + break + + elif begin_sites: + sites += line + "\n" + + return sites + +def extract_config( lines ): + begin_config = False + config = "" + + for line in lines: + + if line == "# begin config": + begin_config = True + + elif line == "# end config": + begin_config = False + break + + elif begin_config: + config += line + "\n" + + return config + +def extract_script( lines ): + begin_script = False + script = "" + + for line in lines: + + if line == "# begin script": + begin_script = True + + elif line == "# end script": + begin_script = False + break + + elif begin_script: + script += line + "\n" + + return script + +# Do not know what this syntax is but pops up in other pykoa_* files. @cli_exception_handler def main( argv=sys.argv[1:] ): (parser, options, args) = setup_opts(argv) @@ -72,13 +162,19 @@ parser.print_help() return 1 + ( tc, sites_file, config, script ) = parse_stdin() + # get a space seperated list of the sites to execute on sites=" ".join( map ( str, args ) ) sys.stdout.write( "\nExecuting Swift on: " + sites + "\n" ) # If I do not execute the script, just print out all pertatent information if options.do_not_execute: - sys.stdout.write( "swift -sites.file sites.xml -tc.file tc -config cf -cdm.file cdm script.swift\n\n" ) + sys.stdout.write( "\nTC file: \n" + tc + "\n" ) + sys.stdout.write( "SITES file: \n" + sites_file + "\n" ) + sys.stdout.write( "CONFIG file: \n" + config + "\n" ) + sys.stdout.write( "SWIFTSCRIPT file: \n" + script + "\n" ) + sys.stdout.write( "swift -sites.file sites.xml -tc.file tc -config cf script.swift\n\n" ) return 0 # Execute the script From jonmon at ci.uchicago.edu Tue Jul 5 13:03:34 2011 From: jonmon at ci.uchicago.edu (jonmon at ci.uchicago.edu) Date: Tue, 5 Jul 2011 13:03:34 -0500 (CDT) Subject: [Swift-commit] r4766 - SwiftApps/SwiftMontage/scripts Message-ID: <20110705180334.4F32C9CCC5@svn.ci.uchicago.edu> Author: jonmon Date: 2011-07-05 13:03:34 -0500 (Tue, 05 Jul 2011) New Revision: 4766 Added: SwiftApps/SwiftMontage/scripts/SwiftMontage_Apps.swift SwiftApps/SwiftMontage/scripts/SwiftMontage_Batch.swift Removed: SwiftApps/SwiftMontage/scripts/SwiftMontage_Apps.swft SwiftApps/SwiftMontage/scripts/SwiftMontage_Batch.swft SwiftApps/SwiftMontage/scripts/copy_image.sh Log: o fixed extension on the Apps and Batch file. o minor edits to the Batch file o removed copy_image.sh - do not use it Deleted: SwiftApps/SwiftMontage/scripts/SwiftMontage_Apps.swft =================================================================== --- SwiftApps/SwiftMontage/scripts/SwiftMontage_Apps.swft 2011-07-05 18:01:06 UTC (rev 4765) +++ SwiftApps/SwiftMontage/scripts/SwiftMontage_Apps.swft 2011-07-05 18:03:34 UTC (rev 4766) @@ -1,98 +0,0 @@ -app ( Image mos ) mAdd( Image imgs[], Table img_tbl, Header hdr ) -{ - mAdd "-p" @dirname( imgs[0] ) "-n" @img_tbl @hdr @mos; -} - - -app ( Image rc_img ) mBackground( Image img, float a, float b, float c ) -{ - mBackground "-n" @img @rc_img a b c; -} - - -app ( Table rect_tbl ) mBgModel( Table img_tbl, Table fits_tbl ) -{ - mBgModel @img_tbl @fits_tbl @rect_tbl; -} - - -app ( Table fits_tbl ) mConcatFit( Table status_tbl, Status stats[] ) -{ - mConcatFit @status_tbl @fits_tbl @dirname( stats[0] ); -} - - -app ( Image diff_img ) mDiff( Image proj_img_1, Image proj_img_2, Header hdr ) -{ - mDiff_wrap "-n" @proj_img_1 @proj_img_2 @diff_img @hdr; -} - - -app ( Image diff_img, Status stat ) mDiffFit( Image img_1, Image img_2, Header hdr ) -{ - mDiffFit_wrap "-n" "-s" @stat @img_1 @img_2 @diff_img @hdr; -} - - -app ( Status stat ) mFitplane( Image diff_img ) -{ - mFitplane_wrap "-s" @stat @diff_img; -} - - -app ( Table img_tbl ) mImgtbl( Image imgs[] ) -{ - mImgtbl @dirname( imgs[0] ) @img_tbl; -} - - -app ( Header hdr ) mMakeHdr( Table img_tbl ) -{ - mMakeHdr @img_tbl @hdr; -} - - -app ( JPEG mos_img_jpg ) mJPEG( Image mos_img ) -{ - mJPEG "-gray" @mos_img "20%" "99.98%" "loglog" "-out" @mos_img_jpg; -} - - -app ( Table diff_tbl ) mOverlaps( Table img_tbl ) -{ - mOverlaps @img_tbl @diff_tbl; -} - - -app ( Image proj_img ) mProjectPP( Image raw_img, Header hdr ) -{ - mProjectPP "-X" @raw_img @proj_img @hdr; -} - - -app ( Image proj_img ) mProject( Image raw_img, Header hdr ) -{ - mProject "-X" @raw_img @proj_img @hdr; -} - -app ( Image shrunk ) mShrink( Image original, int factor ) -{ - mShrink @original @shrunk factor; -} - -/*----------------------------------------------------------------------------------*/ -/* */ -/* Util Scripts */ -/* */ -/*----------------------------------------------------------------------------------*/ - -app ( Table back_tbl ) Background_list( Table imgs_tbl, Table rects_tbl ) -{ - Background_list @imgs_tbl @rects_tbl @back_tbl; -} - - -app ( Table stat_tbl ) create_status_table( Table diff_tbl ) -{ - create_status_table @diff_tbl @stat_tbl; -} Copied: SwiftApps/SwiftMontage/scripts/SwiftMontage_Apps.swift (from rev 4764, SwiftApps/SwiftMontage/scripts/SwiftMontage_Apps.swft) =================================================================== --- SwiftApps/SwiftMontage/scripts/SwiftMontage_Apps.swift (rev 0) +++ SwiftApps/SwiftMontage/scripts/SwiftMontage_Apps.swift 2011-07-05 18:03:34 UTC (rev 4766) @@ -0,0 +1,98 @@ +app ( Image mos ) mAdd( Image imgs[], Table img_tbl, Header hdr ) +{ + mAdd "-p" @dirname( imgs[0] ) "-n" @img_tbl @hdr @mos; +} + + +app ( Image rc_img ) mBackground( Image img, float a, float b, float c ) +{ + mBackground "-n" @img @rc_img a b c; +} + + +app ( Table rect_tbl ) mBgModel( Table img_tbl, Table fits_tbl ) +{ + mBgModel @img_tbl @fits_tbl @rect_tbl; +} + + +app ( Table fits_tbl ) mConcatFit( Table status_tbl, Status stats[] ) +{ + mConcatFit @status_tbl @fits_tbl @dirname( stats[0] ); +} + + +app ( Image diff_img ) mDiff( Image proj_img_1, Image proj_img_2, Header hdr ) +{ + mDiff_wrap "-n" @proj_img_1 @proj_img_2 @diff_img @hdr; +} + + +app ( Image diff_img, Status stat ) mDiffFit( Image img_1, Image img_2, Header hdr ) +{ + mDiffFit_wrap "-n" "-s" @stat @img_1 @img_2 @diff_img @hdr; +} + + +app ( Status stat ) mFitplane( Image diff_img ) +{ + mFitplane_wrap "-s" @stat @diff_img; +} + + +app ( Table img_tbl ) mImgtbl( Image imgs[] ) +{ + mImgtbl @dirname( imgs[0] ) @img_tbl; +} + + +app ( Header hdr ) mMakeHdr( Table img_tbl ) +{ + mMakeHdr @img_tbl @hdr; +} + + +app ( JPEG mos_img_jpg ) mJPEG( Image mos_img ) +{ + mJPEG "-gray" @mos_img "20%" "99.98%" "loglog" "-out" @mos_img_jpg; +} + + +app ( Table diff_tbl ) mOverlaps( Table img_tbl ) +{ + mOverlaps @img_tbl @diff_tbl; +} + + +app ( Image proj_img ) mProjectPP( Image raw_img, Header hdr ) +{ + mProjectPP "-X" @raw_img @proj_img @hdr; +} + + +app ( Image proj_img ) mProject( Image raw_img, Header hdr ) +{ + mProject "-X" @raw_img @proj_img @hdr; +} + +app ( Image shrunk ) mShrink( Image original, int factor ) +{ + mShrink @original @shrunk factor; +} + +/*----------------------------------------------------------------------------------*/ +/* */ +/* Util Scripts */ +/* */ +/*----------------------------------------------------------------------------------*/ + +app ( Table back_tbl ) Background_list( Table imgs_tbl, Table rects_tbl ) +{ + Background_list @imgs_tbl @rects_tbl @back_tbl; +} + + +app ( Table stat_tbl ) create_status_table( Table diff_tbl ) +{ + create_status_table @diff_tbl @stat_tbl; +} Deleted: SwiftApps/SwiftMontage/scripts/SwiftMontage_Batch.swft =================================================================== --- SwiftApps/SwiftMontage/scripts/SwiftMontage_Batch.swft 2011-07-05 18:01:06 UTC (rev 4765) +++ SwiftApps/SwiftMontage/scripts/SwiftMontage_Batch.swft 2011-07-05 18:03:34 UTC (rev 4766) @@ -1,88 +0,0 @@ -( Image rect_imgs[] ) mBackgroundBatch( string dest, Image imgs[], Table img_tbl, Table rect_tbl ) -{ - Table back_list = Background_list( img_tbl, rect_tbl ); - - BackgroundStruct back_struct[] = readData2( back_list ); - - foreach background_entry, i in back_struct - { - Image orig_img ; - Image rect_img ; - - float a = background_entry.a; - float b = background_entry.b; - float c = background_entry.c; - rect_img = mBackground( orig_img, a, b, c ); - - rect_imgs[ i ] = rect_img; - } -} - - -( Image diff_imgs[] ) mDiffBatch( string src, string dest, Table diff_tbl, Header hdr ) -{ - DiffStruct diffs[] ; - - foreach d_entry, i in diffs - { - Image img_1 ; - Image img_2 ; - - Image diff_img ; - diff_img = mDiff( img_1, img_2, hdr ); - - diff_imgs[ i ] = diff_img; - } -} - - -( Image diff_imgs[], Table fits_tbl ) mDiffFitBatch( string src, string dest, string stat, string files[], Table diff_tbl, Header hdr ) -{ - DiffStruct diffs[] ; - Status stats[]; - - Table status_tbl = create_status_table( diff_tbl ); - - foreach d_entry, i in diffs - { - Image img_1 ; - Image img_2 ; - - Image diff_img ; - Status stat_file ; - - ( diff_img, stat_file ) = mDiffFit( img_1, img_2, hdr ); - - diff_imgs[ i ] = diff_img; - stats[ i ] = stat_file; - } - fits_tbl = mConcatFit( status_tbl, stats ); -} - - -( Table fits_tbl ) mFitBatch( string stat, Image diff_imgs[], Table diff_tbl ) -{ - Status stats[] ; - - Table status_tbl = create_status_table( diff_tbl ); - - foreach img, i in stats - { - stats[ i ] = mFitplane ( diff_imgs[i] ); - } - - fits_tbl = mConcatFit( status_tbl, stats ); -} - - -( Image proj_imgs[] ) mProjectBatch( string dest, Image raw_imgs[], Header hdr ) -{ - foreach img, i in raw_imgs - { - Image proj_img ; - proj_img = mProject( img, hdr ); -// proj_img = mProjectPP( img, hdr ); - - proj_imgs[ i ] = proj_img; - } -} Copied: SwiftApps/SwiftMontage/scripts/SwiftMontage_Batch.swift (from rev 4764, SwiftApps/SwiftMontage/scripts/SwiftMontage_Batch.swft) =================================================================== --- SwiftApps/SwiftMontage/scripts/SwiftMontage_Batch.swift (rev 0) +++ SwiftApps/SwiftMontage/scripts/SwiftMontage_Batch.swift 2011-07-05 18:03:34 UTC (rev 4766) @@ -0,0 +1,88 @@ +( Image rect_imgs[] ) mBackgroundBatch( string dest, Image imgs[], Table img_tbl, Table rect_tbl ) +{ + Table back_list = Background_list( img_tbl, rect_tbl ); + + BackgroundStruct back_struct[] = readData2( back_list ); + + foreach background_entry, i in back_struct + { + Image orig_img ; + Image rect_img ; + + float a = background_entry.a; + float b = background_entry.b; + float c = background_entry.c; + rect_img = mBackground( orig_img, a, b, c ); + + rect_imgs[ i ] = rect_img; + } +} + + +( Image diff_imgs[] ) mDiffBatch( string src, string dest, Table diff_tbl, Header hdr ) +{ + DiffStruct diffs[] ; + + foreach d_entry, i in diffs + { + Image img_1 ; + Image img_2 ; + + Image diff_img ; + diff_img = mDiff( img_1, img_2, hdr ); + + diff_imgs[ i ] = diff_img; + } +} + + +( Image diff_imgs[], Table fits_tbl ) mDiffFitBatch( string src, string dest, string stat, string files[], Table diff_tbl, Header hdr ) +{ + DiffStruct diffs[] ; + Status stats[]; + + Table status_tbl = create_status_table( diff_tbl ); + + foreach d_entry, i in diffs + { + Image img_1 ; + Image img_2 ; + + Image diff_img ; + Status stat_file ; + + ( diff_img, stat_file ) = mDiffFit( img_1, img_2, hdr ); + + diff_imgs[ i ] = diff_img; + stats[ i ] = stat_file; + } + fits_tbl = mConcatFit( status_tbl, stats ); +} + + +( Table fits_tbl ) mFitBatch( string stat, Image diff_imgs[], Table diff_tbl ) +{ + Status stats[] ; + + Table status_tbl = create_status_table( diff_tbl ); + + foreach img, i in stats + { + stats[ i ] = mFitplane ( diff_imgs[i] ); + } + + fits_tbl = mConcatFit( status_tbl, stats ); +} + + +( Image proj_imgs[] ) mProjectBatch( string dest, Image raw_imgs[], Header hdr ) +{ + foreach img, i in raw_imgs + { + Image proj_img ; + proj_img = mProject( img, hdr ); +// proj_img = mProjectPP( img, hdr ); + + proj_imgs[ i ] = proj_img; + } +} Deleted: SwiftApps/SwiftMontage/scripts/copy_image.sh =================================================================== --- SwiftApps/SwiftMontage/scripts/copy_image.sh 2011-07-05 18:01:06 UTC (rev 4765) +++ SwiftApps/SwiftMontage/scripts/copy_image.sh 2011-07-05 18:03:34 UTC (rev 4766) @@ -1,3 +0,0 @@ -#!/bin/bash - -cp $2 $1 \ No newline at end of file From hategan at ci.uchicago.edu Tue Jul 5 13:13:55 2011 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Tue, 5 Jul 2011 13:13:55 -0500 (CDT) Subject: [Swift-commit] r4767 - branches/release-0.93 Message-ID: <20110705181355.B90189CCC5@svn.ci.uchicago.edu> Author: hategan Date: 2011-07-05 13:13:55 -0500 (Tue, 05 Jul 2011) New Revision: 4767 Modified: branches/release-0.93/CHANGES.txt Log: changes (ported from trunk since I forgot to change before branching) Modified: branches/release-0.93/CHANGES.txt =================================================================== --- branches/release-0.93/CHANGES.txt 2011-07-05 18:03:34 UTC (rev 4766) +++ branches/release-0.93/CHANGES.txt 2011-07-05 18:13:55 UTC (rev 4767) @@ -1,3 +1,12 @@ +(07/01/11) + +*** Uninitialized variables are detected at compile time instead of causing + a run to hang + +*** A previous commit to deal with future faults occurring in the middle of + a deep copy would incorrectly handle multi-dimensional arrays. This is + now fixed. + (02/17/10) *** Fixed deadlock when iterating on an array that is being written to From hategan at ci.uchicago.edu Tue Jul 5 13:16:30 2011 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Tue, 5 Jul 2011 13:16:30 -0500 (CDT) Subject: [Swift-commit] r4768 - trunk/src/org/griphyn/vdl/karajan Message-ID: <20110705181630.71A939CCC5@svn.ci.uchicago.edu> Author: hategan Date: 2011-07-05 13:16:30 -0500 (Tue, 05 Jul 2011) New Revision: 4768 Modified: trunk/src/org/griphyn/vdl/karajan/Loader.java Log: actually add the command line flag to the argument parser Modified: trunk/src/org/griphyn/vdl/karajan/Loader.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/Loader.java 2011-07-05 18:13:55 UTC (rev 4767) +++ trunk/src/org/griphyn/vdl/karajan/Loader.java 2011-07-05 18:16:30 UTC (rev 4768) @@ -492,6 +492,8 @@ "information and low-level task messages"); ap.addFlag(ARG_MINIMAL_LOGGING, "Makes logging much more terse: " + "reports warnings only"); + + ap.addFlag(ARG_PROVENANCE, "Enables provenance tracking."); Map desc = VDL2ConfigProperties.getPropertyDescriptions(); Iterator i = desc.entrySet().iterator(); From hategan at ci.uchicago.edu Tue Jul 5 13:16:43 2011 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Tue, 5 Jul 2011 13:16:43 -0500 (CDT) Subject: [Swift-commit] r4769 - trunk Message-ID: <20110705181643.2947E9CCC5@svn.ci.uchicago.edu> Author: hategan Date: 2011-07-05 13:16:43 -0500 (Tue, 05 Jul 2011) New Revision: 4769 Modified: trunk/CHANGES.txt Log: changes Modified: trunk/CHANGES.txt =================================================================== --- trunk/CHANGES.txt 2011-07-05 18:16:30 UTC (rev 4768) +++ trunk/CHANGES.txt 2011-07-05 18:16:43 UTC (rev 4769) @@ -1,5 +1,17 @@ +(07/05/11) +*** Provenance tracking in the compiled file is now disabled by default. + Enable with swift -enable.provenance + + + +
+

1. PADS

+
+

1.1. Requesting Access

+

If you do not already have a Computation Institute account, you can request +one at https://www.ci.uchicago.edu/accounts/. This page will give you a list +of resources you can request access to. Be sure that PADS is selected. If +you already have an existing CI account, but do not have access to PADS, +send an email to support at ci.uchicago.edu to request access.

+

1.2. SSH Keys

+

Before accessing PADS, be sure to have your SSH keys configured correctly. +There is some basic information about SSH and how to generate your key at +http://www.ci.uchicago.edu/wiki/bin/view/Resources/SshKeys. Once you have +followed those instructions, you can add your key at +https://www.ci.uchicago.edu/support/sshkeys/.

+

1.3. Connecting to a login node

+

Once your keys are configured, you should be able to access a PADS login +node with the following command:

+
+
+
ssh yourusername at login.pads.ci.uchicago.edu
+
+

1.4. Configuring softenv

+

Softenv is a system used for managing applications. In order to run Swift, +the softenv environment will have to be modified slightly. Softenv is +configured by a file in your home directory called .soft. Edit this file +to look like this:

+
+
+
+java-sun
++maui
++torque
+ at default
+
+

1.5. Downloading and building Swift

+

The most recent versions of Swift can be found at +http://www.ci.uchicago.edu/swift/downloads/index.php. Follow the instructions +provided on that site to download and build Swift.

+

1.6. Adding Swift to your PATH

+

Once you have installed Swift, add the Swift binary to your PATH so you can +easily run it from any directory.

+

In your home directory, edit the file ".bashrc".

+

If you have installed Swift via a source repository, add the following line +at the bottom of .bashrc.

+
+
+
export PATH=$PATH:$HOME/cog/modules/swift/dist/swift-svn/bin
+
+

If you have installed Swift via a binary package, add this line:

+
+
+
export PATH=$PATH:$HOME/swift-<version>/bin
+
+

Replace <version> with the actual name of the swift directory in the example above.

+

1.7. What You Need To Know Before Running Swift

+

Before you can create a Swift configuration file, there are some things +you will need to know.

+

1.7.1. Swift Work Directory

+

The Swift work directory is a directory which Swift uses for processing work. +This directory needs to be writable. Common options for this are:

+
+
+
/home/username/swiftwork
+/home/username/work
+/tmp
+
+

1.7.2. Which project(s) are you a member of?

+

PADS requires that you are a member of a project. You can determine this by +running the following command:

+
+
+
$ projects --available
+
+The following projects are available for your use
+
+Project      PI                      Title
+
+CI-CCR000013 Michael Wilde           The Swift Parallel Scripting System
+
+

If you are not a member of a project, you must first request access +to a project at http://www.ci.uchicago.edu/hpc/projects.

+

You should make sure that you have a project set as default. Run +the projects command with no arguments to determine if you have a default.

+
+
+
$ projects
+You have no default project set.
+
+

To set your default project, use projects --set

+
+
+
$ projects --set CI-CCR000013 --all
+Your default project for all CI clusters has been set to CI-CCR000013.
+
+

1.7.3. Determine your Queue

+

PADS has several different queues you can submit jobs to depending on +the type of work you will be doing. The command "qstat -q" will print +the most up to date list of this information.

+
+ + ++++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 1. PADS Queues
Queue MemoryCPU TimeWalltimeNodeRunQueLm State

route

— 

— 

— 

— 

0

0

— 

E R

short

— 

— 

04:00:00

— 

64

0

— 

E R

extended

— 

— 

— 

— 

0

0

— 

E R

fast

— 

— 

01:00:00

1

0

152

— 

E R

long

— 

— 

24:00:00

— 

232

130

— 

E R

+
+

1.8. Generating Configuration Files

+

Now that you know what queue to use, your project, and your work directory, it is time to +set up Swift. Swift uses a configuration file called sites.xml to determine how it should run. +There are two methods you can use for creating this file. You can manually edit +the configuration file, or generate it with a utility called gensites.

+

1.8.1. Manually Editing sites.xml

+

Below is the template that is used by Swift’s test suite for running on PADS.

+
+
+
<config>
+<pool handle="pads-pbs">
+  <execution jobmanager="local:pbs" provider="local" url="none" />
+  <filesystem provider="local" url="none" />
+  <profile key="jobThrottle" namespace="karajan">0</profile>
+  <profile namespace="globus" key="project">_QUEUE_</profile>
+  <workdirectory>_WORK_</workdirectory>
+</pool>
+</config>
+
+

The values to note here are the ones that are listed between underscores. In the example above, they are QUEUE, and WORK. Queue is the PADS queue to use and WORK is the swift work directory. These are placeholder values you will need to modify to fit your needs. Copy and paste this template, replace the values, and call it sites.xml.

+

1.9. Manually Editing tc.data

+

Below is the tc.data file used by Swift’s test suite for running on PADS.

+
+
+
pads-pbs        echo            /bin/echo       INSTALLED       INTEL32::LINUX
+pads-pbs        cat             /bin/cat        INSTALLED       INTEL32::LINUX
+pads-pbs        ls              /bin/ls         INSTALLED       INTEL32::LINUX
+pads-pbs        grep            /bin/grep       INSTALLED       INTEL32::LINUX
+pads-pbs        sort            /bin/sort       INSTALLED       INTEL32::LINUX
+pads-pbs        paste           /bin/paste      INSTALLED       INTEL32::LINUX
+pads-pbs        wc              /usr/bin/wc     INSTALLED       INTEL32::LINUX
+
+

Copy these commands and save it as tc.data.

+

1.10. Catsn.swift

+

The swift script we will run is called catsn.swift. It simply cats a file and saves the result. This is a nice simple test to ensure jobs are running correctly. Create a file called data.txt which contains some simple input - a "hello world" will do the trick.

+
+
+
type file;
+
+app (file o) cat (file i)
+{
+  cat @i stdout=@o;
+}
+
+string t = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
+string char[] = @strsplit(t, "");
+
+file out[]<simple_mapper; location=".", prefix="catsn.",suffix=".out">;
+foreach j in [1:@toint(@arg("n","10"))] {
+  file data<"data.txt">;
+  out[j] = cat(data);
+}
+
+

1.11. Running Swift

+

Now that everything is in place, run Swift with the following command:

+
+
+
swift -sites.file sites.xml -tc.file tc.data catsn.swift -n=10
+
+

You should see several new files being created, called catsn.0001.out, catsn.0002.out, etc. Each of these +files should contain the contents of what you placed into data.txt. If this happens, your job has run +successfully on PADS!

+

1.12. More Help

+

The best place for additional help is the Swift user mailing list. You can subscribe to this list at +https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-user. When submitting information, please send your sites.xml file, your tc.data, and any Swift log files that were created during your attempt.

+
+

2. Beagle

+
+

2.1. Requesting Access

+

If you do not already have a Computation Institute account, you can request +one at https://www.ci.uchicago.edu/accounts/. This page will give you a list +of resources you can request access to. +You already have an existing CI account, but do not have access to Beagle, +send an email to support at ci.uchicago.edu to request access.

+

2.2. Connecting to a login node

+

Once you have account, you should be able to access a Beagle login +node with the following command:

+
+
+
ssh yourusername at login.beagle.ci.uchicago.edu
+
+

Follow the steps outlined below to get started with Swift on Beagle:

+

step 1. Load the Swift module on Beagle as follows: module load swift

+

step 2. Create and change to a directory where your Swift related work will +stay. (say, mkdir swift-lab, followed by, cd swift-lab)

+

step 3. To get started with a simple example running /bin/cat to read an +input file data.txt and write to an output file f.nnn.out, copy the folder +at /home/ketan/catsn to the above directory. (cp -r /home/ketan/catsn +. followed by cd catsn).

+

step 4. In the sites file: beagle-coaster.xml, make the following two +changes: 1) change the path of workdirectory to your preferred location +(say to /lustre/beagle/$USER/swift-lab/swift.workdir) and 2) Change the +project name to your project (CI-CCR000013) . The workdirectory will contain +execution data related to each run, e.g. wrapper scripts, system information, +inputs and outputs.

+

step 5. Run the example using following commandline (also found in run.sh): +swift -config cf -tc.file tc -sites.file beagle-coaster.xml catsn.swift -n=1 +. You can further change the value of -n to any arbitrary number to run that +many number of concurrent cat

+

step 6. Check the output in the generated outdir directory (ls outdir)

+

Note: Running from sandbox node or requesting 1 hour walltime for upto 3 nodes +will get fast prioritized execution. Good for small tests.

+
+

3. Futuregrid Quickstart Guide

+
+

3.1. Downloading and Building Swift

+

The most recent versions of Swift can be found at +http://www.ci.uchicago.edu/swift/downloads/index.php. To run on futuregrid, +you will need to download the development/trunk version from SVN.

+

3.2. Adding Swift to your PATH

+

Once you have installed Swift, add the Swift binary to your PATH so you can +easily run it from any directory.

+

In your home directory, edit the file ".bashrc".

+

If you have installed Swift via a source repository, add the following line +at the bottom of .bashrc.

+
+
+
export PATH=$PATH:$HOME/cog/modules/swift/dist/swift-svn/bin
+
+

3.3. Requesting Futuregrid Access

+

If you do not already have a futuregrid account, you can follow the +instructions at https://portal.futuregrid.org/gettingstarted to get started. +This page provides information on how to create an account, how to join +a project, how to set up your SSH keys, and how to create a new project.

+

3.4. Downloading Swift VM Tools

+

A set of scripts based around cloudinitd are used to easily start virtual +machines. To download, change to your home directory and run the +following command:

+
+
+
$ svn co https://svn.ci.uchicago.edu/svn/vdl2/usertools/swift-vm-boot
+
+

3.5. Download your Credentials

+

Run the following commands to retrieve your credentials:

+
+
+
$ scp yourusername at hotel.futuregrid.org:nimbus_creds.tar.gz .
+$ tar xvfz nimbus_creds.tar.gz
+
+

When you extract your credential file, look at the file called +hotel.conf. Near the bottom of this file will be two settings +called vws.repository.s3id and vws.repository.s3key. Copy these +values for the next step.

+

3.6. Configuring Swift VM Tools

+

Change directories into the swift-vm-boot directory. Edit the file +called env.sh. There are two settings here that you will need to +modify: FUTUREGRID_IAAS_ACCESS_KEY and FUTUREGRID_IAAS_SECRET_KEY. +Paste your access key (s3id) and secret key (s3key) here and save +the file. By default, env.sh requests 2 nodes on hotel and 2 nodes +on sierra. Change these values as needed. Run install.sh from the +swift-vm-boot directory to complete the installation of Swift VM +Tools. The Swift VM Tools may require a fairly recent version of +Python. If you run into problems while running the install.sh +script, please try a more recent version of Python and associated +libraries.

+

3.7. Configuring coaster-service.conf

+

Within your swift distribution’s etc directory is a file called +coaster-service.conf. There are many options here you can modify +as needed, but these are the settings that will be required +to run on futuregrid:

+
+
+
export WORKER_WORK=/tmp
+export WORKER_MODE=futuregrid
+export SHARED_FILESYSTEM=no
+export WORKER_USERNAME=root
+export SSH_TUNNELING=yes
+export SWIFTVMBOOT_DIR=$HOME/swift-vm-boot
+export WORK=/tmp
+
+

These is a brief description of these settings in the coaster-service.conf file. +Tunneling should be used when you are restricted by a firewall. If your local +machine has multiple network interfaces, you should also manually set the IP +address of your machine with export IPADDR=your.ip.address.here.

+

3.8. Starting the Coaster Service Script

+

Now that everything is configured, change to a temporary directory +and run this command to start the coaster service:

+
+
+
$ start-coaster-service
+
+

This command will start the VMs, start the required processes on the worker nodes, +and generate Swift configuration files for you to use. The configuration files +will be generated in your current directory. These files are sites.xml, tc.data, +and cf.

+

3.9. Running Swift

+

Now that you have all of your configuration files generated, run the following command:

+
+
+
$ swift -sites.file sites.xml -tc.file tc.data -config cf <yourscript.swift>
+
+

If you would like to create a custom tc file for repeated use, rename it to something other +than tc.data to prevent it from being overwritten. The sites.xml however will need to be +regenerated every time you start the coaster service. If you need to repeatedly modify some +sites.xml options, you may edit the template in Swift’s etc/sites/persistent-coasters. You +may also create your own custom tc files with the hostname of persistent-coasters. More +information about this can be found in the Swift userguide at +http://www.ci.uchicago.edu/swift/guides/trunk/userguide/userguide.html.

+

3.10. Stopping the Coaster Service Script

+

To stop the coaster service, run the following command:

+
+
+
$ stop-coaster-service
+
+

This will kill the coaster service, kill the worker scripts on remote systems and terminate +the virtual machines that were created during start-coaster-service.

+

3.11. More Help

+

The best place for additional help is the Swift user mailing list. You can subscribe to this list at +http://mail.ci.uchicago.edu/mailman/listinfo/swift-user. When submitting information, please send +your sites.xml file, your tc.data, and any error messages you run into.

+
+
+

+ + + Added: branches/release-0.93/docs/siteguide/siteguide.txt =================================================================== --- branches/release-0.93/docs/siteguide/siteguide.txt (rev 0) +++ branches/release-0.93/docs/siteguide/siteguide.txt 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1,13 @@ +Site Configuration Guide +======================== + +:toc: +:icons: +:website: http://www.ci.uchicago.edu/swift/guides/siteguide.php +:numbered: + +include::pads[] + +include::beagle[] + +include::futuregrid[] Modified: branches/release-0.93/docs/tutorial/bits =================================================================== --- branches/release-0.93/docs/tutorial/bits 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/docs/tutorial/bits 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,4 +1,4 @@ -bits +Bits ---- Named and optional parameters @@ -7,26 +7,9 @@ In addition to specifying parameters positionally, parameters can be named, and if desired a default value can be specified: - +.default.swift +************** ---- -(messagefile t) greeting (string s="hello") { - app { - echo s stdout=@filename(t); - } -} +include::../../examples/tutorial/default.swift[] ---- - -When we invoke the procedure, we can specify values for the parameters -by name. The following code can be found in q21.swift. - - ----- -french = greeting(s="bonjour"); ----- - -or we can let the default value apply: - - ----- -english = greeting(); ----- +************** Modified: branches/release-0.93/docs/tutorial/hello_world =================================================================== --- branches/release-0.93/docs/tutorial/hello_world 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/docs/tutorial/hello_world 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,21 +1,23 @@ Hello World ----------- -The first example program, first.swift, outputs a hello world message +The first example program, hello.swift, outputs a hello world message into a file called hello.txt. -.first.swift +.hello.swift ************ ---- -include::../../examples/first.swift[] +include::../../examples/tutorial/hello.swift[] ---- ************ -We can run this program as follows: -note: Make sure the bin directory of swift-installation is in your path. +To run hello.swift, change directories to the location of the script +and run the swift command as follows. + +TIP: Make sure the bin directory of your swift installation is in your PATH. ---- -$ cd examples/swift/ -$ swift first.swift +$ cd examples/tutorial +$ swift hello.swift Swift svn swift-r3334 (swift modified locally) cog-r2752 RunID: 20100526-1925-8zjupq1b @@ -27,44 +29,39 @@ The basic structure of this program is a type definition, an application procedure definition, a variable definition and then a -call to the procedure: - +call to the procedure. +First we define a new type, called messagefile. In this example, we will +use this messagefile type for our output message. + ---- -type messagefile; +sys::[sed -n '1p' ../../examples/tutorial/hello.swift] ---- -First we define a new type, called messagefile. In this example, we will -use this messagefile type as the type for our output message. - - All data in SwiftScript must be typed, whether it is stored in memory or on disk. This example defines a very simple type. Later on we will see more complex type examples. - ---- -app (messagefile t) greeting() { - echo "Hello, world!" stdout=@filename(t); -} +sys::[sed -n '3,5p' ../../examples/tutorial/hello.swift] ---- Next we define a procedure called greeting. This procedure will write -out the "hello world" message to a file. +out the "hello world" message to a file. To achieve this, it executes +the unix utility 'echo' with a parameter "Hello, world!" and directs +the standard output into the output file. -To achieve this, it executes the unix utility 'echo' with a parameter -"Hello, world!" and directs the standard output into the output file. - The actual file to use is specified by the return parameter, t. - -messagefile outfile <"hello.txt">; - +----- +sys::[sed -n '7p' ../../examples/tutorial/hello.swift] +----- Here we define a variable called outfile. The type of this variable is messagefile, and we specify that the contents of this variable will be stored on disk in a file called hello.txt -outfile = greeting(); - +----- +sys::[sed -n '3,5p' ../../examples/tutorial/hello.swift] +----- Now we call the greeting procedure, with its output going to the outfile variable and therefore to hello.txt on disk. Modified: branches/release-0.93/docs/tutorial/introduction =================================================================== --- branches/release-0.93/docs/tutorial/introduction 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/docs/tutorial/introduction 2011-07-19 18:18:40 UTC (rev 4830) @@ -3,16 +3,14 @@ This is an introductory tutorial describing the use of Swift and its programming language SwiftScript. It is intended to introduce new users to the basics of Swift. It is structured as a series of simple exercises/examples which you can -try for yourself as you read along. After the first 'hello world' -example, there are two tracks - the language track (which introduces the SwiftScript language) and the runtime track (which introduces features of the Swift runtime environment, such as running -jobs on different computational 'sites'). +try for yourself as you read along. For information on getting an installation of Swift running, consult the -Swift Quickstart Guide . We advise you to install the latest stable release of Swift. +http://www.ci.uchicago.edu/swift/guides/quickstartguide.php[Swift Quickstart Guide]. We advise you to install the latest stable release of Swift. Return to this document when you have successfully run the test SwiftScript program mentioned there. -There is also a Swift User's Guide - which contains -a more detailed reference material on topics covered in this manual. All +There is also a +sys::[../print_link.sh userguide] +which contains a more detailed reference material on topics covered in this manual. All of the programs included in this tutorial can be found in your Swift -distribution in the +examples/swift+ directory. +distribution in the examples/tutorial directory. Modified: branches/release-0.93/docs/tutorial/language_features =================================================================== --- branches/release-0.93/docs/tutorial/language_features 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/docs/tutorial/language_features 2011-07-19 18:18:40 UTC (rev 4830) @@ -5,17 +5,17 @@ ~~~~~~~~~~ Procedures can have parameters. Input parameters specify inputs to the -procedure and output parameters specify outputs. Our helloworld greeting +procedure and output parameters specify outputs. Our hello world greeting procedure already uses an output parameter, t, which indicates where the -greeting output will go. In this section, we will add an input parameter -to the greeting function. +greeting output will go. In this section, we will modify the previous +script to add an input parameter to the greeting function. -The code changes from first.swift are highlighted below. -ToDo: Highlight the differences! - +.parameter.swift +**************** ---- -include::../../examples/parameter.swift[] +include::../../examples/tutorial/parameter.swift[] ---- +**************** We have modified the signature of the greeting procedure to indicate that it takes a single parameter, s, of type 'string'. @@ -31,7 +31,7 @@ supplied. The code for this section can be found in parameter.swift. It can be -invoked using the swift command, with output appearing in hello2.txt: +invoked using the swift command, with output appearing in parameter.hello.txt: ---- @@ -43,21 +43,23 @@ different greetings. The code is in manyparam.swift and can be run as before using the swift command. - +.manyparam.swift +**************** ---- -include::../../examples/manyparam.swift[] +include::../../examples/tutorial/manyparam.swift[] ---- +**************** Note that we can intermingle definitions of variables with invocations of procedures. -When this program has been run, there should be three new files in the -working directory (english.txt, francais.txt and nihongo.txt) each -containing a greeting in a different language. +When this program runs, there should be three new files in the +working directory (manyparam.english.txt, manyparam.francais.txt +and manyparam.nihongo.txt) each containing a greeting in a different +language. In addition to specifying parameters positionally, parameters can be -named, and if desired a default value can be specified - see <>. -ToDo: link not working. +named, and if desired a default value can be specified. Adding another application ~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -67,25 +69,21 @@ To do this, we'll use the unix tr (translate) utility. Here is an example of using tr on the unix command line, not using Swift: - ---- $ echo hello | tr '[a-z]' '[A-Z]' HELLO ---- -.There are several steps -- Updating the transformation catalog -- Updating the application block +There are two main steps - updating the transformation catalog, and +updating the application block. -ToDo: What is transformation catalog? One line explanation. - -First we need to modify the transformation catalog to define a logical -transformation for the tr utility. A transformation catalog lists where executables are located on computational sites. -The transformation catalog can be found in etc/tc.data. There are already several entries specifying +The transformation catalog lists where application executables are located on +remote sites. We need to modify the transformation catalog to define a logical +transformation for the tr utility. The transformation catalog can be found +in etc/tc.data. There are already several entries specifying where executables can be found. Add a new line to the file, specifying -where *tr* can be found (usually in /usr/bin/tr but it may differ on +where tr can be found (usually in /usr/bin/tr but it may differ on your system), like this: - ---- localhost tr /usr/bin/tr INSTALLED INTEL32::LINUX null @@ -98,51 +96,44 @@ Now that we have defined where to find tr, we can use it in SwiftScript. We can define a new procedure, capitalise, which calls tr. - ---- -(messagefile o) capitalise(messagefile i) { - app { - tr "[a-z]" "[A-Z]" stdin=@filename(i) stdout=@filename(o); - } -} +sys::[sed -n '7,9p' ../../examples/tutorial/capitalise.swift] ---- We can call capitalise like this: - ---- -messagefile final <"capitals.txt">; -final = capitalise(hellofile); +sys::[sed -n '12,14p' ../../examples/tutorial/capitalise.swift] ---- -So a full program based on the first exercise might look like this: +Here is the full program based on this exercise: - +.capitalise.swift +*********************** ---- -include::../../examples/second_procedure.swift[] +include::../../examples/tutorial/capitalise.swift[] ---- +*********************** -We can use the swift command to run it like this. - +Next, run swift and verify the output is correct. ---- -$ swift second_procedure.swift +$ swift capitalise.swift ... -$ cat capitals.txt +$ cat capitalise.2.txt HELLO FROM SWIFT ---- Anonymous files ~~~~~~~~~~~~~~~ -In the previous section, the file greeting.txt is used only to store +In the previous section, the file hello.txt is used only to store an intermediate result. We don't really care about which name is used for the file, and we can let Swift choose the name. -To do that, omit the mapping entirely when declaring outfile: +To do that, omit the mapping entirely when declaring hellofile: - ---- -messagefile outfile; +sys::[sed -n '11p' ../../examples/tutorial/capitalise_anonymous.swift] ---- Swift will choose a filename, which in the present version will be in a @@ -168,26 +159,24 @@ ---- -type details { - string name; - int pies; -} +sys::[sed -n '3,6p' ../../examples/tutorial/types.swift] ---- Each element of the structured type can be accessed using a . like this: - ---- -person.name = "john"; +sys::[sed -n '14p' ../../examples/tutorial/types.swift] ---- The following complete program, types.swift, outputs a greeting using a user-defined structure type to hold parameters for the message: - +.types.swift +************ ---- -include::../../examples/types.swift[] +include::../../examples/tutorial/types.swift[] ---- +************ Structured types can be comprised of marker types for files. See the later section on mappers for more information about this. @@ -198,17 +187,18 @@ We can define arrays using the [] suffix in a variable declaration: - ---- -messagefile m[]; +sys::[sed -n '9p' ../../examples/tutorial/arrays.swift] ---- -This program, q5.swift, will declare an array of message files. +This program, arrays.swift, will declare an array of message files. - +.arrays.swift +************* ---- -include::../../examples/q5.swift[] +include::../../examples/tutorial/arrays.swift[] ---- +************* Observe that the type of the parameter to greeting is now an array of strings, string s[], instead of a single string, string s, that @@ -225,49 +215,44 @@ fashion to data in memory. For example, in the above examples we have seen a variable definition like this: - ---- -messagefile outfile <"q13greeting.txt">; +sys::[sed -n '7p' ../../examples/tutorial/arrays.swift] ---- This means that outfile is a dataset variable, which is mapped to a -file on disk called g13greeting.txt. This variable can be assigned to +file on disk called arrays.txt. This variable can be assigned to using = in a similar fashion to an in-memory variable. We can say that -outfile is mapped onto the disk file q13greeting.txt by a mapper. +outfile is mapped onto the disk file arrays.txt by a mapper. -There are various ways of mapping in SwiftScript. Two forms have already +There are various ways of mapping in SwiftScript. Two forms of mapping, +simple named mapping and anonymous mapping, have already been seen in this tutorial. Later exercises will introduce more forms. -The two forms of mapping seen so far are: - -simple named mapping - the name of the file that a variable is mapped to -is explictly listed. Like this: - +In simple named mapping, the name of the file that a variable is mapped to +is explictly listed. ---- -messagefile outfile <"greeting.txt">; +sys::[sed -n '7p' ../../examples/tutorial/hello.swift] ---- This is useful when you want to explicitly name input and output files -for your program. For example, outfile in exercise HELLOWORLD. +for your program. An example of this can be seen with 'outfile' in the +hello world exercise. -anonymous mapping - no name is specified in the source code. A name is +With anonymous mapping no name is specified in the source code. A name is automatically generated for the file. This is useful for intermediate -files that are only referenced through SwiftScript, such as outfile in -exercise ANONYMOUSFILE. A variable declaration is mapped anonymously by -ommitting any mapper definition, like this: +files that are only referenced through SwiftScript. +A variable declaration is mapped anonymously by ommitting any mapper +definition. - ---- -messagefile outfile; +sys::[sed -n '11p' ../../examples/tutorial/capitalise_anonymous.swift] ---- Later exercises will introduce other ways of mapping from disk files to SwiftScript variables. -TODO: introduce @v syntax. - The Regexp Mapper ^^^^^^^^^^^^^^^^^ In this exercise, we introduce the regexp mapper. This mapper @@ -275,37 +260,36 @@ result of that transformation as the filename to map. regexp.swift demonstrates the use of this by placing output into a -file that is based on the name of the input file: our input file is -mapped to the inputfile variable using the simple named mapper, and then -we use the regular expression mapper to map the output file. Then we use -the countwords() procedure to count the works in the input file and +file that is based on the name of the input file. Our input file is +mapped to the inputfile variable using the simple named mapper, then +we use the regular expression mapper to map the output file. We then use +the countwords() procedure to count the words in the input file and store the result in the output file. In order for the countwords() procedure to work correctly, add the wc utility (usually found in /usr/bin/wc) to tc.data. -The important bit of regexp.swift is: +The following program replaces the suffix of the input file (regexp_mapper.words.txt) +with a new suffix (.count) to create regexp_mapper.words.count. - +.regexp_mapper.swift +************* ---- -messagefile inputfile <"q16.txt">; - -countfile c ; +include::../../examples/tutorial/regexp_mapper.swift[] ---- +************** fixed_array_mapper ^^^^^^^^^^^^^^^^^^ -The fixed array mapper maps a list of files into an array - each +The fixed array mapper maps a list of files into an array. Each element of the array is mapped into one file in the specified directory. -See fixedarray.swift. +See fixed_array_mapper.swift below. - +.fixed_array_mapper.swift +************************* ---- -include::../../examples/fixedarray.swift[] +include::../../examples/tutorial/fixed_array_mapper.swift[] ---- +************************* foreach ~~~~~~~ @@ -314,54 +298,62 @@ In this example, we will run the previous word counting example over each file in an array without having to explicitly list the array -elements. The source code for this example is in foreach.swift. The -three input files: one.txt, two.txt and three.txt are supplied. -After you have run the workflow, you should see that there are three -output files: one.count, two.count and three.count, each +elements. The source code for this example is in foreach.swift. This +program uses three input files: foreach.1.txt, foreach.2.txt, and +foreach.3.txt. After you have run the workflow, you should see that there are three +output files: foreach.1.count, foreach.2.count and foreach.3.count, each containing the word count for the corresponding input file. We combine the use of the fixed_array_mapper and the regexp_mapper. - +.foreach.swift +************** ---- -include::../../examples/foreach.swift[] +include::../../examples/tutorial/foreach.swift[] ---- +************** If ~~ Decisions can be made using 'if', like this: ---- -if(morning) { - outfile = greeting("good morning"); -} else { - outfile = greeting("good afternoon"); -} +sys::[sed -n '11,15p' ../../examples/tutorial/if.swift] ---- if.swift contains a simple example of this. Compile and run if.swift and see that it outputs "good morning". Changing the morning variable from true to false will cause the program to output "good afternoon". +Here is the contents of the full script: +.if.swift +********* +----- +include::../../examples/tutorial/if.swift[] +----- +********* + Sequential iteration ~~~~~~~~~~~~~~~~~~~~ A serial execution of instructions can be carried out using the sequential iteration construct. -The following example demonstrates a simple application: each step of +The following example demonstrates a simple application. Each step of the iteration is a string representation of the byte count of the previous step's output, with iteration terminating when the byte count reaches zero. Here's the program: - +.sequential_iteration.swift +*************************** ---- -include::../../examples/iterate.swift[] +include::../../examples/tutorial/sequential_iteration.swift[] ---- +*************************** -Where, echo is the standard unix echo utility. +Echo is the standard unix echo utility. -_wcl_ is our application code - it counts the number of bytes in the one +_wcl_ is our application code. It counts the number of bytes in the one file and writes that count out to another, like this: ---- @@ -395,9 +387,4 @@ SwiftScript trace: extract int value , 2.0 SwiftScript trace: extract int value , 1.0 Final status: Finished successfully:4 - -$ ls foldout* -foldout0000 foldout0001 foldout0002 foldout0003 ---- - - Modified: branches/release-0.93/docs/tutorial/runtime_features =================================================================== --- branches/release-0.93/docs/tutorial/runtime_features 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/docs/tutorial/runtime_features 2011-07-19 18:18:40 UTC (rev 4830) @@ -52,9 +52,8 @@ able to access data files laid out in application-specific ways. An application-specific mapper must take the form of a Java class that -implements the Mapper - -interface. +implements the http://www.ci.uchicago.edu/swift/javadoc/vdsk/org/griphyn/vdl/mapping/Mapper.html[Mapper +interface]. Usually you don't need to implement this interface directly, because Swift provides a number of more concrete classes with some functionality @@ -87,7 +86,7 @@ Examples of mappers which use this class are: http://www.ci.uchicago.edu/swift/guides/userguide.php#mapper.simple_mapper[simple_mapper], http://www.ci.uchicago.edu/swift/guides/userguide.php#mapper.filesys_mapper[filesys_mapper], -and the (undocumented) StructuredRegularExpressionMapper. +and the StructuredRegularExpressionMapper. In general, to write a mapper, choose either the AbstractMapper or the AbstractFileMapper and extend those. If your mapper will generally @@ -119,7 +118,7 @@ ---- type file; -file f ; +file f ; ---- First we must choose a base class - AbstractMapper or @@ -135,42 +134,12 @@ vdsk directory, make a directory src/tutorial/|and put this file in src/tutorial/MyFirstMapper.java. - +.MyFirstMapper.java +******************* ---- -package tutorial; - -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; - -import org.griphyn.vdl.mapping.AbsFile; -import org.griphyn.vdl.mapping.AbstractMapper; -import org.griphyn.vdl.mapping.Path; -import org.griphyn.vdl.mapping.PhysicalFormat; - -public class MyFirstMapper extends AbstractMapper { - - AbsFile myfile = new AbsFile("myfile.txt"); - - public boolean isStatic() { - return false; - } - - public Collection existing() { - if (myfile.exists()) - return Arrays.asList(new Path[] {Path.EMPTY_PATH}); - else - return Collections.EMPTY_LIST; - } - - public PhysicalFormat map(Path p) { - if(p.equals(Path.EMPTY_PATH)) - return myfile; - else - return null; - } -} +include::../../examples/tutorial/MyFirstMapper.java[] ---- +******************* Now we need to inform the Swift engine about the existence of this mapper. We do that by editing the MapperFactory class definition, in @@ -191,20 +160,12 @@ This new Swift build will be aware of your new mapper. We can test it out with a hello world program: - ----- -type messagefile; - -(messagefile t) greeting() { - app { - echo "hello" stdout=@filename(t); - } -} - -messagefile outfile ; - -outfile = greeting(); ----- +.my_first_mapper.swift +********************** +----- +include::../../examples/tutorial/my_first_mapper.swift[] +----- +********************** Run this program, and hopefully you will find the "hello" string has been output into the hard coded output file myfile.txt: @@ -231,13 +192,14 @@ First we have the program in working form, restart.swift. - +.restart.swift +************** ---- -include::../../examples/restart.swift[] +include::../../examples/tutorial/restart.swift[] ---- +************** We must define some transformation catalog entries: - ---- localhost touch /usr/bin/touch INSTALLED INTEL32::LINUX null @@ -245,7 +207,6 @@ ---- Now we can run the program: - ---- $ swift restart.swift @@ -262,13 +223,11 @@ Now we will break the broken job and see what happens. Replace the definition in tc.data for broken with this: - ---- localhost broken /bin/false INSTALLED INTEL32::LINUX null ---- Now when we run the workflow, the broken task fails: - ---- $ swift restart.swift @@ -356,4 +315,3 @@ Swift tries to run "broken" again. This time it works, and so Swift continues on to execute the final piece of the workflow as if nothing had ever gone wrong. - Deleted: branches/release-0.93/examples/anonymous.swift =================================================================== --- branches/release-0.93/examples/anonymous.swift 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/examples/anonymous.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,21 +0,0 @@ -type messagefile {} -type countfile {} - -(messagefile t) greeting (string s) { - app { - echo s stdout=@filename(t); - } -} - -(countfile t) countwords (messagefile f) { - app { - wc "-w" @filename(f) stdout=@filename(t); - } -} - -messagefile outfile; -countfile c <"count14.txt">; - -outfile = greeting("hello from Swift"); -c = countwords(outfile); - Deleted: branches/release-0.93/examples/array_index.swift =================================================================== --- branches/release-0.93/examples/array_index.swift 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/examples/array_index.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,13 +0,0 @@ -type file {} - - -(file t) echo_array (string s[]) { - app { - echo s[0] s[1] s[2] stdout=@filename(t); - } -} - -string greetings[] = ["how","are","you"]; -file hw = echo_array(greetings); - - Deleted: branches/release-0.93/examples/array_wildcard.swift =================================================================== --- branches/release-0.93/examples/array_wildcard.swift 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/examples/array_wildcard.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,13 +0,0 @@ -type file {} - - -(file t) echo_wildcard (string s[]) { - app { - echo s[*] stdout=@filename(t); - } -} - -string greetings[] = ["how","are","you"]; -file hw = echo_wildcard(greetings); - - Deleted: branches/release-0.93/examples/catsn.swift =================================================================== --- branches/release-0.93/examples/catsn.swift 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/examples/catsn.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,15 +0,0 @@ -type file; - -app (file o) cat (file i) -{ - cat @i stdout=@o; -} - -string t = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; -string char[] = @strsplit(t, ""); - -file out[]; -foreach j in [1:@toint(@arg("n","10"))] { - file data<"data.txt">; - out[j] = cat(data); -} Deleted: branches/release-0.93/examples/default.swift =================================================================== --- branches/release-0.93/examples/default.swift 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/examples/default.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,11 +0,0 @@ -type file {} - -(file t) echo (string s="hello world") { //s has a default value - app { - echo s stdout=@filename(t); //redirect stdout to a file - } -} - -file hw1, hw2; -hw1 = echo(); // procedure call using the default value -hw2 = echo(s="hello again"); // using a different value Deleted: branches/release-0.93/examples/first.swift =================================================================== --- branches/release-0.93/examples/first.swift 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/examples/first.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,10 +0,0 @@ -type messagefile; - -app (messagefile t) greeting() { - echo "Hello, world!" stdout=@filename(t); -} - -messagefile outfile <"hello.txt">; - -outfile = greeting(); - Deleted: branches/release-0.93/examples/fixedarray.swift =================================================================== --- branches/release-0.93/examples/fixedarray.swift 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/examples/fixedarray.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,19 +0,0 @@ -type messagefile {} -type countfile {} - -(countfile t) countwords (messagefile f) { - app { - wc "-w" @filename(f) stdout=@filename(t); - } -} - -string inputNames = "one.txt two.txt three.txt"; -string outputNames = "one.count two.count three.count"; - -messagefile inputfiles[] ; -countfile outputfiles[] ; - -outputfiles[0] = countwords(inputfiles[0]); -outputfiles[1] = countwords(inputfiles[1]); -outputfiles[2] = countwords(inputfiles[2]); - Deleted: branches/release-0.93/examples/foreach.swift =================================================================== --- branches/release-0.93/examples/foreach.swift 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/examples/foreach.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,22 +0,0 @@ -type messagefile {} -type countfile {} - -(countfile t) countwords (messagefile f) { - app { - wc "-w" @filename(f) stdout=@filename(t); - } -} - -string inputNames = "one.txt two.txt three.txt"; - -messagefile inputfiles[] ; - - -foreach f in inputfiles { - countfile c; - c = countwords(f); -} - Deleted: branches/release-0.93/examples/hostsn.swift =================================================================== --- branches/release-0.93/examples/hostsn.swift 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/examples/hostsn.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,11 +0,0 @@ -type file; - -app (file o) hostname () -{ - hostname stdout=@o; -} - -file out[]; -foreach j in [1:@toint(@arg("n","1"))] { - out[j] = hostname(); -} Deleted: branches/release-0.93/examples/if.swift =================================================================== --- branches/release-0.93/examples/if.swift 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/examples/if.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,18 +0,0 @@ -type messagefile {} - -(messagefile t) greeting (string s) { - app { - echo s stdout=@filename(t); - } -} - -messagefile outfile <"hello20.txt">; - -boolean morning = true; - -if(morning) { - outfile = greeting("good morning"); -} else { - outfile = greeting("good afternoon"); -} - Deleted: branches/release-0.93/examples/iterate.swift =================================================================== --- branches/release-0.93/examples/iterate.swift 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/examples/iterate.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,18 +0,0 @@ -type counterfile; - -app (counterfile t) echo(string m) { - echo m stdout=@filename(t); -} - -app (counterfile t) countstep(counterfile i) { - wcl @filename(i) @filename(t); -} - -counterfile a[] ; - -a[0] = echo("793578934574893"); - -iterate v { - a[v+1] = countstep(a[v]); - trace("extract int value ", at extractint(a[v+1])); -} until (@extractint(a[v+1]) <= 1); Deleted: branches/release-0.93/examples/manyparam.swift =================================================================== --- branches/release-0.93/examples/manyparam.swift 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/examples/manyparam.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,13 +0,0 @@ -type messagefile; - -app (messagefile t) greeting (string s) { - echo s stdout=@filename(t); -} - -messagefile english <"english.txt">; -messagefile french <"francais.txt">; -english = greeting("hello"); -french = greeting("bonjour"); - -messagefile japanese <"nihongo.txt">; -japanese = greeting("konnichiwa"); Copied: branches/release-0.93/examples/misc/array_index.swift (from rev 4829, branches/release-0.93/examples/array_index.swift) =================================================================== --- branches/release-0.93/examples/misc/array_index.swift (rev 0) +++ branches/release-0.93/examples/misc/array_index.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1,8 @@ +type file; + +app (file t) echo_array (string s[]) { + echo s[0] s[1] s[2] stdout=@filename(t); +} + +string greetings[] = ["how","are","you"]; +file hw = echo_array(greetings); Copied: branches/release-0.93/examples/misc/array_wildcard.swift (from rev 4829, branches/release-0.93/examples/array_wildcard.swift) =================================================================== --- branches/release-0.93/examples/misc/array_wildcard.swift (rev 0) +++ branches/release-0.93/examples/misc/array_wildcard.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1,8 @@ +type file; + +app (file t) echo_wildcard (string s[]) { + echo s[*] stdout=@filename(t); +} + +string greetings[] = ["how","are","you"]; +file hw = echo_wildcard(greetings); Copied: branches/release-0.93/examples/misc/catsn.swift (from rev 4829, branches/release-0.93/examples/catsn.swift) =================================================================== --- branches/release-0.93/examples/misc/catsn.swift (rev 0) +++ branches/release-0.93/examples/misc/catsn.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1,15 @@ +type file; + +app (file o) cat (file i) +{ + cat @i stdout=@o; +} + +string t = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; +string char[] = @strsplit(t, ""); + +file out[]; +foreach j in [1:@toint(@arg("n","10"))] { + file data<"data.txt">; + out[j] = cat(data); +} Copied: branches/release-0.93/examples/misc/hostsn.swift (from rev 4829, branches/release-0.93/examples/hostsn.swift) =================================================================== --- branches/release-0.93/examples/misc/hostsn.swift (rev 0) +++ branches/release-0.93/examples/misc/hostsn.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1,11 @@ +type file; + +app (file o) hostname () +{ + hostname stdout=@o; +} + +file out[]; +foreach j in [1:@toint(@arg("n","1"))] { + out[j] = hostname(); +} Deleted: branches/release-0.93/examples/one.txt =================================================================== --- branches/release-0.93/examples/one.txt 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/examples/one.txt 2011-07-19 18:18:40 UTC (rev 4830) @@ -1 +0,0 @@ -this is one.txt Deleted: branches/release-0.93/examples/parameter.swift =================================================================== --- branches/release-0.93/examples/parameter.swift 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/examples/parameter.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,10 +0,0 @@ -type messagefile; - -app (messagefile t) greeting (string s) { - echo s stdout=@filename(t); -} - -messagefile outfile <"hello2.txt">; - -outfile = greeting("hello world"); - Deleted: branches/release-0.93/examples/q16.txt =================================================================== --- branches/release-0.93/examples/q16.txt 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/examples/q16.txt 2011-07-19 18:18:40 UTC (rev 4830) @@ -1 +0,0 @@ -foo bar Deleted: branches/release-0.93/examples/q21.swift =================================================================== --- branches/release-0.93/examples/q21.swift 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/examples/q21.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,14 +0,0 @@ -type messagefile {} - -(messagefile t) greeting (string s="hello") { - app { - echo s stdout=@filename(t); - } -} - -messagefile english <"english2.txt">; -messagefile french <"francais2.txt">; - -english = greeting(); -french = greeting(s="bonjour"); - Deleted: branches/release-0.93/examples/q3.swift =================================================================== --- branches/release-0.93/examples/q3.swift 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/examples/q3.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,10 +0,0 @@ -type file {} - -(file t) echo (string s = "default greeting") { - app { - echo s stdout=@filename(t); - } -} - -file hw = echo(); - Deleted: branches/release-0.93/examples/q5.swift =================================================================== --- branches/release-0.93/examples/q5.swift 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/examples/q5.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,12 +0,0 @@ -type messagefile; - -app (messagefile t) greeting (string s[]) { - echo s[0] s[1] s[2] stdout=@filename(t); -} - -messagefile outfile <"q5out.txt">; - -string words[] = ["how","are","you"]; - -outfile = greeting(words); - Deleted: branches/release-0.93/examples/q6.swift =================================================================== --- branches/release-0.93/examples/q6.swift 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/examples/q6.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,14 +0,0 @@ -type file {} - -(file t) echo (string s) { - app { - echo s stdout=@filename(t); - } -} - -string greetings[] = ["how","are","you"]; - -foreach g in greetings { - file hw = echo(g); -} - Deleted: branches/release-0.93/examples/q7.swift =================================================================== --- branches/release-0.93/examples/q7.swift 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/examples/q7.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,16 +0,0 @@ -type file {} - -(file t) echo (string s) { - app { - echo s stdout=@filename(t); - } -} - -string outputNames = "one two three"; - -file outputFiles[] ; - -foreach f in outputFiles { - f = echo("hello"); -} - Deleted: branches/release-0.93/examples/regexp.swift =================================================================== --- branches/release-0.93/examples/regexp.swift 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/examples/regexp.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,18 +0,0 @@ -type messagefile {} -type countfile {} - -(countfile t) countwords (messagefile f) { - app { - wc "-w" @filename(f) stdout=@filename(t); - } -} - -messagefile inputfile <"q16.txt">; - -countfile c ; - -c = countwords(inputfile); - Deleted: branches/release-0.93/examples/restart.swift =================================================================== --- branches/release-0.93/examples/restart.swift 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/examples/restart.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,24 +0,0 @@ -type file; - -app (file f) touch() { - touch @f; -} - -app (file f) processL(file inp) { - echo "processL" stdout=@f; -} - -app (file f) processR(file inp) { - broken "process" stdout=@f; -} - -app (file f) join(file left, file right) { - echo "join" @left @right stdout=@f; -} - -file f = touch(); - -file g = processL(f); -file h = processR(f); - -file i = join(g,h); Deleted: branches/release-0.93/examples/second_procedure.swift =================================================================== --- branches/release-0.93/examples/second_procedure.swift 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/examples/second_procedure.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,16 +0,0 @@ -type messagefile; - -app (messagefile t) greeting (string s) { - echo s stdout=@filename(t); -} - -app (messagefile o) capitalise(messagefile i) { - tr "[a-z]" "[A-Z]" stdin=@filename(i) stdout=@filename(o); -} - -messagefile hellofile <"hello.txt">; -messagefile final <"capitals.txt">; - -hellofile = greeting("hello from Swift"); -final = capitalise(hellofile); - Deleted: branches/release-0.93/examples/three.txt =================================================================== --- branches/release-0.93/examples/three.txt 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/examples/three.txt 2011-07-19 18:18:40 UTC (rev 4830) @@ -1 +0,0 @@ -three Added: branches/release-0.93/examples/tutorial/MyFirstMapper.java =================================================================== --- branches/release-0.93/examples/tutorial/MyFirstMapper.java (rev 0) +++ branches/release-0.93/examples/tutorial/MyFirstMapper.java 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1,33 @@ +package tutorial; + +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; + +import org.griphyn.vdl.mapping.AbsFile; +import org.griphyn.vdl.mapping.AbstractMapper; +import org.griphyn.vdl.mapping.Path; +import org.griphyn.vdl.mapping.PhysicalFormat; + +public class MyFirstMapper extends AbstractMapper { + + AbsFile myfile = new AbsFile("myfile.txt"); + + public boolean isStatic() { + return false; + } + + public Collection existing() { + if (myfile.exists()) + return Arrays.asList(new Path[] {Path.EMPTY_PATH}); + else + return Collections.EMPTY_LIST; + } + + public PhysicalFormat map(Path p) { + if(p.equals(Path.EMPTY_PATH)) + return myfile; + else + return null; + } +} Copied: branches/release-0.93/examples/tutorial/arrays.swift (from rev 4829, branches/release-0.93/examples/q5.swift) =================================================================== --- branches/release-0.93/examples/tutorial/arrays.swift (rev 0) +++ branches/release-0.93/examples/tutorial/arrays.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1,12 @@ +type messagefile; + +app (messagefile t) greeting (string s[]) { + echo s[0] s[1] s[2] stdout=@filename(t); +} + +messagefile outfile <"arrays.txt">; + +string words[] = ["how","are","you"]; + +outfile = greeting(words); + Copied: branches/release-0.93/examples/tutorial/capitalise.swift (from rev 4829, branches/release-0.93/examples/second_procedure.swift) =================================================================== --- branches/release-0.93/examples/tutorial/capitalise.swift (rev 0) +++ branches/release-0.93/examples/tutorial/capitalise.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1,14 @@ +type messagefile; + +app (messagefile t) greeting (string s) { + echo s stdout=@filename(t); +} + +app (messagefile o) capitalise(messagefile i) { + tr "[a-z]" "[A-Z]" stdin=@filename(i) stdout=@filename(o); +} + +messagefile hellofile <"capitalise.1.txt">; +messagefile final <"capitalise.2.txt">; +hellofile = greeting("hello from Swift"); +final = capitalise(hellofile); Added: branches/release-0.93/examples/tutorial/capitalise_anonymous.swift =================================================================== --- branches/release-0.93/examples/tutorial/capitalise_anonymous.swift (rev 0) +++ branches/release-0.93/examples/tutorial/capitalise_anonymous.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1,14 @@ +type messagefile; + +app (messagefile t) greeting (string s) { + echo s stdout=@filename(t); +} + +app (messagefile o) capitalise(messagefile i) { + tr "[a-z]" "[A-Z]" stdin=@filename(i) stdout=@filename(o); +} + +messagefile hellofile; +messagefile final <"capitalise_anonymous.txt">; +hellofile = greeting("hello from Swift"); +final = capitalise(hellofile); Copied: branches/release-0.93/examples/tutorial/default.swift (from rev 4829, branches/release-0.93/examples/default.swift) =================================================================== --- branches/release-0.93/examples/tutorial/default.swift (rev 0) +++ branches/release-0.93/examples/tutorial/default.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1,15 @@ +type file; + +// s has a default value +app (file t) echo (string s="hello world") { + echo s stdout=@filename(t); +} + +file hw1<"default.1.txt">; +file hw2<"default.2.txt">; + +// procedure call using the default value +hw1 = echo(); + +// using a different value +hw2 = echo(s="hello again"); Added: branches/release-0.93/examples/tutorial/fixed_array_mapper.1.txt =================================================================== --- branches/release-0.93/examples/tutorial/fixed_array_mapper.1.txt (rev 0) +++ branches/release-0.93/examples/tutorial/fixed_array_mapper.1.txt 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1 @@ +one Added: branches/release-0.93/examples/tutorial/fixed_array_mapper.2.txt =================================================================== --- branches/release-0.93/examples/tutorial/fixed_array_mapper.2.txt (rev 0) +++ branches/release-0.93/examples/tutorial/fixed_array_mapper.2.txt 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1 @@ +two words Added: branches/release-0.93/examples/tutorial/fixed_array_mapper.3.txt =================================================================== --- branches/release-0.93/examples/tutorial/fixed_array_mapper.3.txt (rev 0) +++ branches/release-0.93/examples/tutorial/fixed_array_mapper.3.txt 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1 @@ +three words now Copied: branches/release-0.93/examples/tutorial/fixed_array_mapper.swift (from rev 4829, branches/release-0.93/examples/fixedarray.swift) =================================================================== --- branches/release-0.93/examples/tutorial/fixed_array_mapper.swift (rev 0) +++ branches/release-0.93/examples/tutorial/fixed_array_mapper.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1,16 @@ +type messagefile; +type countfile; + +app (countfile t) countwords (messagefile f) { + wc "-w" @filename(f) stdout=@filename(t); +} + +string inputNames = "fixed_array_mapper.1.txt fixed_array_mapper.2.txt fixed_array_mapper.3.txt"; +string outputNames = "fixed_array_mapper.1.count fixed_array_mapper.2.count fixed_array_mapper.3.count"; + +messagefile inputfiles[] ; +countfile outputfiles[] ; + +outputfiles[0] = countwords(inputfiles[0]); +outputfiles[1] = countwords(inputfiles[1]); +outputfiles[2] = countwords(inputfiles[2]); Added: branches/release-0.93/examples/tutorial/foreach.1.txt =================================================================== --- branches/release-0.93/examples/tutorial/foreach.1.txt (rev 0) +++ branches/release-0.93/examples/tutorial/foreach.1.txt 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1 @@ +one Added: branches/release-0.93/examples/tutorial/foreach.2.txt =================================================================== --- branches/release-0.93/examples/tutorial/foreach.2.txt (rev 0) +++ branches/release-0.93/examples/tutorial/foreach.2.txt 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1 @@ +two words Added: branches/release-0.93/examples/tutorial/foreach.3.txt =================================================================== --- branches/release-0.93/examples/tutorial/foreach.3.txt (rev 0) +++ branches/release-0.93/examples/tutorial/foreach.3.txt 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1 @@ +three words now Copied: branches/release-0.93/examples/tutorial/foreach.swift (from rev 4829, branches/release-0.93/examples/foreach.swift) =================================================================== --- branches/release-0.93/examples/tutorial/foreach.swift (rev 0) +++ branches/release-0.93/examples/tutorial/foreach.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1,18 @@ +type messagefile; +type countfile; + +app (countfile t) countwords (messagefile f) { + wc "-w" @filename(f) stdout=@filename(t); +} + +string inputNames = "foreach.1.txt foreach.2.txt foreach.3.txt"; + +messagefile inputfiles[] ; + +foreach f in inputfiles { + countfile c; + c = countwords(f); +} Copied: branches/release-0.93/examples/tutorial/hello.swift (from rev 4829, branches/release-0.93/examples/first.swift) =================================================================== --- branches/release-0.93/examples/tutorial/hello.swift (rev 0) +++ branches/release-0.93/examples/tutorial/hello.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1,10 @@ +type messagefile; + +app (messagefile t) greeting() { + echo "Hello, world!" stdout=@filename(t); +} + +messagefile outfile <"hello.txt">; + +outfile = greeting(); + Copied: branches/release-0.93/examples/tutorial/if.swift (from rev 4829, branches/release-0.93/examples/if.swift) =================================================================== --- branches/release-0.93/examples/tutorial/if.swift (rev 0) +++ branches/release-0.93/examples/tutorial/if.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1,16 @@ +type messagefile; + +app (messagefile t) greeting (string s) { + echo s stdout=@filename(t); +} + +messagefile outfile <"if.txt">; + +boolean morning = true; + +if(morning) { + outfile = greeting("good morning"); +} else { + outfile = greeting("good afternoon"); +} + Copied: branches/release-0.93/examples/tutorial/manyparam.swift (from rev 4829, branches/release-0.93/examples/manyparam.swift) =================================================================== --- branches/release-0.93/examples/tutorial/manyparam.swift (rev 0) +++ branches/release-0.93/examples/tutorial/manyparam.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1,13 @@ +type messagefile; + +app (messagefile t) greeting (string s) { + echo s stdout=@filename(t); +} + +messagefile english <"manyparam.english.txt">; +messagefile french <"manyparam.french.txt">; +messagefile japanese <"manyparam.japanese.txt">; + +english = greeting("hello"); +french = greeting("bonjour"); +japanese = greeting("konnichiwa"); Added: branches/release-0.93/examples/tutorial/my_first_mapper.swift =================================================================== --- branches/release-0.93/examples/tutorial/my_first_mapper.swift (rev 0) +++ branches/release-0.93/examples/tutorial/my_first_mapper.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1,9 @@ +type messagefile; + +app (messagefile t) greeting() { + echo "hello" stdout=@filename(t); +} + +messagefile outfile ; + +outfile = greeting(); Copied: branches/release-0.93/examples/tutorial/one.txt (from rev 4829, branches/release-0.93/examples/one.txt) =================================================================== --- branches/release-0.93/examples/tutorial/one.txt (rev 0) +++ branches/release-0.93/examples/tutorial/one.txt 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1 @@ +one Copied: branches/release-0.93/examples/tutorial/parameter.swift (from rev 4829, branches/release-0.93/examples/parameter.swift) =================================================================== --- branches/release-0.93/examples/tutorial/parameter.swift (rev 0) +++ branches/release-0.93/examples/tutorial/parameter.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1,8 @@ +type messagefile; + +app (messagefile t) greeting (string s) { + echo s stdout=@filename(t); +} + +messagefile outfile <"parameter.hello.txt">; +outfile = greeting("hello world"); Copied: branches/release-0.93/examples/tutorial/regexp_mapper.swift (from rev 4829, branches/release-0.93/examples/regexp.swift) =================================================================== --- branches/release-0.93/examples/tutorial/regexp_mapper.swift (rev 0) +++ branches/release-0.93/examples/tutorial/regexp_mapper.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1,16 @@ +type messagefile; +type countfile; + +app (countfile t) countwords (messagefile f) { + wc "-w" @filename(f) stdout=@filename(t); +} + +messagefile inputfile <"regexp_mapper.words.txt">; + +countfile c ; + +c = countwords(inputfile); + Added: branches/release-0.93/examples/tutorial/regexp_mapper.words.txt =================================================================== --- branches/release-0.93/examples/tutorial/regexp_mapper.words.txt (rev 0) +++ branches/release-0.93/examples/tutorial/regexp_mapper.words.txt 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1 @@ +Testing is so much fun! Copied: branches/release-0.93/examples/tutorial/restart.swift (from rev 4829, branches/release-0.93/examples/restart.swift) =================================================================== --- branches/release-0.93/examples/tutorial/restart.swift (rev 0) +++ branches/release-0.93/examples/tutorial/restart.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1,24 @@ +type file; + +app (file f) touch() { + touch @f; +} + +app (file f) processL(file inp) { + echo "processL" stdout=@f; +} + +app (file f) processR(file inp) { + broken "process" stdout=@f; +} + +app (file f) join(file left, file right) { + echo "join" @left @right stdout=@f; +} + +file f = touch(); + +file g = processL(f); +file h = processR(f); + +file i = join(g,h); Copied: branches/release-0.93/examples/tutorial/sequential_iteration.swift (from rev 4829, branches/release-0.93/examples/iterate.swift) =================================================================== --- branches/release-0.93/examples/tutorial/sequential_iteration.swift (rev 0) +++ branches/release-0.93/examples/tutorial/sequential_iteration.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1,18 @@ +type counterfile; + +app (counterfile t) echo(string m) { + echo m stdout=@filename(t); +} + +app (counterfile t) countstep(counterfile i) { + wcl @filename(i) @filename(t); +} + +counterfile a[] ; + +a[0] = echo("793578934574893"); + +iterate v { + a[v+1] = countstep(a[v]); + trace("extract int value ", at extractint(a[v+1])); +} until (@extractint(a[v+1]) <= 1); Copied: branches/release-0.93/examples/tutorial/three.txt (from rev 4829, branches/release-0.93/examples/three.txt) =================================================================== --- branches/release-0.93/examples/tutorial/three.txt (rev 0) +++ branches/release-0.93/examples/tutorial/three.txt 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1 @@ +three words now Copied: branches/release-0.93/examples/tutorial/two.txt (from rev 4829, branches/release-0.93/examples/two.txt) =================================================================== --- branches/release-0.93/examples/tutorial/two.txt (rev 0) +++ branches/release-0.93/examples/tutorial/two.txt 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1 @@ +two words Copied: branches/release-0.93/examples/tutorial/types.swift (from rev 4829, branches/release-0.93/examples/types.swift) =================================================================== --- branches/release-0.93/examples/tutorial/types.swift (rev 0) +++ branches/release-0.93/examples/tutorial/types.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1,20 @@ +type messagefile; + +type details { + string name; + int pies; +} + +app (messagefile t) greeting (details d) { + echo "Hello. Your name is" d.name "and you have eaten" d.pies "pies." stdout=@filename(t); +} + +details person; + +person.name = "John"; +person.pies = 3; + +messagefile outfile <"types.pies.txt">; + +outfile = greeting(person); + Copied: branches/release-0.93/examples/tutorial/wcl (from rev 4829, branches/release-0.93/examples/wcl) =================================================================== --- branches/release-0.93/examples/tutorial/wcl (rev 0) +++ branches/release-0.93/examples/tutorial/wcl 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1,3 @@ +#!/bin/bash +echo -n $(wc -c < $1) > $2 + Copied: branches/release-0.93/examples/tutorial/words.txt (from rev 4829, branches/release-0.93/examples/q16.txt) =================================================================== --- branches/release-0.93/examples/tutorial/words.txt (rev 0) +++ branches/release-0.93/examples/tutorial/words.txt 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1 @@ +Hello world, this is a test Deleted: branches/release-0.93/examples/two.txt =================================================================== --- branches/release-0.93/examples/two.txt 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/examples/two.txt 2011-07-19 18:18:40 UTC (rev 4830) @@ -1 +0,0 @@ -a second file Deleted: branches/release-0.93/examples/types.swift =================================================================== --- branches/release-0.93/examples/types.swift 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/examples/types.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,20 +0,0 @@ -type messagefile; - -type details { - string name; - int pies; -} - -app (messagefile t) greeting (details d) { - echo "Hello. Your name is" d.name "and you have eaten" d.pies "pies." stdout=@filename(t); -} - -details person; - -person.name = "John"; -person.pies = 3; - -messagefile outfile <"q15.txt">; - -outfile = greeting(person); - Deleted: branches/release-0.93/examples/wcl =================================================================== --- branches/release-0.93/examples/wcl 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/examples/wcl 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,3 +0,0 @@ -#!/bin/bash -echo -n $(wc -c < $1) > $2 - Deleted: branches/release-0.93/tests/documentation/3-1_hello_world.check.sh =================================================================== --- branches/release-0.93/tests/documentation/3-1_hello_world.check.sh 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/tests/documentation/3-1_hello_world.check.sh 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,5 +0,0 @@ -#!/bin/bash -set -x -grep 'Hello, world!' hello.txt || exit 1 - -exit 0 Deleted: branches/release-0.93/tests/documentation/3-1_hello_world.clean.sh =================================================================== --- branches/release-0.93/tests/documentation/3-1_hello_world.clean.sh 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/tests/documentation/3-1_hello_world.clean.sh 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,4 +0,0 @@ -#!/bin/bash -set -x -rm -rf 3-1_hello_world-* 3-1_hello_world.kml 3-1_hello_world.xml hello.txt || exit 1 -exit 0 Deleted: branches/release-0.93/tests/documentation/3-1_hello_world.swift =================================================================== --- branches/release-0.93/tests/documentation/3-1_hello_world.swift 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/tests/documentation/3-1_hello_world.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,8 +0,0 @@ -type messagefile; - -app (messagefile t) greeting() { - echo "Hello, world!" stdout=@filename(t); -} - -messagefile outfile <"hello.txt">; -outfile = greeting(); Deleted: branches/release-0.93/tests/documentation/4-1-2_many_parameters.check.sh =================================================================== --- branches/release-0.93/tests/documentation/4-1-2_many_parameters.check.sh 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/tests/documentation/4-1-2_many_parameters.check.sh 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,5 +0,0 @@ -#!/bin/bash -set -x -grep 'hello' english.txt | grep 'bonjour' francais.txt | grep 'konnichiwa' nihongo.txt || exit 1 - -exit 0 Deleted: branches/release-0.93/tests/documentation/4-1-2_many_parameters.clean.sh =================================================================== --- branches/release-0.93/tests/documentation/4-1-2_many_parameters.clean.sh 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/tests/documentation/4-1-2_many_parameters.clean.sh 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,4 +0,0 @@ -#!/bin/bash -set -x -rm -rf 4-1-2_many_parameters-* 4-1-2_many_parameters.kml 4-1-2_many_parameters.xml english.txt francais.txt nihongo.txt|| exit 1 -exit 0 Deleted: branches/release-0.93/tests/documentation/4-1-2_many_parameters.swift =================================================================== --- branches/release-0.93/tests/documentation/4-1-2_many_parameters.swift 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/tests/documentation/4-1-2_many_parameters.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,14 +0,0 @@ -type messagefile; - -app (messagefile t) greeting (string s) { - echo s stdout=@filename(t); -} - -messagefile english <"english.txt">; -messagefile french <"francais.txt">; -english = greeting("hello"); -french = greeting("bonjour"); - -messagefile japanese <"nihongo.txt">; -japanese = greeting("konnichiwa"); - Deleted: branches/release-0.93/tests/documentation/4-1_parameter.check.sh =================================================================== --- branches/release-0.93/tests/documentation/4-1_parameter.check.sh 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/tests/documentation/4-1_parameter.check.sh 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,4 +0,0 @@ -#!/bin/bash -set -x -grep 'hello world' hello2.txt || exit 1 -exit 0 Deleted: branches/release-0.93/tests/documentation/4-1_parameter.clean.sh =================================================================== --- branches/release-0.93/tests/documentation/4-1_parameter.clean.sh 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/tests/documentation/4-1_parameter.clean.sh 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,4 +0,0 @@ -#!/bin/bash -set -x -rm -rf 4-1_parameter-* 4-1_parameter.kml 4-1_parameter.xml hello2.txt || exit 1 -exit 0 Deleted: branches/release-0.93/tests/documentation/4-1_parameter.swift =================================================================== --- branches/release-0.93/tests/documentation/4-1_parameter.swift 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/tests/documentation/4-1_parameter.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,9 +0,0 @@ -type messagefile; - -app (messagefile t) greeting (string s) { - echo s stdout=@filename(t); -} - -messagefile outfile <"hello2.txt">; - -outfile = greeting("hello world"); Deleted: branches/release-0.93/tests/documentation/4-2_adding_another_application.check.sh =================================================================== --- branches/release-0.93/tests/documentation/4-2_adding_another_application.check.sh 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/tests/documentation/4-2_adding_another_application.check.sh 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,5 +0,0 @@ -#!/bin/bash -set -x -grep 'hello from Swift' hello.txt | grep 'HELLO FROM SWIFT' capitals.txt || exit 1 - -exit 0 Deleted: branches/release-0.93/tests/documentation/4-2_adding_another_application.clean.sh =================================================================== --- branches/release-0.93/tests/documentation/4-2_adding_another_application.clean.sh 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/tests/documentation/4-2_adding_another_application.clean.sh 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,4 +0,0 @@ -#!/bin/bash -set -x -rm -rf 4-2_adding_another_application-* 4-2_adding_another_application.kml 4-2_adding_another_application.xml hello.txt capitals.txt|| exit 1 -exit 0 Deleted: branches/release-0.93/tests/documentation/4-2_adding_another_application.swift =================================================================== --- branches/release-0.93/tests/documentation/4-2_adding_another_application.swift 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/tests/documentation/4-2_adding_another_application.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,14 +0,0 @@ -type messagefile; - -app (messagefile t) greeting(string s) { - echo s stdout=@filename(t); -} -app (messagefile o) capitalise(messagefile i) { - tr "[a-z]" "[A-Z]" stdin=@filename(i) stdout=@filename(o); -} - -messagefile hellofile <"hello.txt">; -messagefile final <"capitals.txt">; - -hellofile = greeting("hello from Swift"); -final = capitalise(hellofile); Deleted: branches/release-0.93/tests/documentation/4-4_datatypes.check.sh =================================================================== --- branches/release-0.93/tests/documentation/4-4_datatypes.check.sh 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/tests/documentation/4-4_datatypes.check.sh 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,4 +0,0 @@ -#!/bin/bash -set -x -grep 'Hello. Your name is John and you have eaten 3 pies.' q15.txt || exit 1 -exit 0 Deleted: branches/release-0.93/tests/documentation/4-4_datatypes.clean.sh =================================================================== --- branches/release-0.93/tests/documentation/4-4_datatypes.clean.sh 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/tests/documentation/4-4_datatypes.clean.sh 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,4 +0,0 @@ -#!/bin/bash -set -x -rm -rf 4-4_datatypes-* 4-4_datatypes.kml 4-4_datatypes.xml q15.txt || exit 1 -exit 0 Deleted: branches/release-0.93/tests/documentation/4-4_datatypes.swift =================================================================== --- branches/release-0.93/tests/documentation/4-4_datatypes.swift 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/tests/documentation/4-4_datatypes.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,19 +0,0 @@ -type messagefile; - -type details { - string name; - int pies; -} - -app (messagefile t) greeting (details d) { - echo "Hello. Your name is" d.name "and you have eaten" d.pies "pies." stdout=@filename(t); -} - -details person; - -person.name = "John"; -person.pies = 3; - -messagefile outfile <"q15.txt">; - -outfile = greeting(person); Deleted: branches/release-0.93/tests/documentation/4-5_arrays.check.sh =================================================================== --- branches/release-0.93/tests/documentation/4-5_arrays.check.sh 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/tests/documentation/4-5_arrays.check.sh 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,4 +0,0 @@ -#!/bin/bash -set -x -cat q5out.txt|grep 'how are you'|| exit 1 -exit 0 Deleted: branches/release-0.93/tests/documentation/4-5_arrays.clean.sh =================================================================== --- branches/release-0.93/tests/documentation/4-5_arrays.clean.sh 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/tests/documentation/4-5_arrays.clean.sh 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,4 +0,0 @@ -#!/bin/bash -set -x -rm -rf 4-5_arrays-* 4-5_arrays.kml 4-5_arrays.xml q5out.txt || exit 1 -exit 0 Deleted: branches/release-0.93/tests/documentation/4-5_arrays.swift =================================================================== --- branches/release-0.93/tests/documentation/4-5_arrays.swift 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/tests/documentation/4-5_arrays.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,11 +0,0 @@ -type messagefile; - -app (messagefile t) greeting (string s[]) { - echo s[0] s[1] s[2] stdout=@filename(t); -} - -messagefile outfile <"q5out.txt">; - -string words[] = ["how","are","you"]; - -outfile = greeting(words); Deleted: branches/release-0.93/tests/documentation/4-6-2_fixed_array_mapper.check.sh =================================================================== --- branches/release-0.93/tests/documentation/4-6-2_fixed_array_mapper.check.sh 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/tests/documentation/4-6-2_fixed_array_mapper.check.sh 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,6 +0,0 @@ -#!/bin/bash -set -x -cat one.count | grep '3 one.txt' || exit 1 -cat two.count | grep '3 two.txt' || exit 1 -cat three.count | grep '1 three.txt' || exit 1 -exit 0 Deleted: branches/release-0.93/tests/documentation/4-6-2_fixed_array_mapper.clean.sh =================================================================== --- branches/release-0.93/tests/documentation/4-6-2_fixed_array_mapper.clean.sh 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/tests/documentation/4-6-2_fixed_array_mapper.clean.sh 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,4 +0,0 @@ -#!/bin/bash -set -x -rm -rf 4-6-2_fixed_array_mapper-* 4-6-2_fixed_array_mapper.kml 4-6-2_fixed_array_mapper.xml one.count two.count three.count || exit 1 -exit 0 Deleted: branches/release-0.93/tests/documentation/4-6-2_fixed_array_mapper.setup.sh =================================================================== --- branches/release-0.93/tests/documentation/4-6-2_fixed_array_mapper.setup.sh 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/tests/documentation/4-6-2_fixed_array_mapper.setup.sh 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,4 +0,0 @@ -#!/bin/bash -set -x -cp -v $GROUP/one.txt $GROUP/two.txt $GROUP/three.txt .|| exit 1 -exit 0 Deleted: branches/release-0.93/tests/documentation/4-6-2_fixed_array_mapper.swift =================================================================== --- branches/release-0.93/tests/documentation/4-6-2_fixed_array_mapper.swift 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/tests/documentation/4-6-2_fixed_array_mapper.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,16 +0,0 @@ -type messagefile {} -type countfile {} - -app (countfile t) countwords (messagefile f) { - wc "-w" @filename(f) stdout=@filename(t); -} - -string inputNames = "one.txt two.txt three.txt"; -string outputNames = "one.count two.count three.count"; - -messagefile inputfiles[] ; -countfile outputfiles[] ; - -outputfiles[0] = countwords(inputfiles[0]); -outputfiles[1] = countwords(inputfiles[1]); -outputfiles[2] = countwords(inputfiles[2]); Deleted: branches/release-0.93/tests/documentation/4-7_foreach.check.sh =================================================================== --- branches/release-0.93/tests/documentation/4-7_foreach.check.sh 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/tests/documentation/4-7_foreach.check.sh 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,6 +0,0 @@ -#!/bin/bash -set -x -cat one.count | grep '3 one.txt' || exit 1 -cat two.count | grep '3 two.txt' || exit 1 -cat three.count | grep '1 three.txt' || exit 1 -exit 0 Deleted: branches/release-0.93/tests/documentation/4-7_foreach.clean.sh =================================================================== --- branches/release-0.93/tests/documentation/4-7_foreach.clean.sh 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/tests/documentation/4-7_foreach.clean.sh 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,4 +0,0 @@ -#!/bin/bash -set -x -rm -rf 4-7_foreach-* 4-7_foreach.kml 4-7_foreach.xml one.txt two.txt three.txt || exit 1 -exit 0 Deleted: branches/release-0.93/tests/documentation/4-7_foreach.swift =================================================================== --- branches/release-0.93/tests/documentation/4-7_foreach.swift 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/tests/documentation/4-7_foreach.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,18 +0,0 @@ -type messagefile {} -type countfile {} - -app (countfile t) countwords (messagefile f) { - wc "-w" @filename(f) stdout=@filename(t); -} - -string inputNames = "one.txt two.txt three.txt"; - -messagefile inputfiles[] ; - -foreach f in inputfiles { - countfile c; - c = countwords(f); -} Deleted: branches/release-0.93/tests/documentation/4-9_sequential_iteration.check.sh =================================================================== Deleted: branches/release-0.93/tests/documentation/4-9_sequential_iteration.clean.sh =================================================================== --- branches/release-0.93/tests/documentation/4-9_sequential_iteration.clean.sh 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/tests/documentation/4-9_sequential_iteration.clean.sh 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,4 +0,0 @@ -#!/bin/bash -set -x -rm -rf 4-9_sequential_iteration-* 4-9_sequential_iteration.kml 4-9_sequential_iteration.xml foldout* || exit 1 -exit 0 Deleted: branches/release-0.93/tests/documentation/4-9_sequential_iteration.swift =================================================================== --- branches/release-0.93/tests/documentation/4-9_sequential_iteration.swift 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/tests/documentation/4-9_sequential_iteration.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,18 +0,0 @@ -type counterfile; - -app (counterfile t) echo(string m) { - echo m stdout=@filename(t); -} - -app (counterfile t) countstep(counterfile i) { - wcl @filename(i) @filename(t); -} - -counterfile a[] ; - -a[0] = echo("793578934574893"); - -iterate v { - a[v+1] = countstep(a[v]); - trace("extract int value ", at extractint(a[v+1])); -} until (@extractint(a[v+1]) <= 1); Deleted: branches/release-0.93/tests/documentation/6-1_named_and_optional_params.check.sh =================================================================== --- branches/release-0.93/tests/documentation/6-1_named_and_optional_params.check.sh 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/tests/documentation/6-1_named_and_optional_params.check.sh 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,5 +0,0 @@ -#!/bin/bash -set -x -grep 'hello' english.txt | grep 'bonjour' french.txt || exit 1 - -exit 0 Deleted: branches/release-0.93/tests/documentation/6-1_named_and_optional_params.clean.sh =================================================================== --- branches/release-0.93/tests/documentation/6-1_named_and_optional_params.clean.sh 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/tests/documentation/6-1_named_and_optional_params.clean.sh 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,4 +0,0 @@ -#!/bin/bash -set -x -rm -rf 6-1_named_and_optional_params-* 6-1_named_and_optional_params.kml 6-1_named_and_optional_params.xml english.txt francais.txt|| exit 1 -exit 0 Deleted: branches/release-0.93/tests/documentation/6-1_named_and_optional_params.swift =================================================================== --- branches/release-0.93/tests/documentation/6-1_named_and_optional_params.swift 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/tests/documentation/6-1_named_and_optional_params.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,9 +0,0 @@ -type messagefile; -app (messagefile t) greeting (string s="hello") { - echo s stdout=@filename(t); -} -messagefile french <"french.txt">; -messagefile english <"english.txt">; - -french = greeting(s="bonjour"); -english = greeting(); Deleted: branches/release-0.93/tests/documentation/one.txt =================================================================== --- branches/release-0.93/tests/documentation/one.txt 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/tests/documentation/one.txt 2011-07-19 18:18:40 UTC (rev 4830) @@ -1 +0,0 @@ -this is one.txt Deleted: branches/release-0.93/tests/documentation/sites.template.xml =================================================================== --- branches/release-0.93/tests/documentation/sites.template.xml 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/tests/documentation/sites.template.xml 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,15 +0,0 @@ - - - - - 127.0.0.1 - 1000 - 10000 - 4 - 8 - 1000 - 1 - 4 - /tmp - - Deleted: branches/release-0.93/tests/documentation/swift.properties =================================================================== --- branches/release-0.93/tests/documentation/swift.properties 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/tests/documentation/swift.properties 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,7 +0,0 @@ -wrapperlog.always.transfer=true -sitedir.keep=true -execution.retries=0 -lazy.errors=false -status.mode=provider -use.provider.staging=false -provider.staging.pin.swiftfiles=false Deleted: branches/release-0.93/tests/documentation/tc.data =================================================================== --- branches/release-0.93/tests/documentation/tc.data 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/tests/documentation/tc.data 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,24 +0,0 @@ -#This is the transformation catalog. -# -#It comes pre-configured with a number of simple transformations with -#paths that are likely to work on a linux box. However, on some systems, -#the paths to these executables will be different (for example, sometimes -#some of these programs are found in /usr/bin rather than in /bin) -# -#NOTE WELL: fields in this file must be separated by tabs, not spaces; and -#there must be no trailing whitespace at the end of each line. -# -# sitename transformation path INSTALLED platform profiles -localhost echo /bin/echo INSTALLED INTEL32::LINUX null -localhost tr /usr/bin/tr INSTALLED INTEL32::LINUX null -localhost cat /bin/cat INSTALLED INTEL32::LINUX null -localhost ls /bin/ls INSTALLED INTEL32::LINUX null -localhost grep /bin/grep INSTALLED INTEL32::LINUX null -localhost sort /bin/sort INSTALLED INTEL32::LINUX null -localhost paste /bin/paste INSTALLED INTEL32::LINUX null -localhost cp /bin/cp INSTALLED INTEL32::LINUX null -localhost wc /usr/bin/wc INSTALLED INTEL32::LINUX null -localhost touch /bin/touch INSTALLED INTEL32::LINUX null -localhost sleep /bin/sleep INSTALLED INTEL32::LINUX null -localhost delayedcat /home/Alberto/Swift/cog/modules/swift/tests/language-behaviour/delayedcat.sh INSTALLED INTEL32::LINUX null -#localhost wcl /home/Alberto/My\ Shell\ Scripts/wcl.sh INSTALLED INTEL32::LINUX null Deleted: branches/release-0.93/tests/documentation/tc.template.data =================================================================== --- branches/release-0.93/tests/documentation/tc.template.data 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/tests/documentation/tc.template.data 2011-07-19 18:18:40 UTC (rev 4830) @@ -1,24 +0,0 @@ -#This is the transformation catalog. -# -#It comes pre-configured with a number of simple transformations with -#paths that are likely to work on a linux box. However, on some systems, -#the paths to these executables will be different (for example, sometimes -#some of these programs are found in /usr/bin rather than in /bin) -# -#NOTE WELL: fields in this file must be separated by tabs, not spaces; and -#there must be no trailing whitespace at the end of each line. -# -# sitename transformation path INSTALLED platform profiles -localhost echo /bin/echo INSTALLED INTEL32::LINUX null -localhost tr /usr/bin/tr INSTALLED INTEL32::LINUX null -localhost cat /bin/cat INSTALLED INTEL32::LINUX null -localhost ls /bin/ls INSTALLED INTEL32::LINUX null -localhost grep /bin/grep INSTALLED INTEL32::LINUX null -localhost sort /bin/sort INSTALLED INTEL32::LINUX null -localhost paste /bin/paste INSTALLED INTEL32::LINUX null -localhost cp /bin/cp INSTALLED INTEL32::LINUX null -localhost wc /usr/bin/wc INSTALLED INTEL32::LINUX null -localhost touch /bin/touch INSTALLED INTEL32::LINUX null -localhost sleep /bin/sleep INSTALLED INTEL32::LINUX null -localhost delayedcat /home/Alberto/Swift/cog/modules/swift/tests/language-behaviour/delayedcat.sh INSTALLED INTEL32::LINUX null -localhost wcl /usr/bin/wcl.sh INSTALLED INTEL32::LINUX null Deleted: branches/release-0.93/tests/documentation/three.txt =================================================================== --- branches/release-0.93/tests/documentation/three.txt 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/tests/documentation/three.txt 2011-07-19 18:18:40 UTC (rev 4830) @@ -1 +0,0 @@ -three Deleted: branches/release-0.93/tests/documentation/title.txt =================================================================== --- branches/release-0.93/tests/documentation/title.txt 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/tests/documentation/title.txt 2011-07-19 18:18:40 UTC (rev 4830) @@ -1 +0,0 @@ -Documentation Files Test Copied: branches/release-0.93/tests/documentation/tutorial/arrays.clean.sh (from rev 4829, branches/release-0.93/tests/documentation/4-5_arrays.clean.sh) =================================================================== --- branches/release-0.93/tests/documentation/tutorial/arrays.clean.sh (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/arrays.clean.sh 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1,4 @@ +#!/bin/bash +set -x +rm -rf arrays-* arrays.kml arrays.xml arrays.txt || exit 1 +exit 0 Added: branches/release-0.93/tests/documentation/tutorial/arrays.swift =================================================================== --- branches/release-0.93/tests/documentation/tutorial/arrays.swift (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/arrays.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1 @@ +link ../../../examples/tutorial/arrays.swift \ No newline at end of file Property changes on: branches/release-0.93/tests/documentation/tutorial/arrays.swift ___________________________________________________________________ Added: svn:special + * Added: branches/release-0.93/tests/documentation/tutorial/arrays.txt.expected =================================================================== --- branches/release-0.93/tests/documentation/tutorial/arrays.txt.expected (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/arrays.txt.expected 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1 @@ +how are you Added: branches/release-0.93/tests/documentation/tutorial/capitalise.1.txt.expected =================================================================== --- branches/release-0.93/tests/documentation/tutorial/capitalise.1.txt.expected (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/capitalise.1.txt.expected 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1 @@ +hello from Swift Added: branches/release-0.93/tests/documentation/tutorial/capitalise.2.txt.expected =================================================================== --- branches/release-0.93/tests/documentation/tutorial/capitalise.2.txt.expected (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/capitalise.2.txt.expected 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1 @@ +HELLO FROM SWIFT Copied: branches/release-0.93/tests/documentation/tutorial/capitalise.clean.sh (from rev 4829, branches/release-0.93/tests/documentation/4-2_adding_another_application.clean.sh) =================================================================== --- branches/release-0.93/tests/documentation/tutorial/capitalise.clean.sh (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/capitalise.clean.sh 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1,4 @@ +#!/bin/bash +set -x +rm -rf capitalise-* capitalise.kml capitalise.xml hello.txt capitals.txt|| exit 1 +exit 0 Added: branches/release-0.93/tests/documentation/tutorial/capitalise.swift =================================================================== --- branches/release-0.93/tests/documentation/tutorial/capitalise.swift (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/capitalise.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1 @@ +link ../../../examples/tutorial/capitalise.swift \ No newline at end of file Property changes on: branches/release-0.93/tests/documentation/tutorial/capitalise.swift ___________________________________________________________________ Added: svn:special + * Added: branches/release-0.93/tests/documentation/tutorial/capitalise_anonymous.clean.sh =================================================================== --- branches/release-0.93/tests/documentation/tutorial/capitalise_anonymous.clean.sh (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/capitalise_anonymous.clean.sh 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1,4 @@ +#!/bin/bash +set -x +rm -rf capitalise-* capitalise.kml capitalise.xml hello.txt capitals.txt|| exit 1 +exit 0 Property changes on: branches/release-0.93/tests/documentation/tutorial/capitalise_anonymous.clean.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.93/tests/documentation/tutorial/capitalise_anonymous.swift =================================================================== --- branches/release-0.93/tests/documentation/tutorial/capitalise_anonymous.swift (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/capitalise_anonymous.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1 @@ +link ../../../examples/tutorial/capitalise_anonymous.swift \ No newline at end of file Property changes on: branches/release-0.93/tests/documentation/tutorial/capitalise_anonymous.swift ___________________________________________________________________ Added: svn:special + * Added: branches/release-0.93/tests/documentation/tutorial/capitalise_anonymous.txt.expected =================================================================== --- branches/release-0.93/tests/documentation/tutorial/capitalise_anonymous.txt.expected (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/capitalise_anonymous.txt.expected 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1 @@ +HELLO FROM SWIFT Added: branches/release-0.93/tests/documentation/tutorial/default.1.txt.expected =================================================================== --- branches/release-0.93/tests/documentation/tutorial/default.1.txt.expected (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/default.1.txt.expected 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1 @@ +hello world Added: branches/release-0.93/tests/documentation/tutorial/default.2.txt.expected =================================================================== --- branches/release-0.93/tests/documentation/tutorial/default.2.txt.expected (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/default.2.txt.expected 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1 @@ +hello again Added: branches/release-0.93/tests/documentation/tutorial/default.clean.sh =================================================================== --- branches/release-0.93/tests/documentation/tutorial/default.clean.sh (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/default.clean.sh 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1,4 @@ +#!/bin/bash +set -x +rm -rf default-* default.kml default.xml hw1.txt hw2.txt hw1.txt hw2.txt || exit 1 +exit 0 Property changes on: branches/release-0.93/tests/documentation/tutorial/default.clean.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.93/tests/documentation/tutorial/default.swift =================================================================== --- branches/release-0.93/tests/documentation/tutorial/default.swift (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/default.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1 @@ +link ../../../examples/tutorial/default.swift \ No newline at end of file Property changes on: branches/release-0.93/tests/documentation/tutorial/default.swift ___________________________________________________________________ Added: svn:special + * Added: branches/release-0.93/tests/documentation/tutorial/fixed_array_mapper.1.count.expected =================================================================== --- branches/release-0.93/tests/documentation/tutorial/fixed_array_mapper.1.count.expected (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/fixed_array_mapper.1.count.expected 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1 @@ +1 fixed_array_mapper.1.txt Added: branches/release-0.93/tests/documentation/tutorial/fixed_array_mapper.2.count.expected =================================================================== --- branches/release-0.93/tests/documentation/tutorial/fixed_array_mapper.2.count.expected (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/fixed_array_mapper.2.count.expected 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1 @@ +2 fixed_array_mapper.2.txt Added: branches/release-0.93/tests/documentation/tutorial/fixed_array_mapper.3.count.expected =================================================================== --- branches/release-0.93/tests/documentation/tutorial/fixed_array_mapper.3.count.expected (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/fixed_array_mapper.3.count.expected 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1 @@ +3 fixed_array_mapper.3.txt Copied: branches/release-0.93/tests/documentation/tutorial/fixed_array_mapper.clean.sh (from rev 4829, branches/release-0.93/tests/documentation/4-6-2_fixed_array_mapper.clean.sh) =================================================================== --- branches/release-0.93/tests/documentation/tutorial/fixed_array_mapper.clean.sh (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/fixed_array_mapper.clean.sh 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1,4 @@ +#!/bin/bash +set -x +rm -rf fixed_array_mapper-* fixed_array_mapper.kml fixed_array_mapper.xml one.count two.count three.count one.txt two.txt three.txt || exit 1 +exit 0 Copied: branches/release-0.93/tests/documentation/tutorial/fixed_array_mapper.setup.sh (from rev 4829, branches/release-0.93/tests/documentation/4-6-2_fixed_array_mapper.setup.sh) =================================================================== --- branches/release-0.93/tests/documentation/tutorial/fixed_array_mapper.setup.sh (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/fixed_array_mapper.setup.sh 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1,6 @@ +#!/bin/bash +set -x +echo one > fixed_array_mapper.1.txt +echo two words > fixed_array_mapper.2.txt +echo three words now > fixed_array_mapper.3.txt +exit 0 Added: branches/release-0.93/tests/documentation/tutorial/fixed_array_mapper.swift =================================================================== --- branches/release-0.93/tests/documentation/tutorial/fixed_array_mapper.swift (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/fixed_array_mapper.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1 @@ +link ../../../examples/tutorial/fixed_array_mapper.swift \ No newline at end of file Property changes on: branches/release-0.93/tests/documentation/tutorial/fixed_array_mapper.swift ___________________________________________________________________ Added: svn:special + * Added: branches/release-0.93/tests/documentation/tutorial/foreach.1.count.expected =================================================================== --- branches/release-0.93/tests/documentation/tutorial/foreach.1.count.expected (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/foreach.1.count.expected 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1 @@ +1 foreach.1.txt Added: branches/release-0.93/tests/documentation/tutorial/foreach.2.count.expected =================================================================== --- branches/release-0.93/tests/documentation/tutorial/foreach.2.count.expected (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/foreach.2.count.expected 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1 @@ +2 foreach.2.txt Added: branches/release-0.93/tests/documentation/tutorial/foreach.3.count.expected =================================================================== --- branches/release-0.93/tests/documentation/tutorial/foreach.3.count.expected (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/foreach.3.count.expected 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1 @@ +3 foreach.3.txt Copied: branches/release-0.93/tests/documentation/tutorial/foreach.clean.sh (from rev 4829, branches/release-0.93/tests/documentation/4-7_foreach.clean.sh) =================================================================== --- branches/release-0.93/tests/documentation/tutorial/foreach.clean.sh (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/foreach.clean.sh 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1,4 @@ +#!/bin/bash +set -x +rm -rf foreach-* foreach.kml foreach.xml one.txt two.txt three.txt one.count two.count three.count || exit 1 +exit 0 Added: branches/release-0.93/tests/documentation/tutorial/foreach.setup.sh =================================================================== --- branches/release-0.93/tests/documentation/tutorial/foreach.setup.sh (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/foreach.setup.sh 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1,6 @@ +#!/bin/bash +set -x +echo one > foreach.1.txt +echo two words > foreach.2.txt +echo three words now > foreach.3.txt +exit 0 Property changes on: branches/release-0.93/tests/documentation/tutorial/foreach.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.93/tests/documentation/tutorial/foreach.swift =================================================================== --- branches/release-0.93/tests/documentation/tutorial/foreach.swift (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/foreach.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1 @@ +link ../../../examples/tutorial/foreach.swift \ No newline at end of file Property changes on: branches/release-0.93/tests/documentation/tutorial/foreach.swift ___________________________________________________________________ Added: svn:special + * Added: branches/release-0.93/tests/documentation/tutorial/hello.clean.sh =================================================================== --- branches/release-0.93/tests/documentation/tutorial/hello.clean.sh (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/hello.clean.sh 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1,4 @@ +#!/bin/bash +set -x +rm -rf hello-* parameter.kml parameter.xml hello.txt || exit 1 +exit 0 Property changes on: branches/release-0.93/tests/documentation/tutorial/hello.clean.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.93/tests/documentation/tutorial/hello.swift =================================================================== --- branches/release-0.93/tests/documentation/tutorial/hello.swift (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/hello.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1 @@ +link ../../../examples/tutorial/hello.swift \ No newline at end of file Property changes on: branches/release-0.93/tests/documentation/tutorial/hello.swift ___________________________________________________________________ Added: svn:special + * Added: branches/release-0.93/tests/documentation/tutorial/hello.txt.expected =================================================================== --- branches/release-0.93/tests/documentation/tutorial/hello.txt.expected (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/hello.txt.expected 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1 @@ +Hello, world! Added: branches/release-0.93/tests/documentation/tutorial/hello2.txt.expected =================================================================== --- branches/release-0.93/tests/documentation/tutorial/hello2.txt.expected (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/hello2.txt.expected 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1 @@ +hello world Added: branches/release-0.93/tests/documentation/tutorial/if.clean.sh =================================================================== --- branches/release-0.93/tests/documentation/tutorial/if.clean.sh (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/if.clean.sh 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1,4 @@ +#!/bin/bash +set -x +rm -rf if-* if.kml if.xml if.txt || exit 1 +exit 0 Property changes on: branches/release-0.93/tests/documentation/tutorial/if.clean.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.93/tests/documentation/tutorial/if.swift =================================================================== --- branches/release-0.93/tests/documentation/tutorial/if.swift (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/if.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1 @@ +link ../../../examples/tutorial/if.swift \ No newline at end of file Property changes on: branches/release-0.93/tests/documentation/tutorial/if.swift ___________________________________________________________________ Added: svn:special + * Added: branches/release-0.93/tests/documentation/tutorial/if.txt.expected =================================================================== --- branches/release-0.93/tests/documentation/tutorial/if.txt.expected (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/if.txt.expected 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1 @@ +good morning Copied: branches/release-0.93/tests/documentation/tutorial/manyparam.clean.sh (from rev 4829, branches/release-0.93/tests/documentation/4-1-2_many_parameters.clean.sh) =================================================================== --- branches/release-0.93/tests/documentation/tutorial/manyparam.clean.sh (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/manyparam.clean.sh 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1,4 @@ +#!/bin/bash +set -x +rm -rf manyparam-* manyparam.kml manyparam.xml english.txt francais.txt nihongo.txt|| exit 1 +exit 0 Added: branches/release-0.93/tests/documentation/tutorial/manyparam.english.txt.expected =================================================================== --- branches/release-0.93/tests/documentation/tutorial/manyparam.english.txt.expected (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/manyparam.english.txt.expected 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1 @@ +hello Added: branches/release-0.93/tests/documentation/tutorial/manyparam.french.txt.expected =================================================================== --- branches/release-0.93/tests/documentation/tutorial/manyparam.french.txt.expected (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/manyparam.french.txt.expected 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1 @@ +bonjour Added: branches/release-0.93/tests/documentation/tutorial/manyparam.japanese.txt.expected =================================================================== --- branches/release-0.93/tests/documentation/tutorial/manyparam.japanese.txt.expected (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/manyparam.japanese.txt.expected 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1 @@ +konnichiwa Added: branches/release-0.93/tests/documentation/tutorial/manyparam.swift =================================================================== --- branches/release-0.93/tests/documentation/tutorial/manyparam.swift (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/manyparam.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1 @@ +link ../../../examples/tutorial/manyparam.swift \ No newline at end of file Property changes on: branches/release-0.93/tests/documentation/tutorial/manyparam.swift ___________________________________________________________________ Added: svn:special + * Added: branches/release-0.93/tests/documentation/tutorial/parameter.clean.sh =================================================================== --- branches/release-0.93/tests/documentation/tutorial/parameter.clean.sh (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/parameter.clean.sh 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1,4 @@ +#!/bin/bash +set -x +rm -rf parameter-* parameter.kml parameter.xml hello2.txt || exit 1 +exit 0 Property changes on: branches/release-0.93/tests/documentation/tutorial/parameter.clean.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.93/tests/documentation/tutorial/parameter.hello.txt.expected =================================================================== --- branches/release-0.93/tests/documentation/tutorial/parameter.hello.txt.expected (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/parameter.hello.txt.expected 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1 @@ +hello world Added: branches/release-0.93/tests/documentation/tutorial/parameter.swift =================================================================== --- branches/release-0.93/tests/documentation/tutorial/parameter.swift (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/parameter.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1 @@ +link ../../../examples/tutorial/parameter.swift \ No newline at end of file Property changes on: branches/release-0.93/tests/documentation/tutorial/parameter.swift ___________________________________________________________________ Added: svn:special + * Added: branches/release-0.93/tests/documentation/tutorial/regexp_mapper.clean.sh =================================================================== --- branches/release-0.93/tests/documentation/tutorial/regexp_mapper.clean.sh (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/regexp_mapper.clean.sh 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1,4 @@ +#!/bin/bash +set -x +rm -rf regexp-* regexp.kml regexp.xml words.txt words.count || exit 1 +exit 0 Property changes on: branches/release-0.93/tests/documentation/tutorial/regexp_mapper.clean.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.93/tests/documentation/tutorial/regexp_mapper.setup.sh =================================================================== --- branches/release-0.93/tests/documentation/tutorial/regexp_mapper.setup.sh (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/regexp_mapper.setup.sh 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1,4 @@ +#!/bin/bash + +echo 'Testing is so much fun!' > regexp_mapper.words.txt + Property changes on: branches/release-0.93/tests/documentation/tutorial/regexp_mapper.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.93/tests/documentation/tutorial/regexp_mapper.swift =================================================================== --- branches/release-0.93/tests/documentation/tutorial/regexp_mapper.swift (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/regexp_mapper.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1 @@ +link ../../../examples/tutorial/regexp_mapper.swift \ No newline at end of file Property changes on: branches/release-0.93/tests/documentation/tutorial/regexp_mapper.swift ___________________________________________________________________ Added: svn:special + * Added: branches/release-0.93/tests/documentation/tutorial/regexp_mapper.words.count.expected =================================================================== --- branches/release-0.93/tests/documentation/tutorial/regexp_mapper.words.count.expected (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/regexp_mapper.words.count.expected 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1 @@ +5 regexp_mapper.words.txt Copied: branches/release-0.93/tests/documentation/tutorial/sequential_iteration.clean.sh (from rev 4829, branches/release-0.93/tests/documentation/4-9_sequential_iteration.clean.sh) =================================================================== --- branches/release-0.93/tests/documentation/tutorial/sequential_iteration.clean.sh (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/sequential_iteration.clean.sh 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1,4 @@ +#!/bin/bash +set -x +rm -rf sequential_iteration-* sequential_iteration.kml sequential_iteration.xml foldout* || exit 1 +exit 0 Added: branches/release-0.93/tests/documentation/tutorial/sequential_iteration.foldout0000.expected =================================================================== --- branches/release-0.93/tests/documentation/tutorial/sequential_iteration.foldout0000.expected (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/sequential_iteration.foldout0000.expected 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1 @@ +793578934574893 Added: branches/release-0.93/tests/documentation/tutorial/sequential_iteration.foldout0001.expected =================================================================== --- branches/release-0.93/tests/documentation/tutorial/sequential_iteration.foldout0001.expected (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/sequential_iteration.foldout0001.expected 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1 @@ +16 \ No newline at end of file Added: branches/release-0.93/tests/documentation/tutorial/sequential_iteration.foldout0002.expected =================================================================== --- branches/release-0.93/tests/documentation/tutorial/sequential_iteration.foldout0002.expected (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/sequential_iteration.foldout0002.expected 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1 @@ +2 \ No newline at end of file Added: branches/release-0.93/tests/documentation/tutorial/sequential_iteration.foldout0003.expected =================================================================== --- branches/release-0.93/tests/documentation/tutorial/sequential_iteration.foldout0003.expected (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/sequential_iteration.foldout0003.expected 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1 @@ +1 \ No newline at end of file Added: branches/release-0.93/tests/documentation/tutorial/sequential_iteration.setup.sh =================================================================== --- branches/release-0.93/tests/documentation/tutorial/sequential_iteration.setup.sh (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/sequential_iteration.setup.sh 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1,3 @@ +#!/bin/bash +echo 'echo -n $(wc -c < $1) > $2' > /tmp/wcl +chmod +x /tmp/wcl Property changes on: branches/release-0.93/tests/documentation/tutorial/sequential_iteration.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.93/tests/documentation/tutorial/sequential_iteration.swift =================================================================== --- branches/release-0.93/tests/documentation/tutorial/sequential_iteration.swift (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/sequential_iteration.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1 @@ +link ../../../examples/tutorial/sequential_iteration.swift \ No newline at end of file Property changes on: branches/release-0.93/tests/documentation/tutorial/sequential_iteration.swift ___________________________________________________________________ Added: svn:special + * Copied: branches/release-0.93/tests/documentation/tutorial/swift.properties (from rev 4829, branches/release-0.93/tests/documentation/swift.properties) =================================================================== --- branches/release-0.93/tests/documentation/tutorial/swift.properties (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/swift.properties 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1,7 @@ +wrapperlog.always.transfer=true +sitedir.keep=true +execution.retries=0 +lazy.errors=false +status.mode=provider +use.provider.staging=false +provider.staging.pin.swiftfiles=false Copied: branches/release-0.93/tests/documentation/tutorial/tc.template.data (from rev 4829, branches/release-0.93/tests/documentation/tc.template.data) =================================================================== --- branches/release-0.93/tests/documentation/tutorial/tc.template.data (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/tc.template.data 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1,24 @@ +#This is the transformation catalog. +# +#It comes pre-configured with a number of simple transformations with +#paths that are likely to work on a linux box. However, on some systems, +#the paths to these executables will be different (for example, sometimes +#some of these programs are found in /usr/bin rather than in /bin) +# +#NOTE WELL: fields in this file must be separated by tabs, not spaces; and +#there must be no trailing whitespace at the end of each line. +# +# sitename transformation path INSTALLED platform profiles +localhost echo /bin/echo INSTALLED INTEL32::LINUX null +localhost tr /usr/bin/tr INSTALLED INTEL32::LINUX null +localhost cat /bin/cat INSTALLED INTEL32::LINUX null +localhost ls /bin/ls INSTALLED INTEL32::LINUX null +localhost grep /bin/grep INSTALLED INTEL32::LINUX null +localhost sort /bin/sort INSTALLED INTEL32::LINUX null +localhost paste /bin/paste INSTALLED INTEL32::LINUX null +localhost cp /bin/cp INSTALLED INTEL32::LINUX null +localhost wc /usr/bin/wc INSTALLED INTEL32::LINUX null +localhost touch /bin/touch INSTALLED INTEL32::LINUX null +localhost sleep /bin/sleep INSTALLED INTEL32::LINUX null +localhost delayedcat /home/Alberto/Swift/cog/modules/swift/tests/language-behaviour/delayedcat.sh INSTALLED INTEL32::LINUX null +localhost wcl /tmp/wcl INSTALLED INTEL32::LINUX null Copied: branches/release-0.93/tests/documentation/tutorial/title.txt (from rev 4829, branches/release-0.93/tests/documentation/title.txt) =================================================================== --- branches/release-0.93/tests/documentation/tutorial/title.txt (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/title.txt 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1 @@ +Tutorial Scripts Copied: branches/release-0.93/tests/documentation/tutorial/types.clean.sh (from rev 4829, branches/release-0.93/tests/documentation/4-4_datatypes.clean.sh) =================================================================== --- branches/release-0.93/tests/documentation/tutorial/types.clean.sh (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/types.clean.sh 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1,4 @@ +#!/bin/bash +set -x +rm -rf types-* types.kml types.xml pies.txt || exit 1 +exit 0 Added: branches/release-0.93/tests/documentation/tutorial/types.pies.txt.expected =================================================================== --- branches/release-0.93/tests/documentation/tutorial/types.pies.txt.expected (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/types.pies.txt.expected 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1 @@ +Hello. Your name is John and you have eaten 3 pies. Added: branches/release-0.93/tests/documentation/tutorial/types.swift =================================================================== --- branches/release-0.93/tests/documentation/tutorial/types.swift (rev 0) +++ branches/release-0.93/tests/documentation/tutorial/types.swift 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1 @@ +link ../../../examples/tutorial/types.swift \ No newline at end of file Property changes on: branches/release-0.93/tests/documentation/tutorial/types.swift ___________________________________________________________________ Added: svn:special + * Deleted: branches/release-0.93/tests/documentation/two.txt =================================================================== --- branches/release-0.93/tests/documentation/two.txt 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/tests/documentation/two.txt 2011-07-19 18:18:40 UTC (rev 4830) @@ -1 +0,0 @@ -a second file Modified: branches/release-0.93/tests/groups/group-all-local.sh =================================================================== --- branches/release-0.93/tests/groups/group-all-local.sh 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/tests/groups/group-all-local.sh 2011-07-19 18:18:40 UTC (rev 4830) @@ -20,7 +20,7 @@ $TESTDIR/language-behaviour/procedures \ $TESTDIR/language-behaviour/strings \ $TESTDIR/language-behaviour/variables \ - $TESTDIR/documentation/ \ + $TESTDIR/documentation/tutorial \ # $TESTDIR/cdm/ps/pinned # $TESTDIR/site/intrepid ) Added: branches/release-0.93/tests/groups/group-documentation.sh =================================================================== --- branches/release-0.93/tests/groups/group-documentation.sh (rev 0) +++ branches/release-0.93/tests/groups/group-documentation.sh 2011-07-19 18:18:40 UTC (rev 4830) @@ -0,0 +1,8 @@ + +# GROUPLIST definition to run all local tests + +GROUPLIST=( + $TESTDIR/documentation/tutorial + ) + +checkvars WORK Modified: branches/release-0.93/tests/suite.sh =================================================================== --- branches/release-0.93/tests/suite.sh 2011-07-18 14:25:41 UTC (rev 4829) +++ branches/release-0.93/tests/suite.sh 2011-07-19 18:18:40 UTC (rev 4830) @@ -38,6 +38,9 @@ TOPDIR=`readlink -f $PWD/../../../..` CRTDIR=`pwd` +# Disable usage stats in test suite +export SWIFT_USAGE_STATS=0 + while [ $# -gt 0 ]; do case $1 in -a) @@ -764,7 +767,10 @@ diff $BNE $EXPECTED 2>&1 >> $OUTPUT if [ "$?" != "0" ]; then RESULT="Failed" - fi + echo Failed + else + echo OK + fi if [ "$RESULT" == "None" ]; then RESULT="Passed" fi @@ -814,7 +820,7 @@ grep THIS-SCRIPT-SHOULD-FAIL $SWIFTSCRIPT > /dev/null TEST_SHOULD_FAIL=$(( ! $? )) - monitored_exec $TIMEOUT swift \ + monitored_exec $TIMEOUT swift \ -wrapperlog.always.transfer true \ -sitedir.keep true \ -config swift.properties \ From davidk at ci.uchicago.edu Tue Jul 19 15:23:50 2011 From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu) Date: Tue, 19 Jul 2011 20:23:50 -0000 Subject: [Swift-commit] r4831 - in trunk: docs docs/siteguide docs/tutorial examples examples/misc examples/tutorial tests tests/documentation tests/documentation/tutorial tests/groups Message-ID: <20110719202341.7D7CC9CC7F@svn.ci.uchicago.edu> Author: davidk Date: 2011-07-19 15:23:41 -0500 (Tue, 19 Jul 2011) New Revision: 4831 Added: trunk/docs/print_link.sh trunk/docs/siteguide/ trunk/docs/siteguide/beagle trunk/docs/siteguide/futuregrid trunk/docs/siteguide/pads trunk/docs/siteguide/siteguide.html trunk/docs/siteguide/siteguide.txt trunk/docs/tutorial/abstract trunk/docs/tutorial/bits trunk/docs/tutorial/hello_world trunk/docs/tutorial/images/ trunk/docs/tutorial/introduction trunk/docs/tutorial/language_features trunk/docs/tutorial/runtime_features trunk/docs/tutorial/tutorial.html trunk/docs/tutorial/tutorial.txt trunk/examples/misc/ trunk/examples/misc/array_index.swift trunk/examples/misc/array_wildcard.swift trunk/examples/misc/catsn.swift trunk/examples/misc/hostsn.swift trunk/examples/tutorial/ trunk/examples/tutorial/MyFirstMapper.java trunk/examples/tutorial/arrays.swift trunk/examples/tutorial/capitalise.swift trunk/examples/tutorial/capitalise_anonymous.swift trunk/examples/tutorial/default.swift trunk/examples/tutorial/fixed_array_mapper.1.txt trunk/examples/tutorial/fixed_array_mapper.2.txt trunk/examples/tutorial/fixed_array_mapper.3.txt trunk/examples/tutorial/fixed_array_mapper.swift trunk/examples/tutorial/foreach.1.txt trunk/examples/tutorial/foreach.2.txt trunk/examples/tutorial/foreach.3.txt trunk/examples/tutorial/foreach.swift trunk/examples/tutorial/hello.swift trunk/examples/tutorial/if.swift trunk/examples/tutorial/manyparam.swift trunk/examples/tutorial/my_first_mapper.swift trunk/examples/tutorial/one.txt trunk/examples/tutorial/parameter.swift trunk/examples/tutorial/regexp_mapper.swift trunk/examples/tutorial/regexp_mapper.words.txt trunk/examples/tutorial/restart.swift trunk/examples/tutorial/sequential_iteration.swift trunk/examples/tutorial/three.txt trunk/examples/tutorial/two.txt trunk/examples/tutorial/types.swift trunk/examples/tutorial/wcl trunk/examples/tutorial/words.txt trunk/tests/documentation/tutorial/ trunk/tests/documentation/tutorial/arrays.clean.sh trunk/tests/documentation/tutorial/arrays.swift trunk/tests/documentation/tutorial/arrays.txt.expected trunk/tests/documentation/tutorial/capitalise.1.txt.expected trunk/tests/documentation/tutorial/capitalise.2.txt.expected trunk/tests/documentation/tutorial/capitalise.clean.sh trunk/tests/documentation/tutorial/capitalise.swift trunk/tests/documentation/tutorial/capitalise_anonymous.clean.sh trunk/tests/documentation/tutorial/capitalise_anonymous.swift trunk/tests/documentation/tutorial/capitalise_anonymous.txt.expected trunk/tests/documentation/tutorial/default.1.txt.expected trunk/tests/documentation/tutorial/default.2.txt.expected trunk/tests/documentation/tutorial/default.clean.sh trunk/tests/documentation/tutorial/default.swift trunk/tests/documentation/tutorial/fixed_array_mapper.1.count.expected trunk/tests/documentation/tutorial/fixed_array_mapper.2.count.expected trunk/tests/documentation/tutorial/fixed_array_mapper.3.count.expected trunk/tests/documentation/tutorial/fixed_array_mapper.clean.sh trunk/tests/documentation/tutorial/fixed_array_mapper.setup.sh trunk/tests/documentation/tutorial/fixed_array_mapper.swift trunk/tests/documentation/tutorial/foreach.1.count.expected trunk/tests/documentation/tutorial/foreach.2.count.expected trunk/tests/documentation/tutorial/foreach.3.count.expected trunk/tests/documentation/tutorial/foreach.clean.sh trunk/tests/documentation/tutorial/foreach.setup.sh trunk/tests/documentation/tutorial/foreach.swift trunk/tests/documentation/tutorial/hello.clean.sh trunk/tests/documentation/tutorial/hello.swift trunk/tests/documentation/tutorial/hello.txt.expected trunk/tests/documentation/tutorial/hello2.txt.expected trunk/tests/documentation/tutorial/if.clean.sh trunk/tests/documentation/tutorial/if.swift trunk/tests/documentation/tutorial/if.txt.expected trunk/tests/documentation/tutorial/manyparam.clean.sh trunk/tests/documentation/tutorial/manyparam.english.txt.expected trunk/tests/documentation/tutorial/manyparam.french.txt.expected trunk/tests/documentation/tutorial/manyparam.japanese.txt.expected trunk/tests/documentation/tutorial/manyparam.swift trunk/tests/documentation/tutorial/parameter.clean.sh trunk/tests/documentation/tutorial/parameter.hello.txt.expected trunk/tests/documentation/tutorial/parameter.swift trunk/tests/documentation/tutorial/regexp_mapper.clean.sh trunk/tests/documentation/tutorial/regexp_mapper.setup.sh trunk/tests/documentation/tutorial/regexp_mapper.swift trunk/tests/documentation/tutorial/regexp_mapper.words.count.expected trunk/tests/documentation/tutorial/sequential_iteration.clean.sh trunk/tests/documentation/tutorial/sequential_iteration.foldout0000.expected trunk/tests/documentation/tutorial/sequential_iteration.foldout0001.expected trunk/tests/documentation/tutorial/sequential_iteration.foldout0002.expected trunk/tests/documentation/tutorial/sequential_iteration.foldout0003.expected trunk/tests/documentation/tutorial/sequential_iteration.setup.sh trunk/tests/documentation/tutorial/sequential_iteration.swift trunk/tests/documentation/tutorial/swift.properties trunk/tests/documentation/tutorial/tc.template.data trunk/tests/documentation/tutorial/title.txt trunk/tests/documentation/tutorial/types.clean.sh trunk/tests/documentation/tutorial/types.pies.txt.expected trunk/tests/documentation/tutorial/types.swift trunk/tests/groups/group-documentation.sh Removed: trunk/docs/newuser-guide/ trunk/docs/tutorial/abstract trunk/docs/tutorial/bits trunk/docs/tutorial/hello_world trunk/docs/tutorial/images/ trunk/docs/tutorial/introduction trunk/docs/tutorial/language_features trunk/docs/tutorial/runtime_features trunk/docs/tutorial/tutorial.txt trunk/examples/anonymous.swift trunk/examples/array_index.swift trunk/examples/array_wildcard.swift trunk/examples/catsn.swift trunk/examples/default.swift trunk/examples/first.swift trunk/examples/fixedarray.swift trunk/examples/foreach.swift trunk/examples/hostsn.swift trunk/examples/if.swift trunk/examples/iterate.swift trunk/examples/manyparam.swift trunk/examples/one.txt trunk/examples/parameter.swift trunk/examples/q16.txt trunk/examples/q21.swift trunk/examples/q3.swift trunk/examples/q5.swift trunk/examples/q6.swift trunk/examples/q7.swift trunk/examples/regexp.swift trunk/examples/restart.swift trunk/examples/second_procedure.swift trunk/examples/three.txt trunk/examples/two.txt trunk/examples/types.swift trunk/examples/wcl trunk/tests/documentation/3-1_hello_world.check.sh trunk/tests/documentation/3-1_hello_world.clean.sh trunk/tests/documentation/3-1_hello_world.swift trunk/tests/documentation/4-1-2_many_parameters.check.sh trunk/tests/documentation/4-1-2_many_parameters.clean.sh trunk/tests/documentation/4-1-2_many_parameters.swift trunk/tests/documentation/4-1_parameter.check.sh trunk/tests/documentation/4-1_parameter.clean.sh trunk/tests/documentation/4-1_parameter.swift trunk/tests/documentation/4-2_adding_another_application.check.sh trunk/tests/documentation/4-2_adding_another_application.clean.sh trunk/tests/documentation/4-2_adding_another_application.swift trunk/tests/documentation/4-4_datatypes.check.sh trunk/tests/documentation/4-4_datatypes.clean.sh trunk/tests/documentation/4-4_datatypes.swift trunk/tests/documentation/4-5_arrays.check.sh trunk/tests/documentation/4-5_arrays.clean.sh trunk/tests/documentation/4-5_arrays.swift trunk/tests/documentation/4-6-2_fixed_array_mapper.check.sh trunk/tests/documentation/4-6-2_fixed_array_mapper.clean.sh trunk/tests/documentation/4-6-2_fixed_array_mapper.setup.sh trunk/tests/documentation/4-6-2_fixed_array_mapper.swift trunk/tests/documentation/4-7_foreach.check.sh trunk/tests/documentation/4-7_foreach.clean.sh trunk/tests/documentation/4-7_foreach.swift trunk/tests/documentation/4-9_sequential_iteration.check.sh trunk/tests/documentation/4-9_sequential_iteration.clean.sh trunk/tests/documentation/4-9_sequential_iteration.swift trunk/tests/documentation/6-1_named_and_optional_params.check.sh trunk/tests/documentation/6-1_named_and_optional_params.clean.sh trunk/tests/documentation/6-1_named_and_optional_params.swift trunk/tests/documentation/one.txt trunk/tests/documentation/sites.template.xml trunk/tests/documentation/swift.properties trunk/tests/documentation/tc.data trunk/tests/documentation/tc.template.data trunk/tests/documentation/three.txt trunk/tests/documentation/title.txt trunk/tests/documentation/two.txt Modified: trunk/tests/groups/group-all-local.sh trunk/tests/suite.sh Log: Compile various individual site guides into one document Rename newuser-guide to siteguide print_link script to generate links to correct version of user guide, tutorial, etc Removed nearly all code fragments from tutorial. It now uses line numbers to do this. Eventually it should use some kind of tags for this. The test suite now has tests using the actual scripts in the examples directory. The same files that get referenced in the guides are run through the test suite. Removed the check scripts from the tutorial tests and use expected files New directory structures (examples/tutorial and tests/documentation/tutorial) Added: trunk/docs/print_link.sh =================================================================== --- trunk/docs/print_link.sh (rev 0) +++ trunk/docs/print_link.sh 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,21 @@ +#!/bin/bash + +# This script is referenced by asciidoc to point to the correct versions of documentation based on version information +# print_info.sh +# This will print the correct URL based on SVN version info + +pushd ../.. > /dev/null 2>&1 +VERSION=`svn info |grep URL|awk -F / '{print $NF}'` +popd > /dev/null 2>&1 + +# Parse command line arguments +case "$1" in + userguide) + echo http://www.ci.uchicago.edu/swift/guides/$VERSION/userguide/userguide.html[Swift User Guide] + ;; + tutorial) + echo http://www.ci.uchicago.edu/swift/guides/$VERSION/tutorial/tutorial.html[Swift Tutorial] + ;; + *) echo http://www.ci.uchicago.edu/swift/docs/index.php[Swift Documentation] + ;; +esac Property changes on: trunk/docs/print_link.sh ___________________________________________________________________ Added: svn:executable + * Added: trunk/docs/siteguide/beagle =================================================================== --- trunk/docs/siteguide/beagle (rev 0) +++ trunk/docs/siteguide/beagle 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,49 @@ +Beagle +------ + +Requesting Access +~~~~~~~~~~~~~~~~~ +If you do not already have a Computation Institute account, you can request +one at https://www.ci.uchicago.edu/accounts/. This page will give you a list +of resources you can request access to. +You already have an existing CI account, but do not have access to Beagle, +send an email to support at ci.uchicago.edu to request access. + +Connecting to a login node +~~~~~~~~~~~~~~~~~~~~~~~~~~ +Once you have account, you should be able to access a Beagle login +node with the following command: + +----- +ssh yourusername at login.beagle.ci.uchicago.edu +----- + +Follow the steps outlined below to get started with Swift on Beagle: + +*step 1.* Load the Swift module on Beagle as follows: +module load swift+ + +*step 2.* Create and change to a directory where your Swift related work will +stay. (say, +mkdir swift-lab+, followed by, +cd swift-lab+) + +*step 3.* To get started with a simple example running +/bin/cat+ to read an +input file +data.txt+ and write to an output file +f.nnn.out+, copy the folder +at +/home/ketan/catsn+ to the above directory. (+cp -r /home/ketan/catsn +.+ followed by +cd catsn+). + +*step 4.* In the sites file: +beagle-coaster.xml+, make the following two +changes: *1)* change the path of +workdirectory+ to your preferred location +(say to +/lustre/beagle/$USER/swift-lab/swift.workdir+) and *2)* Change the +project name to your project (+CI-CCR000013+) . The workdirectory will contain +execution data related to each run, e.g. wrapper scripts, system information, +inputs and outputs. + +*step 5.* Run the example using following commandline (also found in run.sh): ++swift -config cf -tc.file tc -sites.file beagle-coaster.xml catsn.swift -n=1+ +. You can further change the value of +-n+ to any arbitrary number to run that +many number of concurrent +cat+ + +*step 6.* Check the output in the generated +outdir+ directory (+ls outdir+) + +Note: Running from sandbox node or requesting 1 hour walltime for upto 3 nodes +will get fast prioritized execution. Good for small tests. + Added: trunk/docs/siteguide/futuregrid =================================================================== --- trunk/docs/siteguide/futuregrid (rev 0) +++ trunk/docs/siteguide/futuregrid 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,134 @@ +Futuregrid Quickstart Guide +--------------------------- + +Downloading and Building Swift +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The most recent versions of Swift can be found at +http://www.ci.uchicago.edu/swift/downloads/index.php. To run on futuregrid, +you will need to download the development/trunk version from SVN. + +Adding Swift to your PATH +~~~~~~~~~~~~~~~~~~~~~~~~~ +Once you have installed Swift, add the Swift binary to your PATH so you can +easily run it from any directory. + +In your home directory, edit the file ".bashrc". + +If you have installed Swift via a source repository, add the following line +at the bottom of .bashrc. + +----- +export PATH=$PATH:$HOME/cog/modules/swift/dist/swift-svn/bin +----- + +Requesting Futuregrid Access +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +If you do not already have a futuregrid account, you can follow the +instructions at https://portal.futuregrid.org/gettingstarted to get started. +This page provides information on how to create an account, how to join +a project, how to set up your SSH keys, and how to create a new project. + +Downloading Swift VM Tools +~~~~~~~~~~~~~~~~~~~~~~~~~~ +A set of scripts based around cloudinitd are used to easily start virtual +machines. To download, change to your home directory and run the +following command: + +----- +$ svn co https://svn.ci.uchicago.edu/svn/vdl2/usertools/swift-vm-boot +----- + +Download your Credentials +~~~~~~~~~~~~~~~~~~~~~~~~~ +Run the following commands to retrieve your credentials: +----- +$ scp yourusername at hotel.futuregrid.org:nimbus_creds.tar.gz . +$ tar xvfz nimbus_creds.tar.gz +----- +When you extract your credential file, look at the file called +hotel.conf. Near the bottom of this file will be two settings +called vws.repository.s3id and vws.repository.s3key. Copy these +values for the next step. + +Configuring Swift VM Tools +~~~~~~~~~~~~~~~~~~~~~~~~~~ +Change directories into the swift-vm-boot directory. Edit the file +called env.sh. There are two settings here that you will need to +modify: FUTUREGRID_IAAS_ACCESS_KEY and FUTUREGRID_IAAS_SECRET_KEY. +Paste your access key (s3id) and secret key (s3key) here and save +the file. By default, env.sh requests 2 nodes on hotel and 2 nodes +on sierra. Change these values as needed. Run install.sh from the +swift-vm-boot directory to complete the installation of Swift VM +Tools. The Swift VM Tools may require a fairly recent version of +Python. If you run into problems while running the install.sh +script, please try a more recent version of Python and associated +libraries. + +Configuring coaster-service.conf +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Within your swift distribution's etc directory is a file called +coaster-service.conf. There are many options here you can modify +as needed, but these are the settings that will be required +to run on futuregrid: + +----- +export WORKER_WORK=/tmp +export WORKER_MODE=futuregrid +export SHARED_FILESYSTEM=no +export WORKER_USERNAME=root +export SSH_TUNNELING=yes +export SWIFTVMBOOT_DIR=$HOME/swift-vm-boot +export WORK=/tmp +----- + +These is a brief description of these settings in the coaster-service.conf file. +Tunneling should be used when you are restricted by a firewall. If your local +machine has multiple network interfaces, you should also manually set the IP +address of your machine with export IPADDR=your.ip.address.here. + +Starting the Coaster Service Script +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Now that everything is configured, change to a temporary directory +and run this command to start the coaster service: + +----- +$ start-coaster-service +----- + +This command will start the VMs, start the required processes on the worker nodes, +and generate Swift configuration files for you to use. The configuration files +will be generated in your current directory. These files are sites.xml, tc.data, +and cf. + +Running Swift +~~~~~~~~~~~~~ +Now that you have all of your configuration files generated, run the following command: + +----- +$ swift -sites.file sites.xml -tc.file tc.data -config cf +----- + +If you would like to create a custom tc file for repeated use, rename it to something other +than tc.data to prevent it from being overwritten. The sites.xml however will need to be +regenerated every time you start the coaster service. If you need to repeatedly modify some +sites.xml options, you may edit the template in Swift's etc/sites/persistent-coasters. You +may also create your own custom tc files with the hostname of persistent-coasters. More +information about this can be found in the Swift userguide at +http://www.ci.uchicago.edu/swift/guides/trunk/userguide/userguide.html. + +Stopping the Coaster Service Script +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +To stop the coaster service, run the following command: +----- +$ stop-coaster-service +----- + +This will kill the coaster service, kill the worker scripts on remote systems and terminate +the virtual machines that were created during start-coaster-service. + +More Help +~~~~~~~~~ +The best place for additional help is the Swift user mailing list. You can subscribe to this list at +http://mail.ci.uchicago.edu/mailman/listinfo/swift-user. When submitting information, please send +your sites.xml file, your tc.data, and any error messages you run into. + Added: trunk/docs/siteguide/pads =================================================================== --- trunk/docs/siteguide/pads (rev 0) +++ trunk/docs/siteguide/pads 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,188 @@ +PADS +---- + +Requesting Access +~~~~~~~~~~~~~~~~~ +If you do not already have a Computation Institute account, you can request +one at https://www.ci.uchicago.edu/accounts/. This page will give you a list +of resources you can request access to. Be sure that PADS is selected. If +you already have an existing CI account, but do not have access to PADS, +send an email to support at ci.uchicago.edu to request access. + +SSH Keys +~~~~~~~~ +Before accessing PADS, be sure to have your SSH keys configured correctly. +There is some basic information about SSH and how to generate your key at +http://www.ci.uchicago.edu/wiki/bin/view/Resources/SshKeys. Once you have +followed those instructions, you can add your key at +https://www.ci.uchicago.edu/support/sshkeys/. + +Connecting to a login node +~~~~~~~~~~~~~~~~~~~~~~~~~~ +Once your keys are configured, you should be able to access a PADS login +node with the following command: + +----- +ssh yourusername at login.pads.ci.uchicago.edu +----- + +Configuring softenv +~~~~~~~~~~~~~~~~~~~ +Softenv is a system used for managing applications. In order to run Swift, +the softenv environment will have to be modified slightly. Softenv is +configured by a file in your home directory called .soft. Edit this file +to look like this: +----- ++java-sun ++maui ++torque + at default +----- + +Downloading and building Swift +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The most recent versions of Swift can be found at +http://www.ci.uchicago.edu/swift/downloads/index.php. Follow the instructions +provided on that site to download and build Swift. + +Adding Swift to your PATH +~~~~~~~~~~~~~~~~~~~~~~~~~ +Once you have installed Swift, add the Swift binary to your PATH so you can +easily run it from any directory. + +In your home directory, edit the file ".bashrc". + +If you have installed Swift via a source repository, add the following line +at the bottom of .bashrc. + +----- +export PATH=$PATH:$HOME/cog/modules/swift/dist/swift-svn/bin +----- + +If you have installed Swift via a binary package, add this line: + +----- +export PATH=$PATH:$HOME/swift-/bin +----- + +Replace with the actual name of the swift directory in the example above. + +What You Need To Know Before Running Swift +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Before you can create a Swift configuration file, there are some things +you will need to know. + +Swift Work Directory +^^^^^^^^^^^^^^^^^^^^ +The Swift work directory is a directory which Swift uses for processing work. +This directory needs to be writable. Common options for this are: + +----- +/home/username/swiftwork +/home/username/work +/tmp +----- + +Which project(s) are you a member of? +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +PADS requires that you are a member of a project. You can determine this by +running the following command: + +----- +$ projects --available + +The following projects are available for your use + +Project PI Title + +CI-CCR000013 Michael Wilde The Swift Parallel Scripting System +----- + +If you are not a member of a project, you must first request access +to a project at http://www.ci.uchicago.edu/hpc/projects. + +You should make sure that you have a project set as default. Run +the projects command with no arguments to determine if you have a default. + +------ +$ projects +You have no default project set. +----- + +To set your default project, use projects --set +------ +$ projects --set CI-CCR000013 --all +Your default project for all CI clusters has been set to CI-CCR000013. +----- + +Determine your Queue +^^^^^^^^^^^^^^^^^^^^ + +PADS has several different queues you can submit jobs to depending on +the type of work you will be doing. The command "qstat -q" will print +the most up to date list of this information. + +.PADS Queues +[options="header"] +|========================================================= +|Queue |Memory|CPU Time|Walltime|Node|Run|Que|Lm |State +|route |-- |-- |-- |-- | 0| 0|-- | E R +|short |-- |-- |04:00:00|-- | 64| 0|-- | E R +|extended|-- |-- |-- |-- | 0| 0|-- | E R +|fast |-- |-- |01:00:00|1 | 0|152|-- | E R +|long |-- |-- |24:00:00|-- |232|130|-- | E R +|========================================================= + +Generating Configuration Files +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Now that you know what queue to use, your project, and your work directory, it is time to +set up Swift. Swift uses a configuration file called sites.xml to determine how it should run. +There are two methods you can use for creating this file. You can manually edit +the configuration file, or generate it with a utility called gensites. + +Manually Editing sites.xml +^^^^^^^^^^^^^^^^^^^^^^^^^^ +Below is the template that is used by Swift's test suite for running on PADS. + +----- +include::../../tests/providers/local-pbs/pads/sites.template.xml[] +----- + +The values to note here are the ones that are listed between underscores. In the example above, they are _QUEUE_, and _WORK_. Queue is the PADS queue to use and WORK is the swift work directory. These are placeholder values you will need to modify to fit your needs. Copy and paste this template, replace the values, and call it sites.xml. + +Manually Editing tc.data +~~~~~~~~~~~~~~~~~~~~~~~~ +Below is the tc.data file used by Swift's test suite for running on PADS. + +----- +include::../../tests/providers/local-pbs/pads/tc.template.data[] +------ + +Copy these commands and save it as tc.data. + +Catsn.swift +~~~~~~~~~~~ +The swift script we will run is called catsn.swift. It simply cats a file and saves the result. This is a nice simple test to ensure jobs are running correctly. Create a file called data.txt which contains some simple input - a "hello world" will do the trick. + +----- +include::../../examples/catsn.swift[] +----- + +Running Swift +~~~~~~~~~~~~~ +Now that everything is in place, run Swift with the following command: + +----- +swift -sites.file sites.xml -tc.file tc.data catsn.swift -n=10 +----- + +You should see several new files being created, called catsn.0001.out, catsn.0002.out, etc. Each of these +files should contain the contents of what you placed into data.txt. If this happens, your job has run +successfully on PADS! + +More Help +~~~~~~~~~ +The best place for additional help is the Swift user mailing list. You can subscribe to this list at +https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-user. When submitting information, please send your sites.xml file, your tc.data, and any Swift log files that were created during your attempt. + + Added: trunk/docs/siteguide/siteguide.html =================================================================== --- trunk/docs/siteguide/siteguide.html (rev 0) +++ trunk/docs/siteguide/siteguide.html 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,964 @@ + + + + + +Site Configuration Guide + + + + + +
+

1. PADS

+
+

1.1. Requesting Access

+

If you do not already have a Computation Institute account, you can request +one at https://www.ci.uchicago.edu/accounts/. This page will give you a list +of resources you can request access to. Be sure that PADS is selected. If +you already have an existing CI account, but do not have access to PADS, +send an email to support at ci.uchicago.edu to request access.

+

1.2. SSH Keys

+

Before accessing PADS, be sure to have your SSH keys configured correctly. +There is some basic information about SSH and how to generate your key at +http://www.ci.uchicago.edu/wiki/bin/view/Resources/SshKeys. Once you have +followed those instructions, you can add your key at +https://www.ci.uchicago.edu/support/sshkeys/.

+

1.3. Connecting to a login node

+

Once your keys are configured, you should be able to access a PADS login +node with the following command:

+
+
+
ssh yourusername at login.pads.ci.uchicago.edu
+
+

1.4. Configuring softenv

+

Softenv is a system used for managing applications. In order to run Swift, +the softenv environment will have to be modified slightly. Softenv is +configured by a file in your home directory called .soft. Edit this file +to look like this:

+
+
+
+java-sun
++maui
++torque
+ at default
+
+

1.5. Downloading and building Swift

+

The most recent versions of Swift can be found at +http://www.ci.uchicago.edu/swift/downloads/index.php. Follow the instructions +provided on that site to download and build Swift.

+

1.6. Adding Swift to your PATH

+

Once you have installed Swift, add the Swift binary to your PATH so you can +easily run it from any directory.

+

In your home directory, edit the file ".bashrc".

+

If you have installed Swift via a source repository, add the following line +at the bottom of .bashrc.

+
+
+
export PATH=$PATH:$HOME/cog/modules/swift/dist/swift-svn/bin
+
+

If you have installed Swift via a binary package, add this line:

+
+
+
export PATH=$PATH:$HOME/swift-<version>/bin
+
+

Replace <version> with the actual name of the swift directory in the example above.

+

1.7. What You Need To Know Before Running Swift

+

Before you can create a Swift configuration file, there are some things +you will need to know.

+

1.7.1. Swift Work Directory

+

The Swift work directory is a directory which Swift uses for processing work. +This directory needs to be writable. Common options for this are:

+
+
+
/home/username/swiftwork
+/home/username/work
+/tmp
+
+

1.7.2. Which project(s) are you a member of?

+

PADS requires that you are a member of a project. You can determine this by +running the following command:

+
+
+
$ projects --available
+
+The following projects are available for your use
+
+Project      PI                      Title
+
+CI-CCR000013 Michael Wilde           The Swift Parallel Scripting System
+
+

If you are not a member of a project, you must first request access +to a project at http://www.ci.uchicago.edu/hpc/projects.

+

You should make sure that you have a project set as default. Run +the projects command with no arguments to determine if you have a default.

+
+
+
$ projects
+You have no default project set.
+
+

To set your default project, use projects --set

+
+
+
$ projects --set CI-CCR000013 --all
+Your default project for all CI clusters has been set to CI-CCR000013.
+
+

1.7.3. Determine your Queue

+

PADS has several different queues you can submit jobs to depending on +the type of work you will be doing. The command "qstat -q" will print +the most up to date list of this information.

+
+ + ++++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 1. PADS Queues
Queue MemoryCPU TimeWalltimeNodeRunQueLm State

route

— 

— 

— 

— 

0

0

— 

E R

short

— 

— 

04:00:00

— 

64

0

— 

E R

extended

— 

— 

— 

— 

0

0

— 

E R

fast

— 

— 

01:00:00

1

0

152

— 

E R

long

— 

— 

24:00:00

— 

232

130

— 

E R

+
+

1.8. Generating Configuration Files

+

Now that you know what queue to use, your project, and your work directory, it is time to +set up Swift. Swift uses a configuration file called sites.xml to determine how it should run. +There are two methods you can use for creating this file. You can manually edit +the configuration file, or generate it with a utility called gensites.

+

1.8.1. Manually Editing sites.xml

+

Below is the template that is used by Swift’s test suite for running on PADS.

+
+
+
<config>
+<pool handle="pads-pbs">
+  <execution jobmanager="local:pbs" provider="local" url="none" />
+  <filesystem provider="local" url="none" />
+  <profile key="jobThrottle" namespace="karajan">0</profile>
+  <profile namespace="globus" key="project">_QUEUE_</profile>
+  <workdirectory>_WORK_</workdirectory>
+</pool>
+</config>
+
+

The values to note here are the ones that are listed between underscores. In the example above, they are QUEUE, and WORK. Queue is the PADS queue to use and WORK is the swift work directory. These are placeholder values you will need to modify to fit your needs. Copy and paste this template, replace the values, and call it sites.xml.

+

1.9. Manually Editing tc.data

+

Below is the tc.data file used by Swift’s test suite for running on PADS.

+
+
+
pads-pbs        echo            /bin/echo       INSTALLED       INTEL32::LINUX
+pads-pbs        cat             /bin/cat        INSTALLED       INTEL32::LINUX
+pads-pbs        ls              /bin/ls         INSTALLED       INTEL32::LINUX
+pads-pbs        grep            /bin/grep       INSTALLED       INTEL32::LINUX
+pads-pbs        sort            /bin/sort       INSTALLED       INTEL32::LINUX
+pads-pbs        paste           /bin/paste      INSTALLED       INTEL32::LINUX
+pads-pbs        wc              /usr/bin/wc     INSTALLED       INTEL32::LINUX
+
+

Copy these commands and save it as tc.data.

+

1.10. Catsn.swift

+

The swift script we will run is called catsn.swift. It simply cats a file and saves the result. This is a nice simple test to ensure jobs are running correctly. Create a file called data.txt which contains some simple input - a "hello world" will do the trick.

+
+
+
type file;
+
+app (file o) cat (file i)
+{
+  cat @i stdout=@o;
+}
+
+string t = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
+string char[] = @strsplit(t, "");
+
+file out[]<simple_mapper; location=".", prefix="catsn.",suffix=".out">;
+foreach j in [1:@toint(@arg("n","10"))] {
+  file data<"data.txt">;
+  out[j] = cat(data);
+}
+
+

1.11. Running Swift

+

Now that everything is in place, run Swift with the following command:

+
+
+
swift -sites.file sites.xml -tc.file tc.data catsn.swift -n=10
+
+

You should see several new files being created, called catsn.0001.out, catsn.0002.out, etc. Each of these +files should contain the contents of what you placed into data.txt. If this happens, your job has run +successfully on PADS!

+

1.12. More Help

+

The best place for additional help is the Swift user mailing list. You can subscribe to this list at +https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-user. When submitting information, please send your sites.xml file, your tc.data, and any Swift log files that were created during your attempt.

+
+

2. Beagle

+
+

2.1. Requesting Access

+

If you do not already have a Computation Institute account, you can request +one at https://www.ci.uchicago.edu/accounts/. This page will give you a list +of resources you can request access to. +You already have an existing CI account, but do not have access to Beagle, +send an email to support at ci.uchicago.edu to request access.

+

2.2. Connecting to a login node

+

Once you have account, you should be able to access a Beagle login +node with the following command:

+
+
+
ssh yourusername at login.beagle.ci.uchicago.edu
+
+

Follow the steps outlined below to get started with Swift on Beagle:

+

step 1. Load the Swift module on Beagle as follows: module load swift

+

step 2. Create and change to a directory where your Swift related work will +stay. (say, mkdir swift-lab, followed by, cd swift-lab)

+

step 3. To get started with a simple example running /bin/cat to read an +input file data.txt and write to an output file f.nnn.out, copy the folder +at /home/ketan/catsn to the above directory. (cp -r /home/ketan/catsn +. followed by cd catsn).

+

step 4. In the sites file: beagle-coaster.xml, make the following two +changes: 1) change the path of workdirectory to your preferred location +(say to /lustre/beagle/$USER/swift-lab/swift.workdir) and 2) Change the +project name to your project (CI-CCR000013) . The workdirectory will contain +execution data related to each run, e.g. wrapper scripts, system information, +inputs and outputs.

+

step 5. Run the example using following commandline (also found in run.sh): +swift -config cf -tc.file tc -sites.file beagle-coaster.xml catsn.swift -n=1 +. You can further change the value of -n to any arbitrary number to run that +many number of concurrent cat

+

step 6. Check the output in the generated outdir directory (ls outdir)

+

Note: Running from sandbox node or requesting 1 hour walltime for upto 3 nodes +will get fast prioritized execution. Good for small tests.

+
+

3. Futuregrid Quickstart Guide

+
+

3.1. Downloading and Building Swift

+

The most recent versions of Swift can be found at +http://www.ci.uchicago.edu/swift/downloads/index.php. To run on futuregrid, +you will need to download the development/trunk version from SVN.

+

3.2. Adding Swift to your PATH

+

Once you have installed Swift, add the Swift binary to your PATH so you can +easily run it from any directory.

+

In your home directory, edit the file ".bashrc".

+

If you have installed Swift via a source repository, add the following line +at the bottom of .bashrc.

+
+
+
export PATH=$PATH:$HOME/cog/modules/swift/dist/swift-svn/bin
+
+

3.3. Requesting Futuregrid Access

+

If you do not already have a futuregrid account, you can follow the +instructions at https://portal.futuregrid.org/gettingstarted to get started. +This page provides information on how to create an account, how to join +a project, how to set up your SSH keys, and how to create a new project.

+

3.4. Downloading Swift VM Tools

+

A set of scripts based around cloudinitd are used to easily start virtual +machines. To download, change to your home directory and run the +following command:

+
+
+
$ svn co https://svn.ci.uchicago.edu/svn/vdl2/usertools/swift-vm-boot
+
+

3.5. Download your Credentials

+

Run the following commands to retrieve your credentials:

+
+
+
$ scp yourusername at hotel.futuregrid.org:nimbus_creds.tar.gz .
+$ tar xvfz nimbus_creds.tar.gz
+
+

When you extract your credential file, look at the file called +hotel.conf. Near the bottom of this file will be two settings +called vws.repository.s3id and vws.repository.s3key. Copy these +values for the next step.

+

3.6. Configuring Swift VM Tools

+

Change directories into the swift-vm-boot directory. Edit the file +called env.sh. There are two settings here that you will need to +modify: FUTUREGRID_IAAS_ACCESS_KEY and FUTUREGRID_IAAS_SECRET_KEY. +Paste your access key (s3id) and secret key (s3key) here and save +the file. By default, env.sh requests 2 nodes on hotel and 2 nodes +on sierra. Change these values as needed. Run install.sh from the +swift-vm-boot directory to complete the installation of Swift VM +Tools. The Swift VM Tools may require a fairly recent version of +Python. If you run into problems while running the install.sh +script, please try a more recent version of Python and associated +libraries.

+

3.7. Configuring coaster-service.conf

+

Within your swift distribution’s etc directory is a file called +coaster-service.conf. There are many options here you can modify +as needed, but these are the settings that will be required +to run on futuregrid:

+
+
+
export WORKER_WORK=/tmp
+export WORKER_MODE=futuregrid
+export SHARED_FILESYSTEM=no
+export WORKER_USERNAME=root
+export SSH_TUNNELING=yes
+export SWIFTVMBOOT_DIR=$HOME/swift-vm-boot
+export WORK=/tmp
+
+

These is a brief description of these settings in the coaster-service.conf file. +Tunneling should be used when you are restricted by a firewall. If your local +machine has multiple network interfaces, you should also manually set the IP +address of your machine with export IPADDR=your.ip.address.here.

+

3.8. Starting the Coaster Service Script

+

Now that everything is configured, change to a temporary directory +and run this command to start the coaster service:

+
+
+
$ start-coaster-service
+
+

This command will start the VMs, start the required processes on the worker nodes, +and generate Swift configuration files for you to use. The configuration files +will be generated in your current directory. These files are sites.xml, tc.data, +and cf.

+

3.9. Running Swift

+

Now that you have all of your configuration files generated, run the following command:

+
+
+
$ swift -sites.file sites.xml -tc.file tc.data -config cf <yourscript.swift>
+
+

If you would like to create a custom tc file for repeated use, rename it to something other +than tc.data to prevent it from being overwritten. The sites.xml however will need to be +regenerated every time you start the coaster service. If you need to repeatedly modify some +sites.xml options, you may edit the template in Swift’s etc/sites/persistent-coasters. You +may also create your own custom tc files with the hostname of persistent-coasters. More +information about this can be found in the Swift userguide at +http://www.ci.uchicago.edu/swift/guides/trunk/userguide/userguide.html.

+

3.10. Stopping the Coaster Service Script

+

To stop the coaster service, run the following command:

+
+
+
$ stop-coaster-service
+
+

This will kill the coaster service, kill the worker scripts on remote systems and terminate +the virtual machines that were created during start-coaster-service.

+

3.11. More Help

+

The best place for additional help is the Swift user mailing list. You can subscribe to this list at +http://mail.ci.uchicago.edu/mailman/listinfo/swift-user. When submitting information, please send +your sites.xml file, your tc.data, and any error messages you run into.

+
+
+

+ + + Added: trunk/docs/siteguide/siteguide.txt =================================================================== --- trunk/docs/siteguide/siteguide.txt (rev 0) +++ trunk/docs/siteguide/siteguide.txt 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,13 @@ +Site Configuration Guide +======================== + +:toc: +:icons: +:website: http://www.ci.uchicago.edu/swift/guides/siteguide.php +:numbered: + +include::pads[] + +include::beagle[] + +include::futuregrid[] Deleted: trunk/docs/tutorial/abstract =================================================================== --- trunk/docs/tutorial/abstract 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/docs/tutorial/abstract 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,7 +0,0 @@ -[abstract] -Abstract --------- -This is an introductory tutorial on the use of Swift and its programming -language SwiftScript. - -note: merge with intro? Added: trunk/docs/tutorial/abstract =================================================================== --- trunk/docs/tutorial/abstract (rev 0) +++ trunk/docs/tutorial/abstract 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,7 @@ +[abstract] +Abstract +-------- +This is an introductory tutorial on the use of Swift and its programming +language SwiftScript. + +note: merge with intro? Deleted: trunk/docs/tutorial/bits =================================================================== --- trunk/docs/tutorial/bits 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/docs/tutorial/bits 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,32 +0,0 @@ -bits ----- - -Named and optional parameters -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -In addition to specifying parameters positionally, parameters can be -named, and if desired a default value can be specified: - - ----- -(messagefile t) greeting (string s="hello") { - app { - echo s stdout=@filename(t); - } -} ----- - -When we invoke the procedure, we can specify values for the parameters -by name. The following code can be found in q21.swift. - - ----- -french = greeting(s="bonjour"); ----- - -or we can let the default value apply: - - ----- -english = greeting(); ----- Added: trunk/docs/tutorial/bits =================================================================== --- trunk/docs/tutorial/bits (rev 0) +++ trunk/docs/tutorial/bits 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,15 @@ +Bits +---- + +Named and optional parameters +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +In addition to specifying parameters positionally, parameters can be +named, and if desired a default value can be specified: + +.default.swift +************** +---- +include::../../examples/tutorial/default.swift[] +---- +************** Deleted: trunk/docs/tutorial/hello_world =================================================================== --- trunk/docs/tutorial/hello_world 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/docs/tutorial/hello_world 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,72 +0,0 @@ -Hello World ------------ -The first example program, first.swift, outputs a hello world message -into a file called hello.txt. - -.first.swift -************ - ----- -include::../../examples/first.swift[] ----- -************ - -We can run this program as follows: -note: Make sure the bin directory of swift-installation is in your path. ----- -$ cd examples/swift/ -$ swift first.swift -Swift svn swift-r3334 (swift modified locally) cog-r2752 - -RunID: 20100526-1925-8zjupq1b -Progress: -Final status: Finished successfully:1 -$ cat hello.txt -Hello, world! ----- - -The basic structure of this program is a type definition, an -application procedure definition, a variable definition and then a -call to the procedure: - - ----- -type messagefile; ----- - -First we define a new type, called messagefile. In this example, we will -use this messagefile type as the type for our output message. - - -All data in SwiftScript must be typed, whether it is stored in memory or -on disk. This example defines a very simple type. Later on we will see -more complex type examples. - - ----- -app (messagefile t) greeting() { - echo "Hello, world!" stdout=@filename(t); -} ----- - -Next we define a procedure called greeting. This procedure will write -out the "hello world" message to a file. - -To achieve this, it executes the unix utility 'echo' with a parameter -"Hello, world!" and directs the standard output into the output file. - -The actual file to use is specified by the return parameter, t. - -messagefile outfile <"hello.txt">; - -Here we define a variable called outfile. The type of this variable is -messagefile, and we specify that the contents of this variable will be -stored on disk in a file called hello.txt - -outfile = greeting(); - -Now we call the greeting procedure, with its output going to the outfile -variable and therefore to hello.txt on disk. - -Over the following exercises, we'll extend this simple hello world -program to demonstrate various features of Swift. Added: trunk/docs/tutorial/hello_world =================================================================== --- trunk/docs/tutorial/hello_world (rev 0) +++ trunk/docs/tutorial/hello_world 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,69 @@ +Hello World +----------- +The first example program, hello.swift, outputs a hello world message +into a file called hello.txt. + +.hello.swift +************ + +---- +include::../../examples/tutorial/hello.swift[] +---- +************ + +To run hello.swift, change directories to the location of the script +and run the swift command as follows. + +TIP: Make sure the bin directory of your swift installation is in your PATH. +---- +$ cd examples/tutorial +$ swift hello.swift +Swift svn swift-r3334 (swift modified locally) cog-r2752 + +RunID: 20100526-1925-8zjupq1b +Progress: +Final status: Finished successfully:1 +$ cat hello.txt +Hello, world! +---- + +The basic structure of this program is a type definition, an +application procedure definition, a variable definition and then a +call to the procedure. + +First we define a new type, called messagefile. In this example, we will +use this messagefile type for our output message. + +---- +sys::[sed -n '1p' ../../examples/tutorial/hello.swift] +---- + +All data in SwiftScript must be typed, whether it is stored in memory or +on disk. This example defines a very simple type. Later on we will see +more complex type examples. + +---- +sys::[sed -n '3,5p' ../../examples/tutorial/hello.swift] +---- + +Next we define a procedure called greeting. This procedure will write +out the "hello world" message to a file. To achieve this, it executes +the unix utility 'echo' with a parameter "Hello, world!" and directs +the standard output into the output file. + +The actual file to use is specified by the return parameter, t. +----- +sys::[sed -n '7p' ../../examples/tutorial/hello.swift] +----- +Here we define a variable called outfile. The type of this variable is +messagefile, and we specify that the contents of this variable will be +stored on disk in a file called hello.txt + +----- +sys::[sed -n '3,5p' ../../examples/tutorial/hello.swift] +----- +Now we call the greeting procedure, with its output going to the outfile +variable and therefore to hello.txt on disk. + +Over the following exercises, we'll extend this simple hello world +program to demonstrate various features of Swift. Deleted: trunk/docs/tutorial/introduction =================================================================== --- trunk/docs/tutorial/introduction 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/docs/tutorial/introduction 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,18 +0,0 @@ -Introduction ------------- -This is an introductory tutorial describing the use of Swift and its programming -language SwiftScript. It is intended to introduce new users to the basics of Swift. -It is structured as a series of simple exercises/examples which you can -try for yourself as you read along. After the first 'hello world' -example, there are two tracks - the language track (which introduces the SwiftScript language) and the runtime track (which introduces features of the Swift runtime environment, such as running -jobs on different computational 'sites'). - -For information on getting an installation of Swift running, consult the -Swift Quickstart Guide . We advise you to install the latest stable release of Swift. -Return to this document when you have successfully run the test SwiftScript program mentioned there. - -There is also a Swift User's Guide - which contains -a more detailed reference material on topics covered in this manual. All -of the programs included in this tutorial can be found in your Swift -distribution in the +examples/swift+ directory. Added: trunk/docs/tutorial/introduction =================================================================== --- trunk/docs/tutorial/introduction (rev 0) +++ trunk/docs/tutorial/introduction 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,16 @@ +Introduction +------------ +This is an introductory tutorial describing the use of Swift and its programming +language SwiftScript. It is intended to introduce new users to the basics of Swift. +It is structured as a series of simple exercises/examples which you can +try for yourself as you read along. + +For information on getting an installation of Swift running, consult the +http://www.ci.uchicago.edu/swift/guides/quickstartguide.php[Swift Quickstart Guide]. We advise you to install the latest stable release of Swift. +Return to this document when you have successfully run the test SwiftScript program mentioned there. + +There is also a +sys::[../print_link.sh userguide] +which contains a more detailed reference material on topics covered in this manual. All +of the programs included in this tutorial can be found in your Swift +distribution in the examples/tutorial directory. Deleted: trunk/docs/tutorial/language_features =================================================================== --- trunk/docs/tutorial/language_features 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/docs/tutorial/language_features 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,403 +0,0 @@ -Language features ------------------ - -Parameters -~~~~~~~~~~ - -Procedures can have parameters. Input parameters specify inputs to the -procedure and output parameters specify outputs. Our helloworld greeting -procedure already uses an output parameter, t, which indicates where the -greeting output will go. In this section, we will add an input parameter -to the greeting function. - -The code changes from first.swift are highlighted below. -ToDo: Highlight the differences! - ----- -include::../../examples/parameter.swift[] ----- - -We have modified the signature of the greeting procedure to indicate -that it takes a single parameter, s, of type 'string'. - -We have modified the invocation of the 'echo' utility so that it takes -the value of s as a parameter, instead of the string literal "Hello, -world!". - -We have modified the output file definition to point to a different file -on disk. - -We have modified the invocation of greeting so that a greeting string is -supplied. - -The code for this section can be found in parameter.swift. It can be -invoked using the swift command, with output appearing in hello2.txt: - - ----- -$ swift parameter.swift ----- - -Now that we can choose our greeting text, we can call the same procedure -with different parameters to generate several output files with -different greetings. The code is in manyparam.swift and can be run as -before using the swift command. - - ----- -include::../../examples/manyparam.swift[] ----- - -Note that we can intermingle definitions of variables with invocations -of procedures. - -When this program has been run, there should be three new files in the -working directory (english.txt, francais.txt and nihongo.txt) each -containing a greeting in a different language. - -In addition to specifying parameters positionally, parameters can be -named, and if desired a default value can be specified - see <>. -ToDo: link not working. - -Adding another application -~~~~~~~~~~~~~~~~~~~~~~~~~~ -Now we'll define a new application procedure. The procedure we define -will capitalise all the words in the input file. - -To do this, we'll use the unix tr (translate) utility. Here is an -example of using tr on the unix command line, not using Swift: - - ----- -$ echo hello | tr '[a-z]' '[A-Z]' -HELLO ----- - -.There are several steps -- Updating the transformation catalog -- Updating the application block - -ToDo: What is transformation catalog? One line explanation. - -First we need to modify the transformation catalog to define a logical -transformation for the tr utility. A transformation catalog lists where executables are located on computational sites. -The transformation catalog can be found in etc/tc.data. There are already several entries specifying -where executables can be found. Add a new line to the file, specifying -where *tr* can be found (usually in /usr/bin/tr but it may differ on -your system), like this: - - ----- -localhost tr /usr/bin/tr INSTALLED INTEL32::LINUX null ----- - -For now, ignore all of the fields except the second and the third. The -second field tr specifies a logical application name and the third -specifies the location of the application executable. - -Now that we have defined where to find tr, we can use it in SwiftScript. - -We can define a new procedure, capitalise, which calls tr. - - ----- -(messagefile o) capitalise(messagefile i) { - app { - tr "[a-z]" "[A-Z]" stdin=@filename(i) stdout=@filename(o); - } -} ----- -We can call capitalise like this: - - ----- -messagefile final <"capitals.txt">; -final = capitalise(hellofile); ----- - -So a full program based on the first exercise might look like this: - - ----- -include::../../examples/second_procedure.swift[] ----- - -We can use the swift command to run it like this. - - ----- -$ swift second_procedure.swift -... -$ cat capitals.txt -HELLO FROM SWIFT ----- - -Anonymous files -~~~~~~~~~~~~~~~ -In the previous section, the file greeting.txt is used only to store -an intermediate result. We don't really care about which name is used -for the file, and we can let Swift choose the name. - -To do that, omit the mapping entirely when declaring outfile: - - ----- -messagefile outfile; ----- - -Swift will choose a filename, which in the present version will be in a -subdirectory called _concurrent. - - -Datatypes -~~~~~~~~~ -All data in variables and files has a data type. So far, we've seen two -types: - - - string - this is a built-in type for storing strings of text in - memory, much like in other programming languages - - messagefile - this is a user-defined type used to mark disc resident files as - containing messages - -SwiftScript has the additional built-in types: boolean, integer and -float that function much like their counterparts in other programming -languages. - -It is also possible to create user defined types with more structure, -for example: - - ----- -type details { - string name; - int pies; -} ----- - -Each element of the structured type can be accessed using a . like this: - - ----- -person.name = "john"; ----- - -The following complete program, types.swift, outputs a greeting using a -user-defined structure type to hold parameters for the message: - - ----- -include::../../examples/types.swift[] ----- - -Structured types can be comprised of marker types for files. See the -later section on mappers for more information about this. - - -Arrays -~~~~~~ - -We can define arrays using the [] suffix in a variable declaration: - - ----- -messagefile m[]; ----- - -This program, q5.swift, will declare an array of message files. - - ----- -include::../../examples/q5.swift[] ----- - -Observe that the type of the parameter to greeting is now an array of -strings, string s[], instead of a single string, string s, that -elements of the array can be referenced numerically, for example s[0], -and that the array is initialised using an array literal, -["how","are","you"]. - - -Mappers -~~~~~~~ - -A significant difference between SwiftScript and other languages is that -data can be referred to on disk through variables in a very similar -fashion to data in memory. For example, in the above examples we have -seen a variable definition like this: - - ----- -messagefile outfile <"q13greeting.txt">; ----- - -This means that outfile is a dataset variable, which is mapped to a -file on disk called g13greeting.txt. This variable can be assigned to -using = in a similar fashion to an in-memory variable. We can say that -outfile is mapped onto the disk file q13greeting.txt by a mapper. - -There are various ways of mapping in SwiftScript. Two forms have already -been seen in this tutorial. Later exercises will introduce more forms. - -The two forms of mapping seen so far are: - -simple named mapping - the name of the file that a variable is mapped to -is explictly listed. Like this: - - ----- -messagefile outfile <"greeting.txt">; ----- - -This is useful when you want to explicitly name input and output files -for your program. For example, outfile in exercise HELLOWORLD. - -anonymous mapping - no name is specified in the source code. A name is -automatically generated for the file. This is useful for intermediate -files that are only referenced through SwiftScript, such as outfile in -exercise ANONYMOUSFILE. A variable declaration is mapped anonymously by -ommitting any mapper definition, like this: - - ----- -messagefile outfile; ----- - -Later exercises will introduce other ways of mapping from disk files to -SwiftScript variables. - -TODO: introduce @v syntax. - - -The Regexp Mapper -^^^^^^^^^^^^^^^^^ -In this exercise, we introduce the regexp mapper. This mapper -transforms a string expression using a regular expression, and uses the -result of that transformation as the filename to map. - -regexp.swift demonstrates the use of this by placing output into a -file that is based on the name of the input file: our input file is -mapped to the inputfile variable using the simple named mapper, and then -we use the regular expression mapper to map the output file. Then we use -the countwords() procedure to count the works in the input file and -store the result in the output file. In order for the countwords() -procedure to work correctly, add the wc utility (usually found in -/usr/bin/wc) to tc.data. - -The important bit of regexp.swift is: - - ----- -messagefile inputfile <"q16.txt">; - -countfile c ; ----- - -fixed_array_mapper -^^^^^^^^^^^^^^^^^^ -The fixed array mapper maps a list of files into an array - each -element of the array is mapped into one file in the specified directory. -See fixedarray.swift. - - ----- -include::../../examples/fixedarray.swift[] ----- - -foreach -~~~~~~~ -SwiftScript provides a control structure, foreach, to operate on each -element of an array in parallel. - -In this example, we will run the previous word counting example over -each file in an array without having to explicitly list the array -elements. The source code for this example is in foreach.swift. The -three input files: one.txt, two.txt and three.txt are supplied. -After you have run the workflow, you should see that there are three -output files: one.count, two.count and three.count, each -containing the word count for the corresponding input file. We combine -the use of the fixed_array_mapper and the regexp_mapper. - - ----- -include::../../examples/foreach.swift[] ----- - -If -~~ -Decisions can be made using 'if', like this: - ----- -if(morning) { - outfile = greeting("good morning"); -} else { - outfile = greeting("good afternoon"); -} ----- - -if.swift contains a simple example of this. Compile and run if.swift -and see that it outputs "good morning". Changing the morning variable -from true to false will cause the program to output "good afternoon". - -Sequential iteration -~~~~~~~~~~~~~~~~~~~~ - -A serial execution of instructions can be carried out using the sequential iteration construct. - -The following example demonstrates a simple application: each step of -the iteration is a string representation of the byte count of the -previous step's output, with iteration terminating when the byte count -reaches zero. - -Here's the program: - - ----- -include::../../examples/iterate.swift[] ----- - -Where, echo is the standard unix echo utility. - -_wcl_ is our application code - it counts the number of bytes in the one -file and writes that count out to another, like this: - ----- -$ cat ../wcl -#!/bin/bash -echo -n $(wc -c < $1) > $2 - -$ echo -n hello > a -$ wcl a b -$ cat b -5 ----- - -Install the above wcl script somewhere and add a transformation catalog -(tc) entry for it (see an example below, note that you will need to change the path in third column to the path where wcl is located on your localhost). - ----- -localhost wcl /home/ketan/bin/wcl INSTALLED INTEL32::LINUX null ----- - -Then run the example program like this: - - ----- -$ swift iterate.swift -Swift svn swift-r3334 cog-r2752 - -RunID: 20100526-2259-gtlz8zf4 -Progress: -SwiftScript trace: extract int value , 16.0 -SwiftScript trace: extract int value , 2.0 -SwiftScript trace: extract int value , 1.0 -Final status: Finished successfully:4 - -$ ls foldout* -foldout0000 foldout0001 foldout0002 foldout0003 ----- - - Added: trunk/docs/tutorial/language_features =================================================================== --- trunk/docs/tutorial/language_features (rev 0) +++ trunk/docs/tutorial/language_features 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,390 @@ +Language features +----------------- + +Parameters +~~~~~~~~~~ + +Procedures can have parameters. Input parameters specify inputs to the +procedure and output parameters specify outputs. Our hello world greeting +procedure already uses an output parameter, t, which indicates where the +greeting output will go. In this section, we will modify the previous +script to add an input parameter to the greeting function. + +.parameter.swift +**************** +---- +include::../../examples/tutorial/parameter.swift[] +---- +**************** + +We have modified the signature of the greeting procedure to indicate +that it takes a single parameter, s, of type 'string'. + +We have modified the invocation of the 'echo' utility so that it takes +the value of s as a parameter, instead of the string literal "Hello, +world!". + +We have modified the output file definition to point to a different file +on disk. + +We have modified the invocation of greeting so that a greeting string is +supplied. + +The code for this section can be found in parameter.swift. It can be +invoked using the swift command, with output appearing in parameter.hello.txt: + + +---- +$ swift parameter.swift +---- + +Now that we can choose our greeting text, we can call the same procedure +with different parameters to generate several output files with +different greetings. The code is in manyparam.swift and can be run as +before using the swift command. + +.manyparam.swift +**************** +---- +include::../../examples/tutorial/manyparam.swift[] +---- +**************** + +Note that we can intermingle definitions of variables with invocations +of procedures. + +When this program runs, there should be three new files in the +working directory (manyparam.english.txt, manyparam.francais.txt +and manyparam.nihongo.txt) each containing a greeting in a different +language. + +In addition to specifying parameters positionally, parameters can be +named, and if desired a default value can be specified. + +Adding another application +~~~~~~~~~~~~~~~~~~~~~~~~~~ +Now we'll define a new application procedure. The procedure we define +will capitalise all the words in the input file. + +To do this, we'll use the unix tr (translate) utility. Here is an +example of using tr on the unix command line, not using Swift: + +---- +$ echo hello | tr '[a-z]' '[A-Z]' +HELLO +---- + +There are two main steps - updating the transformation catalog, and +updating the application block. + +The transformation catalog lists where application executables are located on +remote sites. We need to modify the transformation catalog to define a logical +transformation for the tr utility. The transformation catalog can be found +in etc/tc.data. There are already several entries specifying +where executables can be found. Add a new line to the file, specifying +where tr can be found (usually in /usr/bin/tr but it may differ on +your system), like this: + +---- +localhost tr /usr/bin/tr INSTALLED INTEL32::LINUX null +---- + +For now, ignore all of the fields except the second and the third. The +second field tr specifies a logical application name and the third +specifies the location of the application executable. + +Now that we have defined where to find tr, we can use it in SwiftScript. + +We can define a new procedure, capitalise, which calls tr. + +---- +sys::[sed -n '7,9p' ../../examples/tutorial/capitalise.swift] +---- +We can call capitalise like this: + +---- +sys::[sed -n '12,14p' ../../examples/tutorial/capitalise.swift] +---- + +Here is the full program based on this exercise: + +.capitalise.swift +*********************** +---- +include::../../examples/tutorial/capitalise.swift[] +---- +*********************** + +Next, run swift and verify the output is correct. + +---- +$ swift capitalise.swift +... +$ cat capitalise.2.txt +HELLO FROM SWIFT +---- + +Anonymous files +~~~~~~~~~~~~~~~ +In the previous section, the file hello.txt is used only to store +an intermediate result. We don't really care about which name is used +for the file, and we can let Swift choose the name. + +To do that, omit the mapping entirely when declaring hellofile: + +---- +sys::[sed -n '11p' ../../examples/tutorial/capitalise_anonymous.swift] +---- + +Swift will choose a filename, which in the present version will be in a +subdirectory called _concurrent. + + +Datatypes +~~~~~~~~~ +All data in variables and files has a data type. So far, we've seen two +types: + + - string - this is a built-in type for storing strings of text in + memory, much like in other programming languages + - messagefile - this is a user-defined type used to mark disc resident files as + containing messages + +SwiftScript has the additional built-in types: boolean, integer and +float that function much like their counterparts in other programming +languages. + +It is also possible to create user defined types with more structure, +for example: + + +---- +sys::[sed -n '3,6p' ../../examples/tutorial/types.swift] +---- + +Each element of the structured type can be accessed using a . like this: + +---- +sys::[sed -n '14p' ../../examples/tutorial/types.swift] +---- + +The following complete program, types.swift, outputs a greeting using a +user-defined structure type to hold parameters for the message: + +.types.swift +************ +---- +include::../../examples/tutorial/types.swift[] +---- +************ + +Structured types can be comprised of marker types for files. See the +later section on mappers for more information about this. + + +Arrays +~~~~~~ + +We can define arrays using the [] suffix in a variable declaration: + +---- +sys::[sed -n '9p' ../../examples/tutorial/arrays.swift] +---- + +This program, arrays.swift, will declare an array of message files. + +.arrays.swift +************* +---- +include::../../examples/tutorial/arrays.swift[] +---- +************* + +Observe that the type of the parameter to greeting is now an array of +strings, string s[], instead of a single string, string s, that +elements of the array can be referenced numerically, for example s[0], +and that the array is initialised using an array literal, +["how","are","you"]. + + +Mappers +~~~~~~~ + +A significant difference between SwiftScript and other languages is that +data can be referred to on disk through variables in a very similar +fashion to data in memory. For example, in the above examples we have +seen a variable definition like this: + +---- +sys::[sed -n '7p' ../../examples/tutorial/arrays.swift] +---- + +This means that outfile is a dataset variable, which is mapped to a +file on disk called arrays.txt. This variable can be assigned to +using = in a similar fashion to an in-memory variable. We can say that +outfile is mapped onto the disk file arrays.txt by a mapper. + +There are various ways of mapping in SwiftScript. Two forms of mapping, +simple named mapping and anonymous mapping, have already +been seen in this tutorial. Later exercises will introduce more forms. + +In simple named mapping, the name of the file that a variable is mapped to +is explictly listed. + +---- +sys::[sed -n '7p' ../../examples/tutorial/hello.swift] +---- + +This is useful when you want to explicitly name input and output files +for your program. An example of this can be seen with 'outfile' in the +hello world exercise. + +With anonymous mapping no name is specified in the source code. A name is +automatically generated for the file. This is useful for intermediate +files that are only referenced through SwiftScript. +A variable declaration is mapped anonymously by ommitting any mapper +definition. + +---- +sys::[sed -n '11p' ../../examples/tutorial/capitalise_anonymous.swift] +---- + +Later exercises will introduce other ways of mapping from disk files to +SwiftScript variables. + + +The Regexp Mapper +^^^^^^^^^^^^^^^^^ +In this exercise, we introduce the regexp mapper. This mapper +transforms a string expression using a regular expression, and uses the +result of that transformation as the filename to map. + +regexp.swift demonstrates the use of this by placing output into a +file that is based on the name of the input file. Our input file is +mapped to the inputfile variable using the simple named mapper, then +we use the regular expression mapper to map the output file. We then use +the countwords() procedure to count the words in the input file and +store the result in the output file. In order for the countwords() +procedure to work correctly, add the wc utility (usually found in +/usr/bin/wc) to tc.data. + +The following program replaces the suffix of the input file (regexp_mapper.words.txt) +with a new suffix (.count) to create regexp_mapper.words.count. + +.regexp_mapper.swift +************* +---- +include::../../examples/tutorial/regexp_mapper.swift[] +---- +************** + +fixed_array_mapper +^^^^^^^^^^^^^^^^^^ +The fixed array mapper maps a list of files into an array. Each +element of the array is mapped into one file in the specified directory. +See fixed_array_mapper.swift below. + +.fixed_array_mapper.swift +************************* +---- +include::../../examples/tutorial/fixed_array_mapper.swift[] +---- +************************* + +foreach +~~~~~~~ +SwiftScript provides a control structure, foreach, to operate on each +element of an array in parallel. + +In this example, we will run the previous word counting example over +each file in an array without having to explicitly list the array +elements. The source code for this example is in foreach.swift. This +program uses three input files: foreach.1.txt, foreach.2.txt, and +foreach.3.txt. After you have run the workflow, you should see that there are three +output files: foreach.1.count, foreach.2.count and foreach.3.count, each +containing the word count for the corresponding input file. We combine +the use of the fixed_array_mapper and the regexp_mapper. + +.foreach.swift +************** +---- +include::../../examples/tutorial/foreach.swift[] +---- +************** + +If +~~ +Decisions can be made using 'if', like this: + +---- +sys::[sed -n '11,15p' ../../examples/tutorial/if.swift] +---- + +if.swift contains a simple example of this. Compile and run if.swift +and see that it outputs "good morning". Changing the morning variable +from true to false will cause the program to output "good afternoon". +Here is the contents of the full script: + +.if.swift +********* +----- +include::../../examples/tutorial/if.swift[] +----- +********* + +Sequential iteration +~~~~~~~~~~~~~~~~~~~~ + +A serial execution of instructions can be carried out using the sequential iteration construct. + +The following example demonstrates a simple application. Each step of +the iteration is a string representation of the byte count of the +previous step's output, with iteration terminating when the byte count +reaches zero. + +Here's the program: + +.sequential_iteration.swift +*************************** +---- +include::../../examples/tutorial/sequential_iteration.swift[] +---- +*************************** + +Echo is the standard unix echo utility. + +_wcl_ is our application code. It counts the number of bytes in the one +file and writes that count out to another, like this: + +---- +$ cat ../wcl +#!/bin/bash +echo -n $(wc -c < $1) > $2 + +$ echo -n hello > a +$ wcl a b +$ cat b +5 +---- + +Install the above wcl script somewhere and add a transformation catalog +(tc) entry for it (see an example below, note that you will need to change the path in third column to the path where wcl is located on your localhost). + +---- +localhost wcl /home/ketan/bin/wcl INSTALLED INTEL32::LINUX null +---- + +Then run the example program like this: + + +---- +$ swift iterate.swift +Swift svn swift-r3334 cog-r2752 + +RunID: 20100526-2259-gtlz8zf4 +Progress: +SwiftScript trace: extract int value , 16.0 +SwiftScript trace: extract int value , 2.0 +SwiftScript trace: extract int value , 1.0 +Final status: Finished successfully:4 +---- Deleted: trunk/docs/tutorial/runtime_features =================================================================== --- trunk/docs/tutorial/runtime_features 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/docs/tutorial/runtime_features 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,359 +0,0 @@ -Runtime features ----------------- - -Visualizing the workflow as a graph -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -When running a workflow, its possible to generate a provenance graph at -the same time: - - ------ -$ swift -pgraph graph.dot first.swift -$ dot -ograph.png -Tpng graph.dot ----- - -graph.png can then be viewed using your favourite image viewer. The dot application is part of the graphViz project. More information can be found at http://www.graphviz.org. - -Running on a remote site -~~~~~~~~~~~~~~~~~~~~~~~~ - -As configured by default, all jobs are run locally. In the previous -examples, we've invoked echo and tr executables from our SwiftScript -program. These have been run on the local system (the same computer on -which you ran swift). We can also make our computations run on a -remote resource. - -WARNING: This example is necessarily more vague than previous ones, -because it requires access to remote resources. You should ensure that -you can submit a job using the globus-job-run (or globusrun-ws) -command(s). - -We do not need to modify any SwiftScript code to run on another -resource. Instead, we must modify another catalog, the site catalog. -This catalog provides details of the location that applications will be -run, with the default settings referring to the local machine. We will -modify it to refer to a remote resource - the UC Teraport cluster. If -you are not a UC Teraport user, you should use details of a different -resource that you do have access to. - -The site catalog is located in etc/sites.xml and is a relatively -straightforward XML format file. We must modify each of the following -three settings: gridftp (which indicates how and where data can be -transferred to the remote resource), jobmanager (which indicates how -applications can be run on the remote resource) and workdirectory (which -indicates where working storage can be found on the remote resource). - - -Writing a mapper -~~~~~~~~~~~~~~~~ - -This section will introduce writing a custom mapper so that Swift is -able to access data files laid out in application-specific ways. - -An application-specific mapper must take the form of a Java class that -implements the Mapper - -interface. - -Usually you don't need to implement this interface directly, because -Swift provides a number of more concrete classes with some functionality -already implemented. - -The hierarchy of helper classes is: - -http://www.ci.uchicago.edu/swift/javadoc/vdsk/org/griphyn/vdl/mapping/Mapper.html[Mapper] - -This is the abstract interface for mappers in Swift. You must -implement methods to provide access to mapper properties, to map from a -SwiftScript dataset path (such as foo[1].bar) to a file name, to check -whether a file exists. None of the default Swift mappers implement this -interface directly - instead they use one of the following helper classes. - -http://www.ci.uchicago.edu/swift/javadoc/vdsk/org/griphyn/vdl/mapping/AbstractMapper.html[Abstract Mapper] - -This provides helper methods to manage mapper properties and to handle -existance checking. Examples of mappers which use this class are: -http://www.ci.uchicago.edu/swift/guides/userguide.php#mapper.array_mapper[Array Mapper], -http://www.ci.uchicago.edu/swift/guides/userguide.php#mapper.csv_mapper[CSV Mapper], -http://www.ci.uchicago.edu/swift/guides/userguide.php#mapper.fixed_array_mapper[Fixed Array Mapper], -http://www.ci.uchicago.edu/swift/guides/userguide.php#mapper.regexp_mapper[Regexp Mapper], -and http://www.ci.uchicago.edu/swift/guides/userguide.php#mapper.single_file_mapper[Single File Mapper]. - -http://www.ci.uchicago.edu/swift/javadoc/vdsk/org/griphyn/vdl/mapping/file/AbstractFileMapper.html[AbstractFileMapper] -This provides a helper class for mappers which select files based on -selecting files from a directory listing. It is necessary to write some -helper methods that are different from the above mapper methods. -Examples of mappers which use this class are: -http://www.ci.uchicago.edu/swift/guides/userguide.php#mapper.simple_mapper[simple_mapper], -http://www.ci.uchicago.edu/swift/guides/userguide.php#mapper.filesys_mapper[filesys_mapper], -and the (undocumented) StructuredRegularExpressionMapper. - -In general, to write a mapper, choose either the AbstractMapper or the -AbstractFileMapper and extend those. If your mapper will generally -select the files it returns based on a directory listing and will -convert paths to filenames using some regular conversion (for example, -in the way that simple_mapper maps files in a directory that match a -particular pattern), then you should probably use the -AbstractFileMapper. If your mapper will produce a list of files in some -other way (for example, in the way that csv_mapper maps based on -filenames given in a CSV file rather than looking at which files are in -a directory), then you should probably use the AbstractMapper. - - -Writing a very basic mapper -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -In this section, we will write a very basic (almost useless) mapper that -will map a SwiftScript dataset into a hardcoded file called -myfile.txt, like this: - - - Swift variable Filename - - var <-----------------------------> myfile.txt - -We should be able to use the mapper we write in a SwiftScript program -like this: - - ----- -type file; -file f ; ----- - -First we must choose a base class - AbstractMapper or -AbstractFileMapper. We aren't going to use a directory listing to decide -on our mapping - we are getting the mapping from some other source (in -fact, it will be hard coded). So we will use AbstractMapper. - -So now onto the source code. We must define a subclass of AbstractMapper -and implement several mapper methods: isStatic, existing, and map. These -methods are documented in the javadoc for the Mapper interface. - -Here is the code implementing this mapper. Put this in your source -vdsk directory, make a directory src/tutorial/|and put this file in -src/tutorial/MyFirstMapper.java. - - ----- -package tutorial; - -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; - -import org.griphyn.vdl.mapping.AbsFile; -import org.griphyn.vdl.mapping.AbstractMapper; -import org.griphyn.vdl.mapping.Path; -import org.griphyn.vdl.mapping.PhysicalFormat; - -public class MyFirstMapper extends AbstractMapper { - - AbsFile myfile = new AbsFile("myfile.txt"); - - public boolean isStatic() { - return false; - } - - public Collection existing() { - if (myfile.exists()) - return Arrays.asList(new Path[] {Path.EMPTY_PATH}); - else - return Collections.EMPTY_LIST; - } - - public PhysicalFormat map(Path p) { - if(p.equals(Path.EMPTY_PATH)) - return myfile; - else - return null; - } -} ----- - -Now we need to inform the Swift engine about the existence of this -mapper. We do that by editing the MapperFactory class definition, in -src/org/griphyn/vdl/mapping/MapperFactory.java and adding a -registerMapper call alongside the existing registerMapper calls, like this: - - ----- -registerMapper("my_first_mapper", tutorial.MyFirstMapper.class); ----- - -The first parameter is the name of the mapper that will be used in -SwiftScript program. The second parameter is the new Mapper class that -we just wrote. - -Now rebuild Swift using the "ant redist" target. - -This new Swift build will be aware of your new mapper. We can test it -out with a hello world program: - - ----- -type messagefile; - -(messagefile t) greeting() { - app { - echo "hello" stdout=@filename(t); - } -} - -messagefile outfile ; - -outfile = greeting(); ----- - -Run this program, and hopefully you will find the "hello" string has -been output into the hard coded output file myfile.txt: - - ----- -$ cat myfile.txt -hello ----- - -So that's a first very simple mapper implemented. Compare the source -code to the single_file_mapper in -http://www.ci.uchicago.edu/trac/swift/browser/trunk/src/org/griphyn/vdl/mapping/file/SingleFileMapper.java[SingleFileMapper.java]. -There is not much more code to the single_file_mapper - mostly code to -deal with the file parameter. - - -Starting and restarting -~~~~~~~~~~~~~~~~~~~~~~~ - -Now we're going to try out the restart capabilities of Swift. We will -make a workflow that will deliberately fail, and then we will fix the -problem so that Swift can continue with the workflow. - -First we have the program in working form, restart.swift. - - ----- -include::../../examples/restart.swift[] ----- - -We must define some transformation catalog entries: - - ----- -localhost touch /usr/bin/touch INSTALLED INTEL32::LINUX null -localhost broken /bin/true INSTALLED INTEL32::LINUX null ----- - -Now we can run the program: - - ----- -$ swift restart.swift -Swift 0.9 swift-r2860 cog-r2388 - -RunID: 20100526-1119-3kgzzi15 -Progress: -Final status: Finished successfully:4 ----- - -Four jobs run - touch, echo, broken and a final echo. (note that broken -isn't actually broken yet). - -Now we will break the broken job and see what happens. Replace the -definition in tc.data for broken with this: - - ----- -localhost broken /bin/false INSTALLED INTEL32::LINUX null ----- - -Now when we run the workflow, the broken task fails: - - ----- -$ swift restart.swift - -Swift 0.9 swift-r2860 cog-r2388 - -RunID: 20100526-1121-tssdcljg -Progress: -Progress: Stage in:1 Finished successfully:2 -Execution failed: - Exception in broken: -Arguments: [process] -Host: localhost -Directory: restart-20100526-1121-tssdcljg/jobs/1/broken-1i6ufisj -stderr.txt: -stdout.txt: ----- - -From the output we can see that touch and the first echo completed, but -then broken failed and so swift did not attempt to execute the final echo. - -There will be a restart log with the same name as the RunID: - - ----- -$ ls *20100526-1121-tssdcljg*rlog -restart-20100526-1121-tssdcljg.0.rlog ----- - -This restart log contains enough information for swift to know which -parts of the workflow were executed successfully. - -We can try to rerun it immediately, like this: - - ----- -$ swift -resume restart-20100526-1121-tssdcljg.0.rlog restart.swift - -Swift 0.9 swift-r2860 cog-r2388 - -RunID: 20100526-1125-7yx0zi6d -Progress: -Execution failed: - Exception in broken: -Arguments: [process] -Host: localhost -Directory: restart-20100526-1125-7yx0zi6d/jobs/m/broken-msn1gisj -stderr.txt: -stdout.txt: - -Caused by: - Exit code 1 ----- - -Swift tried to resume the workflow by executing "broken" again. It did -not try to run the touch or first echo jobs, because the restart log -says that they do not need to be executed again. - -Broken failed again, leaving the original restart log in place. - -Now we will fix the problem with "broken" by restoring the original -tc.data line that works. - -Remove the existing "broken" line and replace it with the successful -tc.data entry above: - - ----- -localhost broken /bin/true INSTALLED INTEL32::LINUX null ----- - -Now run again: - - ----- -$ swift -resume restart-20100526-1121-tssdcljg.0.rlog restart.swift - -Swift 0.9 swift-r2860 cog-r2388 - -RunID: 20100526-1128-a2gfuxhg -Progress: -Final status: Initializing:2 Finished successfully:2 ----- - -Swift tries to run "broken" again. This time it works, and so Swift -continues on to execute the final piece of the workflow as if nothing -had ever gone wrong. - Added: trunk/docs/tutorial/runtime_features =================================================================== --- trunk/docs/tutorial/runtime_features (rev 0) +++ trunk/docs/tutorial/runtime_features 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,317 @@ +Runtime features +---------------- + +Visualizing the workflow as a graph +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +When running a workflow, its possible to generate a provenance graph at +the same time: + + +----- +$ swift -pgraph graph.dot first.swift +$ dot -ograph.png -Tpng graph.dot +---- + +graph.png can then be viewed using your favourite image viewer. The dot application is part of the graphViz project. More information can be found at http://www.graphviz.org. + +Running on a remote site +~~~~~~~~~~~~~~~~~~~~~~~~ + +As configured by default, all jobs are run locally. In the previous +examples, we've invoked echo and tr executables from our SwiftScript +program. These have been run on the local system (the same computer on +which you ran swift). We can also make our computations run on a +remote resource. + +WARNING: This example is necessarily more vague than previous ones, +because it requires access to remote resources. You should ensure that +you can submit a job using the globus-job-run (or globusrun-ws) +command(s). + +We do not need to modify any SwiftScript code to run on another +resource. Instead, we must modify another catalog, the site catalog. +This catalog provides details of the location that applications will be +run, with the default settings referring to the local machine. We will +modify it to refer to a remote resource - the UC Teraport cluster. If +you are not a UC Teraport user, you should use details of a different +resource that you do have access to. + +The site catalog is located in etc/sites.xml and is a relatively +straightforward XML format file. We must modify each of the following +three settings: gridftp (which indicates how and where data can be +transferred to the remote resource), jobmanager (which indicates how +applications can be run on the remote resource) and workdirectory (which +indicates where working storage can be found on the remote resource). + + +Writing a mapper +~~~~~~~~~~~~~~~~ + +This section will introduce writing a custom mapper so that Swift is +able to access data files laid out in application-specific ways. + +An application-specific mapper must take the form of a Java class that +implements the http://www.ci.uchicago.edu/swift/javadoc/vdsk/org/griphyn/vdl/mapping/Mapper.html[Mapper +interface]. + +Usually you don't need to implement this interface directly, because +Swift provides a number of more concrete classes with some functionality +already implemented. + +The hierarchy of helper classes is: + +http://www.ci.uchicago.edu/swift/javadoc/vdsk/org/griphyn/vdl/mapping/Mapper.html[Mapper] + +This is the abstract interface for mappers in Swift. You must +implement methods to provide access to mapper properties, to map from a +SwiftScript dataset path (such as foo[1].bar) to a file name, to check +whether a file exists. None of the default Swift mappers implement this +interface directly - instead they use one of the following helper classes. + +http://www.ci.uchicago.edu/swift/javadoc/vdsk/org/griphyn/vdl/mapping/AbstractMapper.html[Abstract Mapper] + +This provides helper methods to manage mapper properties and to handle +existance checking. Examples of mappers which use this class are: +http://www.ci.uchicago.edu/swift/guides/userguide.php#mapper.array_mapper[Array Mapper], +http://www.ci.uchicago.edu/swift/guides/userguide.php#mapper.csv_mapper[CSV Mapper], +http://www.ci.uchicago.edu/swift/guides/userguide.php#mapper.fixed_array_mapper[Fixed Array Mapper], +http://www.ci.uchicago.edu/swift/guides/userguide.php#mapper.regexp_mapper[Regexp Mapper], +and http://www.ci.uchicago.edu/swift/guides/userguide.php#mapper.single_file_mapper[Single File Mapper]. + +http://www.ci.uchicago.edu/swift/javadoc/vdsk/org/griphyn/vdl/mapping/file/AbstractFileMapper.html[AbstractFileMapper] +This provides a helper class for mappers which select files based on +selecting files from a directory listing. It is necessary to write some +helper methods that are different from the above mapper methods. +Examples of mappers which use this class are: +http://www.ci.uchicago.edu/swift/guides/userguide.php#mapper.simple_mapper[simple_mapper], +http://www.ci.uchicago.edu/swift/guides/userguide.php#mapper.filesys_mapper[filesys_mapper], +and the StructuredRegularExpressionMapper. + +In general, to write a mapper, choose either the AbstractMapper or the +AbstractFileMapper and extend those. If your mapper will generally +select the files it returns based on a directory listing and will +convert paths to filenames using some regular conversion (for example, +in the way that simple_mapper maps files in a directory that match a +particular pattern), then you should probably use the +AbstractFileMapper. If your mapper will produce a list of files in some +other way (for example, in the way that csv_mapper maps based on +filenames given in a CSV file rather than looking at which files are in +a directory), then you should probably use the AbstractMapper. + + +Writing a very basic mapper +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +In this section, we will write a very basic (almost useless) mapper that +will map a SwiftScript dataset into a hardcoded file called +myfile.txt, like this: + + + Swift variable Filename + + var <-----------------------------> myfile.txt + +We should be able to use the mapper we write in a SwiftScript program +like this: + + +---- +type file; +file f ; +---- + +First we must choose a base class - AbstractMapper or +AbstractFileMapper. We aren't going to use a directory listing to decide +on our mapping - we are getting the mapping from some other source (in +fact, it will be hard coded). So we will use AbstractMapper. + +So now onto the source code. We must define a subclass of AbstractMapper +and implement several mapper methods: isStatic, existing, and map. These +methods are documented in the javadoc for the Mapper interface. + +Here is the code implementing this mapper. Put this in your source +vdsk directory, make a directory src/tutorial/|and put this file in +src/tutorial/MyFirstMapper.java. + +.MyFirstMapper.java +******************* +---- +include::../../examples/tutorial/MyFirstMapper.java[] +---- +******************* + +Now we need to inform the Swift engine about the existence of this +mapper. We do that by editing the MapperFactory class definition, in +src/org/griphyn/vdl/mapping/MapperFactory.java and adding a +registerMapper call alongside the existing registerMapper calls, like this: + + +---- +registerMapper("my_first_mapper", tutorial.MyFirstMapper.class); +---- + +The first parameter is the name of the mapper that will be used in +SwiftScript program. The second parameter is the new Mapper class that +we just wrote. + +Now rebuild Swift using the "ant redist" target. + +This new Swift build will be aware of your new mapper. We can test it +out with a hello world program: + +.my_first_mapper.swift +********************** +----- +include::../../examples/tutorial/my_first_mapper.swift[] +----- +********************** + +Run this program, and hopefully you will find the "hello" string has +been output into the hard coded output file myfile.txt: + + +---- +$ cat myfile.txt +hello +---- + +So that's a first very simple mapper implemented. Compare the source +code to the single_file_mapper in +http://www.ci.uchicago.edu/trac/swift/browser/trunk/src/org/griphyn/vdl/mapping/file/SingleFileMapper.java[SingleFileMapper.java]. +There is not much more code to the single_file_mapper - mostly code to +deal with the file parameter. + + +Starting and restarting +~~~~~~~~~~~~~~~~~~~~~~~ + +Now we're going to try out the restart capabilities of Swift. We will +make a workflow that will deliberately fail, and then we will fix the +problem so that Swift can continue with the workflow. + +First we have the program in working form, restart.swift. + +.restart.swift +************** +---- +include::../../examples/tutorial/restart.swift[] +---- +************** + +We must define some transformation catalog entries: + +---- +localhost touch /usr/bin/touch INSTALLED INTEL32::LINUX null +localhost broken /bin/true INSTALLED INTEL32::LINUX null +---- + +Now we can run the program: + +---- +$ swift restart.swift +Swift 0.9 swift-r2860 cog-r2388 + +RunID: 20100526-1119-3kgzzi15 +Progress: +Final status: Finished successfully:4 +---- + +Four jobs run - touch, echo, broken and a final echo. (note that broken +isn't actually broken yet). + +Now we will break the broken job and see what happens. Replace the +definition in tc.data for broken with this: + +---- +localhost broken /bin/false INSTALLED INTEL32::LINUX null +---- + +Now when we run the workflow, the broken task fails: + +---- +$ swift restart.swift + +Swift 0.9 swift-r2860 cog-r2388 + +RunID: 20100526-1121-tssdcljg +Progress: +Progress: Stage in:1 Finished successfully:2 +Execution failed: + Exception in broken: +Arguments: [process] +Host: localhost +Directory: restart-20100526-1121-tssdcljg/jobs/1/broken-1i6ufisj +stderr.txt: +stdout.txt: +---- + +From the output we can see that touch and the first echo completed, but +then broken failed and so swift did not attempt to execute the final echo. + +There will be a restart log with the same name as the RunID: + + +---- +$ ls *20100526-1121-tssdcljg*rlog +restart-20100526-1121-tssdcljg.0.rlog +---- + +This restart log contains enough information for swift to know which +parts of the workflow were executed successfully. + +We can try to rerun it immediately, like this: + + +---- +$ swift -resume restart-20100526-1121-tssdcljg.0.rlog restart.swift + +Swift 0.9 swift-r2860 cog-r2388 + +RunID: 20100526-1125-7yx0zi6d +Progress: +Execution failed: + Exception in broken: +Arguments: [process] +Host: localhost +Directory: restart-20100526-1125-7yx0zi6d/jobs/m/broken-msn1gisj +stderr.txt: +stdout.txt: + +Caused by: + Exit code 1 +---- + +Swift tried to resume the workflow by executing "broken" again. It did +not try to run the touch or first echo jobs, because the restart log +says that they do not need to be executed again. + +Broken failed again, leaving the original restart log in place. + +Now we will fix the problem with "broken" by restoring the original +tc.data line that works. + +Remove the existing "broken" line and replace it with the successful +tc.data entry above: + + +---- +localhost broken /bin/true INSTALLED INTEL32::LINUX null +---- + +Now run again: + + +---- +$ swift -resume restart-20100526-1121-tssdcljg.0.rlog restart.swift + +Swift 0.9 swift-r2860 cog-r2388 + +RunID: 20100526-1128-a2gfuxhg +Progress: +Final status: Initializing:2 Finished successfully:2 +---- + +Swift tries to run "broken" again. This time it works, and so Swift +continues on to execute the final piece of the workflow as if nothing +had ever gone wrong. Added: trunk/docs/tutorial/tutorial.html =================================================================== --- trunk/docs/tutorial/tutorial.html (rev 0) +++ trunk/docs/tutorial/tutorial.html 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,1507 @@ + + + + + +A Swift Tutorial + + + + + +
+

1. Introduction

+
+

This is an introductory tutorial describing the use of Swift and its programming +language SwiftScript. It is intended to introduce new users to the basics of Swift. +It is structured as a series of simple exercises/examples which you can +try for yourself as you read along.

+

For information on getting an installation of Swift running, consult the +Swift Quickstart Guide. We advise you to install the latest stable release of Swift. +Return to this document when you have successfully run the test SwiftScript program mentioned there.

+

There is also a +Swift User Guide +which contains a more detailed reference material on topics covered in this manual. All +of the programs included in this tutorial can be found in your Swift +distribution in the examples/tutorial directory.

+
+

2. Hello World

+
+

The first example program, hello.swift, outputs a hello world message +into a file called hello.txt.

+
+
+

To run hello.swift, change directories to the location of the script +and run the swift command as follows.

+
+ + + +
+Tip +Make sure the bin directory of your swift installation is in your PATH.
+
+
+
+
$ cd examples/tutorial
+$ swift hello.swift
+Swift svn swift-r3334 (swift modified locally) cog-r2752
+
+RunID: 20100526-1925-8zjupq1b
+Progress:
+Final status:  Finished successfully:1
+$ cat hello.txt
+Hello, world!
+
+

The basic structure of this program is a type definition, an +application procedure definition, a variable definition and then a +call to the procedure.

+

First we define a new type, called messagefile. In this example, we will +use this messagefile type for our output message.

+
+
+
type messagefile;
+
+

All data in SwiftScript must be typed, whether it is stored in memory or +on disk. This example defines a very simple type. Later on we will see +more complex type examples.

+
+
+
app (messagefile t) greeting() {
+    echo "Hello, world!" stdout=@filename(t);
+}
+
+

Next we define a procedure called greeting. This procedure will write +out the "hello world" message to a file. To achieve this, it executes +the unix utility echo with a parameter "Hello, world!" and directs +the standard output into the output file.

+

The actual file to use is specified by the return parameter, t.

+
+
+
messagefile outfile <"hello.txt">;
+
+

Here we define a variable called outfile. The type of this variable is +messagefile, and we specify that the contents of this variable will be +stored on disk in a file called hello.txt

+
+
+
app (messagefile t) greeting() {
+    echo "Hello, world!" stdout=@filename(t);
+}
+
+

Now we call the greeting procedure, with its output going to the outfile +variable and therefore to hello.txt on disk.

+

Over the following exercises, we’ll extend this simple hello world +program to demonstrate various features of Swift.

+
+

3. Language features

+
+

3.1. Parameters

+

Procedures can have parameters. Input parameters specify inputs to the +procedure and output parameters specify outputs. Our hello world greeting +procedure already uses an output parameter, t, which indicates where the +greeting output will go. In this section, we will modify the previous +script to add an input parameter to the greeting function.

+
+
+

We have modified the signature of the greeting procedure to indicate +that it takes a single parameter, s, of type string.

+

We have modified the invocation of the echo utility so that it takes +the value of s as a parameter, instead of the string literal "Hello, +world!".

+

We have modified the output file definition to point to a different file +on disk.

+

We have modified the invocation of greeting so that a greeting string is +supplied.

+

The code for this section can be found in parameter.swift. It can be +invoked using the swift command, with output appearing in parameter.hello.txt:

+
+
+
$ swift parameter.swift
+
+

Now that we can choose our greeting text, we can call the same procedure +with different parameters to generate several output files with +different greetings. The code is in manyparam.swift and can be run as +before using the swift command.

+
+
+

Note that we can intermingle definitions of variables with invocations +of procedures.

+

When this program runs, there should be three new files in the +working directory (manyparam.english.txt, manyparam.francais.txt +and manyparam.nihongo.txt) each containing a greeting in a different +language.

+

In addition to specifying parameters positionally, parameters can be +named, and if desired a default value can be specified.

+

3.2. Adding another application

+

Now we’ll define a new application procedure. The procedure we define +will capitalise all the words in the input file.

+

To do this, we’ll use the unix tr (translate) utility. Here is an +example of using tr on the unix command line, not using Swift:

+
+
+
$ echo hello | tr '[a-z]' '[A-Z]'
+HELLO
+
+

There are two main steps - updating the transformation catalog, and +updating the application block.

+

The transformation catalog lists where application executables are located on +remote sites. We need to modify the transformation catalog to define a logical +transformation for the tr utility. The transformation catalog can be found +in etc/tc.data. There are already several entries specifying +where executables can be found. Add a new line to the file, specifying +where tr can be found (usually in /usr/bin/tr but it may differ on +your system), like this:

+
+
+
localhost       tr      /usr/bin/tr     INSTALLED       INTEL32::LINUX  null
+
+

For now, ignore all of the fields except the second and the third. The +second field tr specifies a logical application name and the third +specifies the location of the application executable.

+

Now that we have defined where to find tr, we can use it in SwiftScript.

+

We can define a new procedure, capitalise, which calls tr.

+
+
+
app (messagefile o) capitalise(messagefile i) {
+    tr "[a-z]" "[A-Z]" stdin=@filename(i) stdout=@filename(o);
+}
+
+

We can call capitalise like this:

+
+
+
messagefile final <"capitalise.2.txt">;
+hellofile = greeting("hello from Swift");
+final = capitalise(hellofile);
+
+

Here is the full program based on this exercise:

+
+
+

Next, run swift and verify the output is correct.

+
+
+
$ swift capitalise.swift
+...
+$ cat capitalise.2.txt
+HELLO FROM SWIFT
+
+

3.3. Anonymous files

+

In the previous section, the file hello.txt is used only to store +an intermediate result. We don’t really care about which name is used +for the file, and we can let Swift choose the name.

+

To do that, omit the mapping entirely when declaring hellofile:

+
+
+
messagefile hellofile;
+
+

Swift will choose a filename, which in the present version will be in a +subdirectory called _concurrent.

+

3.4. Datatypes

+

All data in variables and files has a data type. So far, we’ve seen two +types:

+
    +
  • +

    +string - this is a built-in type for storing strings of text in + memory, much like in other programming languages +

    +
  • +
  • +

    +messagefile - this is a user-defined type used to mark disc resident files as + containing messages +

    +
  • +
+

SwiftScript has the additional built-in types: boolean, integer and +float that function much like their counterparts in other programming +languages.

+

It is also possible to create user defined types with more structure, +for example:

+
+
+
type details {
+    string name;
+    int pies;
+}
+
+

Each element of the structured type can be accessed using a . like this:

+
+
+
person.name = "John";
+
+

The following complete program, types.swift, outputs a greeting using a +user-defined structure type to hold parameters for the message:

+
+
+

Structured types can be comprised of marker types for files. See the +later section on mappers for more information about this.

+

3.5. Arrays

+

We can define arrays using the [] suffix in a variable declaration:

+
+
+
string words[] = ["how","are","you"];
+
+

This program, arrays.swift, will declare an array of message files.

+
+
+

Observe that the type of the parameter to greeting is now an array of +strings, string s[], instead of a single string, string s, that +elements of the array can be referenced numerically, for example s[0], +and that the array is initialised using an array literal, +["how","are","you"].

+

3.6. Mappers

+

A significant difference between SwiftScript and other languages is that +data can be referred to on disk through variables in a very similar +fashion to data in memory. For example, in the above examples we have +seen a variable definition like this:

+
+
+
messagefile outfile <"arrays.txt">;
+
+

This means that outfile is a dataset variable, which is mapped to a +file on disk called arrays.txt. This variable can be assigned to +using = in a similar fashion to an in-memory variable. We can say that +outfile is mapped onto the disk file arrays.txt by a mapper.

+

There are various ways of mapping in SwiftScript. Two forms of mapping, +simple named mapping and anonymous mapping, have already +been seen in this tutorial. Later exercises will introduce more forms.

+

In simple named mapping, the name of the file that a variable is mapped to +is explictly listed.

+
+
+
messagefile outfile <"hello.txt">;
+
+

This is useful when you want to explicitly name input and output files +for your program. An example of this can be seen with outfile in the +hello world exercise.

+

With anonymous mapping no name is specified in the source code. A name is +automatically generated for the file. This is useful for intermediate +files that are only referenced through SwiftScript. +A variable declaration is mapped anonymously by ommitting any mapper +definition.

+
+
+
messagefile hellofile;
+
+

Later exercises will introduce other ways of mapping from disk files to +SwiftScript variables.

+

3.6.1. The Regexp Mapper

+

In this exercise, we introduce the regexp mapper. This mapper +transforms a string expression using a regular expression, and uses the +result of that transformation as the filename to map.

+

regexp.swift demonstrates the use of this by placing output into a +file that is based on the name of the input file. Our input file is +mapped to the inputfile variable using the simple named mapper, then +we use the regular expression mapper to map the output file. We then use +the countwords() procedure to count the words in the input file and +store the result in the output file. In order for the countwords() +procedure to work correctly, add the wc utility (usually found in +/usr/bin/wc) to tc.data.

+

The following program replaces the suffix of the input file (regexp_mapper.words.txt) +with a new suffix (.count) to create regexp_mapper.words.count.

+
+
+

3.6.2. fixed_array_mapper

+

The fixed array mapper maps a list of files into an array. Each +element of the array is mapped into one file in the specified directory. +See fixed_array_mapper.swift below.

+
+
+

3.7. foreach

+

SwiftScript provides a control structure, foreach, to operate on each +element of an array in parallel.

+

In this example, we will run the previous word counting example over +each file in an array without having to explicitly list the array +elements. The source code for this example is in foreach.swift. This +program uses three input files: foreach.1.txt, foreach.2.txt, and +foreach.3.txt. After you have run the workflow, you should see that there are three +output files: foreach.1.count, foreach.2.count and foreach.3.count, each +containing the word count for the corresponding input file. We combine +the use of the fixed_array_mapper and the regexp_mapper.

+
+
+

3.8. If

+

Decisions can be made using if, like this:

+
+
+
if(morning) {
+  outfile = greeting("good morning");
+} else {
+  outfile = greeting("good afternoon");
+}
+
+

if.swift contains a simple example of this. Compile and run if.swift +and see that it outputs "good morning". Changing the morning variable +from true to false will cause the program to output "good afternoon". +Here is the contents of the full script:

+
+
+

3.9. Sequential iteration

+

A serial execution of instructions can be carried out using the sequential iteration construct.

+

The following example demonstrates a simple application. Each step of +the iteration is a string representation of the byte count of the +previous step’s output, with iteration terminating when the byte count +reaches zero.

+

Here’s the program:

+
+
+

Echo is the standard unix echo utility.

+

wcl is our application code. It counts the number of bytes in the one +file and writes that count out to another, like this:

+
+
+
$ cat ../wcl
+#!/bin/bash
+echo -n $(wc -c < $1) > $2
+
+$ echo -n hello > a
+$ wcl a b
+$ cat b
+5
+
+

Install the above wcl script somewhere and add a transformation catalog +(tc) entry for it (see an example below, note that you will need to change the path in third column to the path where wcl is located on your localhost).

+
+
+
localhost wcl /home/ketan/bin/wcl  INSTALLED  INTEL32::LINUX  null
+
+

Then run the example program like this:

+
+
+
$ swift iterate.swift
+Swift svn swift-r3334 cog-r2752
+
+RunID: 20100526-2259-gtlz8zf4
+Progress:
+SwiftScript trace: extract int value , 16.0
+SwiftScript trace: extract int value , 2.0
+SwiftScript trace: extract int value , 1.0
+Final status:  Finished successfully:4
+
+
+

4. Runtime features

+
+

4.1. Visualizing the workflow as a graph

+

When running a workflow, its possible to generate a provenance graph at +the same time:

+
+
+
$ swift -pgraph graph.dot first.swift
+$ dot -ograph.png -Tpng graph.dot
+
+

graph.png can then be viewed using your favourite image viewer. The dot application is part of the graphViz project. More information can be found at http://www.graphviz.org.

+

4.2. Running on a remote site

+

As configured by default, all jobs are run locally. In the previous +examples, we’ve invoked echo and tr executables from our SwiftScript +program. These have been run on the local system (the same computer on +which you ran swift). We can also make our computations run on a +remote resource.

+
+ + + +
+Warning +This example is necessarily more vague than previous ones, +because it requires access to remote resources. You should ensure that +you can submit a job using the globus-job-run (or globusrun-ws) +command(s).
+
+

We do not need to modify any SwiftScript code to run on another +resource. Instead, we must modify another catalog, the site catalog. +This catalog provides details of the location that applications will be +run, with the default settings referring to the local machine. We will +modify it to refer to a remote resource - the UC Teraport cluster. If +you are not a UC Teraport user, you should use details of a different +resource that you do have access to.

+

The site catalog is located in etc/sites.xml and is a relatively +straightforward XML format file. We must modify each of the following +three settings: gridftp (which indicates how and where data can be +transferred to the remote resource), jobmanager (which indicates how +applications can be run on the remote resource) and workdirectory (which +indicates where working storage can be found on the remote resource).

+

4.3. Writing a mapper

+

This section will introduce writing a custom mapper so that Swift is +able to access data files laid out in application-specific ways.

+

An application-specific mapper must take the form of a Java class that +implements the Mapper +interface.

+

Usually you don’t need to implement this interface directly, because +Swift provides a number of more concrete classes with some functionality +already implemented.

+

The hierarchy of helper classes is:

+ +

This is the abstract interface for mappers in Swift. You must +implement methods to provide access to mapper properties, to map from a +SwiftScript dataset path (such as foo[1].bar) to a file name, to check +whether a file exists. None of the default Swift mappers implement this +interface directly - instead they use one of the following helper classes.

+ +

This provides helper methods to manage mapper properties and to handle +existance checking. Examples of mappers which use this class are: +Array Mapper, +CSV Mapper, +Fixed Array Mapper, +Regexp Mapper, +and Single File Mapper.

+

AbstractFileMapper +This provides a helper class for mappers which select files based on +selecting files from a directory listing. It is necessary to write some +helper methods that are different from the above mapper methods. +Examples of mappers which use this class are: +simple_mapper, +filesys_mapper, +and the StructuredRegularExpressionMapper.

+

In general, to write a mapper, choose either the AbstractMapper or the +AbstractFileMapper and extend those. If your mapper will generally +select the files it returns based on a directory listing and will +convert paths to filenames using some regular conversion (for example, +in the way that simple_mapper maps files in a directory that match a +particular pattern), then you should probably use the +AbstractFileMapper. If your mapper will produce a list of files in some +other way (for example, in the way that csv_mapper maps based on +filenames given in a CSV file rather than looking at which files are in +a directory), then you should probably use the AbstractMapper.

+

4.4. Writing a very basic mapper

+

In this section, we will write a very basic (almost useless) mapper that +will map a SwiftScript dataset into a hardcoded file called +myfile.txt, like this:

+
+
+
Swift variable                            Filename
+
+
+
+
var   <----------------------------->    myfile.txt
+
+

We should be able to use the mapper we write in a SwiftScript program +like this:

+
+
+
type file;
+file f <my_first_mapper>;
+
+

First we must choose a base class - AbstractMapper or +AbstractFileMapper. We aren’t going to use a directory listing to decide +on our mapping - we are getting the mapping from some other source (in +fact, it will be hard coded). So we will use AbstractMapper.

+

So now onto the source code. We must define a subclass of AbstractMapper +and implement several mapper methods: isStatic, existing, and map. These +methods are documented in the javadoc for the Mapper interface.

+

Here is the code implementing this mapper. Put this in your source +vdsk directory, make a directory src/tutorial/|and put this file in +src/tutorial/MyFirstMapper.java.

+
+
+

Now we need to inform the Swift engine about the existence of this +mapper. We do that by editing the MapperFactory class definition, in +src/org/griphyn/vdl/mapping/MapperFactory.java and adding a +registerMapper call alongside the existing registerMapper calls, like this:

+
+
+
registerMapper("my_first_mapper", tutorial.MyFirstMapper.class);
+
+

The first parameter is the name of the mapper that will be used in +SwiftScript program. The second parameter is the new Mapper class that +we just wrote.

+

Now rebuild Swift using the "ant redist" target.

+

This new Swift build will be aware of your new mapper. We can test it +out with a hello world program:

+
+
+

Run this program, and hopefully you will find the "hello" string has +been output into the hard coded output file myfile.txt:

+
+
+
$ cat myfile.txt
+hello
+
+

So that’s a first very simple mapper implemented. Compare the source +code to the single_file_mapper in +SingleFileMapper.java. +There is not much more code to the single_file_mapper - mostly code to +deal with the file parameter.

+

4.5. Starting and restarting

+

Now we’re going to try out the restart capabilities of Swift. We will +make a workflow that will deliberately fail, and then we will fix the +problem so that Swift can continue with the workflow.

+

First we have the program in working form, restart.swift.

+
+
+

We must define some transformation catalog entries:

+
+
+
localhost   touch   /usr/bin/touch  INSTALLED   INTEL32::LINUX  null
+localhost   broken  /bin/true   INSTALLED   INTEL32::LINUX  null
+
+

Now we can run the program:

+
+
+
$ swift restart.swift
+Swift 0.9 swift-r2860 cog-r2388
+
+RunID: 20100526-1119-3kgzzi15
+Progress:
+Final status:  Finished successfully:4
+
+

Four jobs run - touch, echo, broken and a final echo. (note that broken +isn’t actually broken yet).

+

Now we will break the broken job and see what happens. Replace the +definition in tc.data for broken with this:

+
+
+
localhost    broken     /bin/false   INSTALLED       INTEL32::LINUX  null
+
+

Now when we run the workflow, the broken task fails:

+
+
+
$ swift restart.swift
+
+Swift 0.9 swift-r2860 cog-r2388
+
+RunID: 20100526-1121-tssdcljg
+Progress:
+Progress:  Stage in:1  Finished successfully:2
+Execution failed:
+    Exception in broken:
+Arguments: [process]
+Host: localhost
+Directory: restart-20100526-1121-tssdcljg/jobs/1/broken-1i6ufisj
+stderr.txt:
+stdout.txt:
+
+

From the output we can see that touch and the first echo completed, but +then broken failed and so swift did not attempt to execute the final echo.

+

There will be a restart log with the same name as the RunID:

+
+
+
$ ls *20100526-1121-tssdcljg*rlog
+restart-20100526-1121-tssdcljg.0.rlog
+
+

This restart log contains enough information for swift to know which +parts of the workflow were executed successfully.

+

We can try to rerun it immediately, like this:

+
+
+
$ swift -resume restart-20100526-1121-tssdcljg.0.rlog restart.swift
+
+Swift 0.9 swift-r2860 cog-r2388
+
+RunID: 20100526-1125-7yx0zi6d
+Progress:
+Execution failed:
+    Exception in broken:
+Arguments: [process]
+Host: localhost
+Directory: restart-20100526-1125-7yx0zi6d/jobs/m/broken-msn1gisj
+stderr.txt:
+stdout.txt:
+
+Caused by:
+    Exit code 1
+
+

Swift tried to resume the workflow by executing "broken" again. It did +not try to run the touch or first echo jobs, because the restart log +says that they do not need to be executed again.

+

Broken failed again, leaving the original restart log in place.

+

Now we will fix the problem with "broken" by restoring the original +tc.data line that works.

+

Remove the existing "broken" line and replace it with the successful +tc.data entry above:

+
+
+
localhost       broken          /bin/true   INSTALLED       INTEL32::LINUX  null
+
+

Now run again:

+
+
+
$ swift -resume restart-20100526-1121-tssdcljg.0.rlog restart.swift
+
+Swift 0.9 swift-r2860 cog-r2388
+
+RunID: 20100526-1128-a2gfuxhg
+Progress:
+Final status:  Initializing:2  Finished successfully:2
+
+

Swift tries to run "broken" again. This time it works, and so Swift +continues on to execute the final piece of the workflow as if nothing +had ever gone wrong.

+
+

5. Bits

+
+

5.1. Named and optional parameters

+

In addition to specifying parameters positionally, parameters can be +named, and if desired a default value can be specified:

+
+
+
+
+

+ + + Deleted: trunk/docs/tutorial/tutorial.txt =================================================================== --- trunk/docs/tutorial/tutorial.txt 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/docs/tutorial/tutorial.txt 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,17 +0,0 @@ -A Swift Tutorial -================ - -:toc: -:icons: -:website: http://www.ci.uchicago.edu/swift/guides/tutorial.php -:numbered: - -include::introduction[] - -include::hello_world[] - -include::language_features[] - -include::runtime_features[] - -include::bits[] Added: trunk/docs/tutorial/tutorial.txt =================================================================== --- trunk/docs/tutorial/tutorial.txt (rev 0) +++ trunk/docs/tutorial/tutorial.txt 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,17 @@ +A Swift Tutorial +================ + +:toc: +:icons: +:website: http://www.ci.uchicago.edu/swift/guides/tutorial.php +:numbered: + +include::introduction[] + +include::hello_world[] + +include::language_features[] + +include::runtime_features[] + +include::bits[] Deleted: trunk/examples/anonymous.swift =================================================================== --- trunk/examples/anonymous.swift 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/examples/anonymous.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,21 +0,0 @@ -type messagefile {} -type countfile {} - -(messagefile t) greeting (string s) { - app { - echo s stdout=@filename(t); - } -} - -(countfile t) countwords (messagefile f) { - app { - wc "-w" @filename(f) stdout=@filename(t); - } -} - -messagefile outfile; -countfile c <"count14.txt">; - -outfile = greeting("hello from Swift"); -c = countwords(outfile); - Deleted: trunk/examples/array_index.swift =================================================================== --- trunk/examples/array_index.swift 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/examples/array_index.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,13 +0,0 @@ -type file {} - - -(file t) echo_array (string s[]) { - app { - echo s[0] s[1] s[2] stdout=@filename(t); - } -} - -string greetings[] = ["how","are","you"]; -file hw = echo_array(greetings); - - Deleted: trunk/examples/array_wildcard.swift =================================================================== --- trunk/examples/array_wildcard.swift 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/examples/array_wildcard.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,13 +0,0 @@ -type file {} - - -(file t) echo_wildcard (string s[]) { - app { - echo s[*] stdout=@filename(t); - } -} - -string greetings[] = ["how","are","you"]; -file hw = echo_wildcard(greetings); - - Deleted: trunk/examples/catsn.swift =================================================================== --- trunk/examples/catsn.swift 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/examples/catsn.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,15 +0,0 @@ -type file; - -app (file o) cat (file i) -{ - cat @i stdout=@o; -} - -string t = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; -string char[] = @strsplit(t, ""); - -file out[]; -foreach j in [1:@toint(@arg("n","10"))] { - file data<"data.txt">; - out[j] = cat(data); -} Deleted: trunk/examples/default.swift =================================================================== --- trunk/examples/default.swift 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/examples/default.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,11 +0,0 @@ -type file {} - -(file t) echo (string s="hello world") { //s has a default value - app { - echo s stdout=@filename(t); //redirect stdout to a file - } -} - -file hw1, hw2; -hw1 = echo(); // procedure call using the default value -hw2 = echo(s="hello again"); // using a different value Deleted: trunk/examples/first.swift =================================================================== --- trunk/examples/first.swift 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/examples/first.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,10 +0,0 @@ -type messagefile; - -app (messagefile t) greeting() { - echo "Hello, world!" stdout=@filename(t); -} - -messagefile outfile <"hello.txt">; - -outfile = greeting(); - Deleted: trunk/examples/fixedarray.swift =================================================================== --- trunk/examples/fixedarray.swift 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/examples/fixedarray.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,19 +0,0 @@ -type messagefile {} -type countfile {} - -(countfile t) countwords (messagefile f) { - app { - wc "-w" @filename(f) stdout=@filename(t); - } -} - -string inputNames = "one.txt two.txt three.txt"; -string outputNames = "one.count two.count three.count"; - -messagefile inputfiles[] ; -countfile outputfiles[] ; - -outputfiles[0] = countwords(inputfiles[0]); -outputfiles[1] = countwords(inputfiles[1]); -outputfiles[2] = countwords(inputfiles[2]); - Deleted: trunk/examples/foreach.swift =================================================================== --- trunk/examples/foreach.swift 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/examples/foreach.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,22 +0,0 @@ -type messagefile {} -type countfile {} - -(countfile t) countwords (messagefile f) { - app { - wc "-w" @filename(f) stdout=@filename(t); - } -} - -string inputNames = "one.txt two.txt three.txt"; - -messagefile inputfiles[] ; - - -foreach f in inputfiles { - countfile c; - c = countwords(f); -} - Deleted: trunk/examples/hostsn.swift =================================================================== --- trunk/examples/hostsn.swift 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/examples/hostsn.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,11 +0,0 @@ -type file; - -app (file o) hostname () -{ - hostname stdout=@o; -} - -file out[]; -foreach j in [1:@toint(@arg("n","1"))] { - out[j] = hostname(); -} Deleted: trunk/examples/if.swift =================================================================== --- trunk/examples/if.swift 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/examples/if.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,18 +0,0 @@ -type messagefile {} - -(messagefile t) greeting (string s) { - app { - echo s stdout=@filename(t); - } -} - -messagefile outfile <"hello20.txt">; - -boolean morning = true; - -if(morning) { - outfile = greeting("good morning"); -} else { - outfile = greeting("good afternoon"); -} - Deleted: trunk/examples/iterate.swift =================================================================== --- trunk/examples/iterate.swift 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/examples/iterate.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,18 +0,0 @@ -type counterfile; - -app (counterfile t) echo(string m) { - echo m stdout=@filename(t); -} - -app (counterfile t) countstep(counterfile i) { - wcl @filename(i) @filename(t); -} - -counterfile a[] ; - -a[0] = echo("793578934574893"); - -iterate v { - a[v+1] = countstep(a[v]); - trace("extract int value ", at extractint(a[v+1])); -} until (@extractint(a[v+1]) <= 1); Deleted: trunk/examples/manyparam.swift =================================================================== --- trunk/examples/manyparam.swift 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/examples/manyparam.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,13 +0,0 @@ -type messagefile; - -app (messagefile t) greeting (string s) { - echo s stdout=@filename(t); -} - -messagefile english <"english.txt">; -messagefile french <"francais.txt">; -english = greeting("hello"); -french = greeting("bonjour"); - -messagefile japanese <"nihongo.txt">; -japanese = greeting("konnichiwa"); Added: trunk/examples/misc/array_index.swift =================================================================== --- trunk/examples/misc/array_index.swift (rev 0) +++ trunk/examples/misc/array_index.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,8 @@ +type file; + +app (file t) echo_array (string s[]) { + echo s[0] s[1] s[2] stdout=@filename(t); +} + +string greetings[] = ["how","are","you"]; +file hw = echo_array(greetings); Added: trunk/examples/misc/array_wildcard.swift =================================================================== --- trunk/examples/misc/array_wildcard.swift (rev 0) +++ trunk/examples/misc/array_wildcard.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,8 @@ +type file; + +app (file t) echo_wildcard (string s[]) { + echo s[*] stdout=@filename(t); +} + +string greetings[] = ["how","are","you"]; +file hw = echo_wildcard(greetings); Added: trunk/examples/misc/catsn.swift =================================================================== --- trunk/examples/misc/catsn.swift (rev 0) +++ trunk/examples/misc/catsn.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,15 @@ +type file; + +app (file o) cat (file i) +{ + cat @i stdout=@o; +} + +string t = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; +string char[] = @strsplit(t, ""); + +file out[]; +foreach j in [1:@toint(@arg("n","10"))] { + file data<"data.txt">; + out[j] = cat(data); +} Added: trunk/examples/misc/hostsn.swift =================================================================== --- trunk/examples/misc/hostsn.swift (rev 0) +++ trunk/examples/misc/hostsn.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,11 @@ +type file; + +app (file o) hostname () +{ + hostname stdout=@o; +} + +file out[]; +foreach j in [1:@toint(@arg("n","1"))] { + out[j] = hostname(); +} Deleted: trunk/examples/one.txt =================================================================== --- trunk/examples/one.txt 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/examples/one.txt 2011-07-19 20:23:41 UTC (rev 4831) @@ -1 +0,0 @@ -this is one.txt Deleted: trunk/examples/parameter.swift =================================================================== --- trunk/examples/parameter.swift 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/examples/parameter.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,10 +0,0 @@ -type messagefile; - -app (messagefile t) greeting (string s) { - echo s stdout=@filename(t); -} - -messagefile outfile <"hello2.txt">; - -outfile = greeting("hello world"); - Deleted: trunk/examples/q16.txt =================================================================== --- trunk/examples/q16.txt 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/examples/q16.txt 2011-07-19 20:23:41 UTC (rev 4831) @@ -1 +0,0 @@ -foo bar Deleted: trunk/examples/q21.swift =================================================================== --- trunk/examples/q21.swift 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/examples/q21.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,14 +0,0 @@ -type messagefile {} - -(messagefile t) greeting (string s="hello") { - app { - echo s stdout=@filename(t); - } -} - -messagefile english <"english2.txt">; -messagefile french <"francais2.txt">; - -english = greeting(); -french = greeting(s="bonjour"); - Deleted: trunk/examples/q3.swift =================================================================== --- trunk/examples/q3.swift 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/examples/q3.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,10 +0,0 @@ -type file {} - -(file t) echo (string s = "default greeting") { - app { - echo s stdout=@filename(t); - } -} - -file hw = echo(); - Deleted: trunk/examples/q5.swift =================================================================== --- trunk/examples/q5.swift 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/examples/q5.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,12 +0,0 @@ -type messagefile; - -app (messagefile t) greeting (string s[]) { - echo s[0] s[1] s[2] stdout=@filename(t); -} - -messagefile outfile <"q5out.txt">; - -string words[] = ["how","are","you"]; - -outfile = greeting(words); - Deleted: trunk/examples/q6.swift =================================================================== --- trunk/examples/q6.swift 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/examples/q6.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,14 +0,0 @@ -type file {} - -(file t) echo (string s) { - app { - echo s stdout=@filename(t); - } -} - -string greetings[] = ["how","are","you"]; - -foreach g in greetings { - file hw = echo(g); -} - Deleted: trunk/examples/q7.swift =================================================================== --- trunk/examples/q7.swift 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/examples/q7.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,16 +0,0 @@ -type file {} - -(file t) echo (string s) { - app { - echo s stdout=@filename(t); - } -} - -string outputNames = "one two three"; - -file outputFiles[] ; - -foreach f in outputFiles { - f = echo("hello"); -} - Deleted: trunk/examples/regexp.swift =================================================================== --- trunk/examples/regexp.swift 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/examples/regexp.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,18 +0,0 @@ -type messagefile {} -type countfile {} - -(countfile t) countwords (messagefile f) { - app { - wc "-w" @filename(f) stdout=@filename(t); - } -} - -messagefile inputfile <"q16.txt">; - -countfile c ; - -c = countwords(inputfile); - Deleted: trunk/examples/restart.swift =================================================================== --- trunk/examples/restart.swift 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/examples/restart.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,24 +0,0 @@ -type file; - -app (file f) touch() { - touch @f; -} - -app (file f) processL(file inp) { - echo "processL" stdout=@f; -} - -app (file f) processR(file inp) { - broken "process" stdout=@f; -} - -app (file f) join(file left, file right) { - echo "join" @left @right stdout=@f; -} - -file f = touch(); - -file g = processL(f); -file h = processR(f); - -file i = join(g,h); Deleted: trunk/examples/second_procedure.swift =================================================================== --- trunk/examples/second_procedure.swift 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/examples/second_procedure.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,16 +0,0 @@ -type messagefile; - -app (messagefile t) greeting (string s) { - echo s stdout=@filename(t); -} - -app (messagefile o) capitalise(messagefile i) { - tr "[a-z]" "[A-Z]" stdin=@filename(i) stdout=@filename(o); -} - -messagefile hellofile <"hello.txt">; -messagefile final <"capitals.txt">; - -hellofile = greeting("hello from Swift"); -final = capitalise(hellofile); - Deleted: trunk/examples/three.txt =================================================================== --- trunk/examples/three.txt 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/examples/three.txt 2011-07-19 20:23:41 UTC (rev 4831) @@ -1 +0,0 @@ -three Added: trunk/examples/tutorial/MyFirstMapper.java =================================================================== --- trunk/examples/tutorial/MyFirstMapper.java (rev 0) +++ trunk/examples/tutorial/MyFirstMapper.java 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,33 @@ +package tutorial; + +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; + +import org.griphyn.vdl.mapping.AbsFile; +import org.griphyn.vdl.mapping.AbstractMapper; +import org.griphyn.vdl.mapping.Path; +import org.griphyn.vdl.mapping.PhysicalFormat; + +public class MyFirstMapper extends AbstractMapper { + + AbsFile myfile = new AbsFile("myfile.txt"); + + public boolean isStatic() { + return false; + } + + public Collection existing() { + if (myfile.exists()) + return Arrays.asList(new Path[] {Path.EMPTY_PATH}); + else + return Collections.EMPTY_LIST; + } + + public PhysicalFormat map(Path p) { + if(p.equals(Path.EMPTY_PATH)) + return myfile; + else + return null; + } +} Added: trunk/examples/tutorial/arrays.swift =================================================================== --- trunk/examples/tutorial/arrays.swift (rev 0) +++ trunk/examples/tutorial/arrays.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,12 @@ +type messagefile; + +app (messagefile t) greeting (string s[]) { + echo s[0] s[1] s[2] stdout=@filename(t); +} + +messagefile outfile <"arrays.txt">; + +string words[] = ["how","are","you"]; + +outfile = greeting(words); + Added: trunk/examples/tutorial/capitalise.swift =================================================================== --- trunk/examples/tutorial/capitalise.swift (rev 0) +++ trunk/examples/tutorial/capitalise.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,14 @@ +type messagefile; + +app (messagefile t) greeting (string s) { + echo s stdout=@filename(t); +} + +app (messagefile o) capitalise(messagefile i) { + tr "[a-z]" "[A-Z]" stdin=@filename(i) stdout=@filename(o); +} + +messagefile hellofile <"capitalise.1.txt">; +messagefile final <"capitalise.2.txt">; +hellofile = greeting("hello from Swift"); +final = capitalise(hellofile); Added: trunk/examples/tutorial/capitalise_anonymous.swift =================================================================== --- trunk/examples/tutorial/capitalise_anonymous.swift (rev 0) +++ trunk/examples/tutorial/capitalise_anonymous.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,14 @@ +type messagefile; + +app (messagefile t) greeting (string s) { + echo s stdout=@filename(t); +} + +app (messagefile o) capitalise(messagefile i) { + tr "[a-z]" "[A-Z]" stdin=@filename(i) stdout=@filename(o); +} + +messagefile hellofile; +messagefile final <"capitalise_anonymous.txt">; +hellofile = greeting("hello from Swift"); +final = capitalise(hellofile); Added: trunk/examples/tutorial/default.swift =================================================================== --- trunk/examples/tutorial/default.swift (rev 0) +++ trunk/examples/tutorial/default.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,15 @@ +type file; + +// s has a default value +app (file t) echo (string s="hello world") { + echo s stdout=@filename(t); +} + +file hw1<"default.1.txt">; +file hw2<"default.2.txt">; + +// procedure call using the default value +hw1 = echo(); + +// using a different value +hw2 = echo(s="hello again"); Added: trunk/examples/tutorial/fixed_array_mapper.1.txt =================================================================== --- trunk/examples/tutorial/fixed_array_mapper.1.txt (rev 0) +++ trunk/examples/tutorial/fixed_array_mapper.1.txt 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1 @@ +one Added: trunk/examples/tutorial/fixed_array_mapper.2.txt =================================================================== --- trunk/examples/tutorial/fixed_array_mapper.2.txt (rev 0) +++ trunk/examples/tutorial/fixed_array_mapper.2.txt 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1 @@ +two words Added: trunk/examples/tutorial/fixed_array_mapper.3.txt =================================================================== --- trunk/examples/tutorial/fixed_array_mapper.3.txt (rev 0) +++ trunk/examples/tutorial/fixed_array_mapper.3.txt 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1 @@ +three words now Added: trunk/examples/tutorial/fixed_array_mapper.swift =================================================================== --- trunk/examples/tutorial/fixed_array_mapper.swift (rev 0) +++ trunk/examples/tutorial/fixed_array_mapper.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,16 @@ +type messagefile; +type countfile; + +app (countfile t) countwords (messagefile f) { + wc "-w" @filename(f) stdout=@filename(t); +} + +string inputNames = "fixed_array_mapper.1.txt fixed_array_mapper.2.txt fixed_array_mapper.3.txt"; +string outputNames = "fixed_array_mapper.1.count fixed_array_mapper.2.count fixed_array_mapper.3.count"; + +messagefile inputfiles[] ; +countfile outputfiles[] ; + +outputfiles[0] = countwords(inputfiles[0]); +outputfiles[1] = countwords(inputfiles[1]); +outputfiles[2] = countwords(inputfiles[2]); Added: trunk/examples/tutorial/foreach.1.txt =================================================================== --- trunk/examples/tutorial/foreach.1.txt (rev 0) +++ trunk/examples/tutorial/foreach.1.txt 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1 @@ +one Added: trunk/examples/tutorial/foreach.2.txt =================================================================== --- trunk/examples/tutorial/foreach.2.txt (rev 0) +++ trunk/examples/tutorial/foreach.2.txt 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1 @@ +two words Added: trunk/examples/tutorial/foreach.3.txt =================================================================== --- trunk/examples/tutorial/foreach.3.txt (rev 0) +++ trunk/examples/tutorial/foreach.3.txt 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1 @@ +three words now Added: trunk/examples/tutorial/foreach.swift =================================================================== --- trunk/examples/tutorial/foreach.swift (rev 0) +++ trunk/examples/tutorial/foreach.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,18 @@ +type messagefile; +type countfile; + +app (countfile t) countwords (messagefile f) { + wc "-w" @filename(f) stdout=@filename(t); +} + +string inputNames = "foreach.1.txt foreach.2.txt foreach.3.txt"; + +messagefile inputfiles[] ; + +foreach f in inputfiles { + countfile c; + c = countwords(f); +} Added: trunk/examples/tutorial/hello.swift =================================================================== --- trunk/examples/tutorial/hello.swift (rev 0) +++ trunk/examples/tutorial/hello.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,10 @@ +type messagefile; + +app (messagefile t) greeting() { + echo "Hello, world!" stdout=@filename(t); +} + +messagefile outfile <"hello.txt">; + +outfile = greeting(); + Added: trunk/examples/tutorial/if.swift =================================================================== --- trunk/examples/tutorial/if.swift (rev 0) +++ trunk/examples/tutorial/if.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,16 @@ +type messagefile; + +app (messagefile t) greeting (string s) { + echo s stdout=@filename(t); +} + +messagefile outfile <"if.txt">; + +boolean morning = true; + +if(morning) { + outfile = greeting("good morning"); +} else { + outfile = greeting("good afternoon"); +} + Added: trunk/examples/tutorial/manyparam.swift =================================================================== --- trunk/examples/tutorial/manyparam.swift (rev 0) +++ trunk/examples/tutorial/manyparam.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,13 @@ +type messagefile; + +app (messagefile t) greeting (string s) { + echo s stdout=@filename(t); +} + +messagefile english <"manyparam.english.txt">; +messagefile french <"manyparam.french.txt">; +messagefile japanese <"manyparam.japanese.txt">; + +english = greeting("hello"); +french = greeting("bonjour"); +japanese = greeting("konnichiwa"); Added: trunk/examples/tutorial/my_first_mapper.swift =================================================================== --- trunk/examples/tutorial/my_first_mapper.swift (rev 0) +++ trunk/examples/tutorial/my_first_mapper.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,9 @@ +type messagefile; + +app (messagefile t) greeting() { + echo "hello" stdout=@filename(t); +} + +messagefile outfile ; + +outfile = greeting(); Added: trunk/examples/tutorial/one.txt =================================================================== --- trunk/examples/tutorial/one.txt (rev 0) +++ trunk/examples/tutorial/one.txt 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1 @@ +one Added: trunk/examples/tutorial/parameter.swift =================================================================== --- trunk/examples/tutorial/parameter.swift (rev 0) +++ trunk/examples/tutorial/parameter.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,8 @@ +type messagefile; + +app (messagefile t) greeting (string s) { + echo s stdout=@filename(t); +} + +messagefile outfile <"parameter.hello.txt">; +outfile = greeting("hello world"); Added: trunk/examples/tutorial/regexp_mapper.swift =================================================================== --- trunk/examples/tutorial/regexp_mapper.swift (rev 0) +++ trunk/examples/tutorial/regexp_mapper.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,16 @@ +type messagefile; +type countfile; + +app (countfile t) countwords (messagefile f) { + wc "-w" @filename(f) stdout=@filename(t); +} + +messagefile inputfile <"regexp_mapper.words.txt">; + +countfile c ; + +c = countwords(inputfile); + Added: trunk/examples/tutorial/regexp_mapper.words.txt =================================================================== --- trunk/examples/tutorial/regexp_mapper.words.txt (rev 0) +++ trunk/examples/tutorial/regexp_mapper.words.txt 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1 @@ +Testing is so much fun! Added: trunk/examples/tutorial/restart.swift =================================================================== --- trunk/examples/tutorial/restart.swift (rev 0) +++ trunk/examples/tutorial/restart.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,24 @@ +type file; + +app (file f) touch() { + touch @f; +} + +app (file f) processL(file inp) { + echo "processL" stdout=@f; +} + +app (file f) processR(file inp) { + broken "process" stdout=@f; +} + +app (file f) join(file left, file right) { + echo "join" @left @right stdout=@f; +} + +file f = touch(); + +file g = processL(f); +file h = processR(f); + +file i = join(g,h); Added: trunk/examples/tutorial/sequential_iteration.swift =================================================================== --- trunk/examples/tutorial/sequential_iteration.swift (rev 0) +++ trunk/examples/tutorial/sequential_iteration.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,18 @@ +type counterfile; + +app (counterfile t) echo(string m) { + echo m stdout=@filename(t); +} + +app (counterfile t) countstep(counterfile i) { + wcl @filename(i) @filename(t); +} + +counterfile a[] ; + +a[0] = echo("793578934574893"); + +iterate v { + a[v+1] = countstep(a[v]); + trace("extract int value ", at extractint(a[v+1])); +} until (@extractint(a[v+1]) <= 1); Added: trunk/examples/tutorial/three.txt =================================================================== --- trunk/examples/tutorial/three.txt (rev 0) +++ trunk/examples/tutorial/three.txt 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1 @@ +three words now Added: trunk/examples/tutorial/two.txt =================================================================== --- trunk/examples/tutorial/two.txt (rev 0) +++ trunk/examples/tutorial/two.txt 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1 @@ +two words Added: trunk/examples/tutorial/types.swift =================================================================== --- trunk/examples/tutorial/types.swift (rev 0) +++ trunk/examples/tutorial/types.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,20 @@ +type messagefile; + +type details { + string name; + int pies; +} + +app (messagefile t) greeting (details d) { + echo "Hello. Your name is" d.name "and you have eaten" d.pies "pies." stdout=@filename(t); +} + +details person; + +person.name = "John"; +person.pies = 3; + +messagefile outfile <"types.pies.txt">; + +outfile = greeting(person); + Added: trunk/examples/tutorial/wcl =================================================================== --- trunk/examples/tutorial/wcl (rev 0) +++ trunk/examples/tutorial/wcl 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,3 @@ +#!/bin/bash +echo -n $(wc -c < $1) > $2 + Property changes on: trunk/examples/tutorial/wcl ___________________________________________________________________ Added: svn:executable + * Added: trunk/examples/tutorial/words.txt =================================================================== --- trunk/examples/tutorial/words.txt (rev 0) +++ trunk/examples/tutorial/words.txt 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1 @@ +Hello world, this is a test Deleted: trunk/examples/two.txt =================================================================== --- trunk/examples/two.txt 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/examples/two.txt 2011-07-19 20:23:41 UTC (rev 4831) @@ -1 +0,0 @@ -a second file Deleted: trunk/examples/types.swift =================================================================== --- trunk/examples/types.swift 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/examples/types.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,20 +0,0 @@ -type messagefile; - -type details { - string name; - int pies; -} - -app (messagefile t) greeting (details d) { - echo "Hello. Your name is" d.name "and you have eaten" d.pies "pies." stdout=@filename(t); -} - -details person; - -person.name = "John"; -person.pies = 3; - -messagefile outfile <"q15.txt">; - -outfile = greeting(person); - Deleted: trunk/examples/wcl =================================================================== --- trunk/examples/wcl 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/examples/wcl 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,3 +0,0 @@ -#!/bin/bash -echo -n $(wc -c < $1) > $2 - Deleted: trunk/tests/documentation/3-1_hello_world.check.sh =================================================================== --- trunk/tests/documentation/3-1_hello_world.check.sh 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/tests/documentation/3-1_hello_world.check.sh 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,5 +0,0 @@ -#!/bin/bash -set -x -grep 'Hello, world!' hello.txt || exit 1 - -exit 0 Deleted: trunk/tests/documentation/3-1_hello_world.clean.sh =================================================================== --- trunk/tests/documentation/3-1_hello_world.clean.sh 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/tests/documentation/3-1_hello_world.clean.sh 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,4 +0,0 @@ -#!/bin/bash -set -x -rm -rf 3-1_hello_world-* 3-1_hello_world.kml 3-1_hello_world.xml hello.txt || exit 1 -exit 0 Deleted: trunk/tests/documentation/3-1_hello_world.swift =================================================================== --- trunk/tests/documentation/3-1_hello_world.swift 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/tests/documentation/3-1_hello_world.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,8 +0,0 @@ -type messagefile; - -app (messagefile t) greeting() { - echo "Hello, world!" stdout=@filename(t); -} - -messagefile outfile <"hello.txt">; -outfile = greeting(); Deleted: trunk/tests/documentation/4-1-2_many_parameters.check.sh =================================================================== --- trunk/tests/documentation/4-1-2_many_parameters.check.sh 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/tests/documentation/4-1-2_many_parameters.check.sh 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,5 +0,0 @@ -#!/bin/bash -set -x -grep 'hello' english.txt | grep 'bonjour' francais.txt | grep 'konnichiwa' nihongo.txt || exit 1 - -exit 0 Deleted: trunk/tests/documentation/4-1-2_many_parameters.clean.sh =================================================================== --- trunk/tests/documentation/4-1-2_many_parameters.clean.sh 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/tests/documentation/4-1-2_many_parameters.clean.sh 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,4 +0,0 @@ -#!/bin/bash -set -x -rm -rf 4-1-2_many_parameters-* 4-1-2_many_parameters.kml 4-1-2_many_parameters.xml english.txt francais.txt nihongo.txt|| exit 1 -exit 0 Deleted: trunk/tests/documentation/4-1-2_many_parameters.swift =================================================================== --- trunk/tests/documentation/4-1-2_many_parameters.swift 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/tests/documentation/4-1-2_many_parameters.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,14 +0,0 @@ -type messagefile; - -app (messagefile t) greeting (string s) { - echo s stdout=@filename(t); -} - -messagefile english <"english.txt">; -messagefile french <"francais.txt">; -english = greeting("hello"); -french = greeting("bonjour"); - -messagefile japanese <"nihongo.txt">; -japanese = greeting("konnichiwa"); - Deleted: trunk/tests/documentation/4-1_parameter.check.sh =================================================================== --- trunk/tests/documentation/4-1_parameter.check.sh 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/tests/documentation/4-1_parameter.check.sh 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,4 +0,0 @@ -#!/bin/bash -set -x -grep 'hello world' hello2.txt || exit 1 -exit 0 Deleted: trunk/tests/documentation/4-1_parameter.clean.sh =================================================================== --- trunk/tests/documentation/4-1_parameter.clean.sh 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/tests/documentation/4-1_parameter.clean.sh 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,4 +0,0 @@ -#!/bin/bash -set -x -rm -rf 4-1_parameter-* 4-1_parameter.kml 4-1_parameter.xml hello2.txt || exit 1 -exit 0 Deleted: trunk/tests/documentation/4-1_parameter.swift =================================================================== --- trunk/tests/documentation/4-1_parameter.swift 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/tests/documentation/4-1_parameter.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,9 +0,0 @@ -type messagefile; - -app (messagefile t) greeting (string s) { - echo s stdout=@filename(t); -} - -messagefile outfile <"hello2.txt">; - -outfile = greeting("hello world"); Deleted: trunk/tests/documentation/4-2_adding_another_application.check.sh =================================================================== --- trunk/tests/documentation/4-2_adding_another_application.check.sh 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/tests/documentation/4-2_adding_another_application.check.sh 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,5 +0,0 @@ -#!/bin/bash -set -x -grep 'hello from Swift' hello.txt | grep 'HELLO FROM SWIFT' capitals.txt || exit 1 - -exit 0 Deleted: trunk/tests/documentation/4-2_adding_another_application.clean.sh =================================================================== --- trunk/tests/documentation/4-2_adding_another_application.clean.sh 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/tests/documentation/4-2_adding_another_application.clean.sh 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,4 +0,0 @@ -#!/bin/bash -set -x -rm -rf 4-2_adding_another_application-* 4-2_adding_another_application.kml 4-2_adding_another_application.xml hello.txt capitals.txt|| exit 1 -exit 0 Deleted: trunk/tests/documentation/4-2_adding_another_application.swift =================================================================== --- trunk/tests/documentation/4-2_adding_another_application.swift 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/tests/documentation/4-2_adding_another_application.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,14 +0,0 @@ -type messagefile; - -app (messagefile t) greeting(string s) { - echo s stdout=@filename(t); -} -app (messagefile o) capitalise(messagefile i) { - tr "[a-z]" "[A-Z]" stdin=@filename(i) stdout=@filename(o); -} - -messagefile hellofile <"hello.txt">; -messagefile final <"capitals.txt">; - -hellofile = greeting("hello from Swift"); -final = capitalise(hellofile); Deleted: trunk/tests/documentation/4-4_datatypes.check.sh =================================================================== --- trunk/tests/documentation/4-4_datatypes.check.sh 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/tests/documentation/4-4_datatypes.check.sh 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,4 +0,0 @@ -#!/bin/bash -set -x -grep 'Hello. Your name is John and you have eaten 3 pies.' q15.txt || exit 1 -exit 0 Deleted: trunk/tests/documentation/4-4_datatypes.clean.sh =================================================================== --- trunk/tests/documentation/4-4_datatypes.clean.sh 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/tests/documentation/4-4_datatypes.clean.sh 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,4 +0,0 @@ -#!/bin/bash -set -x -rm -rf 4-4_datatypes-* 4-4_datatypes.kml 4-4_datatypes.xml q15.txt || exit 1 -exit 0 Deleted: trunk/tests/documentation/4-4_datatypes.swift =================================================================== --- trunk/tests/documentation/4-4_datatypes.swift 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/tests/documentation/4-4_datatypes.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,19 +0,0 @@ -type messagefile; - -type details { - string name; - int pies; -} - -app (messagefile t) greeting (details d) { - echo "Hello. Your name is" d.name "and you have eaten" d.pies "pies." stdout=@filename(t); -} - -details person; - -person.name = "John"; -person.pies = 3; - -messagefile outfile <"q15.txt">; - -outfile = greeting(person); Deleted: trunk/tests/documentation/4-5_arrays.check.sh =================================================================== --- trunk/tests/documentation/4-5_arrays.check.sh 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/tests/documentation/4-5_arrays.check.sh 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,4 +0,0 @@ -#!/bin/bash -set -x -cat q5out.txt|grep 'how are you'|| exit 1 -exit 0 Deleted: trunk/tests/documentation/4-5_arrays.clean.sh =================================================================== --- trunk/tests/documentation/4-5_arrays.clean.sh 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/tests/documentation/4-5_arrays.clean.sh 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,4 +0,0 @@ -#!/bin/bash -set -x -rm -rf 4-5_arrays-* 4-5_arrays.kml 4-5_arrays.xml q5out.txt || exit 1 -exit 0 Deleted: trunk/tests/documentation/4-5_arrays.swift =================================================================== --- trunk/tests/documentation/4-5_arrays.swift 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/tests/documentation/4-5_arrays.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,11 +0,0 @@ -type messagefile; - -app (messagefile t) greeting (string s[]) { - echo s[0] s[1] s[2] stdout=@filename(t); -} - -messagefile outfile <"q5out.txt">; - -string words[] = ["how","are","you"]; - -outfile = greeting(words); Deleted: trunk/tests/documentation/4-6-2_fixed_array_mapper.check.sh =================================================================== --- trunk/tests/documentation/4-6-2_fixed_array_mapper.check.sh 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/tests/documentation/4-6-2_fixed_array_mapper.check.sh 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,6 +0,0 @@ -#!/bin/bash -set -x -cat one.count | grep '3 one.txt' || exit 1 -cat two.count | grep '3 two.txt' || exit 1 -cat three.count | grep '1 three.txt' || exit 1 -exit 0 Deleted: trunk/tests/documentation/4-6-2_fixed_array_mapper.clean.sh =================================================================== --- trunk/tests/documentation/4-6-2_fixed_array_mapper.clean.sh 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/tests/documentation/4-6-2_fixed_array_mapper.clean.sh 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,4 +0,0 @@ -#!/bin/bash -set -x -rm -rf 4-6-2_fixed_array_mapper-* 4-6-2_fixed_array_mapper.kml 4-6-2_fixed_array_mapper.xml one.count two.count three.count || exit 1 -exit 0 Deleted: trunk/tests/documentation/4-6-2_fixed_array_mapper.setup.sh =================================================================== --- trunk/tests/documentation/4-6-2_fixed_array_mapper.setup.sh 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/tests/documentation/4-6-2_fixed_array_mapper.setup.sh 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,4 +0,0 @@ -#!/bin/bash -set -x -cp -v $GROUP/one.txt $GROUP/two.txt $GROUP/three.txt .|| exit 1 -exit 0 Deleted: trunk/tests/documentation/4-6-2_fixed_array_mapper.swift =================================================================== --- trunk/tests/documentation/4-6-2_fixed_array_mapper.swift 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/tests/documentation/4-6-2_fixed_array_mapper.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,16 +0,0 @@ -type messagefile {} -type countfile {} - -app (countfile t) countwords (messagefile f) { - wc "-w" @filename(f) stdout=@filename(t); -} - -string inputNames = "one.txt two.txt three.txt"; -string outputNames = "one.count two.count three.count"; - -messagefile inputfiles[] ; -countfile outputfiles[] ; - -outputfiles[0] = countwords(inputfiles[0]); -outputfiles[1] = countwords(inputfiles[1]); -outputfiles[2] = countwords(inputfiles[2]); Deleted: trunk/tests/documentation/4-7_foreach.check.sh =================================================================== --- trunk/tests/documentation/4-7_foreach.check.sh 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/tests/documentation/4-7_foreach.check.sh 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,6 +0,0 @@ -#!/bin/bash -set -x -cat one.count | grep '3 one.txt' || exit 1 -cat two.count | grep '3 two.txt' || exit 1 -cat three.count | grep '1 three.txt' || exit 1 -exit 0 Deleted: trunk/tests/documentation/4-7_foreach.clean.sh =================================================================== --- trunk/tests/documentation/4-7_foreach.clean.sh 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/tests/documentation/4-7_foreach.clean.sh 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,4 +0,0 @@ -#!/bin/bash -set -x -rm -rf 4-7_foreach-* 4-7_foreach.kml 4-7_foreach.xml one.txt two.txt three.txt || exit 1 -exit 0 Deleted: trunk/tests/documentation/4-7_foreach.swift =================================================================== --- trunk/tests/documentation/4-7_foreach.swift 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/tests/documentation/4-7_foreach.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,18 +0,0 @@ -type messagefile {} -type countfile {} - -app (countfile t) countwords (messagefile f) { - wc "-w" @filename(f) stdout=@filename(t); -} - -string inputNames = "one.txt two.txt three.txt"; - -messagefile inputfiles[] ; - -foreach f in inputfiles { - countfile c; - c = countwords(f); -} Deleted: trunk/tests/documentation/4-9_sequential_iteration.check.sh =================================================================== Deleted: trunk/tests/documentation/4-9_sequential_iteration.clean.sh =================================================================== --- trunk/tests/documentation/4-9_sequential_iteration.clean.sh 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/tests/documentation/4-9_sequential_iteration.clean.sh 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,4 +0,0 @@ -#!/bin/bash -set -x -rm -rf 4-9_sequential_iteration-* 4-9_sequential_iteration.kml 4-9_sequential_iteration.xml foldout* || exit 1 -exit 0 Deleted: trunk/tests/documentation/4-9_sequential_iteration.swift =================================================================== --- trunk/tests/documentation/4-9_sequential_iteration.swift 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/tests/documentation/4-9_sequential_iteration.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,18 +0,0 @@ -type counterfile; - -app (counterfile t) echo(string m) { - echo m stdout=@filename(t); -} - -app (counterfile t) countstep(counterfile i) { - wcl @filename(i) @filename(t); -} - -counterfile a[] ; - -a[0] = echo("793578934574893"); - -iterate v { - a[v+1] = countstep(a[v]); - trace("extract int value ", at extractint(a[v+1])); -} until (@extractint(a[v+1]) <= 1); Deleted: trunk/tests/documentation/6-1_named_and_optional_params.check.sh =================================================================== --- trunk/tests/documentation/6-1_named_and_optional_params.check.sh 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/tests/documentation/6-1_named_and_optional_params.check.sh 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,5 +0,0 @@ -#!/bin/bash -set -x -grep 'hello' english.txt | grep 'bonjour' french.txt || exit 1 - -exit 0 Deleted: trunk/tests/documentation/6-1_named_and_optional_params.clean.sh =================================================================== --- trunk/tests/documentation/6-1_named_and_optional_params.clean.sh 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/tests/documentation/6-1_named_and_optional_params.clean.sh 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,4 +0,0 @@ -#!/bin/bash -set -x -rm -rf 6-1_named_and_optional_params-* 6-1_named_and_optional_params.kml 6-1_named_and_optional_params.xml english.txt francais.txt|| exit 1 -exit 0 Deleted: trunk/tests/documentation/6-1_named_and_optional_params.swift =================================================================== --- trunk/tests/documentation/6-1_named_and_optional_params.swift 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/tests/documentation/6-1_named_and_optional_params.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,9 +0,0 @@ -type messagefile; -app (messagefile t) greeting (string s="hello") { - echo s stdout=@filename(t); -} -messagefile french <"french.txt">; -messagefile english <"english.txt">; - -french = greeting(s="bonjour"); -english = greeting(); Deleted: trunk/tests/documentation/one.txt =================================================================== --- trunk/tests/documentation/one.txt 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/tests/documentation/one.txt 2011-07-19 20:23:41 UTC (rev 4831) @@ -1 +0,0 @@ -this is one.txt Deleted: trunk/tests/documentation/sites.template.xml =================================================================== --- trunk/tests/documentation/sites.template.xml 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/tests/documentation/sites.template.xml 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,15 +0,0 @@ - - - - - 127.0.0.1 - 1000 - 10000 - 4 - 8 - 1000 - 1 - 4 - /tmp - - Deleted: trunk/tests/documentation/swift.properties =================================================================== --- trunk/tests/documentation/swift.properties 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/tests/documentation/swift.properties 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,7 +0,0 @@ -wrapperlog.always.transfer=true -sitedir.keep=true -execution.retries=0 -lazy.errors=false -status.mode=provider -use.provider.staging=false -provider.staging.pin.swiftfiles=false Deleted: trunk/tests/documentation/tc.data =================================================================== --- trunk/tests/documentation/tc.data 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/tests/documentation/tc.data 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,24 +0,0 @@ -#This is the transformation catalog. -# -#It comes pre-configured with a number of simple transformations with -#paths that are likely to work on a linux box. However, on some systems, -#the paths to these executables will be different (for example, sometimes -#some of these programs are found in /usr/bin rather than in /bin) -# -#NOTE WELL: fields in this file must be separated by tabs, not spaces; and -#there must be no trailing whitespace at the end of each line. -# -# sitename transformation path INSTALLED platform profiles -localhost echo /bin/echo INSTALLED INTEL32::LINUX null -localhost tr /usr/bin/tr INSTALLED INTEL32::LINUX null -localhost cat /bin/cat INSTALLED INTEL32::LINUX null -localhost ls /bin/ls INSTALLED INTEL32::LINUX null -localhost grep /bin/grep INSTALLED INTEL32::LINUX null -localhost sort /bin/sort INSTALLED INTEL32::LINUX null -localhost paste /bin/paste INSTALLED INTEL32::LINUX null -localhost cp /bin/cp INSTALLED INTEL32::LINUX null -localhost wc /usr/bin/wc INSTALLED INTEL32::LINUX null -localhost touch /bin/touch INSTALLED INTEL32::LINUX null -localhost sleep /bin/sleep INSTALLED INTEL32::LINUX null -localhost delayedcat /home/Alberto/Swift/cog/modules/swift/tests/language-behaviour/delayedcat.sh INSTALLED INTEL32::LINUX null -#localhost wcl /home/Alberto/My\ Shell\ Scripts/wcl.sh INSTALLED INTEL32::LINUX null Deleted: trunk/tests/documentation/tc.template.data =================================================================== --- trunk/tests/documentation/tc.template.data 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/tests/documentation/tc.template.data 2011-07-19 20:23:41 UTC (rev 4831) @@ -1,24 +0,0 @@ -#This is the transformation catalog. -# -#It comes pre-configured with a number of simple transformations with -#paths that are likely to work on a linux box. However, on some systems, -#the paths to these executables will be different (for example, sometimes -#some of these programs are found in /usr/bin rather than in /bin) -# -#NOTE WELL: fields in this file must be separated by tabs, not spaces; and -#there must be no trailing whitespace at the end of each line. -# -# sitename transformation path INSTALLED platform profiles -localhost echo /bin/echo INSTALLED INTEL32::LINUX null -localhost tr /usr/bin/tr INSTALLED INTEL32::LINUX null -localhost cat /bin/cat INSTALLED INTEL32::LINUX null -localhost ls /bin/ls INSTALLED INTEL32::LINUX null -localhost grep /bin/grep INSTALLED INTEL32::LINUX null -localhost sort /bin/sort INSTALLED INTEL32::LINUX null -localhost paste /bin/paste INSTALLED INTEL32::LINUX null -localhost cp /bin/cp INSTALLED INTEL32::LINUX null -localhost wc /usr/bin/wc INSTALLED INTEL32::LINUX null -localhost touch /bin/touch INSTALLED INTEL32::LINUX null -localhost sleep /bin/sleep INSTALLED INTEL32::LINUX null -localhost delayedcat /home/Alberto/Swift/cog/modules/swift/tests/language-behaviour/delayedcat.sh INSTALLED INTEL32::LINUX null -localhost wcl /usr/bin/wcl.sh INSTALLED INTEL32::LINUX null Deleted: trunk/tests/documentation/three.txt =================================================================== --- trunk/tests/documentation/three.txt 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/tests/documentation/three.txt 2011-07-19 20:23:41 UTC (rev 4831) @@ -1 +0,0 @@ -three Deleted: trunk/tests/documentation/title.txt =================================================================== --- trunk/tests/documentation/title.txt 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/tests/documentation/title.txt 2011-07-19 20:23:41 UTC (rev 4831) @@ -1 +0,0 @@ -Documentation Files Test Added: trunk/tests/documentation/tutorial/arrays.clean.sh =================================================================== --- trunk/tests/documentation/tutorial/arrays.clean.sh (rev 0) +++ trunk/tests/documentation/tutorial/arrays.clean.sh 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,4 @@ +#!/bin/bash +set -x +rm -rf arrays-* arrays.kml arrays.xml arrays.txt || exit 1 +exit 0 Property changes on: trunk/tests/documentation/tutorial/arrays.clean.sh ___________________________________________________________________ Added: svn:executable + * Added: trunk/tests/documentation/tutorial/arrays.swift =================================================================== --- trunk/tests/documentation/tutorial/arrays.swift (rev 0) +++ trunk/tests/documentation/tutorial/arrays.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,12 @@ +type messagefile; + +app (messagefile t) greeting (string s[]) { + echo s[0] s[1] s[2] stdout=@filename(t); +} + +messagefile outfile <"arrays.txt">; + +string words[] = ["how","are","you"]; + +outfile = greeting(words); + Added: trunk/tests/documentation/tutorial/arrays.txt.expected =================================================================== --- trunk/tests/documentation/tutorial/arrays.txt.expected (rev 0) +++ trunk/tests/documentation/tutorial/arrays.txt.expected 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1 @@ +how are you Added: trunk/tests/documentation/tutorial/capitalise.1.txt.expected =================================================================== --- trunk/tests/documentation/tutorial/capitalise.1.txt.expected (rev 0) +++ trunk/tests/documentation/tutorial/capitalise.1.txt.expected 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1 @@ +hello from Swift Added: trunk/tests/documentation/tutorial/capitalise.2.txt.expected =================================================================== --- trunk/tests/documentation/tutorial/capitalise.2.txt.expected (rev 0) +++ trunk/tests/documentation/tutorial/capitalise.2.txt.expected 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1 @@ +HELLO FROM SWIFT Added: trunk/tests/documentation/tutorial/capitalise.clean.sh =================================================================== --- trunk/tests/documentation/tutorial/capitalise.clean.sh (rev 0) +++ trunk/tests/documentation/tutorial/capitalise.clean.sh 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,4 @@ +#!/bin/bash +set -x +rm -rf capitalise-* capitalise.kml capitalise.xml hello.txt capitals.txt|| exit 1 +exit 0 Property changes on: trunk/tests/documentation/tutorial/capitalise.clean.sh ___________________________________________________________________ Added: svn:executable + * Added: trunk/tests/documentation/tutorial/capitalise.swift =================================================================== --- trunk/tests/documentation/tutorial/capitalise.swift (rev 0) +++ trunk/tests/documentation/tutorial/capitalise.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,14 @@ +type messagefile; + +app (messagefile t) greeting (string s) { + echo s stdout=@filename(t); +} + +app (messagefile o) capitalise(messagefile i) { + tr "[a-z]" "[A-Z]" stdin=@filename(i) stdout=@filename(o); +} + +messagefile hellofile <"capitalise.1.txt">; +messagefile final <"capitalise.2.txt">; +hellofile = greeting("hello from Swift"); +final = capitalise(hellofile); Added: trunk/tests/documentation/tutorial/capitalise_anonymous.clean.sh =================================================================== --- trunk/tests/documentation/tutorial/capitalise_anonymous.clean.sh (rev 0) +++ trunk/tests/documentation/tutorial/capitalise_anonymous.clean.sh 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,4 @@ +#!/bin/bash +set -x +rm -rf capitalise-* capitalise.kml capitalise.xml hello.txt capitals.txt|| exit 1 +exit 0 Property changes on: trunk/tests/documentation/tutorial/capitalise_anonymous.clean.sh ___________________________________________________________________ Added: svn:executable + * Added: trunk/tests/documentation/tutorial/capitalise_anonymous.swift =================================================================== --- trunk/tests/documentation/tutorial/capitalise_anonymous.swift (rev 0) +++ trunk/tests/documentation/tutorial/capitalise_anonymous.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,14 @@ +type messagefile; + +app (messagefile t) greeting (string s) { + echo s stdout=@filename(t); +} + +app (messagefile o) capitalise(messagefile i) { + tr "[a-z]" "[A-Z]" stdin=@filename(i) stdout=@filename(o); +} + +messagefile hellofile; +messagefile final <"capitalise_anonymous.txt">; +hellofile = greeting("hello from Swift"); +final = capitalise(hellofile); Added: trunk/tests/documentation/tutorial/capitalise_anonymous.txt.expected =================================================================== --- trunk/tests/documentation/tutorial/capitalise_anonymous.txt.expected (rev 0) +++ trunk/tests/documentation/tutorial/capitalise_anonymous.txt.expected 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1 @@ +HELLO FROM SWIFT Added: trunk/tests/documentation/tutorial/default.1.txt.expected =================================================================== --- trunk/tests/documentation/tutorial/default.1.txt.expected (rev 0) +++ trunk/tests/documentation/tutorial/default.1.txt.expected 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1 @@ +hello world Added: trunk/tests/documentation/tutorial/default.2.txt.expected =================================================================== --- trunk/tests/documentation/tutorial/default.2.txt.expected (rev 0) +++ trunk/tests/documentation/tutorial/default.2.txt.expected 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1 @@ +hello again Added: trunk/tests/documentation/tutorial/default.clean.sh =================================================================== --- trunk/tests/documentation/tutorial/default.clean.sh (rev 0) +++ trunk/tests/documentation/tutorial/default.clean.sh 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,4 @@ +#!/bin/bash +set -x +rm -rf default-* default.kml default.xml hw1.txt hw2.txt hw1.txt hw2.txt || exit 1 +exit 0 Property changes on: trunk/tests/documentation/tutorial/default.clean.sh ___________________________________________________________________ Added: svn:executable + * Added: trunk/tests/documentation/tutorial/default.swift =================================================================== --- trunk/tests/documentation/tutorial/default.swift (rev 0) +++ trunk/tests/documentation/tutorial/default.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,15 @@ +type file; + +// s has a default value +app (file t) echo (string s="hello world") { + echo s stdout=@filename(t); +} + +file hw1<"default.1.txt">; +file hw2<"default.2.txt">; + +// procedure call using the default value +hw1 = echo(); + +// using a different value +hw2 = echo(s="hello again"); Added: trunk/tests/documentation/tutorial/fixed_array_mapper.1.count.expected =================================================================== --- trunk/tests/documentation/tutorial/fixed_array_mapper.1.count.expected (rev 0) +++ trunk/tests/documentation/tutorial/fixed_array_mapper.1.count.expected 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1 @@ +1 fixed_array_mapper.1.txt Added: trunk/tests/documentation/tutorial/fixed_array_mapper.2.count.expected =================================================================== --- trunk/tests/documentation/tutorial/fixed_array_mapper.2.count.expected (rev 0) +++ trunk/tests/documentation/tutorial/fixed_array_mapper.2.count.expected 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1 @@ +2 fixed_array_mapper.2.txt Added: trunk/tests/documentation/tutorial/fixed_array_mapper.3.count.expected =================================================================== --- trunk/tests/documentation/tutorial/fixed_array_mapper.3.count.expected (rev 0) +++ trunk/tests/documentation/tutorial/fixed_array_mapper.3.count.expected 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1 @@ +3 fixed_array_mapper.3.txt Added: trunk/tests/documentation/tutorial/fixed_array_mapper.clean.sh =================================================================== --- trunk/tests/documentation/tutorial/fixed_array_mapper.clean.sh (rev 0) +++ trunk/tests/documentation/tutorial/fixed_array_mapper.clean.sh 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,4 @@ +#!/bin/bash +set -x +rm -rf fixed_array_mapper-* fixed_array_mapper.kml fixed_array_mapper.xml one.count two.count three.count one.txt two.txt three.txt || exit 1 +exit 0 Property changes on: trunk/tests/documentation/tutorial/fixed_array_mapper.clean.sh ___________________________________________________________________ Added: svn:executable + * Added: trunk/tests/documentation/tutorial/fixed_array_mapper.setup.sh =================================================================== --- trunk/tests/documentation/tutorial/fixed_array_mapper.setup.sh (rev 0) +++ trunk/tests/documentation/tutorial/fixed_array_mapper.setup.sh 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,6 @@ +#!/bin/bash +set -x +echo one > fixed_array_mapper.1.txt +echo two words > fixed_array_mapper.2.txt +echo three words now > fixed_array_mapper.3.txt +exit 0 Property changes on: trunk/tests/documentation/tutorial/fixed_array_mapper.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: trunk/tests/documentation/tutorial/fixed_array_mapper.swift =================================================================== --- trunk/tests/documentation/tutorial/fixed_array_mapper.swift (rev 0) +++ trunk/tests/documentation/tutorial/fixed_array_mapper.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,16 @@ +type messagefile; +type countfile; + +app (countfile t) countwords (messagefile f) { + wc "-w" @filename(f) stdout=@filename(t); +} + +string inputNames = "fixed_array_mapper.1.txt fixed_array_mapper.2.txt fixed_array_mapper.3.txt"; +string outputNames = "fixed_array_mapper.1.count fixed_array_mapper.2.count fixed_array_mapper.3.count"; + +messagefile inputfiles[] ; +countfile outputfiles[] ; + +outputfiles[0] = countwords(inputfiles[0]); +outputfiles[1] = countwords(inputfiles[1]); +outputfiles[2] = countwords(inputfiles[2]); Added: trunk/tests/documentation/tutorial/foreach.1.count.expected =================================================================== --- trunk/tests/documentation/tutorial/foreach.1.count.expected (rev 0) +++ trunk/tests/documentation/tutorial/foreach.1.count.expected 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1 @@ +1 foreach.1.txt Added: trunk/tests/documentation/tutorial/foreach.2.count.expected =================================================================== --- trunk/tests/documentation/tutorial/foreach.2.count.expected (rev 0) +++ trunk/tests/documentation/tutorial/foreach.2.count.expected 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1 @@ +2 foreach.2.txt Added: trunk/tests/documentation/tutorial/foreach.3.count.expected =================================================================== --- trunk/tests/documentation/tutorial/foreach.3.count.expected (rev 0) +++ trunk/tests/documentation/tutorial/foreach.3.count.expected 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1 @@ +3 foreach.3.txt Added: trunk/tests/documentation/tutorial/foreach.clean.sh =================================================================== --- trunk/tests/documentation/tutorial/foreach.clean.sh (rev 0) +++ trunk/tests/documentation/tutorial/foreach.clean.sh 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,4 @@ +#!/bin/bash +set -x +rm -rf foreach-* foreach.kml foreach.xml one.txt two.txt three.txt one.count two.count three.count || exit 1 +exit 0 Property changes on: trunk/tests/documentation/tutorial/foreach.clean.sh ___________________________________________________________________ Added: svn:executable + * Added: trunk/tests/documentation/tutorial/foreach.setup.sh =================================================================== --- trunk/tests/documentation/tutorial/foreach.setup.sh (rev 0) +++ trunk/tests/documentation/tutorial/foreach.setup.sh 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,6 @@ +#!/bin/bash +set -x +echo one > foreach.1.txt +echo two words > foreach.2.txt +echo three words now > foreach.3.txt +exit 0 Property changes on: trunk/tests/documentation/tutorial/foreach.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: trunk/tests/documentation/tutorial/foreach.swift =================================================================== --- trunk/tests/documentation/tutorial/foreach.swift (rev 0) +++ trunk/tests/documentation/tutorial/foreach.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,18 @@ +type messagefile; +type countfile; + +app (countfile t) countwords (messagefile f) { + wc "-w" @filename(f) stdout=@filename(t); +} + +string inputNames = "foreach.1.txt foreach.2.txt foreach.3.txt"; + +messagefile inputfiles[] ; + +foreach f in inputfiles { + countfile c; + c = countwords(f); +} Added: trunk/tests/documentation/tutorial/hello.clean.sh =================================================================== --- trunk/tests/documentation/tutorial/hello.clean.sh (rev 0) +++ trunk/tests/documentation/tutorial/hello.clean.sh 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,4 @@ +#!/bin/bash +set -x +rm -rf hello-* parameter.kml parameter.xml hello.txt || exit 1 +exit 0 Property changes on: trunk/tests/documentation/tutorial/hello.clean.sh ___________________________________________________________________ Added: svn:executable + * Added: trunk/tests/documentation/tutorial/hello.swift =================================================================== --- trunk/tests/documentation/tutorial/hello.swift (rev 0) +++ trunk/tests/documentation/tutorial/hello.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,10 @@ +type messagefile; + +app (messagefile t) greeting() { + echo "Hello, world!" stdout=@filename(t); +} + +messagefile outfile <"hello.txt">; + +outfile = greeting(); + Added: trunk/tests/documentation/tutorial/hello.txt.expected =================================================================== --- trunk/tests/documentation/tutorial/hello.txt.expected (rev 0) +++ trunk/tests/documentation/tutorial/hello.txt.expected 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1 @@ +Hello, world! Added: trunk/tests/documentation/tutorial/hello2.txt.expected =================================================================== --- trunk/tests/documentation/tutorial/hello2.txt.expected (rev 0) +++ trunk/tests/documentation/tutorial/hello2.txt.expected 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1 @@ +hello world Added: trunk/tests/documentation/tutorial/if.clean.sh =================================================================== --- trunk/tests/documentation/tutorial/if.clean.sh (rev 0) +++ trunk/tests/documentation/tutorial/if.clean.sh 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,4 @@ +#!/bin/bash +set -x +rm -rf if-* if.kml if.xml if.txt || exit 1 +exit 0 Property changes on: trunk/tests/documentation/tutorial/if.clean.sh ___________________________________________________________________ Added: svn:executable + * Added: trunk/tests/documentation/tutorial/if.swift =================================================================== --- trunk/tests/documentation/tutorial/if.swift (rev 0) +++ trunk/tests/documentation/tutorial/if.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,16 @@ +type messagefile; + +app (messagefile t) greeting (string s) { + echo s stdout=@filename(t); +} + +messagefile outfile <"if.txt">; + +boolean morning = true; + +if(morning) { + outfile = greeting("good morning"); +} else { + outfile = greeting("good afternoon"); +} + Added: trunk/tests/documentation/tutorial/if.txt.expected =================================================================== --- trunk/tests/documentation/tutorial/if.txt.expected (rev 0) +++ trunk/tests/documentation/tutorial/if.txt.expected 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1 @@ +good morning Added: trunk/tests/documentation/tutorial/manyparam.clean.sh =================================================================== --- trunk/tests/documentation/tutorial/manyparam.clean.sh (rev 0) +++ trunk/tests/documentation/tutorial/manyparam.clean.sh 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,4 @@ +#!/bin/bash +set -x +rm -rf manyparam-* manyparam.kml manyparam.xml english.txt francais.txt nihongo.txt|| exit 1 +exit 0 Property changes on: trunk/tests/documentation/tutorial/manyparam.clean.sh ___________________________________________________________________ Added: svn:executable + * Added: trunk/tests/documentation/tutorial/manyparam.english.txt.expected =================================================================== --- trunk/tests/documentation/tutorial/manyparam.english.txt.expected (rev 0) +++ trunk/tests/documentation/tutorial/manyparam.english.txt.expected 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1 @@ +hello Added: trunk/tests/documentation/tutorial/manyparam.french.txt.expected =================================================================== --- trunk/tests/documentation/tutorial/manyparam.french.txt.expected (rev 0) +++ trunk/tests/documentation/tutorial/manyparam.french.txt.expected 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1 @@ +bonjour Added: trunk/tests/documentation/tutorial/manyparam.japanese.txt.expected =================================================================== --- trunk/tests/documentation/tutorial/manyparam.japanese.txt.expected (rev 0) +++ trunk/tests/documentation/tutorial/manyparam.japanese.txt.expected 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1 @@ +konnichiwa Added: trunk/tests/documentation/tutorial/manyparam.swift =================================================================== --- trunk/tests/documentation/tutorial/manyparam.swift (rev 0) +++ trunk/tests/documentation/tutorial/manyparam.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,13 @@ +type messagefile; + +app (messagefile t) greeting (string s) { + echo s stdout=@filename(t); +} + +messagefile english <"manyparam.english.txt">; +messagefile french <"manyparam.french.txt">; +messagefile japanese <"manyparam.japanese.txt">; + +english = greeting("hello"); +french = greeting("bonjour"); +japanese = greeting("konnichiwa"); Added: trunk/tests/documentation/tutorial/parameter.clean.sh =================================================================== --- trunk/tests/documentation/tutorial/parameter.clean.sh (rev 0) +++ trunk/tests/documentation/tutorial/parameter.clean.sh 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,4 @@ +#!/bin/bash +set -x +rm -rf parameter-* parameter.kml parameter.xml hello2.txt || exit 1 +exit 0 Property changes on: trunk/tests/documentation/tutorial/parameter.clean.sh ___________________________________________________________________ Added: svn:executable + * Added: trunk/tests/documentation/tutorial/parameter.hello.txt.expected =================================================================== --- trunk/tests/documentation/tutorial/parameter.hello.txt.expected (rev 0) +++ trunk/tests/documentation/tutorial/parameter.hello.txt.expected 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1 @@ +hello world Added: trunk/tests/documentation/tutorial/parameter.swift =================================================================== --- trunk/tests/documentation/tutorial/parameter.swift (rev 0) +++ trunk/tests/documentation/tutorial/parameter.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,8 @@ +type messagefile; + +app (messagefile t) greeting (string s) { + echo s stdout=@filename(t); +} + +messagefile outfile <"parameter.hello.txt">; +outfile = greeting("hello world"); Added: trunk/tests/documentation/tutorial/regexp_mapper.clean.sh =================================================================== --- trunk/tests/documentation/tutorial/regexp_mapper.clean.sh (rev 0) +++ trunk/tests/documentation/tutorial/regexp_mapper.clean.sh 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,4 @@ +#!/bin/bash +set -x +rm -rf regexp-* regexp.kml regexp.xml words.txt words.count || exit 1 +exit 0 Property changes on: trunk/tests/documentation/tutorial/regexp_mapper.clean.sh ___________________________________________________________________ Added: svn:executable + * Added: trunk/tests/documentation/tutorial/regexp_mapper.setup.sh =================================================================== --- trunk/tests/documentation/tutorial/regexp_mapper.setup.sh (rev 0) +++ trunk/tests/documentation/tutorial/regexp_mapper.setup.sh 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,4 @@ +#!/bin/bash + +echo 'Testing is so much fun!' > regexp_mapper.words.txt + Property changes on: trunk/tests/documentation/tutorial/regexp_mapper.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: trunk/tests/documentation/tutorial/regexp_mapper.swift =================================================================== --- trunk/tests/documentation/tutorial/regexp_mapper.swift (rev 0) +++ trunk/tests/documentation/tutorial/regexp_mapper.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,16 @@ +type messagefile; +type countfile; + +app (countfile t) countwords (messagefile f) { + wc "-w" @filename(f) stdout=@filename(t); +} + +messagefile inputfile <"regexp_mapper.words.txt">; + +countfile c ; + +c = countwords(inputfile); + Added: trunk/tests/documentation/tutorial/regexp_mapper.words.count.expected =================================================================== --- trunk/tests/documentation/tutorial/regexp_mapper.words.count.expected (rev 0) +++ trunk/tests/documentation/tutorial/regexp_mapper.words.count.expected 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1 @@ +5 regexp_mapper.words.txt Added: trunk/tests/documentation/tutorial/sequential_iteration.clean.sh =================================================================== --- trunk/tests/documentation/tutorial/sequential_iteration.clean.sh (rev 0) +++ trunk/tests/documentation/tutorial/sequential_iteration.clean.sh 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,4 @@ +#!/bin/bash +set -x +rm -rf sequential_iteration-* sequential_iteration.kml sequential_iteration.xml foldout* || exit 1 +exit 0 Property changes on: trunk/tests/documentation/tutorial/sequential_iteration.clean.sh ___________________________________________________________________ Added: svn:executable + * Added: trunk/tests/documentation/tutorial/sequential_iteration.foldout0000.expected =================================================================== --- trunk/tests/documentation/tutorial/sequential_iteration.foldout0000.expected (rev 0) +++ trunk/tests/documentation/tutorial/sequential_iteration.foldout0000.expected 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1 @@ +793578934574893 Added: trunk/tests/documentation/tutorial/sequential_iteration.foldout0001.expected =================================================================== --- trunk/tests/documentation/tutorial/sequential_iteration.foldout0001.expected (rev 0) +++ trunk/tests/documentation/tutorial/sequential_iteration.foldout0001.expected 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1 @@ +16 \ No newline at end of file Added: trunk/tests/documentation/tutorial/sequential_iteration.foldout0002.expected =================================================================== --- trunk/tests/documentation/tutorial/sequential_iteration.foldout0002.expected (rev 0) +++ trunk/tests/documentation/tutorial/sequential_iteration.foldout0002.expected 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1 @@ +2 \ No newline at end of file Added: trunk/tests/documentation/tutorial/sequential_iteration.foldout0003.expected =================================================================== --- trunk/tests/documentation/tutorial/sequential_iteration.foldout0003.expected (rev 0) +++ trunk/tests/documentation/tutorial/sequential_iteration.foldout0003.expected 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1 @@ +1 \ No newline at end of file Added: trunk/tests/documentation/tutorial/sequential_iteration.setup.sh =================================================================== --- trunk/tests/documentation/tutorial/sequential_iteration.setup.sh (rev 0) +++ trunk/tests/documentation/tutorial/sequential_iteration.setup.sh 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,3 @@ +#!/bin/bash +echo 'echo -n $(wc -c < $1) > $2' > /tmp/wcl +chmod +x /tmp/wcl Property changes on: trunk/tests/documentation/tutorial/sequential_iteration.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: trunk/tests/documentation/tutorial/sequential_iteration.swift =================================================================== --- trunk/tests/documentation/tutorial/sequential_iteration.swift (rev 0) +++ trunk/tests/documentation/tutorial/sequential_iteration.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,18 @@ +type counterfile; + +app (counterfile t) echo(string m) { + echo m stdout=@filename(t); +} + +app (counterfile t) countstep(counterfile i) { + wcl @filename(i) @filename(t); +} + +counterfile a[] ; + +a[0] = echo("793578934574893"); + +iterate v { + a[v+1] = countstep(a[v]); + trace("extract int value ", at extractint(a[v+1])); +} until (@extractint(a[v+1]) <= 1); Added: trunk/tests/documentation/tutorial/swift.properties =================================================================== --- trunk/tests/documentation/tutorial/swift.properties (rev 0) +++ trunk/tests/documentation/tutorial/swift.properties 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,7 @@ +wrapperlog.always.transfer=true +sitedir.keep=true +execution.retries=0 +lazy.errors=false +status.mode=provider +use.provider.staging=false +provider.staging.pin.swiftfiles=false Added: trunk/tests/documentation/tutorial/tc.template.data =================================================================== --- trunk/tests/documentation/tutorial/tc.template.data (rev 0) +++ trunk/tests/documentation/tutorial/tc.template.data 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,23 @@ +#This is the transformation catalog. +# +#It comes pre-configured with a number of simple transformations with +#paths that are likely to work on a linux box. However, on some systems, +#the paths to these executables will be different (for example, sometimes +#some of these programs are found in /usr/bin rather than in /bin) +# +#NOTE WELL: fields in this file must be separated by tabs, not spaces; and +#there must be no trailing whitespace at the end of each line. +# +# sitename transformation path INSTALLED platform profiles +localhost echo /bin/echo INSTALLED INTEL32::LINUX null +localhost tr /usr/bin/tr INSTALLED INTEL32::LINUX null +localhost cat /bin/cat INSTALLED INTEL32::LINUX null +localhost ls /bin/ls INSTALLED INTEL32::LINUX null +localhost grep /bin/grep INSTALLED INTEL32::LINUX null +localhost sort /bin/sort INSTALLED INTEL32::LINUX null +localhost paste /bin/paste INSTALLED INTEL32::LINUX null +localhost cp /bin/cp INSTALLED INTEL32::LINUX null +localhost wc /usr/bin/wc INSTALLED INTEL32::LINUX null +localhost touch /bin/touch INSTALLED INTEL32::LINUX null +localhost sleep /bin/sleep INSTALLED INTEL32::LINUX null +localhost wcl /tmp/wcl INSTALLED INTEL32::LINUX null Added: trunk/tests/documentation/tutorial/title.txt =================================================================== --- trunk/tests/documentation/tutorial/title.txt (rev 0) +++ trunk/tests/documentation/tutorial/title.txt 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1 @@ +Tutorial Scripts Added: trunk/tests/documentation/tutorial/types.clean.sh =================================================================== --- trunk/tests/documentation/tutorial/types.clean.sh (rev 0) +++ trunk/tests/documentation/tutorial/types.clean.sh 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,4 @@ +#!/bin/bash +set -x +rm -rf types-* types.kml types.xml pies.txt || exit 1 +exit 0 Property changes on: trunk/tests/documentation/tutorial/types.clean.sh ___________________________________________________________________ Added: svn:executable + * Added: trunk/tests/documentation/tutorial/types.pies.txt.expected =================================================================== --- trunk/tests/documentation/tutorial/types.pies.txt.expected (rev 0) +++ trunk/tests/documentation/tutorial/types.pies.txt.expected 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1 @@ +Hello. Your name is John and you have eaten 3 pies. Added: trunk/tests/documentation/tutorial/types.swift =================================================================== --- trunk/tests/documentation/tutorial/types.swift (rev 0) +++ trunk/tests/documentation/tutorial/types.swift 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,20 @@ +type messagefile; + +type details { + string name; + int pies; +} + +app (messagefile t) greeting (details d) { + echo "Hello. Your name is" d.name "and you have eaten" d.pies "pies." stdout=@filename(t); +} + +details person; + +person.name = "John"; +person.pies = 3; + +messagefile outfile <"types.pies.txt">; + +outfile = greeting(person); + Deleted: trunk/tests/documentation/two.txt =================================================================== --- trunk/tests/documentation/two.txt 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/tests/documentation/two.txt 2011-07-19 20:23:41 UTC (rev 4831) @@ -1 +0,0 @@ -a second file Modified: trunk/tests/groups/group-all-local.sh =================================================================== --- trunk/tests/groups/group-all-local.sh 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/tests/groups/group-all-local.sh 2011-07-19 20:23:41 UTC (rev 4831) @@ -9,10 +9,10 @@ # $TESTDIR/cdm/star $TESTDIR/language-behaviour/arrays \ $TESTDIR/language-behaviour/broken \ - $TESTDIR/language-behaviour/compounds \ + $TESTDIR/language-behaviour/compounds \ $TESTDIR/language-behaviour/control_structures \ $TESTDIR/language-behaviour/IO \ - $TESTDIR/language-behaviour/datatypes \ + $TESTDIR/language-behaviour/iterators \ $TESTDIR/language-behaviour/logic \ $TESTDIR/language-behaviour/mappers \ $TESTDIR/language-behaviour/math \ @@ -20,8 +20,7 @@ $TESTDIR/language-behaviour/procedures \ $TESTDIR/language-behaviour/strings \ $TESTDIR/language-behaviour/variables \ - $TESTDIR/language-behaviour/cleanup \ - # $TESTDIR/documentation/ \ + $TESTDIR/documentation/tutorial \ # $TESTDIR/cdm/ps/pinned # $TESTDIR/site/intrepid ) Added: trunk/tests/groups/group-documentation.sh =================================================================== --- trunk/tests/groups/group-documentation.sh (rev 0) +++ trunk/tests/groups/group-documentation.sh 2011-07-19 20:23:41 UTC (rev 4831) @@ -0,0 +1,8 @@ + +# GROUPLIST definition to run all local tests + +GROUPLIST=( + $TESTDIR/documentation/tutorial + ) + +checkvars WORK Modified: trunk/tests/suite.sh =================================================================== --- trunk/tests/suite.sh 2011-07-19 18:18:40 UTC (rev 4830) +++ trunk/tests/suite.sh 2011-07-19 20:23:41 UTC (rev 4831) @@ -38,6 +38,9 @@ TOPDIR=`readlink -f $PWD/../../../..` CRTDIR=`pwd` +# Disable usage stats in test suite +export SWIFT_USAGE_STATS=0 + while [ $# -gt 0 ]; do case $1 in -a) @@ -764,7 +767,10 @@ diff $BNE $EXPECTED 2>&1 >> $OUTPUT if [ "$?" != "0" ]; then RESULT="Failed" - fi + echo Failed + else + echo OK + fi if [ "$RESULT" == "None" ]; then RESULT="Passed" fi @@ -814,7 +820,7 @@ grep THIS-SCRIPT-SHOULD-FAIL $SWIFTSCRIPT > /dev/null TEST_SHOULD_FAIL=$(( ! $? )) - monitored_exec $TIMEOUT swift \ + monitored_exec $TIMEOUT swift \ -wrapperlog.always.transfer true \ -sitedir.keep true \ -config swift.properties \ @@ -824,7 +830,7 @@ TEST_SHOULD_FAIL=0 if [ -x $GROUP/$CHECKSCRIPT ]; then - export TEST_LOG + export OUTPUT script_exec $GROUP/$CHECKSCRIPT "√" else check_outputs $GROUP $NAME From jonmon at ci.uchicago.edu Fri Jul 29 12:41:51 2011 From: jonmon at ci.uchicago.edu (jonmon at ci.uchicago.edu) Date: Fri, 29 Jul 2011 17:41:51 -0000 Subject: [Swift-commit] r4869 - www/papers Message-ID: <20110729174137.A8A5F9D0AE@svn.ci.uchicago.edu> Author: jonmon Date: 2011-07-29 12:41:37 -0500 (Fri, 29 Jul 2011) New Revision: 4869 Added: www/papers/SwiftMontage.pdf Log: o added SwiftMontage.pdf documentation Added: www/papers/SwiftMontage.pdf =================================================================== --- www/papers/SwiftMontage.pdf (rev 0) +++ www/papers/SwiftMontage.pdf 2011-07-29 17:41:37 UTC (rev 4869) @@ -0,0 +1,3027 @@ +%PDF-1.4 +%???? +1 0 obj +<< /S /GoTo /D (section.1) >> +endobj +4 0 obj +(Overview) +endobj +5 0 obj +<< /S /GoTo /D (section.2) >> +endobj +8 0 obj +(SwiftMontage API) +endobj +9 0 obj +<< /S /GoTo /D (subsection.2.1) >> +endobj +12 0 obj +(Types) +endobj +13 0 obj +<< /S /GoTo /D (subsubsection.2.1.1) >> +endobj +16 0 obj +(Image) +endobj +17 0 obj +<< /S /GoTo /D (subsubsection.2.1.2) >> +endobj +20 0 obj +(Header) +endobj +21 0 obj +<< /S /GoTo /D (subsubsection.2.1.3) >> +endobj +24 0 obj +(Table) +endobj +25 0 obj +<< /S /GoTo /D (subsubsection.2.1.4) >> +endobj +28 0 obj +(JPEG) +endobj +29 0 obj +<< /S /GoTo /D (subsubsection.2.1.5) >> +endobj +32 0 obj +(Status) +endobj +33 0 obj +<< /S /GoTo /D (subsubsection.2.1.6) >> +endobj +36 0 obj +(BackgroundStruct) +endobj +37 0 obj +<< /S /GoTo /D (subsubsection.2.1.7) >> +endobj +40 0 obj +(DiffStruct) +endobj +41 0 obj +<< /S /GoTo /D (subsection.2.2) >> +endobj +44 0 obj +(App Procedures) +endobj +45 0 obj +<< /S /GoTo /D (subsubsection.2.2.1) >> +endobj +48 0 obj +(mAdd) +endobj +49 0 obj +<< /S /GoTo /D (subsubsection.2.2.2) >> +endobj +52 0 obj +(mBackground) +endobj +53 0 obj +<< /S /GoTo /D (subsubsection.2.2.3) >> +endobj +56 0 obj +(mBgModel) +endobj +57 0 obj +<< /S /GoTo /D (subsubsection.2.2.4) >> +endobj +60 0 obj +(mConcatFit) +endobj +61 0 obj +<< /S /GoTo /D (subsubsection.2.2.5) >> +endobj +64 0 obj +(mDiff) +endobj +65 0 obj +<< /S /GoTo /D (subsubsection.2.2.6) >> +endobj +68 0 obj +(mDiffFit) +endobj +69 0 obj +<< /S /GoTo /D (subsubsection.2.2.7) >> +endobj +72 0 obj +(mFitplane) +endobj +73 0 obj +<< /S /GoTo /D (subsubsection.2.2.8) >> +endobj +76 0 obj +(mImgtbl) +endobj +77 0 obj +<< /S /GoTo /D (subsubsection.2.2.9) >> +endobj +80 0 obj +(mMakeHdr) +endobj +81 0 obj +<< /S /GoTo /D (subsubsection.2.2.10) >> +endobj +84 0 obj +(mJPEG) +endobj +85 0 obj +<< /S /GoTo /D (subsubsection.2.2.11) >> +endobj +88 0 obj +(mOverlaps) +endobj +89 0 obj +<< /S /GoTo /D (subsubsection.2.2.12) >> +endobj +92 0 obj +(mProject) +endobj +93 0 obj +<< /S /GoTo /D (subsubsection.2.2.13) >> +endobj +96 0 obj +(mProjectPP) +endobj +97 0 obj +<< /S /GoTo /D (subsubsection.2.2.14) >> +endobj +100 0 obj +(mShrink) +endobj +101 0 obj +<< /S /GoTo /D (subsubsection.2.2.15) >> +endobj +104 0 obj +(Backgound\137list) +endobj +105 0 obj +<< /S /GoTo /D (subsubsection.2.2.16) >> +endobj +108 0 obj +(create\137status\137table) +endobj +109 0 obj +<< /S /GoTo /D (subsection.2.3) >> +endobj +112 0 obj +(Batch Wrappers) +endobj +113 0 obj +<< /S /GoTo /D (subsubsection.2.3.1) >> +endobj +116 0 obj +(mBackgroundBatch) +endobj +117 0 obj +<< /S /GoTo /D (subsubsection.2.3.2) >> +endobj +120 0 obj +(mDiffBatch) +endobj +121 0 obj +<< /S /GoTo /D (subsubsection.2.3.3) >> +endobj +124 0 obj +(mDiffFitBatch) +endobj +125 0 obj +<< /S /GoTo /D (subsubsection.2.3.4) >> +endobj +128 0 obj +(mFitBatch) +endobj +129 0 obj +<< /S /GoTo /D (subsubsection.2.3.5) >> +endobj +132 0 obj +(mProjectBatch) +endobj +133 0 obj +<< /S /GoTo /D (subsection.2.4) >> +endobj +136 0 obj +(Examples) +endobj +137 0 obj +<< /S /GoTo /D (subsubsection.2.4.1) >> +endobj +140 0 obj +(Unrectified gray-scale image) +endobj +141 0 obj +<< /S /GoTo /D (subsubsection.2.4.2) >> +endobj +144 0 obj +(Rectified gray-scale image) +endobj +145 0 obj +<< /S /GoTo /D [146 0 R /FitH ] >> +endobj +148 0 obj << +/Length 210 +/Filter /FlateDecode +>> +stream +x???OkA ???)?q??1????c mQ(X??x??P+???wV?E??KH^??1z0>?k1??????*?jI#Gr???1of??????=.?????????]?I? +R???>'/?D(?po?C?V??H?d????1 )[?vf?`??n?????A???:?`f? ?b??+??$ +Yec?#???S???n???u ????_?G +endstream +endobj +146 0 obj << +/Type /Page +/Contents 148 0 R +/Resources 147 0 R +/MediaBox [0 0 595.276 841.89] +/Parent 154 0 R +>> endobj +149 0 obj << +/D [146 0 R /XYZ -16.307 900.716 null] +>> endobj +152 0 obj << +/D [146 0 R /XYZ 56.693 759.068 null] +>> endobj +147 0 obj << +/Font << /F50 150 0 R /F51 151 0 R /F52 153 0 R >> +/ProcSet [ /PDF /Text ] +>> endobj +193 0 obj << +/Length 972 +/Filter /FlateDecode +>> +stream +x???Ks?0???:?T???I??L?n?Ni&C +??`?????1????y?L??E8? ?7???)2i*h??)qr??*???A?^?;?~?pb ??"??V +D???o???. +??6????/~?? +N?))N??0;?????%f???OK????%???A2j?aL????3!?' ??????9X?|??$?????V??#l??-?c%???x?lU?gA +?n?h6G;w???Jd?v-??e???????M???I????(v?u-????7??s%{p????>L??z???h??U??X????`2 ??i??l???$j5+?5??r?k?a?p}o??+??L?-&?p)M???+S????tLJen^???)e?ck???r???j?B1??? ??Xs?Rs?G????'A- ??6[?q? ??m??4?n?U? +>??2<;????a?q9s??.c???LY?<??]-??(??U?K?!+??y????d?Ab4??dS9??j?n? ?>g9??A12?qt???????%??f??4?~; V +?Nb??????????*[:r7-? t????Mu1???????=r?K??E?L?U?m&????)[??+V7~???jj?n??E??S?x^+Qn?m(?4??R~????J???{M????fYr?????0????X??X???.g???6??{?:??;P?Q??y??j?!?{?@?F???r???c4m +????9?!???go?_?? +endstream +endobj +192 0 obj << +/Type /Page +/Contents 193 0 R +/Resources 191 0 R +/MediaBox [0 0 595.276 841.89] +/Parent 154 0 R +/Annots [ 155 0 R 156 0 R 157 0 R 158 0 R 159 0 R 160 0 R 161 0 R 162 0 R 163 0 R 164 0 R 165 0 R 166 0 R 167 0 R 168 0 R 169 0 R 170 0 R 171 0 R 172 0 R 173 0 R 174 0 R 175 0 R 176 0 R 177 0 R 178 0 R 179 0 R 180 0 R 181 0 R 182 0 R 183 0 R 184 0 R 185 0 R 186 0 R 187 0 R 188 0 R 189 0 R 190 0 R ] +>> endobj +155 0 obj << +/Type /Annot +/Subtype /Link +/Border[0 0 0]/H/I/C[1 0 0] +/Rect [55.697 706.663 113.38 715.639] +/A << /S /GoTo /D (section.1) >> +>> endobj +156 0 obj << +/Type /Annot +/Subtype /Link +/Border[0 0 0]/H/I/C[1 0 0] +/Rect [55.697 677.171 152.045 688.05] +/A << /S /GoTo /D (section.2) >> +>> endobj +157 0 obj << +/Type /Annot +/Subtype /Link +/Border[0 0 0]/H/I/C[1 0 0] +/Rect [70.641 659.411 119.099 670.315] +/A << /S /GoTo /D (subsection.2.1) >> +>> endobj +158 0 obj << +/Type /Annot +/Subtype /Link +/Border[0 0 0]/H/I/C[1 0 0] +/Rect [93.555 641.785 152.324 652.689] +/A << /S /GoTo /D (subsubsection.2.1.1) >> +>> endobj +159 0 obj << +/Type /Annot +/Subtype /Link +/Border[0 0 0]/H/I/C[1 0 0] +/Rect [93.555 626.216 156.19 635.063] +/A << /S /GoTo /D (subsubsection.2.1.2) >> +>> endobj +160 0 obj << +/Type /Annot +/Subtype /Link +/Border[0 0 0]/H/I/C[1 0 0] +/Rect [93.555 608.591 149.315 617.437] +/A << /S /GoTo /D (subsubsection.2.1.3) >> +>> endobj +161 0 obj << +/Type /Annot +/Subtype /Link +/Border[0 0 0]/H/I/C[1 0 0] +/Rect [93.555 590.965 150.122 599.811] +/A << /S /GoTo /D (subsubsection.2.1.4) >> +>> endobj +162 0 obj << +/Type /Annot +/Subtype /Link +/Border[0 0 0]/H/I/C[1 0 0] +/Rect [93.555 573.339 151.786 582.186] +/A << /S /GoTo /D (subsubsection.2.1.5) >> +>> endobj +163 0 obj << +/Type /Annot +/Subtype /Link +/Border[0 0 0]/H/I/C[1 0 0] +/Rect [93.555 553.656 199.925 564.56] +/A << /S /GoTo /D (subsubsection.2.1.6) >> +>> endobj +164 0 obj << +/Type /Annot +/Subtype /Link +/Border[0 0 0]/H/I/C[1 0 0] +/Rect [93.555 538.087 167.576 546.934] +/A << /S /GoTo /D (subsubsection.2.1.7) >> +>> endobj +165 0 obj << +/Type /Annot +/Subtype /Link +/Border[0 0 0]/H/I/C[1 0 0] +/Rect [70.641 518.404 159.457 529.308] +/A << /S /GoTo /D (subsection.2.2) >> +>> endobj +166 0 obj << +/Type /Annot +/Subtype /Link +/Border[0 0 0]/H/I/C[1 0 0] +/Rect [93.555 502.835 152.334 511.682] +/A << /S /GoTo /D (subsubsection.2.2.1) >> +>> endobj +167 0 obj << +/Type /Annot +/Subtype /Link +/Border[0 0 0]/H/I/C[1 0 0] +/Rect [93.555 483.152 183.876 494.056] +/A << /S /GoTo /D (subsubsection.2.2.2) >> +>> endobj +168 0 obj << +/Type /Annot +/Subtype /Link +/Border[0 0 0]/H/I/C[1 0 0] +/Rect [93.555 465.526 172.817 476.43] +/A << /S /GoTo /D (subsubsection.2.2.3) >> +>> endobj +169 0 obj << +/Type /Annot +/Subtype /Link +/Border[0 0 0]/H/I/C[1 0 0] +/Rect [93.555 449.958 174.481 458.804] +/A << /S /GoTo /D (subsubsection.2.2.4) >> +>> endobj +170 0 obj << +/Type /Annot +/Subtype /Link +/Border[0 0 0]/H/I/C[1 0 0] +/Rect [93.555 432.332 151.527 441.179] +/A << /S /GoTo /D (subsubsection.2.2.5) >> +>> endobj +171 0 obj << +/Type /Annot +/Subtype /Link +/Border[0 0 0]/H/I/C[1 0 0] +/Rect [93.555 414.706 162.605 423.553] +/A << /S /GoTo /D (subsubsection.2.2.6) >> +>> endobj +172 0 obj << +/Type /Annot +/Subtype /Link +/Border[0 0 0]/H/I/C[1 0 0] +/Rect [93.555 395.023 167.836 405.927] +/A << /S /GoTo /D (subsubsection.2.2.7) >> +>> endobj +173 0 obj << +/Type /Annot +/Subtype /Link +/Border[0 0 0]/H/I/C[1 0 0] +/Rect [93.555 377.397 161.748 388.301] +/A << /S /GoTo /D (subsubsection.2.2.8) >> +>> endobj +174 0 obj << +/Type /Annot +/Subtype /Link +/Border[0 0 0]/H/I/C[1 0 0] +/Rect [93.555 361.709 173.255 370.675] +/A << /S /GoTo /D (subsubsection.2.2.9) >> +>> endobj +175 0 obj << +/Type /Annot +/Subtype /Link +/Border[0 0 0]/H/I/C[1 0 0] +/Rect [93.555 344.203 157.873 353.049] +/A << /S /GoTo /D (subsubsection.2.2.10) >> +>> endobj +176 0 obj << +/Type /Annot +/Subtype /Link +/Border[0 0 0]/H/I/C[1 0 0] +/Rect [93.555 324.519 170.994 335.423] +/A << /S /GoTo /D (subsubsection.2.2.11) >> +>> endobj +177 0 obj << +/Type /Annot +/Subtype /Link +/Border[0 0 0]/H/I/C[1 0 0] +/Rect [93.555 306.894 163.402 317.797] +/A << /S /GoTo /D (subsubsection.2.2.12) >> +>> endobj +178 0 obj << +/Type /Annot +/Subtype /Link +/Border[0 0 0]/H/I/C[1 0 0] +/Rect [93.555 289.268 174.481 300.172] +/A << /S /GoTo /D (subsubsection.2.2.13) >> +>> endobj +179 0 obj << +/Type /Annot +/Subtype /Link +/Border[0 0 0]/H/I/C[1 0 0] +/Rect [93.555 273.699 161.749 282.546] +/A << /S /GoTo /D (subsubsection.2.2.14) >> +>> endobj +180 0 obj << +/Type /Annot +/Subtype /Link +/Border[0 0 0]/H/I/C[1 0 0] +/Rect [93.555 254.016 189.972 264.92] +/A << /S /GoTo /D (subsubsection.2.2.15) >> +>> endobj +181 0 obj << +/Type /Annot +/Subtype /Link +/Border[0 0 0]/H/I/C[1 0 0] +/Rect [93.555 237.366 203.232 247.294] +/A << /S /GoTo /D (subsubsection.2.2.16) >> +>> endobj +182 0 obj << +/Type /Annot +/Subtype /Link +/Border[0 0 0]/H/I/C[1 0 0] +/Rect [70.641 218.764 160.005 229.668] +/A << /S /GoTo /D (subsection.2.3) >> +>> endobj +183 0 obj << +/Type /Annot +/Subtype /Link +/Border[0 0 0]/H/I/C[1 0 0] +/Rect [93.555 201.138 207.118 212.042] +/A << /S /GoTo /D (subsubsection.2.3.1) >> +>> endobj +184 0 obj << +/Type /Annot +/Subtype /Link +/Border[0 0 0]/H/I/C[1 0 0] +/Rect [93.555 185.57 174.769 194.416] +/A << /S /GoTo /D (subsubsection.2.3.2) >> +>> endobj +185 0 obj << +/Type /Annot +/Subtype /Link +/Border[0 0 0]/H/I/C[1 0 0] +/Rect [93.555 167.944 185.848 176.79] +/A << /S /GoTo /D (subsubsection.2.3.3) >> +>> endobj +186 0 obj << +/Type /Annot +/Subtype /Link +/Border[0 0 0]/H/I/C[1 0 0] +/Rect [93.555 150.318 169.499 159.165] +/A << /S /GoTo /D (subsubsection.2.3.4) >> +>> endobj +187 0 obj << +/Type /Annot +/Subtype /Link +/Border[0 0 0]/H/I/C[1 0 0] +/Rect [93.555 130.635 186.645 141.539] +/A << /S /GoTo /D (subsubsection.2.3.5) >> +>> endobj +188 0 obj << +/Type /Annot +/Subtype /Link +/Border[0 0 0]/H/I/C[1 0 0] +/Rect [70.641 113.009 134.839 123.913] +/A << /S /GoTo /D (subsection.2.4) >> +>> endobj +189 0 obj << +/Type /Annot +/Subtype /Link +/Border[0 0 0]/H/I/C[1 0 0] +/Rect [93.555 95.383 242.515 106.287] +/A << /S /GoTo /D (subsubsection.2.4.1) >> +>> endobj +190 0 obj << +/Type /Annot +/Subtype /Link +/Border[0 0 0]/H/I/C[1 0 0] +/Rect [93.555 77.757 233.668 88.661] +/A << /S /GoTo /D (subsubsection.2.4.2) >> +>> endobj +194 0 obj << +/D [192 0 R /XYZ -11.232 900.716 null] +>> endobj +191 0 obj << +/Font << /F50 150 0 R /F51 151 0 R /F52 153 0 R /F57 195 0 R >> +/ProcSet [ /PDF /Text ] +>> endobj +198 0 obj << +/Length 2181 +/Filter /FlateDecode +>> +stream +x??]s??????o?fb +Q?: +?wA?E???DTD?z|oO???????Y]?D??>??~]??*?ak??8??y\+%?$?? +vdy?=}2?v?????W +?? +?T?pRV(?Jl?????`k)?"N? %??R??????$ !g??@iQ(? K?x??D??#??m +>_+)e????`~??J%???u#?k +?f????au??r,???[i?O ;?}Y???????? +?u?????C?U? ????(?i?C;hBZ&pM?????g??B?.??K??d?cZ????????1?a?????????????`?j?i??@s?h?FC ?1?1??Xu-??ng??XH +v??.???8?M?74?Z;?? +Y<?????F#bi????GI??,W?"4?3^?QI???????????w?`?R82?,BSR???'?D?????J?e?$ +L?'??7 ?3???ya?c??1pS??$'????(|w?C???%??.????M[?)??pQ?s&/?{??*?!D??+=U,?4u=U ?/????? +E??p?`E??Wh`y?&??;??e???TDQ? ? +?_K?,??????s?O+?.??Z??>????? +I?{???H5?X[??%!??T?^x~????{?i$?8y?m/???.?????u??}h~??????G(?v?ix3????C$[9?!{?????o??????0?????T%yW?????\???c??]z???RK?sB? }{9??d????y????J???i?GB??????????}?O?<???????/wjhX?~??pj?BU?????)??@$??z3??????????l??My??M?;???#)??????#??n0?????pB?? +?OJ!????oN????jf_??[?????=?t?UdBf??p????g95??J?_j>`?F[??=0???/??????Ko??gxKO??*\{o*$7??3??????!w???????W?J4??5?cm????????s???h?/K?)????\?????'???I??(/F???~??\sT?(?7 >J????.?\?]?y=??>J?B??K???nY?c?]?7 9???????2????????;X????C?@O%K??Tm/?uc:*??????l? +endstream +endobj +197 0 obj << +/Type /Page +/Contents 198 0 R +/Resources 196 0 R +/MediaBox [0 0 595.276 841.89] +/Parent 154 0 R +>> endobj +199 0 obj << +/D [197 0 R /XYZ -16.307 900.716 null] +>> endobj +2 0 obj << +/D [197 0 R /XYZ 56.693 759.068 null] +>> endobj +200 0 obj << +/D [197 0 R /XYZ 56.693 731.272 null] +>> endobj +6 0 obj << +/D [197 0 R /XYZ 56.693 505.814 null] +>> endobj +201 0 obj << +/D [197 0 R /XYZ 56.693 466.661 null] +>> endobj +10 0 obj << +/D [197 0 R /XYZ 56.693 466.661 null] +>> endobj +202 0 obj << +/D [197 0 R /XYZ 56.693 439.307 null] +>> endobj +14 0 obj << +/D [197 0 R /XYZ 56.693 409.464 null] +>> endobj +203 0 obj << +/D [197 0 R /XYZ 56.693 383.669 null] +>> endobj +204 0 obj << +/D [197 0 R /XYZ 56.693 377.691 null] +>> endobj +205 0 obj << +/D [197 0 R /XYZ 56.693 380.581 null] +>> endobj +18 0 obj << +/D [197 0 R /XYZ 56.693 326.329 null] +>> endobj +207 0 obj << +/D [197 0 R /XYZ 56.693 300.534 null] +>> endobj +208 0 obj << +/D [197 0 R /XYZ 56.693 294.557 null] +>> endobj +209 0 obj << +/D [197 0 R /XYZ 56.693 297.446 null] +>> endobj +22 0 obj << +/D [197 0 R /XYZ 56.693 243.195 null] +>> endobj +210 0 obj << +/D [197 0 R /XYZ 56.693 217.4 null] +>> endobj +211 0 obj << +/D [197 0 R /XYZ 56.693 211.422 null] +>> endobj +212 0 obj << +/D [197 0 R /XYZ 56.693 214.311 null] +>> endobj +26 0 obj << +/D [197 0 R /XYZ 56.693 148.105 null] +>> endobj +213 0 obj << +/D [197 0 R /XYZ 56.693 122.31 null] +>> endobj +214 0 obj << +/D [197 0 R /XYZ 56.693 116.332 null] +>> endobj +215 0 obj << +/D [197 0 R /XYZ 56.693 119.222 null] +>> endobj +196 0 obj << +/Font << /F50 150 0 R /F51 151 0 R /F52 153 0 R /F90 206 0 R >> +/ProcSet [ /PDF /Text ] +>> endobj +218 0 obj << +/Length 2216 +/Filter /FlateDecode +>> +stream +x??[K??8????? +$?"){??3? f??? Y?m!????i4?????,??D6?>???X?GU???q??p?????w???q??TD??HP$?H??*?W????S?n??6???o)??w????? %???"?C????Eo A?s;???D.????v?????w???@fJA?(??}?????a????L?}? F4P?Ew????%??e?@?N6S?`?Bq?F7.???`?m??/?[??/??1J0???!J??W?s"??E)??:??CG?.??O at cD9?&????*?-?X~??Sf?HQ? +?5?Md ?qh*l?dC4?@?Y0??C>??\?+???\?`e?G +L?????i?6-N +nK???)6?Xn)?????sK(w?R`?-???-E??=m??>d??vN?=Y?m?S`??vs?????g=????????????n???x?t?!?Z????|??@?N?D????? +H1V#7??u?1?#? +t?????|w?T?[??w)z(??? |L?{!??X???^?>???b-?g????t???7?? ???i?;E +endstream +endobj +217 0 obj << +/Type /Page +/Contents 218 0 R +/Resources 216 0 R +/MediaBox [0 0 595.276 841.89] +/Parent 154 0 R +>> endobj +219 0 obj << +/D [217 0 R /XYZ -11.232 900.716 null] +>> endobj +30 0 obj << +/D [217 0 R /XYZ 56.693 759.068 null] +>> endobj +220 0 obj << +/D [217 0 R /XYZ 56.693 739.087 null] +>> endobj +221 0 obj << +/D [217 0 R /XYZ 56.693 734.609 null] +>> endobj +222 0 obj << +/D [217 0 R /XYZ 56.693 737.499 null] +>> endobj +34 0 obj << +/D [217 0 R /XYZ 56.693 674.939 null] +>> endobj +223 0 obj << +/D [217 0 R /XYZ 56.693 650.645 null] +>> endobj +224 0 obj << +/D [217 0 R /XYZ 56.693 646.167 null] +>> endobj +225 0 obj << +/D [217 0 R /XYZ 56.693 649.057 null] +>> endobj +226 0 obj << +/D [217 0 R /XYZ 56.693 638.098 null] +>> endobj +227 0 obj << +/D [217 0 R /XYZ 56.693 627.139 null] +>> endobj +228 0 obj << +/D [217 0 R /XYZ 56.693 616.18 null] +>> endobj +229 0 obj << +/D [217 0 R /XYZ 56.693 605.221 null] +>> endobj +230 0 obj << +/D [217 0 R /XYZ 56.693 594.262 null] +>> endobj +231 0 obj << +/D [217 0 R /XYZ 56.693 583.303 null] +>> endobj +38 0 obj << +/D [217 0 R /XYZ 56.693 520.744 null] +>> endobj +232 0 obj << +/D [217 0 R /XYZ 56.693 496.449 null] +>> endobj +233 0 obj << +/D [217 0 R /XYZ 56.693 491.972 null] +>> endobj +234 0 obj << +/D [217 0 R /XYZ 56.693 494.861 null] +>> endobj +235 0 obj << +/D [217 0 R /XYZ 56.693 483.902 null] +>> endobj +236 0 obj << +/D [217 0 R /XYZ 56.693 472.943 null] +>> endobj +237 0 obj << +/D [217 0 R /XYZ 56.693 461.985 null] +>> endobj +238 0 obj << +/D [217 0 R /XYZ 56.693 451.026 null] +>> endobj +239 0 obj << +/D [217 0 R /XYZ 56.693 440.067 null] +>> endobj +240 0 obj << +/D [217 0 R /XYZ 56.693 429.108 null] +>> endobj +241 0 obj << +/D [217 0 R /XYZ 56.693 418.149 null] +>> endobj +42 0 obj << +/D [217 0 R /XYZ 56.693 355.589 null] +>> endobj +242 0 obj << +/D [217 0 R /XYZ 56.693 328.705 null] +>> endobj +46 0 obj << +/D [217 0 R /XYZ 56.693 254.301 null] +>> endobj +243 0 obj << +/D [217 0 R /XYZ 56.693 227.85 null] +>> endobj +244 0 obj << +/D [217 0 R /XYZ 56.693 223.372 null] +>> endobj +245 0 obj << +/D [217 0 R /XYZ 56.693 226.262 null] +>> endobj +50 0 obj << +/D [217 0 R /XYZ 56.693 151.747 null] +>> endobj +246 0 obj << +/D [217 0 R /XYZ 56.693 127.452 null] +>> endobj +247 0 obj << +/D [217 0 R /XYZ 56.693 122.975 null] +>> endobj +248 0 obj << +/D [217 0 R /XYZ 56.693 125.865 null] +>> endobj +216 0 obj << +/Font << /F50 150 0 R /F51 151 0 R /F52 153 0 R /F90 206 0 R >> +/ProcSet [ /PDF /Text ] +>> endobj +251 0 obj << +/Length 2190 +/Filter /FlateDecode +>> +stream +x??ZKs?6??W?(U?$H???dR5U??&SS?DY?H?C?q??oh? +c +]??6?]e?O?~oK?????_??ny???/??m?u_? +???`K??{?4????{??)K??j?F_~]2???????_?f??b??? ???`?U]u?????7???\.?????vk%F?oV?Vj'E???g??T+???E??cY?m?l6?3?VK??????????s;P?K]??c?9???o???+;Xa??WP??Y? ?????<L???`???????K????????c????l?[X??v?3?????0 +J?|xM^?i?G????????9???????yT1????B?????J@?? !?i???[??$??r?T????sxH????x?<Rw?g.?j ?A?B9 ?4??A??|z???M|??;??+ ??C?e???[??9xeR3r??F?j? +>?_??]?????D???? ??????l#???`???s?H$-?L.x???g? ?SW???\"`???0?SSiP?"?A??? h??"?? " ;??~BM??hpI-?q?u?c??h?B?-> endobj +252 0 obj << +/D [250 0 R /XYZ -16.307 900.716 null] +>> endobj +54 0 obj << +/D [250 0 R /XYZ 56.693 759.068 null] +>> endobj +253 0 obj << +/D [250 0 R /XYZ 56.693 739.087 null] +>> endobj +254 0 obj << +/D [250 0 R /XYZ 56.693 734.297 null] +>> endobj +255 0 obj << +/D [250 0 R /XYZ 56.693 737.186 null] +>> endobj +58 0 obj << +/D [250 0 R /XYZ 56.693 661.911 null] +>> endobj +256 0 obj << +/D [250 0 R /XYZ 56.693 637.304 null] +>> endobj +257 0 obj << +/D [250 0 R /XYZ 56.693 632.514 null] +>> endobj +258 0 obj << +/D [250 0 R /XYZ 56.693 635.403 null] +>> endobj +62 0 obj << +/D [250 0 R /XYZ 56.693 560.129 null] +>> endobj +259 0 obj << +/D [250 0 R /XYZ 56.693 535.521 null] +>> endobj +260 0 obj << +/D [250 0 R /XYZ 56.693 530.731 null] +>> endobj +261 0 obj << +/D [250 0 R /XYZ 56.693 533.621 null] +>> endobj +66 0 obj << +/D [250 0 R /XYZ 56.693 458.346 null] +>> endobj +262 0 obj << +/D [250 0 R /XYZ 56.693 433.739 null] +>> endobj +263 0 obj << +/D [250 0 R /XYZ 56.693 428.949 null] +>> endobj +264 0 obj << +/D [250 0 R /XYZ 56.693 431.838 null] +>> endobj +70 0 obj << +/D [250 0 R /XYZ 56.693 368.518 null] +>> endobj +265 0 obj << +/D [250 0 R /XYZ 56.693 343.911 null] +>> endobj +266 0 obj << +/D [250 0 R /XYZ 56.693 339.121 null] +>> endobj +267 0 obj << +/D [250 0 R /XYZ 56.693 342.01 null] +>> endobj +74 0 obj << +/D [250 0 R /XYZ 56.693 266.736 null] +>> endobj +268 0 obj << +/D [250 0 R /XYZ 56.693 242.128 null] +>> endobj +269 0 obj << +/D [250 0 R /XYZ 56.693 237.339 null] +>> endobj +270 0 obj << +/D [250 0 R /XYZ 56.693 240.228 null] +>> endobj +78 0 obj << +/D [250 0 R /XYZ 56.693 164.953 null] +>> endobj +271 0 obj << +/D [250 0 R /XYZ 56.693 140.346 null] +>> endobj +272 0 obj << +/D [250 0 R /XYZ 56.693 135.556 null] +>> endobj +273 0 obj << +/D [250 0 R /XYZ 56.693 138.445 null] +>> endobj +249 0 obj << +/Font << /F50 150 0 R /F51 151 0 R /F52 153 0 R /F90 206 0 R >> +/ProcSet [ /PDF /Text ] +>> endobj +276 0 obj << +/Length 2227 +/Filter /FlateDecode +>> +stream +x??ZKs????W??$U??x?u???Nf?2qb?&[.??$?%R!?u?_??A??f,?F?Jr"?? +??}??x? +x??????O??M???e???l?*????O~?{??}??? ????Sus? +??0??f???'??v??????0?"#??8,?2??7?~???>??4 ???m +????? ?o?v?i|??????)??#??qA?2[?????+??*????M:y*6???/?? ??????Y[T%?Z??v4?b?ZU???e?[????I????7???????3l???????L?'~ ??9"?z?1ah?Y{??&?Wd?????F?/c???=?B??(y) +???????a?i????????<?p????97 ?q??a??/??P???o??$?????,c??6Q?-??\?$?P?v??@w?w\aq?M????^x?Fn????D!??v???v???z?&,???????xY????3?6???.1????Q????????w9U?+5?Y?%l3???`/?H??Ciz?^????r"???&'?{????p E +m?4M???g??]??oj?????1??S??o?{?????b&er??????B?X??Z??????H?`p??8[?)Sq|5?????/7?t?V6???m??=????U1?$o??*?Y????P BZ=?+A;?6??f?=?@????m??m?????????S?!?Q??q????k????5???5R7???>???i?VJ0??????H?L?gny??QP??'T??m?~~hvyV8????????T?[l?~ +?.?SDb????4nN?,???r???'? +8Ig|?Ik???6??!?}]?8?_`9????7??e??5s+cCs???I=?r8" +????????^???? ? A?Atw~??KK???a?!)m%???>2 +??????>??m??S??bg??h??o???0?? +w?u???u???X???BS??m?Ow??@+??X??|-D??????b?/&????????aS4??????B????BEL??j?>??_n???.T +???epn??o{\?#????`s???? +?M?^?)?bZFo??B@?(?AzXG??B?C U?$??IQ???C??8QFw??z???????fK^uQf?????Fp2?]v???????Ri??o????B?????LGq??V???f?%e?e??!3-???.!-?K?m??#???>?@h;i/8?=m?-?>?F????-??tV +endstream +endobj +275 0 obj << +/Type /Page +/Contents 276 0 R +/Resources 274 0 R +/MediaBox [0 0 595.276 841.89] +/Parent 154 0 R +>> endobj +277 0 obj << +/D [275 0 R /XYZ -11.232 900.716 null] +>> endobj +82 0 obj << +/D [275 0 R /XYZ 56.693 759.068 null] +>> endobj +278 0 obj << +/D [275 0 R /XYZ 56.693 739.087 null] +>> endobj +279 0 obj << +/D [275 0 R /XYZ 56.693 734.166 null] +>> endobj +280 0 obj << +/D [275 0 R /XYZ 56.693 737.055 null] +>> endobj +86 0 obj << +/D [275 0 R /XYZ 56.693 673.418 null] +>> endobj +281 0 obj << +/D [275 0 R /XYZ 56.693 648.68 null] +>> endobj +282 0 obj << +/D [275 0 R /XYZ 56.693 643.76 null] +>> endobj +283 0 obj << +/D [275 0 R /XYZ 56.693 646.649 null] +>> endobj +90 0 obj << +/D [275 0 R /XYZ 56.693 573.114 null] +>> endobj +284 0 obj << +/D [275 0 R /XYZ 56.693 546.319 null] +>> endobj +285 0 obj << +/D [275 0 R /XYZ 56.693 541.398 null] +>> endobj +286 0 obj << +/D [275 0 R /XYZ 56.693 544.287 null] +>> endobj +94 0 obj << +/D [275 0 R /XYZ 56.693 422.55 null] +>> endobj +287 0 obj << +/D [275 0 R /XYZ 56.693 395.655 null] +>> endobj +288 0 obj << +/D [275 0 R /XYZ 56.693 390.734 null] +>> endobj +289 0 obj << +/D [275 0 R /XYZ 56.693 393.624 null] +>> endobj +98 0 obj << +/D [275 0 R /XYZ 56.693 269.994 null] +>> endobj +290 0 obj << +/D [275 0 R /XYZ 56.693 243.099 null] +>> endobj +291 0 obj << +/D [275 0 R /XYZ 56.693 238.179 null] +>> endobj +292 0 obj << +/D [275 0 R /XYZ 56.693 241.068 null] +>> endobj +102 0 obj << +/D [275 0 R /XYZ 56.693 177.431 null] +>> endobj +293 0 obj << +/D [275 0 R /XYZ 56.693 152.693 null] +>> endobj +294 0 obj << +/D [275 0 R /XYZ 56.693 147.772 null] +>> endobj +295 0 obj << +/D [275 0 R /XYZ 56.693 150.662 null] +>> endobj +274 0 obj << +/Font << /F50 150 0 R /F51 151 0 R /F52 153 0 R /F90 206 0 R >> +/ProcSet [ /PDF /Text ] +>> endobj +299 0 obj << +/Length 2402 +/Filter /FlateDecode +>> +stream +x??ZK???????Q???xy????[?dO???)E???H-??????@7??????=l +S? +?V?????b???*??1_?J???????O?U1t?????7?[!X?5v???????1???_?n~? +>?????$?h2r ??&L??L299|??????/?:O???i????o?????m?maJ????8??b???Q?I?X??" $K?$??`=y?m?z8??L ?@???????i???????"????u ?? +z?)8=?L ???U???????v??,?_????????????T%?h????X?nR*??|Q???i???Z?v??3??*??n$,v0????pF??W???|???2??6?????8?????Y?????? +??\&?/s. {k?2d1W?Z.?q!??+??(???3A??1?9???6/?]~????`)i83????/?  { +?R ?? ?P? +????^??_?t~??!6??Br?@?????0c?(S???q???j>o???%?? +??kc??v???,??0??yN?%=?O>XF?G?*?KMfO?????u??t???&????Hi?????X???q' '???x%??:M +????N)"'?#(?M7N +]?*??pd|?? +; +???Kq?jt?t +?????(i???c?@?????K???C???? ?7?2K??t1?}#E;???3^???Rw?d0?$J???5~p +??n?AL??!???w?g?? ????Mez???o'?q?????1w??6$z!???}?????C??_H???{O5?l9?e%??j??&?N +endstream +endobj +298 0 obj << +/Type /Page +/Contents 299 0 R +/Resources 297 0 R +/MediaBox [0 0 595.276 841.89] +/Parent 318 0 R +>> endobj +296 0 obj << +/Type /XObject +/Subtype /Form +/FormType 1 +/PTEX.FileName (/usr/local/share/dblatex/latex/contrib/db2latex/graphics/warning.pdf) +/PTEX.PageNumber 1 +/PTEX.InfoDict 319 0 R +/BBox [0 0 29 29] +/Resources << +/ProcSet [ /PDF ] +/ExtGState << +/R8 320 0 R +/R7 321 0 R +>>>> +/Length 566 +/Filter /FlateDecode +>> +stream +x?]TI?T1 ??Y?0?9b?$@?{?Xp}????[?(??~???O???6?t +???>??j?????4'?W5??3??/?%H?K*???J,?.?H????&>?=o??&)? +endstream +endobj +319 0 obj +<< +/Producer (GPL Ghostscript SVN PRE-RELEASE 8.61) +/CreationDate (D:20100125210014Z) +/ModDate (D:20100125210014Z) +>> +endobj +320 0 obj +<< +/Type /ExtGState +/op true +>> +endobj +321 0 obj +<< +/Type /ExtGState +/OPM 1 +/SA true +>> +endobj +300 0 obj << +/D [298 0 R /XYZ -16.307 900.716 null] +>> endobj +106 0 obj << +/D [298 0 R /XYZ 56.693 759.068 null] +>> endobj +301 0 obj << +/D [298 0 R /XYZ 56.693 739.087 null] +>> endobj +302 0 obj << +/D [298 0 R /XYZ 56.693 733.674 null] +>> endobj +303 0 obj << +/D [298 0 R /XYZ 56.693 736.564 null] +>> endobj +110 0 obj << +/D [298 0 R /XYZ 56.693 659.776 null] +>> endobj +304 0 obj << +/D [298 0 R /XYZ 56.693 631.956 null] +>> endobj +114 0 obj << +/D [298 0 R /XYZ 56.693 590.967 null] +>> endobj +305 0 obj << +/D [298 0 R /XYZ 56.693 565.737 null] +>> endobj +306 0 obj << +/D [298 0 R /XYZ 56.693 560.325 null] +>> endobj +307 0 obj << +/D [298 0 R /XYZ 56.693 563.214 null] +>> endobj +308 0 obj << +/D [298 0 R /XYZ 56.693 552.256 null] +>> endobj +118 0 obj << +/D [298 0 R /XYZ 56.693 463.513 null] +>> endobj +309 0 obj << +/D [298 0 R /XYZ 56.693 438.283 null] +>> endobj +310 0 obj << +/D [298 0 R /XYZ 56.693 432.871 null] +>> endobj +311 0 obj << +/D [298 0 R /XYZ 56.693 435.76 null] +>> endobj +312 0 obj << +/D [298 0 R /XYZ 56.693 424.801 null] +>> endobj +122 0 obj << +/D [298 0 R /XYZ 56.693 215.428 null] +>> endobj +313 0 obj << +/D [298 0 R /XYZ 56.693 188.041 null] +>> endobj +314 0 obj << +/D [298 0 R /XYZ 56.693 182.629 null] +>> endobj +315 0 obj << +/D [298 0 R /XYZ 56.693 185.518 null] +>> endobj +316 0 obj << +/D [298 0 R /XYZ 56.693 174.559 null] +>> endobj +317 0 obj << +/D [298 0 R /XYZ 56.693 163.6 null] +>> endobj +297 0 obj << +/Font << /F50 150 0 R /F51 151 0 R /F52 153 0 R /F90 206 0 R >> +/XObject << /Im1 296 0 R >> +/ProcSet [ /PDF /Text ] +>> endobj +324 0 obj << +/Length 2029 +/Filter /FlateDecode +>> +stream +x??Z_??8??@??H???????????????>??Zt ? d?\_?+?eH?C?0O???(W?????M??v??q?v1y?AP'$?t??X9?%?w?rg;w??????%??h??????7?7?/?O0?9 ?\ +?x??1 +aK??????a?????P?9B ???I]g???}?N ?>9?xa?Ow????MT?VT???}??2?Kl?i?,????9?>?n???P?????W`M??R&??8?????0??????? Rz???;sA??(???-]n? +iS?{~7"?~%@?T?=?U]??j?*r0?C??)?????6??(h???=??o?,?y?>+|??)/?????Ma??> endobj +325 0 obj << +/D [323 0 R /XYZ -11.232 900.716 null] +>> endobj +126 0 obj << +/D [323 0 R /XYZ 56.693 635.769 null] +>> endobj +326 0 obj << +/D [323 0 R /XYZ 56.693 607.817 null] +>> endobj +327 0 obj << +/D [323 0 R /XYZ 56.693 601.839 null] +>> endobj +328 0 obj << +/D [323 0 R /XYZ 56.693 604.728 null] +>> endobj +130 0 obj << +/D [323 0 R /XYZ 56.693 475.466 null] +>> endobj +329 0 obj << +/D [323 0 R /XYZ 56.693 447.514 null] +>> endobj +330 0 obj << +/D [323 0 R /XYZ 56.693 441.536 null] +>> endobj +331 0 obj << +/D [323 0 R /XYZ 56.693 444.425 null] +>> endobj +134 0 obj << +/D [323 0 R /XYZ 56.693 292.331 null] +>> endobj +332 0 obj << +/D [323 0 R /XYZ 56.693 261.789 null] +>> endobj +138 0 obj << +/D [323 0 R /XYZ 56.693 219.991 null] +>> endobj +333 0 obj << +/D [323 0 R /XYZ 56.693 194.196 null] +>> endobj +334 0 obj << +/D [323 0 R /XYZ 56.693 188.219 null] +>> endobj +335 0 obj << +/D [323 0 R /XYZ 56.693 191.108 null] +>> endobj +336 0 obj << +/D [323 0 R /XYZ 56.693 180.149 null] +>> endobj +337 0 obj << +/D [323 0 R /XYZ 56.693 169.19 null] +>> endobj +338 0 obj << +/D [323 0 R /XYZ 56.693 158.231 null] +>> endobj +339 0 obj << +/D [323 0 R /XYZ 56.693 147.272 null] +>> endobj +340 0 obj << +/D [323 0 R /XYZ 56.693 136.313 null] +>> endobj +341 0 obj << +/D [323 0 R /XYZ 56.693 125.354 null] +>> endobj +342 0 obj << +/D [323 0 R /XYZ 56.693 114.396 null] +>> endobj +343 0 obj << +/D [323 0 R /XYZ 56.693 103.437 null] +>> endobj +344 0 obj << +/D [323 0 R /XYZ 56.693 92.478 null] +>> endobj +322 0 obj << +/Font << /F50 150 0 R /F51 151 0 R /F52 153 0 R /F90 206 0 R >> +/XObject << /Im1 296 0 R >> +/ProcSet [ /PDF /Text ] +>> endobj +347 0 obj << +/Length 1836 +/Filter /FlateDecode +>> +stream +x??\?n7}?W,?$ +??M??h?&@?4??c????J?*)M??%???\????q?' ???????,wi5?h??wx?{?L??????F??D??RC????:???4?_?/??q}??+???????K??U??" ?????z?qJ????0??(~?0?????G?y?b??D?3????:???Oh5????(??V??#g?b?p???i???[?????l?k?x~YCee?"???~??YW?p???u5?i'~?,?^??????O??G[F??_)?????&?????V??3?v??????{??hKN$??I0?g?&L??????x98??????l0??o~?8`??>?c?u????,???y{)?@??UFp? +\+U?5????b??-??uV?RR]n?}^???/????!????t????-?? +Y??;o?Y,??mB??w???? +&[?l#?`???}????mry??}?m4??1?~=^???4?l~r?'????_?V%??`om?????\@?????]???????2(???P??M????i?????????????._ ?????k-w??J?-???DW,??d4????Y?+?p???6K4???@?????9?ia?-?8>???-??W$6+/4???@?????Z?4+V[?s?;?p????? O?Xb ???l???3???R????5?????'?_x=?>Pg`?:??S??Mu?n*??bz1????????mi?????S|???d 4l??m%^?K?!?-7??_2??@W??} 4??@???XKbx???]?)?O?]?b????0??iS??K +?oDS???&?zJ??1?K- {????1)>?3hd[c0?y(?)>?`?:??X????oO? 'W4Vsh???l4?p?,?2Ff 8???H8?????_? +?_6Vh?M???E#?????)>?`?l ?J??`:??h?N???F#?C1b%^%??L?@?a??h+???v??????t?X??{? _6???x????????8?WKw??????Y?B??jq?w6?v?-#????gO???e???Eh$J??????T?X8?h? P0????P&|??'???O?z???????F~??lOQK(??=??z +L??S?AYFq7w1???T?)> endobj +348 0 obj << +/D [346 0 R /XYZ -16.307 900.716 null] +>> endobj +349 0 obj << +/D [346 0 R /XYZ 56.693 760.065 null] +>> endobj +350 0 obj << +/D [346 0 R /XYZ 56.693 749.106 null] +>> endobj +351 0 obj << +/D [346 0 R /XYZ 56.693 738.147 null] +>> endobj +352 0 obj << +/D [346 0 R /XYZ 56.693 727.188 null] +>> endobj +353 0 obj << +/D [346 0 R /XYZ 56.693 716.229 null] +>> endobj +354 0 obj << +/D [346 0 R /XYZ 56.693 705.27 null] +>> endobj +355 0 obj << +/D [346 0 R /XYZ 56.693 694.311 null] +>> endobj +356 0 obj << +/D [346 0 R /XYZ 56.693 683.352 null] +>> endobj +357 0 obj << +/D [346 0 R /XYZ 56.693 672.393 null] +>> endobj +142 0 obj << +/D [346 0 R /XYZ 56.693 635.243 null] +>> endobj +358 0 obj << +/D [346 0 R /XYZ 56.693 610.28 null] +>> endobj +359 0 obj << +/D [346 0 R /XYZ 56.693 604.302 null] +>> endobj +360 0 obj << +/D [346 0 R /XYZ 56.693 607.192 null] +>> endobj +361 0 obj << +/D [346 0 R /XYZ 56.693 596.233 null] +>> endobj +362 0 obj << +/D [346 0 R /XYZ 56.693 585.274 null] +>> endobj +363 0 obj << +/D [346 0 R /XYZ 56.693 574.315 null] +>> endobj +364 0 obj << +/D [346 0 R /XYZ 56.693 563.356 null] +>> endobj +365 0 obj << +/D [346 0 R /XYZ 56.693 552.397 null] +>> endobj +366 0 obj << +/D [346 0 R /XYZ 56.693 541.438 null] +>> endobj +367 0 obj << +/D [346 0 R /XYZ 56.693 530.479 null] +>> endobj +368 0 obj << +/D [346 0 R /XYZ 56.693 519.52 null] +>> endobj +369 0 obj << +/D [346 0 R /XYZ 56.693 508.561 null] +>> endobj +370 0 obj << +/D [346 0 R /XYZ 56.693 497.602 null] +>> endobj +371 0 obj << +/D [346 0 R /XYZ 56.693 486.644 null] +>> endobj +372 0 obj << +/D [346 0 R /XYZ 56.693 475.685 null] +>> endobj +373 0 obj << +/D [346 0 R /XYZ 56.693 464.726 null] +>> endobj +374 0 obj << +/D [346 0 R /XYZ 56.693 453.767 null] +>> endobj +375 0 obj << +/D [346 0 R /XYZ 56.693 442.808 null] +>> endobj +376 0 obj << +/D [346 0 R /XYZ 56.693 431.849 null] +>> endobj +377 0 obj << +/D [346 0 R /XYZ 56.693 420.89 null] +>> endobj +378 0 obj << +/D [346 0 R /XYZ 56.693 409.931 null] +>> endobj +379 0 obj << +/D [346 0 R /XYZ 56.693 398.972 null] +>> endobj +380 0 obj << +/D [346 0 R /XYZ 56.693 388.013 null] +>> endobj +381 0 obj << +/D [346 0 R /XYZ 56.693 377.055 null] +>> endobj +382 0 obj << +/D [346 0 R /XYZ 56.693 366.096 null] +>> endobj +383 0 obj << +/D [346 0 R /XYZ 56.693 355.137 null] +>> endobj +384 0 obj << +/D [346 0 R /XYZ 56.693 344.178 null] +>> endobj +385 0 obj << +/D [346 0 R /XYZ 56.693 333.219 null] +>> endobj +386 0 obj << +/D [346 0 R /XYZ 56.693 322.26 null] +>> endobj +387 0 obj << +/D [346 0 R /XYZ 56.693 311.301 null] +>> endobj +388 0 obj << +/D [346 0 R /XYZ 56.693 300.342 null] +>> endobj +389 0 obj << +/D [346 0 R /XYZ 56.693 289.383 null] +>> endobj +390 0 obj << +/D [346 0 R /XYZ 56.693 278.424 null] +>> endobj +391 0 obj << +/D [346 0 R /XYZ 56.693 267.465 null] +>> endobj +392 0 obj << +/D [346 0 R /XYZ 56.693 256.507 null] +>> endobj +393 0 obj << +/D [346 0 R /XYZ 56.693 245.548 null] +>> endobj +394 0 obj << +/D [346 0 R /XYZ 56.693 234.589 null] +>> endobj +395 0 obj << +/D [346 0 R /XYZ 56.693 223.63 null] +>> endobj +345 0 obj << +/Font << /F50 150 0 R /F51 151 0 R /F90 206 0 R /F52 153 0 R >> +/ProcSet [ /PDF /Text ] +>> endobj +397 0 obj +[600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600] +endobj +398 0 obj +[500 500 500 500 500 500 500 500 500 333 333 570 570 570 500 930 722 667 722 722 667 611 778 778 389 500 778 667 944 722 778 611 778 722 556 667 722 722 1000 722 722 667 333 278 333 581 500 333 500 556 444 556 444 333 500 556 278 333 556 278 833 556 500 556 556 444 389 333 556 500 722] +endobj +399 0 obj +[611 611 167 333 611 278 333 333 0 333 584 0 611 500 333 278 0 0 0 0 0 0 0 0 0 0 0 0 333 238 278 333 474 556 556 889 722 278 333 333 389 584 278 333 278 278 556 556 556 556 556 556 556 556 556 556 333 333 584 584 584 611 975 722 722 722 722 667 611 778 722 278 556 722 611 833 722 778 667 778 722 667 611 722 667 944 667 667 611 333 278 333 584 556 278 556 611 556 611 556 333 611 611 278 278 556 278 889 611 611 611 611 389 556 333 611 556 778 556 556] +endobj +400 0 obj +[355 556 556 889 667 222 333 333 389 584 278 333 278 278 556 556 556 556 556 556 556 556 556 556 278 278 584 584 584 556 1015 667 667 722 722 667 611 778 722 278 500 667 556 833 722 778 667 778 722 667 611 722 667 944 667 667 611 278 278 278 469 556 222 556 556 500 556 556 278 556 556 222 222 500 222 833 556 556 556 556 333 500 278 556 500 722 500 500] +endobj +401 0 obj +[556 556 167 333 611 278 333 333 0 333 564 0 611 444 333 278 0 0 0 0 0 0 0 0 0 0 0 0 333 180 250 333 408 500 500 833 778 333 333 333 500 564 250 333 250 278 500 500 500 500 500 500 500 500 500 500 278 278 564 564 564 444 921 722 667 667 722 611 556 722 722 333 389 722 611 889 722 722 556 722 667 556 611 722 722 944 722 722 611 333 278 333 469 500 333 444 500 444 500 444 333 500 500 278 278 500 278 778 500 500 500 500 333 389 278 500 500 722 500 500 444] +endobj +402 0 obj << +/Length1 1612 +/Length2 13807 +/Length3 0 +/Length 14620 +/Filter /FlateDecode +>> +stream +x??ycte??nl?????b?6vlUl?b?bVl[???T??}?}?O???????1?;?L?_??^??|r???/??D???/]???????J?? A?e??,ea????????wC*g4????B????A?mS? I???T?jea}???e9#} ????Rx:??0Y?nE&????ltNEBB???F??!????,????g???_??(??????[?'??Sp ? +X??Gj??u?:?|?^I?&B?N\?-?????YU??f?WP??????k????#????,~!?M?????????6?UT}Ws6K??)T???.?I???Gt9???;(? +d???iF???rF[`:?K????z?[W?(^)l??W?????!????B;??P???V?I??.p? b?)??`}?????????8??@AB?????Cu?]?????Qr?H?v/$???^??? %???GJ?????~?C B?vb???? ??~???-?^G???0? V?n?????Xn?3????n?]?b????X?(?4??m?B??(!??????f????0a~???????\?k? +? +??{???4?? +W??d??????$?G??8?bVyR????e???DK*Ojc3Bb???????~' +?z ? + +?=?.????G????Kp?R?V???2??N?Y?????t:????;??F???s???'????4I????t??U?1?? ????.2?&?b??\?????|??t???G???? +Bh???:Z???x$?f?????????[\?#HA?!]?O?.??? 0??}????uba%?Z???f?L?M?B?X?hq?????Q????~G{?q?\??CE]2??i?~?5KIh?P7?T%/Ncz ?w????o?u?????'?U??W?~k +U??? p?`?d}???m:????Tw?B +0m???7o?nO?w?????q?O?*}1???b??h??!?!Bu?E ? +`'?9p?yi???4???=?:qV?s? +?+Z?I??n??G?Mtw????????2??zM?I?xL?&???j?(???v????d???e?r^???J?A [?j???2;B?q?i1???'?<???p?;?F?????? +???D?0????C?L????????Npr??E9"1?q??X?q?????????????5E +??E??? +5????N???DR????(<?n@?F????0<[?rZ????L??1??^?>????l??V"????:6!4??????#?-??_{???? ?u?c???;??????????Y???D???kO +??j??????z????Q!???I7??l?,3?_?lT`ib?D?sM+eZ?M????v.????~??????#0??S?:(?????-???%`?v?;???LO!??Yk?????c?/E +?3V??Y?? |Z???????$?%X????@?'?T T?B~??V?.\??,^???5A&??i?+n{?????fAx???I?$??zh???5#U?e; ??~ +???Wp??:?????r??]%,?\?mP?v3 5??B + +_;???A???8? ??A$zV]7??=?B?B???K&???Ah*W??q??-LU? +(?/61f?Z{??yH? I[? P?9??&?????XJ??0?Va??c?Efv??? ?w?????s?yU1I?B???K????b$??v^?????????OH???S??(? +K2?r????2^????????w????e????X?PI_????7????|1Bh]?5#?????z??????{?m?w?C???/??7????d7? jh>?b??!4?????{???5?%6?t=%??????6?Men?}?&G???9????%Az?p?U?-??}?LRp?? +$xR p?0????&b????X{r???f???F?L??=?5?:?]??XZ??( ???x?k^: 9C?&B??8?g????]?;??MGc?L +d?|$E;?????W????{?[E@[?7OD? +9?q???x??1?E?Y#??pP?@?c??N??b! ??-?????wzo???)?q?SB_?????=?????1?$?#I????lB?v?`?^?P3??????y???Mu???P`y(??]{??_XG?m????????B??c:m?7N???|`???W/l?}?q???&??Lt0??oZ?????+?Da.?m??{?i??+??Y?z?r ??lwW?(?Yu?$m???????qq9 +??????b?:?;????1?C4k???]?????^??kU?I.|W???[??p?=W??w???Zh?P>|?o?#???????2??&?W\v???6O??-k??y??F?VF?h}??l?????c?Y'?h??????U??????g????'?$? ??IiA?OD?0C?JI?->?IM?????Y??0???cz?@>:1\?&?-????~??*a?"??`/?x???b%-?,?.???j(e?=?caB?6k?'??=*?$n????ML???T??7>w?Z#??????Kt*????M ????????H??0#?4#\???P?4Q???C?????????R?????Q?????T.1y`?^???1???z??5?X??U???A?v.?Y?@t??z??;?e\#?????L???? +?W?"7q?? ???l?.?\68?????????p?f????^U??mg??????????g=???\?hx??)$??$?}???C?W?>???i;??P$?6l????^?\?v??J}???n??PO??XS???????T?tVG???7v?_?j/#Me??q5G?}????6??6?.q ?<W)??e?Lg???S??????G??+]R?? O?`????????\?|[?#??B?I????0????9?e??w}m???N_ ?n?mo???tZ??.?????`z???g?C?Izb?[???PC ?|?H???]???G?O?I ?/???8o ?C?Zk?]?9?".?6?%W>yv??"?q??K?'`cO????P'Zi?O@%6?T???S3? ?4?f?$w???i???z?0{??E??;???h?PH;??????M???L?B?DM??Q 'C? '?????l1/???({????#)????_?y??A!?e?AC??D?m?????@?h??zA?0????N?pv?k?u75? +-???YR +|g??????/??`?????R??9????E??6Raj?N?e3*????????S??N?????C??????*r/?o???V?S|??f??????m?6>???_ l? U?}???c????????k?????L???? +d?&???X* i??5Z1U]?DT?????)?$??0????????????m???-2 ?Ljj? ? ?o|?,????RY?;~K?12?u???}?h?U?]????K??:??j?5?? +?p?\~?p?0?????P??$???}?0$???ad_\???J??k??6?p?0 ??????K^??R????+?{???d;g?!w?????Z???]?ia???????h?%?#? ?1d +??@????h??_z?*??K??=1?C?????t?? B??(??t?????h?v}E?F?_?I?????u?c??U??????B????H? ?H????g??\?? Q+kd?,E??-??! @?kT???????'???A????oGH?g?rWf\????????Ao?g*?? [??|G?BE?y?%??????;?T?v???~??=???(N??^??Rwu???n6HY??{??~,+???t?Ax?k?S???]?ac???(f2???j?#??x;? +?t??}???.??!?l??A?????????dK??l?\^v\??2>?1???U[?:C??IU????7????$??}??^$?a?? +T???????????(?|?P?? +28?????ZU??|X????]??????!?????S?ZgS`SJ? +6?xk?/ +1??????????????O????r?????g??|]????(a?=???Cg;G?'?U?U?T? +ER*AZ???hwt-?(? +^??M????P????T?C?-??nV?c"????T?P?????J???XRJ ?V! n?+id????a?~@R?L?_?z?0????Uv?E4)?Zz?0?Z?|?}& ???X?,?|??OH???C??????6 +??i???1????4???d???a??C??!??Om?r/Y?e0?bWj????{??q-x???T?."?8??o?`TPn???vr?[??|(j?O>?b?\??U{>ii??cr%X??u?2f?~????l?V??6????!?????n????f????|??9?&n ?Ov|?? Fs??? ?0?$o1?y,?,??N???O`?????#3?y??!4??????? +??o?S ??W?I(2?;4 +???0???_7&?????vKf??3?8F +fHw??~?J?e~w????-?$??78;?i?j?h&???4?r??????/iOi'nH6??[Z]??KP?E?h??0???f????????????,??5??G?Q?? +???Y\????J6?8.=????!@??J +P??A????jb6n"??T>X?r???eL7q?T?#?? 1??`???S?+")zA?s x??wP6?????- ??G?(?t??"???RQ???F76??p,R?2b ?~?g?u???????o??{r????.???[?E??W???W$?g?Pg?u9$??|d????????ITC?l??]???VOK?{[??`_{???????? +?2F????-Uu?r,u???U??A'????1??=G?yvgS;? .NG?????0????'?q?WPhi??B?8?_??????{?a?})d?????9??n?@?6?`?? ?^?B???~??n.~????#?a??GYi?#??z+?:????!?\??&?4q???????n= @???=dq"?J??[7?5??????[?H05?????????22?|*I4}8?"ir?Xmv]?k??0A7>_?J!'?z????????)?,|?? z ??T<??QU?? +-&???;??y? L ?~{?V?E^????N?V?"? v???L?l0????{<?=?`??v?V???? ??eb>?|c??n.??????=5??F?0Q??U??T?Qd??Y??T??????X?,??}???^L????Iu?E/??*???T?HE2^$W??T?u? +?????y1?%K%z???%F???R???L?????;???qc??a?]?;???-??????\??????dg??u$_1?|?F??}?H-??W?D$?m???? `?{k???3,?~4&??/??`??A???z??{?!??fc??/6?????yT???P?.L???#?KH???? +J??t??' +?jI?B?5W0???f$??G?/????N?b?'?8?Dtk???8?W?3L-??7?a^??g?X???c?E?'???p??>???C{?:?b?F????w???+???E'iT???N??d!9?7TtU??]?#[ +~?6??????7 E??}?? ????????_-??xK??^?7? ?8Q??q???gN f +?|? ^?8?????&0 H?A?+L??]C7]G,8Wc??,????3q??Q/???^2????????a?x?o?=?".???!??!R? + ID?r,??(?J? .^?FDq3????qZ?V?u?????d???_???MAR?4/??'????!?N??????o??*?c?r?N%??/?????L?????h5??5J;2?w?f?????uMB!m?:??A??j??b?m??v?? K???3:l#gU??G?> endobj +404 0 obj << +/Length1 1608 +/Length2 10713 +/Length3 0 +/Length 11543 +/Filter /FlateDecode +>> +stream +x??weT???5?$???A??????8???-?{??Np????w.?{g????????????????vu??Td*j??f???????P??89??? ?f?7#' +??=??K;? +U-Zzz?Z? +?????m?? ?~?qZClm?`?7???F5 ?h ???? +???h ; +?[?????_5?o???z??Z???Z???m +?`?7)X?X?a9H?\?f* GSK????[???k????? 0?M???`d?????%??+???s?????????<?f???,C?????Q*o?;??????:!f??? CL ? +?`d?f0??p?6v +1?kN???fo??_????N??o??}??J????C?MQ? ???V)?S?g??H?uu?????????V@?}RB6xK??*??j??^~???>???????????5??#????R8???P????6M???m??????{xD?{??g??????s?}f42?1?w?!Y?????u??? c_F|?(?i? +R???L???g??????>V8?b??2????]??K??8?L?[????n?k-?m?k?>p"H?D????Y???ZxD???NqPe&x[????S???;#[hhWH?>5y??8??yQ??????!D??s]??O????????vLJCR?????IV??R? +{G?m?-q?L?????%????>????Q:????g?o????Q:?K??_c?y?????5?&Mh???,o-??]+>*???J???D?????W??????.????y?i0???v????&??????????~(???2?????r +?a?>?D;(w??? +??? ?3?a??d?+?5?????C??5S??????j??G?????????Z@?Q??dy?8?j?r??2???Q +?o(????????>-??l?{?????kG??b? +bt????????l??GF?E?~Q??y??a)?/??tdL?Y??'?C?????\I???????p???Y??#?????? +?&74/??y? ??????x?j???K????N?S?Jp??????ykK?$?Cz???uSh????3G???????u??? \?????K??_?A_???"8c?|'??Jw?2 +??8f?^???Pu??u????-'???!^(?n??lZa?????"e??PH??T +W?8 ??}|??-?L?/???{?T0?In?!?X*???O???Mr??????y?01?o?????=?I?@?i]??>z[?R???&h[???h???X?K????=?;?>" +????cK????%U?A?W??V??G9Ic??rF?K?5iln?a]??????!?]4??u??=8?O???&?Tg??lb?'_ ?{$??S???$??;msL?#??u=?D?J????:+z??(?a???#??}y?gc?v?#?E???6? ?8?? +TVz?E????X#q??R? $&]??{??W???u???I *???0?{t???7 +???*???{uw?KN)*??D?>*I +j?`???'? ? ?K?#\???B?lz?y???U?{?a?g ??K?:H???( +????2??:???????D??1?v?R?|??{?tP$?Ma? +????`???? +?t++}I*???5?????????}????1R?1??u?H"?Kx-J??Y??}7? t??,_??/???cG??J??,??&?X`??3q?YV?m???a,%??s?=?w????j,?M?e???qBRq????*? ????? +]??Zw?6m?%0?F,?.?A????x]L?*??Cz??M?????? ?9????wD? +Y~?S????~??"????/9??Z0 ??????? ???x?v/s(?Z?]?w?xAqr?E?H?5?i??F\r?z)G?? +??5??i? ??kr??m???=??",c???????6???e?+???????CP???Y????? +u?9???CM?????b?????f?'jn?q???|?j??\ ????T?????M?X?H?f$X?????6=?????????&?????/?C???XA+fI{???M? ??J??D?0`???6Aa??Tx?/5F????g_d4??j???E?O +nQ??????&"??w?,D?d9R?Y?????????k$???b)?????i?>)?W>??x??%??7?j??1@k???????R ?? ?>*???c?\"Y??[+?+;6?;G%??????????d??4p???????n?1c?l?:S?V???@?"??c?????H?Z}?Q??????,zL?fGY+9Y#???D*?Y????A??:?^si&D???/?G????????M???e?8=p???? ?lm??/F +p?>???H?)???%P???$?hb?????#Q???S ?J$??????,???pB??M?[?zJ>I??H??  +|fA]?t?*7?f??s?Jgz?f??R??q;?????i?Xf4F$?DN?????nh?RI???a?ml?????0A?p1S??/??#?????:?????S?L?V?i????)?I?k??\??"????e??P?7y?t??\8tP????6??\XD??`?pv?r??K\+1G??????a? +k?w???B4??5?I?5d?;????x +?k?T?0?C0?r??p??`q?(0???e?Z?/=j??oJc!?I?;??'rKB?H?7? !h??0?C???3??a??~?????B=?U?mL??|E? +?M?Vz??w ?U?3?N3???S???v????q??z5\?VV???Rm4I ?@???VBs?k?Y??V???K??^??A&83???????VQ????????v?~??.?h??? +aU????jo??w??&??????x?~??7 c?C????+??O??? ??f?V????Z?=??\?o?>???0?????????Q_r??h???t?8et???[?????b???3??#M?g1?'a(nY_??X????h + +???|R?>????3?I}???P;?j3??=???????6?{?????e? +?Gj? =??#????T??W?07D?u6?>ed?????unovJ??$?Y??? 39z???????!uq????????p???l9 s?#im??4???_??-?L? +cT3?7/k ?2ZV?l?/.???FB?W?IyA_'/T??N?|??s? +m?4?+????h???t???I +?o?? +????s?M +?G???????>???y?{?j?Qe=????^7???1V?????????S??;????w?? ???2?-????_:(?_?ce#??7???D"M?Q?~???}j&9?i:???)|???Q???????[??Q?0?kP????R??j/?qh?G%??> +??????>?? -???X +%?Y???e???@7?$????\?G}?D??u?L:?q???p?M??9??1??v???>?l????.?VH?????Je??z;MKy???? ???l?N.???yc??G?[U?G???m#?,??yn?p??_??&??q???bf??f???g?Y?^1C?'~'?j!??L?A?S,v ???y?q??-?l?????m??y???#x??B?<@?9~?? +??l??.???Yo-?0e?n?^h??r???P??l&Da???????}5)?M?Q???:??#.??l0?z?d?c???'ttF$?-q +?v?gI6D2a!???\c? +u,????DSKxQ&??4???;????4;s??e???f ?1?c!??????7??X`q???h?,v??6m???Q?gI??1???????@???`???o???O?? +2?N?????????Z?A???P?4!??Q? +?q?????Ng??u??=3 v2!?,??N??EP&v??}????U=??????&?I5$?b?A???[?t??`??x??z?n{???????PL????"?{L&9???Nn???l?ZW??'????s?l?d?? +??????????1??? x`?9?H?L02#???????Y???e???? s$?}??8?h?c? ????5C????!?M*?D??m??(K +3???*?6q????m??}?Kl}i-s??;???xEk??h????"&)??T,?????A/??szG?5~??q#?????q?@?"I??_?????qg??k??$?)??O?G??????????@?|??"qw????qsN?????????M?b??S~? +???t?ic????WiQ0?{?3??0????????????? ?????E?P???+kH???k&z+?_?z??{y?????!?????????????$w$??c???}???.?t??+??-?X +???k??0\????,?|!????1??|t;?Ojb??^?/'? +7????4???Al?U?? +?D,??uj?LW??6???.?PV/?g??y?<9?q s?;????"???p=d?~?????9??s??y) ????w9???????1O???8???SCY??"?6A0??N?:k +\g??(????^?????Ou at 9????X?????"????W??Ew??v ^`c?S??o8P?-??`????? +7???????9???p?>??TA[???k????M?z?(4+aOs/PB???? +?(V?AoM?X?k???l? +ix0??dy?S$??\??H?????t&?%?llJ?f??)??'?(?io?:4?p? +??ds??!??i?t??????????? ???#w+??{??4L???????`???M?'?g???Uk??$????VP?Yp:,xm??[?r?rd??~??FA??nh???{pS?*X?x#M???? ?????? ?#s????73???.????6G??+x?B?[]?Q*]?T @(?sL=??S?\??????-o? +8%??? ???? +O???~IT F?????? ?su?.B??!?c? +J??U?PZ?c????=;???U??l?k?&CV?Tet?bR???m-&?F??s???ODr?em tl8?#????8????1,???#?0B2&}??,Q +A +?9??I?Vox?_+?0??G??EJX??F????:??:??;???Pv??%???BT???? +H???A????t +?r&?? |??LSo9?aUs????=??~??J??0? ihq?????f5???w4?[??????????L??|???$[>m]??I??_ sN????u??L?K%~ mDO5??d ?\r????7?q??`??UP??d??B? ++??Y????? +?????`?????^?%T??C??X?? ??x&??????d? +^????}b?r??1??Z??y??uI?]?1n?W"????????????j?Do????B?X???u?x?3?$"NbH ????;?>iYC??D?L|Y?m%????? +&?A;??Wy-Kf?;?rJ?@x?<*??'?????FR?v%;?n?'L?????g  +???[}u??v?7??K??L???"aV??????4!v?B??u??L?? +?Q??oye????C/'??^Vu???????Y?????????" v???Y~0&???L?&?b????>n?Sw???1?y???@]c,i?? ???[?F?3???P?S?W ??$?w?M?|x??l?)G????????8?i???y???%_?zi?v???q~?p?XI3??????????~??h?}>?ZZ?p?????%?????d????#=x?jFac??o??7??L??g?????'q-_*?? ?E?~?6r~)8?U +? ???????h?*????s?NNrF??????tx?QX?????oS?)?v???????A??? +?%??8WWn?q??q??'?I???? +?|???\?Zz??X/???Z????? ?,Z;" +8s?b?YD????I?l*lkQ??>??G.??i>??%b?"0?X???G??XI???????aW m?????s +y^<?:?$?I?rW {??>5?$Cr9???]???jR?q??h? +&w??GF?5???q?D6??K??~h????~0d?Y{??*??U/}??-$??-?T????i??*? ???!D?^??b??)*p???6??c?Z??+V?8t?r?(?????8???????? +?|?$?9L%I?F??? ?N???? ??x?1??z????N?|H??~??????G?N#???s????^g??%?,?&UDY?H??_?g?.f?@?a`??`[?#?3? ??IK????s|??`}n?UC3Zk??]?R??F??gx?\z?g??u????dY??t9?gy?q7$W??vV??>?4?A +9???}3?P??? s ???l??qA??F?s?P?s1?_??b??\?gL8U?xd?????u/&??????RP>"??F??!??]?J?x?-D???_v?5L??J??-??)??9??????????? +??z?@????J]h???(Qgz??P?????m??LO?o??F?????h(igX?85k??'Q?#????> endobj +406 0 obj << +/Length1 1166 +/Length2 7048 +/Length3 0 +/Length 7819 +/Filter /FlateDecode +>> +stream +x?uSu\?????CJ??ch?R:?Fr`???VBBB$%?;?A?PDRP?????g???????o??y??z?.?l???? ^|@~A@?j?? ?Ah????w?? +>??????????#J6^w???7@?? $ +?%@??????_?H@??? +`o?? ????~???6>0???7,8?????vp???pw +g??a???l?f@?? AV???? ???? V=?b??m"N??7?{ +????????d\??\??1????%?=^?????i??_?b?H?7?K????T???? +Mx?\??V????h?7pr??!?Vw???85?c??{?????G???????Hv;???tK? +2 ???Q?$?. ?v1?o0???~??w~Y?n 1(?Zt +T'???Y???~?q??ix;~?]C?_?? ???#{?)????` +Rp?F????1?R?(??#-r?8f???m???9????K?? +????Nz{.??2?q????7#?n?jD?????8=? +xW?WXd\&???JsM?????a?b???C?[H???#???=U?|?M?n|??]?I:?(????????????oLu?{?????V??T??t??????g???????????:o$D???z???h?????w?z?g?%?# +b?MJ?5??B? ??????=??? +"d?????A?OZ?????OI2[ +}n?Vd??~?U?~?|??p?l&??>n?6?8$?F?~????E??z?E;??(????b?????u??>????????Z??fW?T*?A????? ?u ~{??hD +????szL9???K????|fO?? ????z? Xp?Kf$?5?O??? ?X??o?Krz??????zmG????X?????*????n?V|????'t???\UT?1?|W??\??)O??$??????k_`LRd?; +0i?to~ V??+?N7??`4??+?y???]T?GVKl?yM????????7kJz??2eE?y???I?0?N??zA?R?A??????P??9j??&vl???H?V"J?dP?;[j?d?l?6+?e__9Bk ?$??#^?C +w?w??????O?@ +?E??mTf?[M????j??1??4-g?W?Wy^w??????#??V????x~?Y??F?~??|??3?#~QQd +!?????gL???? E?r ?? +??Y?NVb?9?:?#?d? ?ysG?d?VF??uR???[?S??S??M??}=n???R?^??&????(?q?r/??y??h?D+???8?l_gf??????SXbM?????? +H?B??? Z?,4k???KZ>x?G?m??v"L(j#??D?n? FP???y???A?????O +?g?;x-+?I"\?7??9g??T<?C8?????]?8???p?6?d\-???f?T????QP??f??>y=??????????g??k?@??1GF?OR?@J?mZ??+z-?&?????GX;?&??2?iqtW +??%;R$???U??y.??jn+DS?C????H??sg?.?|?+m-(/?~O? +?IW???????$???)???I,??zj+ +e&%???i)??J +s`?????^,^W??g??y?;?Ii,???q?????^?~?=+ +?x.\4}C??????Tb????d?Q???|o?c???`6??U??L???3&b5?!:?????.A;??hY????M2HA???neba?]?gaMX???&~???x???$?_iX?I`?Y:y????O5?? +s? ??4?`/^J#????????_??H;+/GQ?????]uh[??1C??p??D3?!? ?N?\w??????3$???Z?{?Q>?o?n3????K_??#+'?R(?L????S???O????-9 +:????R V??{??=r????s?P`?k?bt???Te????E????8w?#???????n??6????G|??t7?L???Q????e?iz??|*?[Vo8??A??5o???? +{^??b??N?o\? ?FO? +M??XE?TTN?KQ:s?~????|??r]??}??? +_??gqph? +?0? +pD? +@??? ?6U?????|??????T???k?=??+??!??2?????'??Q{5}?Om???4u?&???51?????h??? cT3HI4FQ]?$?2???lu?c, 1??p]ly???i????*Z? ^6{^:?p&?$??;??????4??? f???a???u?????0?2???????A???$?Os6?#!??We?x?1;??d?3?B??BzQ +?s2?k?,v?D?T??t/?j:??Z?>i????UC?"sL6"V???t???4,?????s@???J.?Z???t +?=h????q?$?l??F?CB????_d?#9???k`??\-i?-boH??N +?kT?%?????????O??LH??????fe?w:???%?&??O?EMe?0?x??????x?O?g????5??z?????d`v??@h??;??? [?7?q???o?Mx O????Z?4`?l\??H????Q???~???&?,???R?=? +???W?+?s???8?a??????Q?????L?????!???s?????ekc?h/4?Y> +?&~?H??????o???H????F??hu?,????1???????? ?{???9:e ??'?g??9)6>???6HF_4WCA??J??? b?8????H???????jH_??????u??? +?????G,g?????@S?zkr???1???n???\??~??F?[4[g???i?'??? ????????ep?F?g??0????????1?????9?du??!????v?????$?s????/?*???l? ??e?/R??0 ??M0?.???-O> ?~??>???j:?t??P?j??K???M???????sN??43?}5??p?u?R??dA?z???p?6UR?)?M??|?????????X!??S?T????h????Ua???G????|h???m??CP?Rx??y?j?S?U?l?????? +?Z}?of?????????]d??-?v???-?U{6??WY?h??????U??R???)J?'e??%#?Znc??v???r& +??o?_w??(0?X?poa}???0?Ey?/?c_1?=gL??#G?D at x??mil???cSg8?T?L?\?)?h??? F??!?Z?????t??D?.?????@???gs0Bc????S??r?:??x?V?d9??Sfo`? +??>?~????^?7?????#*???%?cfV??5~?JN??DY??I?z? ???X'??*?j?U??l#e??\?x?7???TQtT?6m??Z?E??q???J5]&Lu???-?4???? +Ha?E??:r???0;@?<<}.???????? ?3??N?;?t? ???||?????.?????E?????EV?C??l?K ?B-9??AWJ???u?? h???qX??r????? +endstream +endobj +407 0 obj << +/Type /FontDescriptor +/FontName /YZXVSD+NimbusSanL-Regu +/Flags 4 +/FontBBox [-174 -285 1001 953] +/Ascent 712 +/CapHeight 712 +/Descent -213 +/ItalicAngle 0 +/StemV 85 +/XHeight 523 +/CharSet (/A/B/C/D/F/H/I/M/N/P/S/T/a/b/c/comma/d/e/f/five/four/g/h/hyphen/i/j/k/l/m/n/o/one/p/parenleft/parenright/period/quotedbl/r/s/seven/six/slash/t/three/two/u/v/w/x/y) +/FontFile 406 0 R +>> endobj +408 0 obj << +/Length1 1626 +/Length2 7736 +/Length3 0 +/Length 8565 +/Filter /FlateDecode +>> +stream +x??TeX????ST:?tw?tw??????????.i)??n? )Q?;?;A???3?73f?????g??????}??^?? +A???????~???hf????%?cd?Y??????H /L???u7??\??Q? +?2????3,D???df??????d??m??3????????uwKile?TI?y???????oL??M??d?oc????I?? +???s?o;?z?a???wLP?????oi???$TwR]7-?:?"Io??W\Oe?@??E??^=l#?f?[??{Z>?w?IO???}s5y????v?9? +^?[??l?b/D????N?"e????oB??x?#??g>? +???N????????5p[3???97?]?yM`??4??:?s? +??[???I??h|???T vg<Ug?g@?????=?[?B??!'s?I????@>3??? X? +*??X?~c?VB????E????D?,us???Rl??L;v?rz? ~+??J??q?{UZ?{_|_??????f???n?b????]?8?????i????Rv??n??5??????U.+b??I?????!?H?}?????u?????s?TN????Z???,?7B??v????I?$?B?H?UP??5j?C??j/????r?S?5Gb +?W~?Ua??B?j?\????H:j-\ah?&????mZE??C???FmR?H?Xe?d?????mM?'? ?l?G??&,??/?????>?j?4???E(V?|l.??(x\???'#?qY???[/;J???D?8:?[????f???oh*????????Q?]}?? +|0??5?????%?*??tf???-?P0??s|!kl?F:??+?n?0+??_?cn?T?W2w+??????O??>NT8???K???'??1?;??fui???e??N????u????FHW?*??\A`??&Rhk??P?)~2?2Z??Q|E[???-??????=[]#:???0# +?"{??dSq????H???????G?*?? ??z+??x.??'6?3%????]?????Z????[???????"??}%{?J~fV??r???/1?b?q???2!"??MwS???*>K??h0??F???3e???f?? 7?y&??i#??? ??7??;?H??Qk +?????t??????6< d?m??m?#8????N?????E??idw?9?0cpxv???a???B????????4????3)?"?%4{ +?E?2?;?|????@q6???@???r at A)0 +???H?k?[?UV T??f??_?;l??Z?u????M??Kxns<5G??Q??l?77?g?Z+x\?B??I?^?}r??o? +?$??6>??b6?.??D>Sp??a? +r?[??T +?!]??q??4??{??zlk?CWo??>?:%??W????`?????A-??0.????t?????z '?uu???U?)?I?$??j ?JW ?????nk??s???+?|(n?n??k??????N????7?L?It)Q?j???+)?? ?(??* ?}4???? ????? ??pk??Y?#??Es?'?????o?>?k??????B@??-????0E"ZO?G&???z?.[??W#??+????Y????V????I9B??2??Fm??,2C???? ?eqh????ZE?F1?????.?~?3:;?*? ??<1-2X[???u???1?)???G.?H????M?R????n&? ???'#?? ?????>????B??.??oM???(0??,???yM???<,??E?f?^???Z4??21w@?? +???-?????m??L? ;?8%n? ???`??P?r????q???S?\??h???G?93O$??0j????S???F# ?K??D???P>? ?_ +8?1???????rQ?j2????j????a|ES!??R?6Ti?HD???*?[??Y??:^kF?????Lc????|?????=?i-?Q??Z?)b??2?????V'u%??????L, +?'=?Kf[???v??OuDV?q????????(??O??g???A??/??S\L?|*?n?cg????????;X?2-? ??&???~?D?o?9?:???|?????@?md?.????#?R72??4u?A?!? ????eBI?"[??????XO?N???N?Np?P[M?TJE?k???g/??e?Bz??O? ?9C?????????a)??b`??q??e??F????y???&& +??????&??v??g?|??n?? C???R\Y ??j:?H???kxDa? +w?0?9G?ah??zL,???6f}U/???J??S?k&L?C?W?zi???`????#/??Qr??M???????I??????,???Y??h ?X??Q?*???"i??? +!????z9?=?ZI???x????&??a??O??2???|J????????N???P??$?`57?A.??A?$ z??*???1|?????}?]?{N???#?5?Yx?El??3????!????qI??kI: *;?f5H?0?P:????n??0??????/?$??S??8???#?!W?D??5?f??????G?]???]???#?.?o +,V?&O?#D???q??>'I?R??5;e?rd;C?}y???G??9i?:[?{??7 ???KB???L??e?????????/ +??DU??IR?)B? +~????it?7?HN?-?C?9j_Q???<=jx??x??!I? +??0]???+f????6??-????{??3??D7?F????Y???? ????1wU???$}??c?o6[c?H?{Y??k +?PO???qm?><?????%\45?To??y?k???{?????O??qo??u52???'Ns?a?{????N?)?9??u?c??8??$??g??_?? +?^h/!f??s??????^X%?A?+??P?j????XS????#?AH???b??b????????=??O?q5?WK??>'??d??g?>?ed0I?[/????oV????E???y??@/?{9eZY.u?vG??zd8?@???????????Y?% +??5?J? +q?J???????? + ???????3??????v?-??<:?? )?????>?ec_St?? ??'?Mx????#?u[C???g????[2? yH?@?y?r?N4??????FY?9X???e?????G??#?i?e6?M???>?^???NN6?[O$"???0pn?????@??G????|(,xv???8P???lv +|?? +?'?0F:??????IO??????Z??????Q?@??:?G5v+??$}?, +V???u???.??6?? +?aj?!!8??????Q1?u??.,????O?DF?c?7_??D?_??~ +?*8??"g?>',s???o +?hw|???d`?L=3??vY?i?Dd{I?~? ??4?T+D??&??t1?k?L???;%N?t??????d F2V?Q??iw|r[d q?,?_????T?-???=?Z????U?>?K??k3?(IO)S??E6????)?$b63E? ????)?G??^???u???l?N??5???C???????{??a???X??]{?`?V."??v?)??om?'?l?????} +?T???u?;5??!? +l???N??*???z#??Q?;?r?X1N:??E19 ???????+eg^f?M?/Q +r??/?,???c??? ????U Wt?j[> endobj +410 0 obj << +/Length1 1630 +/Length2 15761 +/Length3 0 +/Length 16599 +/Filter /FlateDecode +>> +stream +x???ctem?&?NE;?m?????TXa?N?f??]??Tl????????????t?k?uO\???XcQ???3??@R?n??L,| +?????@ wt?v???r?h?i???3??????h?z?Z[: +pu?[?uy????Q1 +??`B`e????olKk?fE??????o9????t ?5????????)???? + ???c????????[?o?????????r??_????r??S2??; +??'?#??+@??????b6*EN?????ZP????b?:??PU3*y?!??`w??z? +$?(??xtB?7?Q?????Q[xzF?t??H=862L +b}?LK?]x?t?q?????J?QJ??S??|(???Q?@??u???f?(???s?"??M??????z??]?%??S?,??h??????u}???^!b,???a??J?L-'=?]R???)7`?~?8\T??xO??~?oQ7 +?86???>?9?l?G?|z7?D)?+%??Q???????????7????F??3?~???????j{?9o?)b? Xi???>? m?$0\Z/??H?W8??? +?l?????bf??N?}??sI???? b???6????Cc?8??wo?M#t????hE:??g?X??????F???@? `u???8H?!(?~??%y??3?tImM+?????? ??U??Q?X??B?]????K?????? \?UC?=?*8????Kd?~?????P?0?Q?c?K/7(??l?8??\ DDJv???*??8?ZRZe???????M?0???D?????QQa&:??;"?O??x???uAr9??G????98?m?]1?E??;y??D??F?>Y??7?~??g???????M?F???ANg?;?R?tCk?5=????F?s?i??Y~?gQ.V?)D?B??r +????gzN?[?????????(?W?????%?o????@???8l?Q`????? ?c??KiQf$ ???o +%????:?@j?j +6???io?? +?r??U at K??v3?^???xG? +4D??"M?Z?~?????v???=??; ???%?M1Hi??z??Yd?l +??(\?E$??? ?0???D?? +K?6??????$%???o?E???f??^????`?a??fQ??Is????`???`?????4?? +&]?P?-???ZF}}?F??i?)??i_9?A ??4C?xk+?????^zQ?nf2rm?:?`?o???6?g,?,??????B?OK????!F??X6???????:(]|*z???N?S1"??H????????,?????M??lZl????n? +?2(??l5???p?5y?Uf!????- $?|6??|t????3?????Q???`p???9????K-C????????1?rC?; +,??r??>???????S\?[??~t?V??B`V??nG x???w?5???A??p?XU??z?Kt[vc??G +??'???m}???56??ev?8?gZ???WPKe??????\?? Z?q?^??????? D??@?P??????+?f?~?\JA??K?v~)B? ??9??s?@y@#???x???????W5???+?|??s?~Wuc ??}?{????MZh????R?????4??0?j? +&?r???#{@6>?)?H??q??)?????`?v?? ??7???d???K?_??v???J?Z????????=?&1?,??P????[???pe^??? +8?'?[???nPkj????!?!?:????t,p?xF?????V????????? +??L?\H8????)????=??????];??$???n?b??????D???v??yh??~?????0\???4z??{S?S4S?edO???i????%??B???M???????,-5?A????+a?!M???K??d?E???????T%??5.???nO?UdA ?a?J???&???q?h??? m??R??J?q?O???????( ????2??lg?~N??~09?4?b'[??kI#????>.????Dt?Y????J??* + ?K?iB?????I{?t x??? +???r????e??^? ??K i.??=(\??)????c???!h?~??p0( c?B?m:??z5 ??8?+??9?y7?? 5?)???o]?D?S???_?v?!???y?N2????Ck at d|g?,T?D +37?????r?G???Y???j7l??Sj??Nl???g??`??????"??L??r?u??{r?.p?C?A???(?? +;??[??i?E??????????V??O?????4?cq? V7r?"jt?? ?o?R [?HX_??wsF?GEw +|?????G`???/???????C????46? ?????B?NU:?u???_?)???????9???????i*p??%? +?#?.!r[)??H?:?%??Q8?G;?Pj??'o???V?nk???P??W5????`???tm?W?3?P???X???Ta?*??I`?_: +K???)=9aOhXw.?j???&S????*?\o=&????0???$?k??l&? ?0*2?g%??%?(?R?L??lL??? (?y?????F???m@???8P?:?i9P?[{????4????r,}???p`??? ?'???U?CF????M~??? +?`?5m1???u}9??x?3???M??F?M ???UD l?R?OF???!??????>?Ny???????u??K?J??\??(?Ng??!3tZ'm??[?????????MI??^?????}>?/??z? ??{??kw????_??Y?}9?2??Sh2???????EPA)?w>Y???4#*???v?z^ f?@x`"sF???pQ??????z??~?6??????Qs?y]?3W?????Y,g??((]?Y??R9????Drs??y|?'??? +,q?w}??K$??2?h??O???b?~?p3? 9?X??;???S?;?#?8?????b?~1 +4?????9?Q?Z?)?w? ????p??|m{&???? m{y?X??B`????8???~?d?? '+??)E?????c?{?)???????6?m?k?N +??^kvZ6?U????y(H?Yh+W?a??s? ??F??????????b?E??;???R?vG??tM?&E??'??????????o1O?!~???h??????????{??=?Fe????,?u?Cz?????qY?????%???5R?Xu?$;Q?h?Z?lYJ?Ak?|oB &?y??k +(d=??t-??`?2???I|.??W5[,?x?)?TB?Jv???+?2?E?$)?@?=??C???>{??? R?(???????X??I????+??x???????? +5???+?e??O??\7O?5?_?i: +??0???`????4?`? !???G?Z v???+??=r*? ???????q???q?gi]n?B???????lz????Qq??5#?G $? ?H?|???/cKI?????N?w??????W???3?v??E)i?]????O#?#???9???????$?/zI???X5W???5?xQ?? t?PIi??? +p8?????^???TI??n=?????'1?EA+r! ??J???r??K$V{??Gx??u@?bc??T?L5fTGj?M???(??x0?&????s=z??5?S??q?Hh??[?pO,rA???????h?f?|??v?"????_????6B?? q#??U???U???'?Y[? ??]+?g,??`.?4?[U?JU?B??n?Im{???Fj???-????5 F???K3w#?$????Ph?s??73???]c??$???#???lQA?9?Z???|??????????2? :????cmD?f[??R;]e?????m??a??K???"?????(???QZ? ?p???o@?S3?E)n????%? ???%?/_9 +@??? ?????r????hx??7d5???)ztx3{??&?3??V??????G:5;>,?s???`G^?dI??F'??]??kT?#K g?m4 ???9????<;??^v?~??/?????wr? 0k???????y- +???t at uHo?!??=%?+??Q??t??#?&s":?4????j?!???T???pm\?20_?4???u?>d??????3??/ns9??S`?????K?Aj?3??4??A^B?_?~ISK?!V? ?E?)???o???MF??i?oU?T??c???J??r H+?L?I +?????h????A9?P?m#?SI ?2m?????5?d?U????`?B3?#87Y?Wbu?`!&Y8h??H??AW??O7+K5????X?:??,?P? +V??Yefq$???.?m?B~!?9J????~??????9)?6,V??;?I8???x.*R?D?3Z???3???????@????H?s?V +?a??i 1??y=??[??)?;???N1???:?9?-?B????% f??I|???$?8?????s?)??$|???i??/? +?k?R?o?R??#q?c???`-???m?/\??'{??????r,?f???uf?;???_?,0[g:?%,??1?5???C>??=????K?W??5~??C}???I?%FXl????p??2?????l?;^v,?????l???????^~o?n????rh?^??m????E???,??&& +2??9 ?????0+?I??? +?w???????? ?| 6L?Y>?2dDa???V?????h0???=? ?0?ucq?,??xC;???(??u???X,?Q1? ??TZ?2E??-???}Y==2b???IA?G?XA????v? +??x?'??e???&???Y?Y??*3???lM????????????[@??V?Eh??&?#??s`?zi _&???2?????;?_[8L)??? ?yM???????+?V5=???p?<??v\??? ???????",?O*$C/??;???  +?????i??Q?JF???M???-?Tn?-????mp? ??/%?;??????^S????k?r??????o^??)oA??FP;?B[]2??h"?2????r?R??d?;JH^??-??4?ZF3vH +I??94??*Kl(?MK??7?( +z????x?NWE+??E}? +??? n:??W?T??O???A??C???=??<_??vs(????%?y?eu?-Z;?V2Wb?2O?#? ? {IL??Nd??_??Dx???f??\?0?sN??TN?m?`?|R???N??????H???[?lgNs?Qv???mR?MvG?&??8?s????D???;???????m??h~N??M??T8~eh@?9??n??%????O[?:? +?Z???&A????????????99?P?]U??E\??9???'??????ae???@?L???t??8??/???m???l?????uR??u?????3/??V?2 + ?z?l?aB???/??tU??z}???H?;?h? +?j?J??? +??-x?+q9?]?f +'??@.T ??=??]I????g?S?%jo? ??pI??????0k?j??.???,9??$??gD=?riI??ls?.2???S9??5??-?? +\.????HW;?*Lo??????t!??????? +U?x???V??????v?]??IW?.???.Ke?[??(??????????h?+????B???X*???{p?,??P ??!?T1??????/???E??T???=? +???r???p?m?]?La?~:? +CO>??D!@:????;7h?G???&??@&l???nfq%Tm????????aR'%)??u?I?C?????uv?????)h?t???U?vP?z~Q?gh???3??5??u3`??? +>???8Y?S4?\V??"?P1? +???.L?V1[?2?wX$ 5p?7??r???0M? +iC(????????s???a??????$?Cy???? <??/??I-??!.?B??3?J?o? +????]?J??$??.??d)???? YyZ??DJ?e?0Qo??=?????7??#&` YZ?c?HM ???????????+G???'?V/0x&"I (59tt;#??!P3?_,z}?j??u???? D ?mk?k?1v,?NeN??0V{{??H?????@#o???w?)?L?o?b?x[????=???uy???????Qa?@Q??TGj?g???5?{]? ?gYH?"d??2????OE??????????$q?????G?#t????-@??? ?y8 +?S??~???[??8? +i?????????A:>?}?@6?[?bM?a~?????}??????\=?_??z???????o?W?r? +????"?].???t?P ??*????l~K?w??`? +rE9d4N?E%0???????a?eG?\??+iAK +=?77? H????????O?~???????sSQ?H?????{?i? ??Z??#???m?#?-?A??"s?*?23??g?k/<? ???;?_P?x?f}?p?J'"??KZ?GTGk01???Mw|?#My?'x?|?{,??e?(??9-M???M???r?H?MPg "???G?a$[?8???M???????h?R????l? i??W????&o8^??`?J???????????^|#?ll?&n?????I??y?}?7X<?K +?S?H!g/?7d?D/`???7?}?????S?~?*zj?9A????8?c???t`|??EC?> endobj +396 0 obj << +/Type /Encoding +/Differences [2/fi/fl 34/quotedbl 39/quoteright/parenleft/parenright 44/comma/hyphen/period/slash/zero/one/two/three/four/five/six/seven/eight/nine 59/semicolon/less/equal/greater 64/at/A/B/C/D/E/F/G/H/I/J 77/M/N/O/P 82/R/S/T/U 87/W 91/bracketleft 93/bracketright 95/underscore 97/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft 125/braceright] +>> endobj +206 0 obj << +/Type /Font +/Subtype /Type1 +/BaseFont /ASFRRL+NimbusMonL-Regu +/FontDescriptor 403 0 R +/FirstChar 34 +/LastChar 125 +/Widths 397 0 R +/Encoding 396 0 R +>> endobj +153 0 obj << +/Type /Font +/Subtype /Type1 +/BaseFont /ZECCQH+NimbusSanL-Bold +/FontDescriptor 405 0 R +/FirstChar 2 +/LastChar 121 +/Widths 399 0 R +/Encoding 396 0 R +>> endobj +151 0 obj << +/Type /Font +/Subtype /Type1 +/BaseFont /YZXVSD+NimbusSanL-Regu +/FontDescriptor 407 0 R +/FirstChar 34 +/LastChar 121 +/Widths 400 0 R +/Encoding 396 0 R +>> endobj +195 0 obj << +/Type /Font +/Subtype /Type1 +/BaseFont /DIXNGO+NimbusRomNo9L-Medi +/FontDescriptor 409 0 R +/FirstChar 49 +/LastChar 119 +/Widths 398 0 R +/Encoding 396 0 R +>> endobj +150 0 obj << +/Type /Font +/Subtype /Type1 +/BaseFont /TAGGDV+NimbusRomNo9L-Regu +/FontDescriptor 411 0 R +/FirstChar 2 +/LastChar 122 +/Widths 401 0 R +/Encoding 396 0 R +>> endobj +154 0 obj << +/Type /Pages +/Count 6 +/Parent 412 0 R +/Kids [146 0 R 192 0 R 197 0 R 217 0 R 250 0 R 275 0 R] +>> endobj +318 0 obj << +/Type /Pages +/Count 3 +/Parent 412 0 R +/Kids [298 0 R 323 0 R 346 0 R] +>> endobj +412 0 obj << +/Type /Pages +/Count 9 +/Kids [154 0 R 318 0 R] +>> endobj +413 0 obj << +/Type /Outlines +/First 3 0 R +/Last 7 0 R +/Count 2 +>> endobj +143 0 obj << +/Title 144 0 R +/A 141 0 R +/Parent 135 0 R +/Prev 139 0 R +>> endobj +139 0 obj << +/Title 140 0 R +/A 137 0 R +/Parent 135 0 R +/Next 143 0 R +>> endobj +135 0 obj << +/Title 136 0 R +/A 133 0 R +/Parent 7 0 R +/Prev 111 0 R +/First 139 0 R +/Last 143 0 R +/Count -2 +>> endobj +131 0 obj << +/Title 132 0 R +/A 129 0 R +/Parent 111 0 R +/Prev 127 0 R +>> endobj +127 0 obj << +/Title 128 0 R +/A 125 0 R +/Parent 111 0 R +/Prev 123 0 R +/Next 131 0 R +>> endobj +123 0 obj << +/Title 124 0 R +/A 121 0 R +/Parent 111 0 R +/Prev 119 0 R +/Next 127 0 R +>> endobj +119 0 obj << +/Title 120 0 R +/A 117 0 R +/Parent 111 0 R +/Prev 115 0 R +/Next 123 0 R +>> endobj +115 0 obj << +/Title 116 0 R +/A 113 0 R +/Parent 111 0 R +/Next 119 0 R +>> endobj +111 0 obj << +/Title 112 0 R +/A 109 0 R +/Parent 7 0 R +/Prev 43 0 R +/Next 135 0 R +/First 115 0 R +/Last 131 0 R +/Count -5 +>> endobj +107 0 obj << +/Title 108 0 R +/A 105 0 R +/Parent 43 0 R +/Prev 103 0 R +>> endobj +103 0 obj << +/Title 104 0 R +/A 101 0 R +/Parent 43 0 R +/Prev 99 0 R +/Next 107 0 R +>> endobj +99 0 obj << +/Title 100 0 R +/A 97 0 R +/Parent 43 0 R +/Prev 95 0 R +/Next 103 0 R +>> endobj +95 0 obj << +/Title 96 0 R +/A 93 0 R +/Parent 43 0 R +/Prev 91 0 R +/Next 99 0 R +>> endobj +91 0 obj << +/Title 92 0 R +/A 89 0 R +/Parent 43 0 R +/Prev 87 0 R +/Next 95 0 R +>> endobj +87 0 obj << +/Title 88 0 R +/A 85 0 R +/Parent 43 0 R +/Prev 83 0 R +/Next 91 0 R +>> endobj +83 0 obj << +/Title 84 0 R +/A 81 0 R +/Parent 43 0 R +/Prev 79 0 R +/Next 87 0 R +>> endobj +79 0 obj << +/Title 80 0 R +/A 77 0 R +/Parent 43 0 R +/Prev 75 0 R +/Next 83 0 R +>> endobj +75 0 obj << +/Title 76 0 R +/A 73 0 R +/Parent 43 0 R +/Prev 71 0 R +/Next 79 0 R +>> endobj +71 0 obj << +/Title 72 0 R +/A 69 0 R +/Parent 43 0 R +/Prev 67 0 R +/Next 75 0 R +>> endobj +67 0 obj << +/Title 68 0 R +/A 65 0 R +/Parent 43 0 R +/Prev 63 0 R +/Next 71 0 R +>> endobj +63 0 obj << +/Title 64 0 R +/A 61 0 R +/Parent 43 0 R +/Prev 59 0 R +/Next 67 0 R +>> endobj +59 0 obj << +/Title 60 0 R +/A 57 0 R +/Parent 43 0 R +/Prev 55 0 R +/Next 63 0 R +>> endobj +55 0 obj << +/Title 56 0 R +/A 53 0 R +/Parent 43 0 R +/Prev 51 0 R +/Next 59 0 R +>> endobj +51 0 obj << +/Title 52 0 R +/A 49 0 R +/Parent 43 0 R +/Prev 47 0 R +/Next 55 0 R +>> endobj +47 0 obj << +/Title 48 0 R +/A 45 0 R +/Parent 43 0 R +/Next 51 0 R +>> endobj +43 0 obj << +/Title 44 0 R +/A 41 0 R +/Parent 7 0 R +/Prev 11 0 R +/Next 111 0 R +/First 47 0 R +/Last 107 0 R +/Count -16 +>> endobj +39 0 obj << +/Title 40 0 R +/A 37 0 R +/Parent 11 0 R +/Prev 35 0 R +>> endobj +35 0 obj << +/Title 36 0 R +/A 33 0 R +/Parent 11 0 R +/Prev 31 0 R +/Next 39 0 R +>> endobj +31 0 obj << +/Title 32 0 R +/A 29 0 R +/Parent 11 0 R +/Prev 27 0 R +/Next 35 0 R +>> endobj +27 0 obj << +/Title 28 0 R +/A 25 0 R +/Parent 11 0 R +/Prev 23 0 R +/Next 31 0 R +>> endobj +23 0 obj << +/Title 24 0 R +/A 21 0 R +/Parent 11 0 R +/Prev 19 0 R +/Next 27 0 R +>> endobj +19 0 obj << +/Title 20 0 R +/A 17 0 R +/Parent 11 0 R +/Prev 15 0 R +/Next 23 0 R +>> endobj +15 0 obj << +/Title 16 0 R +/A 13 0 R +/Parent 11 0 R +/Next 19 0 R +>> endobj +11 0 obj << +/Title 12 0 R +/A 9 0 R +/Parent 7 0 R +/Next 43 0 R +/First 15 0 R +/Last 39 0 R +/Count -7 +>> endobj +7 0 obj << +/Title 8 0 R +/A 5 0 R +/Parent 413 0 R +/Prev 3 0 R +/First 11 0 R +/Last 135 0 R +/Count -4 +>> endobj +3 0 obj << +/Title 4 0 R +/A 1 0 R +/Parent 413 0 R +/Next 7 0 R +>> endobj +414 0 obj << +/Names [(Doc-Start) 152 0 R (_app_procedures) 242 0 R (_backgound_list) 293 0 R (_backgroundstruct) 223 0 R (_batch_wrappers) 304 0 R (_create_status_table) 301 0 R] +/Limits [(Doc-Start) (_create_status_table)] +>> endobj +415 0 obj << +/Names [(_diffstruct) 232 0 R (_examples) 332 0 R (_header) 207 0 R (_image) 203 0 R (_jpeg) 213 0 R (_madd) 243 0 R] +/Limits [(_diffstruct) (_madd)] +>> endobj +416 0 obj << +/Names [(_mbackground) 246 0 R (_mbackgroundbatch) 305 0 R (_mbgmodel) 253 0 R (_mconcatfit) 256 0 R (_mdiff) 259 0 R (_mdiffbatch) 309 0 R] +/Limits [(_mbackground) (_mdiffbatch)] +>> endobj +417 0 obj << +/Names [(_mdifffit) 262 0 R (_mdifffitbatch) 313 0 R (_mfitbatch) 326 0 R (_mfitplane) 265 0 R (_mimgtbl) 268 0 R (_mjpeg) 278 0 R] +/Limits [(_mdifffit) (_mjpeg)] +>> endobj +418 0 obj << +/Names [(_mmakehdr) 271 0 R (_moverlaps) 281 0 R (_mproject) 284 0 R (_mprojectbatch) 329 0 R (_mprojectpp) 287 0 R (_mshrink) 290 0 R] +/Limits [(_mmakehdr) (_mshrink)] +>> endobj +419 0 obj << +/Names [(_overview) 200 0 R (_rectified_gray_scale_image) 358 0 R (_status) 220 0 R (_swiftmontage_api) 201 0 R (_table) 210 0 R (_types) 202 0 R] +/Limits [(_overview) (_types)] +>> endobj +420 0 obj << +/Names [(_unrectified_gray_scale_image) 333 0 R (lstlisting.-1) 204 0 R (lstlisting.-10) 254 0 R (lstlisting.-11) 257 0 R (lstlisting.-12) 260 0 R (lstlisting.-13) 263 0 R] +/Limits [(_unrectified_gray_scale_image) (lstlisting.-13)] +>> endobj +421 0 obj << +/Names [(lstlisting.-14) 266 0 R (lstlisting.-15) 269 0 R (lstlisting.-16) 272 0 R (lstlisting.-17) 279 0 R (lstlisting.-18) 282 0 R (lstlisting.-19) 285 0 R] +/Limits [(lstlisting.-14) (lstlisting.-19)] +>> endobj +422 0 obj << +/Names [(lstlisting.-2) 208 0 R (lstlisting.-20) 288 0 R (lstlisting.-21) 291 0 R (lstlisting.-22) 294 0 R (lstlisting.-23) 302 0 R (lstlisting.-24) 306 0 R] +/Limits [(lstlisting.-2) (lstlisting.-24)] +>> endobj +423 0 obj << +/Names [(lstlisting.-25) 310 0 R (lstlisting.-26) 314 0 R (lstlisting.-27) 327 0 R (lstlisting.-28) 330 0 R (lstlisting.-29) 334 0 R (lstlisting.-3) 211 0 R] +/Limits [(lstlisting.-25) (lstlisting.-3)] +>> endobj +424 0 obj << +/Names [(lstlisting.-30) 359 0 R (lstlisting.-4) 214 0 R (lstlisting.-5) 221 0 R (lstlisting.-6) 224 0 R (lstlisting.-7) 233 0 R (lstlisting.-8) 244 0 R] +/Limits [(lstlisting.-30) (lstlisting.-8)] +>> endobj +425 0 obj << +/Names [(lstlisting.-9) 247 0 R (lstnumber.-1.1) 205 0 R (lstnumber.-10.1) 255 0 R (lstnumber.-11.1) 258 0 R (lstnumber.-12.1) 261 0 R (lstnumber.-13.1) 264 0 R] +/Limits [(lstlisting.-9) (lstnumber.-13.1)] +>> endobj +426 0 obj << +/Names [(lstnumber.-14.1) 267 0 R (lstnumber.-15.1) 270 0 R (lstnumber.-16.1) 273 0 R (lstnumber.-17.1) 280 0 R (lstnumber.-18.1) 283 0 R (lstnumber.-19.1) 286 0 R] +/Limits [(lstnumber.-14.1) (lstnumber.-19.1)] +>> endobj +427 0 obj << +/Names [(lstnumber.-2.1) 209 0 R (lstnumber.-20.1) 289 0 R (lstnumber.-21.1) 292 0 R (lstnumber.-22.1) 295 0 R (lstnumber.-23.1) 303 0 R (lstnumber.-24.1) 307 0 R] +/Limits [(lstnumber.-2.1) (lstnumber.-24.1)] +>> endobj +428 0 obj << +/Names [(lstnumber.-24.2) 308 0 R (lstnumber.-25.1) 311 0 R (lstnumber.-25.2) 312 0 R (lstnumber.-26.1) 315 0 R (lstnumber.-26.2) 316 0 R (lstnumber.-26.3) 317 0 R] +/Limits [(lstnumber.-24.2) (lstnumber.-26.3)] +>> endobj +429 0 obj << +/Names [(lstnumber.-27.1) 328 0 R (lstnumber.-28.1) 331 0 R (lstnumber.-29.1) 335 0 R (lstnumber.-29.10) 344 0 R (lstnumber.-29.11) 349 0 R (lstnumber.-29.12) 350 0 R] +/Limits [(lstnumber.-27.1) (lstnumber.-29.12)] +>> endobj +430 0 obj << +/Names [(lstnumber.-29.13) 351 0 R (lstnumber.-29.14) 352 0 R (lstnumber.-29.15) 353 0 R (lstnumber.-29.16) 354 0 R (lstnumber.-29.17) 355 0 R (lstnumber.-29.18) 356 0 R] +/Limits [(lstnumber.-29.13) (lstnumber.-29.18)] +>> endobj +431 0 obj << +/Names [(lstnumber.-29.19) 357 0 R (lstnumber.-29.2) 336 0 R (lstnumber.-29.3) 337 0 R (lstnumber.-29.4) 338 0 R (lstnumber.-29.5) 339 0 R (lstnumber.-29.6) 340 0 R] +/Limits [(lstnumber.-29.19) (lstnumber.-29.6)] +>> endobj +432 0 obj << +/Names [(lstnumber.-29.7) 341 0 R (lstnumber.-29.8) 342 0 R (lstnumber.-29.9) 343 0 R (lstnumber.-3.1) 212 0 R (lstnumber.-30.1) 360 0 R (lstnumber.-30.10) 369 0 R] +/Limits [(lstnumber.-29.7) (lstnumber.-30.10)] +>> endobj +433 0 obj << +/Names [(lstnumber.-30.11) 370 0 R (lstnumber.-30.12) 371 0 R (lstnumber.-30.13) 372 0 R (lstnumber.-30.14) 373 0 R (lstnumber.-30.15) 374 0 R (lstnumber.-30.16) 375 0 R] +/Limits [(lstnumber.-30.11) (lstnumber.-30.16)] +>> endobj +434 0 obj << +/Names [(lstnumber.-30.17) 376 0 R (lstnumber.-30.18) 377 0 R (lstnumber.-30.19) 378 0 R (lstnumber.-30.2) 361 0 R (lstnumber.-30.20) 379 0 R (lstnumber.-30.21) 380 0 R] +/Limits [(lstnumber.-30.17) (lstnumber.-30.21)] +>> endobj +435 0 obj << +/Names [(lstnumber.-30.22) 381 0 R (lstnumber.-30.23) 382 0 R (lstnumber.-30.24) 383 0 R (lstnumber.-30.25) 384 0 R (lstnumber.-30.26) 385 0 R (lstnumber.-30.27) 386 0 R] +/Limits [(lstnumber.-30.22) (lstnumber.-30.27)] +>> endobj +436 0 obj << +/Names [(lstnumber.-30.28) 387 0 R (lstnumber.-30.29) 388 0 R (lstnumber.-30.3) 362 0 R (lstnumber.-30.30) 389 0 R (lstnumber.-30.31) 390 0 R (lstnumber.-30.32) 391 0 R] +/Limits [(lstnumber.-30.28) (lstnumber.-30.32)] +>> endobj +437 0 obj << +/Names [(lstnumber.-30.33) 392 0 R (lstnumber.-30.34) 393 0 R (lstnumber.-30.35) 394 0 R (lstnumber.-30.36) 395 0 R (lstnumber.-30.4) 363 0 R (lstnumber.-30.5) 364 0 R] +/Limits [(lstnumber.-30.33) (lstnumber.-30.5)] +>> endobj +438 0 obj << +/Names [(lstnumber.-30.6) 365 0 R (lstnumber.-30.7) 366 0 R (lstnumber.-30.8) 367 0 R (lstnumber.-30.9) 368 0 R (lstnumber.-4.1) 215 0 R (lstnumber.-5.1) 222 0 R] +/Limits [(lstnumber.-30.6) (lstnumber.-5.1)] +>> endobj +439 0 obj << +/Names [(lstnumber.-6.1) 225 0 R (lstnumber.-6.2) 226 0 R (lstnumber.-6.3) 227 0 R (lstnumber.-6.4) 228 0 R (lstnumber.-6.5) 229 0 R (lstnumber.-6.6) 230 0 R] +/Limits [(lstnumber.-6.1) (lstnumber.-6.6)] +>> endobj +440 0 obj << +/Names [(lstnumber.-6.7) 231 0 R (lstnumber.-7.1) 234 0 R (lstnumber.-7.2) 235 0 R (lstnumber.-7.3) 236 0 R (lstnumber.-7.4) 237 0 R (lstnumber.-7.5) 238 0 R] +/Limits [(lstnumber.-6.7) (lstnumber.-7.5)] +>> endobj +441 0 obj << +/Names [(lstnumber.-7.6) 239 0 R (lstnumber.-7.7) 240 0 R (lstnumber.-7.8) 241 0 R (lstnumber.-8.1) 245 0 R (lstnumber.-9.1) 248 0 R (page.1) 199 0 R] +/Limits [(lstnumber.-7.6) (page.1)] +>> endobj +442 0 obj << +/Names [(page.2) 219 0 R (page.3) 252 0 R (page.4) 277 0 R (page.5) 300 0 R (page.6) 325 0 R (page.7) 348 0 R] +/Limits [(page.2) (page.7)] +>> endobj +443 0 obj << +/Names [(page.i) 149 0 R (page.ii) 194 0 R (section.1) 2 0 R (section.2) 6 0 R (subsection.2.1) 10 0 R (subsection.2.2) 42 0 R] +/Limits [(page.i) (subsection.2.2)] +>> endobj +444 0 obj << +/Names [(subsection.2.3) 110 0 R (subsection.2.4) 134 0 R (subsubsection.2.1.1) 14 0 R (subsubsection.2.1.2) 18 0 R (subsubsection.2.1.3) 22 0 R (subsubsection.2.1.4) 26 0 R] +/Limits [(subsection.2.3) (subsubsection.2.1.4)] +>> endobj +445 0 obj << +/Names [(subsubsection.2.1.5) 30 0 R (subsubsection.2.1.6) 34 0 R (subsubsection.2.1.7) 38 0 R (subsubsection.2.2.1) 46 0 R (subsubsection.2.2.10) 82 0 R (subsubsection.2.2.11) 86 0 R] +/Limits [(subsubsection.2.1.5) (subsubsection.2.2.11)] +>> endobj +446 0 obj << +/Names [(subsubsection.2.2.12) 90 0 R (subsubsection.2.2.13) 94 0 R (subsubsection.2.2.14) 98 0 R (subsubsection.2.2.15) 102 0 R (subsubsection.2.2.16) 106 0 R (subsubsection.2.2.2) 50 0 R] +/Limits [(subsubsection.2.2.12) (subsubsection.2.2.2)] +>> endobj +447 0 obj << +/Names [(subsubsection.2.2.3) 54 0 R (subsubsection.2.2.4) 58 0 R (subsubsection.2.2.5) 62 0 R (subsubsection.2.2.6) 66 0 R (subsubsection.2.2.7) 70 0 R (subsubsection.2.2.8) 74 0 R] +/Limits [(subsubsection.2.2.3) (subsubsection.2.2.8)] +>> endobj +448 0 obj << +/Names [(subsubsection.2.2.9) 78 0 R (subsubsection.2.3.1) 114 0 R (subsubsection.2.3.2) 118 0 R (subsubsection.2.3.3) 122 0 R (subsubsection.2.3.4) 126 0 R (subsubsection.2.3.5) 130 0 R] +/Limits [(subsubsection.2.2.9) (subsubsection.2.3.5)] +>> endobj +449 0 obj << +/Names [(subsubsection.2.4.1) 138 0 R (subsubsection.2.4.2) 142 0 R] +/Limits [(subsubsection.2.4.1) (subsubsection.2.4.2)] +>> endobj +450 0 obj << +/Kids [414 0 R 415 0 R 416 0 R 417 0 R 418 0 R 419 0 R] +/Limits [(Doc-Start) (_types)] +>> endobj +451 0 obj << +/Kids [420 0 R 421 0 R 422 0 R 423 0 R 424 0 R 425 0 R] +/Limits [(_unrectified_gray_scale_image) (lstnumber.-13.1)] +>> endobj +452 0 obj << +/Kids [426 0 R 427 0 R 428 0 R 429 0 R 430 0 R 431 0 R] +/Limits [(lstnumber.-14.1) (lstnumber.-29.6)] +>> endobj +453 0 obj << +/Kids [432 0 R 433 0 R 434 0 R 435 0 R 436 0 R 437 0 R] +/Limits [(lstnumber.-29.7) (lstnumber.-30.5)] +>> endobj +454 0 obj << +/Kids [438 0 R 439 0 R 440 0 R 441 0 R 442 0 R 443 0 R] +/Limits [(lstnumber.-30.6) (subsection.2.2)] +>> endobj +455 0 obj << +/Kids [444 0 R 445 0 R 446 0 R 447 0 R 448 0 R 449 0 R] +/Limits [(subsection.2.3) (subsubsection.2.4.2)] +>> endobj +456 0 obj << +/Kids [450 0 R 451 0 R 452 0 R 453 0 R 454 0 R 455 0 R] +/Limits [(Doc-Start) (subsubsection.2.4.2)] +>> endobj +457 0 obj << +/Dests 456 0 R +>> endobj +458 0 obj << +/Type /Catalog +/Pages 412 0 R +/Outlines 413 0 R +/Names 457 0 R +/PageMode/UseOutlines/PageLabels<>2<>]>> +/OpenAction 145 0 R +>> endobj +459 0 obj << +/Author()/Title(SwiftMontage API)/Subject()/Creator(DBLaTeX-0.3)/Producer(pdfTeX-1.40.10)/Keywords() +/CreationDate (D:20110729103413-05'00') +/ModDate (D:20110729103413-05'00') +/Trapped /False +/PTEX.Fullbanner (This is pdfTeX, Version 3.1415926-1.40.10-2.2 (TeX Live 2009) kpathsea version 5.0.0) +>> endobj +xref +0 460 +0000000000 65535 f +0000000015 00000 n +0000013607 00000 n +0000110785 00000 n +0000000060 00000 n +0000000086 00000 n +0000013727 00000 n +0000110676 00000 n +0000000131 00000 n +0000000165 00000 n +0000013847 00000 n +0000110567 00000 n +0000000215 00000 n +0000000239 00000 n +0000013968 00000 n +0000110493 00000 n +0000000295 00000 n +0000000319 00000 n +0000014211 00000 n +0000110406 00000 n +0000000375 00000 n +0000000400 00000 n +0000014454 00000 n +0000110319 00000 n +0000000456 00000 n +0000000480 00000 n +0000014695 00000 n +0000110232 00000 n +0000000536 00000 n +0000000559 00000 n +0000017526 00000 n +0000110145 00000 n +0000000615 00000 n +0000000640 00000 n +0000017769 00000 n +0000110058 00000 n +0000000696 00000 n +0000000731 00000 n +0000018377 00000 n +0000109984 00000 n +0000000787 00000 n +0000000816 00000 n +0000019047 00000 n +0000109858 00000 n +0000000867 00000 n +0000000900 00000 n +0000019168 00000 n +0000109784 00000 n +0000000956 00000 n +0000000979 00000 n +0000019410 00000 n +0000109697 00000 n +0000001035 00000 n +0000001065 00000 n +0000022216 00000 n +0000109610 00000 n +0000001121 00000 n +0000001148 00000 n +0000022459 00000 n +0000109523 00000 n +0000001204 00000 n +0000001233 00000 n +0000022702 00000 n +0000109436 00000 n +0000001289 00000 n +0000001313 00000 n +0000022945 00000 n +0000109349 00000 n +0000001369 00000 n +0000001396 00000 n +0000023188 00000 n +0000109262 00000 n +0000001452 00000 n +0000001480 00000 n +0000023430 00000 n +0000109175 00000 n +0000001536 00000 n +0000001562 00000 n +0000023673 00000 n +0000109088 00000 n +0000001618 00000 n +0000001645 00000 n +0000026516 00000 n +0000109001 00000 n +0000001702 00000 n +0000001726 00000 n +0000026759 00000 n +0000108914 00000 n +0000001783 00000 n +0000001811 00000 n +0000027000 00000 n +0000108827 00000 n +0000001868 00000 n +0000001895 00000 n +0000027243 00000 n +0000108740 00000 n +0000001952 00000 n +0000001981 00000 n +0000027485 00000 n +0000108651 00000 n +0000002038 00000 n +0000002065 00000 n +0000027728 00000 n +0000108560 00000 n +0000002123 00000 n +0000002160 00000 n +0000031890 00000 n +0000108482 00000 n +0000002218 00000 n +0000002263 00000 n +0000032134 00000 n +0000108353 00000 n +0000002315 00000 n +0000002349 00000 n +0000032256 00000 n +0000108274 00000 n +0000002406 00000 n +0000002442 00000 n +0000032561 00000 n +0000108181 00000 n +0000002499 00000 n +0000002529 00000 n +0000032865 00000 n +0000108088 00000 n +0000002586 00000 n +0000002619 00000 n +0000035659 00000 n +0000107995 00000 n +0000002676 00000 n +0000002705 00000 n +0000035903 00000 n +0000107916 00000 n +0000002762 00000 n +0000002795 00000 n +0000036147 00000 n +0000107800 00000 n +0000002847 00000 n +0000002875 00000 n +0000036269 00000 n +0000107721 00000 n +0000002932 00000 n +0000002980 00000 n +0000039845 00000 n +0000107642 00000 n +0000003037 00000 n +0000003083 00000 n +0000003427 00000 n +0000003669 00000 n +0000003136 00000 n +0000003546 00000 n +0000107117 00000 n +0000106772 00000 n +0000003608 00000 n +0000106602 00000 n +0000107290 00000 n +0000005239 00000 n +0000005389 00000 n +0000005539 00000 n +0000005695 00000 n +0000005856 00000 n +0000006016 00000 n +0000006177 00000 n +0000006338 00000 n +0000006499 00000 n +0000006659 00000 n +0000006820 00000 n +0000006976 00000 n +0000007137 00000 n +0000007298 00000 n +0000007458 00000 n +0000007619 00000 n +0000007780 00000 n +0000007941 00000 n +0000008102 00000 n +0000008263 00000 n +0000008424 00000 n +0000008586 00000 n +0000008748 00000 n +0000008910 00000 n +0000009072 00000 n +0000009234 00000 n +0000009395 00000 n +0000009557 00000 n +0000009713 00000 n +0000009874 00000 n +0000010034 00000 n +0000010194 00000 n +0000010355 00000 n +0000010516 00000 n +0000010672 00000 n +0000010832 00000 n +0000011053 00000 n +0000004820 00000 n +0000003767 00000 n +0000010991 00000 n +0000106943 00000 n +0000014937 00000 n +0000013426 00000 n +0000011164 00000 n +0000013545 00000 n +0000013666 00000 n +0000013786 00000 n +0000013907 00000 n +0000014028 00000 n +0000014089 00000 n +0000014150 00000 n +0000106431 00000 n +0000014271 00000 n +0000014332 00000 n +0000014393 00000 n +0000014514 00000 n +0000014573 00000 n +0000014634 00000 n +0000014755 00000 n +0000014815 00000 n +0000014876 00000 n +0000019653 00000 n +0000017345 00000 n +0000015048 00000 n +0000017464 00000 n +0000017586 00000 n +0000017647 00000 n +0000017708 00000 n +0000017829 00000 n +0000017890 00000 n +0000017951 00000 n +0000018012 00000 n +0000018073 00000 n +0000018134 00000 n +0000018194 00000 n +0000018255 00000 n +0000018316 00000 n +0000018437 00000 n +0000018498 00000 n +0000018559 00000 n +0000018620 00000 n +0000018681 00000 n +0000018742 00000 n +0000018803 00000 n +0000018864 00000 n +0000018925 00000 n +0000018986 00000 n +0000019107 00000 n +0000019228 00000 n +0000019288 00000 n +0000019349 00000 n +0000019470 00000 n +0000019531 00000 n +0000019592 00000 n +0000023916 00000 n +0000022035 00000 n +0000019764 00000 n +0000022154 00000 n +0000022276 00000 n +0000022337 00000 n +0000022398 00000 n +0000022519 00000 n +0000022580 00000 n +0000022641 00000 n +0000022762 00000 n +0000022823 00000 n +0000022884 00000 n +0000023005 00000 n +0000023066 00000 n +0000023127 00000 n +0000023248 00000 n +0000023309 00000 n +0000023370 00000 n +0000023490 00000 n +0000023551 00000 n +0000023612 00000 n +0000023733 00000 n +0000023794 00000 n +0000023855 00000 n +0000027972 00000 n +0000026335 00000 n +0000024027 00000 n +0000026454 00000 n +0000026576 00000 n +0000026637 00000 n +0000026698 00000 n +0000026819 00000 n +0000026879 00000 n +0000026939 00000 n +0000027060 00000 n +0000027121 00000 n +0000027182 00000 n +0000027302 00000 n +0000027363 00000 n +0000027424 00000 n +0000027545 00000 n +0000027606 00000 n +0000027667 00000 n +0000027789 00000 n +0000027850 00000 n +0000027911 00000 n +0000030685 00000 n +0000033229 00000 n +0000030566 00000 n +0000028083 00000 n +0000031828 00000 n +0000031951 00000 n +0000032012 00000 n +0000032073 00000 n +0000032195 00000 n +0000032317 00000 n +0000032378 00000 n +0000032439 00000 n +0000032500 00000 n +0000032622 00000 n +0000032683 00000 n +0000032744 00000 n +0000032804 00000 n +0000032926 00000 n +0000032987 00000 n +0000033048 00000 n +0000033109 00000 n +0000033170 00000 n +0000107407 00000 n +0000031588 00000 n +0000031723 00000 n +0000031772 00000 n +0000037060 00000 n +0000035478 00000 n +0000033368 00000 n +0000035597 00000 n +0000035720 00000 n +0000035781 00000 n +0000035842 00000 n +0000035964 00000 n +0000036025 00000 n +0000036086 00000 n +0000036208 00000 n +0000036330 00000 n +0000036391 00000 n +0000036452 00000 n +0000036513 00000 n +0000036574 00000 n +0000036634 00000 n +0000036695 00000 n +0000036756 00000 n +0000036817 00000 n +0000036878 00000 n +0000036939 00000 n +0000037000 00000 n +0000042219 00000 n +0000039116 00000 n +0000037199 00000 n +0000039235 00000 n +0000039297 00000 n +0000039358 00000 n +0000039419 00000 n +0000039480 00000 n +0000039541 00000 n +0000039602 00000 n +0000039662 00000 n +0000039723 00000 n +0000039784 00000 n +0000039906 00000 n +0000039966 00000 n +0000040027 00000 n +0000040088 00000 n +0000040149 00000 n +0000040210 00000 n +0000040271 00000 n +0000040332 00000 n +0000040393 00000 n +0000040454 00000 n +0000040515 00000 n +0000040575 00000 n +0000040636 00000 n +0000040697 00000 n +0000040758 00000 n +0000040819 00000 n +0000040880 00000 n +0000040941 00000 n +0000041002 00000 n +0000041063 00000 n +0000041123 00000 n +0000041184 00000 n +0000041245 00000 n +0000041306 00000 n +0000041367 00000 n +0000041428 00000 n +0000041489 00000 n +0000041550 00000 n +0000041611 00000 n +0000041671 00000 n +0000041732 00000 n +0000041793 00000 n +0000041854 00000 n +0000041915 00000 n +0000041976 00000 n +0000042037 00000 n +0000042098 00000 n +0000042159 00000 n +0000106033 00000 n +0000042330 00000 n +0000042717 00000 n +0000043021 00000 n +0000043492 00000 n +0000043864 00000 n +0000044339 00000 n +0000059080 00000 n +0000059530 00000 n +0000071194 00000 n +0000071587 00000 n +0000079526 00000 n +0000079916 00000 n +0000088601 00000 n +0000088875 00000 n +0000105595 00000 n +0000107500 00000 n +0000107569 00000 n +0000110856 00000 n +0000111090 00000 n +0000111263 00000 n +0000111466 00000 n +0000111652 00000 n +0000111844 00000 n +0000112045 00000 n +0000112300 00000 n +0000112526 00000 n +0000112750 00000 n +0000112974 00000 n +0000113194 00000 n +0000113423 00000 n +0000113657 00000 n +0000113889 00000 n +0000114123 00000 n +0000114361 00000 n +0000114603 00000 n +0000114839 00000 n +0000115074 00000 n +0000115316 00000 n +0000115557 00000 n +0000115799 00000 n +0000116040 00000 n +0000116279 00000 n +0000116510 00000 n +0000116736 00000 n +0000116962 00000 n +0000117172 00000 n +0000117334 00000 n +0000117521 00000 n +0000117768 00000 n +0000118031 00000 n +0000118299 00000 n +0000118559 00000 n +0000118824 00000 n +0000118970 00000 n +0000119080 00000 n +0000119219 00000 n +0000119344 00000 n +0000119469 00000 n +0000119593 00000 n +0000119721 00000 n +0000119844 00000 n +0000119882 00000 n +0000120050 00000 n +trailer +<< /Size 460 +/Root 458 0 R +/Info 459 0 R +/ID [<69753F3296E65FAB4B98882E95FEA221> <69753F3296E65FAB4B98882E95FEA221>] >> +startxref +120369 +%%EOF