[Swift-devel] [Bug 315] New: better diagnostics to identify unmapped paths

bugzilla-daemon at mcs.anl.gov bugzilla-daemon at mcs.anl.gov
Sat Apr 2 16:38:39 CDT 2011


https://bugzilla.mcs.anl.gov/swift/show_bug.cgi?id=315

           Summary: better diagnostics to identify unmapped paths
           Product: Swift
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: SwiftScript language
        AssignedTo: hategan at mcs.anl.gov
        ReportedBy: aespinosa at cs.uchicago.edu


This works

$ cat seq.in
1
2
3
4
$ cat array_incomplete.swift

type file;

app(file o[])
    split(file i, int j){
  split "-l" 1 @filename(i) @strcat(j, "seqout.");
}

file input <"seq.in">;

foreach j in [0:1] {
  string foo;
  if (j == 0) {
     foo = "0seqout.aa, 0seqout.ab, 0seqout.ac, 0seqout.ad";
  }
  if (j == 1) {
     foo = "1seqout.aa, 1seqout.ab, 1seqout.ac, 1seqout.ad";
  }
  file out[] <fixed_array_mapper; files=foo>;
  if (j < 1) {
    out = split(input, j); // line 21
  }
  else {
    out = split(input, j); // line 23
  }
}
$$ ~/swift/swift-0.92/bin/swift -tc.file tc.data array_incomplete.swift
Swift svn swift-r4157 cog-r3056

RunID: 20110402-1619-dn042ure
Progress:
Progress:  Stage in:1  Finished successfully:1
Final status:  Finished successfully:2


But if I comment out line 21, we get this error message:
 ~/swift/swift-0.92/bin/swift -tc.file tc.data array_incomplete.swift
Swift svn swift-r4157 cog-r3056

RunID: 20110402-1621-k63e22s2
Progress:
Execution failed:
        mapper.existing() returned a path [0] that it cannot subsequently map

The swift log file contains this corresponding entry:
011-04-02 16:21:13,887-0500 DEBUG VDL2ExecutionContext vdl:setfieldvalue @
array_incomplete.kml, line: 155: java.lang.IllegalStateException:
mapper.existing() returned a path [0] that it cannot subsequently map

Checking the kml file we have this call to setFieldValue():
array_incomplete.kml:155
<sequentialWithID>
  <sequential>
    <vdl:setfieldvalue>
      <argument name="var">
        <variable>foo</variable>
      </argument>
      <argument name="value">
        <variable>swift#string#17003</varia ble>
      </argument>
    </vdl:setfieldvalue>
  </sequential>
</sequentialWithID>

Mike and I concluded that the reason for the error was that out[] is already
recognized as an output dataset in line 23.  But for j=0, out[] as an output
file was not produced and will result in unmapped paths.

Is there a better way to diagnose this problem off the bat?  Or is this the
expected behavior?  Can out[] be an input file (non-intermediate) for j=0 and
output file for j=1?

-- 
Configure bugmail: https://bugzilla.mcs.anl.gov/swift/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.



More information about the Swift-devel mailing list