| version 1.1, 2018/09/19 05:45:05 |
version 1.3, 2020/10/06 06:31:19 |
|
|
| /* $OpenXM$ */ |
/* $OpenXM: OpenXM_contrib2/asir2018/builtin/al.c,v 1.2 2018/09/28 08:20:27 noro Exp $ */ |
| /* ---------------------------------------------------------------------- |
/* ---------------------------------------------------------------------- |
| $Id$ |
$Id$ |
| ---------------------------------------------------------------------- |
---------------------------------------------------------------------- |
|
|
| oFOP op; |
oFOP op; |
| |
|
| op = FOP((F)ARG0(arg)); |
op = FOP((F)ARG0(arg)); |
| STOQ((int)op,*rp); |
STOZ((int)op,*rp); |
| } |
} |
| |
|
| void Pfargs(arg,rp) |
void Pfargs(arg,rp) |
|
|
| |
|
| f = (F)ARG0(arg); |
f = (F)ARG0(arg); |
| op = FOP(f); |
op = FOP(f); |
| STOQ((int)op,op1); |
STOZ((int)op,op1); |
| if ( AL_TVAL(op) ) |
if ( AL_TVAL(op) ) |
| n1 = 0; |
n1 = 0; |
| else if ( AL_JUNCT(op) ) |
else if ( AL_JUNCT(op) ) |
| Line 358 void Pcompf(arg,rp) |
|
| Line 358 void Pcompf(arg,rp) |
|
| NODE arg; |
NODE arg; |
| Z *rp; |
Z *rp; |
| { |
{ |
| STOQ(compf(CO,BDY(arg),BDY(NEXT(arg))),*rp); |
STOZ(compf(CO,BDY(arg),BDY(NEXT(arg))),*rp); |
| } |
} |
| |
|
| void Patnum(arg,rp) |
void Patnum(arg,rp) |
| Line 783 int simpl_gand_smtbelhs(thop,atop,pnatop) |
|
| Line 783 int simpl_gand_smtbelhs(thop,atop,pnatop) |
|
| return(DROP); |
return(DROP); |
| } |
} |
| } |
} |
| |
/* XXX */ |
| |
return 0; |
| } |
} |
| |
|
| int simpl_gand_smtbdlhs(thop,atop,difference) |
int simpl_gand_smtbdlhs(thop,atop,difference) |
| Line 843 int simpl_gand_smtbdlhs(thop,atop,difference) |
|
| Line 845 int simpl_gand_smtbdlhs(thop,atop,difference) |
|
| return(drop2); |
return(drop2); |
| } |
} |
| } |
} |
| |
/* XXX */ |
| |
return 0; |
| } |
} |
| |
|
| void lbc(f,pc) |
void lbc(f,pc) |
|
|
| return -1; |
return -1; |
| } |
} |
| error("unknown relation in comprel"); |
error("unknown relation in comprel"); |
| |
return 0; |
| } |
} |
| |
|
| int synequalf(f1,f2) |
int synequalf(f1,f2) |
|
|
| return 0; |
return 0; |
| return 1; |
return 1; |
| } |
} |
| |
/* XXX */ |
| |
return 0; |
| } |
} |
| |
|
| void simpl_impl(op,prem,concl,th,n,pf) |
void simpl_impl(op,prem,concl,th,n,pf) |
|
|
| w = qevar(MAT(cel),&cvl,&n); |
w = qevar(MAT(cel),&cvl,&n); |
| qeblock_verbose1b(w,pr); |
qeblock_verbose1b(w,pr); |
| for (sc=n; sc; sc=NEXT(sc)) |
for (sc=n; sc; sc=NEXT(sc)) |
| if ((F)BDY(sc) != F_FALSE) |
if ((F)BDY(sc) != F_FALSE) { |
| if (cvl) { |
if (cvl) { |
| MKCEL(cel,cvl,(F)BDY(sc)); |
MKCEL(cel,cvl,(F)BDY(sc)); |
| if (!comember(co,cel)) |
if (!comember(co,cel)) |
|
|
| NEXTNODE(nargl,narglc); |
NEXTNODE(nargl,narglc); |
| BDY(narglc) = BDY(sc); |
BDY(narglc) = BDY(sc); |
| } |
} |
| |
} |
| } |
} |
| qeblock_verbose2(); |
qeblock_verbose2(); |
| smkjf(pnf,AL_OR,nargl); |
smkjf(pnf,AL_OR,nargl); |
|
|
| for (sc=eset; sc; sc=NEXT(sc)) { |
for (sc=eset; sc; sc=NEXT(sc)) { |
| NEXTNODE(r,rc); |
NEXTNODE(r,rc); |
| subgpf(f,x,BDY(sc),&h); |
subgpf(f,x,BDY(sc),&h); |
| simpl(h,(NODE)NULL,&BDY(rc)); |
simpl(h,(NODE)NULL,(F *)BDY(rc)); |
| } |
} |
| *pfl = r; |
*pfl = r; |
| return w; |
return w; |
|
|
| |
|
| if (FOP(f) != AL_AND) |
if (FOP(f) != AL_AND) |
| return 0; |
return 0; |
| STOQ(2,two); |
STOZ(2,two); |
| for (deg=ONE; cmpz(two,deg) >= 0; addz(deg,ONE,°)) |
for (deg=ONE; cmpz(two,deg) >= 0; addz(deg,ONE,°)) |
| for (scvl=*pvl; scvl; scvl=NEXT(scvl)) { |
for (scvl=*pvl; scvl; scvl=NEXT(scvl)) { |
| v = VR(scvl); |
v = VR(scvl); |
|
|
| rld = DC(rlhs); |
rld = DC(rlhs); |
| if (cmpz(DEG(rld),deg) != 0) |
if (cmpz(DEG(rld),deg) != 0) |
| return 0; |
return 0; |
| STOQ(2,two); |
STOZ(2,two); |
| if (cmpz(deg,two) == 0) { |
if (cmpz(deg,two) == 0) { |
| *pa = COEF(rld); |
*pa = COEF(rld); |
| rld = NEXT(rld); |
rld = NEXT(rld); |
| Line 1488 NODE trans[],transc[]; |
|
| Line 1496 NODE trans[],transc[]; |
|
| translate_a1(FOP(at),mp,trans,transc); |
translate_a1(FOP(at),mp,trans,transc); |
| return 1; |
return 1; |
| }; |
}; |
| STOQ(2,two); |
STOZ(2,two); |
| if (cmpz(two,DEG(DC(mp))) == 0) { |
if (cmpz(two,DEG(DC(mp))) == 0) { |
| translate_a2(FOP(at),mp,trans,transc); |
translate_a2(FOP(at),mp,trans,transc); |
| return 1; |
return 1; |
|
|
| Z four; |
Z four; |
| |
|
| mulp(CO,a,c,&h1); |
mulp(CO,a,c,&h1); |
| STOQ(4,four); |
STOZ(4,four); |
| mulp(CO,(P)four,h1,&h2); |
mulp(CO,(P)four,h1,&h2); |
| mulp(CO,b,b,&h1); |
mulp(CO,b,b,&h1); |
| subp(CO,h1,h2,pd); |
subp(CO,h1,h2,pd); |
|
|
| alpha = COEF(DC(prem)); |
alpha = COEF(DC(prem)); |
| beta = (NEXT(DC(prem))) ? COEF(NEXT(DC(prem))) : 0; |
beta = (NEXT(DC(prem))) ? COEF(NEXT(DC(prem))) : 0; |
| getqcoeffs(re->p,&a,&b,&c); |
getqcoeffs(re->p,&a,&b,&c); |
| STOQ(2,two); |
STOZ(2,two); |
| mulp(CO,(P)two,a,&h1); |
mulp(CO,(P)two,a,&h1); |
| mulp(CO,h1,beta,&h2); |
mulp(CO,h1,beta,&h2); |
| mulp(CO,b,alpha,&h1); |
mulp(CO,b,alpha,&h1); |
| Line 2249 pointer argv[]; |
|
| Line 2257 pointer argv[]; |
|
| NODE sc,n=NULL,c; |
NODE sc,n=NULL,c; |
| for (sc=FJARG(f); sc; sc=NEXT(sc)) { |
for (sc=FJARG(f); sc; sc=NEXT(sc)) { |
| NEXTNODE(n,c); |
NEXTNODE(n,c); |
| apply2ats(BDY(sc),client,argv,&BDY(c)); |
apply2ats(BDY(sc),client,argv,(F *)&BDY(c)); |
| } |
} |
| MKJF(*pnf,FOP(f),n); |
MKJF(*pnf,FOP(f),n); |
| } |
} |
|
|
| void gpp(gp) |
void gpp(gp) |
| GP gp; |
GP gp; |
| { |
{ |
| ap(gp->g); |
ap((pointer *)gp->g); |
| rep(gp->p); |
rep(gp->p); |
| } |
} |
| |
|