예제 #1
0
def check_theory(preconds_only=False):
    assumes, asserts, macros = get_assumes_and_asserts(preconds_only)

    errs = []
    for logic in im.logics():
        try:
            if logic == 'epr':
                unstrat, bad_interpreted = get_unstratified_funs(
                    assumes, asserts, macros)
                if unstrat or bad_interpreted:
                    report_epr_error(unstrat, bad_interpreted)
            else:
                for a in chain(assumes, macros):
                    check_can_assume(logic, *a)

                for a in asserts:
                    check_can_assert(logic, *a)
            return
        except iu.IvyError as err:
            errs.append(err)

    # if we got here, all logics had errors

    if len(errs) == 1:
        raise errs[0]

    raise iu.ErrorList(errs)
예제 #2
0
파일: ivy_theory.py 프로젝트: yotamfe/ivy
def check_theory(preconds_only=False):
    assumes,asserts,macros = get_assumes_and_asserts(preconds_only)

    errs = []
    for logic in im.logics():
        try:
            if logic == 'epr':
                unstrat,bad_interpreted = get_unstratified_funs(assumes,asserts,macros)
                if unstrat or bad_interpreted:
                    report_epr_error(unstrat,bad_interpreted)
            else:
                for a in chain(assumes,macros):
                    check_can_assume(logic,*a)

                for a in asserts:
                    check_can_assert(logic,*a)
            return
        except iu.IvyError as err:
            errs.append(err)

    # if we got here, all logics had errors

    if len(errs) == 1:
        raise errs[0]

    raise iu.ErrorList(errs)
예제 #3
0
파일: ivy_theory.py 프로젝트: odedp/ivy
def check_theory():
    assumes, asserts = get_assumes_and_asserts()
    unstrat = get_unstratified_funs(assumes, asserts)

    errs = []
    for logic in im.logics():
        try:
            for a in assumes:
                check_can_assume(logic, *a, unstrat=unstrat)

            for a in asserts:
                check_can_assert(logic, *a, unstrat=unstrat)
            return
        except iu.IvyError as err:
            errs.append(err)

    # if we got here, all logics had errors

    if len(errs) == 1:
        raise errs[0]

    raise iu.ErrorList(errs)
예제 #4
0
def check_theory():
    assumes, asserts = get_assumes_and_asserts()
    unstrat = get_unstratified_funs(assumes, asserts)

    errs = []
    for logic in im.logics():
        try:
            for a in assumes:
                check_can_assume(logic, *a, unstrat=unstrat)

            for a in asserts:
                check_can_assert(logic, *a, unstrat=unstrat)
            return
        except iu.IvyError as err:
            errs.append(err)

    # if we got here, all logics had errors

    if len(errs) == 1:
        raise errs[0]

    raise iu.ErrorList(errs)
예제 #5
0
def check_fragment(preconds_only=False):
    if 'fo' not in im.logics():
        assumes, asserts, macros = get_assumes_and_asserts(preconds_only)
        check_feu(assumes, asserts, macros)