CQL version 6.0 Issues

  • **[CQLI9.186-1]** The backward line filter can output an inaccurate count, or signal an error, when it is used with the default comment level. To use the backward line filter, specify either silent or quiet in the CQL header.
  • [CQLI9.186-2] When the position filter is used, but the resulting position is ignored (that is, the position filter is only used to determine if its argument is nonnegative and smaller than the the number of positions in a game), the filter will always match. The workaround is not to ignore the position returned by the position filter.
  • [CQLI9.186-3] The error message signalled if the result filter has an invalid argument is not grammatical.
  • [CQLI9.186-4] The error message signalled when the filename of the file containing the CQL code is not the last argument on the command line is missing a space.
  • [CQLI9.186-5] The error message signalled when when both 'previous' and 'legal' are used with the move filter is inaccurate.
  • [CQLI9.186-6] The error message signalled when a numeric variable is used only for whether it matches, not for its value, is misleading.
  • **[CQLI9.186-7]** The elo filter does not work correctly and should not be used.

Release Notes for CQL version 6.0

This table below is a partial list of changes from CQL version 5.2 to CQL version 6.0. It is not complete due to the large number of changes that were made.

We thank Robert Gamble for his assistance in finding and fixing numerous bugs in version 6.0.

Note that there were also some important changes from CQL version 5.1 to CQL version 5.2. If you are still using CQL version 5.1, read the release notes for CQL 5.2 before reading these release notes. CQL 6 also runs much faster than previous versions, particularly on complex CQL files. (On an 8-core machine, we typically see speedups of a factor of between 10 and 80 compared to CQL 5.2, depending on the exactly CQL file and PGN database). CQL 6 is also substantially more expressive and compact than previous versions of CQL.

.

FeatureExampleDescription
multi-threaded execution cql foo.cql CQL by default runs in multiple threads
Variable names need not start with a dollar sign checkers=A attack k A variable name can be any sequence of allowed characters and need not start with a dollar sign
Variables can hold integers, sets of squares or positions Attacks=A attacks .
x = #Attacks
y=find check
More powerful variables
Arithmetic expressions power A * 3<power a basic integer arithmetic and relational expressions
legal move checking move legal enpassant move filter supports legal and pseudolegal move computation (as well as castling and capture)
functions function forks(x){[rbnqk] attackedby x>1} user-defined functions
if if pin through a then x else y if/then/else statments
many more command line features cql -variations foo.cql arbitrary filters on the command line
many new command line options
pawn structure filters passedpawns
A&isolatedpawns
a&doubledpawns
sort connectedpawns
pawn structure filters
run cql without a CQL file cql -i mydatabase.pgn -cql stalemate -cql btm -cql r when CQL file is missing, use cql(). as file
FEN support cql -fen 8/5kp1/p5N1/P4Pp1/6P1/PKP5/1B1r4/8 -i foo.pgn find positions in FEN notation, in CQL file or using -fen command line option
pin supportpin through A>1 Find pins
c-style comments check // the position is check
/* this line is ignored */
Anything after // on a line in a CQL file is ignored. Anything between /* and */ is ignored.
xray xray (A a k) Rays where first argument attacks second (renamed from ray attack)
persistent variables persistent NStalemates = NStalemates +1 persistent variables retain their value between games. They can be used for statistics
echo echo(s t) s&t==. simpler and more powerful replacement for old relation syntax