Exemple #1
0
def run_pa2checker(ontology_values):
    pa2checker.revert_checker_source()

    for ontology_value, classes in ontology_values.iteritems():
        pa2checker.insert_ontology_value(ontology_value)
        pa2checker.update_ontology_utils(ontology_value, classes)
    common.recompile_checker_framework()
Exemple #2
0
def convert_2_ontology_value(ontology_set):
    """ 1. clean up the ontology source code back to unchanged git version
        2. takes the ontology_set, and insert elements into ontology source as new ontologies
        3. re-compile ontology to make sure the insertions doesn't break the compilation
    """
    pa2checker.revert_checker_source()
    for new_ontology in ontology_set:
        pa2checker.insert_ontology_value(new_ontology)
    common.recompile_checker_framework()
Exemple #3
0
def type_mappings_to_rules(json_file):
    with open(json_file) as data_file:
        data = json.load(data_file)

    for mapping in data["type_mappings"]:
        ontology_value = mapping["ontology_value"]
        java_types = mapping["java_types"]
        pa2checker.insert_ontology_value(ontology_value)
        pa2checker.update_ontology_utils(ontology_value, java_types)

    common.recompile_checker_framework()
def main():
    annotation = "Disco"
    insert_ontology_value(annotation)
    update_ontology_utils(annotation,
                          ["java.util.Collection", "java.util.LinkedList"])
    common.recompile_checker_framework()