`ConstantSortExpression.java`

    // FILE. . . . . /home/hak/hlt/src/hlt/osfv2/base/ConstantSortExpression.java
    // EDIT BY . . . Hassan Ait-Kaci
    // ON MACHINE. . Hak-Laptop
    // STARTED ON. . Mon Sep 09 09:15:40 2013

This is the class of built-in atomic sort symbols carrying a constant value.
Author: |  | Hassan Aït-Kaci
Copyright: |  | © by the author
Version: |  | Last modified on Tue Jan 21 08:05:43 2014 by hak

    package hlt.osf.base;

    import hlt.osf.exec.Context;

This is the class of constants of built-in sorts.

    public class ConstantSortExpression extends SortExpression
      {

Constructs a symbol sort expression with the given name.

        public ConstantSortExpression (Constant constant)
        {
          _constant = constant;
        }

        private Constant _constant;

        public Constant constant ()
        {
          return _constant;
        }

        public Sort sort ()
        {
          return _constant.sort();
        }

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

        public String displayForm ()
        {
          return sort()+"("+_constant.displayForm()+")";
        }

        public String toString ()
        {
          return _constant.toString();
        }

        public boolean equals (Object other)
        {
          if (!(other instanceof ConstantSortExpression))
    	return false;

          ConstantSortExpression c = (ConstantSortExpression)other;

          return type() == c.type() && _constant.equals(c.constant());
        }
      }

This file was generated on Tue Jan 21 09:56:10 CET 2014 from file `ConstantSortExpression.java`
by the `hlt.language.tools.Hilite` Java tool written by Hassan Aït-Kaci