Abstract. An extension of PROLOG which supports software specification by means of a class of two-level grammars is presented. AFFLOG logic programs are typed and modes can be specified if desired. By examining their underlying grammatical properties, a static analysis is performed. Our purpose is to support translator writing starting from a grammatical model that has been checked and debugged.