Skip to content

Commit f0b3909

Browse files
committed
discuss 'extensible' whenever the spec mentions 'external'
1 parent 3159b29 commit f0b3909

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

docs/codeql/ql-language-reference/ql-language-specification.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Architecture
3636

3737
A *QL program* consists of a query module defined in a QL file and a number of library modules defined in QLL files that it imports (see "`Import directives <#import-directives>`__"). The module in the QL file includes one or more queries (see "`Queries <#queries>`__"). A module may also include *import directives* (see "`Import directives <#import-directives>`__"), non-member predicates (see "`Non-member predicates <#non-member-predicates>`__"), class definitions (see "`Classes <#classes>`__"), and module definitions (see "`Modules <#modules>`__").
3838

39-
QL programs are interpreted in the context of a *database* and a *library path* . The database provides a number of definitions: database types (see "`Types <#types>`__"), entities (see "`Values <#values>`__"), built-in predicates (see "`Built-ins <#built-ins>`__"), and the *database content* of built-in predicates and external predicates (see "`Evaluation <#evaluation>`__"). The library path is a sequence of file-system directories that hold QLL files.
39+
QL programs are interpreted in the context of a *database* and a *library path* . The database provides a number of definitions: database types (see "`Types <#types>`__"), entities (see "`Values <#values>`__"), built-in predicates (see "`Built-ins <#built-ins>`__"), and the *database content* of built-in predicates, external predicates, and extensible predicates (see "`Evaluation <#evaluation>`__"). The library path is a sequence of file-system directories that hold QLL files.
4040

4141
A QL program can be *evaluated* (see "`Evaluation <#evaluation>`__") to produce a set of tuples of values (see "`Values <#values>`__").
4242

@@ -935,6 +935,7 @@ When a predicate is a top-level clause in a module, it is called a non-member pr
935935

936936
A valid non-member predicate can be annotated with ``additional``, ``cached``, ``deprecated``, ``extensible``, ``external``, ``transient``, ``private``, and ``query``.
937937
Note, the ``transient`` annotation can only be applied if the non-member predicate is also annotated with ``external``.
938+
Note, the annotations ``extensible`` and ``external`` cannot both be used on the same non-member predicate.
938939

939940
The head of the predicate gives a name, an optional *result type*, and a sequence of variables declarations that are *arguments*:
940941

@@ -952,7 +953,7 @@ The body of a predicate is of one of three forms:
952953

953954
In the first form, with just a semicolon, the predicate is said to not have a body. In the second form, the body of the predicate is the given formula (see "`Formulas <#formulas>`__"). In the third form, the body is a higher-order relation.
954955

955-
A valid non-member predicate must have a body, either a formula or a higher-order relation, unless it is external, in which case it must not have a body.
956+
A valid non-member predicate must have a body, either a formula or a higher-order relation, unless it is external or extensible, in which case it must not have a body.
956957

957958
The typing environment for the body of the formula, if present, maps the variables in the head of the predicate to their associated types. If the predicate has a result type, then the typing environment also maps ``result`` to the result type.
958959

@@ -2180,7 +2181,7 @@ If a QL program has no valid stratification, then the program itself is not vali
21802181
Layer evaluation
21812182
~~~~~~~~~~~~~~~~
21822183

2183-
The store is first initialized with the *database content* of all built-in predicates and external predicates. The database content of a predicate is a set of ordered tuples that are included in the database.
2184+
The store is first initialized with the *database content* of all built-in predicates, external predicates, and extensible predicates. The database content of a predicate is a set of ordered tuples that are included in the database.
21842185

21852186
Each layer of the stratification is *populated* in order. To populate a layer, each predicate in the layer is repeatedly populated until the store stops changing. The way that a predicate is populated is as follows:
21862187

0 commit comments

Comments
 (0)