Semmle 1.24
Skip to end of metadata
Go to start of metadata

On this page:

Related topics:


Improvements to analysis

Semmle 1.19 includes many improvements to the analysis of all languages. For full details, see the following pages:

Changes to the language

Binding though floating point negation

A variable may now be bound through a floating point negation. For example, f is bound in -f = 0.1. For more information see the QL handbook.

New built-in predicate—greatest common divisor

A new built-in predicate gcd has been added to the QL language. For two integers x and y, x.gcd(y) returns their greatest common divisor.

Improved annotation checking

QL annotation checking has been improved to give clearer error messages and correctly follow the QL language specification. For more information on annotations, see the QL handbook.

In summary, the main changes are:

  • Annotations that do not expect arguments (for example, cached) will cause an error when written with arguments.
  • Annotations that expect arguments (for example, pragma[noinline]) will cause an error when written without arguments.
  • Repeated annotations on the same QL entity will cause an error. Parameterized annotations may still be repeated with different arguments.
  • Improved error messages when annotations that are meant only for QL entities are written on QL names instead.
  • Improved error messages when pragma[inline] or bindingset annotations are incompatible with other annotations on the same entity.

The QL language specification has been updated to clarify these rules.

Improved range checking

The QL compiler now performs type checking on range checks: for example, e in [1..3] is only permitted if the type of the expression e is compatible with the primitive type int, and e in [1.0..3.1] is only permitted if the type of the expression e is compatible with the primitive type float.

  • No labels