chc.api.XPredicate
Base class and subclasses:
|
Base class of external predicate. |
|
Term points to start of allocated region that can be freed. |
|
Unstructured write of bytes to pointed address with given length. |
|
Term points to a buffer with at least a given number of bytes. |
|
Term points to buffer with at least given number of bytes before the pointer |
|
Term is not / must not be tainted. |
|
Pointer expression that is out of scope without leaking references. |
|
Pointed-to term is not modified. |
|
Property is always false. |
|
Term is a format string. |
|
Term pointed to is freed. |
|
Function has no observable side-effects. |
|
Lval denoted is initialized. |
|
Term pointed to is initialized for the given length (in bytes). |
|
Term points to scanf format string. |
|
Term pointed to may not be valid any more. |
|
Term points to newly allocated memory (stack or heap). |
|
Term points to global memory. |
|
Term points to heap memory. |
|
Term points to stack memory. |
|
The two pointed-to memory regions do not overlap. |
|
Term is not null. |
|
Term is non-negative. |
|
Term is not zero. |
|
Term is null. |
|
Term is null-terminated. |
|
Term points to printf-style format string. |
|
Function does not free any external memory. |
|
Function does not free any external memory except for given terms. |
|
Function does not free pointed-to memory. |
Function does not strip null-terminating byte from string pointed-to |
|
|
Validity of pointed-to resources is maintained. |
|
Function does not modify the value of the term. |
|
Relational expression of terms. |
|
Term pointed to may be freed and reassigned. |
|
Value of term is externally controlled with optional upper/lower bound. |
|
Term is the only pointer pointing at resource. |
|
Pointed-to memory has not been freed (at time of delivery). |
Object representation of sum type xpredicate_t.
Object representation of the corresponding OCaml sumtype: xpredicate_t: a predicate over s_term_t terms (terms that are visible outside of a function).
The properties of an xpredicate are constructed from its indexed value in the InterfaceDictionary
- class chc.api.XPredicate.XAllocationBase(ifd: InterfaceDictionary, ixval: chc.util.IndexedTable.IndexedTableValue)[source]
Bases:
chc.api.XPredicate.XPredicateTerm points to start of allocated region that can be freed.
args[0]: index of term in interface dictionary
- property is_allocation_base: bool
- property term: STerm
- class chc.api.XPredicate.XBlockWrite(ifd: InterfaceDictionary, ixval: chc.util.IndexedTable.IndexedTableValue)[source]
Bases:
chc.api.XPredicate.XPredicateUnstructured write of bytes to pointed address with given length.
args[0]: index of address term in interface dictionary
args[1]: index of length term in interface dictionary
- property is_block_write: bool
- property length: STerm
- property term: STerm
- class chc.api.XPredicate.XBuffer(ifd: InterfaceDictionary, ixval: chc.util.IndexedTable.IndexedTableValue)[source]
Bases:
chc.api.XPredicate.XPredicateTerm points to a buffer with at least a given number of bytes.
args[0]: index of pointer to buffer in interface dictionary
args[1]: index of size term in interface dictionary
- property buffer: STerm
- property is_buffer: bool
- property length: STerm
- class chc.api.XPredicate.XConfined(ifd: InterfaceDictionary, ixval: chc.util.IndexedTable.IndexedTableValue)[source]
Bases:
chc.api.XPredicate.XPredicatePointer expression that is out of scope without leaking references.
args[0]: index of pointer term in interface dictionary
- property is_confined: bool
- property term: STerm
- class chc.api.XPredicate.XConstTerm(ifd: InterfaceDictionary, ixval: chc.util.IndexedTable.IndexedTableValue)[source]
Bases:
chc.api.XPredicate.XPredicatePointed-to term is not modified.
args[0]: index of pointed-to term in interface dictionary
- property is_const_term: bool
- property term: STerm
- class chc.api.XPredicate.XControlledResource(ifd: InterfaceDictionary, ixval: chc.util.IndexedTable.IndexedTableValue)[source]
Bases:
chc.api.XPredicate.XPredicateTerm is not / must not be tainted.
tags[1]: name of resource
args[0]: index of term in interface dictionary
- property is_controlled_resource: bool
- property resource: str
- property size: STerm
- class chc.api.XPredicate.XFalse(ifd: InterfaceDictionary, ixval: chc.util.IndexedTable.IndexedTableValue)[source]
Bases:
chc.api.XPredicate.XPredicateProperty is always false.
- property is_false: bool
- class chc.api.XPredicate.XFormattedInput(ifd: InterfaceDictionary, ixval: chc.util.IndexedTable.IndexedTableValue)[source]
Bases:
chc.api.XPredicate.XPredicateTerm is a format string.
args[0]: index of term in interface dictionary
- property is_formatted_input: bool
- property term: STerm
- class chc.api.XPredicate.XFreed(ifd: InterfaceDictionary, ixval: chc.util.IndexedTable.IndexedTableValue)[source]
Bases:
chc.api.XPredicate.XPredicateTerm pointed to is freed.
args[0]: index of term in interface dictionary.
- property is_freed: bool
- property term: STerm
- class chc.api.XPredicate.XFunctional(ifd: InterfaceDictionary, ixval: chc.util.IndexedTable.IndexedTableValue)[source]
Bases:
chc.api.XPredicate.XPredicateFunction has no observable side-effects.
- property is_functional: bool
- class chc.api.XPredicate.XGlobalAddress(ifd: InterfaceDictionary, ixval: chc.util.IndexedTable.IndexedTableValue)[source]
Bases:
chc.api.XPredicate.XPredicateTerm points to global memory.
args[0]: index of term in interface dictionary
- property is_global_address: bool
- property term: STerm
- class chc.api.XPredicate.XHeapAddress(ifd: InterfaceDictionary, ixval: chc.util.IndexedTable.IndexedTableValue)[source]
Bases:
chc.api.XPredicate.XPredicateTerm points to heap memory.
args[0]: index of term in interface dictionary
- property is_heap_address: bool
- property term: STerm
- class chc.api.XPredicate.XInitialized(ifd: InterfaceDictionary, ixval: chc.util.IndexedTable.IndexedTableValue)[source]
Bases:
chc.api.XPredicate.XPredicateLval denoted is initialized.
args[0]: index of lval term in interface dictionary
- property is_initialized: bool
- property term: STerm
- class chc.api.XPredicate.XInitializedRange(ifd: InterfaceDictionary, ixval: chc.util.IndexedTable.IndexedTableValue)[source]
Bases:
chc.api.XPredicate.XPredicateTerm pointed to is initialized for the given length (in bytes).
args[0]: index of buffer pointed-to term in interface dictionary
args[1]: index of length term in interface dictionary
- property buffer: STerm
- property is_initialized_range: bool
- property length: STerm
- class chc.api.XPredicate.XInputFormatString(ifd: InterfaceDictionary, ixval: chc.util.IndexedTable.IndexedTableValue)[source]
Bases:
chc.api.XPredicate.XPredicateTerm points to scanf format string.
args[0]: index of format-string term in interface dictionary.
- property is_input_formatstring: bool
- property term: STerm
- class chc.api.XPredicate.XInvalidated(ifd: InterfaceDictionary, ixval: chc.util.IndexedTable.IndexedTableValue)[source]
Bases:
chc.api.XPredicate.XPredicateTerm pointed to may not be valid any more.
args[0]: index of pointed-to term in interface dictionary
- property is_invalidated: bool
- property term: STerm
- class chc.api.XPredicate.XNewMemory(ifd: InterfaceDictionary, ixval: chc.util.IndexedTable.IndexedTableValue)[source]
Bases:
chc.api.XPredicate.XPredicateTerm points to newly allocated memory (stack or heap).
Specifically, memory that is newly allocated since the start of the function.
args[0]: index of term pointing to new memory in interface dictionary
- property is_new_memory: bool
- property term: STerm
- class chc.api.XPredicate.XNoOverlap(ifd: InterfaceDictionary, ixval: chc.util.IndexedTable.IndexedTableValue)[source]
Bases:
chc.api.XPredicate.XPredicateThe two pointed-to memory regions do not overlap.
args[0]: index of first term in interface dictionary args[1]: index of second term in interface dictionary
- property is_no_overlap: bool
- property term1: STerm
- property term2: STerm
- class chc.api.XPredicate.XNonNegative(ifd: InterfaceDictionary, ixval: chc.util.IndexedTable.IndexedTableValue)[source]
Bases:
chc.api.XPredicate.XPredicateTerm is non-negative.
args[0]: index of term in interface dictionary
- property is_non_negative: bool
- property term: STerm
- class chc.api.XPredicate.XNotNull(ifd: InterfaceDictionary, ixval: chc.util.IndexedTable.IndexedTableValue)[source]
Bases:
chc.api.XPredicate.XPredicateTerm is not null.
args[0]: index of term in interface dictionary
- property is_not_null: bool
- property term: STerm
- class chc.api.XPredicate.XNotZero(ifd: InterfaceDictionary, ixval: chc.util.IndexedTable.IndexedTableValue)[source]
Bases:
chc.api.XPredicate.XPredicateTerm is not zero.
args[0]: index of term in interface dictionary
- property is_not_zero: bool
- property term: STerm
- class chc.api.XPredicate.XNull(ifd: InterfaceDictionary, ixval: chc.util.IndexedTable.IndexedTableValue)[source]
Bases:
chc.api.XPredicate.XPredicateTerm is null.
args[0]: index of term in interface dictionary
- property is_null: bool
- property term: STerm
- class chc.api.XPredicate.XNullTerminated(ifd: InterfaceDictionary, ixval: chc.util.IndexedTable.IndexedTableValue)[source]
Bases:
chc.api.XPredicate.XPredicateTerm is null-terminated.
args[0]: index of interface dictionary
- property is_null_terminated: bool
- property term: STerm
- class chc.api.XPredicate.XOutputFormatString(ifd: InterfaceDictionary, ixval: chc.util.IndexedTable.IndexedTableValue)[source]
Bases:
chc.api.XPredicate.XPredicateTerm points to printf-style format string.
args[0]: index of term in interface dictionary
- property is_output_formatstring: bool
- property term: STerm
- class chc.api.XPredicate.XPredicate(ifd: InterfaceDictionary, ixval: chc.util.IndexedTable.IndexedTableValue)[source]
Bases:
chc.api.InterfaceDictionaryRecord.InterfaceDictionaryRecordBase class of external predicate.
- property is_allocation_base: bool
- property is_block_write: bool
- property is_buffer: bool
- property is_confined: bool
- property is_const_term: bool
- property is_controlled_resource: bool
- property is_false: bool
- property is_formatted_input: bool
- property is_freed: bool
- property is_functional: bool
- property is_global_address: bool
- property is_heap_address: bool
- property is_initialized: bool
- property is_initialized_range: bool
- property is_input_formatstring: bool
- property is_invalidated: bool
- property is_new_memory: bool
- property is_no_overlap: bool
- property is_non_negative: bool
- property is_not_null: bool
- property is_not_zero: bool
- property is_null: bool
- property is_null_terminated: bool
- property is_output_formatstring: bool
- property is_preserves_all_memory: bool
- property is_preserves_all_memory_x: bool
- property is_preserves_memory: bool
- property is_preserves_null_termination: bool
- property is_preserves_validity: bool
- property is_preserves_value: bool
- property is_relational_expr: bool
- property is_repositioned: bool
- property is_rev_buffer: bool
- property is_stack_address: bool
- property is_tainted: bool
- property is_unique_pointer: bool
- property is_valid_mem: bool
- class chc.api.XPredicate.XPreservesAllMemory(ifd: InterfaceDictionary, ixval: chc.util.IndexedTable.IndexedTableValue)[source]
Bases:
chc.api.XPredicate.XPredicateFunction does not free any external memory.
- property is_preserves_all_memory: bool
- class chc.api.XPredicate.XPreservesAllMemoryX(ifd: InterfaceDictionary, ixval: chc.util.IndexedTable.IndexedTableValue)[source]
Bases:
chc.api.XPredicate.XPredicateFunction does not free any external memory except for given terms.
args[0..]: indices of terms in interface dictionary
- property is_preserves_all_memory_x: bool
- property terms: List[STerm]
- class chc.api.XPredicate.XPreservesMemory(ifd: InterfaceDictionary, ixval: chc.util.IndexedTable.IndexedTableValue)[source]
Bases:
chc.api.XPredicate.XPredicateFunction does not free pointed-to memory.
args[0]: index of term in interface dictionary
- property is_preserves_memory: bool
- property term: STerm
- class chc.api.XPredicate.XPreservesNullTermination(ifd: InterfaceDictionary, ixval: chc.util.IndexedTable.IndexedTableValue)[source]
Bases:
chc.api.XPredicate.XPredicateFunction does not strip null-terminating byte from string pointed-to
args[0]: index of term in interface dictionary
- property is_preserves_null_termination: bool
- property term: STerm
- class chc.api.XPredicate.XPreservesValidity(ifd: InterfaceDictionary, ixval: chc.util.IndexedTable.IndexedTableValue)[source]
Bases:
chc.api.XPredicate.XPredicateValidity of pointed-to resources is maintained.
args[0]: index of term in interface dictionary
- property is_preserves_validity: bool
- property term: STerm
- class chc.api.XPredicate.XPreservesValue(ifd: InterfaceDictionary, ixval: chc.util.IndexedTable.IndexedTableValue)[source]
Bases:
chc.api.XPredicate.XPredicateFunction does not modify the value of the term.
args[0]: index of term in interface dictionary
- property is_preserves_value: bool
- property term: STerm
- class chc.api.XPredicate.XRelationalExpr(ifd: InterfaceDictionary, ixval: chc.util.IndexedTable.IndexedTableValue)[source]
Bases:
chc.api.XPredicate.XPredicateRelational expression of terms.
tags[1]: operator
args[0]: index of first term in interface dictionary
args[1]: index of second term in interface dictionary
- property is_relational_expr: bool
- property op: str
- property term1: STerm
- property term2: STerm
- class chc.api.XPredicate.XRepositioned(ifd: InterfaceDictionary, ixval: chc.util.IndexedTable.IndexedTableValue)[source]
Bases:
chc.api.XPredicate.XPredicateTerm pointed to may be freed and reassigned.
args[0]: index of term in interface dictionary
- property is_repositioned: bool
- property term: STerm
- class chc.api.XPredicate.XRevBuffer(ifd: InterfaceDictionary, ixval: chc.util.IndexedTable.IndexedTableValue)[source]
Bases:
chc.api.XPredicate.XPredicateTerm points to buffer with at least given number of bytes before the pointer
args[0]: index of buffer-term in interface dictionary args[1]: index of length term in interface dictionary
- property buffer: STerm
- property is_rev_buffer: bool
- property length: STerm
- class chc.api.XPredicate.XStackAddress(ifd: InterfaceDictionary, ixval: chc.util.IndexedTable.IndexedTableValue)[source]
Bases:
chc.api.XPredicate.XPredicateTerm points to stack memory.
args[0]: index of term in interface dictionary
- property is_stack_address: bool
- property term: STerm
- class chc.api.XPredicate.XTainted(ifd: InterfaceDictionary, ixval: chc.util.IndexedTable.IndexedTableValue)[source]
Bases:
chc.api.XPredicate.XPredicateValue of term is externally controlled with optional upper/lower bound.
args[0]: index of term in interface dictionary
args[1]: index of lower bound in interface dictionary (optional)
args[2]: index of upper bound in interface dictionary (optional)
- property is_tainted: bool
- property lower_bound: Optional[STerm]
- property term: STerm
- property upper_bound: Optional[STerm]
- class chc.api.XPredicate.XUniquePointer(ifd: InterfaceDictionary, ixval: chc.util.IndexedTable.IndexedTableValue)[source]
Bases:
chc.api.XPredicate.XPredicateTerm is the only pointer pointing at resource.
args[0]: index of term in interface dictionary
- property is_unique_pointer: bool
- property term: STerm
- class chc.api.XPredicate.XValidMem(ifd: InterfaceDictionary, ixval: chc.util.IndexedTable.IndexedTableValue)[source]
Bases:
chc.api.XPredicate.XPredicatePointed-to memory has not been freed (at time of delivery).
args[0]: index of term in interface dictionary
- property is_valid_mem: bool
- property term: STerm