Query FormatΒΆ

There can be 2 types of queries in a Flora file. One type is executed immediately after the file is loaded. Another type is only executed upon request by the user. We call this latter type of queries latent queries. In this section, we mainly focus on latent queries.

A latent query written in Flora has the following generic syntax:

@!{NAME(ARGUMENTS)} !- QUERY BODY.

An example of this is the grandparent-grandson query from family.flr:

@!{What are all the grandparent/grandson pairs?(?Grandparent, ?Grandson)} !-
    ?Grandparent [grandson -> ?Grandson].