test/souffle/convert.py
def process_relation_decl(relationdecl, files, preprocess):
    """Process a relation declaration and emit output to files"""
    id = getField(relationdecl, "Identifier")
    params = getListField(relationdecl, "Parameter", "ParameterList")
    if preprocess:
        relname = register_relation(id.value)
        return
    relname = relation_name(id.value)
    paramdecls = map(convert_decl_param, params)
    role = "input " if relations[relname] else ""
    print(relationdecl.tree_str())
    if getOptField(getField(relationdecl, "OUTPUT_DEPRECATED_opt"), "OUTPUT_DEPRECATED") != None or outrelations[relname]:
        role = "output "
    files.output(role + "relation " + relname + "(" + ", ".join(paramdecls) + ")")
Process a relation declaration and emit output to files
Process a relation declaration and emit output to files
Process a relation declaration and emit output to files
def process_relation_decl(relationdecl, files, preprocess):
    id = getField(relationdecl, "Identifier")
    params = getListField(relationdecl, "Parameter", "ParameterList")
    if preprocess:
        relname = register_relation(id.value)
        return
    relname = relation_name(id.value)
    paramdecls = map(convert_decl_param, params)
    role = "input " if relations[relname] else ""
    print(relationdecl.tree_str())
    if getOptField(getField(relationdecl, "OUTPUT_DEPRECATED_opt"), "OUTPUT_DEPRECATED") != None or outrelations[relname]:
        role = "output "
    files.output(role + "relation " + relname + "(" + ", ".join(paramdecls) + ")")
def process_relation_decl ( relationdecl , files , preprocess ) : id = getField ( relationdecl , "Identifier" ) params = getListField ( relationdecl , "Parameter" , "ParameterList" ) if preprocess : relname = register_relation ( id . value ) return relname = relation_name ( id . value ) paramdecls = map ( convert_decl_param , params ) role = "input " if relations [ relname ] else "" print ( relationdecl . tree_str ( ) ) if getOptField ( getField ( relationdecl , "OUTPUT_DEPRECATED_opt" ) , "OUTPUT_DEPRECATED" ) != None or outrelations [ relname ] : role = "output " files . output ( role + "relation " + relname + "(" + ", " . join ( paramdecls ) + ")" )
Process a relation declaration and emit output to files
Process a relation declaration and emit output to files
"""Process a relation declaration and emit output to files"""
relationdecl
files
preprocess