Built-in Functions
Built-in functions are called like any function, name(args), without an import. The full list with arguments is in the built-in function index.
Math#
abs, min, max, pow, sign, floor, ceil, round, sqrt, toReal, toInt.
Bit-vectors#
concat, extract, zero_extend, sign_extend, zext, sext, overflow, carry. zero_extend(e, k) and sign_extend(e, k) add k bits; zext(e, w) and sext(e, w) extend to width w. extract is usually written extract<hi, lo>(e). See Bit-vector Operations.
Collections#
Sets: union, intersect, diff, contains, is_subset, size, isEmpty. Queues: enqueue, dequeue, front, size, isEmpty. Arrays: length, get, contains, size, isEmpty.
Maps#
apply, update, bulk_update, default, domain.
Where they are evaluated#
- The analyzer's concrete evaluation (effects, guards and properties over known values) computes all of the functions above. An argument of the wrong kind, or an unknown function name, gives an unconstrained value rather than an error.
- Constraints the SMT solver checks encode the bit-vector forms
extract,concat,zero_extendandsign_extend, the bit-vector operators, and — in bit-vector pattern constraints — the SMT-LIB functionsbvnot,bvand,bvor,bvxor,bvshl,bvlshr,bvashr,bvadd,bvsubandbvmul(see Bit-vector Operations). Other calls are opaque values there. count,find,forall_agents,exists_agent,sum_overandmax_overare recognised names but always unconstrained today. For sums over a range use thesumquantifier:sum (k : Int) in [0..n) . e.