Skip to content

Conversation

@merkste
Copy link
Contributor

@merkste merkste commented Apr 24, 2018

The current implementation is a bit cumbersome and potentially inefficient due to resizing of the array lists during adding. This PR resolves this issue and marks the class cloneable.

@kleinj
Copy link
Member

kleinj commented Apr 24, 2018

Looks good to me. I guess you have tested it in one of your branches? As far as I can tell Values.clone() is never actually used in the main PRISM branch and thus not covered by the test suite.

In the clone() method, you are not simply calling new Values(Values other) on the chance that someone derives a class from Values?

@merkste merkste force-pushed the improve-values-clone branch from c64ebf4 to 4aeb20e Compare April 24, 2018 19:49
@merkste
Copy link
Contributor Author

merkste commented Apr 24, 2018

  1. Yes, in my local branches and PR Do not unfold the AST on deep-copying #66 actually relies on clone, too.
  2. Yes as well, I didn't want to break inheritance. Using a copy constructor in clone-Methods can easily lead to very subtle bugs.

@kleinj kleinj merged commit e038bad into prismmodelchecker:master Apr 25, 2018
@merkste merkste deleted the improve-values-clone branch May 25, 2018 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants