rule-based mechanical systems