add characteristic predicates to InputExpr and OutputExpr

This commit is contained in:
Alvaro Muñoz
2024-02-13 11:24:16 +01:00
parent 3c5358c381
commit cc3f2eed68
2 changed files with 7 additions and 9 deletions

View File

@@ -96,11 +96,13 @@ class OutputsStmt extends Statement instanceof YamlMapping {
}
}
// TODO: Needs a characteristic predicate otherwise anything is an output expression
class InputExpr extends Expression instanceof YamlString { }
class InputExpr extends Expression instanceof YamlString {
InputExpr() { exists(InputsStmt inputs | inputs.(YamlMapping).maps(this, _)) }
}
// TODO: Needs a characteristic predicate otherwise anything is an output expression
class OutputExpr extends Expression instanceof YamlString { }
class OutputExpr extends Expression instanceof YamlString {
OutputExpr() { exists(OutputsStmt outputs | outputs.(YamlMapping).maps(_, this)) }
}
/**
* A Job is a collection of steps that run in an execution environment.

View File

@@ -35,11 +35,7 @@ module Completion {
override string toString() { result = "BooleanCompletion(" + value + ")" }
override predicate isValidForSpecific(AstNode e) {
none()
// TODO: add support for conditional expressions?
//e = any(ConditionalExpression c).getCondition()
}
override predicate isValidForSpecific(AstNode e) { none() }
override BooleanSuccessor getAMatchingSuccessorType() { result.getValue() = value }