Predator  [unstable] git snapshot
Macros
config.h File Reference

various compile-time options More...

#include "trap.h"

Go to the source code of this file.

Macros

#define GIT_SHA1   sl_git_sha1
#define DEBUG_SE_END_NOT_REACHED   0
 if 1, print block scheduler statistics whenever end of a fnc is not reached
#define DEBUG_SE_FIXED_POINT   0
 bit mask of fixed-point debugging flags, zero means no debugging
#define DEBUG_SE_NONDET_COND   0
#define DEBUG_SE_STACK_FRAME   0
 if 1, print created/destroyed variables when running in verbose mode
#define DEBUG_SYMABSTRACT   0
 if 1, plot each abstraction/concretization step to a separate heap graph
#define DEBUG_SYMCALL   0
 if 1, plot some interesting operations as being performed by symcall
#define DEBUG_SYMCUT   0
 if 1, the symcut module prints some extra debugging info
#define DEBUG_SYMGC   0
 if 1, plot shape of the data structures being leaked
#define DEBUG_SYMJOIN   0
 if 1, symjoin prints some extra debugging info
#define DEBUG_SYMSTATE   0
 if 1, SymState plots heap graphs per each heap comparison (expensive)
#define SE_ABSTRACT_ON_CALL_DONE   1
 if 1, perform abstraction after each just completed call on caller's side
#define SE_ABSTRACT_ON_LOOP_EDGES_ONLY   1
 if 1, do not perform abstraction on each end of BB, but only when looping
#define SE_ALLOW_CYCLIC_TRACE_GRAPH   0
 if 1, allow to replace already referenced trace graph nodes (creates cycles)
#define SE_ALLOW_INT_RANGES   0x6
 bit mask of allowed operations on integral ranges
#define SE_ALLOW_OFF_RANGES   0x1
 bit mask of allowed operations on values with offset specified by int ranges
#define SE_ALLOW_SUBPATH_RANKING   0
#define SE_ALLOW_THREE_WAY_JOIN   2
 how much do we allow to use three-way join
#define SE_ASSUME_FRESH_STATIC_DATA   1
 if 1, assume that the contents of static data is initialized on first access
#define SE_BLOCK_SCHEDULER_KIND   2
#define SE_CALL_CACHE_MISS_THR   0x10
 call cache miss count that will trigger function removal (0 means disabled)
#define SE_COST_OF_SEG_INTRODUCTION   0
 increase the cost of abstraction path consisting of concrete objects only by
#define SE_COST0_LEN_THR   2
 abstraction length threshold for cost of path equal to 0
#define SE_COST1_LEN_THR   2
 abstraction length threshold for cost of path equal to 1
#define SE_COST2_LEN_THR   3
 abstraction length threshold for cost of path equal to 2
#define SE_DISABLE_ALIGNMENT_TRACKING   0
 if 1, do not use alignment tracking unless we get it for free
#define SE_DISABLE_DLS   0
 if 1, do not use DLS (Doubly-linked List Segment) abstraction
#define SE_DISABLE_SLS   0
 if 1, do not use SLS (Singly-linked List Segment) abstraction
#define SE_DISABLE_SYMCUT   0
 if 1, do not use the symcut module at all
#define SE_DUMP_TRACE_GRAPHS   0
#define SE_EARLY_VARS_DESTRUCTION   1
#define SE_ENABLE_CALL_CACHE   1
#define SE_ERROR_RECOVERY_MODE   1
#define SE_FORBID_HEAP_REPLACE   0
 if non-zero, do not replace a previously tracked if entailed by a new one
#define SE_INT_ARITHMETIC_LIMIT   10
 the highest integral number we can count to (only partial implementation atm)
#define SE_JOIN_ON_LOOP_EDGES_ONLY   3
#define SE_MAX_CALL_DEPTH   0x40
 maximal call depth
#define SE_PLOT_ERROR_STATES   0
 if non-zero, plot each state that caused an error to be reported
#define SE_PRESERVE_DLS_MINLEN   2
 preserve heaps with different DLS minimum lengths up to the specified number
#define SE_RESTRICT_DLS_MINLEN   2
 upper bound of DLS minimal length (zero means unlimited)
#define SE_RESTRICT_SLS_MINLEN   2
 upper bound of SLS minimal length (zero means unlimited)
#define SE_STATE_ON_THE_FLY_ORDERING   1
#define SE_STATE_PRUNING_MODE   1
#define SE_STATE_PRUNING_MISS_THR   0x8
 prune non-loop blocks on reaching the count of join misses (0 means disabled)
#define SE_STATE_PRUNING_TOTAL_THR   0x80
 prune non-loop blocks on reaching the count of states (0 means disabled)
#define SE_SYMCUT_PRESERVES_MIN_LENGTHS   1
 if 1, the symcut module allows generic minimal lengths to survive a function call/return.
#define SE_TRACK_NON_POINTER_VALUES   2
#define SH_COPY_ON_WRITE   1
 if 1, do not make deep copy on copy of SymHeap [experimental]
#define SH_DELAYED_FIELDS_DESTRUCTION   1
 if 1, do not destroy fields immediately as they become unused
#define SH_PREVENT_AMBIGUOUS_ENT_ID   1
 if 1, prevent collisions on entity IDs with descendants heaps
#define SYMPLOT_STOP_AFTER_N_STATES   0
 if more than zero, jump to debugger as soon as N graph of the same name has been plotted

Detailed Description

various compile-time options

Definition in file config.h.

Macro Definition Documentation

#define DEBUG_SE_END_NOT_REACHED   0

if 1, print block scheduler statistics whenever end of a fnc is not reached

Definition at line 34 of file config.h.

#define DEBUG_SE_FIXED_POINT   0

bit mask of fixed-point debugging flags, zero means no debugging

  • 0x1 ... print the counts of heaps per each unit
  • 0x2 ... dump the fixed point as a set of plots per each unit
  • 0x4 ... use a single instruction as the unit (basic block otherwise)

Definition at line 42 of file config.h.

#define DEBUG_SE_NONDET_COND   0
  • 0 ... do not debug branching by non-deterministic conditions
  • 1 ... plot heap graphs of branching by non-deterministic abstract values
  • 2 ... plot heap graphs of branching by any non-deterministic conditions

Definition at line 49 of file config.h.

#define DEBUG_SE_STACK_FRAME   0

if 1, print created/destroyed variables when running in verbose mode

Definition at line 54 of file config.h.

#define DEBUG_SYMABSTRACT   0

if 1, plot each abstraction/concretization step to a separate heap graph

Definition at line 59 of file config.h.

#define DEBUG_SYMCALL   0

if 1, plot some interesting operations as being performed by symcall

Definition at line 64 of file config.h.

#define DEBUG_SYMCUT   0

if 1, the symcut module prints some extra debugging info

Definition at line 69 of file config.h.

#define DEBUG_SYMGC   0

if 1, plot shape of the data structures being leaked

Definition at line 74 of file config.h.

#define DEBUG_SYMJOIN   0

if 1, symjoin prints some extra debugging info

Definition at line 79 of file config.h.

#define DEBUG_SYMSTATE   0

if 1, SymState plots heap graphs per each heap comparison (expensive)

Definition at line 84 of file config.h.

#define GIT_SHA1   sl_git_sha1

Definition at line 28 of file config.h.

#define SE_ABSTRACT_ON_CALL_DONE   1

if 1, perform abstraction after each just completed call on caller's side

Definition at line 89 of file config.h.

#define SE_ABSTRACT_ON_LOOP_EDGES_ONLY   1

if 1, do not perform abstraction on each end of BB, but only when looping

Definition at line 94 of file config.h.

#define SE_ALLOW_CYCLIC_TRACE_GRAPH   0

if 1, allow to replace already referenced trace graph nodes (creates cycles)

Definition at line 99 of file config.h.

#define SE_ALLOW_INT_RANGES   0x6

bit mask of allowed operations on integral ranges

  • 0x1 ... allow to create integral ranges from integral constants if needed
  • 0x2 ... allow widening of the upper bound of integral ranges
  • 0x4 ... allow widening of the lower bound of integral ranges

Definition at line 107 of file config.h.

#define SE_ALLOW_OFF_RANGES   0x1

bit mask of allowed operations on values with offset specified by int ranges

  • 0x1 ... allow to introduce values with offset specified by integral ranges
  • 0x2 ... allow widening of the upper bound of values with offset ranges
  • 0x4 ... allow widening of the upper lower of values with offset ranges

Definition at line 115 of file config.h.

#define SE_ALLOW_SUBPATH_RANKING   0

Definition at line 120 of file config.h.

#define SE_ALLOW_THREE_WAY_JOIN   2

how much do we allow to use three-way join

  • 0 ... never ever
  • 1 ... only when joining prototypes
  • 2 ... also when joining states if the three-way join is considered useful
  • 3 ... do not restrict the usage of three-way join at the level of symjoin

Definition at line 129 of file config.h.

#define SE_ASSUME_FRESH_STATIC_DATA   1

if 1, assume that the contents of static data is initialized on first access

Definition at line 134 of file config.h.

#define SE_BLOCK_SCHEDULER_KIND   2
  • 0 ... use BFS scheduler
  • 1 ... use DFS scheduler, keep already scheduled blocks at their position
  • 2 ... use DFS scheduler, move already scheduled blocks to front of queue
  • 3 ... use load-driven scheduler (picks the one with fewer pending heaps)

Definition at line 142 of file config.h.

#define SE_CALL_CACHE_MISS_THR   0x10

call cache miss count that will trigger function removal (0 means disabled)

Definition at line 147 of file config.h.

#define SE_COST0_LEN_THR   2

abstraction length threshold for cost of path equal to 0

Definition at line 157 of file config.h.

#define SE_COST1_LEN_THR   2

abstraction length threshold for cost of path equal to 1

Note
only values >= SE_COST0_LEN_THR make sense

Definition at line 163 of file config.h.

#define SE_COST2_LEN_THR   3

abstraction length threshold for cost of path equal to 2

Note
only values >= SE_COST1_LEN_THR make sense

Definition at line 169 of file config.h.

#define SE_COST_OF_SEG_INTRODUCTION   0

increase the cost of abstraction path consisting of concrete objects only by

Definition at line 152 of file config.h.

#define SE_DISABLE_ALIGNMENT_TRACKING   0

if 1, do not use alignment tracking unless we get it for free

Definition at line 174 of file config.h.

#define SE_DISABLE_DLS   0

if 1, do not use DLS (Doubly-linked List Segment) abstraction

Definition at line 179 of file config.h.

#define SE_DISABLE_SLS   0

if 1, do not use SLS (Singly-linked List Segment) abstraction

Definition at line 184 of file config.h.

#define SE_DISABLE_SYMCUT   0

if 1, do not use the symcut module at all

Definition at line 189 of file config.h.

#define SE_DUMP_TRACE_GRAPHS   0
  • 0 ... do not dump trace graphs unless explicitly asked to do so
  • 1 ... dump a single trace graph for all errors/warnings (may be huge)
  • 2 ... dump a single trace graph for each error/warning

Definition at line 196 of file config.h.

#define SE_EARLY_VARS_DESTRUCTION   1
  • 0 ... kill local variables only on stack frame destruction
  • 1 ... kill local variables as soon as they become dead

Definition at line 202 of file config.h.

#define SE_ENABLE_CALL_CACHE   1
  • 0 ... call cache completely disabled (saves a lot of memory)
  • 1 ... call cache enabled, use graph isomorphism for lookup (hungry on mem)
  • 2 ... call cache enabled, use join operator for lookup [experimental]

Definition at line 209 of file config.h.

#define SE_ERROR_RECOVERY_MODE   1
  • 0 no error recovery, stop the analysis as soon as an error is detected
  • 1 low-cost error recovery (stop analyzing paths with errors already caught)
  • 2 full error recovery (keep analyzing until a non-recoverable error occurs)

Definition at line 216 of file config.h.

#define SE_FORBID_HEAP_REPLACE   0

if non-zero, do not replace a previously tracked if entailed by a new one

Definition at line 221 of file config.h.

#define SE_INT_ARITHMETIC_LIMIT   10

the highest integral number we can count to (only partial implementation atm)

Definition at line 226 of file config.h.

#define SE_JOIN_ON_LOOP_EDGES_ONLY   3
  • -1 ... never join, never check for entailment, always check for isomorphism
  • 0 ... join states on each basic block entry
  • 1 ... join only when traversing a loop-closing edge, entailment otherwise
  • 2 ... join only when traversing a loop-closing edge, isomorphism otherwise
  • 3 ... same as 2 but skips the isomorphism check when considered redundant

Definition at line 235 of file config.h.

#define SE_MAX_CALL_DEPTH   0x40

maximal call depth

Definition at line 240 of file config.h.

#define SE_PLOT_ERROR_STATES   0

if non-zero, plot each state that caused an error to be reported

Definition at line 245 of file config.h.

#define SE_PRESERVE_DLS_MINLEN   2

preserve heaps with different DLS minimum lengths up to the specified number

Definition at line 250 of file config.h.

#define SE_RESTRICT_DLS_MINLEN   2

upper bound of DLS minimal length (zero means unlimited)

Definition at line 255 of file config.h.

#define SE_RESTRICT_SLS_MINLEN   2

upper bound of SLS minimal length (zero means unlimited)

Definition at line 260 of file config.h.

#define SE_STATE_ON_THE_FLY_ORDERING   1
  • 0 ... do not try to optimize the order of heaps in SymState containers
  • 1 ... reorder heaps in SymStateWithJoin based on hit ratio
  • 2 ... reorder heaps also in SymHeapUnion based on hit ratio [experimental]

Definition at line 267 of file config.h.

#define SE_STATE_PRUNING_MISS_THR   0x8

prune non-loop blocks on reaching the count of join misses (0 means disabled)

Definition at line 280 of file config.h.

#define SE_STATE_PRUNING_MODE   1
  • 0 ... keep state info for all basic blocks of a function
  • 1 ... keep state info for all basic blocks except trivial basic blocks
  • 2 ... keep state info for all basic blocks with more than one ingoing edge
  • 3 ... keep state info for all basic blocks that a CFG loop starts with

Definition at line 275 of file config.h.

#define SE_STATE_PRUNING_TOTAL_THR   0x80

prune non-loop blocks on reaching the count of states (0 means disabled)

Definition at line 285 of file config.h.

#define SE_SYMCUT_PRESERVES_MIN_LENGTHS   1

if 1, the symcut module allows generic minimal lengths to survive a function call/return.

Not recommended unless SymCallCache has been rewritten to use symjoin to maintain cache entries.

Definition at line 292 of file config.h.

#define SE_TRACK_NON_POINTER_VALUES   2
  • 0 ... disable tracking non-pointer values
  • 1 ... basic tracking of non-pointer values
  • 2 ... expensive tracking of pointer values
  • 3 ... track also code pointers

Definition at line 300 of file config.h.

#define SH_COPY_ON_WRITE   1

if 1, do not make deep copy on copy of SymHeap [experimental]

Definition at line 305 of file config.h.

#define SH_DELAYED_FIELDS_DESTRUCTION   1

if 1, do not destroy fields immediately as they become unused

Definition at line 310 of file config.h.

#define SH_PREVENT_AMBIGUOUS_ENT_ID   1

if 1, prevent collisions on entity IDs with descendants heaps

Definition at line 315 of file config.h.

#define SYMPLOT_STOP_AFTER_N_STATES   0

if more than zero, jump to debugger as soon as N graph of the same name has been plotted

Definition at line 321 of file config.h.