An Extended Efficient Algorithm of Pattern Matching for Partially Commutative Monoids | Synapse