ClemsonRSRG / RESOLVE

RESOLVE (REusable SOftware Language with VErification) is a specification and programming language designed for verifying correctness of object oriented programs.
https://www.cs.clemson.edu/resolve/
BSD 3-Clause "New" or "Revised" License
24 stars 16 forks source link

DotExp's substitution method is broken #325

Closed yushan87 closed 6 years ago

yushan87 commented 6 years ago

Suppose our DotExp was A.Foo and the substitution map that got passed to us contained Foo -> Bar and A.Foo to A.B.Foo. In this case, we don't want to apply the substitution and get A.Bar. The right result should be A.B.Foo.

What I think we should do is substitute using the key that matches the most segments. Examples: [Our map contains: S -> T, S.A -> S.B, A.B -> A].

  1. S.Top will become T.Top.
  2. S.A.Top will become S.B.Top.
  3. A.B.Top will become A.Top.
  4. S.A.B.Top will become S.B.Top.

@dtwelch What are your thoughts on this?

dtwelch commented 6 years ago

Yeah, that seems right.

On Sat, Jul 14, 2018 at 7:52 PM, yushan87 notifications@github.com wrote:

Suppose our DotExp was A.Foo and the substitution map that got passed to us contained Foo -> Bar and A.Foo to A.B.Foo. In this case, we don't want to apply the substitution and get A.Bar. The right result should be A.B.Foo.

What I think we should do is substitute using the key that matches the most segments. Examples: [Our map contains: S -> T, S.A -> S.B, A.B -> A.

  1. S.Top will become T.Top.
  2. S.A.Top will become S.B.Top.
  3. A.B.Top will become A.Top.
  4. S.A.B.Top will become S.B.Top.

@dtwelch https://github.com/dtwelch What are your thoughts on this?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ClemsonRSRG/RESOLVE/issues/325, or mute the thread https://github.com/notifications/unsubscribe-auth/AEU18tCoZny1LK7YxKfSP9ZNKLofuXmOks5uGoROgaJpZM4VQDjp .