Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat_integrity: added check integrity: functions should be present in… #98

Closed
wants to merge 49 commits into from

Conversation

co0ll3r
Copy link
Collaborator

@co0ll3r co0ll3r commented Mar 17, 2021

#72
Now it has two checks:

  1. Search for a provided function in PU steps if function found then return its pID.
  2. In PU relations takes every second pID of Relation and in steps checks that it Endpoint

Could you please check am I on a right way and tell about test fail?
WIP

  • fix error when CAD functions replaced with new variables
  • fix negative CAD tests where relations are not broken
  • fix small bugs in tests like Divider

@co0ll3r co0ll3r requested a review from ryukzak March 17, 2021 16:56
Copy link
Owner

@ryukzak ryukzak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are on the right way.

test/NITTA/Model/ProcessorUnits/Tests/IntegrityCheck.hs Outdated Show resolved Hide resolved
test/NITTA/Model/ProcessorUnits/Tests/IntegrityCheck.hs Outdated Show resolved Hide resolved
test/NITTA/Model/ProcessorUnits/Tests/IntegrityCheck.hs Outdated Show resolved Hide resolved
test/NITTA/Model/ProcessorUnits/Tests/IntegrityCheck.hs Outdated Show resolved Hide resolved
test/NITTA/Model/ProcessorUnits/Tests/IntegrityCheck.hs Outdated Show resolved Hide resolved
test/NITTA/Model/ProcessorUnits/Tests/IntegrityCheck.hs Outdated Show resolved Hide resolved
test/NITTA/Model/ProcessorUnits/Tests/IntegrityCheck.hs Outdated Show resolved Hide resolved
test/NITTA/Model/ProcessorUnits/Tests/IntegrityCheck.hs Outdated Show resolved Hide resolved
@ryukzak ryukzak linked an issue Mar 30, 2021 that may be closed by this pull request
@co0ll3r co0ll3r requested a review from ryukzak March 31, 2021 02:13
Copy link
Owner

@ryukzak ryukzak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And negative tests with BrokenPU

src/NITTA/Model/IntegrityCheck.hs Outdated Show resolved Hide resolved
src/NITTA/Model/IntegrityCheck.hs Outdated Show resolved Hide resolved
src/NITTA/Model/IntegrityCheck.hs Outdated Show resolved Hide resolved
src/NITTA/Model/IntegrityCheck.hs Outdated Show resolved Hide resolved
src/NITTA/Model/IntegrityCheck.hs Outdated Show resolved Hide resolved
src/NITTA/Model/IntegrityCheck.hs Outdated Show resolved Hide resolved
src/NITTA/Model/IntegrityCheck.hs Outdated Show resolved Hide resolved
checkRel (v1, v2) = case eps_ M.!? v1 of
Just _ | Just (InstructionStep _) <- ins_ M.!? v2 -> [True]
_ -> []
in and $ concatMap checkRel fromRelation
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not like in checkIntermidiateToEndpointRelation?

src/NITTA/Synthesis/Explore.hs Outdated Show resolved Hide resolved
when (null vsRemain) $ do
fPID <- scheduleFunction (0 ... sup epAt) function
establishVerticalRelations binds fPID
establishVerticalRelations fPID (endpoints ++ endpoints')
let low = eps ++ map pID (relatedEndpoints process_ $ variables function)
establishVerticalRelations fPID low
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these hlint suggestions are for me.

Copy link
Owner

@ryukzak ryukzak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We close to the finish line here, but I found one general issue: we don't check relations with CADSteps.

So we need to end our work here and after rebase: #107

@@ -64,6 +64,8 @@ data Broken v x t = Broken
, -- |lost source endpoint due synthesis
lostEndpointSource :: Bool
, wrongAttr :: Bool
, -- | lost vertical relation
lostVerticalRelation :: Bool
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Split it into different types of error:

  • function without endpoints
  • endpoint without function
  • instruction without endpoint
  • endpoint without instruction
  • now all function variables covered by endpoints
  • etc

src/NITTA/Model/IntegrityCheck.hs Outdated Show resolved Hide resolved
src/NITTA/Model/IntegrityCheck.hs Outdated Show resolved Hide resolved
src/NITTA/Model/IntegrityCheck.hs Outdated Show resolved Hide resolved
test/NITTA/Model/ProcessorUnits/Broken/Tests.hs Outdated Show resolved Hide resolved
src/NITTA/Utils.hs Show resolved Hide resolved
@co0ll3r co0ll3r force-pushed the 72-integrity-check branch from d537fc2 to 02bf39c Compare May 23, 2021 17:53
@ryukzak
Copy link
Owner

ryukzak commented Mar 7, 2022

Work finished in: #202

@ryukzak ryukzak closed this Mar 7, 2022
@ryukzak
Copy link
Owner

ryukzak commented Mar 7, 2022

Work finished here: #202

@ryukzak ryukzak deleted the 72-integrity-check branch March 7, 2022 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add integrity check of a scheduled computational process into tests
2 participants