package catala
Compiler and library for the literate programming language for tax code specification
Install
Dune Dependency
Authors
Maintainers
Sources
0.8.0.tar.gz
md5=1408a1cce45c7d5990b981e83e7589c2
sha512=eb3b923aa1f743378b4a05e30f50be5d180dc862a716270d747a90e469017f42fa5fc41352f02fbbf59cd2560f91c4f1b32cf38d80085b105d9387b0aed2039d
doc/catala.desugared/Desugared/Ast/index.html
Module Desugared.Ast
Source
Abstract syntax tree of the desugared representation
Inside a scope, a definition can refer either to a scope def, or a subscope def
AST
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.Marked.pos
| ExceptionToRule of Shared_ast.RuleName.t Catala_utils.Marked.pos
Source
type label_situation =
| ExplicitlyLabeled of Shared_ast.LabelName.t Catala_utils.Marked.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.Marked.pos * Shared_ast.typ) list Catala_utils.Marked.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.Marked.pos
option ->
rule
Source
val always_false_rule :
Catala_utils.Pos.t ->
(Catala_utils.Uid.MarkedString.info * Shared_ast.typ) list
Catala_utils.Marked.pos
option ->
rule
Source
type meta_assertion =
| FixedBy of reference_typ Catala_utils.Marked.pos
| VariesWith of unit * variation_typ Catala_utils.Marked.pos option
Source
type io_input =
| NoInput
(*For an internal variable defined only in the scope, and does not appear in the input.
*)| OnlyInput
(*For variables that should not be redefined in the scope, because they appear in the input.
*)| Reentrant
(*For variables defined in the scope that can also be redefined by the caller as they appear in the input.
*)
This type characterizes the three levels of visibility for a given scope variable with regards to the scope's input and possible redefinitions inside the scope..
Source
type io = {
io_output : bool Catala_utils.Marked.pos;
(*
*)true
is present in the output of the scope.io_input : io_input Catala_utils.Marked.pos;
}
Characterization of the input/output status of a scope variable.
Source
type scope_def = {
scope_def_rules : rule Shared_ast.RuleName.Map.t;
scope_def_typ : Shared_ast.typ;
scope_def_parameters : (Catala_utils.Uid.MarkedString.info * Shared_ast.typ) list Catala_utils.Marked.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.SubScopeName.Map.t;
scope_uid : Shared_ast.ScopeName.t;
scope_defs : scope_def ScopeDefMap.t;
scope_assertions : assertion list;
scope_meta_assertions : meta_assertion list;
}
Source
type program = {
program_scopes : scope Shared_ast.ScopeName.Map.t;
program_topdefs : (expr * Shared_ast.typ) Shared_ast.TopdefName.Map.t;
program_ctx : Shared_ast.decl_ctx;
}
Helpers
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page