predicate module¶
- predicate.at_time_plus(v, t=0)[source]¶
Builds an SMT variable representing v@k at time t, i.e., v@{k+i1}. If can be thought of as adding an offset t to the index of variable v.
- Return type
FNode- Parameters
v (pysmt.fnode.FNode) –
t (int) –
- predicate.get_predicate(P)[source]¶
Assumes the variables in \(P\) are of the form <var_name>’@’<number> Will return a function that acts as a predicate that can be indexed. For example, suppose we create T ≡ x@1 = x@0 + 1, then T(i) ≡ x@{i+1} = x@i + 1
- Return type
Callable[[int],FNode]- Parameters
P (pysmt.fnode.FNode) –
- predicate.instantiate_predicate_variables_at_plus(P, i=0)[source]¶
Assumes the variables in \(P\) are of the form <var_name>’@’<number> Will return a predicate with variables indexed using i. For example, suppose we create T ≡ x@1 = x@0 + 1, then x@{i+1} = x@i + 1 is returned.
In general, given if x@k is in P, then it will be mapped to x@{k+i}
- Return type
FNode- Returns
Predicate new_P such that for each x@k variable in P will correspond to x@{k+i} in new_P.
- Parameters
P (pysmt.fnode.FNode) –
i (int) –
- predicate.prime(v)[source]¶
Builds an SMT variable representing v@k at time v@{k+1}. See
at_time_plus()- Return type
FNode- Parameters
v (pysmt.fnode.FNode) –
- predicate.str_model(m)[source]¶
Assuming that :py:`Model` m represents a trace counterexample, this function returns a string with the variables sorted by intex and highlights with an asterisk the variables that change from one state to the next.
- Return type
str- Parameters
m (pysmt.solvers.solver.Model) –