nickovic / rtamt

Specification-based real-time monitoring library
BSD 3-Clause "New" or "Revised" License
50 stars 20 forks source link

Handling unit with Fraction #148

Closed TomyYamy closed 2 years ago

TomyYamy commented 2 years ago

We need to consider how to deal with unit in semantic layer. So far, the test code does not work. rtamt/tests/python/semantics/test_semantics.py

    rtamt/tests/python/ast$ python2 test_stl_ast_parser.py 

    ======================================================================
    ERROR: test_timed_once_2 (__main__.TestStlAstParser)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "test_stl_ast_parser.py", line 364, in test_timed_once_2
        self.assertEqual(self.ast.ast.name, self.ast.spec, 'Once assertion')
    AttributeError: 'Ast' object has no attribute 'ast'

    ======================================================================
    ERROR: test_timed_once_3 (__main__.TestStlAstParser)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "test_stl_ast_parser.py", line 372, in test_timed_once_3
        self.assertEqual(self.ast.ast.name, self.ast.spec, 'Once assertion')
    AttributeError: 'Ast' object has no attribute 'ast'

    ----------------------------------------------------------------------
    Ran 40 tests in 0.071s

    FAILED (errors=2)
TomyYamy commented 2 years ago

We expect it should done in some of abstract evaluator in here. /rtamt/rtamt/operation/*_evaluator.py

TomyYamy commented 2 years ago

We think maybe not transfer() We will keep original ast and do it in semantics layer.

TomyYamy commented 2 years ago

We are done.