A multicontext architecture for formalizing complex reasoning