12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879(* SPDX-License-Identifier: MIT *)(* Copyright (C) 2023-2024 formalsec *)(* Written by the Smtml programmers *)includePreludemoduleString=structincludeStringlethashx=String_hash.seeded_hash0xendmoduleInt32=structincludeInt32(* As they are defined in the stdlib *)lethashx=Hashtbl.seeded_hash_param101000xendmoduleInt64=structincludeInt64(* As they are defined in the stdlib *)lethashx=Hashtbl.seeded_hash_param101000xendmoduleOption=structincludeOptionmoduleSyntax=structlet(let*)vf=bindvflet(let+)vf=mapfvendendmoduleResult=structincludeResultmoduleSyntax=structlet(let*)vf=Result.bindvflet(let+)vf=Result.mapfvendletreclist_iterf=letopenSyntaxinfunction|[]->Ok()|hd::tl->let*()=fhdinlist_iterftlletlist_mapfv=letopenSyntaxinletreclist_map_cpsfvk=matchvwith|[]->k(Ok[])|hd::tl->list_map_cpsftl(funrest->let*restinlet*hd'=fhdink(Ok(hd'::rest)))inlist_map_cpsfvFun.idletlist_filter_mapfv=letopenSyntaxinletreclist_filter_map_cpsfvk=matchvwith|[]->k(Ok[])|hd::tl->list_filter_map_cpsftl(funrest->let*restinlet*v=fhdink(Ok(matchvwithNone->rest|Somev->v::rest)))inlist_filter_map_cpsfvFun.idend