Lines Matching defs:Expr
503 //------------------------------Expr------------------------------------------
505 // class Expr represents integer expressions containing constants and addition
508 class Expr {
519 Expr();
520 Expr(const char *cost);
521 Expr(const char *name, const char *expression, int min_value, int max_value);
522 Expr *clone() const;
524 bool is_unknown() const { return (this == Expr::get_unknown()); }
525 bool is_zero() const { return (_min_value == Expr::Zero && _max_value == Expr::Zero); }
526 bool less_than_or_equal(const Expr *c) const { return (_max_value <= c->_min_value); }
528 void add(const Expr *c);
538 static Expr *get_unknown(); // Returns pointer to shared unknown cost instance
545 static Expr *_unknown_expr;
549 const char *compute_expr(const Expr *c1, const Expr *c2); // cost as string after adding 'c1' and 'c2'
550 int compute_min (const Expr *c1, const Expr *c2); // minimum after adding 'c1' and 'c2'
551 int compute_max (const Expr *c1, const Expr *c2); // maximum after adding 'c1' and 'c2'
552 const char *compute_external(const Expr *c1, const Expr *c2); // external name after adding 'c1' and 'c2'
559 Dict _expr; // map names, char*, to their Expr* or NULL
581 const Expr *define(const char *name, Expr *expr);
585 const Expr *Insert(const char *name, Expr *expr); // A new key-value
589 const Expr *operator [](const char *name) const; // Do a lookup