A framework for the emergence and analysis of language in social learning agents