/******* BENCHMARK GENERATION ******/ fml NAltBox(integer n, prg P, fml A) { integer i; for (i=0;i0) DeletePrg(P); return A; } fml NAltPos(integer n, prg P, fml A) { integer i; for (i=0;i0) DeletePrg(P); return A; } sequent GenerateModalFormulae(sequent QBFS) { sequent modS,litS; fml A, C; integer i; modS=EMPTY_SEQUENT; if (!flag_SSSEnc) for(; QBFS!=EMPTY_SEQUENT; QBFS=QBFS->rest) for(litS=QBFS->first->subfml; litS!=EMPTY_SEQUENT; litS=litS->rest) modS=WithFml(NAltBox(AltDepth-LitName(litS->first)+1,Rel(ONE),CopyFml(QBFS->first)),modS); else { for(; QBFS!=EMPTY_SEQUENT; QBFS=QBFS->rest) { litS=QBFS->first->subfml; i=1; A=Var(i); while(i<=AltDepth && !FindTwinFml(A,litS,EqualFml) && !FindTwinFml(A,litS,NegateFml)) { i++; DeleteFml(A); A=Var(i); } if (i>AltDepth) { C=False(); DeleteFml(A); } else { if (FindTwinFml(A,litS,EqualFml)) C=AltBox(Rel(ONE),A); else C=AltBox(Rel(ONE),Not(A)); while(iAltDepth) Alt=True(); else { curr_depth=i; if ( Existential(i)) Alt=Pos(Rel(ONE),True()); else Alt=Pos(Rel(ONE),And(WithFml(Var(i), WithFml(Pos(Inverse(Rel(ONE)),Pos(Rel(ONE),Not(Var(i)))), EMPTY_SEQUENT)))); while(irest) { j=S->first->name; if (Existential(j)) altS=WithFml(NAltBox(AltDepth-j,Rel(ONE),Pos(Rel(ONE),True())), altS); else altS=WithFml(NAltBox(AltDepth-j,Rel(ONE), Pos(Rel(ONE),And(WithFml(Var(j), WithFml(Pos(Inverse(Rel(ONE)), Pos(Rel(ONE),Not(Var(j)))), EMPTY_SEQUENT))))), altS); for (i=AltDepth-j+1;ibig_power/vars) { fprintf(stderr,"ERROR - Alternation depth too big - ERROR\n"); fprintf(stderr,"Approv Max for these var numbers = %ld\n",big_power/vars); exit(1); } else return depth; }