For representing knowledge in intelligent systems in a declarative and natural way, two major approaches have been used in the past: (1) domain–specific languages (DSLs), and (2) controlled natural languages (CNLs). Early DSLs were defined by technical and abstract syntaxes, e.g., for EBNF and regular expressions. More recently, there is a trend in defining DSLs based on natural language, e.g., for the standard relational query language SQL. On the other hand, CNLs stem from computer linguistics, driven by the idea of representing knowledge as a subset of natural languages. Both approaches have proven very useful in many applications.
In this paper, we discuss the two approaches for knowledge representation, namely using DSLs and CNLs. Prolog has a long history in both worlds: with the help of user–defined operators, term expansions, and definite clause grammars, it has proven to be very suitable for defining new DSLs with a natural language flavour.