00001 #ifndef __REASONER_H__ 00002 #define __REASONER_H__ 00003 00004 /* 00005 * Copyright 2010 Michel Kinasz 00006 * 00007 * This file is part of dlite. 00008 * 00009 * dlite is free software: you can redistribute it and/or modify 00010 * it under the terms of the GNU General Public License as published by 00011 * the Free Software Foundation, either version 3 of the License, or 00012 * (at your option) any later version. 00013 * 00014 * dlite is distributed in the hope that it will be useful, 00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 * GNU General Public License for more details. 00018 * 00019 * You should have received a copy of the GNU General Public License 00020 * along with dlite. If not, see <http://www.gnu.org/licenses/>. 00021 * 00022 */ 00023 00024 // ............................................................................ 00025 // File : reasoner.h 00026 // Author : main 00027 // Created : February 9, 2009, 9:17 PM 00028 // 00029 // Desc : DL reasoner interface 00030 // 00031 // ............................................................................ 00032 00033 namespace DLITE 00034 { 00035 // ............................................................................ 00036 // Reasoner interface 00037 class iReasoner; 00038 typedef _s_ptr<iReasoner> spiReasoner; 00039 00040 class iReasoner 00041 { 00042 00043 protected: 00044 00045 // c'tor 00046 iReasoner() {} 00047 00048 public: 00049 00050 // d'tor 00051 virtual ~iReasoner() {} 00052 00053 // Check expression satifiability 00054 virtual bool Satisfiable(const sptExpression& i_spExpr) = 0; 00055 00056 // Restore ABox state 00057 virtual void Restore() = 0; 00058 00059 // Get reasoner's ABox interface 00060 virtual spiABox getABox() = 0; 00061 00062 // Factory method 00063 static spiReasoner Create(const spiStore& i_spStore, const spiTBox& i_spTBox = NULL, const spiABox& i_spABox = NULL); 00064 00065 // Factory method 00066 static spiReasoner Create(const string& i_stPath); 00067 }; 00068 } 00069 00070 #endif //_REASONER_H 00071