Gravar-mail: From real-world regulations to concrete norms for software agents: a case-based reasoning approach