Automatic compilation of partially available C source code
cuda.dcc.ufmg.br
Automatic compilation of partially available C source code
1–10 of 18 posts
Re: Automatic compilation of partially available C source code
#2Re: Automatic compilation of partially available C source code
#3Re: Automatic compilation of partially available C source code
#4typedef int bool;
I am not sure if I want that in my header.
Re: Automatic compilation of partially available C source code
#5Re: Automatic compilation of partially available C source code
#6Can somebody in simple but technical terms explain how this works? (I tried to no avail)
IE For "List list" to work, there must be a thing named List available as a typedef. For list = 0 to work, tlist must be a pointer or an int. For list->data to work, list must be a pointer to a struct, and that struct must have a member named data. for list->data = val to work, the member named data must be compatible with a double.
It simply generates all of the constraints like this on the program, and then solves the constraint set, which produces a valid program (hopefully. it is possible it may not have enough data in some cases, given how C is parsed)
Re: Automatic compilation of partially available C source code
#7Re: Automatic compilation of partially available C source code
#8The header code generated contains typedef int bool; I am not sure if I want that in my header.
Re: Automatic compilation of partially available C source code
#9The header code generated contains typedef int bool; I am not sure if I want that in my header.
I've seen this in the wild, including the top answer on a StackOverflow question:
#define bool int
http://stackoverflow.com/questions/4159713/how-to-use-boolea...
Besides, if you want correct code, don't ask a tool to guess it! This tool is for patching up fragments enough to get them through the compiler front end analysis.
Re: Automatic compilation of partially available C source code
#10The header code generated contains typedef int bool; I am not sure if I want that in my header.
Why not? C does not have a book type and it is standard to use either char or int, depending on if you're concerned about space or about time.