ryukzak / nitta

BSD 3-Clause "New" or "Revised" License
21 stars 6 forks source link

Network level integrity check #206

Open ryukzak opened 2 years ago

ryukzak commented 2 years ago

Currently, class ProcessIntegrity is implemented only for process units. We should also check integrity for BusNetwork and, maybe, for TargetSystem.

For that:

Some drafts for early implementation:

, testGroup
    "broken relations integrity check negative coSim"
    -- nittaCoSimTestCase has isLeaf and isComplete, but Relation alright because of CAD
    -- TODO: below cases ignores lost because of CAD steps and failed because simulation
    [ expectFail $ nittaCoSimTestCase "nittaCoSimTestCase lost Endpoints" (maBroken u{lostEndpointRelation = True}) alg
    , expectFail $ nittaCoSimTestCase "nittaCoSimTestCase lost Instruction" (maBroken u{lostInstructionRelation = True}) alg
    , expectFail $ typedLuaTestCase (maBroken def{lostEndpointRelation = True}) pInt "typedLuaTestCase lost Endpoints" lua
    , expectFail $ typedLuaTestCase (maBroken def{lostInstructionRelation = True}) pInt "typedLuaTestCase lost Instruction" lua
    ]
testGroup
  "broken relations integrity check negative fails"
  -- TODO: try lua function without break loop
  [ expectFail $ nittaCoSimTestCase "nittaCoSimTestCase lost Function" (maBroken u{lostFunctionRelation = True}) alg
  , expectFail $ typedLuaTestCase (maBroken def{lostFunctionRelation = True}) pInt "typedLuaTestCase lost Function" lua
  ]