Trlc

Latest version: v2.0.0

Safety actively analyzes 688843 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 4

1.1.8

* [TRLC] Hotfix for the CVC5 API issue: pinning PyVCG to 1.0.3, which
in turn pins CVC5 to 1.0.5 (the last known good version).

1.1.7

* [TRLC, LRM] Fixed a missing restriction on tuple types that
permitted interesting nesting of tuples with separators and optional
components. The restriction forbids any tuple with declared
separators from having components that are themselves tuples with
separators. We may relax this restriction in the future to permit
some combinations where this doesn't lead to parsing problems for
values.

The problem can be seen in this example:

trlc
tuple T {
a String
separator
b optional Integer
}

tuple Q {
a T
separator
b optional Integer
}


If we now write `"foo" 12` then there is no possible way to
specify if you meant:

* Instance of Q where `a` is `"foo" 12` and `b` is unspecified
* Instance of Q where `a` is just `"foo"` and `b` is `12`

* [TRLC, LRM] Fixed LRM and tools allowing empty enumerations. This is
now explicitly forbidden. It was always unreasonable to do this as
it would have been impossible to use the enumeration type, and there
is no legitimate use-case anyway since you cannot add more literals
later through e.g. a type extension.

* [TRLC] Add alternative entry-point for users who cannot modify their
PATH. You can now do `python3 -m trlc [args...]` and it works just
like `trlc [args...]`.

* [TRLC] Fix tool crash when encountering a file not in UTF-8
encoding. We now print an error message indicating the issue.

* [TRLC] Fix bug when parsing arrays: arrays without comma separators
were accapted when they should have been rejected.

* [TRLC] Fix tool crash when parsing a file with an unterminated `/*`
comment.

* [LRM] Fix typo in in several places: `.rls` should be `.rsl`.

1.1.6

* [TRLC] Add new option `--lint --verify`. This option requires
[PyVCG](https://pypi.org/project/PyVCG) to be installed (which is
only available on GNU/Linux or OSX). This option attempts to
statically verify all checks for freedom of run-time errors (no null
dereferences, no division by zero, and no array out of bounds
access). For example with this `.rsl`:


type T1 {
x optional Integer
y optional Integer
z Integer
}

checks T1 {
x != null implies y == x, fatal "potato"
y != null implies x > 1, warning "potato"
}


The `--lint --verify` option might say:


y != null implies x > 1, warning "potato"
^ test1.rsl:11: warning: expression could be null [vcg-evaluation-of-null]
| example record_type triggering error:
| T1 bad_potato {
| /* x is null */
| y = 0
| z = 0
| }


* [Package] Provide Linux and OSX packages, along with the default
package, which should automatically install PyVCG where it is
available. On Windows, `pip` should fall back to the platform
agnostic package.

* [TRLC] Add new option `--no-user-warnings` to suppress any warning
generated from a user-defined check.

* [TRLC] Fix missing static check on exponents (they must not be
negative).

* [TRLC] Fix missing static check for Boolean types on check
expressions (tools would crash without error message).

* [TRLC, LRM] Fix several tool crashes when the `null` literal
appeared in expressions outside equality. Re-worded the section on
null values in the LRM to be much stricter. We consider this to be a
bug-fix and not a change of semantics.

* [LRM] Clarify equality semantics for arrays, tuples, and record
references. Moved the definition of null equality into the same
place.

1.1.5

* [LRM, TRLC] Remove limitation on late packages. You may now declare
any number of packages in `trlc` files; and you may even import
them. It is still recommended to have a `rsl` file for a package
spanning multiple files, even if it's basically blank; however the
technical limitation and language rules surrounding late packages
have been removed.

* [LRM, TRLC] Add base 2 and base 16 integer literals. You can now
write things like `0xdeadbeef` and `0b10010010`. Octal literals are
not supported.

* [LRM, TRLC] Add support for readability separators in integer and
decimal literals. You can now write things like `1_000_000.00` or
`0b1001_0010`.

* [TRLC] Improve --lint output by appending a rule name in the output
(in a style similar to clang-tidy). In the future it will be
possible to turn rules off you don't like.

* [TRLC] Relax errors surrounding array sizes, they are now lint
messages like the language manual suggests.

* [TRLC] A warning is now issued by the tools when encountering a
duplicate import statement.

* [TRLC] A warning is now issued by the tools when encountering
duplicate late package declarations.

* [TRLC] New --lint check for detecting tuples with separators that
could be confused with base 2 or base 16 integer literals.

1.1.4

* [TRLC] Improve error messages by using a more human readable form of
expected tokens, so now you see "opening brace '{'" instead of
"C_BRA".

1.1.3

* [TRLC] New API function `fully_qualified_name` for `Record_Object`
which can be used to get the `package.name` name for any record.

* [TRLC] The API function `to_python_object` now emits fully qualified
names for record references.

Page 2 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.