The most important operators provided by the HDRUG library are the type
assignment operator ('
=>'), the path equality operator
<=>'), and the path operator ('
A typical grammar fragment employing those operators
Np:lex => -indicates that the value of the lex attribute of Np is of type -. The constraint
Vp:agr <=> Np:agrindicates that the value of the agr attribute of Vp is identical to the value of the agr attribute of Np. Internally, such a rule could be represented as follows (the actual result of the compilation depends on what attributes are allowed for what types; declarations of this sort are part of the grammar):
The feature library also supports boolean combinations of atomic values; these are compiled into Prolog terms using a technique described in Mellish  (who attributes it to Colmerauer) and Pulman . Thus, we may specify agr values such as sg (sec thi), denoting an agreement value which is singular and either second or third person.
We have also found it useful to provide the predicates unify_ifdef/3, ifdef/4, and unify_except/3. The predicate unify_ifdef(C1,C2,Att) can be used to require that if both C1 and C2 can have the attribute Att (i.e. C1, C2 are of a type for which Att is a possible feature), then the values C1:Att and C2:Att must be identical. The predicate ifdef(Att,Cat,Val,Otherwise) is used to require that Cat:Att is identical to Val if Att is an appropriate feature for Cat. Otherwise Val is identical to Otherwise. The predicate unify_except(C1,C2,Path) unifies C1 and C2, with the exception of the value of Path, which must be defined for both C1 and C2, but which may have incompatible values. These predicates simplify the definition of the grammar code below.