-
Notifications
You must be signed in to change notification settings - Fork 26
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
String Analysis #1
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Restored original review by @florian-kuebler
...NG_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/string_analysis/LocalTestMethods.java
Outdated
Show resolved
Hide resolved
DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/info/StringAnalysisReflectiveCalls.scala
Outdated
Show resolved
Hide resolved
...alj/tac/fpcf/analyses/string_analysis/interpretation/interprocedural/ArrayLoadPreparer.scala
Outdated
Show resolved
Hide resolved
OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/string_analysis/preprocessing/Path.scala
Outdated
Show resolved
Hide resolved
OPAL/br/src/main/scala/org/opalj/br/fpcf/properties/string_definition/StringTree.scala
Outdated
Show resolved
Hide resolved
...c/main/scala/org/opalj/tac/fpcf/analyses/string_analysis/InterproceduralStringAnalysis.scala
Outdated
Show resolved
Hide resolved
...c/main/scala/org/opalj/tac/fpcf/analyses/string_analysis/InterproceduralStringAnalysis.scala
Outdated
Show resolved
Hide resolved
...scala/org/opalj/tac/fpcf/analyses/string_analysis/interpretation/InterpretationHandler.scala
Outdated
Show resolved
Hide resolved
...ring_analysis/interpretation/interprocedural/VirtualFunctionCallPreparationInterpreter.scala
Outdated
Show resolved
Hide resolved
Former-commit-id: 614a9d487563eced85c8c307f4e569848382a417
a126ed6
to
af384a3
Compare
...main/scala/org/opalj/tac/fpcf/analyses/string_analysis/InterproceduralComputationState.scala
Outdated
Show resolved
Hide resolved
… into feature/StringAnalysis
Fixes unknown char value test
*/ | ||
package object string { | ||
|
||
type HighSoundness = Boolean |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still not sure what the benefit of having this even as a type alias is. Why not just use boolean (note that, at least in the past, Scala tended to introduce lots of unnecessary boxing when using type aliases of primitive types).
@@ -43,8 +48,10 @@ object StringConstancyLevel { | |||
Dynamic | |||
} else if (level1 == PartiallyConstant || level2 == PartiallyConstant) { | |||
PartiallyConstant | |||
} else { | |||
} else if (level1 == Constant || level2 == Constant) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this method be called meet
?
@@ -65,7 +72,9 @@ object StringConstancyLevel { | |||
level1: StringConstancyLevel, | |||
level2: StringConstancyLevel | |||
): StringConstancyLevel = { | |||
if (level1 == PartiallyConstant || level2 == PartiallyConstant) { | |||
if (level1 == Invalid || level2 == Invalid) { | |||
PartiallyConstant |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks wrong. If both are Invalid, shouldn't the result be Invalid as well?
* Checks whether the given type is supported by the field read analysis, i.e. if it may contain values desirable | ||
* AND resolvable by the string analysis as a whole. | ||
*/ | ||
private def isSupportedType(fieldType: FieldType): Boolean = fieldType.isBaseType || fieldType == ObjectType.String |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this can even use eq
instead of ==
/** | ||
* @author Maximilian Rüsch | ||
*/ | ||
trait UniversalStringConfig { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe rename to sth. like StringAnalysisConfig
?
Implementation of the string analysis (the interprocedural as well as the intraprocedural variant).
Original PR by PatrickN.