Runtime_ocaml.RuntimeSourceThe OCaml runtime.
type source_position = {filename : string;start_line : int;start_column : int;end_line : int;end_column : int;law_headings : string list;}type runtime_value = | Unit| Bool of bool| Money of money| Integer of integer| Decimal of decimal| Date of date| Duration of duration| Enum of string list * string * runtime_value| Struct of string list * (string * runtime_value) list| Array of runtime_value Array.t| UnembeddableThe logging is constituted of two phases:
raw_event) during the program execution (see retrieve_log) throught Logging instruments.event).Represents information about a name in the code -- i.e. variable name, subscope name, etc...
It's a list of strings with a length varying from 2 to 3, where:
Scope_name,a_subscope_var.input_varSubscope_name or, the input (resp. output) string -- which corresponds to the input (resp. the output) of a function.type raw_event = | BeginCall of informationSubscope or function call.
*)| EndCall of informationEnd of a subscope or a function call.
*)| VariableDefinition of information * runtime_valueDefinition of a variable or a function argument.
*)| DecisionTaken of source_positionSource code position of an event.
*)The corresponding grammar of the event type, is the following:
<event> := <fun_call>
| <subscope_call>
| <var_def>
| <var_def_with_fun>
| VariableDefinition
<fun_call> :=
VariableDefinition (function input)
<fun_call_beg>
<event>*
(<var_def> | <var_def_with_fun>) (function output)
EndCall
<var_def_with_fun> :=
/-- DecisionTaken
pos of | <fun_call>+ (function calls needed to compute the variable value)
\-> VariableDefinition
<subscope_call> :=
<sub_var_def>* (sub-scope attributes def)
<sub_call_beg>
<event>+
EndCall
<var_def> := DecisionTaken VariableDefinition(info, _)
(when info.length = 2 && info[1] == "id")
<sub_var_def> := DecisionTaken VariableDefinition(info, _)
(when info.length = 3)
<fun_call_beg> := BeginCall(info)
(when info.length = 2)
<sub_call_beg> := BeginCall(info)
(when info.length = 2 and '.' in info[1])and var_def = {pos : source_position option;name : information;value : runtime_value;fun_calls : fun_call list option;}retrieve_log () returns the current list of collected raw_event.
pp_events ~is_first_call ppf events pretty prints in ppf the string representation of events.
If is_first_call is set to true, the formatter will be flush at the end. By default, is_first_call is set to false.
Usage : duration_of_numbers year mounth day.
val handle_default :
source_position ->
(unit -> 'a) array ->
(unit -> bool) ->
(unit -> 'a) ->
'aval handle_default_opt :
source_position ->
'a eoption array ->
bool eoption ->
'a eoption ->
'a eoption