package lustre-v6

  1. Overview
  2. Docs

Gathers all entities (functions, types) that implement the heap-based C generator.

val is_soc_output : Soc.var_expr -> Soc.t -> bool
val gen_assign : Data.t -> string -> string -> string

gen_assign t vi vo size generated the C code that assign vo to vi, using memcpy or = depending on the type t

val gen_assign_var_expr : Soc.t -> Soc.var_expr -> Soc.var_expr -> string

ditto

val step_name : Soc.key -> string -> string

Generates the C step name from the soc key and the soc step name

val get_step_prototype : Soc.step_method -> Soc.t -> string * string * string

Returns the prototype (.c) and the decl (.h) of the step function. For the stack based approach, we need to arg I/O params.

val string_of_var_expr : Soc.t -> Soc.var_expr -> string
val ctx_var : Soc2cUtil.var_kind -> Soc.t -> Lv6Id.t -> string

gen_step_call soc called_soc vel_out vel_in ctx sname step_arg Generates the C code that performs the call to a step method of called_soc from soc.

  • vel_out and vel_in are the called_soc O/I arguments
  • ctx is the C name of the context of the called_soc
  • sname is the C name of the step to call
  • step_arg is a string holding the arg of the step (empty for proc call)
val gen_step_call : Soc.t -> Soc.t -> Soc.var_expr list -> Soc.var_expr list -> string -> string -> string -> string
val inlined_soc : Soc.key -> bool
val typedef_of_soc : Soc.t -> string
OCaml

Innovation. Community. Security.