pengtianyue / Solvay_test

0 stars 1 forks source link

Bugs found on ModelBuilder #18

Closed pengtianyue closed 8 years ago

pengtianyue commented 8 years ago
  1. It does not substitute defined aliases/Device ID when parsing. (There is no problem on the PlantUML_Lexer side, the lexer substitutes aliases well.)
  2. state.attrs returns a complete sentence in unicode, but transition.attrs returns a list of unicode and each item in the list is a single "letter" within that attribute.

Example (in S_EMC_CHARGE.puml) below:

...
!define FLOW_VLV1 'CV-4289'
Precondition: Open FLOW_VLV1 in AUTO
Precondition --> Set_EM_Close: Verify FLOW_VLV1 opened
...

Run "PlantUML_Lexer.py":
...
Token.StateAttr     Open 'CV-4289' in AUTO
...
Token.TransAttr     Verify 'CV-4289' opened
...

Run "ModelBuilder.py":
...
>>>state.attrs
[u'Open FLOW_VLV1 in AUTO']
>>>transition.attrs 
[u'V', u'e', u'r', u'i', u'f', u'y', u' ', u'F', u'L', u'O', u'W', u'_', u'V', u'L', u'V', u'1', u' ', u'o', u'p', u'e', u'n', u'e', u'd']
mekcrab commented 8 years ago

Fixed - states and transitions hold attribute as a list. The list can be a combination of AttributeTypes or string, ideally will be AttributeTypes only.

mekcrab commented 8 years ago

pengtianyue says: got a strange output from ModeilBuilder. if there is no 'and' in the attribute, it's running well. but if there is 'and', it returns the same issue we had on issue#18 in github.

mekcrab commented 8 years ago

Composite attributes (i.e. AND, OR of multiple attributes) are work in progress, see issue #9.

mekcrab commented 8 years ago

ModelBuilder major updates made on test_solver_paths branch that handle above bugs. Transition compound expression already tracked in issue #9, closing issue.