Malavika-Srinivasan / CAS741

Course Website for CAS 741
Other
0 stars 1 forks source link

MIS - Use of .append in specifications #39

Closed bmaclach closed 5 years ago

bmaclach commented 5 years ago

All of your "eval" methods use a method called .append, but I could not find a definition for .append anywhere. If it is just appending an element to a list, you can use the concatenation operator from Hoffman and Strooper's notation. So "yNew.append(y0)" would become "yNew || y0". I also think you should initialize yNew as an empty list, otherwise it is not clear what yNew starts as before appending.

The calls to append all happen after a quantifier for a variable ti, but ti is not always used in the subsequent expressions, so I'm not sure what these specifications mean.

Malavika-Srinivasan commented 5 years ago

@bmaclach @smiths , Yes, I tried searching for a formal definition for append, but couldn't find any. Maybe I can write array a[i] = x and i = i+1, not sure.

`||' is for strings right? Thats why I am a little hesitant to use it.

Dr.smith,

Do you have a suggestion for this?

Please note, I haven't made changes for this issue yet.

bmaclach commented 5 years ago

@Malavika-Srinivasan According to Hoffman and Strooper, the || operator works on any sequence, not just strings, so I think it should be okay to use it here.

smiths commented 5 years ago

@bmaclach is correct. The H&S notation is for any sequence.

Malavika-Srinivasan commented 5 years ago

Changed append to ||