Datalog.ASRuletype rule = Datalog_AbstractSyntax.AbstractSyntax.Rule.rule = {id : int;lhs : Datalog_AbstractSyntax.AbstractSyntax.Predicate.predicate;e_rhs : (Datalog_AbstractSyntax.AbstractSyntax.Predicate.predicate * int) list;represents the extensionnal predicates of the rule. The int represents the position in the rule
i_rhs : (Datalog_AbstractSyntax.AbstractSyntax.Predicate.predicate * int) list;represents the intensionnal predicates of the rule. The int represents the position in the rule
i_rhs_num : int;stores the number of intensional predicates occurring in the rule
*)rhs_num : int;stores the number of predicates occurring in the rule body
*)}val pp :
?with_position:bool ->
?with_id:bool ->
?with_arity:bool ->
Datalog_AbstractSyntax.AbstractSyntax.Predicate.PredIdTable.table ->
Datalog_AbstractSyntax.ConstGen.Table.table ->
Stdlib.Format.formatter ->
rule ->
unitval proto_rule_to_rule :
Datalog_AbstractSyntax.AbstractSyntax.Proto_Rule.t ->
DatalogLib.Datalog_AbstractSyntax.AbstractSyntax.Predicate.PredIds.t ->
ruleval extend_head_id_map_to_rules :
Datalog_AbstractSyntax.AbstractSyntax.Predicate.pred_id ->
rule ->
Rules.t
DatalogLib.Datalog_AbstractSyntax.AbstractSyntax.Predicate.PredIdMap.t ->
Rules.t
DatalogLib.Datalog_AbstractSyntax.AbstractSyntax.Predicate.PredIdMap.tset_new_id id rule returns a rule similar to rule except that its id is id
val set_new_id_from_gen :
rule ->
UtilsLib.IdGenerator.IntIdGen.t ->
rule * UtilsLib.IdGenerator.IntIdGen.tset_new_id_from_gen returns pair (rule',from_gen') wherer rule' is a rule similar to rule excepts that it has a new id generated from from_gen generator, and the latter has been updated to from_gen'.
val get_variables_in_rule :
rule ->
DatalogLib.Datalog_AbstractSyntax.AbstractSyntax.Predicate.TermSet.tget_variables_in_rule rule returns the set of variables in the rule rule
val get_subgoal :
rule ->
int ->
Datalog_AbstractSyntax.AbstractSyntax.Predicate.predicate * intget_subgoal rule i returns the predicate at the position i in the body of the rule rule