|
|
|
(*
|
|
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
|
|
*
|
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
|
|
|
*)
|
|
|
|
|
|
|
|
(** Symbolic Execution *)
|
|
|
|
|
|
|
|
open Fol
|
|
|
|
|
|
|
|
val assume : Sh.t -> Formula.t -> Sh.t option
|
|
|
|
val kill : Sh.t -> Var.t -> Sh.t
|
|
|
|
val move : Sh.t -> (Var.t * Term.t) iarray -> Sh.t
|
|
|
|
val load : Sh.t -> reg:Var.t -> ptr:Term.t -> len:Term.t -> Sh.t option
|
|
|
|
val store : Sh.t -> ptr:Term.t -> exp:Term.t -> len:Term.t -> Sh.t option
|
|
|
|
val memset : Sh.t -> dst:Term.t -> byt:Term.t -> len:Term.t -> Sh.t option
|
|
|
|
val memcpy : Sh.t -> dst:Term.t -> src:Term.t -> len:Term.t -> Sh.t option
|
|
|
|
val memmov : Sh.t -> dst:Term.t -> src:Term.t -> len:Term.t -> Sh.t option
|
|
|
|
val alloc : Sh.t -> reg:Var.t -> num:Term.t -> len:int -> Sh.t option
|
|
|
|
val free : Sh.t -> ptr:Term.t -> Sh.t option
|
|
|
|
val nondet : Sh.t -> Var.t option -> Sh.t
|
|
|
|
val abort : Sh.t -> Sh.t option
|
|
|
|
|
|
|
|
val intrinsic_func :
|
|
|
|
skip_throw:bool
|
|
|
|
-> Sh.t
|
|
|
|
-> Var.t option
|
|
|
|
-> string
|
[sledge] Represent function formal parameters and actual arguments in order
Summary:
Previously, when LLAIR was in SSA form, blocks took parameters just
like functions, and it was sometimes necessary to partially apply a
block to some of the parameters. For example, blocks to which function
calls return would need to accept the return value as an argument, and
sometimes immediately jump to another block passing the rest of the
arguments as well. These "trampoline" blocks were partial applications
of the eventual block to all but the final, return value,
argument.
This partial application mechanism meant that function parameters and
arguments were represented as a stack, with the first argument at the
bottom, that is, in reverse order.
Now that LLAIR is free of SSA, this confusion is no longer needed, and
this diff changes the representation of function formal parameters and
actual arguments to be in the natural order. This also brings Call
instructions in line with Intrinsic instructions, which will make
changing the handling of intrinsics from Calls to Intrinsic less
error-prone.
Reviewed By: jvillard
Differential Revision: D25146163
fbshipit-source-id: d3ed07a45
4 years ago
|
|
|
-> Term.t iarray
|
|
|
|
-> Sh.t option option
|