Sync files and make language specific adjustments.

This commit is contained in:
Michael Nebel
2023-06-21 11:36:33 +02:00
parent 62fc1b641c
commit bddd22f522
10 changed files with 71 additions and 71 deletions

View File

@@ -23,9 +23,9 @@ module Public {
* content type, or a return kind.
*/
class SummaryComponent extends TSummaryComponent {
/** Gets a textual representation of this component used for flow summaries. */
string getAccessStep() {
result = getAccessStepSpecific(this)
/** Gets a textual representation of this component used for MaD models. */
string getMadRepresentation() {
result = getMadRepresentationSpecific(this)
or
exists(ArgumentPosition pos |
this = TParameterSummaryComponent(pos) and
@@ -46,7 +46,7 @@ module Public {
}
/** Gets a textual representation of this summary component. */
string toString() { result = this.getAccessStep() }
string toString() { result = this.getMadRepresentation() }
}
/** Provides predicates for constructing summary components. */
@@ -127,21 +127,21 @@ module Public {
}
/** Gets a textual representation of this stack used for MaD models. */
string getAccessPath() {
string getMadRepresentation() {
exists(SummaryComponent head, SummaryComponentStack tail |
head = this.head() and
tail = this.tail() and
result = tail.getAccessPath() + "." + head.getAccessStep()
result = tail.getMadRepresentation() + "." + head.getMadRepresentation()
)
or
exists(SummaryComponent c |
this = TSingletonSummaryComponentStack(c) and
result = c.getAccessStep()
result = c.getMadRepresentation()
)
}
/** Gets a textual representation of this stack. */
string toString() { result = this.getAccessPath() }
string toString() { result = this.getMadRepresentation() }
}
/** Provides predicates for constructing stacks of summary components. */
@@ -1350,8 +1350,8 @@ module Private {
c.relevantSummary(input, output, preservesValue) and
csv =
c.getCallableCsv() // Callable information
+ input.getAccessPath() + ";" // input
+ output.getAccessPath() + ";" // output
+ input.getMadRepresentation() + ";" // input
+ output.getMadRepresentation() + ";" // output
+ renderKind(preservesValue) + ";" // kind
+ renderProvenance(c) // provenance
)

View File

@@ -22,10 +22,10 @@ DataFlowCallable inject(SummarizedCallable c) { result.asSummarizedCallable() =
/** Gets the parameter position of the instance parameter. */
ArgumentPosition callbackSelfParameterPosition() { result = -1 }
/** Gets the textual representation of a parameter position in the format used for flow summaries. */
/** Gets the textual representation of a parameter position in the format used for MaD models. */
string getParameterPosition(ParameterPosition pos) { result = pos.toString() }
/** Gets the textual representation of an argument position in the format used for flow summaries. */
/** Gets the textual representation of an argument position in the format used for MaD models. */
string getArgumentPosition(ArgumentPosition pos) { result = pos.toString() }
/** Gets the synthesized data-flow call for `receiver`. */
@@ -110,8 +110,8 @@ private string getContentSpecific(Content c) {
c instanceof PointerContent and result = "Dereference"
}
/** Gets the textual representation of the content in the format used for flow summaries. */
string getAccessStepSpecific(SummaryComponent sc) {
/** Gets the textual representation of the content in the format used for MaD models. */
string getMadRepresentationSpecific(SummaryComponent sc) {
exists(Content c | sc = TContentSummaryComponent(c) and result = getContentSpecific(c))
or
exists(ReturnKind rk |

View File

@@ -23,9 +23,9 @@ module Public {
* content type, or a return kind.
*/
class SummaryComponent extends TSummaryComponent {
/** Gets a textual representation of this component used for flow summaries. */
string getAccessStep() {
result = getAccessStepSpecific(this)
/** Gets a textual representation of this component used for MaD models. */
string getMadRepresentation() {
result = getMadRepresentationSpecific(this)
or
exists(ArgumentPosition pos |
this = TParameterSummaryComponent(pos) and
@@ -46,7 +46,7 @@ module Public {
}
/** Gets a textual representation of this summary component. */
string toString() { result = this.getAccessStep() }
string toString() { result = this.getMadRepresentation() }
}
/** Provides predicates for constructing summary components. */
@@ -127,21 +127,21 @@ module Public {
}
/** Gets a textual representation of this stack used for MaD models. */
string getAccessPath() {
string getMadRepresentation() {
exists(SummaryComponent head, SummaryComponentStack tail |
head = this.head() and
tail = this.tail() and
result = tail.getAccessPath() + "." + head.getAccessStep()
result = tail.getMadRepresentation() + "." + head.getMadRepresentation()
)
or
exists(SummaryComponent c |
this = TSingletonSummaryComponentStack(c) and
result = c.getAccessStep()
result = c.getMadRepresentation()
)
}
/** Gets a textual representation of this stack. */
string toString() { result = this.getAccessPath() }
string toString() { result = this.getMadRepresentation() }
}
/** Provides predicates for constructing stacks of summary components. */
@@ -1350,8 +1350,8 @@ module Private {
c.relevantSummary(input, output, preservesValue) and
csv =
c.getCallableCsv() // Callable information
+ input.getAccessPath() + ";" // input
+ output.getAccessPath() + ";" // output
+ input.getMadRepresentation() + ";" // input
+ output.getMadRepresentation() + ";" // output
+ renderKind(preservesValue) + ";" // kind
+ renderProvenance(c) // provenance
)

View File

@@ -193,8 +193,8 @@ private string getContentSpecific(Content c) {
c instanceof MapValueContent and result = "MapValue"
}
/** Gets the textual representation of the content in the format used for flow summaries. */
string getAccessStepSpecific(SummaryComponent sc) {
/** Gets the textual representation of the content in the format used for MaD models. */
string getMadRepresentationSpecific(SummaryComponent sc) {
exists(Content c | sc = TContentSummaryComponent(c) and result = getContentSpecific(c))
}
@@ -203,10 +203,10 @@ private string positionToString(int pos) {
if pos = -1 then result = "this" else result = pos.toString()
}
/** Gets the textual representation of a parameter position in the format used for flow summaries. */
/** Gets the textual representation of a parameter position in the format used for MaD models. */
string getParameterPosition(ParameterPosition pos) { result = positionToString(pos) }
/** Gets the textual representation of an argument position in the format used for flow summaries. */
/** Gets the textual representation of an argument position in the format used for MaD models. */
string getArgumentPosition(ArgumentPosition pos) { result = positionToString(pos) }
/** Holds if input specification component `c` needs a reference. */

View File

@@ -23,9 +23,9 @@ module Public {
* content type, or a return kind.
*/
class SummaryComponent extends TSummaryComponent {
/** Gets a textual representation of this component used for flow summaries. */
string getAccessStep() {
result = getAccessStepSpecific(this)
/** Gets a textual representation of this component used for MaD models. */
string getMadRepresentation() {
result = getMadRepresentationSpecific(this)
or
exists(ArgumentPosition pos |
this = TParameterSummaryComponent(pos) and
@@ -46,7 +46,7 @@ module Public {
}
/** Gets a textual representation of this summary component. */
string toString() { result = this.getAccessStep() }
string toString() { result = this.getMadRepresentation() }
}
/** Provides predicates for constructing summary components. */
@@ -127,21 +127,21 @@ module Public {
}
/** Gets a textual representation of this stack used for MaD models. */
string getAccessPath() {
string getMadRepresentation() {
exists(SummaryComponent head, SummaryComponentStack tail |
head = this.head() and
tail = this.tail() and
result = tail.getAccessPath() + "." + head.getAccessStep()
result = tail.getMadRepresentation() + "." + head.getMadRepresentation()
)
or
exists(SummaryComponent c |
this = TSingletonSummaryComponentStack(c) and
result = c.getAccessStep()
result = c.getMadRepresentation()
)
}
/** Gets a textual representation of this stack. */
string toString() { result = this.getAccessPath() }
string toString() { result = this.getMadRepresentation() }
}
/** Provides predicates for constructing stacks of summary components. */
@@ -1350,8 +1350,8 @@ module Private {
c.relevantSummary(input, output, preservesValue) and
csv =
c.getCallableCsv() // Callable information
+ input.getAccessPath() + ";" // input
+ output.getAccessPath() + ";" // output
+ input.getMadRepresentation() + ";" // input
+ output.getMadRepresentation() + ";" // output
+ renderKind(preservesValue) + ";" // kind
+ renderProvenance(c) // provenance
)

View File

@@ -146,15 +146,15 @@ private string getContentSpecific(Content cs) {
exists(string attr | cs = TAttributeContent(attr) and result = "Attribute[" + attr + "]")
}
/** Gets the textual representation of a summary component in the format used for flow summaries. */
string getAccessStepSpecific(SummaryComponent sc) {
/** Gets the textual representation of a summary component in the format used for MaD models. */
string getMadRepresentationSpecific(SummaryComponent sc) {
exists(Content c |
sc = TContentSummaryComponent(c) and
result = getContentSpecific(c)
)
}
/** Gets the textual representation of a parameter position in the format used for flow summaries. */
/** Gets the textual representation of a parameter position in the format used for MaD models. */
string getParameterPosition(ParameterPosition pos) {
pos.isSelf() and result = "self"
or
@@ -169,7 +169,7 @@ string getParameterPosition(ParameterPosition pos) {
)
}
/** Gets the textual representation of an argument position in the format used for flow summaries. */
/** Gets the textual representation of an argument position in the format used for MaD models. */
string getArgumentPosition(ArgumentPosition pos) {
pos.isSelf() and result = "self"
or

View File

@@ -23,9 +23,9 @@ module Public {
* content type, or a return kind.
*/
class SummaryComponent extends TSummaryComponent {
/** Gets a textual representation of this component used for flow summaries. */
string getAccessStep() {
result = getAccessStepSpecific(this)
/** Gets a textual representation of this component used for MaD models. */
string getMadRepresentation() {
result = getMadRepresentationSpecific(this)
or
exists(ArgumentPosition pos |
this = TParameterSummaryComponent(pos) and
@@ -46,7 +46,7 @@ module Public {
}
/** Gets a textual representation of this summary component. */
string toString() { result = this.getAccessStep() }
string toString() { result = this.getMadRepresentation() }
}
/** Provides predicates for constructing summary components. */
@@ -127,21 +127,21 @@ module Public {
}
/** Gets a textual representation of this stack used for MaD models. */
string getAccessPath() {
string getMadRepresentation() {
exists(SummaryComponent head, SummaryComponentStack tail |
head = this.head() and
tail = this.tail() and
result = tail.getAccessPath() + "." + head.getAccessStep()
result = tail.getMadRepresentation() + "." + head.getMadRepresentation()
)
or
exists(SummaryComponent c |
this = TSingletonSummaryComponentStack(c) and
result = c.getAccessStep()
result = c.getMadRepresentation()
)
}
/** Gets a textual representation of this stack. */
string toString() { result = this.getAccessPath() }
string toString() { result = this.getMadRepresentation() }
}
/** Provides predicates for constructing stacks of summary components. */
@@ -1350,8 +1350,8 @@ module Private {
c.relevantSummary(input, output, preservesValue) and
csv =
c.getCallableCsv() // Callable information
+ input.getAccessPath() + ";" // input
+ output.getAccessPath() + ";" // output
+ input.getMadRepresentation() + ";" // input
+ output.getMadRepresentation() + ";" // output
+ renderKind(preservesValue) + ";" // kind
+ renderProvenance(c) // provenance
)

View File

@@ -165,8 +165,8 @@ private string getContentSetSpecific(ContentSet cs) {
)
}
/** Gets the textual representation of a summary component in the format used for flow summaries. */
string getAccessStepSpecific(SummaryComponent sc) {
/** Gets the textual representation of a summary component in the format used for MaD models. */
string getMadRepresentationSpecific(SummaryComponent sc) {
exists(ContentSet cs | sc = TContentSummaryComponent(cs) and result = getContentSetSpecific(cs))
or
exists(ContentSet cs |
@@ -186,7 +186,7 @@ string getAccessStepSpecific(SummaryComponent sc) {
)
}
/** Gets the textual representation of a parameter position in the format used for flow summaries. */
/** Gets the textual representation of a parameter position in the format used for MaD models. */
string getParameterPosition(ParameterPosition pos) {
exists(int i |
pos.isPositional(i) and
@@ -219,7 +219,7 @@ string getParameterPosition(ParameterPosition pos) {
result = "hash-splat"
}
/** Gets the textual representation of an argument position in the format used for flow summaries. */
/** Gets the textual representation of an argument position in the format used for MaD models. */
string getArgumentPosition(ArgumentPosition pos) {
pos.isSelf() and result = "self"
or

View File

@@ -23,9 +23,9 @@ module Public {
* content type, or a return kind.
*/
class SummaryComponent extends TSummaryComponent {
/** Gets a textual representation of this component used for flow summaries. */
string getAccessStep() {
result = getAccessStepSpecific(this)
/** Gets a textual representation of this component used for MaD models. */
string getMadRepresentation() {
result = getMadRepresentationSpecific(this)
or
exists(ArgumentPosition pos |
this = TParameterSummaryComponent(pos) and
@@ -46,7 +46,7 @@ module Public {
}
/** Gets a textual representation of this summary component. */
string toString() { result = this.getAccessStep() }
string toString() { result = this.getMadRepresentation() }
}
/** Provides predicates for constructing summary components. */
@@ -127,21 +127,21 @@ module Public {
}
/** Gets a textual representation of this stack used for MaD models. */
string getAccessPath() {
string getMadRepresentation() {
exists(SummaryComponent head, SummaryComponentStack tail |
head = this.head() and
tail = this.tail() and
result = tail.getAccessPath() + "." + head.getAccessStep()
result = tail.getMadRepresentation() + "." + head.getMadRepresentation()
)
or
exists(SummaryComponent c |
this = TSingletonSummaryComponentStack(c) and
result = c.getAccessStep()
result = c.getMadRepresentation()
)
}
/** Gets a textual representation of this stack. */
string toString() { result = this.getAccessPath() }
string toString() { result = this.getMadRepresentation() }
}
/** Provides predicates for constructing stacks of summary components. */
@@ -1350,8 +1350,8 @@ module Private {
c.relevantSummary(input, output, preservesValue) and
csv =
c.getCallableCsv() // Callable information
+ input.getAccessPath() + ";" // input
+ output.getAccessPath() + ";" // output
+ input.getMadRepresentation() + ";" // input
+ output.getMadRepresentation() + ";" // output
+ renderKind(preservesValue) + ";" // kind
+ renderProvenance(c) // provenance
)

View File

@@ -103,7 +103,7 @@ SummaryComponent interpretComponentSpecific(AccessPathToken c) {
)
}
/** Gets the textual representation of the content in the format used for flow summaries. */
/** Gets the textual representation of the content in the format used for MaD models. */
private string getContentSpecific(ContentSet cs) {
exists(Content::FieldContent c |
cs.isSingleton(c) and
@@ -111,8 +111,8 @@ private string getContentSpecific(ContentSet cs) {
)
}
/** Gets the textual representation of a summary component in the format used for flow summaries. */
string getAccessStepSpecific(SummaryComponent sc) {
/** Gets the textual representation of a summary component in the format used for MaD models. */
string getMadRepresentationSpecific(SummaryComponent sc) {
exists(ContentSet c | sc = TContentSummaryComponent(c) and result = getContentSpecific(c))
or
exists(ReturnKind rk |
@@ -122,10 +122,10 @@ string getAccessStepSpecific(SummaryComponent sc) {
)
}
/** Gets the textual representation of a parameter position in the format used for flow summaries. */
/** Gets the textual representation of a parameter position in the format used for MaD models. */
string getParameterPosition(ParameterPosition pos) { result = pos.toString() }
/** Gets the textual representation of an argument position in the format used for flow summaries. */
/** Gets the textual representation of an argument position in the format used for MaD models. */
string getArgumentPosition(ArgumentPosition pos) { result = pos.toString() }
/** Holds if input specification component `c` needs a reference. */