Glossary

Index

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 

H

Index


Head

Context

A term in Prolog.

Definition

A head is any term that stands as the head of a fact or a rule.

However, variables cannot be heads.

Syntax

For example, the syntax of a fact is as follows:

head.

while the syntax of a rule is as follows:

head :- body.

Examples

That a head can be any term (except a variable) means, for example, that the following is a valid fact:

"It is raining".

So is the following:

[Sing]<-AGNT-[Bird].

And the following is also a valid fact:

student(name(Nick), semester(9)).

Rules are most useful when their heads are structures containing at least one variable as one of the arguments.


A B C D E F G H I J K L M N O P Q R S T U V W X Y Z