package bap-core-theory

  1. Overview
  2. Docs

The theory of effects.

val perform : 'a Effect.sort -> 'a eff

perform s performs a generic effect of sort s.

val set : 'a var -> 'a pure -> data eff

set v x changes the value stored in v to the value of x.

val jmp : _ bitv -> ctrl eff

jmp dst passes the control to a program located at dst.

val goto : label -> ctrl eff

goto lbl passes the control to a program labeled with lbl.

val seq : 'a eff -> 'a eff -> 'a eff

seq x y performs effect x, after that perform effect y.

val blk : label -> data eff -> ctrl eff -> unit eff

blk lbl data ctrl a labeled sequence of effects.

val repeat : bool -> data eff -> data eff

repeat c data repeats data effects until the condition c holds.

val branch : bool -> 'a eff -> 'a eff -> 'a eff

branch c lhs rhs if c holds then performs lhs else rhs.