verivital / hyst

HyST: A Source Transformation and Translation Tool for Hybrid Automaton Models
http://verivital.com/hyst/
Other
15 stars 18 forks source link

Exception in Hyst while exporting 'morbidostat' example #49

Closed MaxGaukler closed 5 years ago

MaxGaukler commented 5 years ago
$ java -jar src/Hyst.jar -t spaceex '' -i examples/morbidostat/morbidostat.xml  -verbose
Verbose mode printing enabled.

Exception in Hyst while exporting.
BaseComponent MediaPump_1: Variables with defined flows in mode 'MPon' ([OD, tmut, t1]) differ from mode 'Mutate' ([tmut])
Stack trace from exception:
com.verivital.hyst.ir.AutomatonValidationException: BaseComponent MediaPump_1: Variables with defined flows in mode 'MPon' ([OD, tmut, t1]) differ from mode 'Mutate' ([tmut])
    at com.verivital.hyst.ir.base.BaseComponent.validate(Unknown Source)
    at com.verivital.hyst.ir.network.ComponentInstance.validate(Unknown Source)
    at com.verivital.hyst.ir.network.NetworkComponent.validate(Unknown Source)
    at com.verivital.hyst.importer.ConfigurationMaker.instantiateComponentFromTemplate(Unknown Source)
    at com.verivital.hyst.importer.ConfigurationMaker.fromSpaceEx(Unknown Source)
    at com.verivital.hyst.main.Hyst.runCommandLine(Unknown Source)
    at com.verivital.hyst.main.Hyst.run(Unknown Source)
    at com.verivital.hyst.main.Hyst.runWithArguments(Unknown Source)
    at com.verivital.hyst.main.Hyst.main(Unknown Source)
stanleybak commented 5 years ago

@ttj and @LuanVietNguyen , any idea for this? It looks to me like the model is indeed wrong (some modes define more flows than other modes).

The mutate mode has: <flow>tmut' == 1</flow> whereas the MPon mode has: <flow>OD' == ODderiv &amp;&amp; tmut' == 1&amp;&amp; t1' ==1</flow>

My suggestion would be to delete this model from the examples.

Here's the commit where it was added (seems related to the stateflow converter): https://github.com/verivital/hyst/pull/13/commits/ef8f4d3ab62bbdc51ae1acf2d8cbd910b15272b6

MaxGaukler commented 5 years ago

fixed by 7166d4539dacfca31798fe7ce636b6d6dc4e2603 (which removed the problematic model)