IR.Binop
The Smallfoot Intermediate Language: Binary Operators
type t =
| PlusA of Typ.ikind option
arithmetic +
*)| PlusPI
pointer + integer
*)| MinusA of Typ.ikind option
arithmetic -
*)| MinusPI
pointer - integer
*)| MinusPP
pointer - pointer
*)| Mult of Typ.ikind option
*
*)| DivI
/ for integers
*)| DivF
/ for floats
*)| Mod
%
*)| Shiftlt
shift left
*)| Shiftrt
shift right
*)| Lt
< (arithmetic comparison)
*)| Gt
> (arithmetic comparison)
*)| Le
<= (arithmetic comparison)
*)| Ge
>= (arithmetic comparison)
*)| Eq
== (arithmetic comparison)
*)| Ne
!= (arithmetic comparison)
*)| BAnd
bitwise and
*)| BXor
exclusive-or
*)| BOr
inclusive-or
*)| LAnd
logical and. Does not always evaluate both operands.
*)| LOr
logical or. Does not always evaluate both operands.
*)Binary operations
include Ppx_compare_lib.Comparable.S with type t := t
val compare : t Base__Ppx_compare_lib.compare
val str : IStdlib.Pp.env -> t -> string
val pp : IStdlib.IStd.Formatter.t -> t -> unit
val injective : t -> bool
This function returns true if the operation is injective wrt. each argument: op(e,-) and op(-, e) is injective for all e. The return value false means "don't know".
val is_zero_runit : t -> bool
This function returns true if 0 is the right unit of binop
. The return value false means "don't know".