chc.cmdline.juliet.JulietTestScoring module
Utility functions for printing a score report for a Juliet Test.
- chc.cmdline.juliet.JulietTestScoring.classify_tgt_safecontrol(po: Optional[CFunctionPO], capp: CApplication) str[source]
- chc.cmdline.juliet.JulietTestScoring.classify_tgt_safecontrol_contract_assumption(po: Optional[CFunctionPO], capp: CApplication) str[source]
- chc.cmdline.juliet.JulietTestScoring.classify_tgt_violation(po: Optional[CFunctionPO], capp: CApplication) str[source]
- chc.cmdline.juliet.JulietTestScoring.fill_testsummary(pairs: Dict[str, Dict[str, List[Tuple[JulietPpo, CFunctionPO]]]], d: Dict[str, Dict[str, Dict[str, int]]], capp: CApplication) None[source]
- chc.cmdline.juliet.JulietTestScoring.get_associated_spos(ppo: CFunctionPO, capp: CApplication) List[CFunctionPO][source]
- chc.cmdline.juliet.JulietTestScoring.get_julietppos(testset: JulietTestSetRef) Dict[str, List[JulietPpo]][source]
Returns the reference ppos indexed by filename.
Note: the reference ppos are function agnostic
- chc.cmdline.juliet.JulietTestScoring.get_ppo_pairs(julietppos: Dict[str, List[JulietPpo]], capp: CApplication) Dict[str, Dict[str, List[Tuple[JulietPpo, CFunctionPO]]]][source]
Returns a pairing of reference ppos with actual ppos by function.
- chc.cmdline.juliet.JulietTestScoring.get_testsummary_totals(d: Dict[str, Any]) Dict[str, Dict[str, int]][source]
Returns the totals per category summed over all tests in the testset.
- chc.cmdline.juliet.JulietTestScoring.initialize_testsummary(testset: chc.cmdline.juliet.JulietTestSetRef.JulietTestSetRef, d: Dict[str, Dict[str, Dict[str, int]]]) None[source]
- chc.cmdline.juliet.JulietTestScoring.keymatches(tppo: JulietPpo, ppo: CFunctionPO) bool[source]
Return true if a ppo matches a ppo listed in the test set reference.
A ppo listed in a test set reference is always characterized by the ppo predicate, and may additionally be characterized (if multiple ppo’s with the same predicate appear on the same line) by a set of variable names, one of which has to appear in the ppo, or an expression context.
- chc.cmdline.juliet.JulietTestScoring.testppo_calls_tostring(ppo: CFunctionPO, capp: CApplication) str[source]