Using a Hashmap we want to recycle more subexpressions.
How:
Build a hash from the triple (operand, left, right), whereas for commutative RegExp we can sort the children if we have addition or multiplication, for the FreeSR we only can sort them if we have addition.
Using a Hashmap we want to recycle more subexpressions. How: Build a hash from the triple (operand, left, right), whereas for commutative RegExp we can sort the children if we have addition or multiplication, for the FreeSR we only can sort them if we have addition.