Application of distributed artificial intelligence in complex modular critical applications