Comments (4)
I'm starting to look into this using bh as an example (though I may soon check the other example programs to see whether I can get more improvement for the work there).
So it's legitimate to change orig
to reduce diffs for the purpose of our experiment? Changing whitespace and splitting multi-decls is OK? What about adding parameter types to function declarations? That's required by Checked C and not required by plain C; I think there's consensus that newly written C code should have parameter types, but some of the codebases to which we envision real users applying 3C might be old enough not to have them, so I'm unsure whether adding them to orig
to reduce diffs makes our results more or less valid with respect to the target usage of 3C. Can any more general statement be made about what kinds of changes to orig
are legitimate?
from analyze-conversion.
Another example from git diff --ignore-all-space --no-index src/Olden/bh/{orig,revert}/newbh.c
:
if (Type(n) == BODY) {
- Next((bodyptr) n) = bp_free_list;
- bp_free_list = (bodyptr) n;
+ bodyptr p = 0;
+ { p = (bodyptr)n; }
+ Next(p) = bp_free_list;
+ bp_free_list = p;
}
Here the extra local variable and block were introduced so that the manual port could add an _Unchecked
annotation on the block and an _Assume_bounds_cast
inside it. IIUC, currently the diff above is being counted as a refactoring. Is that what we want, or should we apply the change to orig
so that this (arguably artificial and formulaic) change is counted as neither a refactoring nor an annotation? Or does it not matter because we'll rely more on the semantic statistics from 3C than on the line diffs?
from analyze-conversion.
So it's legitimate to change
orig
to reduce diffs for the purpose of our experiment? Changing whitespace and splitting multi-decls is OK? What about adding parameter types to function declarations?
Changing whitespace and splitting multidecls is OK.
The rest, I would say, should be left alone. Part of the porting process is to add types to parameters that don't have them. So we should not change orig
to do that.
OTOH, it's also OK to change manual
so that it does a better job of porting without making diffs that aren't needed. The bzero
and #undef
comment I made in the issue description is an example.
from analyze-conversion.
should we apply the change to
orig
so that this (arguably artificial and formulaic) change is counted as neither a refactoring nor an annotation? Or does it not matter because we'll rely more on the semantic statistics from 3C than on the line diffs?
It should count as a refactoring (in the line diffs) because it was required by Checked C for the program to typecheck. So we should not change it in orig
. At the same time, it won't play into the semantic stats, as you've pointed out.
from analyze-conversion.
Related Issues (13)
- Macro expansion failure for newly added benchmarks HOT 7
- Script to make `orig` to match `manual` C3 helpers HOT 5
- script diffs for manual vs. 3c-revert HOT 4
- Add `vsftpd` HOT 1
- Improve table formatting
- yacr2 is not in built table HOT 1
- Build table without macro expansion, too
- Remove type instantiations when diffing
- Explain discrepancy with orig vs manual/revert results HOT 1
- Deal with 3c bug in calls `(f)(...)` HOT 1
- Compute stats - data for paper HOT 1
- 3c calls don't work HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from analyze-conversion.