From: SourceForge.net <no...@so...> - 2006-01-03 21:43:42
|
Patches item #1396338, was opened at 2006-01-03 22:43 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=712770&aid=1396338&group_id=128805 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Bernardo Pastorelli (bpastore) Assigned to: Nobody/Anonymous (nobody) Summary: Exploit commutativity in CSE - RFE 1147152 Initial Comment: I added a new attribute to every operator: commutative. If an operator is marked as commutative, the equals method of class AvailableExpression checks both: - l.op1 similar r.op1 && l.op2 similar r.op2 - l.op1 similar r.op2 && l.op2 similar r.op1 to define if two available expressions are equivalent. The patch is based on Jikes RVM 2.4.2. I tested the code on Linux Intel. A different approach could have been to define a total ordering on the operands. Using this ordering, in case the operand was commutative, the constructor of AvailableExpression could have been assigned to op1 the smallest operand and to op2 the greatest one. This way only one check had been required in equals. But define that ordering seemd to be quite complex, so I decided for the current implementation. Let me know if you prefer the one based on defining the ordering and changing the constructor; I can try to implement it. STATEMENT OF ORIGIN FOR A SINGLE CONTRIBUTOR I, __Bernardo Pastorelli____: (a) represent that either: (i) I am the only author and owner of the contributed software (described as/entitled ____________________________), which was neither derived nor copied from any other software, or (ii) that any exception to (i) is software which was obtained under the CPL (Common Public License), and (b) hereby agree to license this contributed software under the CPL. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=712770&aid=1396338&group_id=128805 |