Noeud: Feature Terms, Noeud « Next »: Enumeration variables, Noeud « Previous »: Operators, Noeud « Up »: Terms
It is possible to associate to a symbol (say employee
) a list of
features (say [name,job,salary]
). When building a term based on
employee
, it is not necessary to assign explicitely and in order
a value for all its features because the missing values will be filled
by new anonymous variables. For instance, the feature term
employee{salary=>6000,name=>john}
is equivalent to the term
employee(john,_,5000)
. Note the use of enclosing {} instead
of enclosing () to mark feature terms.
To associate a feature table to a symbol, use the directive
features/2
.
:-features(employee,[name,job,salary]).
It is also possible to use Typed Feature Structure, following the same syntax.