Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space SDmaster and version 1.22
Dont print
Panel
borderColor#39B54A
bgColor#ffffff
titleColor#39B54A
titleBGColor#ffffff

On this page:

Table of Contents
maxLevel1

Related topics:

HIDDEN

Excerpt
hiddentrue

Changes to the extractor, libraries and queries included in Semmle 1.19.

Improvements to analysis

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

Children Display

Changes to the language


Markdown
## 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](https://help.semmle.com/QL/ql-handbook/evaluation.html#binding).

## 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](https://help.semmle.com/QL/ql-spec/language.html). For more information on annotations, see the [QL handbook](https://help.semmle.com/QL/ql-handbook/annotations.html).

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