├── .gitignore
├── graduation
├── tex
│ ├── test.bbl
│ ├── test.aux
│ ├── Bear.bmp
│ ├── test.dvi
│ ├── test.pdf
│ ├── hello.png
│ ├── hello2.png
│ ├── test.synctex.gz
│ ├── test.tex.bak
│ ├── test.blg
│ ├── test.tex
│ ├── test.log
│ └── test.ps
├── 开题报告.pptx
├── 毕业论文.docx
├── ~$毕业论文.docx
├── ~WRL0005.tmp
├── ~WRL1260.tmp
└── ~$开题报告.pptx
├── lib
├── fastjson-1.1.41.jar
├── jpbc-api-2.0.0.jar
└── jpbc-plaf-2.0.0.jar
├── .settings
├── org.eclipse.core.resources.prefs
├── org.eclipse.wst.common.project.facet.core.xml
└── org.eclipse.jdt.core.prefs
├── README.md
├── src
├── cn
│ └── edu
│ │ └── pku
│ │ └── ss
│ │ └── crypto
│ │ ├── abe
│ │ ├── CPABEImpl.java
│ │ ├── api
│ │ │ └── CPABE.java
│ │ ├── apiV2
│ │ │ ├── Example.java
│ │ │ ├── Server.java
│ │ │ └── Client.java
│ │ ├── CPABEImplWithoutSerialize.java
│ │ ├── serialize
│ │ │ ├── SimpleSerializable.java
│ │ │ ├── Serializable.java
│ │ │ └── SerializeUtils.java
│ │ ├── MasterKey.java
│ │ ├── Ciphertext.java
│ │ ├── PairingManager.java
│ │ ├── PublicKey.java
│ │ ├── SecretKey.java
│ │ ├── Polynomial.java
│ │ ├── Policy.java
│ │ ├── ParserVal.java
│ │ ├── policy_lang.y
│ │ └── Parser.java
│ │ └── aes
│ │ └── AES.java
└── ExampleCrypt.java
├── pairing
└── params
│ └── curves
│ ├── f.properties
│ ├── a.properties
│ ├── a1.properties
│ ├── d159.properties
│ ├── e.properties
│ ├── d201.properties
│ ├── d224.properties
│ └── g149.properties
├── .project
└── .classpath
/.gitignore:
--------------------------------------------------------------------------------
1 | /bin
2 |
--------------------------------------------------------------------------------
/graduation/tex/test.bbl:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/graduation/tex/test.aux:
--------------------------------------------------------------------------------
1 | \relax
2 |
--------------------------------------------------------------------------------
/graduation/开题报告.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zlwen/cpabe-java/HEAD/graduation/开题报告.pptx
--------------------------------------------------------------------------------
/graduation/毕业论文.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zlwen/cpabe-java/HEAD/graduation/毕业论文.docx
--------------------------------------------------------------------------------
/graduation/tex/Bear.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zlwen/cpabe-java/HEAD/graduation/tex/Bear.bmp
--------------------------------------------------------------------------------
/graduation/tex/test.dvi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zlwen/cpabe-java/HEAD/graduation/tex/test.dvi
--------------------------------------------------------------------------------
/graduation/tex/test.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zlwen/cpabe-java/HEAD/graduation/tex/test.pdf
--------------------------------------------------------------------------------
/graduation/~$毕业论文.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zlwen/cpabe-java/HEAD/graduation/~$毕业论文.docx
--------------------------------------------------------------------------------
/graduation/~WRL0005.tmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zlwen/cpabe-java/HEAD/graduation/~WRL0005.tmp
--------------------------------------------------------------------------------
/graduation/~WRL1260.tmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zlwen/cpabe-java/HEAD/graduation/~WRL1260.tmp
--------------------------------------------------------------------------------
/lib/fastjson-1.1.41.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zlwen/cpabe-java/HEAD/lib/fastjson-1.1.41.jar
--------------------------------------------------------------------------------
/lib/jpbc-api-2.0.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zlwen/cpabe-java/HEAD/lib/jpbc-api-2.0.0.jar
--------------------------------------------------------------------------------
/lib/jpbc-plaf-2.0.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zlwen/cpabe-java/HEAD/lib/jpbc-plaf-2.0.0.jar
--------------------------------------------------------------------------------
/graduation/tex/hello.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zlwen/cpabe-java/HEAD/graduation/tex/hello.png
--------------------------------------------------------------------------------
/graduation/tex/hello2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zlwen/cpabe-java/HEAD/graduation/tex/hello2.png
--------------------------------------------------------------------------------
/.settings/org.eclipse.core.resources.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | encoding/README.md=UTF-8
3 |
--------------------------------------------------------------------------------
/graduation/tex/test.synctex.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zlwen/cpabe-java/HEAD/graduation/tex/test.synctex.gz
--------------------------------------------------------------------------------
/graduation/tex/test.tex.bak:
--------------------------------------------------------------------------------
1 | \documentclass{article}
2 | \begin{document}
3 | hello world!
4 | \end{document}
5 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | cpabe-java
2 | ==========
3 |
4 | The implementation of Ciphertext Policy Attribute Based Encryption in Java.
5 |
--------------------------------------------------------------------------------
/src/cn/edu/pku/ss/crypto/abe/CPABEImpl.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zlwen/cpabe-java/HEAD/src/cn/edu/pku/ss/crypto/abe/CPABEImpl.java
--------------------------------------------------------------------------------
/src/cn/edu/pku/ss/crypto/abe/api/CPABE.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zlwen/cpabe-java/HEAD/src/cn/edu/pku/ss/crypto/abe/api/CPABE.java
--------------------------------------------------------------------------------
/src/cn/edu/pku/ss/crypto/abe/apiV2/Example.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zlwen/cpabe-java/HEAD/src/cn/edu/pku/ss/crypto/abe/apiV2/Example.java
--------------------------------------------------------------------------------
/src/cn/edu/pku/ss/crypto/abe/CPABEImplWithoutSerialize.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zlwen/cpabe-java/HEAD/src/cn/edu/pku/ss/crypto/abe/CPABEImplWithoutSerialize.java
--------------------------------------------------------------------------------
/graduation/~$开题报告.pptx:
--------------------------------------------------------------------------------
1 | wenzilong w e n z i l o n g
--------------------------------------------------------------------------------
/.settings/org.eclipse.wst.common.project.facet.core.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/graduation/tex/test.blg:
--------------------------------------------------------------------------------
1 | This is BibTeX, Version 0.99dThe top-level auxiliary file: test.aux
2 | I found no \citation commands---while reading file test.aux
3 | I found no \bibdata command---while reading file test.aux
4 | I found no \bibstyle command---while reading file test.aux
5 | (There were 3 error messages)
6 |
--------------------------------------------------------------------------------
/pairing/params/curves/f.properties:
--------------------------------------------------------------------------------
1 | type f
2 | q 205523667896953300194896352429254920972540065223
3 | r 205523667896953300194895899082072403858390252929
4 | b 40218105156867728698573668525883168222119515413
5 | beta 115334401956802802075595682801335644058796914268
6 | alpha0 191079354656274778837764015557338301375963168470
7 | alpha1 71445317903696340296199556072836940741717506375
8 |
--------------------------------------------------------------------------------
/src/cn/edu/pku/ss/crypto/abe/serialize/SimpleSerializable.java:
--------------------------------------------------------------------------------
1 | package cn.edu.pku.ss.crypto.abe.serialize;
2 |
3 | public interface SimpleSerializable {
4 | static final byte ArrayMark = '[';
5 | static final byte ElementMark = 'E';
6 | static final byte StringMark = 'S';
7 | static final byte PolicyMark = 'P';
8 | static final byte IntMark = 'I';
9 | }
10 |
--------------------------------------------------------------------------------
/pairing/params/curves/a.properties:
--------------------------------------------------------------------------------
1 | type a
2 | q 8780710799663312522437781984754049815806883199414208211028653399266475630880222957078625179422662221423155858769582317459277713367317481324925129998224791
3 | h 12016012264891146079388821366740534204802954401251311822919615131047207289359704531102844802183906537786776
4 | r 730750818665451621361119245571504901405976559617
5 | exp2 159
6 | exp1 107
7 | sign1 1
8 | sign0 1
9 |
--------------------------------------------------------------------------------
/src/cn/edu/pku/ss/crypto/abe/MasterKey.java:
--------------------------------------------------------------------------------
1 | package cn.edu.pku.ss.crypto.abe;
2 |
3 | import cn.edu.pku.ss.crypto.abe.serialize.Serializable;
4 | import cn.edu.pku.ss.crypto.abe.serialize.SimpleSerializable;
5 | import it.unisa.dia.gas.jpbc.Element;
6 |
7 | public class MasterKey implements SimpleSerializable{
8 | @Serializable(group="Zr")
9 | Element beta;
10 |
11 | @Serializable(group="G2")
12 | Element g_alpha;
13 | }
14 |
--------------------------------------------------------------------------------
/src/cn/edu/pku/ss/crypto/abe/serialize/Serializable.java:
--------------------------------------------------------------------------------
1 | package cn.edu.pku.ss.crypto.abe.serialize;
2 |
3 | import java.lang.annotation.ElementType;
4 | import java.lang.annotation.Retention;
5 | import java.lang.annotation.RetentionPolicy;
6 | import java.lang.annotation.Target;
7 |
8 | @Retention(RetentionPolicy.RUNTIME)
9 | @Target(ElementType.FIELD)
10 | public @interface Serializable{
11 | String group() default "";
12 | }
13 |
--------------------------------------------------------------------------------
/src/cn/edu/pku/ss/crypto/abe/Ciphertext.java:
--------------------------------------------------------------------------------
1 | package cn.edu.pku.ss.crypto.abe;
2 |
3 | import it.unisa.dia.gas.jpbc.Element;
4 | import cn.edu.pku.ss.crypto.abe.serialize.Serializable;
5 | import cn.edu.pku.ss.crypto.abe.serialize.SimpleSerializable;
6 |
7 | public class Ciphertext implements SimpleSerializable{
8 | @Serializable
9 | Policy p;
10 | @Serializable(group="GT")
11 | Element Cs; //GT
12 | @Serializable(group="G1")
13 | Element C; //G1
14 | }
15 |
--------------------------------------------------------------------------------
/graduation/tex/test.tex:
--------------------------------------------------------------------------------
1 | \documentclass{article}
2 | \begin{document}
3 | \begin{tabular}{|c|c|}
4 | aaa & b \\
5 | c & ddddd\\
6 | \end{tabular}
7 |
8 | \begin{tabular}{|l|r|}
9 | \hline
10 | aaaa & b \\
11 | \hline
12 | c & ddddd\\
13 | \hline
14 | \end{tabular}
15 |
16 | \begin{center}
17 | \begin{tabular}{|c|c|}
18 | \hline
19 | a & b \\ \hline
20 | c & d\\
21 | \hline
22 | \end{tabular}
23 | \end{center}
24 | \end{document}
--------------------------------------------------------------------------------
/src/cn/edu/pku/ss/crypto/abe/PairingManager.java:
--------------------------------------------------------------------------------
1 | package cn.edu.pku.ss.crypto.abe;
2 |
3 | import it.unisa.dia.gas.jpbc.Pairing;
4 | import it.unisa.dia.gas.plaf.jpbc.pairing.PairingFactory;
5 |
6 | public class PairingManager {
7 | private static final String TYPE_A = "pairing/params/curves/a.properties";
8 | public static final Pairing defaultPairing = PairingFactory.getPairing(TYPE_A);
9 |
10 | public Pairing getPairing(String parametersPath){
11 | return PairingFactory.getPairing(parametersPath);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/cn/edu/pku/ss/crypto/abe/PublicKey.java:
--------------------------------------------------------------------------------
1 | package cn.edu.pku.ss.crypto.abe;
2 |
3 | import it.unisa.dia.gas.jpbc.Element;
4 |
5 | import cn.edu.pku.ss.crypto.abe.serialize.Serializable;
6 | import cn.edu.pku.ss.crypto.abe.serialize.SimpleSerializable;
7 |
8 | public class PublicKey implements SimpleSerializable {
9 | @Serializable(group="G1")
10 | Element g; // G1 generator
11 |
12 | @Serializable(group="G2")
13 | Element gp; // G2 generator
14 |
15 | @Serializable(group="GT")
16 | Element g_hat_alpha; // GT
17 |
18 | @Serializable(group="G1")
19 | Element h; //G1
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/src/cn/edu/pku/ss/crypto/abe/apiV2/Server.java:
--------------------------------------------------------------------------------
1 | package cn.edu.pku.ss.crypto.abe.apiV2;
2 |
3 | import cn.edu.pku.ss.crypto.abe.CPABEImplWithoutSerialize;
4 | import cn.edu.pku.ss.crypto.abe.CPABEImplWithoutSerialize.KeyPair;
5 |
6 |
7 | public class Server {
8 | private KeyPair pair;
9 |
10 | public Server(){
11 | this.pair = CPABEImplWithoutSerialize.setup();
12 | }
13 |
14 | public String getPublicKeyInString(){
15 | return pair.getPKJSONString();
16 | }
17 |
18 | public String generateSecretKey(String[] attrs){
19 | return CPABEImplWithoutSerialize.keygen(attrs, pair.getPK(), pair.getMK());
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/cn/edu/pku/ss/crypto/abe/SecretKey.java:
--------------------------------------------------------------------------------
1 | package cn.edu.pku.ss.crypto.abe;
2 |
3 | import cn.edu.pku.ss.crypto.abe.serialize.Serializable;
4 | import cn.edu.pku.ss.crypto.abe.serialize.SimpleSerializable;
5 | import it.unisa.dia.gas.jpbc.Element;
6 |
7 | public class SecretKey implements SimpleSerializable{
8 | @Serializable(group="G2")
9 | Element D;
10 |
11 | @Serializable
12 | SKComponent[] comps;
13 |
14 | public static class SKComponent implements SimpleSerializable{
15 | @Serializable
16 | String attr;
17 | @Serializable(group="G2")
18 | Element Dj;
19 | @Serializable(group="G2")
20 | Element _Dj;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
5 | org.eclipse.jdt.core.compiler.compliance=1.6
6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate
7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate
8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate
9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
10 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
11 | org.eclipse.jdt.core.compiler.source=1.6
12 |
--------------------------------------------------------------------------------
/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | cpabe-java
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 | org.eclipse.wst.common.project.facet.core.builder
15 |
16 |
17 |
18 |
19 |
20 | org.eclipse.wst.common.project.facet.core.nature
21 | org.eclipse.jdt.core.javanature
22 |
23 |
24 |
--------------------------------------------------------------------------------
/pairing/params/curves/a1.properties:
--------------------------------------------------------------------------------
1 | type a1
2 | p 48512875896303752499712277254589628516419352188294521198189567511009073158115045361294839347099315898960045398524682007334164928531594799149100548036445760110913157420655690361891290858441360807158247259460501343449199712532828063940008683740048500980441989713739689655610578458388126934242630557397618776539259
3 | n 36203638728584889925158415861634051131656232976339194924022065306723188923966451762160327870969638730567198058600508960697138006366861790409776528385407283664860565239295291314844246909284597617282274074224254733917313218308080644731349763985110821627195514711746037056425804819692632040479575042834043863089
4 | l 1340
5 |
--------------------------------------------------------------------------------
/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/src/cn/edu/pku/ss/crypto/abe/Polynomial.java:
--------------------------------------------------------------------------------
1 | package cn.edu.pku.ss.crypto.abe;
2 |
3 | import it.unisa.dia.gas.jpbc.Element;
4 |
5 | import java.util.List;
6 |
7 |
8 | public class Polynomial {
9 | int deg;
10 | List coef; /* coefficients from [0] x^0 to [deg] x^deg */
11 | /* G_T (of length deg + 1) */
12 |
13 | public static Element eval_poly(Polynomial q, Element x){
14 | int i;
15 | Element s, t, r;
16 |
17 | r = PairingManager.defaultPairing.getZr().newElement().setToZero();
18 | t = PairingManager.defaultPairing.getZr().newElement().setToOne();
19 |
20 | for(i=0; i children; /* pointers to bswabe_policy_t's, len == 0 for leaves */
22 | @Serializable
23 | Policy[] children;
24 |
25 | /* only used during encryption */
26 | transient Polynomial q;
27 |
28 | /* only used during decryption */
29 | transient int satisfiable;
30 | transient int min_leaves;
31 | transient int attri;
32 | transient List satl;
33 | }
--------------------------------------------------------------------------------
/pairing/params/curves/e.properties:
--------------------------------------------------------------------------------
1 | type e
2 | q 7245986106510086080714203333362098431608853335867425877960916928496629182991629664903654100214900946450053872786629995869445693724001299041657434948257845644905153122838458864000479326695430719258600053239930483226650953770354174712511646273516974069245462534034085895319225452125649979474047163305307830001
3 | r 730750862221594424981965739670091261094297337857
4 | h 13569343110918781839835249021482970252603216587988030044836106948825516930173270978617489032334001006615524543925753725725046733884363846960470444404747241287743773746682188521738728797153760275116924829183670000
5 | a 7130970454025799000067946137594446075551569949583815943390108723282396973737794273397246892274981883807989525599540630855644968426794929215599380425269625872763801485968007136000471718335185787206876242871042697778608875139078711621836858237429403052273312335081163896980825048123655535355411494046493419999
6 | b 7169309004853894693616698536183663527570664411678352588247044791687141043489072737232715961588288238022010974661903752526911876859197052490952065266265699130144252031591491045333807587788600764557450846327338626261289568016170532652061787582791926724597362401398804563093625182790987016728290050466098223333
7 | exp2 159
8 | exp1 135
9 | sign1 1
10 | sign0 1
11 |
--------------------------------------------------------------------------------
/pairing/params/curves/d201.properties:
--------------------------------------------------------------------------------
1 | type d
2 | q 2094476214847295281570670320144695883131009753607350517892357
3 | n 2094476214847295281570670320143248652598286201895740019876423
4 | h 1122591
5 | r 1865751832009427548920907365321162072917283500309320153
6 | a 9937051644888803031325524114144300859517912378923477935510
7 | b 6624701096592535354217016076096200573011941585948985290340
8 | k 6
9 | nk 84421409121513221644716967251498543569964760150943970280296295496165154657097987617093928595467244393873913569302597521196137376192587250931727762632568620562823714441576400096248911214941742242106512149305076320555351603145285797909942596124862593877499051211952936404822228308154770272833273836975042632765377879565229109013234552083886934379264203243445590336
10 | hk 24251848326363771171270027814768648115136299306034875585195931346818912374815385257266068811350396365799298585287746735681314613260560203359251331805443378322987677594618057568388400134442772232086258797844238238645130212769322779762522643806720212266304
11 | coeff0 362345194706722765382504711221797122584657971082977778415831
12 | coeff1 856577648996637037517940613304411075703495574379408261091623
13 | coeff2 372728063705230489408480761157081724912117414311754674153886
14 | nqr 279252656555925299126768437760706333663688384547737180929542
15 |
--------------------------------------------------------------------------------
/pairing/params/curves/d224.properties:
--------------------------------------------------------------------------------
1 | type d
2 | q 15028799613985034465755506450771565229282832217860390155996483840017
3 | n 15028799613985034465755506450771561352583254744125520639296541195021
4 | h 1
5 | r 15028799613985034465755506450771561352583254744125520639296541195021
6 | a 1871224163624666631860092489128939059944978347142292177323825642096
7 | b 9795501723343380547144152006776653149306466138012730640114125605701
8 | k 6
9 | nk 11522474695025217370062603013790980334538096429455689114222024912184432319228393204650383661781864806076247259556378350541669994344878430136202714945761488385890619925553457668158504202786580559970945936657636855346713598888067516214634859330554634505767198415857150479345944721710356274047707536156296215573412763735135600953865419000398920292535215757291539307525639675204597938919504807427238735811520
10 | hk 51014915936684265604900487195256160848193571244274648855332475661658304506316301006112887177277345010864012988127829655449256424871024500368597989462373813062189274150916552689262852603254011248502356041206544262755481779137398040376281542938513970473990787064615734720
11 | coeff0 11975189258259697166257037825227536931446707944682470951111859446192
12 | coeff1 13433042200347934827742738095249546804006687562088254057411901362771
13 | coeff2 8327464521117791238079105175448122006759863625508043495770887411614
14 | nqr 142721363302176037340346936780070353538541593770301992936740616924
15 |
--------------------------------------------------------------------------------
/pairing/params/curves/g149.properties:
--------------------------------------------------------------------------------
1 | type g
2 | q 503189899097385532598615948567975432740967203
3 | n 503189899097385532598571084778608176410973351
4 | h 1
5 | r 503189899097385532598571084778608176410973351
6 | a 465197998498440909244782433627180757481058321
7 | b 463074517126110479409374670871346701448503064
8 | k 10
9 | nk 1040684643531490707494989587381629956832530311976146077888095795458709511789670022388326295177424065807612879371896982185473788988016190582073591316127396374860265835641044035656044524481121528846249501655527462202999638159773731830375673076317719519977183373353791119388388468745670818193868532404392452816602538968163226713846951514831917487400267590451867746120591750902040267826351982737642689423713163967384383105678367875981348397359466338807
10 | hk 4110127713690841149713310614420858884651261781185442551927080083178682965171097172366598236129731931693425629387502221804555636704708008882811353539555915064049685663790355716130262332064327767695339422323460458479884756000782939428852120522712008037615051139080628734566850259704397643028017435446110322024094259858170303605703280329322675124728639532674407
11 | coeff0 67343110967802947677845897216565803152319250
12 | coeff1 115936772834120270862756636148166314916823221
13 | coeff2 87387877425076080433559927080662339215696505
14 | coeff3 433223145899090928132052677121692683015058909
15 | coeff4 405367866213598664862417230702935310328613596
16 | nqr 22204504160560785687198080413579021865783099
17 |
--------------------------------------------------------------------------------
/src/cn/edu/pku/ss/crypto/abe/ParserVal.java:
--------------------------------------------------------------------------------
1 | package cn.edu.pku.ss.crypto.abe;
2 |
3 | //#############################################
4 | //## file: Parser.java
5 | //## Generated by Byacc/j
6 | //#############################################
7 | /**
8 | * BYACC/J Semantic Value for parser: Parser
9 | * This class provides some of the functionality
10 | * of the yacc/C 'union' directive
11 | */
12 | public class ParserVal
13 | {
14 | /**
15 | * integer value of this 'union'
16 | */
17 | public int ival;
18 |
19 | /**
20 | * double value of this 'union'
21 | */
22 | public double dval;
23 |
24 | /**
25 | * string value of this 'union'
26 | */
27 | public String sval;
28 |
29 | /**
30 | * object value of this 'union'
31 | */
32 | public Object obj;
33 |
34 | //#############################################
35 | //## C O N S T R U C T O R S
36 | //#############################################
37 | /**
38 | * Initialize me without a value
39 | */
40 | public ParserVal()
41 | {
42 | }
43 | /**
44 | * Initialize me as an int
45 | */
46 | public ParserVal(int val)
47 | {
48 | ival=val;
49 | }
50 |
51 | /**
52 | * Initialize me as a double
53 | */
54 | public ParserVal(double val)
55 | {
56 | dval=val;
57 | }
58 |
59 | /**
60 | * Initialize me as a string
61 | */
62 | public ParserVal(String val)
63 | {
64 | sval=val;
65 | }
66 |
67 | /**
68 | * Initialize me as an Object
69 | */
70 | public ParserVal(Object val)
71 | {
72 | obj=val;
73 | }
74 | }//end class
75 |
76 | //#############################################
77 | //## E N D O F F I L E
78 | //#############################################
79 |
--------------------------------------------------------------------------------
/src/ExampleCrypt.java:
--------------------------------------------------------------------------------
1 | import java.io.FileInputStream;
2 | import java.io.FileOutputStream;
3 | import java.security.Security;
4 |
5 | import javax.crypto.Cipher;
6 | import javax.crypto.CipherInputStream;
7 | import javax.crypto.CipherOutputStream;
8 | import javax.crypto.KeyGenerator;
9 | import javax.crypto.SecretKey;
10 | import javax.crypto.spec.SecretKeySpec;
11 |
12 |
13 | public class ExampleCrypt {
14 |
15 | public static void main(String[] args) throws Exception {
16 |
17 | Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
18 | KeyGenerator keyGen = KeyGenerator.getInstance("AES");
19 | // SecretKey secKey = keyGen.generateKey();
20 | byte[] b = new byte[16];
21 | for(int i=0; i
6 | Babel and hyphenation patterns for loaded.
7 | (C:\CTEX\MiKTeX\tex\latex\base\article.cls
8 | Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
9 | (C:\CTEX\MiKTeX\tex\latex\base\size10.clo
10 | File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
11 | )
12 | \c@part=\count79
13 | \c@section=\count80
14 | \c@subsection=\count81
15 | \c@subsubsection=\count82
16 | \c@paragraph=\count83
17 | \c@subparagraph=\count84
18 | \c@figure=\count85
19 | \c@table=\count86
20 | \abovecaptionskip=\skip41
21 | \belowcaptionskip=\skip42
22 | \bibindent=\dimen102
23 | )
24 | (C:\Users\wenzilong\git\cpabe-java\graduation\tex\test.aux)
25 | LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 2.
26 | LaTeX Font Info: ... okay on input line 2.
27 | LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 2.
28 | LaTeX Font Info: ... okay on input line 2.
29 | LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 2.
30 | LaTeX Font Info: ... okay on input line 2.
31 | LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 2.
32 | LaTeX Font Info: ... okay on input line 2.
33 | LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 2.
34 | LaTeX Font Info: ... okay on input line 2.
35 | LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 2.
36 | LaTeX Font Info: ... okay on input line 2.
37 | LaTeX Font Info: External font `cmex10' loaded for size
38 | (Font) <7> on input line 3.
39 | LaTeX Font Info: External font `cmex10' loaded for size
40 | (Font) <5> on input line 3.
41 | [1
42 |
43 | {C:/CTEX/UserData/pdftex/config/pdftex.map{Unicode.sfd}{UGBK.sfd}}]
44 | (C:\Users\wenzilong\git\cpabe-java\graduation\tex\test.aux) )
45 | Here is how much of TeX's memory you used:
46 | 207 strings out of 495354
47 | 2404 string characters out of 3183858
48 | 46946 words of memory out of 3000000
49 | 3460 multiletter control sequences out of 15000+200000
50 | 3640 words of font info for 14 fonts, out of 3000000 for 9000
51 | 14 hyphenation exceptions out of 8191
52 | 23i,6n,17p,201b,147s stack positions out of 5000i,500n,10000p,200000b,50000s
53 |
55 | Output written on test.pdf (1 page, 11139 bytes).
56 | PDF statistics:
57 | 10 PDF objects out of 1000 (max. 8388607)
58 | 0 named destinations out of 1000 (max. 500000)
59 | 1 words of extra memory for PDF output out of 10000 (max. 10000000)
60 |
61 |
--------------------------------------------------------------------------------
/src/cn/edu/pku/ss/crypto/abe/policy_lang.y:
--------------------------------------------------------------------------------
1 | %{
2 | import java.util.List;
3 | import java.util.StringTokenizer;
4 | import java.util.ArrayList;
5 | %}
6 | %token ATTR
7 | %token NUM
8 |
9 | %left OR
10 | %left AND
11 | %token OF
12 |
13 | %%
14 |
15 | result: policy { res = (Policy)$1.obj; }
16 |
17 | policy: ATTR { $$.obj = leaf_policy($1.sval); }
18 | | policy OR policy { $$.obj = kof2_policy(1, (Policy)$1.obj, (Policy)$3.obj); }
19 | | policy AND policy { $$.obj = kof2_policy(2, (Policy)$1.obj, (Policy)$3.obj); }
20 | | NUM OF '(' arg_list ')' { $$.obj = kof_policy($1.ival, (List)$4.obj); }
21 | | '(' policy ')' { $$ = $2; }
22 |
23 | arg_list: policy { $$.obj = new ArrayList();
24 | ((List)$$.obj).add((Policy)$1.obj); }
25 | | arg_list ',' policy { $$ = $1;
26 | ((List)$$.obj).add((Policy)$3.obj); }
27 | ;
28 |
29 | %%
30 | private Policy res;
31 | StringTokenizer st;
32 |
33 | public Policy parse(String input){
34 | input = input.replaceAll("\n", "");
35 | this.st = new StringTokenizer(input, " \t\r\f");
36 | yyparse();
37 | return this.res;
38 | }
39 |
40 | private int yylex(){
41 | String s;
42 | int tok;
43 | if(!st.hasMoreTokens()){
44 | return 0;
45 | }
46 | s = st.nextToken();
47 | if(s.equals("(") || s.equals(")")){
48 | tok = s.charAt(0);
49 | yylval = new ParserVal(s);
50 | }
51 | else if(s.equals("&") || s.toLowerCase().equals("and")){
52 | tok = AND;
53 | yylval = new ParserVal(s);
54 | }
55 | else if(s.equals("|") || s.toLowerCase().equals("or")){
56 | tok = OR;
57 | yylval = new ParserVal(s);
58 | }
59 | else if(s.toLowerCase().equals("of")){
60 | tok = OF;
61 | yylval = new ParserVal(s);
62 | }
63 | else {
64 | boolean isNum = true;
65 | for( char c : s.toCharArray()){
66 | if(!Character.isDigit(c)){
67 | isNum = false;
68 | break;
69 | }
70 | }
71 | if(isNum){
72 | tok = NUM;
73 | yylval = new ParserVal(Integer.parseInt(s));
74 | }
75 | else{
76 | tok = ATTR;
77 | yylval = new ParserVal(s);
78 | }
79 | }
80 |
81 | return tok;
82 | }
83 |
84 | public void yyerror(String error){
85 | System.err.println("Error:" + error);
86 | }
87 |
88 |
89 | Policy leaf_policy(String attr){
90 | Policy p = new Policy();
91 | p.attr = attr;
92 | p.k = 1;
93 | return p;
94 | }
95 |
96 | Policy kof2_policy(int k, Policy l, Policy r){
97 | Policy p = new Policy();
98 | p.k = k;
99 | p.children = new Policy[2];
100 | p.children[0] = l;
101 | p.children[1] = r;
102 | return p;
103 | }
104 |
105 | Policy kof_policy(int k, List list){
106 | Policy p = new Policy();
107 | p.k = k;
108 | p.children = new Policy[list.size()];
109 | list.toArray(p.children);
110 | return p;
111 | }
112 |
--------------------------------------------------------------------------------
/src/cn/edu/pku/ss/crypto/abe/apiV2/Client.java:
--------------------------------------------------------------------------------
1 | package cn.edu.pku.ss.crypto.abe.apiV2;
2 |
3 | import it.unisa.dia.gas.jpbc.Element;
4 |
5 | import java.io.DataInputStream;
6 | import java.io.File;
7 | import java.io.FileInputStream;
8 | import java.io.FileNotFoundException;
9 | import java.io.FileOutputStream;
10 | import java.io.IOException;
11 | import java.io.OutputStream;
12 |
13 | import javax.crypto.Cipher;
14 |
15 | import cn.edu.pku.ss.crypto.abe.CPABEImpl;
16 | import cn.edu.pku.ss.crypto.abe.CPABEImplWithoutSerialize;
17 | import cn.edu.pku.ss.crypto.abe.Ciphertext;
18 | import cn.edu.pku.ss.crypto.abe.Parser;
19 | import cn.edu.pku.ss.crypto.abe.Policy;
20 | import cn.edu.pku.ss.crypto.abe.PublicKey;
21 | import cn.edu.pku.ss.crypto.abe.SecretKey;
22 | import cn.edu.pku.ss.crypto.abe.serialize.SerializeUtils;
23 | import cn.edu.pku.ss.crypto.aes.AES;
24 |
25 | import com.alibaba.fastjson.JSON;
26 | import com.alibaba.fastjson.JSONObject;
27 |
28 | public class Client {
29 | private PublicKey PK;
30 | private SecretKey SK;
31 | private String[] attrs;
32 |
33 | public Client(){}
34 |
35 | public Client(String[] attrs){
36 | this.attrs = attrs;
37 | }
38 |
39 | public String[] getAttrs(){
40 | return attrs;
41 | }
42 |
43 | public void setAttrs(String[] attrs){
44 | this.attrs = attrs;
45 | }
46 |
47 | public PublicKey getPK() {
48 | return PK;
49 | }
50 |
51 | public void setPK(String PKJSONString) {
52 | JSONObject json = JSON.parseObject(PKJSONString);
53 | byte[] b = json.getBytes("PK");
54 | this.PK = SerializeUtils.constructFromByteArray(PublicKey.class, b);
55 | }
56 |
57 | public SecretKey getSK() {
58 | return SK;
59 | }
60 |
61 | public void setSK(String SKJSONString) {
62 | JSONObject json = JSON.parseObject(SKJSONString);
63 | byte[] b = json.getBytes("SK");
64 | this.SK = SerializeUtils.constructFromByteArray(SecretKey.class, b);
65 | }
66 |
67 | public void enc(File in, String policy, String outputFileName){
68 | Parser parser = new Parser();
69 | Policy p = parser.parse(policy);
70 | CPABEImplWithoutSerialize.enc(in, p, this.PK, outputFileName);
71 | }
72 |
73 | public void dec(File in){
74 | String ciphertextFileName = null;
75 | DataInputStream dis = null;
76 | try {
77 | ciphertextFileName = in.getCanonicalPath();
78 | dis = new DataInputStream(new FileInputStream(in));
79 | } catch (FileNotFoundException e) {
80 | e.printStackTrace();
81 | } catch (IOException e) {
82 | e.printStackTrace();
83 | }
84 | Ciphertext ciphertext = SerializeUtils._unserialize(Ciphertext.class, dis);
85 |
86 | String output = null;
87 | if(ciphertextFileName.endsWith(".cpabe")){
88 | int end = ciphertextFileName.indexOf(".cpabe");
89 | output = ciphertextFileName.substring(0, end);
90 | }
91 | else{
92 | output = ciphertextFileName + ".out";
93 | }
94 | File outputFile = CPABEImpl.createNewFile(output);
95 | OutputStream os = null;
96 | try {
97 | os = new FileOutputStream(outputFile);
98 | } catch (FileNotFoundException e) {
99 | e.printStackTrace();
100 | }
101 | Element m = CPABEImpl.dec(ciphertext, SK, PK);
102 | AES.crypto(Cipher.DECRYPT_MODE, dis, os, m);
103 | }
104 |
105 | public void serializePK(File f){
106 | SerializeUtils.serialize(this.PK, f);
107 | }
108 |
109 | public void serializeSK(File f){
110 | SerializeUtils.serialize(this.SK, f);
111 | }
112 | }
113 |
--------------------------------------------------------------------------------
/src/cn/edu/pku/ss/crypto/abe/serialize/SerializeUtils.java:
--------------------------------------------------------------------------------
1 | package cn.edu.pku.ss.crypto.abe.serialize;
2 |
3 | import it.unisa.dia.gas.jpbc.Element;
4 |
5 | import java.io.DataInputStream;
6 | import java.io.DataOutputStream;
7 | import java.io.File;
8 | import java.io.FileInputStream;
9 | import java.io.FileNotFoundException;
10 | import java.io.FileOutputStream;
11 | import java.io.IOException;
12 | import java.io.InputStream;
13 | import java.io.OutputStream;
14 | import java.lang.reflect.Field;
15 | import java.lang.reflect.Modifier;
16 |
17 | import cn.edu.pku.ss.crypto.abe.PairingManager;
18 | import cn.edu.pku.ss.crypto.abe.Policy;
19 | import cn.edu.pku.ss.crypto.abe.SecretKey.SKComponent;
20 |
21 | public class SerializeUtils {
22 | public static T _unserialize(
23 | Class clazz, DataInputStream dis) {
24 | T t = null;
25 | Field[] fields = clazz.getDeclaredFields();
26 | try {
27 | t = clazz.newInstance();
28 | for (Field field : fields) {
29 | field.setAccessible(true);
30 | if (Modifier.isTransient(field.getModifiers())) {
31 | continue;
32 | }
33 | byte mark = dis.readByte();
34 | // unserialize Element
35 | if (field.getType() == Element.class) {
36 | if (mark != SimpleSerializable.ElementMark) {
37 | System.err.println("serialize Element error!");
38 | return null;
39 | }
40 | Element e = null;
41 | int len = dis.readInt();
42 | if (len == 0) {
43 | field.set(t, null);
44 | continue;
45 | }
46 | byte[] buffer = new byte[len];
47 | // String name = field.getName();
48 | Serializable annotation = field.getAnnotation(Serializable.class);
49 | String group = annotation.group();
50 | dis.read(buffer);
51 | if(group.equals("Zr")){
52 | e = PairingManager.defaultPairing.getZr().newElementFromBytes(buffer);
53 | }
54 | else if(group.equals("G1")){
55 | e = PairingManager.defaultPairing.getG1().newElementFromBytes(buffer);
56 | }
57 | else if(group.equals("G2")){
58 | e = PairingManager.defaultPairing.getG2().newElementFromBytes(buffer);
59 | }
60 | else if(group.equals("GT")){
61 | e = PairingManager.defaultPairing.getGT().newElementFromBytes(buffer);
62 | }
63 | // if (name.equals("g") || name.equals("h") || name.equals("C")
64 | // || name.equals("Cy") || name.equals("_Cy")) {
65 | // e = PairingManager.defaultPairing.getG1()
66 | // .newElementFromBytes(buffer);
67 | // } else if (name.equals("gp") || name.equals("g_alpha")
68 | // || name.equals("D") || name.equals("Dj")
69 | // || name.equals("_Dj")) {
70 | // e = PairingManager.defaultPairing.getG2()
71 | // .newElementFromBytes(buffer);
72 | // } else if (name.equals("g_hat_alpha") || name.equals("Cs")) {
73 | // e = PairingManager.defaultPairing.getGT()
74 | // .newElementFromBytes(buffer);
75 | // } else if (name.equals("beta")) {
76 | // e = PairingManager.defaultPairing.getZr()
77 | // .newElementFromBytes(buffer);
78 | // }
79 | field.set(t, e);
80 | } else if (field.getType() == Policy.class) {
81 | if (mark != SimpleSerializable.PolicyMark) {
82 | System.err.println("serialize Policy error!");
83 | return null;
84 | }
85 | Policy p = _unserialize(Policy.class, dis);
86 | field.set(t, p);
87 | }
88 | // unserialize String
89 | else if (field.getType() == String.class) {
90 | if (mark != SimpleSerializable.StringMark) {
91 | System.err.println("serialize String error!");
92 | return null;
93 | }
94 | String s = dis.readUTF();
95 | field.set(t, s);
96 | }
97 | else if (field.getType() == int.class){
98 | if (mark != SimpleSerializable.IntMark) {
99 | System.err.println("serialize Int error!");
100 | return null;
101 | }
102 | int i = dis.readInt();
103 | field.set(t,i);
104 | }
105 | // unserialize Array
106 | else if (field.getType().isArray()) {
107 | if (mark != SimpleSerializable.ArrayMark) {
108 | System.err.println("serialize Array error!");
109 | return null;
110 | }
111 | Class> c = field.getType().getComponentType();
112 | int arrlen = dis.readInt();
113 | if(arrlen == 0){
114 | field.set(t, null);
115 | continue;
116 | }
117 | if (c == SKComponent.class) {
118 | SKComponent[] comps = new SKComponent[arrlen];
119 | for (int i = 0; i < arrlen; i++) {
120 | comps[i] = _unserialize(SKComponent.class, dis);
121 | }
122 | field.set(t, comps);
123 | } else if (c == Policy.class) {
124 | Policy[] ps = new Policy[arrlen];
125 | for (int i = 0; i < arrlen; i++) {
126 | mark = dis.readByte();
127 | if(mark != SimpleSerializable.PolicyMark){
128 | System.err.println("serialize Policy error!");
129 | return null;
130 | }
131 | ps[i] = _unserialize(Policy.class, dis);
132 | }
133 | field.set(t, ps);
134 | }
135 | }
136 | }
137 | } catch (InstantiationException e) {
138 | e.printStackTrace();
139 | } catch (IllegalAccessException e) {
140 | e.printStackTrace();
141 | } catch (FileNotFoundException e) {
142 | e.printStackTrace();
143 | } catch (IOException e) {
144 | e.printStackTrace();
145 | }
146 | return t;
147 | }
148 |
149 | public static T unserialize(Class clazz,
150 | File file) {
151 | DataInputStream dis = null;
152 | try {
153 | dis = new DataInputStream(new FileInputStream(file));
154 | return _unserialize(clazz, dis);
155 | } catch (FileNotFoundException e) {
156 | e.printStackTrace();
157 | } finally {
158 | try {
159 | dis.close();
160 | } catch (IOException e) {
161 | e.printStackTrace();
162 | }
163 | }
164 | return null;
165 | }
166 |
167 |
168 | private static void _serialize(T obj,
169 | DataOutputStream dos) {
170 | Field[] fields = obj.getClass().getDeclaredFields();
171 | try {
172 | for (Field field : fields) {
173 | field.setAccessible(true);
174 | if (Modifier.isTransient(field.getModifiers())) {
175 | continue;
176 | }
177 | Class> type = field.getType();
178 | if (type == Element.class) {
179 | Element e = (Element) field.get(obj);
180 | dos.writeByte(SimpleSerializable.ElementMark);
181 | int len = e == null ? 0 : e.toBytes().length;
182 | dos.writeInt(len);
183 | if (e != null) {
184 | dos.write(e.toBytes());
185 | }
186 | } else if (type == String.class) {
187 | String s = (String) field.get(obj);
188 | s = ((s == null) ? "" : s);
189 | dos.writeByte(SimpleSerializable.StringMark);
190 | dos.writeUTF(s);
191 | } else if (type == int.class) {
192 | int i = field.getInt(obj);
193 | dos.writeByte(SimpleSerializable.IntMark);
194 | dos.writeInt(i);
195 | } else if (type == Policy.class) {
196 | Policy p = (Policy) field.get(obj);
197 | dos.writeByte(SimpleSerializable.PolicyMark);
198 | _serialize(p, dos);
199 | } else if (type.isArray()) {
200 | Class> clazz = type.getComponentType();
201 | if (clazz == SKComponent.class) {
202 | SKComponent[] array = (SKComponent[]) field.get(obj);
203 | int len = array.length;
204 | dos.writeByte(SimpleSerializable.ArrayMark);
205 | dos.writeInt(len);
206 | for (int i = 0; i < len; i++) {
207 | SKComponent comp = array[i];
208 | _serialize(comp, dos);
209 | }
210 | } else if (clazz == Policy.class) {
211 | Policy[] array = (Policy[]) field.get(obj);
212 | int len = array == null ? 0 : array.length;
213 | dos.writeByte(SimpleSerializable.ArrayMark);
214 | dos.writeInt(len);
215 | if(len == 0){
216 | continue;
217 | }
218 | for (int i = 0; i < len; i++) {
219 | Policy p = array[i];
220 | dos.writeByte(SimpleSerializable.PolicyMark);
221 | _serialize(p, dos);
222 | }
223 | }
224 | }
225 | }
226 | } catch (IOException e) {
227 | e.printStackTrace();
228 | } catch (IllegalArgumentException e) {
229 | e.printStackTrace();
230 | } catch (IllegalAccessException e) {
231 | e.printStackTrace();
232 | }
233 | }
234 |
235 | public static void serialize(T obj, File file) {
236 | DataOutputStream dos = null;
237 | try {
238 | dos = new DataOutputStream(new FileOutputStream(file, true));
239 | _serialize(obj, dos);
240 | } catch (Exception e) {
241 | e.printStackTrace();
242 | } finally {
243 | try {
244 | dos.close();
245 | } catch (IOException e) {
246 | e.printStackTrace();
247 | }
248 | }
249 | }
250 |
251 | public static T constructFromByteArray(Class clazz, byte[] b){
252 | File tmp = null;
253 | try {
254 | tmp = File.createTempFile("random", "bytearray");
255 | OutputStream os = new FileOutputStream(tmp);
256 | os.write(b);
257 | os.close();
258 | } catch (Exception e) {
259 | e.printStackTrace();
260 | }
261 | return unserialize(clazz, tmp);
262 | }
263 |
264 | public static byte[] convertToByteArray(T obj){
265 | File tmp = null;
266 | try {
267 | tmp = File.createTempFile("random", "bytearray");
268 | SerializeUtils.serialize(obj, tmp);
269 | } catch (IOException e) {
270 | e.printStackTrace();
271 | }
272 | byte[] buf = new byte[(int) tmp.length()];
273 | try {
274 | InputStream is = new FileInputStream(tmp);
275 | is.read(buf);
276 | is.close();
277 | } catch (FileNotFoundException e) {
278 | e.printStackTrace();
279 | } catch (IOException e) {
280 | e.printStackTrace();
281 | }
282 | return buf;
283 | }
284 | }
285 |
--------------------------------------------------------------------------------
/src/cn/edu/pku/ss/crypto/abe/Parser.java:
--------------------------------------------------------------------------------
1 | package cn.edu.pku.ss.crypto.abe;
2 |
3 | //### This file created by BYACC 1.8(/Java extension 1.15)
4 | //### Java capabilities added 7 Jan 97, Bob Jamison
5 | //### Updated : 27 Nov 97 -- Bob Jamison, Joe Nieten
6 | //### 01 Jan 98 -- Bob Jamison -- fixed generic semantic constructor
7 | //### 01 Jun 99 -- Bob Jamison -- added Runnable support
8 | //### 06 Aug 00 -- Bob Jamison -- made state variables class-global
9 | //### 03 Jan 01 -- Bob Jamison -- improved flags, tracing
10 | //### 16 May 01 -- Bob Jamison -- added custom stack sizing
11 | //### 04 Mar 02 -- Yuval Oren -- improved java performance, added options
12 | //### 14 Mar 02 -- Tomas Hurka -- -d support, static initializer workaround
13 | //### Please send bug reports to tom@hukatronic.cz
14 | //### static char yysccsid[] = "@(#)yaccpar 1.8 (Berkeley) 01/20/90";
15 |
16 |
17 |
18 |
19 |
20 |
21 | //#line 2 "policy_lang.y"
22 | import java.util.List;
23 | import java.util.StringTokenizer;
24 | import java.util.ArrayList;
25 | //#line 21 "Parser.java"
26 |
27 |
28 |
29 |
30 | public class Parser
31 | {
32 |
33 | boolean yydebug; //do I want debug output?
34 | int yynerrs; //number of errors so far
35 | int yyerrflag; //was there an error?
36 | int yychar; //the current working character
37 |
38 | //########## MESSAGES ##########
39 | //###############################################################
40 | // method: debug
41 | //###############################################################
42 | void debug(String msg)
43 | {
44 | if (yydebug)
45 | System.out.println(msg);
46 | }
47 |
48 | //########## STATE STACK ##########
49 | final static int YYSTACKSIZE = 500; //maximum stack size
50 | int statestk[] = new int[YYSTACKSIZE]; //state stack
51 | int stateptr;
52 | int stateptrmax; //highest index of stackptr
53 | int statemax; //state when highest index reached
54 | //###############################################################
55 | // methods: state stack push,pop,drop,peek
56 | //###############################################################
57 | final void state_push(int state)
58 | {
59 | try {
60 | stateptr++;
61 | statestk[stateptr]=state;
62 | }
63 | catch (ArrayIndexOutOfBoundsException e) {
64 | int oldsize = statestk.length;
65 | int newsize = oldsize * 2;
66 | int[] newstack = new int[newsize];
67 | System.arraycopy(statestk,0,newstack,0,oldsize);
68 | statestk = newstack;
69 | statestk[stateptr]=state;
70 | }
71 | }
72 | final int state_pop()
73 | {
74 | return statestk[stateptr--];
75 | }
76 | final void state_drop(int cnt)
77 | {
78 | stateptr -= cnt;
79 | }
80 | final int state_peek(int relative)
81 | {
82 | return statestk[stateptr-relative];
83 | }
84 | //###############################################################
85 | // method: init_stacks : allocate and prepare stacks
86 | //###############################################################
87 | final boolean init_stacks()
88 | {
89 | stateptr = -1;
90 | val_init();
91 | return true;
92 | }
93 | //###############################################################
94 | // method: dump_stacks : show n levels of the stacks
95 | //###############################################################
96 | void dump_stacks(int count)
97 | {
98 | int i;
99 | System.out.println("=index==state====value= s:"+stateptr+" v:"+valptr);
100 | for (i=0;i=YYSTACKSIZE)
128 | return;
129 | valstk[++valptr]=val;
130 | }
131 | ParserVal val_pop()
132 | {
133 | if (valptr<0)
134 | return new ParserVal();
135 | return valstk[valptr--];
136 | }
137 | void val_drop(int cnt)
138 | {
139 | int ptr;
140 | ptr=valptr-cnt;
141 | if (ptr<0)
142 | return;
143 | valptr = ptr;
144 | }
145 | ParserVal val_peek(int relative)
146 | {
147 | int ptr;
148 | ptr=valptr-relative;
149 | if (ptr<0)
150 | return new ParserVal();
151 | return valstk[ptr];
152 | }
153 | final ParserVal dup_yyval(ParserVal val)
154 | {
155 | ParserVal dup = new ParserVal();
156 | dup.ival = val.ival;
157 | dup.dval = val.dval;
158 | dup.sval = val.sval;
159 | dup.obj = val.obj;
160 | return dup;
161 | }
162 | //#### end semantic value section ####
163 | public final static short ATTR=257;
164 | public final static short NUM=258;
165 | public final static short OR=259;
166 | public final static short AND=260;
167 | public final static short OF=261;
168 | public final static short YYERRCODE=256;
169 | final static short yylhs[] = { -1,
170 | 0, 1, 1, 1, 1, 1, 2, 2,
171 | };
172 | final static short yylen[] = { 2,
173 | 1, 1, 3, 3, 5, 3, 1, 3,
174 | };
175 | final static short yydefred[] = { 0,
176 | 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,
177 | 6, 0, 4, 0, 0, 5, 0, 0,
178 | };
179 | final static short yydgoto[] = { 4,
180 | 5, 15,
181 | };
182 | final static short yysindex[] = { -37,
183 | 0, -244, -37, 0, -255, -34, -41, -37, -37, -37,
184 | 0, -242, 0, -255, -31, 0, -37, -255,
185 | };
186 | final static short yyrindex[] = { 0,
187 | 0, 0, 0, 0, 19, 0, 0, 0, 0, 0,
188 | 0, 1, 0, -30, 0, 0, 0, -29,
189 | };
190 | final static short yygindex[] = { 0,
191 | -1, 0,
192 | };
193 | final static int YYTABLESIZE=260;
194 | static short yytable[];
195 | static { yytable();}
196 | static void yytable(){
197 | yytable = new short[]{ 11,
198 | 3, 7, 3, 8, 9, 10, 12, 13, 14, 16,
199 | 7, 8, 17, 7, 8, 18, 6, 9, 1, 0,
200 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
201 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
202 | 0, 3, 0, 0, 3, 0, 0, 0, 0, 0,
203 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
204 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
205 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
206 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
207 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
208 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
209 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
210 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
211 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
212 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
213 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
214 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
215 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
216 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
217 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
218 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
219 | 0, 0, 0, 0, 0, 0, 0, 8, 9, 1,
220 | 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,
221 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
222 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
223 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 3,
224 | };
225 | }
226 | static short yycheck[];
227 | static { yycheck(); }
228 | static void yycheck() {
229 | yycheck = new short[] { 41,
230 | 0, 3, 40, 259, 260, 40, 8, 9, 10, 41,
231 | 41, 41, 44, 44, 44, 17, 261, 260, 0, -1,
232 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
233 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
234 | -1, 41, -1, -1, 44, -1, -1, -1, -1, -1,
235 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
236 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
237 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
238 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
239 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
240 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
241 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
242 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
243 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
244 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
245 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
246 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
247 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
248 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
249 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
250 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
251 | -1, -1, -1, -1, -1, -1, -1, 259, 260, 257,
252 | 258, -1, -1, -1, -1, -1, -1, -1, -1, -1,
253 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
254 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
255 | -1, -1, -1, -1, -1, -1, -1, -1, -1, 259,
256 | };
257 | }
258 | final static short YYFINAL=4;
259 | final static short YYMAXTOKEN=261;
260 | final static String yyname[] = {
261 | "end-of-file",null,null,null,null,null,null,null,null,null,null,null,null,null,
262 | null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,
263 | null,null,null,null,null,null,null,null,null,null,"'('","')'",null,null,"','",
264 | null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,
265 | null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,
266 | null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,
267 | null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,
268 | null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,
269 | null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,
270 | null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,
271 | null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,
272 | null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,
273 | null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,
274 | null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,
275 | null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,
276 | null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,
277 | null,null,null,null,"ATTR","NUM","OR","AND","OF",
278 | };
279 | final static String yyrule[] = {
280 | "$accept : result",
281 | "result : policy",
282 | "policy : ATTR",
283 | "policy : policy OR policy",
284 | "policy : policy AND policy",
285 | "policy : NUM OF '(' arg_list ')'",
286 | "policy : '(' policy ')'",
287 | "arg_list : policy",
288 | "arg_list : arg_list ',' policy",
289 | };
290 |
291 | //#line 30 "policy_lang.y"
292 | private Policy res;
293 | StringTokenizer st;
294 |
295 | private String normalize(String input){
296 | input = input.replaceAll("\n", "");
297 | input = input.replaceAll(",", " , ");
298 | input = input.replaceAll("\\(", " ( ");
299 | input = input.replaceAll("\\)", " ) ");
300 |
301 | return input;
302 | }
303 |
304 | public Policy parse(String input){
305 | input = normalize(input);
306 | this.st = new StringTokenizer(input, " \t\r\f");
307 | yyparse();
308 | return this.res;
309 | }
310 |
311 | private int yylex(){
312 | String s;
313 | int tok;
314 | if(!st.hasMoreTokens()){
315 | return 0;
316 | }
317 | s = st.nextToken();
318 | if(s.equals("(") || s.equals(")") || s.equals(",")){
319 | tok = s.charAt(0);
320 | yylval = new ParserVal(s);
321 | }
322 | else if(s.equals("&") || s.toLowerCase().equals("and")){
323 | tok = AND;
324 | yylval = new ParserVal(s);
325 | }
326 | else if(s.equals("|") || s.toLowerCase().equals("or")){
327 | tok = OR;
328 | yylval = new ParserVal(s);
329 | }
330 | else if(s.toLowerCase().equals("of")){
331 | tok = OF;
332 | yylval = new ParserVal(s);
333 | }
334 | else {
335 | boolean isNum = true;
336 | for( char c : s.toCharArray()){
337 | if(!Character.isDigit(c)){
338 | isNum = false;
339 | break;
340 | }
341 | }
342 | if(isNum){
343 | tok = NUM;
344 | yylval = new ParserVal(Integer.parseInt(s));
345 | }
346 | else{
347 | tok = ATTR;
348 | yylval = new ParserVal(s);
349 | }
350 | }
351 |
352 | return tok;
353 | }
354 |
355 | public void yyerror(String error){
356 | System.err.println("Error:" + error);
357 | }
358 |
359 |
360 | Policy leaf_policy(String attr){
361 | Policy p = new Policy();
362 | p.attr = attr;
363 | p.k = 1;
364 | return p;
365 | }
366 |
367 | Policy kof2_policy(int k, Policy l, Policy r){
368 | Policy p = new Policy();
369 | p.k = k;
370 | p.children = new Policy[2];
371 | p.children[0] = l;
372 | p.children[1] = r;
373 | return p;
374 | }
375 |
376 |
377 | Policy kof_policy(int k, List list){
378 | Policy p = new Policy();
379 | p.k = k;
380 | p.children = new Policy[list.size()];
381 | list.toArray(p.children);
382 | return p;
383 | }
384 | //#line 301 "Parser.java"
385 | //###############################################################
386 | // method: yylexdebug : check lexer state
387 | //###############################################################
388 | void yylexdebug(int state,int ch)
389 | {
390 | String s=null;
391 | if (ch < 0) ch=0;
392 | if (ch <= YYMAXTOKEN) //check index bounds
393 | s = yyname[ch]; //now get it
394 | if (s==null)
395 | s = "illegal-symbol";
396 | debug("state "+state+", reading "+ch+" ("+s+")");
397 | }
398 |
399 |
400 |
401 |
402 |
403 | //The following are now global, to aid in error reporting
404 | int yyn; //next next thing to do
405 | int yym; //
406 | int yystate; //current parsing state from state table
407 | String yys; //current token string
408 |
409 |
410 | //###############################################################
411 | // method: yyparse : parse input and execute indicated items
412 | //###############################################################
413 | int yyparse()
414 | {
415 | boolean doaction;
416 | init_stacks();
417 | yynerrs = 0;
418 | yyerrflag = 0;
419 | yychar = -1; //impossible char forces a read
420 | yystate=0; //initial state
421 | state_push(yystate); //save it
422 | val_push(yylval); //save empty value
423 | while (true) //until parsing is done, either correctly, or w/error
424 | {
425 | doaction=true;
426 | if (yydebug) debug("loop");
427 | //#### NEXT ACTION (from reduction table)
428 | for (yyn=yydefred[yystate];yyn==0;yyn=yydefred[yystate])
429 | {
430 | if (yydebug) debug("yyn:"+yyn+" state:"+yystate+" yychar:"+yychar);
431 | if (yychar < 0) //we want a char?
432 | {
433 | yychar = yylex(); //get next token
434 | if (yydebug) debug(" next yychar:"+yychar);
435 | //#### ERROR CHECK ####
436 | if (yychar < 0) //it it didn't work/error
437 | {
438 | yychar = 0; //change it to default string (no -1!)
439 | if (yydebug)
440 | yylexdebug(yystate,yychar);
441 | }
442 | }//yychar<0
443 | yyn = yysindex[yystate]; //get amount to shift by (shift index)
444 | if ((yyn != 0) && (yyn += yychar) >= 0 &&
445 | yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
446 | {
447 | if (yydebug)
448 | debug("state "+yystate+", shifting to state "+yytable[yyn]);
449 | //#### NEXT STATE ####
450 | yystate = yytable[yyn];//we are in a new state
451 | state_push(yystate); //save it
452 | val_push(yylval); //push our lval as the input for next rule
453 | yychar = -1; //since we have 'eaten' a token, say we need another
454 | if (yyerrflag > 0) //have we recovered an error?
455 | --yyerrflag; //give ourselves credit
456 | doaction=false; //but don't process yet
457 | break; //quit the yyn=0 loop
458 | }
459 |
460 | yyn = yyrindex[yystate]; //reduce
461 | if ((yyn !=0 ) && (yyn += yychar) >= 0 &&
462 | yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
463 | { //we reduced!
464 | if (yydebug) debug("reduce");
465 | yyn = yytable[yyn];
466 | doaction=true; //get ready to execute
467 | break; //drop down to actions
468 | }
469 | else //ERROR RECOVERY
470 | {
471 | if (yyerrflag==0)
472 | {
473 | yyerror("syntax error");
474 | yynerrs++;
475 | }
476 | if (yyerrflag < 3) //low error count?
477 | {
478 | yyerrflag = 3;
479 | while (true) //do until break
480 | {
481 | if (stateptr<0) //check for under & overflow here
482 | {
483 | yyerror("stack underflow. aborting..."); //note lower case 's'
484 | return 1;
485 | }
486 | yyn = yysindex[state_peek(0)];
487 | if ((yyn != 0) && (yyn += YYERRCODE) >= 0 &&
488 | yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE)
489 | {
490 | if (yydebug)
491 | debug("state "+state_peek(0)+", error recovery shifting to state "+yytable[yyn]+" ");
492 | yystate = yytable[yyn];
493 | state_push(yystate);
494 | val_push(yylval);
495 | doaction=false;
496 | break;
497 | }
498 | else
499 | {
500 | if (yydebug)
501 | debug("error recovery discarding state "+state_peek(0)+" ");
502 | if (stateptr<0) //check for under & overflow here
503 | {
504 | yyerror("Stack underflow. aborting..."); //capital 'S'
505 | return 1;
506 | }
507 | state_pop();
508 | val_pop();
509 | }
510 | }
511 | }
512 | else //discard this token
513 | {
514 | if (yychar == 0)
515 | return 1; //yyabort
516 | if (yydebug)
517 | {
518 | yys = null;
519 | if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
520 | if (yys == null) yys = "illegal-symbol";
521 | debug("state "+yystate+", error recovery discards token "+yychar+" ("+yys+")");
522 | }
523 | yychar = -1; //read another
524 | }
525 | }//end error recovery
526 | }//yyn=0 loop
527 | if (!doaction) //any reason not to proceed?
528 | continue; //skip action
529 | yym = yylen[yyn]; //get count of terminals on rhs
530 | if (yydebug)
531 | debug("state "+yystate+", reducing "+yym+" by rule "+yyn+" ("+yyrule[yyn]+")");
532 | if (yym>0) //if count of rhs not 'nil'
533 | yyval = val_peek(yym-1); //get current semantic value
534 | yyval = dup_yyval(yyval); //duplicate yyval if ParserVal is used as semantic value
535 | switch(yyn)
536 | {
537 | //########## USER-SUPPLIED ACTIONS ##########
538 | case 1:
539 | //#line 15 "policy_lang.y"
540 | { res = (Policy)val_peek(0).obj; }
541 | break;
542 | case 2:
543 | //#line 17 "policy_lang.y"
544 | { yyval.obj = leaf_policy(val_peek(0).sval); }
545 | break;
546 | case 3:
547 | //#line 18 "policy_lang.y"
548 | { yyval.obj = kof2_policy(1, (Policy)val_peek(2).obj, (Policy)val_peek(0).obj); }
549 | break;
550 | case 4:
551 | //#line 19 "policy_lang.y"
552 | { yyval.obj = kof2_policy(2, (Policy)val_peek(2).obj, (Policy)val_peek(0).obj); }
553 | break;
554 | case 5:
555 | //#line 20 "policy_lang.y"
556 | { yyval.obj = kof_policy(val_peek(4).ival, (List)val_peek(1).obj); }
557 | break;
558 | case 6:
559 | //#line 21 "policy_lang.y"
560 | { yyval = val_peek(1); }
561 | break;
562 | case 7:
563 | //#line 23 "policy_lang.y"
564 | { yyval.obj = new ArrayList();
565 | ((List)yyval.obj).add((Policy)(val_peek(0).obj)); }
566 | break;
567 | case 8:
568 | //#line 25 "policy_lang.y"
569 | { yyval = val_peek(2);
570 | ((List)yyval.obj).add((Policy)(val_peek(0).obj)); }
571 | break;
572 | //#line 484 "Parser.java"
573 | //########## END OF USER-SUPPLIED ACTIONS ##########
574 | }//switch
575 | //#### Now let's reduce... ####
576 | if (yydebug) debug("reduce");
577 | state_drop(yym); //we just reduced yylen states
578 | yystate = state_peek(0); //get new state
579 | val_drop(yym); //corresponding value drop
580 | yym = yylhs[yyn]; //select next TERMINAL(on lhs)
581 | if (yystate == 0 && yym == 0)//done? 'rest' state and at first TERMINAL
582 | {
583 | if (yydebug) debug("After reduction, shifting from state 0 to state "+YYFINAL+"");
584 | yystate = YYFINAL; //explicitly say we're done
585 | state_push(YYFINAL); //and save it
586 | val_push(yyval); //also save the semantic value of parsing
587 | if (yychar < 0) //we want another character?
588 | {
589 | yychar = yylex(); //get next character
590 | if (yychar<0) yychar=0; //clean, if necessary
591 | if (yydebug)
592 | yylexdebug(yystate,yychar);
593 | }
594 | if (yychar == 0) //Good exit (if lex returns 0 ;-)
595 | break; //quit the loop--all DONE
596 | }//if yystate
597 | else //else not done yet
598 | { //get next state and push, for next yydefred[]
599 | yyn = yygindex[yym]; //find out where to go
600 | if ((yyn != 0) && (yyn += yystate) >= 0 &&
601 | yyn <= YYTABLESIZE && yycheck[yyn] == yystate)
602 | yystate = yytable[yyn]; //get new state
603 | else
604 | yystate = yydgoto[yym]; //else go to new defred
605 | if (yydebug) debug("after reduction, shifting from state "+state_peek(0)+" to state "+yystate+"");
606 | state_push(yystate); //going again, so push state & val...
607 | val_push(yyval); //for next action
608 | }
609 | }//main loop
610 | return 0;//yyaccept!!
611 | }
612 | //## end of method parse() ######################################
613 |
614 |
615 |
616 | //## run() --- for Thread #######################################
617 | /**
618 | * A default run method, used for operating this parser
619 | * object in the background. It is intended for extending Thread
620 | * or implementing Runnable. Turn off with -Jnorun .
621 | */
622 | public void run()
623 | {
624 | yyparse();
625 | }
626 | //## end of method run() ########################################
627 |
628 |
629 |
630 | //## Constructors ###############################################
631 | /**
632 | * Default constructor. Turn off with -Jnoconstruct .
633 |
634 | */
635 | public Parser()
636 | {
637 | //nothing to do
638 | }
639 |
640 |
641 | /**
642 | * Create a parser, setting the debug to true or false.
643 | * @param debugMe true for debugging, false for no debug.
644 | */
645 | public Parser(boolean debugMe)
646 | {
647 | yydebug=debugMe;
648 | }
649 | //###############################################################
650 |
651 | public static void main(String[] args) {
652 | String input = "kkk & ( 2 of ( abc , bcd , cde ) )";
653 | Parser parser = new Parser(true);
654 | Policy p = parser.parse(input);
655 | System.out.println(p.k);
656 | }
657 |
658 | }
659 | //################### END OF CLASS ##############################
660 |
--------------------------------------------------------------------------------
/graduation/tex/test.ps:
--------------------------------------------------------------------------------
1 | %!PS-Adobe-2.0
2 | %%Creator: dvips(k) 5.991 Copyright 2011 Radical Eye Software
3 | %%Title: test.dvi
4 | %%CreationDate: Mon Dec 15 19:59:52 2014
5 | %%Pages: 1
6 | %%PageOrder: Ascend
7 | %%BoundingBox: 0 0 595 842
8 | %%DocumentFonts: CMR10
9 | %%DocumentPaperSizes: a4
10 | %%EndComments
11 | %DVIPSWebPage: (www.radicaleye.com)
12 | %DVIPSCommandLine: dvips.exe test.dvi
13 | %DVIPSParameters: dpi=600
14 | %DVIPSSource: TeX output 2014.12.15:1959
15 | %%BeginProcSet: tex.pro 0 0
16 | %!
17 | /TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S
18 | N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72
19 | mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0
20 | 0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{
21 | landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize
22 | mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[
23 | matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round
24 | exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{
25 | statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0]
26 | N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin
27 | /FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array
28 | /BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2
29 | array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N
30 | df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A
31 | definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get
32 | }B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub}
33 | B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr
34 | 1 add N}if}B/CharBuilder{save 3 1 roll S A/base get 2 index get S
35 | /BitMaps get S get/Cd X pop/ctr 0 N Cdx 0 Cx Cy Ch sub Cx Cw add Cy
36 | setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx sub Cy .1 sub]{Ci}imagemask
37 | restore}B/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn
38 | /BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put
39 | }if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{
40 | bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A
41 | mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{
42 | SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{
43 | userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X
44 | 1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4
45 | index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N
46 | /p{show}N/RMat[1 0 0 -1 0 0]N/BDot 260 string N/Rx 0 N/Ry 0 N/V{}B/RV/v{
47 | /Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT)
48 | (LaserWriter 16/600)]{A length product length le{A length product exch 0
49 | exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse
50 | end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask
51 | grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot}
52 | imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round
53 | exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto
54 | fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p
55 | delta add tail}B/b{S p tail}B/c{-4 M}B/d{-3 M}B/e{-2 M}B/f{-1 M}B/g{0 M}
56 | B/h{1 M}B/i{2 M}B/j{3 M}B/k{4 M}B/w{0 rmoveto}B/l{p -4 w}B/m{p -3 w}B/n{
57 | p -2 w}B/o{p -1 w}B/q{p 1 w}B/r{p 2 w}B/s{p 3 w}B/t{p 4 w}B/x{0 S
58 | rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end
59 |
60 | %%EndProcSet
61 | %%BeginProcSet: texps.pro 0 0
62 | %!
63 | TeXDict begin/rf{findfont dup length 1 add dict begin{1 index/FID ne 2
64 | index/UniqueID ne and{def}{pop pop}ifelse}forall[1 index 0 6 -1 roll
65 | exec 0 exch 5 -1 roll VResolution Resolution div mul neg 0 0]/Metrics
66 | exch def dict begin Encoding{exch dup type/integertype ne{pop pop 1 sub
67 | dup 0 le{pop}{[}ifelse}{FontMatrix 0 get div Metrics 0 get div def}
68 | ifelse}forall Metrics/Metrics currentdict end def[2 index currentdict
69 | end definefont 3 -1 roll makefont/setfont cvx]cvx def}def/ObliqueSlant{
70 | dup sin S cos div neg}B/SlantFont{4 index mul add}def/ExtendFont{3 -1
71 | roll mul exch}def/ReEncodeFont{CharStrings rcheck{/Encoding false def
72 | dup[exch{dup CharStrings exch known not{pop/.notdef/Encoding true def}
73 | if}forall Encoding{]exch pop}{cleartomark}ifelse}if/Encoding exch def}
74 | def end
75 |
76 | %%EndProcSet
77 | %%BeginFont: CMR10
78 | %!PS-AdobeFont-1.0: CMR10 003.002
79 | %%Title: CMR10
80 | %Version: 003.002
81 | %%CreationDate: Mon Jul 13 16:17:00 2009
82 | %%Creator: David M. Jones
83 | %Copyright: Copyright (c) 1997, 2009 American Mathematical Society
84 | %Copyright: (), with Reserved Font Name CMR10.
85 | % This Font Software is licensed under the SIL Open Font License, Version 1.1.
86 | % This license is in the accompanying file OFL.txt, and is also
87 | % available with a FAQ at: http://scripts.sil.org/OFL.
88 | %%EndComments
89 | FontDirectory/CMR10 known{/CMR10 findfont dup/UniqueID known{dup
90 | /UniqueID get 5000793 eq exch/FontType get 1 eq and}{pop false}ifelse
91 | {save true}{false}ifelse}{false}ifelse
92 | 11 dict begin
93 | /FontType 1 def
94 | /FontMatrix [0.001 0 0 0.001 0 0 ]readonly def
95 | /FontName /CMR10 def
96 | /FontBBox {-40 -250 1009 750 }readonly def
97 | /UniqueID 5000793 def
98 | /PaintType 0 def
99 | /FontInfo 9 dict dup begin
100 | /version (003.002) readonly def
101 | /Notice (Copyright \050c\051 1997, 2009 American Mathematical Society \050\051, with Reserved Font Name CMR10.) readonly def
102 | /FullName (CMR10) readonly def
103 | /FamilyName (Computer Modern) readonly def
104 | /Weight (Medium) readonly def
105 | /ItalicAngle 0 def
106 | /isFixedPitch false def
107 | /UnderlinePosition -100 def
108 | /UnderlineThickness 50 def
109 | end readonly def
110 | /Encoding 256 array
111 | 0 1 255 {1 index exch /.notdef put} for
112 | dup 49 /one put
113 | readonly def
114 | currentdict end
115 | currentfile eexec
116 | D9D66F633B846AB284BCF8B0411B772DE5CE3DD325E55798292D7BD972BD75FA
117 | 0E079529AF9C82DF72F64195C9C210DCE34528F540DA1FFD7BEBB9B40787BA93
118 | 51BBFB7CFC5F9152D1E5BB0AD8D016C6CFA4EB41B3C51D091C2D5440E67CFD71
119 | 7C56816B03B901BF4A25A07175380E50A213F877C44778B3C5AADBCC86D6E551
120 | E6AF364B0BFCAAD22D8D558C5C81A7D425A1629DD5182206742D1D082A12F078
121 | 0FD4F5F6D3129FCFFF1F4A912B0A7DEC8D33A57B5AE0328EF9D57ADDAC543273
122 | C01924195A181D03F5054A93B71E5065F8D92FE23794D2DB9B8591E5F01442D8
123 | 569672CF86B91C3F79C5DDC97C190EE0082814A5B5A2A5E77C790F087E729079
124 | 24A5AC880DDED58334DD5E8DC6A0B2BD4F04B17334A74BF8FF5D88B7B678A04A
125 | 2255C050CB39A389106B0C672A1912AFA86A49EFD02E61E6509E50EE35E67944
126 | 8FC63D91C3D2794B49A0C2993832BC4CDC8F7BD7575AD61BCDF42E2E421AA93E
127 | 3FF9E4FAD980256D8B377043A07FC75D6169338028692CCA8CD1FE92FD60AD26
128 | D57B7519B80A8F8DCE9CEE5CDF720AF268D3C14099498A843D76E3B6C0328F24
129 | D36EFE7F5C4E5B5C612786200C8DE3A41EE5F1FFAF4097653CFCDC8F4FD32E0B
130 | 03EDB3E413283B9EFB0AC33B055617005BC9B0057FD68C52D1B0E67F0C571685
131 | 767F2AA85ADE4E0104A1C777733D5E318A22A9944336E5B98D965E50D31F357A
132 | 8B6EA5A0EA98E1B027CE68C2EDB149EDDD04ED74A1B3D206D471A0C11C11449B
133 | DE190BBFEBC08C9E1B7513B43DA3134D6B11A2516E6E86B67F68C970A320D05E
134 | 94FEC57FB347606DF89989C33482BD09D011C55AA920319E7B26A205D3D0F004
135 | 22466F09C0482A164CFB27EF6ED2B040ECCC3DCAF345B5A73676F193D43123B7
136 | 72FD6CFC5E37930E61EBD5A6307E4DE70194E6384EC0D79DB6AD86D3B319A31C
137 | 8B0589D0FE28241D8ACE280D0530EE99C80723E560BB72AE9D53F4713181F491
138 | 344B06D3027BA4E9E94D4305BE1D817197C54C8FF56CD6964165F6448ECC8A8A
139 | 64B48B4F0FD69299A137589E2491A283509B21A3A5772F75B7602A9F60AE559B
140 | 07A58436D04222C73EAEA72DE9A5A441F88D27C11F4F91255EFE280E91A4ACAC
141 | 1E98A4E5E6C57B9AE86FD218C3CD8F24A4104156A80F13821384E529783C52C8
142 | 78B94AB3A0096090867ED32E8A30980E737922037F75F062BD83BF4F5929BC51
143 | CC22AEE2DBBAAA001CFFBFF41D258424FAD888FFF1BEAB796A44E3126159E120
144 | 7E4025C676CF94888A1971AEF8B6764B3AF4A92D36FAF6FC56FD049710EE3782
145 | BC2CD84FE2473F133BE03C1346B875463F126DCAB15C7A9BCC9A727D23611462
146 | 4E8D2BFD2466600285D79518712B8681ABCD69608E6AA9578F7BD771EC36E01A
147 | 5A17BC17E375020ECA59B43790ABEB9DF5F4FBBEF807E5699EFEAC563E1ACC5D
148 | EFA336E75DE6D8248E9381BB110884FDC89C2F9A41EBBC9A8A1F98E6A41F68BE
149 | EE30E25CA148C1EFF42DFF8C214A6537AB11F260B8C329A4947B5FC8DC9C5622
150 | 4DF7BF4FBFB00380D47BABB03BC30627AA74103E553F55278F538EDD8C1E64CE
151 | 0F1398CA0AB5A86630139B4A7E8FC02804CAFF3830114640AE50D2FDA3B561B5
152 | C63AD7EE3347804CBB40FB1E77A6C89735DD870351C3A1811591AB493251B904
153 | 314F65791963C0412377C1D02362C5E9655F1C3D4803CD379A8EF24C48218C2E
154 | DF1165840462BF37DDE1B8D5FF09FA2C3B261E2F1A65ECFBE5D4EAD43B52C029
155 | EEB3948CB8A252CBAF545C8FA1C31E920E23A12DD7222CEF2D2A513BD758EA13
156 | DA33BF5FBF1D734653EB83DA2D374A5B9A0CE316F24EE375D6DF6BDA49954C2E
157 | DB25A88821193636119D469BA66E5DAA9C92520FD4F84426A4E54273FA469084
158 | 7517817A6EE3E21176D333825E88046F50B3CF6938AF9BA79A2F51398239EB91
159 | 1A2D07F7FCD948427FF62F40FF95E39FE1A1AA8451411563FD5388472251C155
160 | 69BDE9283B41900B21EB1190D06E6B13B7794FED020D2C1BDD205AE77B084BCE
161 | EF628249398B496DE85B406FC2E1939EF00DFC84C07E26CF72EC401BAAE756E5
162 | 7F6673216E7560D1C2A723CB405EE5CA474A07F61B81F8836482F73DC9516D67
163 | CE0CB770EAD755B6B356198B4B97EBB29C63456953270CCC8D5650C1D006E69D
164 | 38DE2DFEAB27DAD50A817F0D645D30AF5B75A7B53CBD3D2B8D87BD0A7E525AF3
165 | 22F7ADDFCE31716914C2318260C2E2B4664893921B68C5A93334A361D94A759C
166 | 0D7B146D6FD94F0442D672BDA0F6432E18F3C5DFA37ADA378D95B75F413C9ED1
167 | BB5C606A3EC7DFB3F796F59B0478C13FD1900381EFE0BB5242D5B5D34D03AF1D
168 | 4BDC93EAF8020E26CA23C8B0E7DDEBBC6762A557067A4CE05A524188A8F02E2F
169 | 3625DA38DFCF381727887F5646A3995A8A38A5FB1E5D5EBB395FDD0B7C8E71AD
170 | B48EEDB62AB2CE99D121435EFBBFCEEA69AE9ED8238B60CC7288DE33C766CDFE
171 | 15B767B4AE2E6CE0965E77272AC9F86023DA620548CFAC85BC751C44218A29C9
172 | 849F1C2DCBDFAD895B54E51A569952ED50F82DC8A19F367E7E44643854EFD6B3
173 | FCAEB04E55E4661C82D31E2932611748480EF61FB2FBFB0CFB940BEA81AFCD84
174 | 4C6A6332D7A600170E38A8EAFCD4F93DC153C43175434C86BC747348FAC61B76
175 | 1FEC9027C1A193E55C80F1F20B5317AA0A05AAA36AE235F6E49F06E570FEE798
176 | 84857D7552EA92EF3EFAD52DE39C2F8F43C59E3A957B7B926FC95FC4B60186DF
177 | 7F3523EE2AB74E294C8C4BCD8B4975E84849E0FBDA6C0B0F24A636DFA578B122
178 | CF97BC5089E21E9F5298D1C9F30CB8BAFF6A3A11BB4D9A0A5CF2B18D055C44CA
179 | 4FD4D8FE1AF3630907DE7E585AA811F9CD11FB2C8FC791851D651009FA5DF20B
180 | 3C33FD2FF848A9E3F5652BD294965A332DD3F246C91B0ADA34017FF2451D1394
181 | F9C3C95AAC6EC8062BE98E8914D51DA6A164AD13938693D446044859D03A949D
182 | F9AC5DF4A000CDA98BB516D762CB9F6D44B5268FD0C26E88BC4A760C0F75A140
183 | DEBDECA4F511128B7D2805872160C55236F0A0FA7637FF0D4E94AC079CD3C8A7
184 | D03A5A56F26B0438B577C46011A10532FEBCAD14FBD6032E224F45691A726886
185 | 56F305231EB2FCDF59C8BBFCB5DBD2D093A0E84D62AC93A2312CA69295E937C4
186 | 8DBA1802B85F54B5E7E6D6216A918F911FF705D3B5CF055F1D873B96283A0B53
187 | 59344D910CD396D883F6F7836BA65FAB4393A773A8F6BC298069E5BA38210EED
188 | 49C9D920F718E3FCE692527DC7CCE6963BF744F2C91BC5952564196D60574E86
189 | 87A0FAB21F2DB2BD5A51D7FBD8FC19946D24E5A228462C4772F978E650ADCE3B
190 | 8D66B9C21279C531CA1C3A8ECE3420BB65837287A7222CC3673A2A5F8BBFDB60
191 | C719CD073EF9A23675198462C7C87B24CC92D6AEE5C25AC63855CC3281494342
192 | D28F3D2FDE0C183486769A4FD5B0143193D31FCB2C2A14E487BBD96D0BADBB64
193 | D1B56021C363A795BF10E2DB448261C363A54A4AC1182B470C457AA82DF3F5D1
194 | F4B329806141EBD53CAE309319B94133D7EBDC2D0453A905ADD207364371E178
195 | 0A95C2686E3B34C4A978BFC0EE968C39ABA00889BC5149162C2B54483D44FD3B
196 | 5CFF41F611C7E03B94945F414560E874D7CF27FFD0630890D7D7EA66CBD15448
197 | 229059E1C436BB33D69552B5367AB5D53591C4678D0C704DD3EA23F5D9E8A7AC
198 | 17D003C19E333E726FFFA2961F33C70F429085F7BFE3E2510F59B78F58B19CB4
199 | 01B48E184BAD9020FECCE3AF52048A056981DAEA02AE78197E65855DDB170616
200 | F54278395D9EA50DC83761AE759F9CDEF9E1948E7002414FC05286ED793E6662
201 | 3347F2A9AF8917493D7305B92CF93E8E9185F70015F5594084298A6C2F9FD3C0
202 | 689F262AC9FEDC9B89577ECDE92F08D3142209FBCE7B5C0A840CC767BCA56C20
203 | 4E4E545E2BE4D21C53855CEE4CD0AB35D1A604C0FFFF77DBAE4289752276559F
204 | A05FEE65F45ECAF44E95E23FAB6052195C7948AF0B1126482D4E02D72BF8AB03
205 | DE0F1A632F7672AD9DDE70EDC82AA993678A82BEAD0BC2649C4707FD8509810D
206 | 364B5C6FE0E10772E95288C622C2F06C634F4DF8C7FD1432BC9310D5F24FEE3F
207 | 7AB324863D6DABAA1576E70643CA79EF4D7DF4105093D66CEE0F3B87D2164A7F
208 | 26EA05F5C4645B22D3E1BFD2219657712C168FD90DE801FB0F32759E80DEC1E1
209 | 43CEEB19FED12D757205043FC98FEC62D6A8D8B97BC083B4A0E985AF7850D6FD
210 | 8716B9957C1C35A0675BC53DF672C425C79F43FDABAEE7D63F092CF271C9A9D7
211 | C41F40C4189510987887942E60A412B3EEC84C9A6E1AC7D54D528F5604B72C08
212 | 94B7882621A5BF1F325B92FF96B80878CC550D1AE4D8196E41CB1251856609A5
213 | C4D3BD05A922D0D45E039D9450DEF8490A3E924E41434194910BF60BA1B08BE1
214 | B41824345627745541A4F1703E956328F6227D11C74946B38CFB096139979E56
215 | 4E723B889B44C6D78673868C89912F8B4F0B4B485F1587A637B630F92E6072D5
216 | 7F3B44EA6FD96BBD4FC28A6C1D90805E3BE3E42A7BC9C880762966C55BC04E01
217 | 204D083AE976FAE6F37C94F27E68F8C0F28D52B17F6C0FD7C9150701FD78F8CE
218 | B8E8DC9260E3974005EB5CA728171F482D765016C94D4ADFE4A42EF42212BC56
219 | 7E4EEEE8B0D2A7856CD4E44F55C0BAB762F92CB8D64C17022D4BF3A47C12F5E6
220 | 279FC23101FEE93753653CE8CEDC3B75C9CCB29BF1D4554C6120DE8EE750FCBB
221 | E38B5D915206974962E320362E59B3F21B3AB1875703191043D03284D4467346
222 | CFF2F98CEB4845B73ED8E003E0DC94251B73E13A9B51A3F1430BCF6A21EB9B7A
223 | 65E17FA411F53BE6432F1506232B8159E008FA257F884A4A01AC53BE91754D78
224 | BF14A5B0FBFB9C31BF4908355F8A762052968DF526D118708CCB0B7CB5BEE285
225 | 6DAB6CD2E3934178E60BECB11AAB5478623CF6C50C92F8BB5D1A583609028FA7
226 | B8A53B791BDC9EF76A124F3F7641857E4BEA0837CB36176EC9A522EA7F41B8D3
227 | 63C37D1145367BD300F17B54522A834BBB74DE12BF9EB26ACE6F24A046D58F89
228 | 4D4B7DF74875F1A0C1C9D97BE0849593D7B398EB4B00BEBC8C8D1497B6EF831A
229 | A35380FFB7F1AFA4D888AA52C9482E8B1755CC209905F98F40D95B44D4DCBCB6
230 | 67423D1BC2F3560FF0A8B4F0CAC352A4EE2C1D946E45AAEC8A6AD40303F3382C
231 | DF0756BFA3B1ED64C169E56ED1C760F2FF0E24DC5C9F41306EF8D2628153D30A
232 | 5DCB0791126BEFD4947D7EF08301FE015F2B0008DFFCBF9F2D4D859FD43EC7D9
233 | C5BE237E9BF6665B7B1BEBB362F0C0C3A8D86010B9C97FA741C97C2E0513386C
234 | 9C26C235B14DD2A58BFDAC7B5F63DB4DA6D5D37D0098175A9071590E1DF66A3D
235 | B8173A047C29D7D35557F06132CC920B5460B8AFC11D23D09A4E45D089F5EB51
236 | 963FA1A6256E359D485107FD143B2BF21FDE9DA5744BC2615E86C31C89470CF0
237 | D06C6397D9FCCB316EA9989430240759D2C4945D941F159FC02327F34B042BAB
238 | B5C3A47C78E8C1A6FBCD396B1A51CC4B020B8AD401841EDABACECDB482D6EC5B
239 | 72D2BFEB4556720FADD49D07307C8B22ACB7E310CA4151A85C71EEF70E8D15DE
240 | B3B00F26E0E166C14647A65ADA228A3D1C89025BE059306565DB1B1EFC37D358
241 | 8C1EB024254AFD049BA977BD4C2C605050E17940A89D0D4C5D963E792320F5DB
242 | 3706682E03D25D9E02487247819551465092CC22B6B56E93F3AB528038FEC3F0
243 | 668F866707A19B0463BE706EC729D2EE1653AAC7E29BD25BFB3241D4792F5152
244 | ED415B4E7FA92C2EE5A22E27E8B75542C492E56D811C192E95542A6FE0BFE5A5
245 | 69273C2ABED4300D491B92D2AECDD278404CB84B1BB1BD7AFEC858215837D118
246 | C0E928BE7E07CFEEB51A6D21375B772B8248C994564014015232A0DA4BEA1754
247 | 3274F407FED0837A236371F1A32056240F2015B1E7F4B2CA72C6B58610A66F13
248 | 407CFFBA5E0A2893C1F572D50F51286E9133B5A84239C9493B0574E77D281D01
249 | 11D00683354A000C9700EAFBC1FD104EA19DFCB87470190E7E2CE26E3A6FD0FF
250 | 2620B87B82AC8686B6206B530F17E9348BC7D04B948348802CE53A312443DB87
251 | 4DBBA5313A6A2A8DAB8A1CC9A594FF8C299281C0A261C8CB2226B732FBEEDE40
252 | 2C6ACC74A1A61379E2E1CD5548CD908268A32FA83D8504C442EA0E183ADBF7FF
253 | 9FD09C037AB03516ECCA93FF048235BD11A25DB07F164512A079C5392AC7F889
254 | CE96AE5C8D9580BCAFCC087C35E76EED1A671E87C12E3045E15A687134736DF8
255 | DA984772AFD189D68571A2ED7256F1E204230E41D3D9DD876F938951714A3973
256 | 0CA9310489F8E807C1C7A4E51AEA5BC030610A5D7263FF7E0F9FDE3E5E37A362
257 | 5B919000BD94D978583B942EB79CF2BEAC33FEBC9A67272EB10865BA8FB75FD7
258 | 9D280AB59F91B96C16C982DE848D76D8FA8620DFD7C80B7DEAE7264350D6FB3A
259 | EF04794DA3305844A7CF718F6D1A4A3AFF6826173A076A1372ABFC54ED3AC6C2
260 | 09C9287FC830556CA694E21CA5342ECA7B10C90AFC4783D841D7B1E34FA3DB7A
261 | 2B706F3E21B0FBAB23E7257962FC3BC309CEA2C7239A9D6B44CC96825115ABD2
262 | AF9A2566D2F3382C01569FBDB94C8D664A5DA0F7DC3DD140CA77C743D7BC1420
263 | 324ECF9E4780280EB119885E96A6C619CE3C0C8E1E264E2DEB137E5DC8149786
264 | 486D65667ECF47B1A1E20E9E6E4FC8323E0BC8E61BDD3BCDFC6575C69C03E31A
265 | EFFC290472CBBD049DE3F840AEE37A2486034240F80E75D8A79E0762377DF660
266 | 52B12EAA16D678990B11A9BFBC03C1D4FCDA9FD4FFBB3E88352438102F10B7C5
267 | 9F04C013B6575B5E948FAB58EA691984A0E54E6B9F3F505FFFEF74D06FA1CDF3
268 | 4B8A95904C8A2763AA8AF5B71D00F5DE09DC1CDF87A08B6D181453063E14C12D
269 | B7BB3775A6E2A901636273D9EEB833EA8CF20FD83AE899E28DADE10EEEC20BD7
270 | BD93085A4B1AC80AC1AE8280C14767F1A487BD066007A0D050317BD081131A14
271 | 6EA0898ED59E46DA7B6254BDCCBC660686E2EDA0E77A705A653733BB5C5497D0
272 | B130359F866CF293FB6EF0C2AC5BAA2DB0DED045E2DED3A2612D078333260359
273 | 16CF0CCB272D34767EA069E0F0B0D42327A18529D72E890EDA6195C2688438ED
274 | E9ACDBEED41E81CA8EB5E43C2B09CE266EFCA03F2D7FF57F12B06F9E54FCC6A6
275 | 546676F6FFC5B8B7D3F0982B6FF0D21D949309F0C0B175CC1D0976F8C55C6AED
276 | 6E821C39041E22D91AB30922F2B2EC2746BC7DAB484991542FBC82D87B487507
277 | 559AB466F73EE23C2D3194DC5CE4C9AE66D3164613AC5CBB3DB501B64DA7C91B
278 | C7ED2EE9027FC0906820B35D4F2CF66C4F9CE4A884B7C07155BCA884ECA5EB3A
279 | ABB83F84DB1F5639599DC7D3F51241AB5D95C3BCB7AB1EC90B4BC989F74FB354
280 | 04B2D7366A34D335A47B8C00C05CB423482BF6C7970A95545424A08AFF9A035B
281 | 7F83F52B65A9799CE76E303B85664B624C65E9CA58184C7BE2BB9D9C86A4DE5A
282 | 8165EE3DA2E652B5022EE7893896BABD88931DE1D538F615787645DF5ACBBA0B
283 | A8E5B899A37321AA7D4B283AC9234978C2DD81813A1EE5DB6EC170DAC1B6EF02
284 | 94892635B498765C07A38D2E9DB0B7581B11056C28278F89B0E60998379C07EB
285 | C0EAEDC32AA69B8B836F92A61AFD35688315B2C3F860632FC13E4BDFB63214BC
286 | 41CC6859EAB3AC3034449213CAB99FA1D216563419CD6D6CE4E1B56F33E6C654
287 | 7AA9DCB5B05FC068DF02AC32408C8010AD004F6CCA9887830927F8CBCD49CDB5
288 | 18CAC1EAFF815FF2F6F527F936948201565003022C6C7390B4E3C2B219FB4F76
289 | 9F12BD25CA7B3B61D1A2F8DFEE795D04D5428B42FB66E0C254AF7B7A10CEF7FD
290 | E0B5622DF6FC4BF52147208D9A91EB49B03BB40DE7F8FBFB566F251942C8FFB1
291 | 1DFA50465919400C21CE4724D12E4EB47AA5F392BA927329DBCA28A78FC1DF2E
292 | 6FF27F4E4E3F8971D7BCB5F3FBF8F30C214A26E5E32E0E8CBC71BF20AE573BBB
293 | 163DD66E89F2C4E2B1A1532AE81C060146F755A1ABA3F1365FEA30B403DE7B22
294 | 76F43EDDF7CB0C5D3E3F2B9043D33654BDE23221D16CABE4D559575AC8D01281
295 | 379FC2AD33242EDDECAABC38D94B5261FB3D7DB1805BF7487D1FEC7799AF3403
296 | 048EDD0FA38DFDC1FF377FC051F2DF0F3ABE714B6D635B39D758282B3B98104D
297 | 669CF20010A0EB51C89E1743CE629CC7416ED4BFD444E4E1AEAA4668F6BACDC2
298 | E130A2C4CA27DF2A20389997AE29853C275546287018C03A28533D8F962DC24F
299 | 69B2AAE5213A8B8D341E0B420CD28F260F86D5AE0485AF3D5B2B9AA9AB524E07
300 | AC49B087A1CB52043A3F15FACB897B46D91BD4D830AA50B8025C7E752884A6C5
301 | 34D474141D11434D00687E5151B17F2594284B2E8D4ADD9509DC7F0DDAF53899
302 | D02C08F65ECC529834CF1BFF06
303 | 0000000000000000000000000000000000000000000000000000000000000000
304 | 0000000000000000000000000000000000000000000000000000000000000000
305 | 0000000000000000000000000000000000000000000000000000000000000000
306 | 0000000000000000000000000000000000000000000000000000000000000000
307 | 0000000000000000000000000000000000000000000000000000000000000000
308 | 0000000000000000000000000000000000000000000000000000000000000000
309 | 0000000000000000000000000000000000000000000000000000000000000000
310 | 0000000000000000000000000000000000000000000000000000000000000000
311 | cleartomark
312 | {restore}if
313 | %%EndFont
314 | TeXDict begin 39139632 55387786 1000 600 600 (test.dvi)
315 | @start /Fa 206[42 49[{}1 83.022 /CMR10 rf
316 | %DVIPSBitmapFont: Fb gbksong60 10.5 1
317 | /Fb 1 84 df<000000000200000000000000000003C0000000000000000001F000000000
318 | 0000000000FC0000000000000000007E0000000000000000003F0000000000000000003F
319 | 8000000000000000001F8000010000000000001F8000038000000000000F000007C00018
320 | 0000000F00000FE0001E0000000600001FF0001FFFFFFFFFFFFFFFF8001FFFFFFFFFFFFF
321 | FFFC001F0000000000000000001F0000000000000000001F0000000000000000001F0000
322 | 000000000000001F0000000000002000001F000000000000F000001F000000000001F800
323 | 001F01FFFFFFFFFFFC00001F00FFFFFFFFFFFC00001F007C00000003FE00001F00000000
324 | 0007FF00001F00000000001FF000001F00000000003F8000001F00000000007E0000001F
325 | 0000000001F80000001F0000070003E00000001F000003E007800000001F000001F81E00
326 | 0000001F000000FE3C000000001F0000007FF0000000001F0000001FC0000000001F0000
327 | 000FE0000000001F0000000FE0000000001F00000007F0000000001F00000003F0000040
328 | 001F00000003E00000E0001E00000001E00001F0001E00000001C00003F8001E3FFFFFFF
329 | FFFFFFFC001E1FFFFFFFFFFFFFFE003E0C000003E00003FF003E00000003E00003F0003E
330 | 00000003E00007C0003E00000003E0000780003E00000003E0000F00003C00000003E000
331 | 1E00003C00000003E0001C00003C00000003E0003800003C00000003E0003000007C0000
332 | 0003E0000000007800000003E0000000007800000003E0000000007800000003E0000000
333 | 007800000003E0000000007000000003E000000000F000000003E000000000F000000003
334 | E000000000E000000003E000000001E000000003E000000001E000000003E000000001C0
335 | 00000003E000000001C000000003E0000000038000000003E0000000038000000003E000
336 | 0000070000000003E0000000070000000003E0000000060000000003E00000000E000000
337 | 0007E00000000C0000003E0FC00000001C0000003FFFC00000001800000007FFC0000000
338 | 3000000001FF8000000030000000007F8000000060000000003F00000000C0000000001E
339 | 000000000000000000180000000050507DC657>83 D E
340 | %EndDVIPSBitmapFont
341 | %DVIPSBitmapFont: Fc gbksong38 10.5 1
342 | /Fc 1 168 df<00000004000000000000000000000E000000000000000000003E000000
343 | 00008000000001FF0180000001C000000007FF81E0000003E00000003FFFC1FFFFFFFFF0
344 | 000003FFFF81FFFFFFFFF800001FFF8001F0000003F00003FFFC0001F0000003E0001FF0
345 | 7C0001F0000003C00000007C0001F0000003C00000007C0001F0000003C00000007C0001
346 | F0000003C00000007C0001F0000003C00000007C0001F0000003C00000007C0001F00000
347 | 03C00000007C0001F0000003C00000007C0001F0000003C00000007C0001F0000003C000
348 | 00007C0001F0000003C00000007C0001F0000003C00000007C0001F0000003C00000007C
349 | 0301F0000003C00000007C0781F0000003C00000007C0FC1F0000003C000FFFFFFFFC1FF
350 | FFFFFFC0007FFFFFFFE1FFFFFFFFC0003F80FC0001F0000003C0000000FC0001F0000003
351 | C0000000FC0001F0000003C0000000FC0001F000000300000001FC0001E0000000000000
352 | 01FC00018000000000000001FC00000000000000000003FE00000000000060000003FF80
353 | 0000000000F0000003FDE00000000001F0000003FCF80000000003F8000007FC7C1FFFFF
354 | FFFFFC000007FC3E0FFFFFFFFFFE000007FC3F060003E0000000000FFC1F800003E00000
355 | 00000F7C1F800003E0000000001F7C0FC00003E0000000001E7C0FC00003E0000000001E
356 | 7C07800003E0000000003C7C07800003E0000000003C7C03000003E000000000787C0000
357 | 0003E000000000787C00000003E000000000707C00000003E000000000F07C00000003E0
358 | 01800000E07C00000003E003C00001E07C00000003E007E00001C07C00040003E00FF000
359 | 03807C0003FFFFFFFFF80003807C0001FFFFFFFFFC0007007C00000003E00000000E007C
360 | 00000003E00000000E007C00000003E00000001C007C00000003E000000018007C000000
361 | 03E000000030007C00000003E000000070007C00000003E000000060007C00000003E000
362 | 000040007C00000003E000000000007C00000003E000000000007C00000003E000000000
363 | 007C00000003E000000000007C00000003E000180000007C00000003E0003C0000007C00
364 | 000003E0007E0000007C07FFFFFFFFFFFF0000007C03FFFFFFFFFFFF8000007C01FF0000
365 | 0000000000007C000000000000000000007C000000000000000000007800000000000000
366 | 000000600000000000000000514F7DC557>167 D E
367 | %EndDVIPSBitmapFont
368 | %DVIPSBitmapFont: Fd gbksong55 10.5 1
369 | /Fd 1 194 df<0000000000000400000000000000000000070000000000000000000007
370 | C100000000000000000007E1C0000000800000000007F9F0000000C00000000007E0FC00
371 | 0000E00000000007C07E000000700000000007C03F8000007C0000000007C01FC000003E
372 | 0000000007C01FC000003F0000000007C00FC000001F8000000007C00FC000001F800000
373 | 0007C007C000001FC000000007C007C000000FE000000007C0038000000FE000000007C0
374 | 010000000FE000000007C00020000007E000000007C00070000007C000000007C000F800
375 | 0007C000000007C001FC00000780FFFFFFFFFFFFFE000002007FFFFFFFFFFFFF00000000
376 | 3FFFFFFFFFFFFF8000000000000003E000000000000000000003E0000000000000000000
377 | 03E000000000000000000003E000000000000000000003E000000000000000000003E000
378 | 000000000000000003E000000000030000000003E00000000003C000000003E000000000
379 | 07E000000001E0000000FFFFF800000041E00000007FFFF0000000E1E00000003C07E000
380 | 0001E1F00000000007C0000003F1F00000000007C03FFFFFF9F00000000007C01FFFFFFD
381 | F00000000007C00E03E001F00000000007C00003E000F00000000007C00003E000F00000
382 | 000007C00003E000F80000000007C00003E000F80000000007C00003E000F80000000007
383 | C00003E000780000000007C00003E0007C0000000007C00003E0007C0000000007C00003
384 | E0007C0000000007C00003E0003C0000000007C00003E0003E0000000007C00003E0003E
385 | 0000000007C00003E0003E0000000007C00003E0001F0000000007C00603E0001F000000
386 | 0007C00C03E0000F8000000007C01C03E0000F8006000007C03803E0000F8006000007C0
387 | 7003E00007C006000007C07003E00707C006000007C0E003E03E03E004000007C1C003E3
388 | F803F00C000007C3C003FFC001F00C000007C78003FF0001F80C000007CF800FFC0000FC
389 | 0C000007DF00FFF00000FC0C000007FE07FF8000007E1C000007FE3FFE0000003F1C0000
390 | 07FC1FF80000003F9C000007F81FE00000001FDC00000FF80F800000000FFC000007F007
391 | 0000000007FC000003E0060000000007FC000003E0000000000003FE000001C000000000
392 | 0000FE000000C00000000000007E000000000000000000003E000000000000000000000F
393 | 000000000000000000000700514F7CC557>193 D E
394 | %EndDVIPSBitmapFont
395 | %DVIPSBitmapFont: Fe gbksong37 10.5 1
396 | /Fe 1 256 df<0100000000000000030001C001000000000003C000E001800001800003
397 | F000F801E00003C00003F0007C01FFFFFFE00003E0003E01FFFFFFF00003C0003F01F000
398 | 07F00003C0001F81F00007C00003C0001F81F00007C00003C0000FC1F00007C00003C000
399 | 0FC1F00007C00003C0000781F00007C02003C0000781F00007C03803C0000301F00007C0
400 | 3E03C0000001F00007C03F83C0000001F00007C03F03C0000001F03007C03E03C0000001
401 | F03C07C03C03C0400001F03F07C03C03C0600001F03F87C03C03C0780001F03F07C03C03
402 | C03C0001F03E07C03C03C01E0009F03E07C03C03C01F8019F03E07C03C03C00FC019F03E
403 | 07C03C03C00FC019F03E07C03C03C007E011F03E07C03C03C007E031F03E07C03C03C003
404 | E031F03E07C03C03C003E031F03E07C03C03C003E061F03E07C03C03C001E061F03E07C0
405 | 3C03C001C061F03E07C03C03C00000E1F03E07C03C03C00000C1F03E07C03C03C00000C1
406 | F03E07C03C03C00001C1F03E07C03C03C00001C1F03E07C03C03C0000181F03E07C03C03
407 | C0000181F03C07C03C03C0000381F03C07C03C03C0000381F03C07C03C03C0000701F03C
408 | 07C03C03C0000701F03C07C03C03C0000701F03C07C03C03C0000F01F03C07C03C03C000
409 | 0E01F03C07C03C03C0000E01F07C07C03C03C0001E01F07807C03C03C0003E01F07807C0
410 | 3C03C0003C01F07807C03C03C0007C01F07807C03C03C0FFFC01F07807003C03C03FFC01
411 | F0F804003C03C00FF801E0F000003E03C003F80180F000003E03C001F80001F000003E03
412 | C000F80001E200003803C000F80001E380000003C000F80003E1C0000003C000F80003C0
413 | F0000003C000F80007C078000003C000F80007803C000003C001F8000F803E000003C001
414 | F8001F001F000003C001F8001E000F800003C001F8003C000FC00003C003F800780007E0
415 | 0003C003F800F00007E00003C003F801E00003F04003C003F803C00003F07FEFC001F807
416 | 800003F01FFFC001F80F000001E003FFC000781E000001E001FFC0000078000000C0007F
417 | 800000F000000000003F000001C000000000003E00000100000000000018004C4E7CC457
418 | >255 D E
419 | %EndDVIPSBitmapFont
420 | %DVIPSBitmapFont: Ff gbksong58 10.5 1
421 | /Ff 1 170 df<0000000020000000000000000000380000000000000000001C00000000
422 | 00000000001E0000000000000000000F0000000000000000000F80000000000000000007
423 | C0000000000000000007E0000000000000000003F0000000000000000003F00000000000
424 | 00000003F0000000000000000003F0000000000000000001E0000001000000000001E000
425 | 0003800000000001C0000007C000000000000000000FE000000000000000001FF0000000
426 | 00000000003FF81FFFFFFFFFFFFFFFFFFC0FFFFFFFFFFFFFFFFFFE0600018000000FC000
427 | 000000018000000FC00000000001C000000F800000000000C000000F800000000000C000
428 | 001F800000000000C000001F800000000000E000001F000000000000E000001F00000000
429 | 00006000003F0000000000007000003F0000000000007000003E0000000000003000007E
430 | 0000000000003800007E0000000000003800007C0000000000003800007C000000000000
431 | 1C0000FC0000000000001C0000F80000000000001E0000F80000000000000E0001F80000
432 | 000000000F0001F0000000000000070003F0000000000000078003E00000000000000780
433 | 07E000000000000003C007C000000000000003C007C000000000000001E00FC000000000
434 | 000001E00F8000000000000000F01F8000000000000000F03F0000000000000000783E00
435 | 000000000000007C7E00000000000000003C7C00000000000000003EFC00000000000000
436 | 001FF800000000000000000FF000000000000000000FF0000000000000000007E0000000
437 | 00000000000FE000000000000000001FF800000000000000003FFC00000000000000007E
438 | FE0000000000000000FC7F8000000000000003F03FC000000000000007E00FF000000000
439 | 00000FC007FC0000000000003F0003FF0000000000007E0001FFC00000000001FC00007F
440 | F80000000003F000003FFF000000000FC000000FFFF00000003F00000003FFFFC00000FE
441 | 00000000FFFFFE0003F0000000003FFFFC000FC0000000000FFFE0003F000000000003FF
442 | 8001F80000000000007F000FC00000000000000F007E000000000000000000E000000000
443 | 00000000004F4F7CC557>169 D E
444 | %EndDVIPSBitmapFont
445 | %DVIPSBitmapFont: Fg gbksong64 10.5 1
446 | /Fg 1 166 df<0000000C00000000000000000F00000000000000000FC0000000000000
447 | 000FF0000000000000000FF0000000000000000FE0000000000000000FC0000000000000
448 | 000FC0000000000000000FC0000000000000000FC0000000000000000FC0000000000000
449 | 000FC0000000000000000FC00000000000000007C00000000000000007C0000000000000
450 | 0007C00000000000000007C00000080080000007C000001E00C0000007C000001F00F000
451 | 0007C000003F80FFFFFFFFFFFFFFFFC0FFFFFFFFFFFFFFFF80F8000007C000003F00F800
452 | 0007C000003E00F8000007C000003E00F8000007C000003E00F8000007C000003E00F800
453 | 0007C000003E00F8000007C000003E00F8000007C000003E00F8000007C000003E00F800
454 | 0007C000003E00F8000007C000003E00F8000007C000003E00F8000007C000003E00F800
455 | 0007C000003E00F8000007C000003E00F8000007C000003E00F8000007C000003E00F800
456 | 0007C000003E00F8000007C000003E00F8000007C000003E00F8000007C000003E00F800
457 | 0007C000003E00F8000007C000003E00FFFFFFFFFFFFFFFE00FFFFFFFFFFFFFFFE00F800
458 | 0007C000003E00F8000007C000003E00F8000007C000003E00F8000007C000003F00F000
459 | 0007C000003C00C0000007C00000300000000007C00000000000000007C0000000000000
460 | 0007C00000000000000007C00000000000000007C00000000000000007C0000000000000
461 | 000FC0000000000000000FC0000000000000000FC0000000000000000FC0000000000000
462 | 000FC0000000000000000FC0000000000000000FC0000000000000000FC0000000000000
463 | 000FC0000000000000000FC0000000000000000FC0000000000000000FC0000000000000
464 | 000FC0000000000000000FC0000000000000000FC0000000000000000FC0000000000000
465 | 000FC0000000000000000FC0000000000000000FC0000000000000000F00000000000000
466 | 000C0000000000425074C657>165 D E
467 | %EndDVIPSBitmapFont
468 | end
469 | %%EndProlog
470 | %%BeginSetup
471 | %%Feature: *Resolution 600dpi
472 | TeXDict begin
473 | %%PaperSize: A4
474 | end
475 | %%EndSetup
476 | %%Page: 1 1
477 | TeXDict begin 1 0 bop 614 531 a Fg(\245)p Ff(\251)p Fe(\377)p
478 | Fd(\301)p Fc(\247)p Fb(S)1851 5662 y Fa(1)p eop end
479 | %%Trailer
480 |
481 | userdict /end-hook known{end-hook}if
482 | %%EOF
483 |
--------------------------------------------------------------------------------