Logical foundations of distributed artificial intelligence