CodyzeDfaOrderEvaluator

class CodyzeDfaOrderEvaluator(val context: EvaluationContext, val hashToMethod: Map<String, String>, dfa: DFA, consideredBases: Set<Node>, nodeToRelevantMethod: Map<Node, Set<String>>, thisPositionOfNode: Map<Node, Int> = mapOf(), consideredResetNodes: Set<Node>, eliminateUnreachableCode: Boolean = true) : DFAOrderEvaluator(source)

Codyze-specific implementation of the DFAOrderEvaluator. Its main purpose is to collect the findings in case of violations to the order.

Constructors

Link copied to clipboard
constructor(context: EvaluationContext, hashToMethod: Map<String, String>, dfa: DFA, consideredBases: Set<Node>, nodeToRelevantMethod: Map<Node, Set<String>>, thisPositionOfNode: Map<Node, Int> = mapOf(), consideredResetNodes: Set<Node>, eliminateUnreachableCode: Boolean = true)

Properties

Link copied to clipboard
val consideredBases: Set<Node>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val dfa: DFA
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open override fun actionAcceptingTermination(base: String, fsm: DFA, interproceduralFlow: Boolean)

Contains the functionality which is executed if the DFA terminated in an accepting state for the given base. This means that all required statements have been executed for base so far. The fsm holds the execution trace found by the analysis.

Link copied to clipboard
open override fun actionMissingTransitionForNode(node: Node, fsm: DFA, interproceduralFlow: Boolean)

Collects a finding if the node makes an operation which violates the desired order.

Link copied to clipboard
open override fun actionNonAcceptingTermination(base: String, fsm: DFA, interproceduralFlow: Boolean)

Collects the finding in the AnalysisContext because the DFA finished analyzing the function but the base did not terminate in an accepting state (i.e., some operations are missing).

Link copied to clipboard
fun evaluateOrder(startNode: Node, stopOnWrongBase: Boolean): Boolean
Link copied to clipboard
fun getBaseOfNode(node: CallExpression): Node?