A XSB-based reactive system