Source Code: Pure Datalog rules (no negation, no structured arguments), range restricted/safe, in Prolog style, e.g. p(X,Y) :- a(X,Z), b(Z,Y). No predicates with several arities are allowed. EDB predicates must be declared: db (int, int). is the name of the EDB predicate, the arguments are the types of the arguments. Undeclared EDB predicates are automatically generated with integer types. Also the answer predicate must be declared: answer(). The following types are currently supported: int id (corresponds to the Prolog atom type and is mapped to int) string (is mapped to int) The parser also supports float but the code generation should fail or result in strange behaviour. Furthermore, at the moment only predicates with at most two arguments are fully supported. Load translator_main.pl into SWI Prolog, then call translate(File, BottomUpMethod, TransformMethod). File is the relative path (with file suffix) of the source file, BottomUpMethod is either oldPush or wlpPush (in future, additionally at least a seminaive bottom-up algorithm should be provided), and TransformMethod is a method for rule transformation: - 'standard' basically leaves the rules unchanged; - 'query_oriented' applies a very simple and naive (but fast) query orientation: all predicates that cannot be reached from the query, ignoring bound arguments, are discarded; - 'sldmagic' does the sldmagic transformation