add notes of rule.cpp