package acgtk
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha512=5d380a947658fb1201895cb4cb449b1f60f54914c563e85181d628a89f045c1dd7b5b2226bb7865dd090f87caa9187e0ea6c7a4ee3dc3dda340d404c4e76c7c2
doc/acgtk.datalogLib/DatalogLib/Datalog/Make/Program/index.html
Module Make.ProgramSource
type program = {rules : Rule.Rules.t Predicate.PredMap.t;edb : ASPred.pred_id list;edb_facts : Predicate.FactSet.t Predicate.PredMap.t;idb : ASPred.pred_id list;pred_table : ASPred.PredIdTable.table;const_table : Datalog_AbstractSyntax.ConstGen.Table.table;rule_id_gen : UtilsLib.IdGenerator.IntIdGen.t;abstract_rules : ASRule.Rules.t;
}val temp_facts :
Rule.rule ->
Rule.FactArray.row Predicate.PredMap.t ->
Rule.FactArray.row Predicate.PredMap.t ->
Rule.FactArray.row Predicate.PredMap.t ->
Rule.FactArray.row Predicate.PredMap.t ->
((ASPred.predicate * Predicate.FactSet.elt list) -> Rule.rule -> 'a -> 'a) ->
'a ->
ASPred.PredIdTable.table ->
Datalog_AbstractSyntax.ConstGen.Table.table ->
'aval p_semantics_for_predicate :
Predicate.PredMap.key ->
program ->
Rule.FactArray.row Predicate.PredMap.t ->
Rule.FactArray.row Predicate.PredMap.t ->
Rule.FactArray.row Predicate.PredMap.t ->
Rule.FactArray.row Predicate.PredMap.t ->
Predicate.PremiseSet.t Predicate.PredicateMap.t ->
Predicate.FactSet.t * Predicate.PremiseSet.t Predicate.PredicateMap.tval seminaive :
program ->
Rule.FactArray.row Predicate.PredMap.t
* Predicate.PremiseSet.t Predicate.PredicateMap.tval add_e_facts :
program ->
(ASRule.rule list
* Datalog_AbstractSyntax.ConstGen.Table.table
* UtilsLib.IdGenerator.IntIdGen.t) ->
programadd_rule i r p adds a ASRule.rule to a Datalog.Program with the assumption that it will not change the nature of any predicate (that is making it change from extensional to intensional). If i is set to true, then the rule concerns an intensional predicate. If it is set to false then it concerns an extensional predicate and the rhs of the rule should be empty.
remove_rule id pred_id p returns the program p from which the rule with id id has been removed. It is assumed that the head of this rule is the predicate symbol of id pred_id.
IMPORTANT: This function only deals with rules introducing intensional predicate, because it is used when a constant is given several interpretations in a lexicon.
get_fresh_rule_id prog returns a pair (i,prog') where i is a frech rule identifier and prog' only differs from prog by stating this rule identifier is now available
get_fresh_cst_id name prog returns a pair (id,prog') where id is constant identifier associated to name and prog' only differs from prog by stating this identifier is now available and is associated with name.
add_pred_sym name p returns a pair (p_id,p') where p_id is a predicate id for the predicate symbol name and p' is p with recording the relation between name and p_id. If name is already a predicate symbol of p, then p_id is its id and p' is p. p' differs from p only with the association between name and p_id.
val build_forest :
?query:Datalog_AbstractSyntax.AbstractSyntax.Predicate.predicate ->
Predicate.PremiseSet.t Predicate.PredicateMap.t ->
program ->
int Containers.SharedForest.SharedForest.forest list