1 /* This file is part of the project "Hilbert II" - http://www.qedeq.org" target="alexandria_uri">http://www.qedeq.org 2 * 3 * Copyright 2000-2014, Michael Meyling <mime@qedeq.org>. 4 * 5 * "Hilbert II" is free software; you can redistribute 6 * it and/or modify it under the terms of the GNU General Public 7 * License as published by the Free Software Foundation; either 8 * version 2 of the License, or (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 */ 15 16 package org.qedeq.kernel.bo.logic.proof.common; 17 18 import org.qedeq.kernel.bo.logic.common.LogicalCheckExceptionList; 19 import org.qedeq.kernel.bo.logic.common.ReferenceResolver; 20 import org.qedeq.kernel.se.base.list.Element; 21 import org.qedeq.kernel.se.base.module.FormalProofLineList; 22 import org.qedeq.kernel.se.base.module.Rule; 23 import org.qedeq.kernel.se.common.ModuleContext; 24 25 /** 26 * A proof checker can check if a formal proof is correct. 27 * 28 * @author Michael Meyling 29 */ 30 public interface ProofChecker { 31 32 /** 33 * Checks if a formal proof is ok. If there are any errors the returned list 34 * (which is always not <code>null</code>) has a size greater zero. 35 * Precondition is a well formed environment. So every formula must 36 * be well formed, every necessary operator and predicate and function must 37 * exist. 38 * 39 * @param formula Formula we want to proof. 40 * @param proof Check this formal proof. 41 * @param checker Gets defined rule information. 42 * @param context Location information of formal proof. 43 * Important for locating errors. 44 * @param resolver Resolver for references. 45 * @return Collected errors if there are any. Not <code>null</code>. 46 */ 47 public LogicalCheckExceptionList checkProof(final Element formula, 48 final FormalProofLineList proof, final RuleChecker checker, 49 final ModuleContext context, final ReferenceResolver resolver); 50 51 52 /** 53 * Checks if a rule declaration is ok for the proof checker. 54 * 55 * @param rule Rule we want to use later on. 56 * @param context Location information rule declaration. 57 * Important for locating errors. 58 * @param checker Gets defined rule information. 59 * @param resolver Resolver for references. 60 * @return Collected errors if there are any. Not <code>null</code>. 61 */ 62 public LogicalCheckExceptionList checkRule(final Rule rule, 63 final ModuleContext context, final RuleChecker checker, 64 final ReferenceResolver resolver); 65 66 }