예제 #1
0
def parse(acacia_ltl_text: str, acacia_part_text: str, logger: Logger) -> (list, list, dict):
    acacia_ltl_text = _add_spec_unit_if_necessary(acacia_ltl_text)

    input_signals, output_signals = _parse_part(acacia_part_text)
    data_by_unit = dict(acacia_parser.parse(acacia_ltl_text, lexer=acacia_lexer))

    known_signals = input_signals + output_signals
    for (assumptions, guarantees) in data_by_unit.values():
        error = check_unknown_signals_in_properties(assumptions + guarantees, known_signals)

        if error:
            logger.error(error)
            return None

    return input_signals, output_signals, data_by_unit
예제 #2
0
def parse(acacia_ltl_text:str, acacia_part_text:str)\
        -> (Iterable[Signal],Iterable[Signal],dict):
    """ :return: inputs, outputs, dict{unit_name -> (assumptions,guarantees)} """
    acacia_ltl_text = _add_spec_unit_if_necessary(acacia_ltl_text)

    input_signals, output_signals = _parse_part(acacia_part_text)
    data_by_unit = dict(acacia_parser.parse(acacia_ltl_text, lexer=acacia_lexer))

    known_signals = input_signals + output_signals
    for (assumptions,guarantees) in data_by_unit.values():
        error = check_unknown_signals_in_properties(assumptions+guarantees, known_signals)

        if error:
            logging.error(error)
            return None

    return input_signals, output_signals, data_by_unit
예제 #3
0
def parse(acacia_ltl_text: str, acacia_part_text: str,
          logger: Logger) -> (list, list, dict):
    acacia_ltl_text = _add_spec_unit_if_necessary(acacia_ltl_text)

    input_signals, output_signals = _parse_part(acacia_part_text)
    data_by_unit = dict(
        acacia_parser.parse(acacia_ltl_text, lexer=acacia_lexer))

    known_signals = input_signals + output_signals
    for (assumptions, guarantees) in data_by_unit.values():
        error = check_unknown_signals_in_properties(assumptions + guarantees,
                                                    known_signals)

        if error:
            logger.error(error)
            return None

    return input_signals, output_signals, data_by_unit
예제 #4
0
def parse(acacia_ltl_text:str, acacia_part_text:str)\
        -> (Iterable[Signal],Iterable[Signal],dict):
    """ :return: inputs, outputs, dict{unit_name -> (assumptions,guarantees)} """
    acacia_ltl_text = _add_spec_unit_if_necessary(acacia_ltl_text)

    input_signals, output_signals = _parse_part(acacia_part_text)
    data_by_unit = dict(
        acacia_parser.parse(acacia_ltl_text, lexer=acacia_lexer))

    known_signals = input_signals + output_signals
    for (assumptions, guarantees) in data_by_unit.values():
        error = check_unknown_signals_in_properties(assumptions + guarantees,
                                                    known_signals)

        if error:
            logging.error(error)
            return None

    return input_signals, output_signals, data_by_unit