Macros may be defined within the logic system using the form:
(defrelmacro <name> <arg-list> <body>)
which is effectively the same as a Common Lisp
defmacro. Logic macros are expanded before variable translation so that logic variables may be treated as atoms.
defrelmacro forms must have a fixed number of arguments. This allows different predicates with the same name but different arities to be defined. If you want to define a special form with an arbitrary number of arguments, use
KnowledgeWorks and Prolog User Guide (Windows version) - 26 Feb 2015