Giter Site home page Giter Site logo

Comments (3)

TomyYamy avatar TomyYamy commented on August 13, 2024

I did it in rename_interpreter branch.

from rtamt.

TomyYamy avatar TomyYamy commented on August 13, 2024

test has small issues. but it does not come from the refactoring.

rtamt$ python2 -m unittest discover tests/
..................................E....E.........E.....................................................................................................F.................F............................................................[[0, -4.2], [2.1, -4.2]]
.[[], [[Fraction(5, 1), 1.0], [5.3, -1.0], [6.75, 0.0], [7.5, 3.0], [7.75, 4.0]], [[Fraction(9, 1), 3.0]]]
.[[0, -4.0], [1, -4.0], [2, -4.0], [3, -3.0], [4, -3.0]]
.[98.0, -3.0, -4.0, -4.0, -3.0]
......................................................................................................................................................................................................................................................................F......................E....................................................
======================================================================
ERROR: test_always (cpp.test_stl_reset_cpp.TestSTLReset)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/mnt/data/repos/rtamt/tests/cpp/test_stl_reset_cpp.py", line 481, in test_always
    out = spec.update(0, [['req', 1.1]])
  File "rtamt/spec/abstract_specification.py", line 231, in update
    self.online_interpreter.set_ast(self.ast)
  File "rtamt/operation/abstract_online_interpreter.py", line 30, in set_ast
    self.visitAst(self.ast)
  File "rtamt/ast/visitor/abstract_ast_visitor.py", line 33, in visitAst
    out.append(self.visit(spec, *args, **kwargs))
  File "rtamt/ast/visitor/stl/ast_visitor.py", line 33, in visit
    result = super(StlAstVisitor, self).visit(node, *args, **kwargs)
  File "rtamt/ast/visitor/ltl/ast_visitor.py", line 56, in visit
    result = self.visitAlways(node, *args, **kwargs)
  File "rtamt/operation/stl/discrete_time/online/cpp/ast_visitor.py", line 108, in visitAlways
    raise STLNotImplementedException('Always operator is not implemented in the STL online monitor.')
STLNotImplementedException: Always operator is not implemented in the STL online monitor.

======================================================================
ERROR: test_eventually (cpp.test_stl_reset_cpp.TestSTLReset)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/mnt/data/repos/rtamt/tests/cpp/test_stl_reset_cpp.py", line 463, in test_eventually
    out = spec.update(0, [['req', 5]])
  File "rtamt/spec/abstract_specification.py", line 231, in update
    self.online_interpreter.set_ast(self.ast)
  File "rtamt/operation/abstract_online_interpreter.py", line 30, in set_ast
    self.visitAst(self.ast)
  File "rtamt/ast/visitor/abstract_ast_visitor.py", line 33, in visitAst
    out.append(self.visit(spec, *args, **kwargs))
  File "rtamt/ast/visitor/stl/ast_visitor.py", line 33, in visit
    result = super(StlAstVisitor, self).visit(node, *args, **kwargs)
  File "rtamt/ast/visitor/ltl/ast_visitor.py", line 54, in visit
    result = self.visitEventually(node, *args, **kwargs)
  File "rtamt/operation/stl/discrete_time/online/cpp/ast_visitor.py", line 103, in visitEventually
    raise STLNotImplementedException('Eventually operator is not implemented in the STL online monitor.')
STLNotImplementedException: Eventually operator is not implemented in the STL online monitor.

======================================================================
ERROR: test_precedes_0_1 (cpp.test_stl_reset_cpp.TestSTLReset)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/mnt/data/repos/rtamt/tests/cpp/test_stl_reset_cpp.py", line 574, in test_precedes_0_1
    out = spec.update(0, [['req', 1.1], ['gnt', 2.2]])
  File "rtamt/spec/abstract_specification.py", line 231, in update
    self.online_interpreter.set_ast(self.ast)
  File "rtamt/operation/abstract_online_interpreter.py", line 30, in set_ast
    self.visitAst(self.ast)
  File "rtamt/ast/visitor/abstract_ast_visitor.py", line 33, in visitAst
    out.append(self.visit(spec, *args, **kwargs))
  File "rtamt/ast/visitor/stl/ast_visitor.py", line 19, in visit
    result = self.visitTimedUntil(node, *args, **kwargs)
  File "rtamt/operation/stl/discrete_time/online/cpp/ast_visitor.py", line 167, in visitTimedUntil
    raise STLNotImplementedException('Bounded until operator not implemented in STL online monitor.')
STLNotImplementedException: Bounded until operator not implemented in STL online monitor.

======================================================================
ERROR: test_until_0_1 (python.semantics.test_stl_dense_time_offline_evaluation.TestSTLDenseTimeOfflineEvaluation)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/mnt/data/repos/rtamt/tests/python/semantics/test_stl_dense_time_offline_evaluation.py", line 1562, in test_until_0_1
    out = interpreter.evaluate(dataset)
  File "rtamt/operation/abstract_dense_time_offline_interpreter.py", line 28, in evaluate
    rob = self.visitAst(self.ast)
  File "rtamt/ast/visitor/abstract_ast_visitor.py", line 33, in visitAst
    out.append(self.visit(spec, *args, **kwargs))
  File "rtamt/ast/visitor/stl/ast_visitor.py", line 19, in visit
    result = self.visitTimedUntil(node, *args, **kwargs)
  File "rtamt/operation/stl/dense_time/offline/ast_visitor.py", line 698, in visitTimedUntil
    sample_return = until_timed_operation(sample_left, sample_right, begin, end)
  File "rtamt/operation/stl/dense_time/offline/ast_visitor.py", line 361, in until_timed_operation
    out1 = eventually_timed_operation(sample_right, begin, end)
  File "rtamt/operation/stl/dense_time/offline/ast_visitor.py", line 19, in eventually_timed_operation
    out.append([samples[0][0], m[0][1]])
IndexError: deque index out of range

======================================================================
FAIL: test_always_0_1 (python.api.test_stl_dense_time_offline_specification.TestStlDenseTimeOfflineSpecification)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/mnt/data/repos/rtamt/tests/python/api/test_stl_dense_time_offline_specification.py", line 238, in test_always_0_1
    self.assertListEqual(expected, computed, "alw[0,1]")
AssertionError: alw[0,1]

======================================================================
FAIL: test_once_0_1 (python.api.test_stl_dense_time_offline_specification.TestStlDenseTimeOfflineSpecification)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/mnt/data/repos/rtamt/tests/python/api/test_stl_dense_time_offline_specification.py", line 208, in test_once_0_1
    self.assertListEqual(expected, computed, "once[0,1]")
AssertionError: once[0,1]

======================================================================
FAIL: test_eventually_bounded (python.semantics.test_stl_dense_time_offline_evaluation.TestSTLDenseTimeOfflineEvaluation)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/mnt/data/repos/rtamt/tests/python/semantics/test_stl_dense_time_offline_evaluation.py", line 1024, in test_eventually_bounded
    self.assertListEqual(expected, out, "eventually[0,1] offline dense time 1")
AssertionError: eventually[0,1] offline dense time 1

----------------------------------------------------------------------
Ran 571 tests in 0.542s

FAILED (failures=3, errors=4)

from rtamt.

TomyYamy avatar TomyYamy commented on August 13, 2024

I'm done.

from rtamt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.