Logical Programming for Intelligent Traffic Control