package acgtk
Abstract Categorial Grammar development toolkit
Install
Dune Dependency
Authors
Maintainers
Sources
acg-2.1.0-20240219.tar.gz
sha512=5d380a947658fb1201895cb4cb449b1f60f54914c563e85181d628a89f045c1dd7b5b2226bb7865dd090f87caa9187e0ea6c7a4ee3dc3dda340d404c4e76c7c2
doc/acgtk.acgData/AcgData/Reduction/Make/index.html
Module Reduction.Make
Source
This module implements the reduction from ACG signatures and lexicons to datalog programs
Parameters
module Sg : module type of Signature.Data_Signature
Signature
Source
val generate_and_add_rule :
abs_cst:(string * Logic.Lambda.Lambda.stype) ->
obj_princ_type:Logic.Lambda.Lambda.stype ->
obj_typing_env:
(Logic.Lambda.Lambda.term * Logic.Lambda.Lambda.stype)
UtilsLib.Utils.IntMap.t ->
abs_sig:Sg.t ->
obj_sig:Sg.t ->
update_fct:
(Logic.Lambda.Lambda.term ->
(string UtilsLib.Utils.IntMap.t * UtilsLib.Utils.StringSet.t) ->
string * (string UtilsLib.Utils.IntMap.t * UtilsLib.Utils.StringSet.t)) ->
syms:(string UtilsLib.Utils.IntMap.t * UtilsLib.Utils.StringSet.t) ->
DatalogLib.Datalog.Datalog.Program.program ->
DatalogLib.Datalog_AbstractSyntax.AbstractSyntax.Rule.rule
* DatalogLib.Datalog.Datalog.Program.program
* (string UtilsLib.Utils.IntMap.t * UtilsLib.Utils.StringSet.t)
generate_and_add_rule ~abs_cst ~obj_princ_type ~obj_typing_env prog abs_sig obj_sig
returns a pair (r,prog')
where:
r
is the generated ruleprog'
isprog
where the ruler
has been addedabs_cst
is the abstract constant from the abstract signatureabs_sig
that triggers the rule generationobj_princ_type
is the principal type of the image by the lexicon ofabs_cst
obj_typing_env
is its typing environment. The latter maps the position of the object constants in the realisation ofabs_cst
to a pair(t,ty)
wheret
is the object constant itself, andty
the type associated by the principal typing environment.prog
is the current datalog programabs_sig
andobj_sig
are the abstract signature and the object signature of some ACG.
Source
val edb_and_query :
obj_term:Logic.Lambda.Lambda.term ->
obj_type:Logic.Lambda.Lambda.stype ->
obj_typing_env:
(Logic.Lambda.Lambda.term * Logic.Lambda.Lambda.stype)
UtilsLib.Utils.IntMap.t ->
dist_type:Sg.stype ->
?adornment:MagicRewriting.Adornment.status list ->
DatalogLib.Datalog.Datalog.Program.program ->
abs_sig:Sg.t ->
obj_sig:Sg.t ->
syms:(string UtilsLib.Utils.IntMap.t * UtilsLib.Utils.StringSet.t) ->
DatalogLib.Datalog_AbstractSyntax.AbstractSyntax.Predicate.predicate
* DatalogLib.Datalog.Datalog.Program.program
edb_and_query ~obj_term ~obj_type ~obj_typing_env ~dist_type prog ~abs_sig ~obj_sig
returns a pair (q,prog')
where:
q
is the predicate corresponding to the query generated by the object termobj_term
to parseprog'
isprog
where the extensional database resulting from the reduction of the object termobj_term
has been addedobj_type
is the principal type ofobj_term
obj_typing_env
is its typing environment. The latter maps the position of the object constants in the realisation ofabs_cst
to a pair(t,ty)
wheret
is the object constant itself, andty
the type associated by the principal typing environment.dist_type
is the distinguished type of the ACGprog
is the current datalog programabs_sig
andobj_sig
are the abstract signature and the object signature of some ACG.
Source
val only_edb_and_query :
obj_term:Logic.Lambda.Lambda.term ->
obj_type:Logic.Lambda.Lambda.stype ->
obj_typing_env:
(Logic.Lambda.Lambda.term * Logic.Lambda.Lambda.stype)
UtilsLib.Utils.IntMap.t ->
dist_type:Sg.stype ->
DatalogLib.Datalog.Datalog.Program.program ->
abs_sig:Sg.t ->
obj_sig:Sg.t ->
syms:(string UtilsLib.Utils.IntMap.t * UtilsLib.Utils.StringSet.t) ->
DatalogLib.Datalog_AbstractSyntax.AbstractSyntax.Predicate.predicate
* DatalogLib.Datalog_AbstractSyntax.AbstractSyntax.Predicate.predicate list
* DatalogLib.Datalog.Datalog.Program.program
only_edb_and_query ~obj_term ~obj_type ~obj_typing_env ~dist_type prog ~abs_sig ~obj_sig
returns a triple (q,edb,prog')
where:
q
is the predicate corresponding to the query generated by the object termobj_term
to parseedb
is the extensional database (as a list of predicates) resulting from the reduction of the object termobj_term
prog'
isprog
with the const_table updated from the queryobj_type
is the principal type ofobj_term
obj_typing_env
is its typing environment. The latter maps the position of the object constants in the realisation ofabs_cst
to a pair(t,ty)
wheret
is the object constant itself, andty
the type associated by the principal typing environment.dist_type
is the distinguished type of the ACGprog
is the current datalog programabs_sig
andobj_sig
are the abstract signature and the object signature of some ACG.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page