jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • X10
  • XTENLANG-51

operators involving multi-dimensional region constants (e.g. [0..1,2..3] || [4..5,6..7]) don't (can't?) work

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: X10 1.7 - JVM hosted
  • Fix Version/s: X10 2.1.0, X10 SVN HEAD
  • Component/s: Language Design, Language Specification
  • Labels:
    None

Description

This might be a spec issue involving the rules for applying the library-specified $convert conversion from Rail[Region] to Region, or alternatively the mechanism by which [0..1,2..3] gets converted to a Region (e.g. maybe it should be hardwired, not an automatic conversion?)

// standin for Region
public class R {
    incomplete public static def $convert(rs: ValRail[R]): R;
    incomplete public def $or(r:R):R;
}

class Bug {

    // standin for val r:Region = [a..b, c..d]
    val r:R = [new R(), new R()];

    // this works as expected
    val w = r || r;

    // this works
    // standin for val z = r || [a..b, c..d]
    val x = r || [new R(), new R()];

    // this doesn't work
    // standin for val w = [a..b, c..d] || r
    val y = [new R(), new R()] || r;

    // this doesn't work
    // standin for val y = [a..b, c..d] || [a..b, c..d]
    val z = [new R(), new R()] || [new R(), new R()];
}

The || operator must have boolean
operands, not type x10.lang.ValRail[R]{self.length==2}.

Issue Links

is depended upon by

Task - A task that needs to be done. XTENLANG-962 Array library redesign

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Bruce Lucas added a comment - 20/Oct/08 8:43 AM

Affects

RegionAlgebra
RegionBoundingBox
RegionDifference

Show
Bruce Lucas added a comment - 20/Oct/08 8:43 AM Affects RegionAlgebra RegionBoundingBox RegionDifference
Hide
Permalink
Igor Peshansky added a comment - 11/May/09 10:30 AM - edited

Defer to 1.7.5. This may be fixed in the refactoring of the frontend that will be committed later.

Show
Igor Peshansky added a comment - 11/May/09 10:30 AM - edited Defer to 1.7.5. This may be fixed in the refactoring of the frontend that will be committed later.
Hide
Permalink
David Grove added a comment - 23/Jun/09 12:41 PM

defer all open 1.7.5 issues to 1.9.1

Show
David Grove added a comment - 23/Jun/09 12:41 PM defer all open 1.7.5 issues to 1.9.1
Hide
Permalink
David Grove added a comment - 09/Dec/09 11:07 AM

Updated test case to 2.0 operator syntax and confirmed that doesn't work with r12227

// standin for Region
public class R {
    incomplete public static operator (rs: ValRail[R]): R;
    incomplete public operator this || (that:R):R;
}

class Bug {

    // standin for val r:Region = [a..b, c..d]
    val r:R! = [new R(), new R()];

    // this works as expected
    val w = r || r;

    // this works
    // standin for val z = r || [a..b, c..d]
    val x = r || [new R(), new R()];

    // this doesn't work
    // standin for val w = [a..b, c..d] || r
    val y = [new R(), new R()] || r;

    // this doesn't work
    // standin for val y = [a..b, c..d] || [a..b, c..d]
    val z = [new R(), new R()] || [new R(), new R()];
}
Show
David Grove added a comment - 09/Dec/09 11:07 AM Updated test case to 2.0 operator syntax and confirmed that doesn't work with r12227
// standin for Region
public class R {
    incomplete public static operator (rs: ValRail[R]): R;
    incomplete public operator this || (that:R):R;
}

class Bug {

    // standin for val r:Region = [a..b, c..d]
    val r:R! = [new R(), new R()];

    // this works as expected
    val w = r || r;

    // this works
    // standin for val z = r || [a..b, c..d]
    val x = r || [new R(), new R()];

    // this doesn't work
    // standin for val w = [a..b, c..d] || r
    val y = [new R(), new R()] || r;

    // this doesn't work
    // standin for val y = [a..b, c..d] || [a..b, c..d]
    val z = [new R(), new R()] || [new R(), new R()];
}
Hide
Permalink
David Grove added a comment - 09/Dec/09 11:08 AM

Look at this as part of array library redesign.

Show
David Grove added a comment - 09/Dec/09 11:08 AM Look at this as part of array library redesign.
Hide
Permalink
Igor Peshansky added a comment - 15/Jun/10 9:52 PM

This is a language design and specification issue. Once we have the new operator lookup and coercion semantics, we can implement them in the frontend.

Show
Igor Peshansky added a comment - 15/Jun/10 9:52 PM This is a language design and specification issue. Once we have the new operator lookup and coercion semantics, we can implement them in the frontend.
Hide
Permalink
Bard Bloom added a comment - 14/Jul/10 2:03 PM

Deferred to 2.1.0

Show
Bard Bloom added a comment - 14/Jul/10 2:03 PM Deferred to 2.1.0
Hide
Permalink
Vijay Saraswat added a comment - 05/Oct/10 9:02 PM

The following 2.1 code works:

class A {

    val r  = new Array[Region(1){rect}][1..9, 1..9] as Region;
    

    // this works as expected
    val w = r && r;

    // this works
    val z = r && (new Array[Region(1){rect}][2..5, 2..5] as Region);
     

    // this doesn't work
    // standin for val w = [a..b, c..d] || r
    val y = (new Array[Region(1){rect}][2..5, 2..5] as Region) && r;

    // this doesn't work
    // standin for 
    val x = new Array[Region(1){rect}][1..9, 1..9] as Region && new Array[Region(1){rect}][1..9, 1..9] as Region;
    
    val a = 1..9;
    val r2 = a*a;
    val w2 = r2 && r2;
    val z2 = r2 && (2..5)*(2..5);
    val y2 =  (2..5)*(2..5) * r2;
    val x2 =  r2 && r2;
  
}
Show
Vijay Saraswat added a comment - 05/Oct/10 9:02 PM The following 2.1 code works:
class A {

    val r  = new Array[Region(1){rect}][1..9, 1..9] as Region;
    

    // this works as expected
    val w = r && r;

    // this works
    val z = r && (new Array[Region(1){rect}][2..5, 2..5] as Region);
     

    // this doesn't work
    // standin for val w = [a..b, c..d] || r
    val y = (new Array[Region(1){rect}][2..5, 2..5] as Region) && r;

    // this doesn't work
    // standin for 
    val x = new Array[Region(1){rect}][1..9, 1..9] as Region && new Array[Region(1){rect}][1..9, 1..9] as Region;
    
    val a = 1..9;
    val r2 = a*a;
    val w2 = r2 && r2;
    val z2 = r2 && (2..5)*(2..5);
    val y2 =  (2..5)*(2..5) * r2;
    val x2 =  r2 && r2;
  
}
Hide
Permalink
David Grove added a comment - 11/Oct/10 1:09 PM

bulk close of 2.1.0 resolved issues.

Show
David Grove added a comment - 11/Oct/10 1:09 PM bulk close of 2.1.0 resolved issues.

People

  • Assignee:
    Vijay Saraswat
    Reporter:
    Bruce Lucas
Vote (0)
Watch (0)

Dates

  • Created:
    24/Sep/08 9:42 AM
    Updated:
    11/Oct/10 1:09 PM
    Resolved:
    05/Oct/10 9:03 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.