A theory of semiotics