Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

CEL Compliance

Ferricel targets full compliance with the CEL specification and the cel-go extension libraries. Conformance is validated against the official CEL conformance test suite.

Specification Coverage

The next sections outline which parts of the different CEL specifications are currently supported by the ferricel compiler.

Core CEL Specification

FeatureStatus
Integer arithmetic (+, -, *, /, %) with overflow detectionSupported
Floating-point arithmeticSupported
Unsigned integer (uint) arithmeticSupported
Boolean logic (&&, ||, !) with short-circuit evaluationSupported
Comparison operators (==, !=, <, <=, >, >=)Supported
String operations (+, size, contains, startsWith, endsWith, matches)Supported
Bytes operationsSupported
List literals, indexing, membership (in)Supported
Map literals, field access, indexingSupported
Conditional expressions (? :)Supported
Null handling and null propagationSupported
Type conversions (int(), uint(), double(), string(), bytes(), bool())Supported
Timestamp and Duration typesSupported
Timestamp/Duration arithmetic and field accessorsSupported
size() functionSupported
Single-variable comprehensions (all, exists, exists_one, map, filter)Supported
Logical error propagation through && / ||Supported
Optional types (optional.of, optional.none, .orValue, .value)Supported
Protocol Buffer message construction and field accessSupported
Protobuf wrapper type semantics (google.protobuf.*Value)Supported
dyn() type erasureSupported
type() introspectionSupported

cel-go Extension Libraries

ExtensionFunctionsStatus
Bindingscel.bind(var, init, body)Supported
Encodersbase64.encode, base64.decodeSupported
Mathmath.greatest, math.leastSupported
math.bitOr, math.bitAnd, math.bitXor, math.bitNotSupported
math.bitShiftLeft, math.bitShiftRightSupported
math.ceil, math.floor, math.round, math.truncSupported
math.abs, math.signSupported
math.isInf, math.isNaN, math.isFiniteSupported
math.sqrtSupported
StringscharAt, indexOf, lastIndexOfSupported
lowerAscii, upperAscii, trimSupported
replace, split, substring, joinSupported
reverse, strings.quoteSupported
format (string interpolation)Supported
Listsslice, flatten, distinct, reverseSupported
sort, sortBySupported
first, lastSupported
lists.range(n)Supported
Setssets.contains, sets.equivalent, sets.intersectsSupported
TwoVarComprehensionsall(i, v, pred), exists(i, v, pred), existsOne(i, v, pred)Supported
transformList(i, v, [filter,] expr)Supported
transformMap(i, v, [filter,] expr)Supported
transformMapEntry(i, v, [filter,] mapExpr)Supported
Regexregex.replace, regex.extract, regex.extractAllSupported
Protosproto.getExt, proto.hasExtNot supported

Kubernetes CEL Extensions

Ferricel also supports the Kubernetes CEL validation libraries:

ExtensionStatus
IP address functions (ip(), isIP(), family(), etc.)Supported
CIDR functions (cidr(), isCIDR(), containsIP(), etc.)Supported
URL functions (url(), isURL(), getHost(), etc.)Supported
Quantity functions (quantity(), isQuantity(), add(), sub(), etc.)Supported
Semver functions (semver(), isSemver(), major(), minor(), patch(), etc.)Supported
Format validation (format.named(), format.dns1123Label(), etc.)Supported
List extensions (isSorted(), sum(), min(), max())Supported
Regex extensions (find(), findAll())Supported

Conformance Tests

This is an overview of the current status of the conformance tests:

Test SuiteSuccessfulFailedSkipped
basic4120
bindings_ext800
block_ext18811
comparisons40600
conversions10900
encoders_ext400
fp_math3000
integer_math6400
lists3900
logic3000
macros24600
macros4400
math_ext19900
namespace1130
network_ext6900
optionals7000
parse1287417
string_ext21600
string5100
timestamps7600
type_deduction17129
Total16768857