// FILE. . . . . /home/hak/hlt/src/hlt/osfv1/base/AndSortExpression.java
// EDIT BY . . . Hassan Ait-Kaci
// ON MACHINE. . Hak-Laptop
// STARTED ON. . Mon Sep 02 09:11:33 2013

/**
 * @version     Last modified on Mon Sep 02 09:14:33 2013 by hak
 * @author      <a href="mailto:hak@acm.org">Hassan A&iuml;t-Kaci</a>
 * @copyright   &copy; <a href="http://www.hassan-ait-kaci.net/">by the author</a>
 */

package hlt.osf.base;

/**
 * This is the class of an 'and' sort expression. It consists of two
 * sort expressions which are its arguments.
 */
public class AndSortExpression extends BinarySortExpression
  {
    public AndSortExpression (SortExpression lhs, SortExpression rhs)
    {
      super(lhs,rhs);
      _context = lhs.context();
    }

    public byte type ()
    {
      return _context.AND();
    }

    public String displayForm ()
    {
      String form = _lhs.displayForm() + " & " + _rhs.displayForm();
      return isParenthesized() ? "("+form+")" : form;
    }

  }
