Exemple #1
0
 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);
 }
Exemple #2
0
 public ToDesirability(LogicalForm sentence) : base(new W())
 {
     if (sentence.GetType() != typeof(TWG))
     {
         // error!
     }
     this.sentence      = sentence;
     this.isFormula     = true;
     this.freeVariables = sentence.GetFreeVariables();
 }
Exemple #3
0
    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);
    }