nickovic / rtamt

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

Remove redundant intermediate class variables in STL dense time visitor #127

Closed TomyYamy closed 2 years ago

TomyYamy commented 2 years ago

There are several redundant variable like,

    sample_return = []
    self.next = -float("inf")   #TODO don't use self.next

https://github.com/nickovic/rtamt/blob/01ec2fcc0f19c347e2590a4d5b588bfcc155ef5c/rtamt/operation/stl/dense_time/offline/ast_visitor.py#L476-L490

I know it is because originally it is implemented from online. but for offline it is redundant. we may remove this.

nickovic commented 2 years ago

Removed the redundant variables from offline operations (discrete and dense time).

nickovic commented 2 years ago

There is the need to remove the redundant variables in the proper branch

TomyYamy commented 2 years ago

@nickovic Please proceed it on the top of semantics-refactoring. rtamt/operation/stl/dense_time/offline/ast_visitor.py

TomyYamy commented 2 years ago

@nickovic I know you did it in ast-refactoring a5c7ba5120f2d5d87ff7fc6ca40b93b20b9e7385 However I removed the offline operator itself, it did not go to new refactoring branch. Could you please do that again in here? https://github.com/nickovic/rtamt/blob/d330d4ff88865153fc62d104bacbdba48f444dbf/rtamt/operation/stl/dense_time/offline/ast_visitor.py

TomyYamy commented 2 years ago

We are done.