刚开始没必要看书
也没必要听那些所谓的老手的建议
什么学习路线的,那些都是扯淡的
没什么卵用的
为什么呢?
因为想要提高你的水平,最重要的就是动手,实战
你照着那些路线慢慢的学下去,学不了几天,你的耐心就都被磨没了
耐心都磨没了,还学个屁
所以我的建议是,基本语法熟悉之后,直接去实战
过程中遇到不懂的地方再去找答案,这样你容易有成就感,也学的快
需要的话,我这里有很多实战的项目资料,有需要的可以找我来拿
参考下图找我
type exec_opts =
{ bound: int
; skip_throw: bool
; function_summaries: bool
; entry_points: string list
; globals: Domain_used_globals.r }
module Make (Dom : Domain_intf.Dom) = struct
module Stack : sig
type t
type as_inlined_location = t [@@deriving compare, sexp_of]
val empty : t
val push_call :
Llair.func Llair.call -> bound:int -> Dom.from_call -> t -> t option
val pop_return : t -> (Dom.from_call * Llair.jump * t) option
val pop_throw :
t
-> init:'a
-> unwind:
( Llair.Reg.t list
-> Llair.Reg.Set.t
-> Dom.from_call
-> 'a
-> 'a)
-> (Dom.from_call * Llair.jump * t * 'a) option
end = struct
type t =
| Return of
{ recursive: bool (** return from a possibly-recursive call *)
; dst: Llair.Jump.t
; formals: Llair.Reg.t list
; locals: Llair.Reg.Set.t
; from_call: Dom.from_call
; stk: t }
| Throw of Llair.Jump.t * t
| Empty
[@@deriving sexp_of]
type as_inlined_location = t [@@deriving sexp_of]
(* Treat a stack as a code location in a hypothetical expansion of the
program where all non-recursive functions have been completely
inlined. In particular, this means to compare stacks as if all Return
frames for recursive calls had been removed. Additionally, the
from_call info in Return frames is ignored. *)
let rec compare_as_inlined_location x y =
if x == y then 0
else
match (x, y) with
| Return {recursive= true; stk= x}, y
|x, Return {recursive= true; stk= y} ->
compare_as_inlined_location x y
| Return {dst= j; stk= x}, Return {dst= k; stk= y} -> (
match Llair.Jump.compare j k with
| 0 -> compare_as_inlined_location x y
| n -> n )
| Return _, _ -> -1
| _, Return _ -> 1
| Throw (j, x), Throw (k, y) -> (
match Llair.Jump.compare j k with
| 0 -> compare_as_inlined_location x y
| n -> n )
| Throw _, _ -> -1
| _, Throw _ -> 1
| Empty, Empty -> 0