DELAPARRA
Index
Color
NL
Category: Programming paradigms

Fact

Explained by Updated

What is Fact?

Fact: An unconditional base assertion. parent(alice, bob). states that Alice is a parent of Bob. In logic programming, a fact is a statement that is simply true, without conditions. In Prolog, parent(alice, bob). states that Alice is a parent of Bob. Facts are the base data of a logic program. Rules combine them to derive new knowledge. From parent facts, a rule can define who is a grandparent, and the system can then answer questions such as "who are Bob's grandparents?"

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about Fact

What should you keep in mind with Fact?

The idea is close to a row in a database table. A table of parents with two columns holds the same facts, and a SQL query or view plays the role of a rule. That is why logic programming and relational databases feel related. Both describe what is true and let an engine work out the answers.

At a glance

CategoryProgramming paradigms
Explained by
Updated

More Programming paradigms terms

All terms starting with F

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.