001package org.clafer.ir; 002 003/** 004 * An immutable expression that evaluates to a boolean. 005 * 006 * @author jimmy 007 */ 008public interface IrBoolExpr extends IrIntExpr { 009 010 /** 011 * @return the domain of values this expression can take 012 */ 013 @Override 014 public IrBoolDomain getDomain(); 015 016 /** 017 * The negated expression is true if and only if this expression is false. 018 * 019 * @return negated expression 020 */ 021 public IrBoolExpr negate(); 022 023 /** 024 * Is the expression in negative form. Expressions in negated form have 025 * their class names prefixed with "IrNot...", otherwise the expression is 026 * not negative. 027 * 028 * @return true if the expression is in negative form, false otherwise 029 */ 030 public boolean isNegative(); 031 032 /** 033 * Dynamic dispatch on the visitor. 034 * 035 * @param <A> the parameter type 036 * @param <B> the return type 037 * @param visitor the visitor 038 * @param a the parameter 039 * @return the return value 040 */ 041 public <A, B> B accept(IrBoolExprVisitor<A, B> visitor, A a); 042}