1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
|
using System;
using System.Collections;
using SemWeb;
namespace SemWeb.Inference {
public class Rule {
public readonly Statement[] Antecedent;
public readonly Statement[] Consequent;
public Rule(Statement[] antecedent, Statement[] consequent) {
Antecedent = antecedent;
Consequent = consequent;
}
public override string ToString() {
string ret = "{";
foreach (Statement s in Antecedent)
ret += " " + s.ToString();
ret += " } => {";
foreach (Statement s in Consequent)
ret += " " + s.ToString();
ret += " }";
return ret;
}
}
public class ProofStep {
public readonly Rule Rule;
public readonly IDictionary Substitutions;
public ProofStep(Rule rule, IDictionary substitutions) {
Rule = rule;
Substitutions = substitutions;
}
}
public class Proof {
public readonly Statement[] Proved;
public readonly ProofStep[] Steps;
public Proof(Statement[] proved, ProofStep[] steps) {
Proved = proved;
Steps = steps;
}
}
}
|