IECCheckerCore.Syntaxmodule TI = Tok_infomodule TimeValue : sig ... endRepresentation of time interval
val operator_to_yojson : operator -> Yojson.Safe.tval pp_operator :
Ppx_deriving_runtime.Format.formatter ->
operator ->
Ppx_deriving_runtime.unitval show_operator : operator -> Ppx_deriving_runtime.stringval access_specifier_to_yojson : access_specifier -> Yojson.Safe.tval pp_access_specifier :
Ppx_deriving_runtime.Format.formatter ->
access_specifier ->
Ppx_deriving_runtime.unitval show_access_specifier : access_specifier -> Ppx_deriving_runtime.stringval class_specifier_to_yojson : class_specifier -> Yojson.Safe.tval pp_class_specifier :
Ppx_deriving_runtime.Format.formatter ->
class_specifier ->
Ppx_deriving_runtime.unitval show_class_specifier : class_specifier -> Ppx_deriving_runtime.stringmodule type ID = sig ... endDescription of use -- nondefining occurrence of an identifier.
module SymVar : sig ... endIdentifier of symbolically represented variable
module DirVar : sig ... endIdentifier of directly represented variable
module FunctionBlock : sig ... endFunction Block identifier
module Function : sig ... endFunction identifier
module MethodPrototype : sig ... endMethod prototype
module VarUse : sig ... end"Use" occurrence of the variable
type iec_data_type = | TyElementary of elementary_ty| TyGeneric of generic_ty| TyDerived of derived_tyand derived_ty = | DTyUseSingleElement of single_element_ty_spec| DTyUseStructType of string| DTyUseStringType of elementary_ty"Use" occurence of the derived type.
and derived_ty_decl = string * derived_ty_decl_specDeclaration of the derived type (defined with TYPE .. END_TYPE signature).
and derived_ty_decl_spec = | DTyDeclSingleElement of single_element_ty_spec * expr optioninitialization expression
*)| DTyDeclSubrange of subrange_ty_spec * intinitial value
*)| DTyDeclEnumType of elementary_ty option
* enum_element_spec list
* enum_element_spec optiondefault element
*)| DTyDeclArrayType of arr_subrange list * iec_data_type * arr_inval optioninitial value
*)| DTyDeclRefType of int * iec_data_type * ref_value optioninitial value
*)| DTyDeclStructType of bool * struct_elem_spec listelements
*)Specification used in declaration of the derived type. It could be used with variables declaration in POU as well as to declare new types.
and single_element_ty_spec = | DTySpecElementary of elementary_ty| DTySpecSimple of stringderived ty name
*)| DTySpecEnum of string| DTySpecGeneric of generic_tySingle element type specification (it works like typedef in C)
and subrange_ty_spec = elementary_ty * int * intSubrange type specification
and enum_element_spec = {enum_type_name : string option;name of enum which this element belongs to
*)elem_name : string;name of the element
*)initial_value : constant option;initial value
*)}Enum element specification
Subranges of array dimensions (e.g. 1..2, 1..3 means list with two subranges).
and arr_inval = constant listInitial value of array elements. Values like 1,2(3),4 will be converted to 1,3,3,4 in the parser.
and struct_elem_spec = {struct_elem_name : string;struct_elem_loc : DirVar.t option;struct_elem_ty : single_element_ty_spec;struct_elem_init_value : struct_elem_init_value_spec option;initial values
*)}Struct element specification
and struct_elem_init_value_spec = | StructElemInvalConstant of constant| StructElemInvalEnum of enum_element_spec| StructElemInvalStruct of stringInitial value of a struct element
and statement = | StmExpr of TI.t * expr| StmElsif of TI.t * statement * statement list| StmIf of TI.t * statement * statement list * statement list * statement list| StmCase of TI.t * statement * case_selection list * statement list| StmFor of TI.t * for_control * statement list| StmWhile of TI.t * statement * statement list| StmRepeat of TI.t * statement list * statement| StmExit of TI.t| StmContinue of TI.t| StmReturn of TI.t| StmFuncCall of TI.t * Function.t * func_param_assign listand func_param_assign = {name : string option;function param name
*)stmt : statement;assignment or sendto statement
*)inverted : bool;has inversion in output assignment
*)}val iec_data_type_to_yojson : iec_data_type -> Yojson.Safe.tval elementary_ty_to_yojson : elementary_ty -> Yojson.Safe.tval generic_ty_to_yojson : generic_ty -> Yojson.Safe.tval derived_ty_to_yojson : derived_ty -> Yojson.Safe.tval derived_ty_decl_spec_to_yojson : derived_ty_decl_spec -> Yojson.Safe.tval single_element_ty_spec_to_yojson : single_element_ty_spec -> Yojson.Safe.tval subrange_ty_spec_to_yojson : subrange_ty_spec -> Yojson.Safe.tval enum_element_spec_to_yojson : enum_element_spec -> Yojson.Safe.tval arr_subrange_to_yojson : arr_subrange -> Yojson.Safe.tval arr_inval_to_yojson : arr_inval -> Yojson.Safe.tval struct_elem_spec_to_yojson : struct_elem_spec -> Yojson.Safe.tval struct_elem_init_value_spec_to_yojson :
struct_elem_init_value_spec ->
Yojson.Safe.tval ref_value_to_yojson : ref_value -> Yojson.Safe.tval constant_to_yojson : constant -> Yojson.Safe.tval statement_to_yojson : statement -> Yojson.Safe.tval expr_to_yojson : expr -> Yojson.Safe.tval case_selection_to_yojson : case_selection -> Yojson.Safe.tval for_control_to_yojson : for_control -> Yojson.Safe.tval func_param_assign_to_yojson : func_param_assign -> Yojson.Safe.tval pp_iec_data_type :
Ppx_deriving_runtime.Format.formatter ->
iec_data_type ->
Ppx_deriving_runtime.unitval show_iec_data_type : iec_data_type -> Ppx_deriving_runtime.stringval pp_elementary_ty :
Ppx_deriving_runtime.Format.formatter ->
elementary_ty ->
Ppx_deriving_runtime.unitval show_elementary_ty : elementary_ty -> Ppx_deriving_runtime.stringval pp_generic_ty :
Ppx_deriving_runtime.Format.formatter ->
generic_ty ->
Ppx_deriving_runtime.unitval show_generic_ty : generic_ty -> Ppx_deriving_runtime.stringval pp_derived_ty :
Ppx_deriving_runtime.Format.formatter ->
derived_ty ->
Ppx_deriving_runtime.unitval show_derived_ty : derived_ty -> Ppx_deriving_runtime.stringval pp_derived_ty_decl :
Ppx_deriving_runtime.Format.formatter ->
derived_ty_decl ->
Ppx_deriving_runtime.unitval show_derived_ty_decl : derived_ty_decl -> Ppx_deriving_runtime.stringval pp_derived_ty_decl_spec :
Ppx_deriving_runtime.Format.formatter ->
derived_ty_decl_spec ->
Ppx_deriving_runtime.unitval show_derived_ty_decl_spec :
derived_ty_decl_spec ->
Ppx_deriving_runtime.stringval pp_single_element_ty_spec :
Ppx_deriving_runtime.Format.formatter ->
single_element_ty_spec ->
Ppx_deriving_runtime.unitval show_single_element_ty_spec :
single_element_ty_spec ->
Ppx_deriving_runtime.stringval pp_subrange_ty_spec :
Ppx_deriving_runtime.Format.formatter ->
subrange_ty_spec ->
Ppx_deriving_runtime.unitval show_subrange_ty_spec : subrange_ty_spec -> Ppx_deriving_runtime.stringval pp_enum_element_spec :
Ppx_deriving_runtime.Format.formatter ->
enum_element_spec ->
Ppx_deriving_runtime.unitval show_enum_element_spec : enum_element_spec -> Ppx_deriving_runtime.stringval pp_arr_subrange :
Ppx_deriving_runtime.Format.formatter ->
arr_subrange ->
Ppx_deriving_runtime.unitval show_arr_subrange : arr_subrange -> Ppx_deriving_runtime.stringval pp_arr_inval :
Ppx_deriving_runtime.Format.formatter ->
arr_inval ->
Ppx_deriving_runtime.unitval show_arr_inval : arr_inval -> Ppx_deriving_runtime.stringval pp_struct_elem_spec :
Ppx_deriving_runtime.Format.formatter ->
struct_elem_spec ->
Ppx_deriving_runtime.unitval show_struct_elem_spec : struct_elem_spec -> Ppx_deriving_runtime.stringval pp_struct_elem_init_value_spec :
Ppx_deriving_runtime.Format.formatter ->
struct_elem_init_value_spec ->
Ppx_deriving_runtime.unitval show_struct_elem_init_value_spec :
struct_elem_init_value_spec ->
Ppx_deriving_runtime.stringval pp_ref_value :
Ppx_deriving_runtime.Format.formatter ->
ref_value ->
Ppx_deriving_runtime.unitval show_ref_value : ref_value -> Ppx_deriving_runtime.stringval pp_constant :
Ppx_deriving_runtime.Format.formatter ->
constant ->
Ppx_deriving_runtime.unitval show_constant : constant -> Ppx_deriving_runtime.stringval pp_statement :
Ppx_deriving_runtime.Format.formatter ->
statement ->
Ppx_deriving_runtime.unitval show_statement : statement -> Ppx_deriving_runtime.stringval pp_expr :
Ppx_deriving_runtime.Format.formatter ->
expr ->
Ppx_deriving_runtime.unitval show_expr : expr -> Ppx_deriving_runtime.stringval pp_case_selection :
Ppx_deriving_runtime.Format.formatter ->
case_selection ->
Ppx_deriving_runtime.unitval show_case_selection : case_selection -> Ppx_deriving_runtime.stringval pp_for_control :
Ppx_deriving_runtime.Format.formatter ->
for_control ->
Ppx_deriving_runtime.unitval show_for_control : for_control -> Ppx_deriving_runtime.stringval pp_func_param_assign :
Ppx_deriving_runtime.Format.formatter ->
func_param_assign ->
Ppx_deriving_runtime.unitval show_func_param_assign : func_param_assign -> Ppx_deriving_runtime.stringval stmt_get_id : statement -> intval stmt_to_string : statement -> stringval expr_get_id : expr -> intval c_is_zero : constant -> boolReturn true if constant value is zero, false otherwise
val c_get_str_value : constant -> stringReturn string representation for value of a given constant
Convert given expr to const. Raise an InternalError exception if given expr is not constant.
val ety_is_integer : elementary_ty -> boolval ety_is_string : elementary_ty -> boolmodule Task : sig ... endTask configuration. See: 6.8.2 Tasks
module ProgramConfig : sig ... endmodule VarDecl : sig ... endDeclaration of the IEC variable
type function_decl = {id : Function.t;return_ty : iec_data_type;variables : VarDecl.t list;statements : statement list;}Function declaration
val function_decl_to_yojson : function_decl -> Yojson.Safe.tFunction block declaration
val fb_decl_to_yojson : fb_decl -> Yojson.Safe.tval program_decl_to_yojson : program_decl -> Yojson.Safe.ttype class_decl = {specifier : class_specifier option;class_name : string;parent_name : string option;Name of the parent class.
*)interfaces : string list;Names of the implemented interfaces.
*)variables : VarDecl.t list;Variables declared in this class.
*)methods : method_decl list;}and interface_decl = {interface_name : string;parents : string list;Names of the parent interfaces.
*)method_prototypes : MethodPrototype.t list;Prototypes of the methods provided by this interface.
*)}and method_decl = {prototype : MethodPrototype.t;statements : statement list;aspec : access_specifier;Access specifier.
*)cspec : class_specifier option;Class specifier: ABSTRACT or FINAL.
*)override : bool;True if the method is marked with OVERRIDE keyword.
*)}val class_decl_to_yojson : class_decl -> Yojson.Safe.tval interface_decl_to_yojson : interface_decl -> Yojson.Safe.tval method_decl_to_yojson : method_decl -> Yojson.Safe.ttype resource_decl = {name : string option;Resource name. Can be is skipped in case of single resource
*)tasks : Task.t list;variables : VarDecl.t list;Global variables
*)programs : ProgramConfig.t list;Configuration of program instances.
*)}val resource_decl_to_yojson : resource_decl -> Yojson.Safe.ttype configuration_decl = {name : string;resources : resource_decl list;variables : VarDecl.t list;Global variables and access lists
*)access_paths : string list;}Configuration element. See: 2.7 Configuration elements
val configuration_decl_to_yojson : configuration_decl -> Yojson.Safe.ttype iec_library_element = | IECFunction of int * function_decl| IECFunctionBlock of int * fb_decl| IECProgram of int * program_decl| IECClass of int * class_decl| IECInterface of int * interface_decl| IECConfiguration of int * configuration_decl| IECType of int * derived_ty_declval iec_library_element_to_yojson : iec_library_element -> Yojson.Safe.tval mk_pou :
[< `Function of function_decl
| `FunctionBlock of fb_decl
| `Program of program_decl
| `Class of class_decl
| `Interface of interface_decl
| `Configuration of configuration_decl
| `Type of derived_ty_decl ] ->
iec_library_elementval get_pou_id : iec_library_element -> intget_pou_id Get unique identifier of the given library element.
val get_pou_vars_decl : iec_library_element -> VarDecl.t listget_pou_vars_decl Return variables declared for the given POU.
val derived_ty_decl_to_yojson : derived_ty_decl -> Yojson.Safe.t