The syntax of XSB is taken from C-Prolog with extensions to support HiLog [13] 4.1, which adds certain features of second-order syntax to Prolog.