add scala trait implementation-linearization