public LogicalForm Reduce() { if (f.GetType() == typeof(Lambda)) { Lambda l = (Lambda)f; System.Console.WriteLine("the type IS a lambda"); return(l.Apply(x)); } System.Console.WriteLine("the type is NOT a lambda"); return(this); }
public ToDesirability(LogicalForm sentence) : base(new W()) { if (sentence.GetType() != typeof(TWG)) { // error! } this.sentence = sentence; this.isFormula = true; this.freeVariables = sentence.GetFreeVariables(); }
public ModelBind(LogicalForm sentence, LogicalForm model) : base(new TWG()) { if (!sentence.IsFormula()) { // error! } if (model.GetType() != typeof(Model)) { // error! } this.sentence = sentence; this.model = model; this.isFormula = false; this.freeVariables = sentence.MergeVariables(model); }