Пример #1
0
 internal MonaPredDecl(Token name, Cons<MonaParam> parameters, Dictionary<string,MonaParam> pmap, MonaExpr formula, bool isMacro = false)
     : base(isMacro ? MonaDeclKind.macro : MonaDeclKind.pred)
 {
     this.pmap = (pmap == null ? new Dictionary<string,MonaParam>() : pmap);
     this.isMacro = isMacro;
     this.name = name;
     this.parameters = (parameters == null ? Cons<MonaParam>.Empty : parameters);
     this.formula = formula;
 }
Пример #2
0
 public MonaMinOrMax(Token minormax, MonaExpr set)
     : base(minormax, MonaExprType.INT, new MonaExpr[]{set})
 {
 }
Пример #3
0
 internal MonaNegatedFormula(Token token, MonaExpr formula)
     : base(token, MonaExprType.BOOL, new MonaExpr[]{formula})
 {
 }
Пример #4
0
 internal MonaInt(Token val)
     : base(val, MonaExprType.INT, null)
 {
     if (!val.TryGetInt(out i))
         throw new MonaParseException(MonaParseExceptionKind.InvalidIntegerFormat, val.Location);
 }
Пример #5
0
 public MonaIsEmpty(Token token, MonaExpr term)
     : base(token, MonaExprType.BOOL, new MonaExpr[]{term})
 {
 }
Пример #6
0
 internal MonaBooleanConstant(Token token)
     : base(token, MonaExprType.BOOL, null)
 {
 }
Пример #7
0
 internal MonaDefaultWhereDecl(bool isSecondOrder, Token param, MonaExpr formula)
     : base(isSecondOrder ? MonaDeclKind.defaultwhere2 : MonaDeclKind.defaultwhere1)
 {
     this.isSecondOrder = isSecondOrder;
     this.param = param;
     this.formula = formula;
 }
Пример #8
0
 internal MonaSet(Token set, Cons<MonaExpr> elems)
     : base(set, MonaExprType.SET, elems.ToArray())
 {
     this.elems = elems;
 }
Пример #9
0
 internal MonaSetOp(Token op, MonaExpr arg1, MonaExpr arg2)
     : base(op, MonaExprType.SET, new MonaExpr[]{arg1, arg2})
 {
 }
Пример #10
0
 internal MonaRange(Token dots, MonaExpr from, MonaExpr to)
     : base(dots, MonaExprType.SET, new MonaExpr[]{from, to})
 {
 }
Пример #11
0
 internal MonaRestrict(Token token, MonaExpr formula)
     : base(token, MonaExprType.BOOL, new MonaExpr[]{formula})
 {
 }
Пример #12
0
 internal MonaQFormula(Token quantifier, Cons<MonaVarWhere> vars, MonaExpr formula, Cons<Token> universes, Dictionary<string, MonaParam> varmap)
     : base(quantifier, MonaExprType.BOOL, new MonaExpr[] { formula })
 {
     this.varmap = varmap;
     this.universes = universes;
     this.vars = vars;
 }
Пример #13
0
 internal MonaQBFormula(Token quantifier, Cons<Token> vars, MonaExpr formula, Dictionary<string, MonaParam> varmap)
     : base(quantifier, MonaExprType.BOOL, new MonaExpr[]{formula})
 {
     this.varmap = varmap;
     this.vars = vars;
 }
Пример #14
0
 internal MonaProgram(Token token, Cons<MonaDecl> declarations, Dictionary<string, MonaDecl> globals,         
      List<MonaVar0Decl> vars0, List<MonaVarDecl> vars1, List<MonaVarDecl> vars2, List<MonaVarDecl> varsT)
 {
     this.token = token;
     this.declarations = declarations;
     this.globals = globals;
     this.vars0 = vars0;
     this.vars1 = vars1;
     this.vars2 = vars2;
     this.varsT = varsT;
 }
Пример #15
0
 internal MonaBinaryAtom(Token token, MonaExpr term1, MonaExpr term2)
     : base(token, MonaExprType.BOOL, new MonaExpr[]{term1, term2})
 {
 }
Пример #16
0
 internal MonaUnivArg(Token token)
 {
     this.token = token;
 }
Пример #17
0
 internal MonaBinaryBooleanFormula(Token token, MonaExpr formula1, MonaExpr formula2)
     : base(token, MonaExprType.BOOL, new MonaExpr[]{formula1, formula2})
 {
 }
Пример #18
0
 internal MonaUnivArgWithSucc(Token token, string succ)
     : base(token)
 {
     this.succ = succ;
 }
Пример #19
0
 internal MonaConstDecl(Token name, MonaExpr def)
     : base(MonaDeclKind.constant)
 {
     this.name = name;
     this.def = def;
 }
Пример #20
0
 internal MonaUnivArgWithType(Token token, Token E)
     : base(token)
 {
     this.E = E;
 }
Пример #21
0
 internal MonaExpr(Token token, MonaExprType type, MonaExpr[] subexprs)
 {
     this.token = token;
     this.type = type;
     this.subexprs = subexprs;
 }
Пример #22
0
 internal MonaUniverseParam(Token name)
     : base(MonaParamKind.universe)
 {
     this.name = name;
 }
Пример #23
0
 internal MonaAllposDecl(Token v)
     : base(MonaDeclKind.allpos)
 {
     this.v = v;
 }
Пример #24
0
 internal MonaVar0Decl(Token var)
     : base(MonaDeclKind.var0)
 {
     this.var = var;
 }
Пример #25
0
 internal MonaLet(Token letkind, Cons<Tuple<Token, MonaExpr>> lets, MonaExpr formula, Dictionary<string, MonaParam> let_vars)
     : base(letkind, MonaExprType.BOOL, new MonaExpr[]{formula})
 {
     this.lets = lets;
     this.let_vars = let_vars;
 }
Пример #26
0
 internal MonaVar0Param(Token name)
     : base(MonaParamKind.var0)
 {
     this.name = name;
 }
Пример #27
0
 internal MonaName(Token token, MonaExprType type)
     : base(token, type, null)
 {
 }
Пример #28
0
 internal MonaVarWhere(Token token, MonaExpr where)
 {
     this.token = token;
     this.where = where;
 }
Пример #29
0
 internal MonaArithmFuncApp(Token func, MonaExpr arg1, MonaExpr arg2)
     : base(func, MonaExprType.INT, new MonaExpr[]{arg1, arg2})
 {
 }
Пример #30
0
 internal MonaPredApp(Token token, Cons<MonaExpr> expressions)
     : base(token, MonaExprType.BOOL, expressions.ToArray())
 {
     this.expressions = expressions;
 }