예제 #1
0
        internal RelConstr(Span span, RelKind op, Node arg)
            : base(span)
        {
            Contract.Requires(arg != null);
            Contract.Requires(arg.IsFuncOrAtom);

            Op   = op;
            Arg1 = arg;
            Arg2 = null;
        }
예제 #2
0
        internal RelConstr(Span span, RelKind op, Node arg1, Node arg2)
            : base(span)
        {
            Contract.Requires(arg1 != null && arg2 != null);
            Contract.Requires(arg1.IsFuncOrAtom && arg2.IsFuncOrAtom);

            Op   = op;
            Arg1 = arg1;
            Arg2 = arg2;
        }
예제 #3
0
 internal BaseOpSymb(
     RelKind opKind,
     int arity,
     Func <Node, List <Flag>, bool> validator,
     Func <TermIndex, Term[], Term[]> upApprox,
     Func <TermIndex, Term[], Term[]> downApprox,
     Func <Executer, Bindable[], Term> evaluator)
 {
     Contract.Requires(validator != null && upApprox != null && downApprox != null);
     OpKind         = opKind;
     Validator      = validator;
     UpwardApprox   = upApprox;
     DownwardApprox = downApprox;
     Evaluator      = evaluator;
     this.arity     = arity;
 }
예제 #4
0
파일: Parser.cs 프로젝트: thisiscam/formula
 private void PushSymbol(RelKind opcode, Span span)
 {
     appStack.Push(new RelApplyInfo(opcode, span));
 }
예제 #5
0
파일: Parser.cs 프로젝트: thisiscam/formula
 public RelApplyInfo(RelKind opcode, Span span)
     : base(NodeKind.RelConstr, span)
 {
     Opcode = opcode;
 }