001package org.clafer.ir;
002
003import org.clafer.domain.Domain;
004
005/**
006 * An immutable expression that evaluates to a string.
007 *
008 * @author jimmy
009 */
010public interface IrStringExpr extends IrExpr {
011
012    /**
013     * The length of the string.
014     *
015     * @return the length domain
016     */
017    public Domain getLength();
018
019    /**
020     * The characters of the string.
021     *
022     * @return the character domains
023     */
024    public Domain[] getChars();
025
026    /**
027     * Dynamic dispatch on the visitor.
028     *
029     * @param <A> the parameter type
030     * @param <B> the return type
031     * @param visitor the visitor
032     * @param a the parameter
033     * @return the return value
034     */
035    public <A, B> B accept(IrStringExprVisitor<A, B> visitor, A a);
036}