My algorithm takes a Java program as an input, modifies it to eliminate static attributes, and returns a new modified Java program without such attributes. What would be the soundness and completeness of this algorithm? Let's assume, the input program has $S$ static attributes and $N$ non-static ones. Let's also assume that the output program has $S'$ and $N'$ accordingly. I'm guessing, the completeness is $N'/(N+S)$, but I'm not sure about soundness.
Asked
Active
Viewed 63 times
-3
-
2Please [edit] your question to define what you mean by soundness and completeness in this context. I have never heard of completeness being a number. – D.W. Jan 16 '23 at 07:05
-
@D.W. this is what the question is about: how to define completeness and soundness for such an algorithm. If I would know the answer, I would not ask the question. – yegor256 Jan 16 '23 at 07:14
-
1We can't answer that for you, because we can't read your mind about what you are hoping for. Please [edit] your question to list what requirements you have. There are many definitions that might be possible. Without more context, there is no basis for choosing among them. How will you evaluate answers? How do you want others to evaluate answers? We need questions to be objectively answerable, so answerers can know in advance what will qualify as an acceptable answer, and so voters have clear criteria to use when voting on proposed answers. – D.W. Jan 16 '23 at 07:16
-
Also, you might find it helpful to do some research and reading on how those terms are used in a related context: https://en.wikipedia.org/wiki/Soundness, https://en.wikipedia.org/wiki/Completeness_(logic), https://cs.stackexchange.com/q/101055/755, http://www.pl-enthusiast.net/2017/10/23/what-is-soundness-in-static-analysis/, and use this to improve your question. – D.W. Jan 16 '23 at 07:18
-
2Without context, this question is meaningless. Will you define co-serendipity as $\log_\alpha K$ where $\alpha$ is the probability ? – Jan 16 '23 at 07:25
-
@YvesDaoust what context is missing? Please, ask and I will provide the missing information. – yegor256 Jan 16 '23 at 07:27
-
@D.W. I'm hoping the community to give me the definition of soundness and completeness of the specified algorithm. Imagine, you are the designer of this algorithm. How would you define its soundness and completeness for a paper that explains the algorithm? – yegor256 Jan 16 '23 at 07:28
-
What is a static attribute ? What is a non-static attribute ? What is soundness of a Java program ??? What is completeness of a Java program ??? (Your answer "this is what I am asking" is a dead-end.) Please tell me how to compute the co-serendipity. – Jan 16 '23 at 07:28
-
@YvesDaoust I added a link to "static" attributes definition. I don't know what is a soundness of a Java program. Maybe you can consider a simplified algorithm: we take a bucket with rotten and good apples and remove the rotten ones. It's essentially what my algorithm is doing. – yegor256 Jan 16 '23 at 07:35
-
1Mh, I don't know what co-serendipity is. Think of this: you draw a dice and wait. [Sorry, all this discussion is a nonsense, I can't help you.] – Jan 16 '23 at 07:38
-
1What would you think if I were to post a question "What is a reverse roundabout blougou"? You'd ask me what I am talking about, no? But then, what if I answered "But I don't know, you tell me!" Weird, isn't it? Well that's exactly what your post and comments sound like. – Nathaniel Jan 16 '23 at 09:08
1 Answers
0
I ended up with the following. First, it's necessary to define what is "false positive" (FP) and "false negative" (FN) of the algorithm. Let's say, a static method that is not eliminated is a "false negative" result ("negative" because the algorithm said "There is NO static method to eliminate"). Then, if a non-static method is modified, it is a "false positive" outcome.
Then, the precision of the algorithm is TP / (TP + FP)
and the recall is TP / (TP + FN)
.
If we prove that the algorithm is sound (no false positives), its precision will always be 100%. If we prove that it's complete (no false negatives), the recall will always be 100%.

yegor256
- 113
- 5
-
1That seems entirely reasonable and it also uses standard terminology (even if it is from a slightly different context) that clearly makes sense here. – reinierpost Jan 25 '23 at 20:17