package catala
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
Compiler and library for the literate programming language for tax code specification
Install
dune-project
Dependency
Authors
Maintainers
Sources
0.10.0.tar.gz
md5=5abd76e8c51a47670645e91b21b57fc5
sha512=9c6fbe50c0b5a60566e877eeddadca0a339e2ce35deb5c1beceb03bc40eb6af2d519313e71859d88645b53fad591d4fa5288c633b185c9d765603da0f5b7dd7b
doc/catala.desugared/Desugared/Ast/index.html
Module Desugared.AstSource
Abstract syntax tree of the desugared representation
Inside a scope, a definition can refer to a variable (possibly an intermediate state thereof) or an input of a subscope.
Source
module AssertionName :
Catala_utils.Uid.Id with type info = Catala_utils.Uid.MarkedString.infoAST
Expressions
See Shared_ast.naked_gexpr for the complete definition
Rules and scopes
Source
type exception_situation = | BaseCase| ExceptionToLabel of Shared_ast.LabelName.t Catala_utils.Mark.pos| ExceptionToRule of Shared_ast.RuleName.t Catala_utils.Mark.pos
Source
type label_situation = | ExplicitlyLabeled of Shared_ast.LabelName.t Catala_utils.Mark.pos| Unlabeled
Source
type rule = {rule_id : Shared_ast.RuleName.t;rule_just : expr Shared_ast.boxed;rule_cons : expr Shared_ast.boxed;rule_parameter : (expr Shared_ast.Var.t Catala_utils.Mark.pos * Shared_ast.typ) list Catala_utils.Mark.pos option;rule_exception : exception_situation;rule_label : label_situation;
}Source
val empty_rule :
Catala_utils.Pos.t ->
(Catala_utils.Uid.MarkedString.info * Shared_ast.typ) list
Catala_utils.Mark.pos
option ->
ruleSource
val always_false_rule :
Catala_utils.Pos.t ->
(Catala_utils.Uid.MarkedString.info * Shared_ast.typ) list
Catala_utils.Mark.pos
option ->
ruleSource
type meta_assertion = | FixedBy of reference_typ Catala_utils.Mark.pos| VariesWith of unit * variation_typ Catala_utils.Mark.pos option
Source
type io = {io_output : bool Catala_utils.Mark.pos;(*
*)trueis present in the output of the scope.io_input : Shared_ast.Runtime.io_input Catala_utils.Mark.pos;
}Characterization of the input/output status of a scope variable.
Source
type scope_def = {scope_def_rules : rule Shared_ast.RuleName.Map.t;(*empty outside of the root module
*)scope_def_typ : Shared_ast.typ;scope_def_parameters : (Catala_utils.Uid.MarkedString.info * Shared_ast.typ) list Catala_utils.Mark.pos option;scope_def_is_condition : bool;scope_def_io : io;
}Source
type scope = {scope_vars : var_or_states Shared_ast.ScopeVar.Map.t;scope_sub_scopes : Shared_ast.ScopeName.t Shared_ast.ScopeVar.Map.t;scope_uid : Shared_ast.ScopeName.t;scope_defs : scope_def ScopeDef.Map.t;scope_assertions : assertion AssertionName.Map.t;(*empty outside of the root module
*)scope_options : catala_option Catala_utils.Mark.pos list;scope_meta_assertions : meta_assertion list;
}Source
type modul = {module_scopes : scope Shared_ast.ScopeName.Map.t;module_topdefs : (expr option * Shared_ast.typ) Shared_ast.TopdefName.Map.t;(*the expr is
*)Noneoutside of the root module
}Source
type program = {program_module_name : Shared_ast.Ident.t Catala_utils.Mark.pos option;program_ctx : Shared_ast.decl_ctx;program_modules : modul Shared_ast.ModuleName.Map.t;(*Contains all submodules of the program, in a flattened structure
*)program_root : modul;program_lang : Catala_utils.Global.backend_lang;
}Helpers
Usage: fold_exprs ~f ~init program applies ~f to all the expressions inside rules (justifications and consequences), expressions and top-level definitions of the program. Note that there may be free variables in these expressions.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page