Menu

#23 Object's equals method should not be specified as pure

open
8
2013-10-27
2003-02-13
No

The org.multijava.mjc.CClassType equals method really
isn't pure, but JML requires that it is pure. I put a
FIXME comment in the code for CClassType and
commented out the JML specification of the side
effects, but this doesn't fix the problem.

Discussion

  • Gary T. Leavens

    Gary T. Leavens - 2003-04-22
    • milestone: --> self_reported
    • assigned_to: cheon --> leavens
     
  • Gary T. Leavens

    Gary T. Leavens - 2003-04-22

    Logged In: YES
    user_id=633675

    We have started a new branch equals-not-pure to address
    this issue. Doing this depends on jmlc handling the refine
    clause.

     
  • Gary T. Leavens

    Gary T. Leavens - 2003-04-22
    • priority: 2 --> 3
    • labels: 484353 --> 484357
     
  • Gary T. Leavens

    Gary T. Leavens - 2003-04-22
    • summary: Equals methods can't be non-pure --> Object's equals method should not be specified as pure
     
  • Gary T. Leavens

    Gary T. Leavens - 2005-07-14

    Logged In: YES
    user_id=633675

    The idea behind this branch no longer works. But David Cok
    and I are working on a language extension that should allow
    a nice solution to this problem.

     
  • Gary T. Leavens

    Gary T. Leavens - 2005-07-14
    • priority: 3 --> 6
     
  • Gary T. Leavens

    Gary T. Leavens - 2006-05-18
    • priority: 6 --> 8
    • labels: 484357 --> Design of the JML language
     
  • Gary T. Leavens

    Gary T. Leavens - 2008-03-10

    Logged In: YES
    user_id=633675
    Originator: YES

    Gabriela Montoya also raised a question of whether clone should be pure.

    The idea David Cok and I have is based on the work of Naumann and Barnett, which is to allow "query" methods with hidden side effects.

     

Log in to post a comment.