001package org.clafer.ir;
002
003/**
004 * An immutable expression that evaluates to a set of integers.
005 *
006 * @author jimmy
007 */
008public interface IrSetExpr extends IrExpr {
009
010    /**
011     * Env or envelope is the union of all possible values the set can be.
012     *
013     * @return the env domain
014     */
015    public IrDomain getEnv();
016
017    /**
018     * Ker or kernel is the intersection of all possible values the set can be
019     *
020     * @return the ker domain
021     */
022    public IrDomain getKer();
023
024    /**
025     * Card or cardinality is all the possible size of the set.
026     *
027     * @return the card domain
028     */
029    public IrDomain getCard();
030
031    /**
032     * Dynamic dispatch on the visitor.
033     *
034     * @param <A> the parameter type
035     * @param <B> the return type
036     * @param visitor the visitor
037     * @param a the parameter
038     * @return the return value
039     */
040    public <A, B> B accept(IrSetExprVisitor<A, B> visitor, A a);
041}