[clang-format] Reformat all c/cpp/objc sources with clang-format

Reviewed By: jul

Differential Revision: https://phabricator.fb.com/D2953843
master
Andrzej Kotulski 9 years ago committed by Sam Blackshear
parent c82a4c1cc1
commit 4584f7f6fc

@ -7,17 +7,17 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
#include <stdlib.h>
#include <errno.h>
#include <fcntl.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdlib.h>
#include <string.h>
#include <sys/select.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/select.h>
#include <unistd.h>
struct Person {
@ -36,17 +36,14 @@ struct Person *Person_create(int age, int height, int weight) {
return who;
}
int get_age(struct Person *who) {
return who->age;
}
int get_age(struct Person* who) { return who->age; }
int null_pointer_interproc() {
struct Person* joe = Person_create(32, 64, 140);
return get_age(joe);
}
void fileNotClosed()
{
void fileNotClosed() {
int fd = open("hi.txt", O_WRONLY | O_CREAT | O_TRUNC, 0600);
if (fd != -1) {
char buffer[256];
@ -65,5 +62,6 @@ void common_realloc_leak() {
p = (int*)malloc(sizeof(int));
q = (int*)realloc(p, sizeof(int) * 42);
// if realloc fails, then p becomes unreachable
if (q != NULL) free(q);
if (q != NULL)
free(q);
}

@ -18,6 +18,4 @@
@property(strong, nonatomic) UIWindow* window;
@end

@ -45,7 +45,8 @@
return [NSArray arrayWithObjects:@"horse", str, @"dolphin", nil];
}
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
- (BOOL)application:(UIApplication*)application
didFinishLaunchingWithOptions:(NSDictionary*)launchOptions {
// Override point for customization after application launch.
Hello* hello = [Hello new];
[hello null_dereference_bug];
@ -60,25 +61,36 @@
}
- (void)applicationWillResignActive:(UIApplication*)application {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
// Sent when the application is about to move from active to inactive state.
// This can occur for certain types of temporary interruptions (such as an
// incoming phone call or SMS message) or when the user quits the application
// and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down
// OpenGL ES frame rates. Games should use this method to pause the game.
}
- (void)applicationDidEnterBackground:(UIApplication*)application {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
// Use this method to release shared resources, save user data, invalidate
// timers, and store enough application state information to restore your
// application to its current state in case it is terminated later.
// If your application supports background execution, this method is called
// instead of applicationWillTerminate: when the user quits.
}
- (void)applicationWillEnterForeground:(UIApplication*)application {
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
// Called as part of the transition from the background to the inactive state;
// here you can undo many of the changes made on entering the background.
}
- (void)applicationDidBecomeActive:(UIApplication*)application {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
// Restart any tasks that were paused (or not yet started) while the
// application was inactive. If the application was previously in the
// background, optionally refresh the user interface.
}
- (void)applicationWillTerminate:(UIApplication*)application {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
// Called when the application is about to terminate. Save data if
// appropriate. See also applicationDidEnterBackground:.
}
@end

@ -12,8 +12,8 @@
// HelloWorldApp
//
#import <Foundation/Foundation.h>
#import "Hello.h"
#import <Foundation/Foundation.h>
@implementation Hello

@ -16,6 +16,4 @@
@interface ViewController : UIViewController
@end

@ -12,11 +12,12 @@
// HelloWorldApp
//
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
#import <UIKit/UIKit.h>
int main(int argc, char* argv[]) {
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
return UIApplicationMain(
argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}

@ -24,11 +24,13 @@
- (void)setUp {
[super setUp];
// Put setup code here. This method is called before the invocation of each test method in the class.
// Put setup code here. This method is called before the invocation of each
// test method in the class.
}
- (void)tearDown {
// Put teardown code here. This method is called after the invocation of each test method in the class.
// Put teardown code here. This method is called after the invocation of each
// test method in the class.
[super tearDown];
}

@ -16,25 +16,26 @@
// similar to malloc, but never fails, and returns NULL when size==0
void* g_malloc(size_t size) {
if(size==0) return NULL;
if (size == 0)
return NULL;
void* res = malloc(size);
INFER_EXCLUDE_CONDITION(!res);
return res;
}
// modelled as free
void g_free(void *ptr) {
free(ptr);
}
void g_free(void* ptr) { free(ptr); }
void* g_realloc(void* ptr, size_t size) {
if (size == 0) { // return NULL and free ptr unless it is NULL
if(ptr) free(ptr);
if (ptr)
free(ptr);
return NULL;
}
int old_size;
old_size = __get_array_size(ptr); // force ptr to be an array
int can_enlarge; // nondeterministically choose whether the current block can be enlarged
int can_enlarge; // nondeterministically choose whether the current block can
// be enlarged
if (can_enlarge) {
__set_array_size(ptr, size); // enlarge the block
return ptr;
@ -43,13 +44,13 @@ void *g_realloc(void *ptr, size_t size) {
if (newblock) {
free(ptr);
return newblock;
} else
exit(0); // assume that new allocation does not fail
}
else exit(0); // assume that new allocation does not fail
}
// simply return object, and assume it is not NULL
void* gtk_type_check_object_cast(void* object, void* cast_type) {
if(!object) exit(0);
if (!object)
exit(0);
return object;
}

@ -92,7 +92,10 @@ long infer__builtin_expect(long e, long x) {
}
}
void *infer__builtin___memset_chk(void *dest, int val, unsigned long len, unsigned long dstlen) {
void* infer__builtin___memset_chk(void* dest,
int val,
unsigned long len,
unsigned long dstlen) {
INFER_EXCLUDE_CONDITION(dstlen < len);
return dest;
}

@ -10,8 +10,8 @@
// builtins to be used to model library functions
#include <stdlib.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
// model returning an arbitrary (nondeterministic) short
@ -51,8 +51,11 @@ time_t __infer_nondet_time_t();
clock_t __infer_nondet_clock_t();
// assume that the cond is false
// and add any constraints to the precondition so that cond is false, if possible
#define INFER_EXCLUDE_CONDITION(cond) if (cond) while(1)
// and add any constraints to the precondition so that cond is false, if
// possible
#define INFER_EXCLUDE_CONDITION(cond) \
if (cond) \
while (1)
// builtin: force arr to be an array and return the size
extern size_t __get_array_size(const void* arr);
@ -63,5 +66,6 @@ extern void __set_file_attribute(void *ret);
// builtin: change the size of the array to size
extern void __set_array_size(void* ptr, size_t size);
// builtin: set the flag to the given value for the procedure where this call appears
// builtin: set the flag to the given value for the procedure where this call
// appears
extern void __infer_set_flag(char* flag, char* value);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -19,126 +19,112 @@
#define USE_CPP_OVERLOADS
#endif
#include <stdio.h>
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include <wchar.h>
#define restrict
#ifdef _WIN32
#define CLIBCALL __cdecl
#else
#define CLIBCALL
#endif
int CLIBCALL fwscanf(FILE * restrict stream, const wchar_t * restrict format, ...); // builtin: modeled internally
int CLIBCALL swscanf(const wchar_t * restrict s, const wchar_t * restrict format, ...); // builtin: modeled internally
int CLIBCALL vfwscanf(FILE * restrict stream, const wchar_t * restrict format, va_list arg); // builtin: modeled internally
int CLIBCALL vswscanf(const wchar_t * restrict s, const wchar_t * restrict format, va_list arg); // builtin: modeled internally
int CLIBCALL vwscanf(const wchar_t * restrict format, va_list arg); // builtin: modeled internally
int CLIBCALL wscanf(const wchar_t * restrict format, ...); // builtin: modeled internally
wint_t CLIBCALL btowc(int c)
{
return __infer_nondet_int();
}
wint_t CLIBCALL fgetwc(FILE *stream)
{
return __infer_nondet_int();
}
int CLIBCALL fwscanf(FILE* restrict stream,
const wchar_t* restrict format,
...); // builtin: modeled internally
int CLIBCALL swscanf(const wchar_t* restrict s,
const wchar_t* restrict format,
...); // builtin: modeled internally
int CLIBCALL vfwscanf(FILE* restrict stream,
const wchar_t* restrict format,
va_list arg); // builtin: modeled internally
int CLIBCALL vswscanf(const wchar_t* restrict s,
const wchar_t* restrict format,
va_list arg); // builtin: modeled internally
int CLIBCALL vwscanf(const wchar_t* restrict format,
va_list arg); // builtin: modeled internally
int CLIBCALL wscanf(const wchar_t* restrict format,
...); // builtin: modeled internally
wint_t CLIBCALL btowc(int c) { return __infer_nondet_int(); }
wint_t CLIBCALL fgetwc(FILE* stream) { return __infer_nondet_int(); }
// modelled like fgets
wchar_t * CLIBCALL fgetws(wchar_t * restrict s, int n, FILE * restrict stream)
{
wchar_t* CLIBCALL fgetws(wchar_t* restrict s, int n, FILE* restrict stream) {
return (wchar_t*)fgets((char*)s, n, stream);
}
wint_t CLIBCALL fputwc(wchar_t c, FILE *stream)
{
return __infer_nondet_int();
}
wint_t CLIBCALL fputwc(wchar_t c, FILE* stream) { return __infer_nondet_int(); }
// modeled using fputs
int CLIBCALL fputws(const wchar_t * restrict s, FILE * restrict stream)
{
int CLIBCALL fputws(const wchar_t* restrict s, FILE* restrict stream) {
return fputs((char*)s, stream);
}
int CLIBCALL fwide(FILE *stream, int mode)
{
return __infer_nondet_int();
}
int CLIBCALL fwide(FILE* stream, int mode) { return __infer_nondet_int(); }
// return a nondeterministic nonnegative integer
int CLIBCALL fwprintf(FILE * restrict stream, const wchar_t * restrict format, ...)
{
int CLIBCALL fwprintf(FILE* restrict stream,
const wchar_t* restrict format,
...) {
int res;
res = __infer_nondet_int();
INFER_EXCLUDE_CONDITION(res < 0);
return res;
}
#ifdef getwc
#undef getwc // disable expansion of getwc
#endif
wint_t CLIBCALL getwc(FILE *stream)
{
return __infer_nondet_int();
}
wint_t CLIBCALL getwc(FILE* stream) { return __infer_nondet_int(); }
#ifdef getwchar
#undef getwchar // disable expansion of getwchar
#endif
wint_t CLIBCALL getwchar()
{
return __infer_nondet_int();
}
wint_t CLIBCALL getwchar() { return __infer_nondet_int(); }
size_t CLIBCALL mbrlen(const char * restrict s, size_t n, mbstate_t * restrict ps)
{
size_t CLIBCALL mbrlen(const char* restrict s,
size_t n,
mbstate_t* restrict ps) {
return __infer_nondet_int();
}
size_t CLIBCALL mbrtowc(wchar_t * restrict pwc, const char * restrict s, size_t n, mbstate_t * restrict ps)
{
size_t CLIBCALL mbrtowc(wchar_t* restrict pwc,
const char* restrict s,
size_t n,
mbstate_t* restrict ps) {
return __infer_nondet_int();
}
int CLIBCALL mbsinit(const mbstate_t *ps)
{
return __infer_nondet_int();
}
int CLIBCALL mbsinit(const mbstate_t* ps) { return __infer_nondet_int(); }
size_t CLIBCALL mbsrtowcs(wchar_t * restrict dst, const char ** restrict src, size_t len, mbstate_t * restrict ps)
{
size_t CLIBCALL mbsrtowcs(wchar_t* restrict dst,
const char** restrict src,
size_t len,
mbstate_t* restrict ps) {
return __infer_nondet_int();
}
#ifdef putwc
#undef putwc // disable expansion of putwc
#endif
wint_t CLIBCALL putwc(wchar_t c, FILE *stream)
{
return __infer_nondet_int();
}
wint_t CLIBCALL putwc(wchar_t c, FILE* stream) { return __infer_nondet_int(); }
#ifdef putwchar
#undef putwchar // disable expansion of putwchar
#endif
wint_t CLIBCALL putwchar(wchar_t c)
{
return __infer_nondet_int();
}
wint_t CLIBCALL putwchar(wchar_t c) { return __infer_nondet_int(); }
// s must be allocated
// return a nondeterministic nonnegative integer
int CLIBCALL swprintf(wchar_t * restrict s, size_t n, const wchar_t * restrict format, ...)
{
int CLIBCALL swprintf(wchar_t* restrict s,
size_t n,
const wchar_t* restrict format,
...) {
int res;
int size1;
size1 = __get_array_size(s);
@ -147,14 +133,12 @@ int CLIBCALL swprintf(wchar_t * restrict s, size_t n, const wchar_t * restrict f
return res;
}
wint_t CLIBCALL ungetwc(wint_t c, FILE *stream)
{
return __infer_nondet_int();
}
wint_t CLIBCALL ungetwc(wint_t c, FILE* stream) { return __infer_nondet_int(); }
// return a nondeterministic nonnegative integer
int CLIBCALL vfwprintf(FILE * restrict stream, const wchar_t * restrict format, va_list arg)
{
int CLIBCALL vfwprintf(FILE* restrict stream,
const wchar_t* restrict format,
va_list arg) {
int res;
res = __infer_nondet_int();
INFER_EXCLUDE_CONDITION(res < 0);
@ -162,8 +146,10 @@ int CLIBCALL vfwprintf(FILE * restrict stream, const wchar_t * restrict format,
}
// return a nondeterministic nonnegative integer
int CLIBCALL vswprintf(wchar_t * restrict s, size_t n, const wchar_t * restrict format, va_list arg)
{
int CLIBCALL vswprintf(wchar_t* restrict s,
size_t n,
const wchar_t* restrict format,
va_list arg) {
int res;
res = __infer_nondet_int();
INFER_EXCLUDE_CONDITION(res < 0);
@ -171,27 +157,26 @@ int CLIBCALL vswprintf(wchar_t * restrict s, size_t n, const wchar_t * restrict
}
// return a nondeterministic nonnegative integer
int CLIBCALL vwprintf(const wchar_t * restrict format, va_list arg)
{
int CLIBCALL vwprintf(const wchar_t* restrict format, va_list arg) {
int res;
res = __infer_nondet_int();
INFER_EXCLUDE_CONDITION(res < 0);
return res;
}
size_t CLIBCALL wcrtomb(char * restrict s, wchar_t wc, mbstate_t * restrict ps)
{
size_t CLIBCALL wcrtomb(char* restrict s, wchar_t wc, mbstate_t* restrict ps) {
return __infer_nondet_int();
}
size_t CLIBCALL wcsrtombs(char * restrict dst, const wchar_t ** restrict src, size_t len, mbstate_t * restrict ps)
{
size_t CLIBCALL wcsrtombs(char* restrict dst,
const wchar_t** restrict src,
size_t len,
mbstate_t* restrict ps) {
return __infer_nondet_int();
}
// return a nondeterministic nonnegative integer
int CLIBCALL wprintf(const wchar_t * restrict format, ...)
{
int CLIBCALL wprintf(const wchar_t* restrict format, ...) {
int res;
res = __infer_nondet_int();
INFER_EXCLUDE_CONDITION(res < 0);
@ -199,8 +184,7 @@ int CLIBCALL wprintf(const wchar_t * restrict format, ...)
}
// modeled using strcat
wchar_t * CLIBCALL wcscat(wchar_t * restrict s1, const wchar_t * restrict s2)
{
wchar_t* CLIBCALL wcscat(wchar_t* restrict s1, const wchar_t* restrict s2) {
return (wchar_t*)strcat((char*)s1, (char*)s2);
}
@ -208,8 +192,7 @@ wchar_t * CLIBCALL wcscat(wchar_t * restrict s1, const wchar_t * restrict s2)
#ifndef USE_CPP_OVERLOADS
wchar_t* CLIBCALL wcschr(const wchar_t* s, wchar_t c)
#else
const wchar_t * CLIBCALL wcschr(const wchar_t *s, wchar_t c)
{
const wchar_t* CLIBCALL wcschr(const wchar_t* s, wchar_t c) {
return wcschr((wchar_t*)s, c);
}
@ -220,20 +203,20 @@ wchar_t * CLIBCALL wcschr(wchar_t *s, wchar_t c)
}
// modeled using strcmp
int CLIBCALL wcscmp(const wchar_t *s1, const wchar_t *s2)
{
int CLIBCALL wcscmp(const wchar_t* s1, const wchar_t* s2) {
return strcmp((char*)s1, (char*)s2);
}
// modeled using strcmp
int CLIBCALL wcscoll(const wchar_t *s1, const wchar_t *s2)
{
int CLIBCALL wcscoll(const wchar_t* s1, const wchar_t* s2) {
return strcmp((char*)s1, (char*)s2);
}
// return a nondeterministic nonnegative integer
size_t CLIBCALL wcsftime(wchar_t * restrict s, size_t maxsize,const wchar_t * restrict format, const struct tm * restrict timeptr)
{
size_t CLIBCALL wcsftime(wchar_t* restrict s,
size_t maxsize,
const wchar_t* restrict format,
const struct tm* restrict timeptr) {
int res;
res = __infer_nondet_int();
INFER_EXCLUDE_CONDITION(res < 0);
@ -241,32 +224,27 @@ size_t CLIBCALL wcsftime(wchar_t * restrict s, size_t maxsize,const wchar_t * re
}
// modeled using strcpy
wchar_t * CLIBCALL wcscpy(wchar_t * restrict s1, const wchar_t * restrict s2)
{
wchar_t* CLIBCALL wcscpy(wchar_t* restrict s1, const wchar_t* restrict s2) {
return (wchar_t*)strcpy((char*)s1, (char*)s2);
}
// modeled using strcmp
size_t CLIBCALL wcscspn(const wchar_t *s1, const wchar_t *s2)
{
size_t CLIBCALL wcscspn(const wchar_t* s1, const wchar_t* s2) {
return strcmp((char*)s1, (char*)s2);
}
// modeled using strlen
size_t CLIBCALL wcslen(const wchar_t *s)
{
return strlen((char *) s);
}
size_t CLIBCALL wcslen(const wchar_t* s) { return strlen((char*)s); }
// modeled using strncat
wchar_t * CLIBCALL wcsncat(wchar_t * restrict s1, const wchar_t * restrict s2, size_t n)
{
wchar_t* CLIBCALL wcsncat(wchar_t* restrict s1,
const wchar_t* restrict s2,
size_t n) {
return (wchar_t*)strncat((char*)s1, (char*)s2, n);
}
// modeled using strncmp
int CLIBCALL wcsncmp(const wchar_t *s1, const wchar_t *s2, size_t n)
{
int CLIBCALL wcsncmp(const wchar_t* s1, const wchar_t* s2, size_t n) {
return strncmp((char*)s1, (char*)s2, n);
}
@ -274,8 +252,7 @@ int CLIBCALL wcsncmp(const wchar_t *s1, const wchar_t *s2, size_t n)
#ifndef USE_CPP_OVERLOADS
wchar_t* CLIBCALL wcspbrk(const wchar_t* s1, const wchar_t* s2)
#else
const wchar_t * CLIBCALL wcspbrk(const wchar_t *s1, const wchar_t *s2)
{
const wchar_t* CLIBCALL wcspbrk(const wchar_t* s1, const wchar_t* s2) {
return wcspbrk((wchar_t*)s1, s2);
}
wchar_t* CLIBCALL wcspbrk(wchar_t* s1, const wchar_t* s2)
@ -288,8 +265,7 @@ wchar_t * CLIBCALL wcspbrk(wchar_t *s1, const wchar_t *s2)
#ifndef USE_CPP_OVERLOADS
wchar_t* CLIBCALL wcsrchr(const wchar_t* s, wchar_t c)
#else
const wchar_t * CLIBCALL wcsrchr(const wchar_t *s, wchar_t c)
{
const wchar_t* CLIBCALL wcsrchr(const wchar_t* s, wchar_t c) {
return wcsrchr((wchar_t*)s, c);
}
@ -300,14 +276,14 @@ wchar_t * CLIBCALL wcsrchr(wchar_t *s, wchar_t c)
}
// modeled using strncpy
wchar_t * CLIBCALL wcsncpy(wchar_t * restrict s1, const wchar_t * restrict s2, size_t n)
{
wchar_t* CLIBCALL wcsncpy(wchar_t* restrict s1,
const wchar_t* restrict s2,
size_t n) {
return (wchar_t*)strncpy((char*)s1, (char*)s2, n);
}
// modeled using strspn
size_t CLIBCALL wcsspn(const wchar_t *s1, const wchar_t *s2)
{
size_t CLIBCALL wcsspn(const wchar_t* s1, const wchar_t* s2) {
return strspn((char*)s1, (char*)s2);
}
@ -316,8 +292,7 @@ size_t CLIBCALL wcsspn(const wchar_t *s1, const wchar_t *s2)
wchar_t* CLIBCALL wcsstr(const wchar_t* s1, const wchar_t* s2)
#else
const wchar_t * CLIBCALL wcsstr(const wchar_t *s1, const wchar_t *s2)
{
const wchar_t* CLIBCALL wcsstr(const wchar_t* s1, const wchar_t* s2) {
return wcsstr((wchar_t*)s1, s2);
}
wchar_t* CLIBCALL wcsstr(wchar_t* s1, const wchar_t* s2)
@ -326,55 +301,57 @@ wchar_t * CLIBCALL wcsstr(wchar_t *s1, const wchar_t *s2)
return (wchar_t*)strstr((char*)s1, (char*)s2);
}
int CLIBCALL wctob(wint_t c)
{
return __infer_nondet_int();
}
int CLIBCALL wctob(wint_t c) { return __infer_nondet_int(); }
double CLIBCALL wcstod(const wchar_t * restrict nptr, wchar_t ** restrict endptr)
{
double CLIBCALL wcstod(const wchar_t* restrict nptr,
wchar_t** restrict endptr) {
return __infer_nondet_double();
}
float CLIBCALL wcstof(const wchar_t * restrict nptr, wchar_t ** restrict endptr)
{
float CLIBCALL wcstof(const wchar_t* restrict nptr, wchar_t** restrict endptr) {
return __infer_nondet_float();
}
// simplified modeling which returns s1
wchar_t * CLIBCALL wcstok(wchar_t * restrict s1, const wchar_t * restrict s2, wchar_t ** restrict ptr)
{
wchar_t* CLIBCALL wcstok(wchar_t* restrict s1,
const wchar_t* restrict s2,
wchar_t** restrict ptr) {
return s1;
}
long double CLIBCALL wcstold(const wchar_t * restrict nptr, wchar_t ** restrict endptr)
{
long double CLIBCALL wcstold(const wchar_t* restrict nptr,
wchar_t** restrict endptr) {
return __infer_nondet_long_double();
}
long int CLIBCALL wcstol(const wchar_t * restrict nptr, wchar_t ** restrict endptr, int base)
{
long int CLIBCALL wcstol(const wchar_t* restrict nptr,
wchar_t** restrict endptr,
int base) {
return __infer_nondet_long_int();
}
long long int CLIBCALL wcstoll(const wchar_t * restrict nptr, wchar_t ** restrict endptr, int base)
{
long long int CLIBCALL wcstoll(const wchar_t* restrict nptr,
wchar_t** restrict endptr,
int base) {
return __infer_nondet_long_long_int();
}
unsigned long int CLIBCALL wcstoul(const wchar_t * restrict nptr, wchar_t ** restrict endptr, int base)
{
unsigned long int CLIBCALL wcstoul(const wchar_t* restrict nptr,
wchar_t** restrict endptr,
int base) {
return __infer_nondet_unsigned_long_int();
}
unsigned long long int CLIBCALL wcstoull(const wchar_t * restrict nptr, wchar_t ** restrict endptr, int base)
{
unsigned long long int CLIBCALL wcstoull(const wchar_t* restrict nptr,
wchar_t** restrict endptr,
int base) {
return __infer_nondet_long_long_int();
}
// modeled using strncmp
size_t CLIBCALL wcsxfrm(wchar_t * restrict s1, const wchar_t * restrict s2, size_t n)
{
size_t CLIBCALL wcsxfrm(wchar_t* restrict s1,
const wchar_t* restrict s2,
size_t n) {
return strncmp((char*)s1, (char*)s2, n);
}
@ -383,8 +360,7 @@ size_t CLIBCALL wcsxfrm(wchar_t * restrict s1, const wchar_t * restrict s2, size
wchar_t* CLIBCALL wmemchr(const wchar_t* s, wchar_t c, size_t n)
#else
const wchar_t * CLIBCALL wmemchr(const wchar_t *s, wchar_t c, size_t n)
{
const wchar_t* CLIBCALL wmemchr(const wchar_t* s, wchar_t c, size_t n) {
return wmemchr((wchar_t*)s, c, n);
}
wchar_t* CLIBCALL wmemchr(wchar_t* s, wchar_t c, size_t n)
@ -394,25 +370,23 @@ wchar_t * CLIBCALL wmemchr(wchar_t *s, wchar_t c, size_t n)
}
// modeled using memcmp
int CLIBCALL wmemcmp(const wchar_t *s1, const wchar_t *s2, size_t n)
{
int CLIBCALL wmemcmp(const wchar_t* s1, const wchar_t* s2, size_t n) {
return memcmp((char*)s1, (char*)s2, n);
}
// modeled using memcpy
wchar_t * CLIBCALL wmemcpy(wchar_t * restrict s1, const wchar_t * restrict s2, size_t n)
{
wchar_t* CLIBCALL wmemcpy(wchar_t* restrict s1,
const wchar_t* restrict s2,
size_t n) {
return (wchar_t*)memcpy((char*)s1, (char*)s2, n);
}
// modeled using memmove
wchar_t * CLIBCALL wmemmove(wchar_t *s1, const wchar_t *s2, size_t n)
{
wchar_t* CLIBCALL wmemmove(wchar_t* s1, const wchar_t* s2, size_t n) {
return (wchar_t*)memmove((char*)s1, (char*)s2, n);
}
// modeled using memset
wchar_t * CLIBCALL wmemset(wchar_t *s, wchar_t c, size_t n)
{
wchar_t* CLIBCALL wmemset(wchar_t* s, wchar_t c, size_t n) {
return (wchar_t*)memset((char*)s, c, n);
}

@ -23,105 +23,50 @@
#define CLIBCALL
#endif
// Microsoft-specific
int CLIBCALL __iswcsymf(wint_t wc)
{
return __infer_nondet_int();
}
int CLIBCALL __iswcsymf(wint_t wc) { return __infer_nondet_int(); }
// Microsoft-specific, inline
int CLIBCALL isleadbyte(int wc)
{
return __infer_nondet_int();
}
int CLIBCALL isleadbyte(int wc) { return __infer_nondet_int(); }
int CLIBCALL iswalnum(wint_t wc)
{
return __infer_nondet_int();
}
int CLIBCALL iswalnum(wint_t wc) { return __infer_nondet_int(); }
int CLIBCALL iswalpha(wint_t wc)
{
return __infer_nondet_int();
}
int CLIBCALL iswalpha(wint_t wc) { return __infer_nondet_int(); }
int CLIBCALL iswblank(wint_t wc)
{
return __infer_nondet_int();
}
int CLIBCALL iswblank(wint_t wc) { return __infer_nondet_int(); }
int CLIBCALL iswcntrl(wint_t wc)
{
return __infer_nondet_int();
}
int CLIBCALL iswcntrl(wint_t wc) { return __infer_nondet_int(); }
int CLIBCALL iswctype(wint_t wc, wctype_t desc)
{
return __infer_nondet_int();
}
int CLIBCALL iswctype(wint_t wc, wctype_t desc) { return __infer_nondet_int(); }
int CLIBCALL iswdigit(wint_t wc)
{
return __infer_nondet_int();
}
int CLIBCALL iswdigit(wint_t wc) { return __infer_nondet_int(); }
int CLIBCALL iswgraph(wint_t wc)
{
return __infer_nondet_int();
}
int CLIBCALL iswgraph(wint_t wc) { return __infer_nondet_int(); }
int CLIBCALL iswlower(wint_t wc)
{
return __infer_nondet_int();
}
int CLIBCALL iswlower(wint_t wc) { return __infer_nondet_int(); }
int CLIBCALL iswprint(wint_t wc)
{
return __infer_nondet_int();
}
int CLIBCALL iswprint(wint_t wc) { return __infer_nondet_int(); }
int CLIBCALL iswpunct(wint_t wc)
{
return __infer_nondet_int();
}
int CLIBCALL iswpunct(wint_t wc) { return __infer_nondet_int(); }
int CLIBCALL iswspace(wint_t wc)
{
return __infer_nondet_int();
}
int CLIBCALL iswspace(wint_t wc) { return __infer_nondet_int(); }
int CLIBCALL iswupper(wint_t wc)
{
return __infer_nondet_int();
}
int CLIBCALL iswupper(wint_t wc) { return __infer_nondet_int(); }
int CLIBCALL iswxdigit(wint_t wc)
{
return __infer_nondet_int();
}
int CLIBCALL iswxdigit(wint_t wc) { return __infer_nondet_int(); }
wint_t CLIBCALL towlower(wint_t wc)
{
return __infer_nondet_int();
}
wint_t CLIBCALL towlower(wint_t wc) { return __infer_nondet_int(); }
wint_t CLIBCALL towctrans(wint_t wc, wctrans_t desc)
{
wint_t CLIBCALL towctrans(wint_t wc, wctrans_t desc) {
return __infer_nondet_int();
}
wint_t CLIBCALL towupper(wint_t wc)
{
return __infer_nondet_int();
}
wint_t CLIBCALL towupper(wint_t wc) { return __infer_nondet_int(); }
wctrans_t CLIBCALL wctrans(const char *property)
{
wctrans_t CLIBCALL wctrans(const char* property) {
return (wctrans_t)__infer_nondet_int();
}
wctype_t CLIBCALL wctype(const char *property)
{
wctype_t CLIBCALL wctype(const char* property) {
return (wctype_t)__infer_nondet_int();
}

@ -35,10 +35,7 @@ extern "C" int __infer_shared_ptr_eqeq(void **arg1, void **arg2) {
}
// operator->
extern "C" void* __infer_shared_ptr_arrow(void **arg) {
return *arg;
}
extern "C" void* __infer_shared_ptr_arrow(void** arg) { return *arg; }
// destructor
extern "C" void __infer_shared_ptr_destructor(void **arg) {
}
extern "C" void __infer_shared_ptr_destructor(void** arg) {}

@ -24,8 +24,7 @@
@property(readonly, nonatomic) CFTimeInterval timestamp;
// Returns a new display link.
+ (CADisplayLink *)displayLinkWithTarget:(id)target
selector:(SEL)sel;
+ (CADisplayLink*)displayLinkWithTarget:(id)target selector:(SEL)sel;
// Release the target
- (void)invalidate;

@ -13,8 +13,7 @@
// Returns a new display link.
// The model retains strongly the target object.
+ (CADisplayLink *)displayLinkWithTarget:(id)target
selector:(SEL)sel {
+ (CADisplayLink*)displayLinkWithTarget:(id)target selector:(SEL)sel {
CADisplayLink* c = [CADisplayLink alloc];
c->_target = target;

@ -7,8 +7,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import <Foundation/Foundation.h>
#import <AddressBook/AddressBook.h>
#import <Foundation/Foundation.h>
CFArrayRef __cf_alloc(CFArrayRef);
CFArrayRef __cf_non_null_alloc(CFArrayRef);
@ -21,12 +21,14 @@ CFArrayRef CFArrayCreate ( CFAllocatorRef allocator,
return __cf_alloc(c);
}
CFArrayRef CFNetworkCopyProxiesForURL ( CFURLRef url, CFDictionaryRef proxySettings ) {
CFArrayRef CFNetworkCopyProxiesForURL(CFURLRef url,
CFDictionaryRef proxySettings) {
CFArrayRef c;
return __cf_alloc(c);
}
CFArrayRef CFStringCreateArrayWithFindResults ( CFAllocatorRef alloc,
CFArrayRef CFStringCreateArrayWithFindResults(
CFAllocatorRef alloc,
CFStringRef theString,
CFStringRef stringToFind,
CFRange rangeToSearch,

@ -11,8 +11,8 @@
CFBinaryHeapRef __cf_alloc(CFBinaryHeapRef);
CFBinaryHeapRef CFBinaryHeapCreate ( CFAllocatorRef allocator,
CFBinaryHeapRef CFBinaryHeapCreate(
CFAllocatorRef allocator,
CFIndex capacity,
const CFBinaryHeapCallBacks* callBacks,
const CFBinaryHeapCompareContext* compareContext) {

@ -12,7 +12,6 @@
CFDateRef __cf_alloc(CFDateRef);
CFDateRef __cf_non_null_alloc(CFDateRef);
CFDateRef CFDateCreate(CFAllocatorRef allocator, CFAbsoluteTime at) {
CFDateRef c;
return __cf_non_null_alloc(c);

@ -7,10 +7,9 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import <ImageIO/ImageIO.h>
#import <CoreMedia/CoreMedia.h>
#import <Foundation/Foundation.h>
#import <ImageIO/ImageIO.h>
CFDictionaryRef __cf_non_null_alloc(CFDictionaryRef);
@ -18,14 +17,13 @@ CFDictionaryRef __cf_alloc(CFDictionaryRef);
CFDictionaryRef CGImageSourceCopyPropertiesAtIndex(CGImageSourceRef isrc,
size_t index,
CFDictionaryRef options )
{
CFDictionaryRef options) {
CFDictionaryRef c;
return __cf_non_null_alloc(c);
}
CFDictionaryRef CFDictionaryCreate ( CFAllocatorRef allocator,
CFDictionaryRef CFDictionaryCreate(
CFAllocatorRef allocator,
const void** keys,
const void** values,
CFIndex numValues,
@ -46,7 +44,8 @@ CFDictionaryRef CFNetworkCopySystemProxySettings ( void ) {
return __cf_non_null_alloc(c);
}
CFDictionaryRef CGImageSourceCopyProperties ( CGImageSourceRef isrc, CFDictionaryRef options ) {
CFDictionaryRef CGImageSourceCopyProperties(CGImageSourceRef isrc,
CFDictionaryRef options) {
CFDictionaryRef c;
return __cf_non_null_alloc(c);
}
@ -68,8 +67,7 @@ CFDictionaryRef CNCopyCurrentNetworkInfo ( CFStringRef interfaceName ) {
return __cf_non_null_alloc(c);
}
CFDictionaryRef CMTimeCopyAsDictionary (CMTime time,
CFAllocatorRef allocator ) {
CFDictionaryRef CMTimeCopyAsDictionary(CMTime time, CFAllocatorRef allocator) {
CFDictionaryRef c;
return __cf_alloc(c);
}

@ -12,7 +12,6 @@
CFErrorRef __cf_alloc(CFErrorRef);
CFErrorRef __cf_non_null_alloc(CFErrorRef);
CFErrorRef CFReadStreamCopyError(CFReadStreamRef stream) {
CFErrorRef c;
return __cf_alloc(c);

@ -11,7 +11,6 @@
CFHTTPMessageRef __cf_alloc(CFHTTPMessageRef);
CFHTTPMessageRef CFHTTPMessageCreateCopy(CFAllocatorRef alloc,
CFHTTPMessageRef message) {
CFHTTPMessageRef c;

@ -11,8 +11,8 @@
CFMutableAttributedStringRef __cf_non_null_alloc(CFMutableAttributedStringRef);
CFMutableAttributedStringRef CFAttributedStringCreateMutable (CFAllocatorRef alloc,
CFIndex maxLength ) {
CFMutableAttributedStringRef CFAttributedStringCreateMutable(
CFAllocatorRef alloc, CFIndex maxLength) {
CFMutableAttributedStringRef c;
return __cf_non_null_alloc(c);
}

@ -7,15 +7,15 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import <ImageIO/ImageIO.h>
#import <CoreMedia/CoreMedia.h>
#import <ImageIO/ImageIO.h>
CFMutableDictionaryRef __cf_non_null_alloc(CFMutableDictionaryRef);
CFMutableDictionaryRef __cf_alloc(CFMutableDictionaryRef);
CFMutableDictionaryRef CFDictionaryCreateMutable ( CFAllocatorRef allocator,
CFMutableDictionaryRef CFDictionaryCreateMutable(
CFAllocatorRef allocator,
CFIndex capacity,
const CFDictionaryKeyCallBacks* keyCallBacks,
const CFDictionaryValueCallBacks* valueCallBacks) {

@ -7,7 +7,6 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import <Foundation/Foundation.h>
CFMutableSetRef __cf_alloc(CFMutableSetRef);

@ -11,7 +11,6 @@
CFNumberRef __cf_alloc(CFNumberRef);
CFNumberRef CFNumberCreate(CFAllocatorRef allocator,
CFNumberType theType,
const void* valuePtr) {

@ -12,7 +12,8 @@
CFRunLoopObserverRef __cf_alloc(CFRunLoopObserverRef);
CFRunLoopSourceRef __cf_non_null_alloc(CFRunLoopSourceRef);
CFRunLoopObserverRef CFRunLoopObserverCreate ( CFAllocatorRef allocator,
CFRunLoopObserverRef CFRunLoopObserverCreate(
CFAllocatorRef allocator,
CFOptionFlags activities,
Boolean repeats,
CFIndex order,
@ -22,14 +23,12 @@ CFRunLoopObserverRef CFRunLoopObserverCreate ( CFAllocatorRef allocator,
return __cf_non_null_alloc(c);
}
CFRunLoopObserverRef CFRunLoopObserverCreateWithHandler ( CFAllocatorRef allocator,
CFRunLoopObserverRef CFRunLoopObserverCreateWithHandler(
CFAllocatorRef allocator,
CFOptionFlags activities,
Boolean repeats,
CFIndex order,
void (^block)(
CFRunLoopObserverRef observer,
CFRunLoopActivity activity) ) {
void (^block)(CFRunLoopObserverRef observer, CFRunLoopActivity activity)) {
CFRunLoopObserverRef c;
return __cf_non_null_alloc(c);
}

@ -14,8 +14,7 @@ CFStringRef __cf_alloc(CFStringRef);
void __get_array_size(const UInt8);
CFStringRef CFStringCreateWithBytesNoCopy (
CFAllocatorRef alloc,
CFStringRef CFStringCreateWithBytesNoCopy(CFAllocatorRef alloc,
const UInt8* bytes,
CFIndex numBytes,
CFStringEncoding encoding,

@ -9,6 +9,4 @@
#import <Foundation/Foundation.h>
CFTypeRef CFMakeCollectable ( CFTypeRef cf ) {
return cf;
}
CFTypeRef CFMakeCollectable(CFTypeRef cf) { return cf; }

@ -11,7 +11,8 @@
CTFramesetterRef __cf_alloc(CTFramesetterRef);
CTFramesetterRef CTFramesetterCreateWithAttributedString ( CFAttributedStringRef string ) {
CTFramesetterRef CTFramesetterCreateWithAttributedString(
CFAttributedStringRef string) {
CTFramesetterRef c;
return __cf_alloc(c);
}

@ -7,15 +7,14 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import <Foundation/Foundation.h>
#import <CoreText/CoreText.h>
#import <Foundation/Foundation.h>
CTParagraphStyleRef __cf_alloc(CTParagraphStyleRef);
CTParagraphStyleRef __cf_non_null_alloc(CTParagraphStyleRef);
CTParagraphStyleRef CTParagraphStyleCreate ( const CTParagraphStyleSetting *settings,
size_t settingCount ) {
CTParagraphStyleRef CTParagraphStyleCreate(
const CTParagraphStyleSetting* settings, size_t settingCount) {
CTParagraphStyleRef c;
return __cf_alloc(c);
}

@ -7,20 +7,19 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import <Foundation/Foundation.h>
#import "SystemConfiguration/SCNetworkReachability.h"
#import <Foundation/Foundation.h>
SCNetworkReachabilityRef __cf_non_null_alloc(SCNetworkReachabilityRef);
SCNetworkReachabilityRef SCNetworkReachabilityCreateWithName(
CFAllocatorRef allocator,
const char *nodename ) {
CFAllocatorRef allocator, const char* nodename) {
SCNetworkReachabilityRef c;
return __cf_non_null_alloc(c);
}
SCNetworkReachabilityRef SCNetworkReachabilityCreateWithAddress ( CFAllocatorRef allocator,
const struct sockaddr *address ) {
SCNetworkReachabilityRef SCNetworkReachabilityCreateWithAddress(
CFAllocatorRef allocator, const struct sockaddr* address) {
SCNetworkReachabilityRef c;
return __cf_non_null_alloc(c);
}

@ -13,7 +13,6 @@ SecCertificateRef __cf_alloc(SecCertificateRef);
SecCertificateRef __cf_non_null_alloc(SecCertificateRef);
SecCertificateRef SecCertificateCreateWithData(CFAllocatorRef allocator,
CFDataRef data) {
SecCertificateRef c;

@ -19,7 +19,6 @@ SecKeyRef SecTrustCopyPublicKey ( SecTrustRef trust ){
return __cf_alloc(c);
}
SecPolicyRef SecPolicyCreateSSL(Boolean server, CFStringRef hostname) {
SecPolicyRef c;
return __cf_non_null_alloc(c);

@ -14,7 +14,8 @@ CGColorRef __cf_non_null_alloc(CGColorRef);
void __objc_release_cf(CGColorRef);
void CGColorRelease(CGColorRef color) {
if (color) __objc_release_cf(color);
if (color)
__objc_release_cf(color);
}
CGColorRef CGColorCreate(CGColorSpaceRef space, const CGFloat components[]) {

@ -12,7 +12,8 @@
void __objc_release_cf(CGColorSpaceRef);
void CGColorSpaceRelease(CGColorSpaceRef space) {
if (space) __objc_release_cf(space);
if (space)
__objc_release_cf(space);
}
CGColorSpaceRef __cf_alloc(CGColorSpaceRef);

@ -14,7 +14,8 @@
void __objc_release_cf(CGContextRef);
void CGContextRelease(CGContextRef c) {
if (c) __objc_release_cf(c);
if (c)
__objc_release_cf(c);
}
CGContextRef __cf_alloc(CGContextRef);

@ -12,5 +12,6 @@
void __objc_release_cf(CGDataConsumerRef);
void CGDataConsumerRelease(CGDataConsumerRef consumer) {
if (consumer) __objc_release_cf(consumer);
if (consumer)
__objc_release_cf(consumer);
}

@ -12,7 +12,8 @@
void __objc_release_cf(CGDataProviderRef);
void CGDataProviderRelease(CGDataProviderRef provider) {
if (provider) __objc_release_cf(provider);
if (provider)
__objc_release_cf(provider);
}
CGDataProviderRef __cf_alloc(CGDataProviderRef);
@ -24,8 +25,10 @@ CGDataProviderRef CGDataProviderCreateWithCFData ( CFDataRef data ) {
return __cf_non_null_alloc(c);
}
CGDataProviderRef CGDataProviderCreateWithData ( void *info,
const void *data, size_t size,
CGDataProviderRef CGDataProviderCreateWithData(
void* info,
const void* data,
size_t size,
CGDataProviderReleaseDataCallback releaseData) {
CGDataProviderRef c;
return __cf_non_null_alloc(c);
@ -36,16 +39,14 @@ CGDataProviderRef CGDataProviderCreateWithURL ( CFURLRef url ) {
return __cf_alloc(c);
}
CGDataProviderRef CGDataProviderCreateDirect ( void *info,
off_t size,
const CGDataProviderDirectCallbacks *callbacks) {
CGDataProviderRef CGDataProviderCreateDirect(
void* info, off_t size, const CGDataProviderDirectCallbacks* callbacks) {
CGDataProviderRef c;
return __cf_non_null_alloc(c);
}
CGDataProviderRef CGDataProviderCreateSequential ( void *info,
const CGDataProviderSequentialCallbacks *callbacks ) {
CGDataProviderRef CGDataProviderCreateSequential(
void* info, const CGDataProviderSequentialCallbacks* callbacks) {
CGDataProviderRef c;
return __cf_non_null_alloc(c);
}

@ -14,7 +14,8 @@ void __objc_release_cf(CGFontRef);
CGFontRef __cf_alloc(CGFontRef);
void CGFontRelease(CGFontRef font) {
if (font) __objc_release_cf(font);
if (font)
__objc_release_cf(font);
}
CGFontRef CGFontCreateWithDataProvider(CGDataProviderRef provider) {

@ -12,5 +12,6 @@
void __objc_release_cf(CGFunctionRef);
void CGFunctionRelease(CGFunctionRef function) {
if (function) __objc_release_cf(function);
if (function)
__objc_release_cf(function);
}

@ -12,7 +12,8 @@
void __objc_release_cf(CGGradientRef);
void CGGradientRelease(CGGradientRef gradient) {
if (gradient) __objc_release_cf(gradient);
if (gradient)
__objc_release_cf(gradient);
}
CGGradientRef __cf_non_null_alloc(CGGradientRef);

@ -14,26 +14,26 @@ CGImageRef __cf_non_null_alloc(CGImageRef);
CGImageRef __cf_alloc(CGImageRef);
void __objc_release_cf(CGImageRef);
CGImageRef CGImageSourceCreateImageAtIndex ( CGImageSourceRef isrc, size_t index, CFDictionaryRef options )
{
CGImageRef CGImageSourceCreateImageAtIndex(CGImageSourceRef isrc,
size_t index,
CFDictionaryRef options) {
CGImageRef c;
return __cf_non_null_alloc(c);
}
CGImageRef CGImageSourceCreateThumbnailAtIndex ( CGImageSourceRef isrc, size_t index, CFDictionaryRef options )
{
CGImageRef CGImageSourceCreateThumbnailAtIndex(CGImageSourceRef isrc,
size_t index,
CFDictionaryRef options) {
CGImageRef c;
return __cf_non_null_alloc(c);
}
void CGImageRelease ( CGImageRef image )
{
if (image) __objc_release_cf(image);
void CGImageRelease(CGImageRef image) {
if (image)
__objc_release_cf(image);
}
CGImageRef CGBitmapContextCreateImage ( CGContextRef context )
{
CGImageRef CGBitmapContextCreateImage(CGContextRef context) {
CGImageRef c;
return __cf_alloc(c);
}

@ -21,7 +21,8 @@ CGImageDestinationRef CGImageDestinationCreateWithURL (CFURLRef url,
return __cf_non_null_alloc(c);
}
CGImageDestinationRef CGImageDestinationCreateWithData ( CFMutableDataRef data,
CGImageDestinationRef CGImageDestinationCreateWithData(
CFMutableDataRef data,
CFStringRef type,
size_t count,
CFDictionaryRef options) {

@ -14,31 +14,30 @@ CGImageSourceRef __cf_non_null_alloc(CGImageSourceRef);
CGImageSourceRef __cf_alloc(CGImageSourceRef);
void __objc_release_cf(CGImageSourceRef);
CGImageSourceRef CGImageSourceCreateWithData ( CFDataRef data, CFDictionaryRef options )
{
CGImageSourceRef CGImageSourceCreateWithData(CFDataRef data,
CFDictionaryRef options) {
CGImageSourceRef c;
return __cf_non_null_alloc(c);
}
CGImageSourceRef CGImageSourceCreateWithDataProvider ( CGDataProviderRef provider, CFDictionaryRef options )
{
CGImageSourceRef CGImageSourceCreateWithDataProvider(CGDataProviderRef provider,
CFDictionaryRef options) {
CGImageSourceRef c;
return __cf_non_null_alloc(c);
}
CGImageSourceRef CGImageSourceCreateWithURL ( CFURLRef url, CFDictionaryRef options )
{
CGImageSourceRef CGImageSourceCreateWithURL(CFURLRef url,
CFDictionaryRef options) {
CGImageSourceRef c;
return __cf_alloc(c);
}
CGImageSourceRef CGImageSourceCreateIncremental ( CFDictionaryRef options )
{
CGImageSourceRef CGImageSourceCreateIncremental(CFDictionaryRef options) {
CGImageSourceRef c;
return __cf_non_null_alloc(c);
}
void CGImageSourceRelease ( CGImageSourceRef image )
{
if (image) __objc_release_cf(image);
void CGImageSourceRelease(CGImageSourceRef image) {
if (image)
__objc_release_cf(image);
}

@ -12,5 +12,6 @@
void __objc_release_cf(CGLayerRef);
void CGLayerRelease(CGLayerRef layer) {
if (layer) __objc_release_cf(layer);
if (layer)
__objc_release_cf(layer);
}

@ -12,5 +12,6 @@
void __objc_release_cf(CGPDFContentStreamRef);
void CGPDFContentStreamRelease(CGPDFContentStreamRef cs) {
if (cs) __objc_release_cf(cs);
if (cs)
__objc_release_cf(cs);
}

@ -12,5 +12,6 @@
void __objc_release_cf(CGPDFDocumentRef);
void CGPDFDocumentRelease(CGPDFDocumentRef document) {
if (document) __objc_release_cf(document);
if (document)
__objc_release_cf(document);
}

@ -12,5 +12,6 @@
void __objc_release_cf(CGPDFOperatorTableRef);
void CGPDFOperatorTableRelease(CGPDFOperatorTableRef table) {
if (table) __objc_release_cf(table);
if (table)
__objc_release_cf(table);
}

@ -12,5 +12,6 @@
void __objc_release_cf(CGPDFPageRef);
void CGPDFPageRelease(CGPDFPageRef page) {
if (page) __objc_release_cf(page);
if (page)
__objc_release_cf(page);
}

@ -12,5 +12,6 @@
void __objc_release_cf(CGPDFScannerRef);
void CGPDFScannerRelease(CGPDFScannerRef scanner) {
if (scanner) __objc_release_cf(scanner);
if (scanner)
__objc_release_cf(scanner);
}

@ -18,16 +18,17 @@ CGMutablePathRef CGPathCreateMutable () {
return (CGMutablePathRef)__cf_non_null_alloc(c);
}
CGPathRef CGPathCreateWithRect ( CGRect rect, const CGAffineTransform *transform ) {
CGPathRef CGPathCreateWithRect(CGRect rect,
const CGAffineTransform* transform) {
CGPathRef c;
return __cf_non_null_alloc(c);
}
void CGPathRelease(CGPathRef path) {
if (path) __objc_release_cf(path);
if (path)
__objc_release_cf(path);
}
CGPathRef CGPathCreateWithEllipseInRect(CGRect rect,
const CGAffineTransform* transform) {
CGPathRef c;
@ -39,8 +40,8 @@ CGPathRef CGPathCreateCopy ( CGPathRef path ) {
return __cf_non_null_alloc(c);
}
CGPathRef CGPathCreateCopyByTransformingPath ( CGPathRef path,
const CGAffineTransform *transform ) {
CGPathRef CGPathCreateCopyByTransformingPath(
CGPathRef path, const CGAffineTransform* transform) {
CGPathRef c;
return __cf_non_null_alloc(c);
}

@ -12,5 +12,6 @@
void __objc_release_cf(CGPatternRef);
void CGPatternRelease(CGPatternRef pattern) {
if (pattern) __objc_release_cf(pattern);
if (pattern)
__objc_release_cf(pattern);
}

@ -12,5 +12,6 @@
void __objc_release_cf(CGShadingRef);
void CGShadingRelease(CGShadingRef shading) {
if (shading) __objc_release_cf(shading);
if (shading)
__objc_release_cf(shading);
}

@ -17,7 +17,9 @@ NSData* __objc_alloc(NSData*);
@property(nonatomic, readonly) const void* bytes;
+ (instancetype)dataWithBytesNoCopy:(void*)bytes length:(NSUInteger)length;
+ (instancetype)dataWithBytesNoCopy:(void *)bytes length:(NSUInteger)length freeWhenDone:(BOOL)b;
+ (instancetype)dataWithBytesNoCopy:(void*)bytes
length:(NSUInteger)length
freeWhenDone:(BOOL)b;
@end
@ -27,13 +29,15 @@ NSData* __objc_alloc(NSData*);
return [NSData dataWithBytesNoCopy:bytes length:length freeWhenDone:YES];
}
+ (instancetype)dataWithBytesNoCopy:(void *)bytes length:(NSUInteger)length freeWhenDone:(BOOL)b {
+ (instancetype)dataWithBytesNoCopy:(void*)bytes
length:(NSUInteger)length
freeWhenDone:(BOOL)b {
NSData* data = __objc_alloc(self);
if (data) {
data->_bytes = bytes;
return data;
}
else return nil;
} else
return nil;
}
- (void)dealloc {

@ -34,5 +34,4 @@
return [NSMutableArray alloc];
}
@end

@ -28,24 +28,20 @@ void __set_unsubscribed_observer_attribute(id);
@implementation NSNotificationCenter
- (void)addObserver:(id)notificationObserver
selector:(SEL)notificationSelector
name:(NSString*)notificationName
object:(id)notificationSender
{
object:(id)notificationSender {
__set_observer_attribute(notificationObserver);
}
- (void) removeObserver:(id)notificationObserver
{
- (void)removeObserver:(id)notificationObserver {
__set_unsubscribed_observer_attribute(notificationObserver);
}
- (void)removeObserver:(id)notificationObserver
name:(NSString*)notificationName
object:(id)notificationSender
{
object:(id)notificationSender {
__set_unsubscribed_observer_attribute(notificationObserver);
}

@ -9,7 +9,6 @@
#import "NSNumber.h"
@implementation NSNumber
+ (NSNumber*)numberWithInt:(int)value {

@ -7,27 +7,19 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import <Foundation/NSObject.h>
#import <Foundation/NSDate.h>
#import <Foundation/NSObject.h>
@class NSTimer;
@interface NSRunLoop : NSObject
+ (NSRunLoop*)currentRunLoop;
+ (NSRunLoop*)mainRunLoop;
- (void)acceptInputForMode:(NSString*)mode beforeDate:(NSDate*)limit_date;
- (void) acceptInputForMode: (NSString*)mode
beforeDate: (NSDate*)limit_date;
- (void) addTimer: (NSTimer*)timer
forMode: (NSString*)mode;
- (void)addTimer:(NSTimer*)timer forMode:(NSString*)mode;
- (NSString*)currentMode;
@ -35,11 +27,8 @@
- (void)run;
- (BOOL) runMode: (NSString*)mode
beforeDate: (NSDate*)date;
- (BOOL)runMode:(NSString*)mode beforeDate:(NSDate*)date;
- (void)runUntilDate:(NSDate*)date;
@end

@ -7,7 +7,6 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import "NSRunLoop.h"
@implementation NSRunLoop
@ -22,10 +21,7 @@
return [NSRunLoop alloc];
};
- (void) acceptInputForMode: (NSString*)mode
beforeDate: (NSDate*)limit_date {
};
- (void)acceptInputForMode:(NSString*)mode beforeDate:(NSDate*)limit_date{};
- (void)addTimer:(NSTimer*)timer
forMode:(NSString*)mode{
@ -43,8 +39,7 @@
- (void)run{};
- (BOOL) runMode: (NSString*)mode
beforeDate: (NSDate*)date {
- (BOOL)runMode:(NSString*)mode beforeDate:(NSDate*)date {
int res;
return res;
@ -53,4 +48,3 @@
- (void)runUntilDate:(NSDate*)date{};
@end

@ -32,6 +32,5 @@ void __get_array_size(const UInt8);
}
}
return self;
}
@end

@ -11,9 +11,7 @@
@class NSInvocation;
@interface NSTimer : NSObject
{
@interface NSTimer : NSObject {
NSTimeInterval _interval;
id _info;
id _target;

@ -13,18 +13,15 @@
// Note: we do not link timers to NSRunLoop as this is irrelevant for
// our models. If at some point becomes important it needs to be changed.
void free(void* ptr);
@implementation NSTimer
+ (NSTimer*)timerWithTimeInterval:(NSTimeInterval)seconds
invocation:(NSInvocation*)invocation
repeats:(BOOL)f
{
repeats:(BOOL)f {
NSTimer* t = [self alloc];
if(t)
{
if (t) {
t->_interval = seconds;
t->_fireDate = [NSDate alloc];
t->_is_valid = YES;
@ -38,8 +35,7 @@ void free(void *ptr);
target:(id)object
selector:(SEL)selector
userInfo:(id)info
repeats:(BOOL)f
{
repeats:(BOOL)f {
NSDate* d = [NSDate alloc];
return [[self alloc] initWithFireDate:d
interval:seconds
@ -51,8 +47,7 @@ void free(void *ptr);
+ (NSTimer*)scheduledTimerWithTimeInterval:(NSTimeInterval)ti
invocation:(NSInvocation*)invocation
repeats:(BOOL)f
{
repeats:(BOOL)f {
NSTimer* t = [self timerWithTimeInterval:ti invocation:invocation repeats:f];
return t;
}
@ -61,8 +56,7 @@ void free(void *ptr);
target:(id)object
selector:(SEL)selector
userInfo:(id)info
repeats:(BOOL)f
{
repeats:(BOOL)f {
NSTimer* t = [self timerWithTimeInterval:ti
target:object
selector:selector
@ -76,8 +70,7 @@ void free(void *ptr);
target:(id)object
selector:(SEL)selector
userInfo:(id)info
repeats:(BOOL)f
{
repeats:(BOOL)f {
_interval = seconds;
_fireDate = date;
_is_valid = YES;
@ -89,27 +82,22 @@ void free(void *ptr);
return self;
}
- (void) dealloc
{
- (void)dealloc {
_fireDate = nil;
free(self);
}
- (NSString*)description;
{
return [NSString alloc];
}
{ return [NSString alloc]; }
// Abstract everything except making the timer invalid if
// cannot repeat
- (void) fire
{
- (void)fire {
if (!_repeats)
_is_valid = NO;
}
- (void) invalidate
{
- (void)invalidate {
_is_valid = NO;
}
@ -131,12 +119,9 @@ void free(void *ptr);
}
- (void)setFireDate:(NSDate*)date;
{
_fireDate =date;
}
{ _fireDate = date; }
- (int) compare:(NSTimer*)anotherTimer
{
- (int)compare:(NSTimer*)anotherTimer {
int res;
return res;
}

@ -8,8 +8,8 @@
*/
#include "clang/Frontend/FrontendPluginRegistry.h"
#include "clang/AST/ASTConsumer.h"
#include "clang/AST/AST.h"
#include "clang/AST/ASTConsumer.h"
#include "clang/Frontend/CompilerInstance.h"
#include "llvm/Support/raw_ostream.h"
using namespace clang;
@ -57,9 +57,8 @@ namespace {
void PrintHelp(llvm::raw_ostream& ros) {
ros << "Help for toplevel-plugin plugin goes here\n";
}
};
}
static FrontendPluginRegistry::Add<PrintFunctionNamesAction> X("infer-plugin", "print function names");
static FrontendPluginRegistry::Add<PrintFunctionNamesAction> X(
"infer-plugin", "print function names");

@ -7,12 +7,10 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
#include <stdlib.h>
#include <assert.h>
#include <stdlib.h>
void simple_check(int x) {
assert(x < 3);
}
void simple_check(int x) { assert(x < 3); }
void simple_assertion_failure() {
int x = 4;
@ -24,13 +22,9 @@ void no_assertion_failure() {
simple_check(x);
}
typedef struct {
int value;
} node;
typedef struct { int value; } node;
void check_node(node *n) {
assert(n->value < 3);
}
void check_node(node* n) { assert(n->value < 3); }
node* assertion_failure_with_heap() {
node* n = malloc(sizeof(node));
@ -58,9 +52,7 @@ void my_assert(int x) {
}
}
void should_not_report_assertion_failure(int x) {
my_assert(x);
}
void should_not_report_assertion_failure(int x) { my_assert(x); }
void should_report_assertion_failure(int x) {
x = 0;
@ -69,9 +61,7 @@ void should_report_assertion_failure(int x) {
int global;
void check_global() {
assert(global != 0);
}
void check_global() { assert(global != 0); }
void skip() {}

@ -12,7 +12,8 @@
void __infer_fail(char*);
void check_exponent(int x) {
if (x < 0) __infer_fail("UNEXPECTED_NEGATIVE_EXPONENT");
if (x < 0)
__infer_fail("UNEXPECTED_NEGATIVE_EXPONENT");
}
int power(int x) {
@ -32,9 +33,7 @@ int paf() {
int global;
void set_global() {
global = -2;
}
void set_global() { global = -2; }
int pouf() {
set_global();

@ -12,10 +12,6 @@ struct point {
int y;
};
int return_zero() {
return ((struct point) { .y = 32, .x = 0 }).x;
}
int return_zero() { return ((struct point){.y = 32, .x = 0}).x; }
int divide_by_zero() {
return 1/return_zero();
}
int divide_by_zero() { return 1 / return_zero(); }

@ -7,17 +7,18 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
int m(int z) {
int y = 0;
int x = 5;
if (z < 10) {
int x = 7;
if (x == 7) return x/y;
if (x == 7)
return x / y;
}
if (x == 5)
return x / y;
else return 0;
else
return 0;
}
int mm() {
@ -25,11 +26,13 @@ int mm() {
int x = 0;
{
int x = 5;
if (x == 5) return x/y;
if (x == 5)
return x / y;
}
if (x == 0)
return x / y;
else return 0;
else
return 0;
}
int t() {
@ -39,8 +42,10 @@ int t() {
for (int x = 0; x < 10; x++) {
int x = 9;
if (x == 9) return x/y;
else return 0;
if (x == 9)
return x / y;
else
return 0;
}
return 0;
}

@ -20,7 +20,8 @@ void common_realloc_leak() {
p = (int*)malloc(sizeof(int));
q = (int*)realloc(p, sizeof(int) * 42);
// if realloc fails, then p becomes unreachable
if (q != NULL) free(q);
if (q != NULL)
free(q);
}
int* allocate() {
@ -37,6 +38,4 @@ void uses_allocator() {
*p = 42;
}
void * builtin_no_leak(size_t s) {
return memset(malloc(s), 0, s);
}
void* builtin_no_leak(size_t s) { return memset(malloc(s), 0, s); }

@ -50,20 +50,16 @@ void nocrash_fgetc() {
}
}
void crash_ungetc()
{
void crash_ungetc() {
FILE* f;
f = fopen("this_file_doesnt_exist", "r");
int i = ungetc(10, f);
fclose(f);
}
void nocrash_ungetc()
{
void nocrash_ungetc() {
FILE* f;
f = fopen("this_file_doesnt_exist", "r");
@ -73,18 +69,15 @@ void nocrash_ungetc()
}
}
void crash_fputs()
{
void crash_fputs() {
FILE* f;
f = fopen("this_file_doesnt_exist", "r");
fputs("blablabla", f);
fclose(f);
}
void nocrash_fputs()
{
void nocrash_fputs() {
FILE* f;
f = fopen("this_file_doesnt_exist", "r");
@ -94,18 +87,15 @@ void nocrash_fputs()
}
}
void crash_fputc()
{
void crash_fputc() {
FILE* f;
f = fopen("this_file_doesnt_exist", "r");
fputc(42, f);
fclose(f);
}
void nocrash_fputc()
{
void nocrash_fputc() {
FILE* f;
f = fopen("this_file_doesnt_exist", "r");
@ -115,18 +105,15 @@ void nocrash_fputc()
}
}
void crash_putc()
{
void crash_putc() {
FILE* f;
f = fopen("this_file_doesnt_exist", "r");
putc(42, f);
fclose(f);
}
void nocrash_putc()
{
void nocrash_putc() {
FILE* f;
f = fopen("this_file_doesnt_exist", "r");
@ -136,18 +123,15 @@ void nocrash_putc()
}
}
void crash_fseeks()
{
void crash_fseeks() {
FILE* f;
f = fopen("this_file_doesnt_exist", "r");
fseek(f, 7, SEEK_SET);
fclose(f);
}
void nocrash_fseek()
{
void nocrash_fseek() {
FILE* f;
f = fopen("this_file_doesnt_exist", "r");
@ -157,18 +141,15 @@ void nocrash_fseek()
}
}
void crash_ftell()
{
void crash_ftell() {
FILE* f;
f = fopen("this_file_doesnt_exist", "r");
ftell(f);
fclose(f);
}
void nocrash_ftell()
{
void nocrash_ftell() {
FILE* f;
f = fopen("this_file_doesnt_exist", "r");
@ -178,19 +159,16 @@ void nocrash_ftell()
}
}
void crash_fgets()
{
void crash_fgets() {
FILE* f;
char str[60];
f = fopen("this_file_doesnt_exist", "r");
fgets(str, 60, f);
fclose(f);
}
void nocrash_fgets()
{
void nocrash_fgets() {
FILE* f;
char str[60];
@ -201,19 +179,15 @@ void nocrash_fgets()
}
}
void crash_rewind()
{
void crash_rewind() {
FILE* f;
f = fopen("this_file_doesnt_exist", "r");
rewind(f);
fclose(f);
}
void nocrash_rewind()
{
void nocrash_rewind() {
FILE* f;
f = fopen("this_file_doesnt_exist", "r");
@ -223,18 +197,15 @@ void nocrash_rewind()
}
}
void crash_fileno()
{
void crash_fileno() {
FILE* f;
f = fopen("this_file_doesnt_exist", "r");
fileno(f);
fclose(f);
}
void nocrash_fileno()
{
void nocrash_fileno() {
FILE* f;
f = fopen("this_file_doesnt_exist", "r");
@ -244,19 +215,15 @@ void nocrash_fileno()
}
}
void crash_clearerr()
{
void crash_clearerr() {
FILE* f;
f = fopen("this_file_doesnt_exist", "r");
clearerr(f);
fclose(f);
}
void nocrash_clearerr()
{
void nocrash_clearerr() {
FILE* f;
f = fopen("this_file_doesnt_exist", "r");
@ -266,18 +233,15 @@ void nocrash_clearerr()
}
}
void crash_ferror()
{
void crash_ferror() {
FILE* f;
f = fopen("this_file_doesnt_exist", "r");
ferror(f);
fclose(f);
}
void nocrash_ferror()
{
void nocrash_ferror() {
FILE* f;
f = fopen("this_file_doesnt_exist", "r");
@ -287,18 +251,15 @@ void nocrash_ferror()
}
}
void crash_feof()
{
void crash_feof() {
FILE* f;
f = fopen("this_file_doesnt_exist", "r");
feof(f);
fclose(f);
}
void nocrash_feof()
{
void nocrash_feof() {
FILE* f;
f = fopen("this_file_doesnt_exist", "r");
@ -308,20 +269,15 @@ void nocrash_feof()
}
}
void crash_fprintf()
{
void crash_fprintf() {
FILE* f;
f = fopen("this_file_doesnt_exist", "r");
fprintf(f, "blablabla\n");
fclose(f);
}
void nocrash_fprintf()
{
void nocrash_fprintf() {
FILE* f;
f = fopen("this_file_doesnt_exist", "r");
@ -331,19 +287,16 @@ void nocrash_fprintf()
}
}
void crash_vfprintf()
{
void crash_vfprintf() {
FILE* f;
va_list arg;
f = fopen("this_file_doesnt_exist", "r");
vfprintf(f, "blablabla\n", arg);
fclose(f);
}
void nocrash_vfprintf()
{
void nocrash_vfprintf() {
FILE* f;
va_list arg;
@ -354,20 +307,16 @@ void nocrash_vfprintf()
}
}
void crash_fgetpos()
{
void crash_fgetpos() {
FILE* f;
fpos_t position;
f = fopen("this_file_doesnt_exist", "r");
fgetpos(f, &position);
fclose(f);
}
void nocrash_fgetpos()
{
void nocrash_fgetpos() {
FILE* f;
fpos_t position;
@ -378,19 +327,16 @@ void nocrash_fgetpos()
}
}
void crash_fsetpos()
{
void crash_fsetpos() {
FILE* f;
fpos_t position;
f = fopen("this_file_doesnt_exist", "r");
fsetpos(f, &position);
fclose(f);
}
void nocrash_fsetpos()
{
void nocrash_fsetpos() {
FILE* f;
fpos_t position;

@ -25,9 +25,7 @@ struct Person *Person_create(int age, int height, int weight) {
return who;
}
int get_age(struct Person *who) {
return who->age;
}
int get_age(struct Person* who) { return who->age; }
int null_pointer_interproc() {
struct Person* joe = Person_create(32, 64, 140);
@ -36,14 +34,14 @@ int null_pointer_interproc() {
int negation_in_conditional() {
int* x = 0;
if (!x) return 0;
else return *x; // this never happens
}
int * foo() {
if (!x)
return 0;
else
return *x; // this never happens
}
int* foo() { return 0; }
void null_pointer_with_function_pointer() {
int* (*fp)();
fp = foo;
@ -82,9 +80,7 @@ void no_check_for_null_after_realloc() {
free(q);
}
void assign(int *p, int n) {
*p = n;
}
void assign(int* p, int n) { *p = n; }
void potentially_null_pointer_passed_as_argument() {
int* p = NULL;

@ -14,15 +14,13 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/select.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
void fileNotClosed()
{
void fileNotClosed() {
int fd = open("hi.txt", O_WRONLY | O_CREAT | O_TRUNC, 0600);
if (fd != -1) {
char buffer[256];
@ -31,8 +29,7 @@ void fileNotClosed()
}
}
void fileClosed()
{
void fileClosed() {
int fd = open("hi.txt", O_WRONLY | O_CREAT | O_TRUNC, 0600);
if (fd != -1) {
char buffer[256];
@ -42,8 +39,7 @@ void fileClosed()
}
}
void socketNotClosed()
{
void socketNotClosed() {
int fd = socket(AF_LOCAL, SOCK_RAW, 0);
if (fd != -1) {
char buffer[256];
@ -52,8 +48,7 @@ void socketNotClosed()
}
}
int socketClosed()
{
int socketClosed() {
int socketFD = socket(AF_LOCAL, SOCK_RAW, 0);
if (socketFD == -1) {
return -1;
@ -68,14 +63,16 @@ int socketClosed()
}
int reuseaddr = 1;
status = setsockopt(socketFD, SOL_SOCKET, SO_REUSEADDR, &reuseaddr, sizeof(reuseaddr));
status = setsockopt(
socketFD, SOL_SOCKET, SO_REUSEADDR, &reuseaddr, sizeof(reuseaddr));
if (status == -1) {
close(socketFD);
return -1;
}
int nosigpipe = 1;
status = setsockopt(socketFD, SOL_SOCKET, SO_REUSEADDR, &nosigpipe, sizeof(nosigpipe));
status = setsockopt(
socketFD, SOL_SOCKET, SO_REUSEADDR, &nosigpipe, sizeof(nosigpipe));
if (status == -1) {
close(socketFD);
return -1;

@ -9,6 +9,4 @@
#include <stdbool.h>
bool revert(bool e) {
return e;
}
bool revert(bool e) { return e; }

@ -1,5 +1,5 @@
digraph iCFG {
3 [label="3: Return Stmt \n n$0=*&e:_Bool [line 13]\n *&return:_Bool =n$0 [line 13]\n REMOVE_TEMPS(n$0); [line 13]\n NULLIFY(&e,false); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="box"]
3 [label="3: Return Stmt \n n$0=*&e:_Bool [line 12]\n *&return:_Bool =n$0 [line 12]\n REMOVE_TEMPS(n$0); [line 12]\n NULLIFY(&e,false); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"]
3 -> 2 ;

@ -7,8 +7,7 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
void check(int x) {
}
void check(int x) {}
void main() {
int x = 3;

@ -1,16 +1,16 @@
digraph iCFG {
6 [label="6: DeclStmt \n *&x:int =3 [line 14]\n " shape="box"]
6 [label="6: DeclStmt \n *&x:int =3 [line 13]\n " shape="box"]
6 -> 5 ;
5 [label="5: Call _fun_check \n n$0=*&x:int [line 15]\n _fun_check((n$0 < 2):int ) [line 15]\n REMOVE_TEMPS(n$0); [line 15]\n NULLIFY(&x,false); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"]
5 [label="5: Call _fun_check \n n$0=*&x:int [line 14]\n _fun_check((n$0 < 2):int ) [line 14]\n REMOVE_TEMPS(n$0); [line 14]\n NULLIFY(&x,false); [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"]
5 -> 4 ;
4 [label="4: Exit main \n " color=yellow style=filled]
3 [label="3: Start main\nFormals: \nLocals: x:int \n DECLARE_LOCALS(&return,&x); [line 13]\n NULLIFY(&x,false); [line 13]\n " color=yellow style=filled]
3 [label="3: Start main\nFormals: \nLocals: x:int \n DECLARE_LOCALS(&return,&x); [line 12]\n NULLIFY(&x,false); [line 12]\n " color=yellow style=filled]
3 -> 6 ;

@ -22,6 +22,4 @@ int main (void) {
return 0;
}
int sum (int a, int b) {
return a + b;
}
int sum(int a, int b) { return a + b; }

@ -1,5 +1,5 @@
digraph iCFG {
7 [label="7: Return Stmt \n n$0=*&a:int [line 26]\n n$1=*&b:int [line 26]\n *&return:int =(n$0 + n$1) [line 26]\n REMOVE_TEMPS(n$0,n$1); [line 26]\n NULLIFY(&a,false); [line 26]\n NULLIFY(&b,false); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"]
7 [label="7: Return Stmt \n n$0=*&a:int [line 25]\n n$1=*&b:int [line 25]\n *&return:int =(n$0 + n$1) [line 25]\n REMOVE_TEMPS(n$0,n$1); [line 25]\n NULLIFY(&a,false); [line 25]\n NULLIFY(&b,false); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"]
7 -> 6 ;

@ -8,8 +8,12 @@
*/
void dereference_in_array_access(int** p) {
if (p[0]);
if ((*p)[1]);
if (p[**p]);
if ((*p)[**p]);
if (p[0])
;
if ((*p)[1])
;
if (p[**p])
;
if ((*p)[**p])
;
}

@ -11,15 +11,15 @@ digraph iCFG {
16 -> 13 ;
15 [label="15: Prune (false branch) \n n$12=*n$11:int * [line 12]\n n$13=*n$12[1]:int [line 12]\n PRUNE((n$13 == 0), false); [line 12]\n REMOVE_TEMPS(n$11,n$12,n$13); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="invhouse"]
15 [label="15: Prune (false branch) \n n$12=*n$11:int * [line 13]\n n$13=*n$12[1]:int [line 13]\n PRUNE((n$13 == 0), false); [line 13]\n REMOVE_TEMPS(n$11,n$12,n$13); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="invhouse"]
15 -> 12 ;
14 [label="14: Prune (true branch) \n n$12=*n$11:int * [line 12]\n n$13=*n$12[1]:int [line 12]\n PRUNE((n$13 != 0), true); [line 12]\n REMOVE_TEMPS(n$11,n$12,n$13); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="invhouse"]
14 [label="14: Prune (true branch) \n n$12=*n$11:int * [line 13]\n n$13=*n$12[1]:int [line 13]\n PRUNE((n$13 != 0), true); [line 13]\n REMOVE_TEMPS(n$11,n$12,n$13); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="invhouse"]
14 -> 12 ;
13 [label="13: UnaryOperator \n n$11=*&p:int ** [line 12]\n " shape="box"]
13 [label="13: UnaryOperator \n n$11=*&p:int ** [line 13]\n " shape="box"]
13 -> 14 ;
@ -28,15 +28,15 @@ digraph iCFG {
12 -> 9 ;
11 [label="11: Prune (false branch) \n n$6=*&p:int ** [line 13]\n n$9=*n$8:int [line 13]\n n$10=*n$6[n$9]:int * [line 13]\n PRUNE((n$10 == 0), false); [line 13]\n REMOVE_TEMPS(n$7,n$8,n$9,n$6,n$10); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="invhouse"]
11 [label="11: Prune (false branch) \n n$6=*&p:int ** [line 15]\n n$9=*n$8:int [line 15]\n n$10=*n$6[n$9]:int * [line 15]\n PRUNE((n$10 == 0), false); [line 15]\n REMOVE_TEMPS(n$7,n$8,n$9,n$6,n$10); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="invhouse"]
11 -> 8 ;
10 [label="10: Prune (true branch) \n n$6=*&p:int ** [line 13]\n n$9=*n$8:int [line 13]\n n$10=*n$6[n$9]:int * [line 13]\n PRUNE((n$10 != 0), true); [line 13]\n REMOVE_TEMPS(n$7,n$8,n$9,n$6,n$10); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="invhouse"]
10 [label="10: Prune (true branch) \n n$6=*&p:int ** [line 15]\n n$9=*n$8:int [line 15]\n n$10=*n$6[n$9]:int * [line 15]\n PRUNE((n$10 != 0), true); [line 15]\n REMOVE_TEMPS(n$7,n$8,n$9,n$6,n$10); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="invhouse"]
10 -> 8 ;
9 [label="9: UnaryOperator \n n$7=*&p:int ** [line 13]\n n$8=*n$7:int * [line 13]\n " shape="box"]
9 [label="9: UnaryOperator \n n$7=*&p:int ** [line 15]\n n$8=*n$7:int * [line 15]\n " shape="box"]
9 -> 10 ;
@ -45,20 +45,20 @@ digraph iCFG {
8 -> 4 ;
7 [label="7: Prune (false branch) \n n$1=*n$0:int * [line 14]\n n$4=*n$3:int [line 14]\n n$5=*n$1[n$4]:int [line 14]\n PRUNE((n$5 == 0), false); [line 14]\n REMOVE_TEMPS(n$2,n$3,n$4,n$0,n$1,n$5); [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="invhouse"]
7 [label="7: Prune (false branch) \n n$1=*n$0:int * [line 17]\n n$4=*n$3:int [line 17]\n n$5=*n$1[n$4]:int [line 17]\n PRUNE((n$5 == 0), false); [line 17]\n REMOVE_TEMPS(n$2,n$3,n$4,n$0,n$1,n$5); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="invhouse"]
7 -> 3 ;
6 [label="6: Prune (true branch) \n n$1=*n$0:int * [line 14]\n n$4=*n$3:int [line 14]\n n$5=*n$1[n$4]:int [line 14]\n PRUNE((n$5 != 0), true); [line 14]\n REMOVE_TEMPS(n$2,n$3,n$4,n$0,n$1,n$5); [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="invhouse"]
6 [label="6: Prune (true branch) \n n$1=*n$0:int * [line 17]\n n$4=*n$3:int [line 17]\n n$5=*n$1[n$4]:int [line 17]\n PRUNE((n$5 != 0), true); [line 17]\n REMOVE_TEMPS(n$2,n$3,n$4,n$0,n$1,n$5); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="invhouse"]
6 -> 3 ;
5 [label="5: UnaryOperator \n n$2=*&p:int ** [line 14]\n n$3=*n$2:int * [line 14]\n NULLIFY(&p,false); [line 14]\n " shape="box"]
5 [label="5: UnaryOperator \n n$2=*&p:int ** [line 17]\n n$3=*n$2:int * [line 17]\n NULLIFY(&p,false); [line 17]\n " shape="box"]
5 -> 6 ;
5 -> 7 ;
4 [label="4: UnaryOperator \n n$0=*&p:int ** [line 14]\n " shape="box"]
4 [label="4: UnaryOperator \n n$0=*&p:int ** [line 17]\n " shape="box"]
4 -> 5 ;

@ -18,7 +18,6 @@ void binop_with_side_effects(int z) {
int x3;
x3 = (1 ? z : z) + (1 ? z : z);
// initializer
int y1 = (1 ? z : z) + 77;

@ -95,24 +95,24 @@ digraph iCFG {
26 -> 32 ;
26 -> 33 ;
25 [label="25: DeclStmt \n n$11=*&SIL_temp_conditional___20:int [line 23]\n NULLIFY(&SIL_temp_conditional___20,true); [line 23]\n *&y1:int =(n$11 + 77) [line 23]\n REMOVE_TEMPS(n$11); [line 23]\n NULLIFY(&y1,false); [line 23]\n " shape="box"]
25 [label="25: DeclStmt \n n$11=*&SIL_temp_conditional___20:int [line 22]\n NULLIFY(&SIL_temp_conditional___20,true); [line 22]\n *&y1:int =(n$11 + 77) [line 22]\n REMOVE_TEMPS(n$11); [line 22]\n NULLIFY(&y1,false); [line 22]\n " shape="box"]
25 -> 15 ;
25 -> 16 ;
24 [label="24: ConditinalStmt Branch \n n$10=*&z:int [line 23]\n DECLARE_LOCALS(&SIL_temp_conditional___20); [line 23]\n *&SIL_temp_conditional___20:int =n$10 [line 23]\n REMOVE_TEMPS(n$10); [line 23]\n APPLY_ABSTRACTION; [line 23]\n " shape="box"]
24 [label="24: ConditinalStmt Branch \n n$10=*&z:int [line 22]\n DECLARE_LOCALS(&SIL_temp_conditional___20); [line 22]\n *&SIL_temp_conditional___20:int =n$10 [line 22]\n REMOVE_TEMPS(n$10); [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"]
24 -> 20 ;
23 [label="23: ConditinalStmt Branch \n n$9=*&z:int [line 23]\n DECLARE_LOCALS(&SIL_temp_conditional___20); [line 23]\n *&SIL_temp_conditional___20:int =n$9 [line 23]\n REMOVE_TEMPS(n$9); [line 23]\n APPLY_ABSTRACTION; [line 23]\n " shape="box"]
23 [label="23: ConditinalStmt Branch \n n$9=*&z:int [line 22]\n DECLARE_LOCALS(&SIL_temp_conditional___20); [line 22]\n *&SIL_temp_conditional___20:int =n$9 [line 22]\n REMOVE_TEMPS(n$9); [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"]
23 -> 20 ;
22 [label="22: Prune (false branch) \n PRUNE((1 == 0), false); [line 23]\n " shape="invhouse"]
22 [label="22: Prune (false branch) \n PRUNE((1 == 0), false); [line 22]\n " shape="invhouse"]
22 -> 24 ;
21 [label="21: Prune (true branch) \n PRUNE((1 != 0), true); [line 23]\n " shape="invhouse"]
21 [label="21: Prune (true branch) \n PRUNE((1 != 0), true); [line 22]\n " shape="invhouse"]
21 -> 23 ;
@ -120,24 +120,24 @@ digraph iCFG {
20 -> 25 ;
19 [label="19: DeclStmt \n n$8=*&SIL_temp_conditional___14:int [line 25]\n NULLIFY(&SIL_temp_conditional___14,true); [line 25]\n *&y2:int =(77 + n$8) [line 25]\n REMOVE_TEMPS(n$8); [line 25]\n NULLIFY(&y2,false); [line 25]\n " shape="box"]
19 [label="19: DeclStmt \n n$8=*&SIL_temp_conditional___14:int [line 24]\n NULLIFY(&SIL_temp_conditional___14,true); [line 24]\n *&y2:int =(77 + n$8) [line 24]\n REMOVE_TEMPS(n$8); [line 24]\n NULLIFY(&y2,false); [line 24]\n " shape="box"]
19 -> 4 ;
19 -> 5 ;
18 [label="18: ConditinalStmt Branch \n n$7=*&z:int [line 25]\n DECLARE_LOCALS(&SIL_temp_conditional___14); [line 25]\n *&SIL_temp_conditional___14:int =n$7 [line 25]\n REMOVE_TEMPS(n$7); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"]
18 [label="18: ConditinalStmt Branch \n n$7=*&z:int [line 24]\n DECLARE_LOCALS(&SIL_temp_conditional___14); [line 24]\n *&SIL_temp_conditional___14:int =n$7 [line 24]\n REMOVE_TEMPS(n$7); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"]
18 -> 14 ;
17 [label="17: ConditinalStmt Branch \n n$6=*&z:int [line 25]\n DECLARE_LOCALS(&SIL_temp_conditional___14); [line 25]\n *&SIL_temp_conditional___14:int =n$6 [line 25]\n REMOVE_TEMPS(n$6); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"]
17 [label="17: ConditinalStmt Branch \n n$6=*&z:int [line 24]\n DECLARE_LOCALS(&SIL_temp_conditional___14); [line 24]\n *&SIL_temp_conditional___14:int =n$6 [line 24]\n REMOVE_TEMPS(n$6); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"]
17 -> 14 ;
16 [label="16: Prune (false branch) \n PRUNE((1 == 0), false); [line 25]\n " shape="invhouse"]
16 [label="16: Prune (false branch) \n PRUNE((1 == 0), false); [line 24]\n " shape="invhouse"]
16 -> 18 ;
15 [label="15: Prune (true branch) \n PRUNE((1 != 0), true); [line 25]\n " shape="invhouse"]
15 [label="15: Prune (true branch) \n PRUNE((1 != 0), true); [line 24]\n " shape="invhouse"]
15 -> 17 ;
@ -145,23 +145,23 @@ digraph iCFG {
14 -> 19 ;
13 [label="13: DeclStmt \n n$2=*&SIL_temp_conditional___3:int [line 27]\n NULLIFY(&SIL_temp_conditional___3,true); [line 27]\n n$5=*&SIL_temp_conditional___8:int [line 27]\n NULLIFY(&SIL_temp_conditional___8,true); [line 27]\n *&y3:int =(n$2 + n$5) [line 27]\n REMOVE_TEMPS(n$2,n$5); [line 27]\n NULLIFY(&y3,false); [line 27]\n APPLY_ABSTRACTION; [line 27]\n " shape="box"]
13 [label="13: DeclStmt \n n$2=*&SIL_temp_conditional___3:int [line 26]\n NULLIFY(&SIL_temp_conditional___3,true); [line 26]\n n$5=*&SIL_temp_conditional___8:int [line 26]\n NULLIFY(&SIL_temp_conditional___8,true); [line 26]\n *&y3:int =(n$2 + n$5) [line 26]\n REMOVE_TEMPS(n$2,n$5); [line 26]\n NULLIFY(&y3,false); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"]
13 -> 2 ;
12 [label="12: ConditinalStmt Branch \n n$4=*&z:int [line 27]\n DECLARE_LOCALS(&SIL_temp_conditional___8); [line 27]\n *&SIL_temp_conditional___8:int =n$4 [line 27]\n REMOVE_TEMPS(n$4); [line 27]\n NULLIFY(&z,false); [line 27]\n APPLY_ABSTRACTION; [line 27]\n " shape="box"]
12 [label="12: ConditinalStmt Branch \n n$4=*&z:int [line 26]\n DECLARE_LOCALS(&SIL_temp_conditional___8); [line 26]\n *&SIL_temp_conditional___8:int =n$4 [line 26]\n REMOVE_TEMPS(n$4); [line 26]\n NULLIFY(&z,false); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"]
12 -> 8 ;
11 [label="11: ConditinalStmt Branch \n n$3=*&z:int [line 27]\n DECLARE_LOCALS(&SIL_temp_conditional___8); [line 27]\n *&SIL_temp_conditional___8:int =n$3 [line 27]\n REMOVE_TEMPS(n$3); [line 27]\n NULLIFY(&z,false); [line 27]\n APPLY_ABSTRACTION; [line 27]\n " shape="box"]
11 [label="11: ConditinalStmt Branch \n n$3=*&z:int [line 26]\n DECLARE_LOCALS(&SIL_temp_conditional___8); [line 26]\n *&SIL_temp_conditional___8:int =n$3 [line 26]\n REMOVE_TEMPS(n$3); [line 26]\n NULLIFY(&z,false); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"]
11 -> 8 ;
10 [label="10: Prune (false branch) \n PRUNE((1 == 0), false); [line 27]\n " shape="invhouse"]
10 [label="10: Prune (false branch) \n PRUNE((1 == 0), false); [line 26]\n " shape="invhouse"]
10 -> 12 ;
9 [label="9: Prune (true branch) \n PRUNE((1 != 0), true); [line 27]\n " shape="invhouse"]
9 [label="9: Prune (true branch) \n PRUNE((1 != 0), true); [line 26]\n " shape="invhouse"]
9 -> 11 ;
@ -169,19 +169,19 @@ digraph iCFG {
8 -> 13 ;
7 [label="7: ConditinalStmt Branch \n n$1=*&z:int [line 27]\n DECLARE_LOCALS(&SIL_temp_conditional___3); [line 27]\n *&SIL_temp_conditional___3:int =n$1 [line 27]\n REMOVE_TEMPS(n$1); [line 27]\n APPLY_ABSTRACTION; [line 27]\n " shape="box"]
7 [label="7: ConditinalStmt Branch \n n$1=*&z:int [line 26]\n DECLARE_LOCALS(&SIL_temp_conditional___3); [line 26]\n *&SIL_temp_conditional___3:int =n$1 [line 26]\n REMOVE_TEMPS(n$1); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"]
7 -> 3 ;
6 [label="6: ConditinalStmt Branch \n n$0=*&z:int [line 27]\n DECLARE_LOCALS(&SIL_temp_conditional___3); [line 27]\n *&SIL_temp_conditional___3:int =n$0 [line 27]\n REMOVE_TEMPS(n$0); [line 27]\n APPLY_ABSTRACTION; [line 27]\n " shape="box"]
6 [label="6: ConditinalStmt Branch \n n$0=*&z:int [line 26]\n DECLARE_LOCALS(&SIL_temp_conditional___3); [line 26]\n *&SIL_temp_conditional___3:int =n$0 [line 26]\n REMOVE_TEMPS(n$0); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"]
6 -> 3 ;
5 [label="5: Prune (false branch) \n PRUNE((1 == 0), false); [line 27]\n " shape="invhouse"]
5 [label="5: Prune (false branch) \n PRUNE((1 == 0), false); [line 26]\n " shape="invhouse"]
5 -> 7 ;
4 [label="4: Prune (true branch) \n PRUNE((1 != 0), true); [line 27]\n " shape="invhouse"]
4 [label="4: Prune (true branch) \n PRUNE((1 != 0), true); [line 26]\n " shape="invhouse"]
4 -> 6 ;

@ -7,15 +7,15 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
int foo()
{
int foo() {
int x = 5;
if (3 < 4 || 7<(x++)) { x=0;};
if (3 < 4 || 7 < (x++)) {
x = 0;
};
int y = 19;
int n = ((3 < 4 || 7 < ((x++) - y)) ? 1 : 2);
n = (2 < 1 ? 1 : (5 > 4 ? 1 : 2));
return (0 + (7 > 9 ? 1 : 0));
}
int bar() {

@ -85,7 +85,7 @@ digraph iCFG {
38 -> 53 ;
37 [label="37: DeclStmt \n *&x:int =5 [line 12]\n " shape="box"]
37 [label="37: DeclStmt \n *&x:int =5 [line 11]\n " shape="box"]
37 -> 31 ;
@ -94,24 +94,24 @@ digraph iCFG {
36 -> 30 ;
35 [label="35: Prune (false branch) \n PRUNE(((7 < n$6) == 0), false); [line 13]\n REMOVE_TEMPS(n$6); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="invhouse"]
35 [label="35: Prune (false branch) \n PRUNE(((7 < n$6) == 0), false); [line 12]\n REMOVE_TEMPS(n$6); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="invhouse"]
35 -> 30 ;
34 [label="34: Prune (true branch) \n PRUNE(((7 < n$6) != 0), true); [line 13]\n REMOVE_TEMPS(n$6); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="invhouse"]
34 [label="34: Prune (true branch) \n PRUNE(((7 < n$6) != 0), true); [line 12]\n REMOVE_TEMPS(n$6); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="invhouse"]
34 -> 36 ;
33 [label="33: BinaryOperatorStmt: LT \n n$6=*&x:int [line 13]\n *&x:int =(n$6 + 1) [line 13]\n " shape="box"]
33 [label="33: BinaryOperatorStmt: LT \n n$6=*&x:int [line 12]\n *&x:int =(n$6 + 1) [line 12]\n " shape="box"]
33 -> 34 ;
33 -> 35 ;
32 [label="32: Prune (false branch) \n PRUNE(((3 < 4) == 0), false); [line 13]\n " shape="invhouse"]
32 [label="32: Prune (false branch) \n PRUNE(((3 < 4) == 0), false); [line 12]\n " shape="invhouse"]
32 -> 33 ;
31 [label="31: Prune (true branch) \n PRUNE(((3 < 4) != 0), true); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="invhouse"]
31 [label="31: Prune (true branch) \n PRUNE(((3 < 4) != 0), true); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="invhouse"]
31 -> 36 ;
@ -119,42 +119,42 @@ digraph iCFG {
30 -> 29 ;
29 [label="29: DeclStmt \n *&y:int =19 [line 14]\n " shape="box"]
29 [label="29: DeclStmt \n *&y:int =19 [line 15]\n " shape="box"]
29 -> 21 ;
29 -> 22 ;
28 [label="28: DeclStmt \n n$5=*&SIL_temp_conditional___20:int [line 15]\n NULLIFY(&SIL_temp_conditional___20,true); [line 15]\n *&n:int =n$5 [line 15]\n REMOVE_TEMPS(n$5); [line 15]\n NULLIFY(&n,false); [line 15]\n " shape="box"]
28 [label="28: DeclStmt \n n$5=*&SIL_temp_conditional___20:int [line 16]\n NULLIFY(&SIL_temp_conditional___20,true); [line 16]\n *&n:int =n$5 [line 16]\n REMOVE_TEMPS(n$5); [line 16]\n NULLIFY(&n,false); [line 16]\n " shape="box"]
28 -> 10 ;
28 -> 11 ;
27 [label="27: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___20); [line 15]\n *&SIL_temp_conditional___20:int =2 [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"]
27 [label="27: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___20); [line 16]\n *&SIL_temp_conditional___20:int =2 [line 16]\n APPLY_ABSTRACTION; [line 16]\n " shape="box"]
27 -> 20 ;
26 [label="26: ConditinalStmt Branch \n NULLIFY(&x,false); [line 15]\n NULLIFY(&y,false); [line 15]\n DECLARE_LOCALS(&SIL_temp_conditional___20); [line 15]\n *&SIL_temp_conditional___20:int =1 [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"]
26 [label="26: ConditinalStmt Branch \n NULLIFY(&x,false); [line 16]\n NULLIFY(&y,false); [line 16]\n DECLARE_LOCALS(&SIL_temp_conditional___20); [line 16]\n *&SIL_temp_conditional___20:int =1 [line 16]\n APPLY_ABSTRACTION; [line 16]\n " shape="box"]
26 -> 20 ;
25 [label="25: Prune (false branch) \n PRUNE(((7 < (n$3 - n$4)) == 0), false); [line 15]\n REMOVE_TEMPS(n$3,n$4); [line 15]\n " shape="invhouse"]
25 [label="25: Prune (false branch) \n PRUNE(((7 < (n$3 - n$4)) == 0), false); [line 16]\n REMOVE_TEMPS(n$3,n$4); [line 16]\n " shape="invhouse"]
25 -> 27 ;
24 [label="24: Prune (true branch) \n PRUNE(((7 < (n$3 - n$4)) != 0), true); [line 15]\n REMOVE_TEMPS(n$3,n$4); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="invhouse"]
24 [label="24: Prune (true branch) \n PRUNE(((7 < (n$3 - n$4)) != 0), true); [line 16]\n REMOVE_TEMPS(n$3,n$4); [line 16]\n APPLY_ABSTRACTION; [line 16]\n " shape="invhouse"]
24 -> 26 ;
23 [label="23: BinaryOperatorStmt: LT \n n$3=*&x:int [line 15]\n *&x:int =(n$3 + 1) [line 15]\n n$4=*&y:int [line 15]\n NULLIFY(&x,false); [line 15]\n NULLIFY(&y,false); [line 15]\n " shape="box"]
23 [label="23: BinaryOperatorStmt: LT \n n$3=*&x:int [line 16]\n *&x:int =(n$3 + 1) [line 16]\n n$4=*&y:int [line 16]\n NULLIFY(&x,false); [line 16]\n NULLIFY(&y,false); [line 16]\n " shape="box"]
23 -> 24 ;
23 -> 25 ;
22 [label="22: Prune (false branch) \n PRUNE(((3 < 4) == 0), false); [line 15]\n " shape="invhouse"]
22 [label="22: Prune (false branch) \n PRUNE(((3 < 4) == 0), false); [line 16]\n " shape="invhouse"]
22 -> 23 ;
21 [label="21: Prune (true branch) \n PRUNE(((3 < 4) != 0), true); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="invhouse"]
21 [label="21: Prune (true branch) \n PRUNE(((3 < 4) != 0), true); [line 16]\n APPLY_ABSTRACTION; [line 16]\n " shape="invhouse"]
21 -> 26 ;
@ -162,28 +162,28 @@ digraph iCFG {
20 -> 28 ;
19 [label="19: BinaryOperatorStmt: Assign \n n$2=*&SIL_temp_conditional___9:int [line 16]\n NULLIFY(&SIL_temp_conditional___9,true); [line 16]\n *&n:int =n$2 [line 16]\n REMOVE_TEMPS(n$2); [line 16]\n NULLIFY(&n,false); [line 16]\n " shape="box"]
19 [label="19: BinaryOperatorStmt: Assign \n n$2=*&SIL_temp_conditional___9:int [line 17]\n NULLIFY(&SIL_temp_conditional___9,true); [line 17]\n *&n:int =n$2 [line 17]\n REMOVE_TEMPS(n$2); [line 17]\n NULLIFY(&n,false); [line 17]\n " shape="box"]
19 -> 4 ;
19 -> 5 ;
18 [label="18: ConditinalStmt Branch \n n$1=*&SIL_temp_conditional___13:int [line 16]\n NULLIFY(&SIL_temp_conditional___13,true); [line 16]\n DECLARE_LOCALS(&SIL_temp_conditional___9); [line 16]\n *&SIL_temp_conditional___9:int =n$1 [line 16]\n REMOVE_TEMPS(n$1); [line 16]\n APPLY_ABSTRACTION; [line 16]\n " shape="box"]
18 [label="18: ConditinalStmt Branch \n n$1=*&SIL_temp_conditional___13:int [line 17]\n NULLIFY(&SIL_temp_conditional___13,true); [line 17]\n DECLARE_LOCALS(&SIL_temp_conditional___9); [line 17]\n *&SIL_temp_conditional___9:int =n$1 [line 17]\n REMOVE_TEMPS(n$1); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"]
18 -> 9 ;
17 [label="17: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___13); [line 16]\n *&SIL_temp_conditional___13:int =2 [line 16]\n APPLY_ABSTRACTION; [line 16]\n " shape="box"]
17 [label="17: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___13); [line 17]\n *&SIL_temp_conditional___13:int =2 [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"]
17 -> 13 ;
16 [label="16: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___13); [line 16]\n *&SIL_temp_conditional___13:int =1 [line 16]\n APPLY_ABSTRACTION; [line 16]\n " shape="box"]
16 [label="16: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___13); [line 17]\n *&SIL_temp_conditional___13:int =1 [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"]
16 -> 13 ;
15 [label="15: Prune (false branch) \n PRUNE(((5 > 4) == 0), false); [line 16]\n " shape="invhouse"]
15 [label="15: Prune (false branch) \n PRUNE(((5 > 4) == 0), false); [line 17]\n " shape="invhouse"]
15 -> 17 ;
14 [label="14: Prune (true branch) \n PRUNE(((5 > 4) != 0), true); [line 16]\n " shape="invhouse"]
14 [label="14: Prune (true branch) \n PRUNE(((5 > 4) != 0), true); [line 17]\n " shape="invhouse"]
14 -> 16 ;
@ -191,16 +191,16 @@ digraph iCFG {
13 -> 18 ;
12 [label="12: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___9); [line 16]\n *&SIL_temp_conditional___9:int =1 [line 16]\n APPLY_ABSTRACTION; [line 16]\n " shape="box"]
12 [label="12: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___9); [line 17]\n *&SIL_temp_conditional___9:int =1 [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"]
12 -> 9 ;
11 [label="11: Prune (false branch) \n PRUNE(((2 < 1) == 0), false); [line 16]\n " shape="invhouse"]
11 [label="11: Prune (false branch) \n PRUNE(((2 < 1) == 0), false); [line 17]\n " shape="invhouse"]
11 -> 14 ;
11 -> 15 ;
10 [label="10: Prune (true branch) \n PRUNE(((2 < 1) != 0), true); [line 16]\n " shape="invhouse"]
10 [label="10: Prune (true branch) \n PRUNE(((2 < 1) != 0), true); [line 17]\n " shape="invhouse"]
10 -> 12 ;
@ -208,23 +208,23 @@ digraph iCFG {
9 -> 19 ;
8 [label="8: Return Stmt \n n$0=*&SIL_temp_conditional___3:int [line 17]\n NULLIFY(&SIL_temp_conditional___3,true); [line 17]\n *&return:int =(0 + n$0) [line 17]\n REMOVE_TEMPS(n$0); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"]
8 [label="8: Return Stmt \n n$0=*&SIL_temp_conditional___3:int [line 18]\n NULLIFY(&SIL_temp_conditional___3,true); [line 18]\n *&return:int =(0 + n$0) [line 18]\n REMOVE_TEMPS(n$0); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"]
8 -> 2 ;
7 [label="7: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___3); [line 17]\n *&SIL_temp_conditional___3:int =0 [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"]
7 [label="7: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___3); [line 18]\n *&SIL_temp_conditional___3:int =0 [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"]
7 -> 3 ;
6 [label="6: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___3); [line 17]\n *&SIL_temp_conditional___3:int =1 [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"]
6 [label="6: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___3); [line 18]\n *&SIL_temp_conditional___3:int =1 [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"]
6 -> 3 ;
5 [label="5: Prune (false branch) \n PRUNE(((7 > 9) == 0), false); [line 17]\n " shape="invhouse"]
5 [label="5: Prune (false branch) \n PRUNE(((7 > 9) == 0), false); [line 18]\n " shape="invhouse"]
5 -> 7 ;
4 [label="4: Prune (true branch) \n PRUNE(((7 > 9) != 0), true); [line 17]\n " shape="invhouse"]
4 [label="4: Prune (true branch) \n PRUNE(((7 > 9) != 0), true); [line 18]\n " shape="invhouse"]
4 -> 6 ;

@ -9,14 +9,9 @@
#include <stdbool.h>
int test2(int x) {
return x;
}
int test2(int x) { return x; }
int test(int b) {
return test2(b ? b : 1);
}
int test(int b) { return test2(b ? b : 1); }
int test1(int b) {
int x = b ? b : 1;
@ -28,15 +23,9 @@ int test3(int b) {
return x;
}
int test4(int b) { return test2(b ?: 1); }
int test4(int b) {
return test2(b ? : 1);
}
int test5(int b) {
return b ? : 1;
}
int test5(int b) { return b ?: 1; }
int test6(int* p) {
int z = 1 ? *p : 0;

@ -1,21 +1,21 @@
digraph iCFG {
54 [label="54: DeclStmt \n n$3=*&SIL_temp_conditional___49:int [line 42]\n NULLIFY(&SIL_temp_conditional___49,true); [line 42]\n *&z:int =n$3 [line 42]\n REMOVE_TEMPS(n$3); [line 42]\n " shape="box"]
54 [label="54: DeclStmt \n n$3=*&SIL_temp_conditional___49:int [line 31]\n NULLIFY(&SIL_temp_conditional___49,true); [line 31]\n *&z:int =n$3 [line 31]\n REMOVE_TEMPS(n$3); [line 31]\n " shape="box"]
54 -> 48 ;
53 [label="53: ConditinalStmt Branch \n NULLIFY(&p,false); [line 42]\n DECLARE_LOCALS(&SIL_temp_conditional___49); [line 42]\n *&SIL_temp_conditional___49:int =0 [line 42]\n APPLY_ABSTRACTION; [line 42]\n " shape="box"]
53 [label="53: ConditinalStmt Branch \n NULLIFY(&p,false); [line 31]\n DECLARE_LOCALS(&SIL_temp_conditional___49); [line 31]\n *&SIL_temp_conditional___49:int =0 [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"]
53 -> 49 ;
52 [label="52: ConditinalStmt Branch \n n$1=*&p:int * [line 42]\n n$2=*n$1:int [line 42]\n DECLARE_LOCALS(&SIL_temp_conditional___49); [line 42]\n *&SIL_temp_conditional___49:int =n$2 [line 42]\n REMOVE_TEMPS(n$1,n$2); [line 42]\n NULLIFY(&p,false); [line 42]\n APPLY_ABSTRACTION; [line 42]\n " shape="box"]
52 [label="52: ConditinalStmt Branch \n n$1=*&p:int * [line 31]\n n$2=*n$1:int [line 31]\n DECLARE_LOCALS(&SIL_temp_conditional___49); [line 31]\n *&SIL_temp_conditional___49:int =n$2 [line 31]\n REMOVE_TEMPS(n$1,n$2); [line 31]\n NULLIFY(&p,false); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"]
52 -> 49 ;
51 [label="51: Prune (false branch) \n PRUNE((1 == 0), false); [line 42]\n " shape="invhouse"]
51 [label="51: Prune (false branch) \n PRUNE((1 == 0), false); [line 31]\n " shape="invhouse"]
51 -> 53 ;
50 [label="50: Prune (true branch) \n PRUNE((1 != 0), true); [line 42]\n " shape="invhouse"]
50 [label="50: Prune (true branch) \n PRUNE((1 != 0), true); [line 31]\n " shape="invhouse"]
50 -> 52 ;
@ -23,35 +23,35 @@ digraph iCFG {
49 -> 54 ;
48 [label="48: Return Stmt \n n$0=*&z:int [line 43]\n *&return:int =n$0 [line 43]\n REMOVE_TEMPS(n$0); [line 43]\n NULLIFY(&z,false); [line 43]\n APPLY_ABSTRACTION; [line 43]\n " shape="box"]
48 [label="48: Return Stmt \n n$0=*&z:int [line 32]\n *&return:int =n$0 [line 32]\n REMOVE_TEMPS(n$0); [line 32]\n NULLIFY(&z,false); [line 32]\n APPLY_ABSTRACTION; [line 32]\n " shape="box"]
48 -> 47 ;
47 [label="47: Exit test6 \n " color=yellow style=filled]
46 [label="46: Start test6\nFormals: p:int *\nLocals: z:int \n DECLARE_LOCALS(&return,&z); [line 41]\n NULLIFY(&z,false); [line 41]\n " color=yellow style=filled]
46 [label="46: Start test6\nFormals: p:int *\nLocals: z:int \n DECLARE_LOCALS(&return,&z); [line 30]\n NULLIFY(&z,false); [line 30]\n " color=yellow style=filled]
46 -> 50 ;
46 -> 51 ;
45 [label="45: Return Stmt \n n$2=*&SIL_temp_conditional___40:int [line 38]\n NULLIFY(&SIL_temp_conditional___40,true); [line 38]\n *&return:int =n$2 [line 38]\n REMOVE_TEMPS(n$2); [line 38]\n APPLY_ABSTRACTION; [line 38]\n " shape="box"]
45 [label="45: Return Stmt \n n$2=*&SIL_temp_conditional___40:int [line 28]\n NULLIFY(&SIL_temp_conditional___40,true); [line 28]\n *&return:int =n$2 [line 28]\n REMOVE_TEMPS(n$2); [line 28]\n APPLY_ABSTRACTION; [line 28]\n " shape="box"]
45 -> 39 ;
44 [label="44: ConditinalStmt Branch \n NULLIFY(&b,false); [line 38]\n DECLARE_LOCALS(&SIL_temp_conditional___40); [line 38]\n *&SIL_temp_conditional___40:int =1 [line 38]\n APPLY_ABSTRACTION; [line 38]\n " shape="box"]
44 [label="44: ConditinalStmt Branch \n NULLIFY(&b,false); [line 28]\n DECLARE_LOCALS(&SIL_temp_conditional___40); [line 28]\n *&SIL_temp_conditional___40:int =1 [line 28]\n APPLY_ABSTRACTION; [line 28]\n " shape="box"]
44 -> 40 ;
43 [label="43: ConditinalStmt Branch \n n$1=*&b:int [line 38]\n DECLARE_LOCALS(&SIL_temp_conditional___40); [line 38]\n *&SIL_temp_conditional___40:int =n$1 [line 38]\n REMOVE_TEMPS(n$1); [line 38]\n NULLIFY(&b,false); [line 38]\n APPLY_ABSTRACTION; [line 38]\n " shape="box"]
43 [label="43: ConditinalStmt Branch \n n$1=*&b:int [line 28]\n DECLARE_LOCALS(&SIL_temp_conditional___40); [line 28]\n *&SIL_temp_conditional___40:int =n$1 [line 28]\n REMOVE_TEMPS(n$1); [line 28]\n NULLIFY(&b,false); [line 28]\n APPLY_ABSTRACTION; [line 28]\n " shape="box"]
43 -> 40 ;
42 [label="42: Prune (false branch) \n n$0=*&b:int [line 38]\n PRUNE((n$0 == 0), false); [line 38]\n REMOVE_TEMPS(n$0); [line 38]\n " shape="invhouse"]
42 [label="42: Prune (false branch) \n n$0=*&b:int [line 28]\n PRUNE((n$0 == 0), false); [line 28]\n REMOVE_TEMPS(n$0); [line 28]\n " shape="invhouse"]
42 -> 44 ;
41 [label="41: Prune (true branch) \n n$0=*&b:int [line 38]\n PRUNE((n$0 != 0), true); [line 38]\n REMOVE_TEMPS(n$0); [line 38]\n " shape="invhouse"]
41 [label="41: Prune (true branch) \n n$0=*&b:int [line 28]\n PRUNE((n$0 != 0), true); [line 28]\n REMOVE_TEMPS(n$0); [line 28]\n " shape="invhouse"]
41 -> 43 ;
@ -62,28 +62,28 @@ digraph iCFG {
39 [label="39: Exit test5 \n " color=yellow style=filled]
38 [label="38: Start test5\nFormals: b:int \nLocals: \n DECLARE_LOCALS(&return); [line 37]\n " color=yellow style=filled]
38 [label="38: Start test5\nFormals: b:int \nLocals: \n DECLARE_LOCALS(&return); [line 28]\n " color=yellow style=filled]
38 -> 41 ;
38 -> 42 ;
37 [label="37: Return Stmt \n n$2=*&SIL_temp_conditional___32:int [line 33]\n NULLIFY(&SIL_temp_conditional___32,true); [line 33]\n n$3=_fun_test2(n$2:int ) [line 33]\n *&return:int =n$3 [line 33]\n REMOVE_TEMPS(n$2,n$3); [line 33]\n APPLY_ABSTRACTION; [line 33]\n " shape="box"]
37 [label="37: Return Stmt \n n$2=*&SIL_temp_conditional___32:int [line 26]\n NULLIFY(&SIL_temp_conditional___32,true); [line 26]\n n$3=_fun_test2(n$2:int ) [line 26]\n *&return:int =n$3 [line 26]\n REMOVE_TEMPS(n$2,n$3); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"]
37 -> 31 ;
36 [label="36: ConditinalStmt Branch \n NULLIFY(&b,false); [line 33]\n DECLARE_LOCALS(&SIL_temp_conditional___32); [line 33]\n *&SIL_temp_conditional___32:int =1 [line 33]\n APPLY_ABSTRACTION; [line 33]\n " shape="box"]
36 [label="36: ConditinalStmt Branch \n NULLIFY(&b,false); [line 26]\n DECLARE_LOCALS(&SIL_temp_conditional___32); [line 26]\n *&SIL_temp_conditional___32:int =1 [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"]
36 -> 32 ;
35 [label="35: ConditinalStmt Branch \n n$1=*&b:int [line 33]\n DECLARE_LOCALS(&SIL_temp_conditional___32); [line 33]\n *&SIL_temp_conditional___32:int =n$1 [line 33]\n REMOVE_TEMPS(n$1); [line 33]\n NULLIFY(&b,false); [line 33]\n APPLY_ABSTRACTION; [line 33]\n " shape="box"]
35 [label="35: ConditinalStmt Branch \n n$1=*&b:int [line 26]\n DECLARE_LOCALS(&SIL_temp_conditional___32); [line 26]\n *&SIL_temp_conditional___32:int =n$1 [line 26]\n REMOVE_TEMPS(n$1); [line 26]\n NULLIFY(&b,false); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"]
35 -> 32 ;
34 [label="34: Prune (false branch) \n n$0=*&b:int [line 33]\n PRUNE((n$0 == 0), false); [line 33]\n REMOVE_TEMPS(n$0); [line 33]\n " shape="invhouse"]
34 [label="34: Prune (false branch) \n n$0=*&b:int [line 26]\n PRUNE((n$0 == 0), false); [line 26]\n REMOVE_TEMPS(n$0); [line 26]\n " shape="invhouse"]
34 -> 36 ;
33 [label="33: Prune (true branch) \n n$0=*&b:int [line 33]\n PRUNE((n$0 != 0), true); [line 33]\n REMOVE_TEMPS(n$0); [line 33]\n " shape="invhouse"]
33 [label="33: Prune (true branch) \n n$0=*&b:int [line 26]\n PRUNE((n$0 != 0), true); [line 26]\n REMOVE_TEMPS(n$0); [line 26]\n " shape="invhouse"]
33 -> 35 ;
@ -94,28 +94,28 @@ digraph iCFG {
31 [label="31: Exit test4 \n " color=yellow style=filled]
30 [label="30: Start test4\nFormals: b:int \nLocals: \n DECLARE_LOCALS(&return); [line 32]\n " color=yellow style=filled]
30 [label="30: Start test4\nFormals: b:int \nLocals: \n DECLARE_LOCALS(&return); [line 26]\n " color=yellow style=filled]
30 -> 33 ;
30 -> 34 ;
29 [label="29: DeclStmt \n n$3=*&SIL_temp_conditional___24:int [line 27]\n NULLIFY(&SIL_temp_conditional___24,true); [line 27]\n *&x:int =n$3 [line 27]\n REMOVE_TEMPS(n$3); [line 27]\n " shape="box"]
29 [label="29: DeclStmt \n n$3=*&SIL_temp_conditional___24:int [line 22]\n NULLIFY(&SIL_temp_conditional___24,true); [line 22]\n *&x:int =n$3 [line 22]\n REMOVE_TEMPS(n$3); [line 22]\n " shape="box"]
29 -> 23 ;
28 [label="28: ConditinalStmt Branch \n NULLIFY(&b,false); [line 27]\n DECLARE_LOCALS(&SIL_temp_conditional___24); [line 27]\n *&SIL_temp_conditional___24:int =1 [line 27]\n APPLY_ABSTRACTION; [line 27]\n " shape="box"]
28 [label="28: ConditinalStmt Branch \n NULLIFY(&b,false); [line 22]\n DECLARE_LOCALS(&SIL_temp_conditional___24); [line 22]\n *&SIL_temp_conditional___24:int =1 [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"]
28 -> 24 ;
27 [label="27: ConditinalStmt Branch \n n$2=*&b:int [line 27]\n DECLARE_LOCALS(&SIL_temp_conditional___24); [line 27]\n *&SIL_temp_conditional___24:int =n$2 [line 27]\n REMOVE_TEMPS(n$2); [line 27]\n NULLIFY(&b,false); [line 27]\n APPLY_ABSTRACTION; [line 27]\n " shape="box"]
27 [label="27: ConditinalStmt Branch \n n$2=*&b:int [line 22]\n DECLARE_LOCALS(&SIL_temp_conditional___24); [line 22]\n *&SIL_temp_conditional___24:int =n$2 [line 22]\n REMOVE_TEMPS(n$2); [line 22]\n NULLIFY(&b,false); [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"]
27 -> 24 ;
26 [label="26: Prune (false branch) \n n$1=*&b:int [line 27]\n PRUNE((n$1 == 0), false); [line 27]\n REMOVE_TEMPS(n$1); [line 27]\n " shape="invhouse"]
26 [label="26: Prune (false branch) \n n$1=*&b:int [line 22]\n PRUNE((n$1 == 0), false); [line 22]\n REMOVE_TEMPS(n$1); [line 22]\n " shape="invhouse"]
26 -> 28 ;
25 [label="25: Prune (true branch) \n n$1=*&b:int [line 27]\n PRUNE((n$1 != 0), true); [line 27]\n REMOVE_TEMPS(n$1); [line 27]\n " shape="invhouse"]
25 [label="25: Prune (true branch) \n n$1=*&b:int [line 22]\n PRUNE((n$1 != 0), true); [line 22]\n REMOVE_TEMPS(n$1); [line 22]\n " shape="invhouse"]
25 -> 27 ;
@ -123,35 +123,35 @@ digraph iCFG {
24 -> 29 ;
23 [label="23: Return Stmt \n n$0=*&x:int [line 28]\n *&return:int =n$0 [line 28]\n REMOVE_TEMPS(n$0); [line 28]\n NULLIFY(&x,false); [line 28]\n APPLY_ABSTRACTION; [line 28]\n " shape="box"]
23 [label="23: Return Stmt \n n$0=*&x:int [line 23]\n *&return:int =n$0 [line 23]\n REMOVE_TEMPS(n$0); [line 23]\n NULLIFY(&x,false); [line 23]\n APPLY_ABSTRACTION; [line 23]\n " shape="box"]
23 -> 22 ;
22 [label="22: Exit test3 \n " color=yellow style=filled]
21 [label="21: Start test3\nFormals: b:int \nLocals: x:int \n DECLARE_LOCALS(&return,&x); [line 26]\n NULLIFY(&x,false); [line 26]\n " color=yellow style=filled]
21 [label="21: Start test3\nFormals: b:int \nLocals: x:int \n DECLARE_LOCALS(&return,&x); [line 21]\n NULLIFY(&x,false); [line 21]\n " color=yellow style=filled]
21 -> 25 ;
21 -> 26 ;
20 [label="20: DeclStmt \n n$3=*&SIL_temp_conditional___15:int [line 22]\n NULLIFY(&SIL_temp_conditional___15,true); [line 22]\n *&x:int =n$3 [line 22]\n REMOVE_TEMPS(n$3); [line 22]\n " shape="box"]
20 [label="20: DeclStmt \n n$3=*&SIL_temp_conditional___15:int [line 17]\n NULLIFY(&SIL_temp_conditional___15,true); [line 17]\n *&x:int =n$3 [line 17]\n REMOVE_TEMPS(n$3); [line 17]\n " shape="box"]
20 -> 14 ;
19 [label="19: ConditinalStmt Branch \n NULLIFY(&b,false); [line 22]\n DECLARE_LOCALS(&SIL_temp_conditional___15); [line 22]\n *&SIL_temp_conditional___15:int =1 [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"]
19 [label="19: ConditinalStmt Branch \n NULLIFY(&b,false); [line 17]\n DECLARE_LOCALS(&SIL_temp_conditional___15); [line 17]\n *&SIL_temp_conditional___15:int =1 [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"]
19 -> 15 ;
18 [label="18: ConditinalStmt Branch \n n$2=*&b:int [line 22]\n DECLARE_LOCALS(&SIL_temp_conditional___15); [line 22]\n *&SIL_temp_conditional___15:int =n$2 [line 22]\n REMOVE_TEMPS(n$2); [line 22]\n NULLIFY(&b,false); [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"]
18 [label="18: ConditinalStmt Branch \n n$2=*&b:int [line 17]\n DECLARE_LOCALS(&SIL_temp_conditional___15); [line 17]\n *&SIL_temp_conditional___15:int =n$2 [line 17]\n REMOVE_TEMPS(n$2); [line 17]\n NULLIFY(&b,false); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"]
18 -> 15 ;
17 [label="17: Prune (false branch) \n n$1=*&b:int [line 22]\n PRUNE((n$1 == 0), false); [line 22]\n REMOVE_TEMPS(n$1); [line 22]\n " shape="invhouse"]
17 [label="17: Prune (false branch) \n n$1=*&b:int [line 17]\n PRUNE((n$1 == 0), false); [line 17]\n REMOVE_TEMPS(n$1); [line 17]\n " shape="invhouse"]
17 -> 19 ;
16 [label="16: Prune (true branch) \n n$1=*&b:int [line 22]\n PRUNE((n$1 != 0), true); [line 22]\n REMOVE_TEMPS(n$1); [line 22]\n " shape="invhouse"]
16 [label="16: Prune (true branch) \n n$1=*&b:int [line 17]\n PRUNE((n$1 != 0), true); [line 17]\n REMOVE_TEMPS(n$1); [line 17]\n " shape="invhouse"]
16 -> 18 ;
@ -159,35 +159,35 @@ digraph iCFG {
15 -> 20 ;
14 [label="14: Return Stmt \n n$0=*&x:int [line 23]\n *&return:int =n$0 [line 23]\n REMOVE_TEMPS(n$0); [line 23]\n NULLIFY(&x,false); [line 23]\n APPLY_ABSTRACTION; [line 23]\n " shape="box"]
14 [label="14: Return Stmt \n n$0=*&x:int [line 18]\n *&return:int =n$0 [line 18]\n REMOVE_TEMPS(n$0); [line 18]\n NULLIFY(&x,false); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"]
14 -> 13 ;
13 [label="13: Exit test1 \n " color=yellow style=filled]
12 [label="12: Start test1\nFormals: b:int \nLocals: x:int \n DECLARE_LOCALS(&return,&x); [line 21]\n NULLIFY(&x,false); [line 21]\n " color=yellow style=filled]
12 [label="12: Start test1\nFormals: b:int \nLocals: x:int \n DECLARE_LOCALS(&return,&x); [line 16]\n NULLIFY(&x,false); [line 16]\n " color=yellow style=filled]
12 -> 16 ;
12 -> 17 ;
11 [label="11: Return Stmt \n n$2=*&SIL_temp_conditional___6:int [line 18]\n NULLIFY(&SIL_temp_conditional___6,true); [line 18]\n n$3=_fun_test2(n$2:int ) [line 18]\n *&return:int =n$3 [line 18]\n REMOVE_TEMPS(n$2,n$3); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"]
11 [label="11: Return Stmt \n n$2=*&SIL_temp_conditional___6:int [line 14]\n NULLIFY(&SIL_temp_conditional___6,true); [line 14]\n n$3=_fun_test2(n$2:int ) [line 14]\n *&return:int =n$3 [line 14]\n REMOVE_TEMPS(n$2,n$3); [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"]
11 -> 5 ;
10 [label="10: ConditinalStmt Branch \n NULLIFY(&b,false); [line 18]\n DECLARE_LOCALS(&SIL_temp_conditional___6); [line 18]\n *&SIL_temp_conditional___6:int =1 [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"]
10 [label="10: ConditinalStmt Branch \n NULLIFY(&b,false); [line 14]\n DECLARE_LOCALS(&SIL_temp_conditional___6); [line 14]\n *&SIL_temp_conditional___6:int =1 [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"]
10 -> 6 ;
9 [label="9: ConditinalStmt Branch \n n$1=*&b:int [line 18]\n DECLARE_LOCALS(&SIL_temp_conditional___6); [line 18]\n *&SIL_temp_conditional___6:int =n$1 [line 18]\n REMOVE_TEMPS(n$1); [line 18]\n NULLIFY(&b,false); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"]
9 [label="9: ConditinalStmt Branch \n n$1=*&b:int [line 14]\n DECLARE_LOCALS(&SIL_temp_conditional___6); [line 14]\n *&SIL_temp_conditional___6:int =n$1 [line 14]\n REMOVE_TEMPS(n$1); [line 14]\n NULLIFY(&b,false); [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"]
9 -> 6 ;
8 [label="8: Prune (false branch) \n n$0=*&b:int [line 18]\n PRUNE((n$0 == 0), false); [line 18]\n REMOVE_TEMPS(n$0); [line 18]\n " shape="invhouse"]
8 [label="8: Prune (false branch) \n n$0=*&b:int [line 14]\n PRUNE((n$0 == 0), false); [line 14]\n REMOVE_TEMPS(n$0); [line 14]\n " shape="invhouse"]
8 -> 10 ;
7 [label="7: Prune (true branch) \n n$0=*&b:int [line 18]\n PRUNE((n$0 != 0), true); [line 18]\n REMOVE_TEMPS(n$0); [line 18]\n " shape="invhouse"]
7 [label="7: Prune (true branch) \n n$0=*&b:int [line 14]\n PRUNE((n$0 != 0), true); [line 14]\n REMOVE_TEMPS(n$0); [line 14]\n " shape="invhouse"]
7 -> 9 ;
@ -198,12 +198,12 @@ digraph iCFG {
5 [label="5: Exit test \n " color=yellow style=filled]
4 [label="4: Start test\nFormals: b:int \nLocals: \n DECLARE_LOCALS(&return); [line 17]\n " color=yellow style=filled]
4 [label="4: Start test\nFormals: b:int \nLocals: \n DECLARE_LOCALS(&return); [line 14]\n " color=yellow style=filled]
4 -> 7 ;
4 -> 8 ;
3 [label="3: Return Stmt \n n$0=*&x:int [line 13]\n *&return:int =n$0 [line 13]\n REMOVE_TEMPS(n$0); [line 13]\n NULLIFY(&x,false); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="box"]
3 [label="3: Return Stmt \n n$0=*&x:int [line 12]\n *&return:int =n$0 [line 12]\n REMOVE_TEMPS(n$0); [line 12]\n NULLIFY(&x,false); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"]
3 -> 2 ;

@ -9,18 +9,12 @@
void some_f(int, int, int);
void fun_ifthenelse1() {
(1 ? some_f : some_f)(1, 2, 3);
}
void fun_ifthenelse1() { (1 ? some_f : some_f)(1, 2, 3); }
void fun_ifthenelse2() {
(1 ? some_f : some_f)(0 ? 1 : 1, 0 ? 2 : 2, 0 ? 3 : 3);
}
void fun_ifthenelse3() {
some_f(0 ? 1 : 1, 0 ? 2 : 2, 0 ? 3 : 3);
}
void fun_ifthenelse3() { some_f(0 ? 1 : 1, 0 ? 2 : 2, 0 ? 3 : 3); }
void fun_ifthenelse4() {
(1 ? some_f : some_f)(0 ? 1 : 1, 2, 0 ? 3 : 3);
}
void fun_ifthenelse4() { (1 ? some_f : some_f)(0 ? 1 : 1, 2, 0 ? 3 : 3); }

@ -1,21 +1,21 @@
digraph iCFG {
67 [label="67: Call n$0 \n n$0=*&SIL_temp_conditional___52:_fn_ (*) [line 25]\n NULLIFY(&SIL_temp_conditional___52,true); [line 25]\n n$1=*&SIL_temp_conditional___57:int [line 25]\n NULLIFY(&SIL_temp_conditional___57,true); [line 25]\n n$2=*&SIL_temp_conditional___62:int [line 25]\n NULLIFY(&SIL_temp_conditional___62,true); [line 25]\n n$0(n$1:int ,2:int ,n$2:int ) [line 25]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"]
67 [label="67: Call n$0 \n n$0=*&SIL_temp_conditional___52:_fn_ (*) [line 20]\n NULLIFY(&SIL_temp_conditional___52,true); [line 20]\n n$1=*&SIL_temp_conditional___57:int [line 20]\n NULLIFY(&SIL_temp_conditional___57,true); [line 20]\n n$2=*&SIL_temp_conditional___62:int [line 20]\n NULLIFY(&SIL_temp_conditional___62,true); [line 20]\n n$0(n$1:int ,2:int ,n$2:int ) [line 20]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 20]\n APPLY_ABSTRACTION; [line 20]\n " shape="box"]
67 -> 51 ;
66 [label="66: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___62); [line 25]\n *&SIL_temp_conditional___62:int =3 [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"]
66 [label="66: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___62); [line 20]\n *&SIL_temp_conditional___62:int =3 [line 20]\n APPLY_ABSTRACTION; [line 20]\n " shape="box"]
66 -> 62 ;
65 [label="65: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___62); [line 25]\n *&SIL_temp_conditional___62:int =3 [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"]
65 [label="65: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___62); [line 20]\n *&SIL_temp_conditional___62:int =3 [line 20]\n APPLY_ABSTRACTION; [line 20]\n " shape="box"]
65 -> 62 ;
64 [label="64: Prune (false branch) \n PRUNE((0 == 0), false); [line 25]\n " shape="invhouse"]
64 [label="64: Prune (false branch) \n PRUNE((0 == 0), false); [line 20]\n " shape="invhouse"]
64 -> 66 ;
63 [label="63: Prune (true branch) \n PRUNE((0 != 0), true); [line 25]\n " shape="invhouse"]
63 [label="63: Prune (true branch) \n PRUNE((0 != 0), true); [line 20]\n " shape="invhouse"]
63 -> 65 ;
@ -23,19 +23,19 @@ digraph iCFG {
62 -> 67 ;
61 [label="61: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___57); [line 25]\n *&SIL_temp_conditional___57:int =1 [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"]
61 [label="61: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___57); [line 20]\n *&SIL_temp_conditional___57:int =1 [line 20]\n APPLY_ABSTRACTION; [line 20]\n " shape="box"]
61 -> 57 ;
60 [label="60: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___57); [line 25]\n *&SIL_temp_conditional___57:int =1 [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"]
60 [label="60: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___57); [line 20]\n *&SIL_temp_conditional___57:int =1 [line 20]\n APPLY_ABSTRACTION; [line 20]\n " shape="box"]
60 -> 57 ;
59 [label="59: Prune (false branch) \n PRUNE((0 == 0), false); [line 25]\n " shape="invhouse"]
59 [label="59: Prune (false branch) \n PRUNE((0 == 0), false); [line 20]\n " shape="invhouse"]
59 -> 61 ;
58 [label="58: Prune (true branch) \n PRUNE((0 != 0), true); [line 25]\n " shape="invhouse"]
58 [label="58: Prune (true branch) \n PRUNE((0 != 0), true); [line 20]\n " shape="invhouse"]
58 -> 60 ;
@ -44,19 +44,19 @@ digraph iCFG {
57 -> 63 ;
57 -> 64 ;
56 [label="56: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___52); [line 25]\n *&SIL_temp_conditional___52:_fn_ (*)=_fun_some_f [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"]
56 [label="56: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___52); [line 20]\n *&SIL_temp_conditional___52:_fn_ (*)=_fun_some_f [line 20]\n APPLY_ABSTRACTION; [line 20]\n " shape="box"]
56 -> 52 ;
55 [label="55: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___52); [line 25]\n *&SIL_temp_conditional___52:_fn_ (*)=_fun_some_f [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"]
55 [label="55: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___52); [line 20]\n *&SIL_temp_conditional___52:_fn_ (*)=_fun_some_f [line 20]\n APPLY_ABSTRACTION; [line 20]\n " shape="box"]
55 -> 52 ;
54 [label="54: Prune (false branch) \n PRUNE((1 == 0), false); [line 25]\n " shape="invhouse"]
54 [label="54: Prune (false branch) \n PRUNE((1 == 0), false); [line 20]\n " shape="invhouse"]
54 -> 56 ;
53 [label="53: Prune (true branch) \n PRUNE((1 != 0), true); [line 25]\n " shape="invhouse"]
53 [label="53: Prune (true branch) \n PRUNE((1 != 0), true); [line 20]\n " shape="invhouse"]
53 -> 55 ;
@ -68,28 +68,28 @@ digraph iCFG {
51 [label="51: Exit fun_ifthenelse4 \n " color=yellow style=filled]
50 [label="50: Start fun_ifthenelse4\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 24]\n " color=yellow style=filled]
50 [label="50: Start fun_ifthenelse4\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 20]\n " color=yellow style=filled]
50 -> 53 ;
50 -> 54 ;
49 [label="49: Call _fun_some_f \n n$0=*&SIL_temp_conditional___34:int [line 21]\n NULLIFY(&SIL_temp_conditional___34,true); [line 21]\n n$1=*&SIL_temp_conditional___39:int [line 21]\n NULLIFY(&SIL_temp_conditional___39,true); [line 21]\n n$2=*&SIL_temp_conditional___44:int [line 21]\n NULLIFY(&SIL_temp_conditional___44,true); [line 21]\n _fun_some_f(n$0:int ,n$1:int ,n$2:int ) [line 21]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"]
49 [label="49: Call _fun_some_f \n n$0=*&SIL_temp_conditional___34:int [line 18]\n NULLIFY(&SIL_temp_conditional___34,true); [line 18]\n n$1=*&SIL_temp_conditional___39:int [line 18]\n NULLIFY(&SIL_temp_conditional___39,true); [line 18]\n n$2=*&SIL_temp_conditional___44:int [line 18]\n NULLIFY(&SIL_temp_conditional___44,true); [line 18]\n _fun_some_f(n$0:int ,n$1:int ,n$2:int ) [line 18]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"]
49 -> 33 ;
48 [label="48: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___44); [line 21]\n *&SIL_temp_conditional___44:int =3 [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"]
48 [label="48: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___44); [line 18]\n *&SIL_temp_conditional___44:int =3 [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"]
48 -> 44 ;
47 [label="47: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___44); [line 21]\n *&SIL_temp_conditional___44:int =3 [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"]
47 [label="47: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___44); [line 18]\n *&SIL_temp_conditional___44:int =3 [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"]
47 -> 44 ;
46 [label="46: Prune (false branch) \n PRUNE((0 == 0), false); [line 21]\n " shape="invhouse"]
46 [label="46: Prune (false branch) \n PRUNE((0 == 0), false); [line 18]\n " shape="invhouse"]
46 -> 48 ;
45 [label="45: Prune (true branch) \n PRUNE((0 != 0), true); [line 21]\n " shape="invhouse"]
45 [label="45: Prune (true branch) \n PRUNE((0 != 0), true); [line 18]\n " shape="invhouse"]
45 -> 47 ;
@ -97,19 +97,19 @@ digraph iCFG {
44 -> 49 ;
43 [label="43: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___39); [line 21]\n *&SIL_temp_conditional___39:int =2 [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"]
43 [label="43: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___39); [line 18]\n *&SIL_temp_conditional___39:int =2 [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"]
43 -> 39 ;
42 [label="42: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___39); [line 21]\n *&SIL_temp_conditional___39:int =2 [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"]
42 [label="42: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___39); [line 18]\n *&SIL_temp_conditional___39:int =2 [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"]
42 -> 39 ;
41 [label="41: Prune (false branch) \n PRUNE((0 == 0), false); [line 21]\n " shape="invhouse"]
41 [label="41: Prune (false branch) \n PRUNE((0 == 0), false); [line 18]\n " shape="invhouse"]
41 -> 43 ;
40 [label="40: Prune (true branch) \n PRUNE((0 != 0), true); [line 21]\n " shape="invhouse"]
40 [label="40: Prune (true branch) \n PRUNE((0 != 0), true); [line 18]\n " shape="invhouse"]
40 -> 42 ;
@ -118,19 +118,19 @@ digraph iCFG {
39 -> 45 ;
39 -> 46 ;
38 [label="38: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___34); [line 21]\n *&SIL_temp_conditional___34:int =1 [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"]
38 [label="38: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___34); [line 18]\n *&SIL_temp_conditional___34:int =1 [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"]
38 -> 34 ;
37 [label="37: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___34); [line 21]\n *&SIL_temp_conditional___34:int =1 [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"]
37 [label="37: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___34); [line 18]\n *&SIL_temp_conditional___34:int =1 [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"]
37 -> 34 ;
36 [label="36: Prune (false branch) \n PRUNE((0 == 0), false); [line 21]\n " shape="invhouse"]
36 [label="36: Prune (false branch) \n PRUNE((0 == 0), false); [line 18]\n " shape="invhouse"]
36 -> 38 ;
35 [label="35: Prune (true branch) \n PRUNE((0 != 0), true); [line 21]\n " shape="invhouse"]
35 [label="35: Prune (true branch) \n PRUNE((0 != 0), true); [line 18]\n " shape="invhouse"]
35 -> 37 ;
@ -142,28 +142,28 @@ digraph iCFG {
33 [label="33: Exit fun_ifthenelse3 \n " color=yellow style=filled]
32 [label="32: Start fun_ifthenelse3\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 20]\n " color=yellow style=filled]
32 [label="32: Start fun_ifthenelse3\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 18]\n " color=yellow style=filled]
32 -> 35 ;
32 -> 36 ;
31 [label="31: Call n$0 \n n$0=*&SIL_temp_conditional___11:_fn_ (*) [line 17]\n NULLIFY(&SIL_temp_conditional___11,true); [line 17]\n n$1=*&SIL_temp_conditional___16:int [line 17]\n NULLIFY(&SIL_temp_conditional___16,true); [line 17]\n n$2=*&SIL_temp_conditional___21:int [line 17]\n NULLIFY(&SIL_temp_conditional___21,true); [line 17]\n n$3=*&SIL_temp_conditional___26:int [line 17]\n NULLIFY(&SIL_temp_conditional___26,true); [line 17]\n n$0(n$1:int ,n$2:int ,n$3:int ) [line 17]\n REMOVE_TEMPS(n$0,n$1,n$2,n$3); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"]
31 [label="31: Call n$0 \n n$0=*&SIL_temp_conditional___11:_fn_ (*) [line 15]\n NULLIFY(&SIL_temp_conditional___11,true); [line 15]\n n$1=*&SIL_temp_conditional___16:int [line 15]\n NULLIFY(&SIL_temp_conditional___16,true); [line 15]\n n$2=*&SIL_temp_conditional___21:int [line 15]\n NULLIFY(&SIL_temp_conditional___21,true); [line 15]\n n$3=*&SIL_temp_conditional___26:int [line 15]\n NULLIFY(&SIL_temp_conditional___26,true); [line 15]\n n$0(n$1:int ,n$2:int ,n$3:int ) [line 15]\n REMOVE_TEMPS(n$0,n$1,n$2,n$3); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"]
31 -> 10 ;
30 [label="30: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___26); [line 17]\n *&SIL_temp_conditional___26:int =3 [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"]
30 [label="30: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___26); [line 15]\n *&SIL_temp_conditional___26:int =3 [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"]
30 -> 26 ;
29 [label="29: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___26); [line 17]\n *&SIL_temp_conditional___26:int =3 [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"]
29 [label="29: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___26); [line 15]\n *&SIL_temp_conditional___26:int =3 [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"]
29 -> 26 ;
28 [label="28: Prune (false branch) \n PRUNE((0 == 0), false); [line 17]\n " shape="invhouse"]
28 [label="28: Prune (false branch) \n PRUNE((0 == 0), false); [line 15]\n " shape="invhouse"]
28 -> 30 ;
27 [label="27: Prune (true branch) \n PRUNE((0 != 0), true); [line 17]\n " shape="invhouse"]
27 [label="27: Prune (true branch) \n PRUNE((0 != 0), true); [line 15]\n " shape="invhouse"]
27 -> 29 ;
@ -171,19 +171,19 @@ digraph iCFG {
26 -> 31 ;
25 [label="25: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___21); [line 17]\n *&SIL_temp_conditional___21:int =2 [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"]
25 [label="25: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___21); [line 15]\n *&SIL_temp_conditional___21:int =2 [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"]
25 -> 21 ;
24 [label="24: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___21); [line 17]\n *&SIL_temp_conditional___21:int =2 [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"]
24 [label="24: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___21); [line 15]\n *&SIL_temp_conditional___21:int =2 [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"]
24 -> 21 ;
23 [label="23: Prune (false branch) \n PRUNE((0 == 0), false); [line 17]\n " shape="invhouse"]
23 [label="23: Prune (false branch) \n PRUNE((0 == 0), false); [line 15]\n " shape="invhouse"]
23 -> 25 ;
22 [label="22: Prune (true branch) \n PRUNE((0 != 0), true); [line 17]\n " shape="invhouse"]
22 [label="22: Prune (true branch) \n PRUNE((0 != 0), true); [line 15]\n " shape="invhouse"]
22 -> 24 ;
@ -192,19 +192,19 @@ digraph iCFG {
21 -> 27 ;
21 -> 28 ;
20 [label="20: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___16); [line 17]\n *&SIL_temp_conditional___16:int =1 [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"]
20 [label="20: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___16); [line 15]\n *&SIL_temp_conditional___16:int =1 [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"]
20 -> 16 ;
19 [label="19: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___16); [line 17]\n *&SIL_temp_conditional___16:int =1 [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"]
19 [label="19: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___16); [line 15]\n *&SIL_temp_conditional___16:int =1 [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"]
19 -> 16 ;
18 [label="18: Prune (false branch) \n PRUNE((0 == 0), false); [line 17]\n " shape="invhouse"]
18 [label="18: Prune (false branch) \n PRUNE((0 == 0), false); [line 15]\n " shape="invhouse"]
18 -> 20 ;
17 [label="17: Prune (true branch) \n PRUNE((0 != 0), true); [line 17]\n " shape="invhouse"]
17 [label="17: Prune (true branch) \n PRUNE((0 != 0), true); [line 15]\n " shape="invhouse"]
17 -> 19 ;
@ -213,19 +213,19 @@ digraph iCFG {
16 -> 22 ;
16 -> 23 ;
15 [label="15: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___11); [line 17]\n *&SIL_temp_conditional___11:_fn_ (*)=_fun_some_f [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"]
15 [label="15: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___11); [line 15]\n *&SIL_temp_conditional___11:_fn_ (*)=_fun_some_f [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"]
15 -> 11 ;
14 [label="14: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___11); [line 17]\n *&SIL_temp_conditional___11:_fn_ (*)=_fun_some_f [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"]
14 [label="14: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___11); [line 15]\n *&SIL_temp_conditional___11:_fn_ (*)=_fun_some_f [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"]
14 -> 11 ;
13 [label="13: Prune (false branch) \n PRUNE((1 == 0), false); [line 17]\n " shape="invhouse"]
13 [label="13: Prune (false branch) \n PRUNE((1 == 0), false); [line 15]\n " shape="invhouse"]
13 -> 15 ;
12 [label="12: Prune (true branch) \n PRUNE((1 != 0), true); [line 17]\n " shape="invhouse"]
12 [label="12: Prune (true branch) \n PRUNE((1 != 0), true); [line 15]\n " shape="invhouse"]
12 -> 14 ;
@ -237,28 +237,28 @@ digraph iCFG {
10 [label="10: Exit fun_ifthenelse2 \n " color=yellow style=filled]
9 [label="9: Start fun_ifthenelse2\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 16]\n " color=yellow style=filled]
9 [label="9: Start fun_ifthenelse2\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 14]\n " color=yellow style=filled]
9 -> 12 ;
9 -> 13 ;
8 [label="8: Call n$0 \n n$0=*&SIL_temp_conditional___3:_fn_ (*) [line 13]\n NULLIFY(&SIL_temp_conditional___3,true); [line 13]\n n$0(1:int ,2:int ,3:int ) [line 13]\n REMOVE_TEMPS(n$0); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="box"]
8 [label="8: Call n$0 \n n$0=*&SIL_temp_conditional___3:_fn_ (*) [line 12]\n NULLIFY(&SIL_temp_conditional___3,true); [line 12]\n n$0(1:int ,2:int ,3:int ) [line 12]\n REMOVE_TEMPS(n$0); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"]
8 -> 2 ;
7 [label="7: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___3); [line 13]\n *&SIL_temp_conditional___3:_fn_ (*)=_fun_some_f [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="box"]
7 [label="7: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___3); [line 12]\n *&SIL_temp_conditional___3:_fn_ (*)=_fun_some_f [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"]
7 -> 3 ;
6 [label="6: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___3); [line 13]\n *&SIL_temp_conditional___3:_fn_ (*)=_fun_some_f [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="box"]
6 [label="6: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___3); [line 12]\n *&SIL_temp_conditional___3:_fn_ (*)=_fun_some_f [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"]
6 -> 3 ;
5 [label="5: Prune (false branch) \n PRUNE((1 == 0), false); [line 13]\n " shape="invhouse"]
5 [label="5: Prune (false branch) \n PRUNE((1 == 0), false); [line 12]\n " shape="invhouse"]
5 -> 7 ;
4 [label="4: Prune (true branch) \n PRUNE((1 != 0), true); [line 13]\n " shape="invhouse"]
4 [label="4: Prune (true branch) \n PRUNE((1 != 0), true); [line 12]\n " shape="invhouse"]
4 -> 6 ;

@ -11,20 +11,21 @@
void shortcircuit_or(int* x) {
// x = 0;
if (x == 0 || *x == 2){ x=17;} else {x=32; };
if (x == 0 || *x == 2) {
x = 17;
} else {
x = 32;
};
}
void shortcircuit_and(int* x) {
if (!x && !(x = getenv("BLOCK"))) {
x = 17;
}
else {
} else {
*x = 32;
};
}
void test_loop() {
char* spec;
@ -32,17 +33,12 @@ void test_loop () {
spec = getenv("BLOCK");
while((! spec
&& ! (spec = getenv ("BLOCK_SIZE"))
&& ! (spec = getenv ("BLOCKSIZE")))) {
while ((!spec && !(spec = getenv("BLOCK_SIZE")) &&
!(spec = getenv("BLOCKSIZE")))) {
block_size = 0;
}
}
int main() {
char* spec;
@ -50,17 +46,12 @@ int main() {
spec = getenv("BLOCK");
if (! spec
&& ! (spec = getenv ("BLOCK_SIZE"))
&& ! (spec = getenv ("BLOCKSIZE")))
if (!spec && !(spec = getenv("BLOCK_SIZE")) && !(spec = getenv("BLOCKSIZE")))
block_size = 0;
else
{
else {
if (*spec == '\'')
block_size=0; }
block_size = 0;
}
return 0;
}

@ -1,22 +1,22 @@
digraph iCFG {
93 [label="93: BinaryOperatorStmt: Assign \n n$10=_fun_getenv(\"BLOCK\":char *) [line 51]\n *&spec:char *=n$10 [line 51]\n REMOVE_TEMPS(n$10); [line 51]\n " shape="box"]
93 [label="93: BinaryOperatorStmt: Assign \n n$10=_fun_getenv(\"BLOCK\":char *) [line 47]\n *&spec:char *=n$10 [line 47]\n REMOVE_TEMPS(n$10); [line 47]\n " shape="box"]
93 -> 65 ;
93 -> 66 ;
92 [label="92: BinaryOperatorStmt: Assign \n *&block_size:char *=0 [line 62]\n NULLIFY(&block_size,false); [line 62]\n APPLY_ABSTRACTION; [line 62]\n " shape="box"]
92 [label="92: BinaryOperatorStmt: Assign \n *&block_size:char *=0 [line 53]\n NULLIFY(&block_size,false); [line 53]\n APPLY_ABSTRACTION; [line 53]\n " shape="box"]
92 -> 88 ;
91 [label="91: Prune (false branch) \n PRUNE(((n$9 == 39) == 0), false); [line 61]\n REMOVE_TEMPS(n$8,n$9); [line 61]\n APPLY_ABSTRACTION; [line 61]\n " shape="invhouse"]
91 [label="91: Prune (false branch) \n PRUNE(((n$9 == 39) == 0), false); [line 52]\n REMOVE_TEMPS(n$8,n$9); [line 52]\n APPLY_ABSTRACTION; [line 52]\n " shape="invhouse"]
91 -> 88 ;
90 [label="90: Prune (true branch) \n PRUNE(((n$9 == 39) != 0), true); [line 61]\n REMOVE_TEMPS(n$8,n$9); [line 61]\n " shape="invhouse"]
90 [label="90: Prune (true branch) \n PRUNE(((n$9 == 39) != 0), true); [line 52]\n REMOVE_TEMPS(n$8,n$9); [line 52]\n " shape="invhouse"]
90 -> 92 ;
89 [label="89: BinaryOperatorStmt: EQ \n n$8=*&spec:char * [line 61]\n n$9=*n$8:char [line 61]\n NULLIFY(&spec,false); [line 61]\n " shape="box"]
89 [label="89: BinaryOperatorStmt: EQ \n n$8=*&spec:char * [line 52]\n n$9=*n$8:char [line 52]\n NULLIFY(&spec,false); [line 52]\n " shape="box"]
89 -> 90 ;
@ -25,35 +25,35 @@ digraph iCFG {
88 -> 63 ;
87 [label="87: BinaryOperatorStmt: Assign \n *&block_size:char *=0 [line 58]\n NULLIFY(&block_size,false); [line 58]\n APPLY_ABSTRACTION; [line 58]\n " shape="box"]
87 [label="87: BinaryOperatorStmt: Assign \n *&block_size:char *=0 [line 50]\n NULLIFY(&block_size,false); [line 50]\n APPLY_ABSTRACTION; [line 50]\n " shape="box"]
87 -> 63 ;
86 [label="86: Prune (false branch) \n n$7=*&SIL_temp_conditional___79:int [line 57]\n NULLIFY(&SIL_temp_conditional___79,true); [line 57]\n PRUNE((n$7 == 0), false); [line 57]\n REMOVE_TEMPS(n$7); [line 57]\n APPLY_ABSTRACTION; [line 57]\n " shape="invhouse"]
86 [label="86: Prune (false branch) \n n$7=*&SIL_temp_conditional___79:int [line 49]\n NULLIFY(&SIL_temp_conditional___79,true); [line 49]\n PRUNE((n$7 == 0), false); [line 49]\n REMOVE_TEMPS(n$7); [line 49]\n APPLY_ABSTRACTION; [line 49]\n " shape="invhouse"]
86 -> 89 ;
85 [label="85: Prune (true branch) \n n$7=*&SIL_temp_conditional___79:int [line 57]\n NULLIFY(&SIL_temp_conditional___79,true); [line 57]\n PRUNE((n$7 != 0), true); [line 57]\n REMOVE_TEMPS(n$7); [line 57]\n NULLIFY(&spec,false); [line 57]\n " shape="invhouse"]
85 [label="85: Prune (true branch) \n n$7=*&SIL_temp_conditional___79:int [line 49]\n NULLIFY(&SIL_temp_conditional___79,true); [line 49]\n PRUNE((n$7 != 0), true); [line 49]\n REMOVE_TEMPS(n$7); [line 49]\n NULLIFY(&spec,false); [line 49]\n " shape="invhouse"]
85 -> 87 ;
84 [label="84: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___79); [line 57]\n *&SIL_temp_conditional___79:int =1 [line 57]\n APPLY_ABSTRACTION; [line 57]\n " shape="box"]
84 [label="84: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___79); [line 49]\n *&SIL_temp_conditional___79:int =1 [line 49]\n APPLY_ABSTRACTION; [line 49]\n " shape="box"]
84 -> 79 ;
83 [label="83: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___79); [line 57]\n *&SIL_temp_conditional___79:int =0 [line 57]\n APPLY_ABSTRACTION; [line 57]\n " shape="box"]
83 [label="83: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___79); [line 49]\n *&SIL_temp_conditional___79:int =0 [line 49]\n APPLY_ABSTRACTION; [line 49]\n " shape="box"]
83 -> 79 ;
82 [label="82: Prune (false branch) \n PRUNE((n$6 == 0), false); [line 57]\n REMOVE_TEMPS(n$5,n$6); [line 57]\n " shape="invhouse"]
82 [label="82: Prune (false branch) \n PRUNE((n$6 == 0), false); [line 49]\n REMOVE_TEMPS(n$5,n$6); [line 49]\n " shape="invhouse"]
82 -> 84 ;
81 [label="81: Prune (true branch) \n PRUNE((n$6 != 0), true); [line 57]\n REMOVE_TEMPS(n$5,n$6); [line 57]\n " shape="invhouse"]
81 [label="81: Prune (true branch) \n PRUNE((n$6 != 0), true); [line 49]\n REMOVE_TEMPS(n$5,n$6); [line 49]\n " shape="invhouse"]
81 -> 83 ;
80 [label="80: BinaryOperatorStmt: Assign \n n$5=_fun_getenv(\"BLOCKSIZE\":char *) [line 57]\n *&spec:char *=n$5 [line 57]\n n$6=*&spec:char * [line 57]\n " shape="box"]
80 [label="80: BinaryOperatorStmt: Assign \n n$5=_fun_getenv(\"BLOCKSIZE\":char *) [line 49]\n *&spec:char *=n$5 [line 49]\n n$6=*&spec:char * [line 49]\n " shape="box"]
80 -> 81 ;
@ -63,31 +63,31 @@ digraph iCFG {
79 -> 85 ;
79 -> 86 ;
78 [label="78: Prune (false branch) \n n$4=*&SIL_temp_conditional___71:int [line 56]\n NULLIFY(&SIL_temp_conditional___71,true); [line 56]\n PRUNE((n$4 == 0), false); [line 56]\n REMOVE_TEMPS(n$4); [line 56]\n APPLY_ABSTRACTION; [line 56]\n " shape="invhouse"]
78 [label="78: Prune (false branch) \n n$4=*&SIL_temp_conditional___71:int [line 49]\n NULLIFY(&SIL_temp_conditional___71,true); [line 49]\n PRUNE((n$4 == 0), false); [line 49]\n REMOVE_TEMPS(n$4); [line 49]\n APPLY_ABSTRACTION; [line 49]\n " shape="invhouse"]
78 -> 89 ;
77 [label="77: Prune (true branch) \n n$4=*&SIL_temp_conditional___71:int [line 56]\n NULLIFY(&SIL_temp_conditional___71,true); [line 56]\n PRUNE((n$4 != 0), true); [line 56]\n REMOVE_TEMPS(n$4); [line 56]\n NULLIFY(&spec,false); [line 56]\n " shape="invhouse"]
77 [label="77: Prune (true branch) \n n$4=*&SIL_temp_conditional___71:int [line 49]\n NULLIFY(&SIL_temp_conditional___71,true); [line 49]\n PRUNE((n$4 != 0), true); [line 49]\n REMOVE_TEMPS(n$4); [line 49]\n NULLIFY(&spec,false); [line 49]\n " shape="invhouse"]
77 -> 80 ;
76 [label="76: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___71); [line 56]\n *&SIL_temp_conditional___71:int =1 [line 56]\n APPLY_ABSTRACTION; [line 56]\n " shape="box"]
76 [label="76: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___71); [line 49]\n *&SIL_temp_conditional___71:int =1 [line 49]\n APPLY_ABSTRACTION; [line 49]\n " shape="box"]
76 -> 71 ;
75 [label="75: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___71); [line 56]\n *&SIL_temp_conditional___71:int =0 [line 56]\n APPLY_ABSTRACTION; [line 56]\n " shape="box"]
75 [label="75: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___71); [line 49]\n *&SIL_temp_conditional___71:int =0 [line 49]\n APPLY_ABSTRACTION; [line 49]\n " shape="box"]
75 -> 71 ;
74 [label="74: Prune (false branch) \n PRUNE((n$3 == 0), false); [line 56]\n REMOVE_TEMPS(n$2,n$3); [line 56]\n " shape="invhouse"]
74 [label="74: Prune (false branch) \n PRUNE((n$3 == 0), false); [line 49]\n REMOVE_TEMPS(n$2,n$3); [line 49]\n " shape="invhouse"]
74 -> 76 ;
73 [label="73: Prune (true branch) \n PRUNE((n$3 != 0), true); [line 56]\n REMOVE_TEMPS(n$2,n$3); [line 56]\n " shape="invhouse"]
73 [label="73: Prune (true branch) \n PRUNE((n$3 != 0), true); [line 49]\n REMOVE_TEMPS(n$2,n$3); [line 49]\n " shape="invhouse"]
73 -> 75 ;
72 [label="72: BinaryOperatorStmt: Assign \n n$2=_fun_getenv(\"BLOCK_SIZE\":char *) [line 56]\n *&spec:char *=n$2 [line 56]\n n$3=*&spec:char * [line 56]\n " shape="box"]
72 [label="72: BinaryOperatorStmt: Assign \n n$2=_fun_getenv(\"BLOCK_SIZE\":char *) [line 49]\n *&spec:char *=n$2 [line 49]\n n$3=*&spec:char * [line 49]\n " shape="box"]
72 -> 73 ;
@ -97,27 +97,27 @@ digraph iCFG {
71 -> 77 ;
71 -> 78 ;
70 [label="70: Prune (false branch) \n n$1=*&SIL_temp_conditional___64:int [line 55]\n NULLIFY(&SIL_temp_conditional___64,true); [line 55]\n PRUNE((n$1 == 0), false); [line 55]\n REMOVE_TEMPS(n$1); [line 55]\n APPLY_ABSTRACTION; [line 55]\n " shape="invhouse"]
70 [label="70: Prune (false branch) \n n$1=*&SIL_temp_conditional___64:int [line 49]\n NULLIFY(&SIL_temp_conditional___64,true); [line 49]\n PRUNE((n$1 == 0), false); [line 49]\n REMOVE_TEMPS(n$1); [line 49]\n APPLY_ABSTRACTION; [line 49]\n " shape="invhouse"]
70 -> 89 ;
69 [label="69: Prune (true branch) \n n$1=*&SIL_temp_conditional___64:int [line 55]\n NULLIFY(&SIL_temp_conditional___64,true); [line 55]\n PRUNE((n$1 != 0), true); [line 55]\n REMOVE_TEMPS(n$1); [line 55]\n NULLIFY(&spec,false); [line 55]\n " shape="invhouse"]
69 [label="69: Prune (true branch) \n n$1=*&SIL_temp_conditional___64:int [line 49]\n NULLIFY(&SIL_temp_conditional___64,true); [line 49]\n PRUNE((n$1 != 0), true); [line 49]\n REMOVE_TEMPS(n$1); [line 49]\n NULLIFY(&spec,false); [line 49]\n " shape="invhouse"]
69 -> 72 ;
68 [label="68: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___64); [line 55]\n *&SIL_temp_conditional___64:int =1 [line 55]\n APPLY_ABSTRACTION; [line 55]\n " shape="box"]
68 [label="68: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___64); [line 49]\n *&SIL_temp_conditional___64:int =1 [line 49]\n APPLY_ABSTRACTION; [line 49]\n " shape="box"]
68 -> 64 ;
67 [label="67: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___64); [line 55]\n *&SIL_temp_conditional___64:int =0 [line 55]\n APPLY_ABSTRACTION; [line 55]\n " shape="box"]
67 [label="67: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___64); [line 49]\n *&SIL_temp_conditional___64:int =0 [line 49]\n APPLY_ABSTRACTION; [line 49]\n " shape="box"]
67 -> 64 ;
66 [label="66: Prune (false branch) \n n$0=*&spec:char * [line 55]\n PRUNE((n$0 == 0), false); [line 55]\n REMOVE_TEMPS(n$0); [line 55]\n " shape="invhouse"]
66 [label="66: Prune (false branch) \n n$0=*&spec:char * [line 49]\n PRUNE((n$0 == 0), false); [line 49]\n REMOVE_TEMPS(n$0); [line 49]\n " shape="invhouse"]
66 -> 68 ;
65 [label="65: Prune (true branch) \n n$0=*&spec:char * [line 55]\n PRUNE((n$0 != 0), true); [line 55]\n REMOVE_TEMPS(n$0); [line 55]\n " shape="invhouse"]
65 [label="65: Prune (true branch) \n n$0=*&spec:char * [line 49]\n PRUNE((n$0 != 0), true); [line 49]\n REMOVE_TEMPS(n$0); [line 49]\n " shape="invhouse"]
65 -> 67 ;
@ -130,18 +130,18 @@ digraph iCFG {
63 -> 62 ;
62 [label="62: Return Stmt \n *&return:int =0 [line 65]\n APPLY_ABSTRACTION; [line 65]\n " shape="box"]
62 [label="62: Return Stmt \n *&return:int =0 [line 56]\n APPLY_ABSTRACTION; [line 56]\n " shape="box"]
62 -> 61 ;
61 [label="61: Exit main \n " color=yellow style=filled]
60 [label="60: Start main\nFormals: \nLocals: block_size:char * spec:char * \n DECLARE_LOCALS(&return,&block_size,&spec); [line 46]\n NULLIFY(&block_size,false); [line 46]\n NULLIFY(&spec,false); [line 46]\n " color=yellow style=filled]
60 [label="60: Start main\nFormals: \nLocals: block_size:char * spec:char * \n DECLARE_LOCALS(&return,&block_size,&spec); [line 42]\n NULLIFY(&block_size,false); [line 42]\n NULLIFY(&spec,false); [line 42]\n " color=yellow style=filled]
60 -> 93 ;
59 [label="59: BinaryOperatorStmt: Assign \n n$8=_fun_getenv(\"BLOCK\":char *) [line 33]\n *&spec:char *=n$8 [line 33]\n REMOVE_TEMPS(n$8); [line 33]\n APPLY_ABSTRACTION; [line 33]\n " shape="box"]
59 [label="59: BinaryOperatorStmt: Assign \n n$8=_fun_getenv(\"BLOCK\":char *) [line 34]\n *&spec:char *=n$8 [line 34]\n REMOVE_TEMPS(n$8); [line 34]\n APPLY_ABSTRACTION; [line 34]\n " shape="box"]
59 -> 34 ;
@ -217,27 +217,27 @@ digraph iCFG {
42 -> 48 ;
42 -> 49 ;
41 [label="41: Prune (false branch) \n n$1=*&SIL_temp_conditional___35:int [line 35]\n NULLIFY(&SIL_temp_conditional___35,true); [line 35]\n PRUNE((n$1 == 0), false); [line 35]\n REMOVE_TEMPS(n$1); [line 35]\n APPLY_ABSTRACTION; [line 35]\n " shape="invhouse"]
41 [label="41: Prune (false branch) \n n$1=*&SIL_temp_conditional___35:int [line 36]\n NULLIFY(&SIL_temp_conditional___35,true); [line 36]\n PRUNE((n$1 == 0), false); [line 36]\n REMOVE_TEMPS(n$1); [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="invhouse"]
41 -> 33 ;
40 [label="40: Prune (true branch) \n n$1=*&SIL_temp_conditional___35:int [line 35]\n NULLIFY(&SIL_temp_conditional___35,true); [line 35]\n PRUNE((n$1 != 0), true); [line 35]\n REMOVE_TEMPS(n$1); [line 35]\n " shape="invhouse"]
40 [label="40: Prune (true branch) \n n$1=*&SIL_temp_conditional___35:int [line 36]\n NULLIFY(&SIL_temp_conditional___35,true); [line 36]\n PRUNE((n$1 != 0), true); [line 36]\n REMOVE_TEMPS(n$1); [line 36]\n " shape="invhouse"]
40 -> 43 ;
39 [label="39: ConditinalStmt Branch \n NULLIFY(&spec,false); [line 35]\n DECLARE_LOCALS(&SIL_temp_conditional___35); [line 35]\n *&SIL_temp_conditional___35:int =1 [line 35]\n APPLY_ABSTRACTION; [line 35]\n " shape="box"]
39 [label="39: ConditinalStmt Branch \n NULLIFY(&spec,false); [line 36]\n DECLARE_LOCALS(&SIL_temp_conditional___35); [line 36]\n *&SIL_temp_conditional___35:int =1 [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"]
39 -> 35 ;
38 [label="38: ConditinalStmt Branch \n NULLIFY(&spec,false); [line 35]\n DECLARE_LOCALS(&SIL_temp_conditional___35); [line 35]\n *&SIL_temp_conditional___35:int =0 [line 35]\n APPLY_ABSTRACTION; [line 35]\n " shape="box"]
38 [label="38: ConditinalStmt Branch \n NULLIFY(&spec,false); [line 36]\n DECLARE_LOCALS(&SIL_temp_conditional___35); [line 36]\n *&SIL_temp_conditional___35:int =0 [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"]
38 -> 35 ;
37 [label="37: Prune (false branch) \n n$0=*&spec:char * [line 35]\n PRUNE((n$0 == 0), false); [line 35]\n REMOVE_TEMPS(n$0); [line 35]\n " shape="invhouse"]
37 [label="37: Prune (false branch) \n n$0=*&spec:char * [line 36]\n PRUNE((n$0 == 0), false); [line 36]\n REMOVE_TEMPS(n$0); [line 36]\n " shape="invhouse"]
37 -> 39 ;
36 [label="36: Prune (true branch) \n n$0=*&spec:char * [line 35]\n PRUNE((n$0 != 0), true); [line 35]\n REMOVE_TEMPS(n$0); [line 35]\n " shape="invhouse"]
36 [label="36: Prune (true branch) \n n$0=*&spec:char * [line 36]\n PRUNE((n$0 != 0), true); [line 36]\n REMOVE_TEMPS(n$0); [line 36]\n " shape="invhouse"]
36 -> 38 ;
@ -254,43 +254,43 @@ digraph iCFG {
33 [label="33: Exit test_loop \n " color=yellow style=filled]
32 [label="32: Start test_loop\nFormals: \nLocals: block_size:char * spec:char * \n DECLARE_LOCALS(&return,&block_size,&spec); [line 28]\n NULLIFY(&block_size,false); [line 28]\n NULLIFY(&spec,false); [line 28]\n " color=yellow style=filled]
32 [label="32: Start test_loop\nFormals: \nLocals: block_size:char * spec:char * \n DECLARE_LOCALS(&return,&block_size,&spec); [line 29]\n NULLIFY(&block_size,false); [line 29]\n NULLIFY(&spec,false); [line 29]\n " color=yellow style=filled]
32 -> 59 ;
31 [label="31: BinaryOperatorStmt: Assign \n n$5=*&x:int * [line 22]\n *n$5:int =32 [line 22]\n REMOVE_TEMPS(n$5); [line 22]\n NULLIFY(&x,false); [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"]
31 [label="31: BinaryOperatorStmt: Assign \n n$5=*&x:int * [line 25]\n *n$5:int =32 [line 25]\n REMOVE_TEMPS(n$5); [line 25]\n NULLIFY(&x,false); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"]
31 -> 14 ;
30 [label="30: BinaryOperatorStmt: Assign \n *&x:int *=17 [line 19]\n NULLIFY(&x,false); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"]
30 [label="30: BinaryOperatorStmt: Assign \n *&x:int *=17 [line 23]\n NULLIFY(&x,false); [line 23]\n APPLY_ABSTRACTION; [line 23]\n " shape="box"]
30 -> 14 ;
29 [label="29: Prune (false branch) \n n$4=*&SIL_temp_conditional___22:int [line 18]\n NULLIFY(&SIL_temp_conditional___22,true); [line 18]\n PRUNE((n$4 == 0), false); [line 18]\n REMOVE_TEMPS(n$4); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="invhouse"]
29 [label="29: Prune (false branch) \n n$4=*&SIL_temp_conditional___22:int [line 22]\n NULLIFY(&SIL_temp_conditional___22,true); [line 22]\n PRUNE((n$4 == 0), false); [line 22]\n REMOVE_TEMPS(n$4); [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="invhouse"]
29 -> 31 ;
28 [label="28: Prune (true branch) \n n$4=*&SIL_temp_conditional___22:int [line 18]\n NULLIFY(&SIL_temp_conditional___22,true); [line 18]\n PRUNE((n$4 != 0), true); [line 18]\n REMOVE_TEMPS(n$4); [line 18]\n NULLIFY(&x,false); [line 18]\n " shape="invhouse"]
28 [label="28: Prune (true branch) \n n$4=*&SIL_temp_conditional___22:int [line 22]\n NULLIFY(&SIL_temp_conditional___22,true); [line 22]\n PRUNE((n$4 != 0), true); [line 22]\n REMOVE_TEMPS(n$4); [line 22]\n NULLIFY(&x,false); [line 22]\n " shape="invhouse"]
28 -> 30 ;
27 [label="27: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___22); [line 18]\n *&SIL_temp_conditional___22:int =1 [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"]
27 [label="27: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___22); [line 22]\n *&SIL_temp_conditional___22:int =1 [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"]
27 -> 22 ;
26 [label="26: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___22); [line 18]\n *&SIL_temp_conditional___22:int =0 [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"]
26 [label="26: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___22); [line 22]\n *&SIL_temp_conditional___22:int =0 [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"]
26 -> 22 ;
25 [label="25: Prune (false branch) \n PRUNE((n$3 == 0), false); [line 18]\n REMOVE_TEMPS(n$2,n$3); [line 18]\n " shape="invhouse"]
25 [label="25: Prune (false branch) \n PRUNE((n$3 == 0), false); [line 22]\n REMOVE_TEMPS(n$2,n$3); [line 22]\n " shape="invhouse"]
25 -> 27 ;
24 [label="24: Prune (true branch) \n PRUNE((n$3 != 0), true); [line 18]\n REMOVE_TEMPS(n$2,n$3); [line 18]\n " shape="invhouse"]
24 [label="24: Prune (true branch) \n PRUNE((n$3 != 0), true); [line 22]\n REMOVE_TEMPS(n$2,n$3); [line 22]\n " shape="invhouse"]
24 -> 26 ;
23 [label="23: BinaryOperatorStmt: Assign \n n$2=_fun_getenv(\"BLOCK\":char *) [line 18]\n *&x:int *=n$2 [line 18]\n n$3=*&x:int * [line 18]\n " shape="box"]
23 [label="23: BinaryOperatorStmt: Assign \n n$2=_fun_getenv(\"BLOCK\":char *) [line 22]\n *&x:int *=n$2 [line 22]\n n$3=*&x:int * [line 22]\n " shape="box"]
23 -> 24 ;
@ -300,27 +300,27 @@ digraph iCFG {
22 -> 28 ;
22 -> 29 ;
21 [label="21: Prune (false branch) \n n$1=*&SIL_temp_conditional___15:int [line 18]\n NULLIFY(&SIL_temp_conditional___15,true); [line 18]\n PRUNE((n$1 == 0), false); [line 18]\n REMOVE_TEMPS(n$1); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="invhouse"]
21 [label="21: Prune (false branch) \n n$1=*&SIL_temp_conditional___15:int [line 22]\n NULLIFY(&SIL_temp_conditional___15,true); [line 22]\n PRUNE((n$1 == 0), false); [line 22]\n REMOVE_TEMPS(n$1); [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="invhouse"]
21 -> 31 ;
20 [label="20: Prune (true branch) \n n$1=*&SIL_temp_conditional___15:int [line 18]\n NULLIFY(&SIL_temp_conditional___15,true); [line 18]\n PRUNE((n$1 != 0), true); [line 18]\n REMOVE_TEMPS(n$1); [line 18]\n NULLIFY(&x,false); [line 18]\n " shape="invhouse"]
20 [label="20: Prune (true branch) \n n$1=*&SIL_temp_conditional___15:int [line 22]\n NULLIFY(&SIL_temp_conditional___15,true); [line 22]\n PRUNE((n$1 != 0), true); [line 22]\n REMOVE_TEMPS(n$1); [line 22]\n NULLIFY(&x,false); [line 22]\n " shape="invhouse"]
20 -> 23 ;
19 [label="19: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___15); [line 18]\n *&SIL_temp_conditional___15:int =1 [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"]
19 [label="19: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___15); [line 22]\n *&SIL_temp_conditional___15:int =1 [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"]
19 -> 15 ;
18 [label="18: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___15); [line 18]\n *&SIL_temp_conditional___15:int =0 [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"]
18 [label="18: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___15); [line 22]\n *&SIL_temp_conditional___15:int =0 [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"]
18 -> 15 ;
17 [label="17: Prune (false branch) \n n$0=*&x:int * [line 18]\n PRUNE((n$0 == 0), false); [line 18]\n REMOVE_TEMPS(n$0); [line 18]\n " shape="invhouse"]
17 [label="17: Prune (false branch) \n n$0=*&x:int * [line 22]\n PRUNE((n$0 == 0), false); [line 22]\n REMOVE_TEMPS(n$0); [line 22]\n " shape="invhouse"]
17 -> 19 ;
16 [label="16: Prune (true branch) \n n$0=*&x:int * [line 18]\n PRUNE((n$0 != 0), true); [line 18]\n REMOVE_TEMPS(n$0); [line 18]\n " shape="invhouse"]
16 [label="16: Prune (true branch) \n n$0=*&x:int * [line 22]\n PRUNE((n$0 != 0), true); [line 22]\n REMOVE_TEMPS(n$0); [line 22]\n " shape="invhouse"]
16 -> 18 ;
@ -336,16 +336,16 @@ digraph iCFG {
13 [label="13: Exit shortcircuit_and \n " color=yellow style=filled]
12 [label="12: Start shortcircuit_and\nFormals: x:int *\nLocals: \n DECLARE_LOCALS(&return); [line 17]\n " color=yellow style=filled]
12 [label="12: Start shortcircuit_and\nFormals: x:int *\nLocals: \n DECLARE_LOCALS(&return); [line 21]\n " color=yellow style=filled]
12 -> 16 ;
12 -> 17 ;
11 [label="11: BinaryOperatorStmt: Assign \n *&x:int *=32 [line 14]\n NULLIFY(&x,false); [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"]
11 [label="11: BinaryOperatorStmt: Assign \n *&x:int *=32 [line 17]\n NULLIFY(&x,false); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"]
11 -> 3 ;
10 [label="10: BinaryOperatorStmt: Assign \n NULLIFY(&x,false); [line 14]\n *&x:int *=17 [line 14]\n NULLIFY(&x,false); [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"]
10 [label="10: BinaryOperatorStmt: Assign \n NULLIFY(&x,false); [line 15]\n *&x:int *=17 [line 15]\n NULLIFY(&x,false); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"]
10 -> 3 ;

@ -7,10 +7,7 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
int identity(int x) {
return x;
}
int identity(int x) { return x; }
int bar(int x) {
if (identity(x)) {
@ -29,6 +26,4 @@ int baz(int x) {
}
}
int neg(int x) {
return !x;
}
int neg(int x) { return !x; }

@ -1,21 +1,21 @@
digraph iCFG {
32 [label="32: Return Stmt \n n$1=*&SIL_temp_conditional___27:int [line 33]\n NULLIFY(&SIL_temp_conditional___27,true); [line 33]\n *&return:int =n$1 [line 33]\n REMOVE_TEMPS(n$1); [line 33]\n APPLY_ABSTRACTION; [line 33]\n " shape="box"]
32 [label="32: Return Stmt \n n$1=*&SIL_temp_conditional___27:int [line 29]\n NULLIFY(&SIL_temp_conditional___27,true); [line 29]\n *&return:int =n$1 [line 29]\n REMOVE_TEMPS(n$1); [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"]
32 -> 26 ;
31 [label="31: ConditinalStmt Branch \n NULLIFY(&x,false); [line 33]\n DECLARE_LOCALS(&SIL_temp_conditional___27); [line 33]\n *&SIL_temp_conditional___27:int =1 [line 33]\n APPLY_ABSTRACTION; [line 33]\n " shape="box"]
31 [label="31: ConditinalStmt Branch \n NULLIFY(&x,false); [line 29]\n DECLARE_LOCALS(&SIL_temp_conditional___27); [line 29]\n *&SIL_temp_conditional___27:int =1 [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"]
31 -> 27 ;
30 [label="30: ConditinalStmt Branch \n NULLIFY(&x,false); [line 33]\n DECLARE_LOCALS(&SIL_temp_conditional___27); [line 33]\n *&SIL_temp_conditional___27:int =0 [line 33]\n APPLY_ABSTRACTION; [line 33]\n " shape="box"]
30 [label="30: ConditinalStmt Branch \n NULLIFY(&x,false); [line 29]\n DECLARE_LOCALS(&SIL_temp_conditional___27); [line 29]\n *&SIL_temp_conditional___27:int =0 [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"]
30 -> 27 ;
29 [label="29: Prune (false branch) \n n$0=*&x:int [line 33]\n PRUNE((n$0 == 0), false); [line 33]\n REMOVE_TEMPS(n$0); [line 33]\n " shape="invhouse"]
29 [label="29: Prune (false branch) \n n$0=*&x:int [line 29]\n PRUNE((n$0 == 0), false); [line 29]\n REMOVE_TEMPS(n$0); [line 29]\n " shape="invhouse"]
29 -> 31 ;
28 [label="28: Prune (true branch) \n n$0=*&x:int [line 33]\n PRUNE((n$0 != 0), true); [line 33]\n REMOVE_TEMPS(n$0); [line 33]\n " shape="invhouse"]
28 [label="28: Prune (true branch) \n n$0=*&x:int [line 29]\n PRUNE((n$0 != 0), true); [line 29]\n REMOVE_TEMPS(n$0); [line 29]\n " shape="invhouse"]
28 -> 30 ;
@ -26,45 +26,45 @@ digraph iCFG {
26 [label="26: Exit neg \n " color=yellow style=filled]
25 [label="25: Start neg\nFormals: x:int \nLocals: \n DECLARE_LOCALS(&return); [line 32]\n " color=yellow style=filled]
25 [label="25: Start neg\nFormals: x:int \nLocals: \n DECLARE_LOCALS(&return); [line 29]\n " color=yellow style=filled]
25 -> 28 ;
25 -> 29 ;
24 [label="24: Return Stmt \n *&return:int =0 [line 28]\n APPLY_ABSTRACTION; [line 28]\n " shape="box"]
24 [label="24: Return Stmt \n *&return:int =0 [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"]
24 -> 13 ;
23 [label="23: Return Stmt \n *&return:int =1 [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"]
23 [label="23: Return Stmt \n *&return:int =1 [line 23]\n APPLY_ABSTRACTION; [line 23]\n " shape="box"]
23 -> 13 ;
22 [label="22: Prune (false branch) \n PRUNE((n$2 == 0), false); [line 25]\n REMOVE_TEMPS(n$1,n$2); [line 25]\n " shape="invhouse"]
22 [label="22: Prune (false branch) \n PRUNE((n$2 == 0), false); [line 22]\n REMOVE_TEMPS(n$1,n$2); [line 22]\n " shape="invhouse"]
22 -> 24 ;
21 [label="21: Prune (true branch) \n PRUNE((n$2 != 0), true); [line 25]\n REMOVE_TEMPS(n$1,n$2); [line 25]\n " shape="invhouse"]
21 [label="21: Prune (true branch) \n PRUNE((n$2 != 0), true); [line 22]\n REMOVE_TEMPS(n$1,n$2); [line 22]\n " shape="invhouse"]
21 -> 23 ;
20 [label="20: Call _fun_identity \n n$1=*&SIL_temp_conditional___15:int [line 25]\n NULLIFY(&SIL_temp_conditional___15,true); [line 25]\n n$2=_fun_identity(n$1:int ) [line 25]\n " shape="box"]
20 [label="20: Call _fun_identity \n n$1=*&SIL_temp_conditional___15:int [line 22]\n NULLIFY(&SIL_temp_conditional___15,true); [line 22]\n n$2=_fun_identity(n$1:int ) [line 22]\n " shape="box"]
20 -> 21 ;
20 -> 22 ;
19 [label="19: ConditinalStmt Branch \n NULLIFY(&x,false); [line 25]\n DECLARE_LOCALS(&SIL_temp_conditional___15); [line 25]\n *&SIL_temp_conditional___15:int =1 [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"]
19 [label="19: ConditinalStmt Branch \n NULLIFY(&x,false); [line 22]\n DECLARE_LOCALS(&SIL_temp_conditional___15); [line 22]\n *&SIL_temp_conditional___15:int =1 [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"]
19 -> 15 ;
18 [label="18: ConditinalStmt Branch \n NULLIFY(&x,false); [line 25]\n DECLARE_LOCALS(&SIL_temp_conditional___15); [line 25]\n *&SIL_temp_conditional___15:int =0 [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"]
18 [label="18: ConditinalStmt Branch \n NULLIFY(&x,false); [line 22]\n DECLARE_LOCALS(&SIL_temp_conditional___15); [line 22]\n *&SIL_temp_conditional___15:int =0 [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"]
18 -> 15 ;
17 [label="17: Prune (false branch) \n n$0=*&x:int [line 25]\n PRUNE((n$0 == 0), false); [line 25]\n REMOVE_TEMPS(n$0); [line 25]\n " shape="invhouse"]
17 [label="17: Prune (false branch) \n n$0=*&x:int [line 22]\n PRUNE((n$0 == 0), false); [line 22]\n REMOVE_TEMPS(n$0); [line 22]\n " shape="invhouse"]
17 -> 19 ;
16 [label="16: Prune (true branch) \n n$0=*&x:int [line 25]\n PRUNE((n$0 != 0), true); [line 25]\n REMOVE_TEMPS(n$0); [line 25]\n " shape="invhouse"]
16 [label="16: Prune (true branch) \n n$0=*&x:int [line 22]\n PRUNE((n$0 != 0), true); [line 22]\n REMOVE_TEMPS(n$0); [line 22]\n " shape="invhouse"]
16 -> 18 ;
@ -72,51 +72,51 @@ digraph iCFG {
15 -> 20 ;
14 [label="14: + \n NULLIFY(&x,false); [line 25]\n " ]
14 [label="14: + \n NULLIFY(&x,false); [line 22]\n " ]
14 -> 13 ;
13 [label="13: Exit baz \n " color=yellow style=filled]
12 [label="12: Start baz\nFormals: x:int \nLocals: \n DECLARE_LOCALS(&return); [line 23]\n " color=yellow style=filled]
12 [label="12: Start baz\nFormals: x:int \nLocals: \n DECLARE_LOCALS(&return); [line 20]\n " color=yellow style=filled]
12 -> 16 ;
12 -> 17 ;
11 [label="11: Return Stmt \n *&return:int =0 [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"]
11 [label="11: Return Stmt \n *&return:int =0 [line 16]\n APPLY_ABSTRACTION; [line 16]\n " shape="box"]
11 -> 5 ;
10 [label="10: Return Stmt \n *&return:int =1 [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"]
10 [label="10: Return Stmt \n *&return:int =1 [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"]
10 -> 5 ;
9 [label="9: Prune (false branch) \n PRUNE((n$1 == 0), false); [line 16]\n REMOVE_TEMPS(n$0,n$1); [line 16]\n " shape="invhouse"]
9 [label="9: Prune (false branch) \n PRUNE((n$1 == 0), false); [line 13]\n REMOVE_TEMPS(n$0,n$1); [line 13]\n " shape="invhouse"]
9 -> 11 ;
8 [label="8: Prune (true branch) \n PRUNE((n$1 != 0), true); [line 16]\n REMOVE_TEMPS(n$0,n$1); [line 16]\n " shape="invhouse"]
8 [label="8: Prune (true branch) \n PRUNE((n$1 != 0), true); [line 13]\n REMOVE_TEMPS(n$0,n$1); [line 13]\n " shape="invhouse"]
8 -> 10 ;
7 [label="7: Call _fun_identity \n n$0=*&x:int [line 16]\n n$1=_fun_identity(n$0:int ) [line 16]\n NULLIFY(&x,false); [line 16]\n " shape="box"]
7 [label="7: Call _fun_identity \n n$0=*&x:int [line 13]\n n$1=_fun_identity(n$0:int ) [line 13]\n NULLIFY(&x,false); [line 13]\n " shape="box"]
7 -> 8 ;
7 -> 9 ;
6 [label="6: + \n NULLIFY(&x,false); [line 16]\n " ]
6 [label="6: + \n NULLIFY(&x,false); [line 13]\n " ]
6 -> 5 ;
5 [label="5: Exit bar \n " color=yellow style=filled]
4 [label="4: Start bar\nFormals: x:int \nLocals: \n DECLARE_LOCALS(&return); [line 15]\n " color=yellow style=filled]
4 [label="4: Start bar\nFormals: x:int \nLocals: \n DECLARE_LOCALS(&return); [line 12]\n " color=yellow style=filled]
4 -> 7 ;
3 [label="3: Return Stmt \n n$0=*&x:int [line 11]\n *&return:int =n$0 [line 11]\n REMOVE_TEMPS(n$0); [line 11]\n NULLIFY(&x,false); [line 11]\n APPLY_ABSTRACTION; [line 11]\n " shape="box"]
3 [label="3: Return Stmt \n n$0=*&x:int [line 10]\n *&return:int =n$0 [line 10]\n REMOVE_TEMPS(n$0); [line 10]\n NULLIFY(&x,false); [line 10]\n APPLY_ABSTRACTION; [line 10]\n " shape="box"]
3 -> 2 ;

@ -17,10 +17,6 @@ void ife_then_access_field(struct s *p, struct s *q) {
int z = (1 ? p : q)->field;
}
void call_ife_then_access_field() {
int z = (ret_ptr(1 ? 2 : 3))->field;
}
void call_ife_then_access_field() { int z = (ret_ptr(1 ? 2 : 3))->field; }
void access_field_in_ife_branch() {
int z = 1 ? (ret_ptr(4))->field : 0;
}
void access_field_in_ife_branch() { int z = 1 ? (ret_ptr(4))->field : 0; }

@ -1,21 +1,21 @@
digraph iCFG {
24 [label="24: DeclStmt \n n$2=*&SIL_temp_conditional___19:int [line 25]\n NULLIFY(&SIL_temp_conditional___19,true); [line 25]\n *&z:int =n$2 [line 25]\n REMOVE_TEMPS(n$2); [line 25]\n NULLIFY(&z,false); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"]
24 [label="24: DeclStmt \n n$2=*&SIL_temp_conditional___19:int [line 22]\n NULLIFY(&SIL_temp_conditional___19,true); [line 22]\n *&z:int =n$2 [line 22]\n REMOVE_TEMPS(n$2); [line 22]\n NULLIFY(&z,false); [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"]
24 -> 18 ;
23 [label="23: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___19); [line 25]\n *&SIL_temp_conditional___19:int =0 [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"]
23 [label="23: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___19); [line 22]\n *&SIL_temp_conditional___19:int =0 [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"]
23 -> 19 ;
22 [label="22: ConditinalStmt Branch \n n$0=_fun_ret_ptr(4:int ) [line 25]\n n$1=*n$0.field:int [line 25]\n DECLARE_LOCALS(&SIL_temp_conditional___19); [line 25]\n *&SIL_temp_conditional___19:int =n$1 [line 25]\n REMOVE_TEMPS(n$0,n$1); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"]
22 [label="22: ConditinalStmt Branch \n n$0=_fun_ret_ptr(4:int ) [line 22]\n n$1=*n$0.field:int [line 22]\n DECLARE_LOCALS(&SIL_temp_conditional___19); [line 22]\n *&SIL_temp_conditional___19:int =n$1 [line 22]\n REMOVE_TEMPS(n$0,n$1); [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"]
22 -> 19 ;
21 [label="21: Prune (false branch) \n PRUNE((1 == 0), false); [line 25]\n " shape="invhouse"]
21 [label="21: Prune (false branch) \n PRUNE((1 == 0), false); [line 22]\n " shape="invhouse"]
21 -> 23 ;
20 [label="20: Prune (true branch) \n PRUNE((1 != 0), true); [line 25]\n " shape="invhouse"]
20 [label="20: Prune (true branch) \n PRUNE((1 != 0), true); [line 22]\n " shape="invhouse"]
20 -> 22 ;
@ -26,28 +26,28 @@ digraph iCFG {
18 [label="18: Exit access_field_in_ife_branch \n " color=yellow style=filled]
17 [label="17: Start access_field_in_ife_branch\nFormals: \nLocals: z:int \n DECLARE_LOCALS(&return,&z); [line 24]\n NULLIFY(&z,false); [line 24]\n " color=yellow style=filled]
17 [label="17: Start access_field_in_ife_branch\nFormals: \nLocals: z:int \n DECLARE_LOCALS(&return,&z); [line 22]\n NULLIFY(&z,false); [line 22]\n " color=yellow style=filled]
17 -> 20 ;
17 -> 21 ;
16 [label="16: DeclStmt \n n$0=*&SIL_temp_conditional___11:int [line 21]\n NULLIFY(&SIL_temp_conditional___11,true); [line 21]\n n$1=_fun_ret_ptr(n$0:int ) [line 21]\n n$2=*n$1.field:int [line 21]\n *&z:int =n$2 [line 21]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 21]\n NULLIFY(&z,false); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"]
16 [label="16: DeclStmt \n n$0=*&SIL_temp_conditional___11:int [line 20]\n NULLIFY(&SIL_temp_conditional___11,true); [line 20]\n n$1=_fun_ret_ptr(n$0:int ) [line 20]\n n$2=*n$1.field:int [line 20]\n *&z:int =n$2 [line 20]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 20]\n NULLIFY(&z,false); [line 20]\n APPLY_ABSTRACTION; [line 20]\n " shape="box"]
16 -> 10 ;
15 [label="15: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___11); [line 21]\n *&SIL_temp_conditional___11:int =3 [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"]
15 [label="15: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___11); [line 20]\n *&SIL_temp_conditional___11:int =3 [line 20]\n APPLY_ABSTRACTION; [line 20]\n " shape="box"]
15 -> 11 ;
14 [label="14: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___11); [line 21]\n *&SIL_temp_conditional___11:int =2 [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"]
14 [label="14: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___11); [line 20]\n *&SIL_temp_conditional___11:int =2 [line 20]\n APPLY_ABSTRACTION; [line 20]\n " shape="box"]
14 -> 11 ;
13 [label="13: Prune (false branch) \n PRUNE((1 == 0), false); [line 21]\n " shape="invhouse"]
13 [label="13: Prune (false branch) \n PRUNE((1 == 0), false); [line 20]\n " shape="invhouse"]
13 -> 15 ;
12 [label="12: Prune (true branch) \n PRUNE((1 != 0), true); [line 21]\n " shape="invhouse"]
12 [label="12: Prune (true branch) \n PRUNE((1 != 0), true); [line 20]\n " shape="invhouse"]
12 -> 14 ;

@ -7,7 +7,15 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
enum week{ sunday, monday, tuesday, wednesday = 0, thursday, friday, saturday};
enum week {
sunday,
monday,
tuesday,
wednesday = 0,
thursday,
friday,
saturday
};
int main() {
enum week today;

@ -1,32 +1,32 @@
digraph iCFG {
8 [label="8: BinaryOperatorStmt: Assign \n *&today:int =0 [line 14]\n NULLIFY(&today,false); [line 14]\n " shape="box"]
8 [label="8: BinaryOperatorStmt: Assign \n *&today:int =0 [line 22]\n NULLIFY(&today,false); [line 22]\n " shape="box"]
8 -> 7 ;
7 [label="7: BinaryOperatorStmt: Assign \n *&today:int =1 [line 15]\n " shape="box"]
7 [label="7: BinaryOperatorStmt: Assign \n *&today:int =1 [line 23]\n " shape="box"]
7 -> 6 ;
6 [label="6: BinaryOperatorStmt: Assign \n n$0=*&today:int [line 16]\n *&today:int =(n$0 + 4) [line 16]\n REMOVE_TEMPS(n$0); [line 16]\n NULLIFY(&today,false); [line 16]\n " shape="box"]
6 [label="6: BinaryOperatorStmt: Assign \n n$0=*&today:int [line 24]\n *&today:int =(n$0 + 4) [line 24]\n REMOVE_TEMPS(n$0); [line 24]\n NULLIFY(&today,false); [line 24]\n " shape="box"]
6 -> 5 ;
5 [label="5: BinaryOperatorStmt: Assign \n *&today:int =(2 + 1) [line 17]\n NULLIFY(&today,false); [line 17]\n " shape="box"]
5 [label="5: BinaryOperatorStmt: Assign \n *&today:int =(2 + 1) [line 25]\n NULLIFY(&today,false); [line 25]\n " shape="box"]
5 -> 4 ;
4 [label="4: DeclStmt \n *&i:int =(2 + (2 - 0)) [line 18]\n NULLIFY(&i,false); [line 18]\n " shape="box"]
4 [label="4: DeclStmt \n *&i:int =(2 + (2 - 0)) [line 26]\n NULLIFY(&i,false); [line 26]\n " shape="box"]
4 -> 3 ;
3 [label="3: Return Stmt \n *&return:int =0 [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"]
3 [label="3: Return Stmt \n *&return:int =0 [line 27]\n APPLY_ABSTRACTION; [line 27]\n " shape="box"]
3 -> 2 ;
2 [label="2: Exit main \n " color=yellow style=filled]
1 [label="1: Start main\nFormals: \nLocals: i:int today:int \n DECLARE_LOCALS(&return,&i,&today); [line 12]\n NULLIFY(&i,false); [line 12]\n NULLIFY(&today,false); [line 12]\n " color=yellow style=filled]
1 [label="1: Start main\nFormals: \nLocals: i:int today:int \n DECLARE_LOCALS(&return,&i,&today); [line 20]\n NULLIFY(&i,false); [line 20]\n NULLIFY(&today,false); [line 20]\n " color=yellow style=filled]
1 -> 8 ;

@ -24,5 +24,6 @@ int test() {
enum Foo foo_a = A;
if (foo_g == 12)
return foo_g / foo_a;
else return 0;
else
return 0;
}

@ -7,7 +7,7 @@ digraph iCFG {
18 -> 13 ;
17 [label="17: Return Stmt \n NULLIFY(&foo_a,false); [line 27]\n NULLIFY(&foo_g,false); [line 27]\n *&return:int =0 [line 27]\n APPLY_ABSTRACTION; [line 27]\n " shape="box"]
17 [label="17: Return Stmt \n NULLIFY(&foo_a,false); [line 28]\n NULLIFY(&foo_g,false); [line 28]\n *&return:int =0 [line 28]\n APPLY_ABSTRACTION; [line 28]\n " shape="box"]
17 -> 11 ;

@ -9,12 +9,9 @@
#import <stdio.h>
int getValue() {
return 2;
}
int getValue() { return 2; }
int g0()
{
int g0() {
int a = 0;
if (getValue() > 1)
goto stepC;
@ -26,8 +23,7 @@ int g0()
return 1;
}
int g1()
{
int g1() {
int a = 0;
if (getValue() > 1)
goto stepB;
@ -38,8 +34,7 @@ int g1()
return 1;
}
int g2()
{
int g2() {
int a = 0;
stepB:
a = 1;
@ -61,8 +56,7 @@ exit_step:
return 1;
}
int g3()
{
int g3() {
stepB:
printf("B\n");
@ -84,8 +78,7 @@ exit_step:
return 1;
}
int g4()
{
int g4() {
stepB:
printf("B\n");
@ -106,8 +99,7 @@ exit_step:
return 1;
}
int g5()
{
int g5() {
stepB:
printf("B\n");
@ -129,8 +121,7 @@ exit_step:
goto stepA;
}
int g6()
{
int g6() {
stepB:
printf("B\n");
@ -152,9 +143,7 @@ exit_step:
goto stepA;
}
int g7()
{
int g7() {
int i = 0, j = 0, k = 0;
while (i < 10) {
while (j < 10) {
@ -177,10 +166,10 @@ int g7()
return 2;
}
int g8(int q)
{
int g8(int q) {
int i = 0, j = 0, k = 0;
if(q) goto print;
if (q)
goto print;
while (i < 10) {
while (j < 10) {
while (k < 10) {

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save