Inferring Contextual Laws with Rules for Regulations in Open Multi-Agent Systems *