/* Sentences in my sorted-logic formalism in Disjunctive Normal Form (so that the whole knowledge base is in Conjunctive Normal Form) */ class Sentence { constructor(terms:Term[], sign:boolean[]) { this.terms = terms; this.sign = sign; } /* // Simple inference procedure that would only work for rules that are of the form ~Term; Term // - If "t" matches with the negated, it returns the positive term after applying the resulting bindings // - Otherwise, it returns null singleTermForwardChaining(t:Term) : Term { let negatedTerm:Term = null; let positiveTerm:Term = null; if (this.terms.length != 2) return null; for(let i:number = 0;i s.terms.length) return false; for(let i:number = 0;i