Skip to content

#368 Implement cif2dmm

Albert Hofkamp requested to merge 368-2-cif2dmm into develop

Rewritten from scratch. Extracts CIF object relations from a specification, in particular from plants and input variables to invariants and requirement automata, through shared events, and accessed locations and variables.

As the theory isn't developed beyond normal automata, much of the implementation was guided by the spirit of the math and the previous attempt. As such, it would be helpful if @mgoorden7u4 could have a look at it.

Some notes about the submitted files:

  • Code is in oee.cif.multilevel as that it is part of that application.

  • The pre-checker should only check for cif2dmm requirements, not sure abut "locations references must be to plant locations".

    • While it is no doubt a sane rule, I am not sure it is strictly a requirement. Other code simply ignores all requirement automata locations, which has the same doubts of course.
    • The pre-checker is not collecting problems, it simply throws on the first found problem. The reason for that is that this checker needs to be integrated in the multilevel application eventually together with eg datasynthesis pre-conditions. Also, At the time of writing a more modular prechecker was being created, it seemed a waste of time to finish this
  • Cif2Dmm is the main program of the sub-routine, and is also the result (the 4 DMM variables at the top).

    • It collects references by searching through parts of the specification using the the Collector class.
    • The FoundObjects class stores the all relevant CIF elements (events, locations, variables) in an array to obtain a unique index for each element, and keeps BitSets of "referenced and possibly shared" references to such elements from "referring" elements (automata and invariants).
    • All kinds of objects are all thrown into one heap, as code is working with the bitsets.
    • Once the relations are found, constructing product systems is simple in FoundObjects.partitionPlantsToProductSystems().
    • And then it is time to construct the DMMs from the bitsets. I opted for splitting the relations so the rows and columns of a DMM have only one kind of CIF element. I didn't bother removing empty rows or columns, not sure if that is needed.

Closes #368 (closed)

Merge request reports