TaPAS
0.2
|
This module allows the manipulation of predicates for which variables take their value into . The relation underlying a predicate is encoded using a sataf_msa. More...
Go to the source code of this file.
Typedefs | |
typedef struct prestaf_predicate_st | prestaf_predicate |
Structure representing a predicate. The variables of the predicate take their value into . More... | |
This module allows the manipulation of predicates for which variables take their value into . The relation underlying a predicate is encoded using a sataf_msa.
The module offers Boolean operations over these predicates and a pretty printer of the elements of the relation (in the finite case). When applying a binary operation on predicates (e.g prestaf_predicate_or()), the operands are considered to be defined over the same set of variables; if this is not the case they are extended to fit this requirement.
Definition in file prestaf-predicate.h.
typedef struct prestaf_predicate_st prestaf_predicate |
Structure representing a predicate. The variables of the predicate take their value into .
This structure associates a relation encoded using a marked-shared automaton (see sataf_msa) and a list of names. The width of the relation is the size of the list and the ith column is labelled by the name with the index i in then list.
Definition at line 54 of file prestaf-predicate.h.
prestaf_predicate* prestaf_predicate_add_reference | ( | prestaf_predicate * | P | ) |
Increments the counter of reference of P.
P | the referenced predicate |
prestaf_predicate* prestaf_predicate_and | ( | prestaf_predicate * | P1, |
prestaf_predicate * | P2 | ||
) |
Binary conjunction.
P1 | first operand of the conjunction. |
P2 | second operand of the conjunction. |
prestaf_predicate* prestaf_predicate_create | ( | ccl_list * | vars, |
sataf_msa * | rel | ||
) |
Contructor of predicates.
This function associates a list of names and a relation encoded with a sataf_msa automaton.
vars | is a list of ccl_ustring. These names label the columns of the relation rel. |
rel | is the relation encoding the assignments satisfying the predicate. |
void prestaf_predicate_del_reference | ( | prestaf_predicate * | P | ) |
Decrements the counter of reference of P.
If the counter becomes 0 then the structure is deallocated.
P | the dereferenced predicate |
int prestaf_predicate_display_vectors | ( | ccl_log_type | log, |
prestaf_predicate * | P | ||
) |
Display the assignments belonging to the predicate ::P.
This function works only for finite subsets of ; if the set represented by P is infinite then nothing is displayed.
The displayed verctors are mappings from the variables of P into .
P | the predicate to be displayed. |
prestaf_predicate* prestaf_predicate_equiv | ( | prestaf_predicate * | P1, |
prestaf_predicate * | P2 | ||
) |
Logical equality.
This operation computes
P1 | first operand of the equality |
P2 | first operand of the equality |
prestaf_predicate* prestaf_predicate_exists | ( | ccl_ustring | v, |
prestaf_predicate * | P | ||
) |
Existential projection.
v | the name of then variable removed from the predicate. |
P | the predicate that is projected. |
prestaf_predicate* prestaf_predicate_forall | ( | ccl_ustring | v, |
prestaf_predicate * | P | ||
) |
Universal projection.
v | the name of variable removed from the predicate. |
P | the predicate that is projected. |
sataf_msa* prestaf_predicate_get_relation | ( | prestaf_predicate * | P | ) |
Relation of a predicate.
ccl_list* prestaf_predicate_get_variables | ( | prestaf_predicate * | P | ) |
Variables of a predicate.
prestaf_predicate* prestaf_predicate_imply | ( | prestaf_predicate * | P1, |
prestaf_predicate * | P2 | ||
) |
Logical implication.
This operation computes
P1 | first operand of the implication |
P2 | first operand of the implication |
prestaf_predicate* prestaf_predicate_multi_and | ( | ccl_list * | predicates | ) |
N-ary conjunction.
predicates | the list of predicates on which the conjunction is applied. |
prestaf_predicate* prestaf_predicate_multi_or | ( | ccl_list * | predicates | ) |
N-ary disjunction.
predicates | the list of predicates on which the disjunction is applied. |
prestaf_predicate* prestaf_predicate_not | ( | prestaf_predicate * | P | ) |
Compute the complement of a predictate P
P | the predicate to be complemented. |
prestaf_predicate* prestaf_predicate_or | ( | prestaf_predicate * | P1, |
prestaf_predicate * | P2 | ||
) |
Binary disjunction.
P1 | first operand of the disjunction. |
P2 | second operand of the disjunction. |
void prestaf_predicate_rename | ( | prestaf_predicate * | P, |
ccl_list * | vars | ||
) |
Relabelling of the variables.
This function simply replaces the list of variables of the predicate P by the list vars.
P | the relabelled predicate. |
vars | the new labelling list. |