Uploaded image for project: 'SystemDS'
  1. SystemDS
  2. SYSTEMDS-2537

Improve the consistency of predicates in "If-then-else" expressions

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • SystemML 0.13
    • Not Applicable
    • Parser
    • None

    Description

      The predicate or conditional-expression in the evaluation of the If-expression allows literal numeral values to be part of the predicate. In the parser, if it sees a literal value of 1 then it would be true otherwise it is false; however it is entirely plausible to extend that definition to cover all values > 0 to be true otherwise values < 0 will be interpreted as false.

      E.g. this should print No! but instead it prints "Yes!"

      scala> val s = dml(""" if(-42) print("Yes!") else print("No!") """)

      scala> ml.execute(s)

      Yes!

      SystemML Statistics:

      Total execution time: 0.012 sec.

      Number of executed Spark inst: 0.

      res0: org.apache.sysml.api.mlcontext.MLResults = None

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              raymondtay Raymond Tay
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 48h
                  48h
                  Remaining:
                  Time Spent - 50m Remaining Estimate - 47h 10m
                  47h 10m
                  Logged:
                  Time Spent - 50m Remaining Estimate - 47h 10m
                  50m