26 bool verify_error =
FALSE;
32 printf(
"some minterm in F is not covered by Fold u Dold\n");
42 printf(
"some minterm in Fold is not covered by F u Dold\n");
66 if (PLA1->label != NULL && PLA1->label[0] != NULL &&
67 PLA2->label != NULL && PLA2->label[0] != NULL) {
70 (void) fprintf(stderr,
"Warning: cannot permute columns without names\n");
74 if (PLA1->F->sf_size != PLA2->F->sf_size) {
75 (void) fprintf(stderr,
"PLA_verify: PLA's are not the same size\n");
79 return verify(PLA2->F, PLA1->F, PLA1->D);
92 register int i, j, *permute, npermute;
100 permute =
ALLOC(
int, PLA2->F->sf_size);
101 for(i = 0; i < PLA2->F->sf_size; i++) {
102 labi = PLA2->label[i];
103 for(j = 0; j < PLA1->F->sf_size; j++) {
104 if (
strcmp(labi, PLA1->label[j]) == 0) {
105 permute[npermute++] = j;
112 if (PLA1->F != NULL) {
113 PLA1->F =
sf_permute(PLA1->F, permute, npermute);
115 if (PLA1->R != NULL) {
116 PLA1->R =
sf_permute(PLA1->R, permute, npermute);
118 if (PLA1->D != NULL) {
119 PLA1->D =
sf_permute(PLA1->D, permute, npermute);
123 label =
ALLOC(
char *, cube.size);
124 for(i = 0; i < npermute; i++) {
125 label[i] = PLA1->label[permute[i]];
127 for(i = npermute; i < cube.size; i++) {
145 bool verify_error =
FALSE;
150 printf(
"ON-SET and DC-SET are disjoint\n");
152 printf(
"Some minterm(s) belong to both the ON-SET and DC-SET !\n");
157 (void) fflush(stdout);
162 printf(
"ON-SET and OFF-SET are disjoint\n");
164 printf(
"Some minterm(s) belong to both the ON-SET and OFF-SET !\n");
169 (void) fflush(stdout);
174 printf(
"DC-SET and OFF-SET are disjoint\n");
176 printf(
"Some minterm(s) belong to both the OFF-SET and DC-SET !\n");
181 (void) fflush(stdout);
185 printf(
"Union of ON-SET, OFF-SET and DC-SET is the universe\n");
188 printf(
"There are minterms left unspecified !\n");
194 (void) fflush(stdout);
pcube * cube3list(pcover A, pcover B, pcover C)
ABC_NAMESPACE_IMPL_START bool verify(pcover F, pcover Fold, pcover Dold)
pcover complement(pcube *T)
#define foreach_set(R, last, p)
pcube * cube2list(pcover A, pcover B)
#define ABC_NAMESPACE_IMPL_END
bool PLA_verify(pPLA PLA1, pPLA PLA2)
#define ABC_NAMESPACE_IMPL_START
void PLA_permute(pPLA PLA1, pPLA PLA2)
bool check_consistency(pPLA PLA)