-
Notifications
You must be signed in to change notification settings - Fork 4
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
Creduce with cvice and single lua source compilation #77
Conversation
cvise_reduce.sh
Outdated
set -eu | ||
|
||
# UPDATE: YKLUA path | ||
YKLUA="/home/pd/yklua-fork-cvise" |
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 don't think this path will work for the rest of us ;)
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.
That's why I added instructions in README :)
But I couldn't think of a better solution.
Alternatively, we can set some kind of global config to run cvise_reduce.sh
. Environment variables set when running cvise
don't seem to be available in 'cvise_reduce.sh`.
I'm not totally certain if having this in the repo is a good idea, but let's go with it and see what we think after a while. At a minimum, we should put this in a directory called something like |
ok, makes sense. |
README.md
Outdated
@@ -48,6 +48,23 @@ LYK_VERBOSE=1 ../src/lua all.lua | |||
LYK_VERBOSE=1 sh ./test.sh | |||
``` | |||
|
|||
## C-vise |
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 we should put this part of the README into a new file creduce/README
, and then instead of "pd" filenames we can use relative filenames e.g. "../src/lua" and similar?
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.
updated 👉 0940e4b
Some paths need to be absolute (added comment with description) so no much use for "../"
creduce/cvise_reduce.sh
Outdated
@@ -0,0 +1,19 @@ | |||
#!/bin/bash |
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.
#! /bin/sh
unless we have to use bash (which I don't think we do in this file).
I also wondered if this should be named `cvis.example.sh" or simukar?
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.
updated 👉 0940e4b
I think we just need one of |
We need to build
|
Ah, I see the confusion. Why don't we provide |
ok |
done 👉 32c6464 |
This looks good to me -- @nmdis1999 can you also have a look please? |
Sure. Added a comment. |
@nmdis1999 Where is your comment? I can't find it 😶 |
creduce/one.c
Outdated
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.
why do we need one.c
again here? Can we not use one.c
from src
to build onelua.c
in creduce
directly?
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.
one.c
was originally in the lua src
directory but we wanted to isolate everything related to cvice
and onelua
in the creduce
directory so that we won't have a big diff
when comparing with original source code.
see @ltratt comment 👉 #77 (comment)
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.
From what I can see, currently one.c
in both src
and creduce
folder are the same file and is different from one.c
in lua's src
directory by a single line (for now at least). My question is in what case will one.c
in yklua's src
might be different from one we end up using in the creduce
directory? My understanding is, for creduce
we care only about onelua.c
, which you'd get when you run make
on one.c
, and for make
to be successful, it has to be run in the directory where we have all the headers (please, correct me if I missed anything). So, when would you need one.c
in creduce
?
I am not convinced we need a copy of one.c
in creduce
directory too yet.
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.
Ah, it's just a "left-over" I will remove one.c
from src
directory
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.
Actually, we can do it either way, but I think that keeping onc.c
in creduce
directory is cleaner cause we don't "pollute" the original lua src code (same goes for Makefile changes)
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.
removed one.c
form src
here 👉 8334f4b
Please squash. |
These scripts will help us to find bugs in large code bases such as lua. It will iteratively reduce the size of the codebase using c-vice and script oracles.
8334f4b
to
92f4645
Compare
squashed 👉 92f4645 |
CI failed :( |
Add cvice scripts and onelua compilation support.