Release Notes for CQL version 6.0 beta 3

  • precedence of - increased to be consistent with common usage
  • fixed issue where an individual game larger than 100KB could crash
  • support for filenames with spaces.
  • fix issue where some comments inside an echo inside a sort would sometimes not be output (games and values themselves were not affected)
  • added a number of studies to the list of studies.
  • Numerous documentation changes, including a (table of filters)
  • added a quiet parameter to consecutivemoves
  • any filter can now be used as a line constituent without extra braces
  • CQL parser detects certain unnecessary wildcards at compile time, like check * *
  • additional checks on 'line' syntax to catch certain common errors
  • {*} and {+} for clearer wildcard usage where desired

Release Notes for CQL version 6.0 beta 2

  • relational operators like < and >= are now right associative, which allows chained expressions like 2<P<=5 for more than 2 and at most 5 white pawns.
  • fixed bugs in move castle , move legal o-o and move legal o-o-o . Documentation corrected that castle and not castles is the correct parameter to move.

Release Notes for CQL version 6.0 beta 1

(Note: this release is the same as "version 6.0 beta" or "version 6 beta") 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.

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.


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
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