fmod AND-CONVERSION is
protecting QID .
sort Strings .
subsort String < Strings .
op _@_ : Strings Strings -> Strings [assoc] .
op and-conv : String -> Strings .
var S : String .
eq and-conv(S) = if find(S," and ",0) == notFound
then S
else substr(S,0,find(S," and ",0)) @
and-conv(substr(S,find(S," and ",0) + 5,1000000))
fi .
endfm
fmod BIBTEX is
protecting STRING .
protecting QID .
sorts Data Contents Field Fields Reference RefDatabase Definition
DefDatabase Database .
subsorts MachineInt String < Data .
subsorts Data Qid < Contents .
subsorts Qid < Field < Fields .
subsorts Reference < RefDatabase < Database .
subsorts Definition < DefDatabase < Database .
op _,_ : Fields Fields -> Fields [assoc] .
op __ : RefDatabase RefDatabase -> RefDatabase [assoc] .
op __ : DefDatabase DefDatabase -> DefDatabase [assoc] .
op __ : Database Database -> Database [assoc] .
op replace : Database -> RefDatabase .
op replace-aux : Definition Fields -> Fields .
op @string{_=_} : Qid String -> Definition .
op @String{_=_} : Qid String -> Definition .
op @STRING{_=_} : Qid String -> Definition .
op @article{_} : Fields -> Reference .
op @Article{_} : Fields -> Reference .
op @ARTICLE{_} : Fields -> Reference .
op @book{_} : Fields -> Reference .
op @Book{_} : Fields -> Reference .
op @BOOK{_} : Fields -> Reference .
op @booklet{_} : Fields -> Reference .
op @Booklet{_} : Fields -> Reference .
op @BOOKLET{_} : Fields -> Reference .
op @conference{_} : Fields -> Reference .
op @Conference{_} : Fields -> Reference .
op @CONFERENCE{_} : Fields -> Reference .
op @inbook{_} : Fields -> Reference .
op @Inbook{_} : Fields -> Reference .
op @INBOOK{_} : Fields -> Reference .
op @incollection{_} : Fields -> Reference .
op @Incollection{_} : Fields -> Reference .
op @InCollection{_} : Fields -> Reference .
op @INCOLLECTION{_} : Fields -> Reference .
op @inproceedings{_} : Fields -> Reference .
op @Inproceedings{_} : Fields -> Reference .
op @InProceedings{_} : Fields -> Reference .
op @INPROCEEDINGS{_} : Fields -> Reference .
op @manual{_} : Fields -> Reference .
op @Manual{_} : Fields -> Reference .
op @MANUAL{_} : Fields -> Reference .
op @masterthesis{_} : Fields -> Reference .
op @Masterthesis{_} : Fields -> Reference .
op @MasterThesis{_} : Fields -> Reference .
op @MASTERTHESIS{_} : Fields -> Reference .
op @misc{_} : Fields -> Reference .
op @Misc{_} : Fields -> Reference .
op @MISC{_} : Fields -> Reference .
op @phdthesis{_} : Fields -> Reference .
op @Phdthesis{_} : Fields -> Reference .
op @PhdThesis{_} : Fields -> Reference .
op @PHDTHESIS{_} : Fields -> Reference .
op @proceedings{_} : Fields -> Reference .
op @Proceedings{_} : Fields -> Reference .
op @PROCEEDINGS{_} : Fields -> Reference .
op @techreport{_} : Fields -> Reference .
op @Techreport{_} : Fields -> Reference .
op @TechReport{_} : Fields -> Reference .
op @TECHREPORT{_} : Fields -> Reference .
op @unpublished{_} : Fields -> Reference .
op @Unpublished{_} : Fields -> Reference .
op @UNPUBLISHED{_} : Fields -> Reference .
op abstract`=_ : Contents -> Field .
op ABSTRACT`=_ : Contents -> Field .
op address`=_ : Contents -> Field .
op ADDRESS`=_ : Contents -> Field .
op annote`=_ : Contents -> Field .
op ANNOTE`=_ : Contents -> Field .
op author`=_ : Contents -> Field .
op AUTHOR`=_ : Contents -> Field .
op booktitle`=_ : Contents -> Field .
op BOOKTITLE`=_ : Contents -> Field .
op chapter`=_ : Contents -> Field .
op CHAPTER`=_ : Contents -> Field .
op crossref`=_ : Contents -> Field .
op CROSSREF`=_ : Contents -> Field .
op edition`=_ : Contents -> Field .
op EDITION`=_ : Contents -> Field .
op editor`=_ : Contents -> Field .
op EDITOR`=_ : Contents -> Field .
op howpublished`=_ : Contents -> Field .
op HOWPUBLISHED`=_ : Contents -> Field .
op institution`=_ : Contents -> Field .
op INSTITUTION`=_ : Contents -> Field .
op journal`=_ : Contents -> Field .
op JOURNAL`=_ : Contents -> Field .
op key`=_ : Contents -> Field .
op KEY`=_ : Contents -> Field .
op month`=_ : Contents -> Field .
op MONTH`=_ : Contents -> Field .
op note`=_ : Contents -> Field .
op NOTE`=_ : Contents -> Field .
op number`=_ : Contents -> Field .
op NUMBER`=_ : Contents -> Field .
op organization`=_ : Contents -> Field .
op ORGANIZATION`=_ : Contents -> Field .
op pages`=_ : Contents -> Field .
op PAGES`=_ : Contents -> Field .
op publisher`=_ : Contents -> Field .
op PUBLISHER`=_ : Contents -> Field .
op school`=_ : Contents -> Field .
op SCHOOL`=_ : Contents -> Field .
op series`=_ : Contents -> Field .
op SERIES`=_ : Contents -> Field .
op title`=_ : Contents -> Field .
op TITLE`=_ : Contents -> Field .
op type`=_ : Contents -> Field .
op TYPE`=_ : Contents -> Field .
op volume`=_ : Contents -> Field .
op VOLUME`=_ : Contents -> Field .
op url`=_ : Contents -> Field .
op URL`=_ : Contents -> Field .
op year`=_ : Contents -> Field .
op YEAR`=_ : Contents -> Field .
var D : Definition .
var R : Reference .
var DDB : DefDatabase .
var RDB : RefDatabase .
var F : Field .
var FS : Fields .
vars I J : Qid .
var S : String .
var DT : Data .
eq replace(D DDB RDB) = replace(DDB replace(D RDB)) .
eq replace(D R RDB) = replace(D R) replace(D RDB) .
eq replace(D @article{I,FS}) = @article{I,replace-aux(D,FS)} .
eq replace(D @Article{I,FS}) = @Article{I,replace-aux(D,FS)} .
eq replace(D @ARTICLE{I,FS}) = @ARTICLE{I,replace-aux(D,FS)} .
eq replace(D @book{I,FS}) = @book{I,replace-aux(D,FS)} .
eq replace(D @Book{I,FS}) = @Book{I,replace-aux(D,FS)} .
eq replace(D @BOOK{I,FS}) = @BOOK{I,replace-aux(D,FS)} .
eq replace(D @booklet{I,FS}) = @booklet{I,replace-aux(D,FS)} .
eq replace(D @Booklet{I,FS}) = @Booklet{I,replace-aux(D,FS)} .
eq replace(D @BOOKLET{I,FS}) = @BOOKLET{I,replace-aux(D,FS)} .
eq replace(D @conference{I,FS}) = @conference{I,replace-aux(D,FS)} .
eq replace(D @Conference{I,FS}) = @Conference{I,replace-aux(D,FS)} .
eq replace(D @CONFERENCE{I,FS}) = @CONFERENCE{I,replace-aux(D,FS)} .
eq replace(D @inbook{I,FS}) = @inbook{I,replace-aux(D,FS)} .
eq replace(D @Inbook{I,FS}) = @Inbook{I,replace-aux(D,FS)} .
eq replace(D @INBOOK{I,FS}) = @INBOOK{I,replace-aux(D,FS)} .
eq replace(D @incollection{I,FS}) = @incollection{I,replace-aux(D,FS)} .
eq replace(D @Incollection{I,FS}) = @Incollection{I,replace-aux(D,FS)} .
eq replace(D @InCollection{I,FS}) = @InCollection{I,replace-aux(D,FS)} .
eq replace(D @INCOLLECTION{I,FS}) = @INCOLLECTION{I,replace-aux(D,FS)} .
eq replace(D @inproceedings{I,FS}) = @inproceedings{I,replace-aux(D,FS)} .
eq replace(D @Inproceedings{I,FS}) = @Inproceedings{I,replace-aux(D,FS)} .
eq replace(D @InProceedings{I,FS}) = @InProceedings{I,replace-aux(D,FS)} .
eq replace(D @INPROCEEDINGS{I,FS}) = @INPROCEEDINGS{I,replace-aux(D,FS)} .
eq replace(D @manual{I,FS}) = @manual{I,replace-aux(D,FS)} .
eq replace(D @Manual{I,FS}) = @Manual{I,replace-aux(D,FS)} .
eq replace(D @MANUAL{I,FS}) = @MANUAL{I,replace-aux(D,FS)} .
eq replace(D @masterthesis{I,FS}) = @masterthesis{I,replace-aux(D,FS)} .
eq replace(D @Masterthesis{I,FS}) = @Masterthesis{I,replace-aux(D,FS)} .
eq replace(D @MasterThesis{I,FS}) = @MasterThesis{I,replace-aux(D,FS)} .
eq replace(D @MASTERTHESIS{I,FS}) = @MASTERTHESIS{I,replace-aux(D,FS)} .
eq replace(D @misc{I,FS}) = @misc{I,replace-aux(D,FS)} .
eq replace(D @Misc{I,FS}) = @Misc{I,replace-aux(D,FS)} .
eq replace(D @MISC{I,FS}) = @MISC{I,replace-aux(D,FS)} .
eq replace(D @phdthesis{I,FS}) = @phdthesis{I,replace-aux(D,FS)} .
eq replace(D @Phdthesis{I,FS}) = @Phdthesis{I,replace-aux(D,FS)} .
eq replace(D @PhdThesis{I,FS}) = @PhdThesis{I,replace-aux(D,FS)} .
eq replace(D @PHDTHESIS{I,FS}) = @PHDTHESIS{I,replace-aux(D,FS)} .
eq replace(D @proceedings{I,FS}) = @proceedings{I,replace-aux(D,FS)} .
eq replace(D @Proceedings{I,FS}) = @Proceedings{I,replace-aux(D,FS)} .
eq replace(D @PROCEEDINGS{I,FS}) = @PROCEEDINGS{I,replace-aux(D,FS)} .
eq replace(D @techreport{I,FS}) = @techreport{I,replace-aux(D,FS)} .
eq replace(D @Techreport{I,FS}) = @Techreport{I,replace-aux(D,FS)} .
eq replace(D @TechReport{I,FS}) = @TechReport{I,replace-aux(D,FS)} .
eq replace(D @TECHREPORT{I,FS}) = @TECHREPORT{I,replace-aux(D,FS)} .
eq replace(D @unpublished{I,FS}) = @unpublished{I,replace-aux(D,FS)} .
eq replace(D @Unpublished{I,FS}) = @Unpublished{I,replace-aux(D,FS)} .
eq replace(D @UNPUBLISHED{I,FS}) = @UNPUBLISHED{I,replace-aux(D,FS)} .
eq replace-aux(D,(F,FS)) = replace-aux(D,F), replace-aux(D,FS) .
eq replace-aux(D,abstract = S) = (abstract = S) .
eq replace-aux(D,ABSTRACT = S) = (ABSTRACT = S) .
eq replace-aux(@string{I = S},abstract = J) = if I == J
then (abstract = S)
else (abstract = J)
fi .
eq replace-aux(@string{I = S},ABSTRACT = J) = if I == J
then (ABSTRACT = S)
else (ABSTRACT = J)
fi .
eq replace-aux(@String{I = S},abstract = J) = if I == J
then (abstract = S)
else (abstract = J)
fi .
eq replace-aux(@String{I = S},ABSTRACT = J) = if I == J
then (ABSTRACT = S)
else (ABSTRACT = J)
fi .
eq replace-aux(@STRING{I = S},abstract = J) = if I == J
then (abstract = S)
else (abstract = J)
fi .
eq replace-aux(@STRING{I = S},ABSTRACT = J) = if I == J
then (ABSTRACT = S)
else (ABSTRACT = J)
fi .
eq replace-aux(D,address = S) = (address = S) .
eq replace-aux(D,ADDRESS = S) = (ADDRESS = S) .
eq replace-aux(@string{I = S},address = J) = if I == J
then (address = S)
else (address = J)
fi .
eq replace-aux(@string{I = S},ADDRESS = J) = if I == J
then (ADDRESS = S)
else (ADDRESS = J)
fi .
eq replace-aux(@String{I = S},address = J) = if I == J
then (address = S)
else (address = J)
fi .
eq replace-aux(@String{I = S},ADDRESS = J) = if I == J
then (ADDRESS = S)
else (ADDRESS = J)
fi .
eq replace-aux(@STRING{I = S},address = J) = if I == J
then (address = S)
else (address = J)
fi .
eq replace-aux(@STRING{I = S},ADDRESS = J) = if I == J
then (ADDRESS = S)
else (ADDRESS = J)
fi .
eq replace-aux(D,annote = S) = (annote = S) .
eq replace-aux(D,ANNOTE = S) = (ANNOTE = S) .
eq replace-aux(@string{I = S},annote = J) = if I == J
then (annote = S)
else (annote = J)
fi .
eq replace-aux(@string{I = S},ANNOTE = J) = if I == J
then (ANNOTE = S)
else (ANNOTE = J)
fi .
eq replace-aux(@String{I = S},annote = J) = if I == J
then (annote = S)
else (annote = J)
fi .
eq replace-aux(@String{I = S},ANNOTE = J) = if I == J
then (ANNOTE = S)
else (ANNOTE = J)
fi .
eq replace-aux(@STRING{I = S},annote = J) = if I == J
then (annote = S)
else (annote = J)
fi .
eq replace-aux(@STRING{I = S},ANNOTE = J) = if I == J
then (ANNOTE = S)
else (ANNOTE = J)
fi .
eq replace-aux(D,author = S) = (author = S) .
eq replace-aux(D,AUTHOR = S) = (AUTHOR = S) .
eq replace-aux(@string{I = S},author = J) = if I == J
then (author = S)
else (author = J)
fi .
eq replace-aux(@string{I = S},AUTHOR = J) = if I == J
then (AUTHOR = S)
else (AUTHOR = J)
fi .
eq replace-aux(@String{I = S},author = J) = if I == J
then (author = S)
else (author = J)
fi .
eq replace-aux(@String{I = S},AUTHOR = J) = if I == J
then (AUTHOR = S)
else (AUTHOR = J)
fi .
eq replace-aux(@STRING{I = S},author = J) = if I == J
then (author = S)
else (author = J)
fi .
eq replace-aux(@STRING{I = S},AUTHOR = J) = if I == J
then (AUTHOR = S)
else (AUTHOR = J)
fi .
eq replace-aux(D,booktitle = S) = (booktitle = S) .
eq replace-aux(D,BOOKTITLE = S) = (BOOKTITLE = S) .
eq replace-aux(@string{I = S},booktitle = J) = if I == J
then (booktitle = S)
else (booktitle = J)
fi .
eq replace-aux(@string{I = S},BOOKTITLE = J) = if I == J
then (BOOKTITLE = S)
else (BOOKTITLE = J)
fi .
eq replace-aux(@String{I = S},booktitle = J) = if I == J
then (booktitle = S)
else (booktitle = J)
fi .
eq replace-aux(@String{I = S},BOOKTITLE = J) = if I == J
then (BOOKTITLE = S)
else (BOOKTITLE = J)
fi .
eq replace-aux(@STRING{I = S},booktitle = J) = if I == J
then (booktitle = S)
else (booktitle = J)
fi .
eq replace-aux(@STRING{I = S},BOOKTITLE = J) = if I == J
then (BOOKTITLE = S)
else (BOOKTITLE = J)
fi .
eq replace-aux(D,chapter = S) = (chapter = S) .
eq replace-aux(D,CHAPTER = S) = (CHAPTER = S) .
eq replace-aux(@string{I = S},chapter = J) = if I == J
then (chapter = S)
else (chapter = J)
fi .
eq replace-aux(@string{I = S},CHAPTER = J) = if I == J
then (CHAPTER = S)
else (CHAPTER = J)
fi .
eq replace-aux(@String{I = S},chapter = J) = if I == J
then (chapter = S)
else (chapter = J)
fi .
eq replace-aux(@String{I = S},CHAPTER = J) = if I == J
then (CHAPTER = S)
else (CHAPTER = J)
fi .
eq replace-aux(@STRING{I = S},chapter = J) = if I == J
then (chapter = S)
else (chapter = J)
fi .
eq replace-aux(@STRING{I = S},CHAPTER = J) = if I == J
then (CHAPTER = S)
else (CHAPTER = J)
fi .
eq replace-aux(D,crossref = S) = (crossref = S) .
eq replace-aux(D,CROSSREF = S) = (CROSSREF = S) .
eq replace-aux(@string{I = S},crossref = J) = if I == J
then (crossref = S)
else (crossref = J)
fi .
eq replace-aux(@string{I = S},CROSSREF = J) = if I == J
then (CROSSREF = S)
else (CROSSREF = J)
fi .
eq replace-aux(@String{I = S},crossref = J) = if I == J
then (crossref = S)
else (crossref = J)
fi .
eq replace-aux(@String{I = S},CROSSREF = J) = if I == J
then (CROSSREF = S)
else (CROSSREF = J)
fi .
eq replace-aux(@STRING{I = S},crossref = J) = if I == J
then (crossref = S)
else (crossref = J)
fi .
eq replace-aux(@STRING{I = S},CROSSREF = J) = if I == J
then (CROSSREF = S)
else (CROSSREF = J)
fi .
eq replace-aux(D,edition = S) = (edition = S) .
eq replace-aux(D,EDITION = S) = (EDITION = S) .
eq replace-aux(@string{I = S},edition = J) = if I == J
then (edition = S)
else (edition = J)
fi .
eq replace-aux(@string{I = S},EDITION = J) = if I == J
then (EDITION = S)
else (EDITION = J)
fi .
eq replace-aux(@String{I = S},edition = J) = if I == J
then (edition = S)
else (edition = J)
fi .
eq replace-aux(@String{I = S},EDITION = J) = if I == J
then (EDITION = S)
else (EDITION = J)
fi .
eq replace-aux(@STRING{I = S},edition = J) = if I == J
then (edition = S)
else (edition = J)
fi .
eq replace-aux(@STRING{I = S},EDITION = J) = if I == J
then (EDITION = S)
else (EDITION = J)
fi .
eq replace-aux(D,editor = S) = (editor = S) .
eq replace-aux(D,EDITOR = S) = (EDITOR = S) .
eq replace-aux(@string{I = S},editor = J) = if I == J
then (editor = S)
else (editor = J)
fi .
eq replace-aux(@string{I = S},EDITOR = J) = if I == J
then (EDITOR = S)
else (EDITOR = J)
fi .
eq replace-aux(@String{I = S},editor = J) = if I == J
then (editor = S)
else (editor = J)
fi .
eq replace-aux(@String{I = S},EDITOR = J) = if I == J
then (EDITOR = S)
else (EDITOR = J)
fi .
eq replace-aux(@STRING{I = S},editor = J) = if I == J
then (editor = S)
else (editor = J)
fi .
eq replace-aux(@STRING{I = S},EDITOR = J) = if I == J
then (EDITOR = S)
else (EDITOR = J)
fi .
eq replace-aux(D,howpublished = S) = (howpublished = S) .
eq replace-aux(D,HOWPUBLISHED = S) = (HOWPUBLISHED = S) .
eq replace-aux(@string{I = S},howpublished = J) = if I == J
then (howpublished = S)
else (howpublished = J)
fi .
eq replace-aux(@string{I = S},HOWPUBLISHED = J) = if I == J
then (HOWPUBLISHED = S)
else (HOWPUBLISHED = J)
fi .
eq replace-aux(@String{I = S},howpublished = J) = if I == J
then (howpublished = S)
else (howpublished = J)
fi .
eq replace-aux(@String{I = S},HOWPUBLISHED = J) = if I == J
then (HOWPUBLISHED = S)
else (HOWPUBLISHED = J)
fi .
eq replace-aux(@STRING{I = S},howpublished = J) = if I == J
then (howpublished = S)
else (howpublished = J)
fi .
eq replace-aux(@STRING{I = S},HOWPUBLISHED = J) = if I == J
then (HOWPUBLISHED = S)
else (HOWPUBLISHED = J)
fi .
eq replace-aux(D,institution = S) = (institution = S) .
eq replace-aux(D,INSTITUTION = S) = (INSTITUTION = S) .
eq replace-aux(@string{I = S},institution = J) = if I == J
then (institution = S)
else (institution = J)
fi .
eq replace-aux(@string{I = S},INSTITUTION = J) = if I == J
then (INSTITUTION = S)
else (INSTITUTION = J)
fi .
eq replace-aux(@String{I = S},institution = J) = if I == J
then (institution = S)
else (institution = J)
fi .
eq replace-aux(@String{I = S},INSTITUTION = J) = if I == J
then (INSTITUTION = S)
else (INSTITUTION = J)
fi .
eq replace-aux(@STRING{I = S},institution = J) = if I == J
then (institution = S)
else (institution = J)
fi .
eq replace-aux(@STRING{I = S},INSTITUTION = J) = if I == J
then (INSTITUTION = S)
else (INSTITUTION = J)
fi .
eq replace-aux(D,journal = S) = (journal = S) .
eq replace-aux(D,JOURNAL = S) = (JOURNAL = S) .
eq replace-aux(@string{I = S},journal = J) = if I == J
then (journal = S)
else (journal = J)
fi .
eq replace-aux(@string{I = S},JOURNAL = J) = if I == J
then (JOURNAL = S)
else (JOURNAL = J)
fi .
eq replace-aux(@String{I = S},journal = J) = if I == J
then (journal = S)
else (journal = J)
fi .
eq replace-aux(@String{I = S},JOURNAL = J) = if I == J
then (JOURNAL = S)
else (JOURNAL = J)
fi .
eq replace-aux(@STRING{I = S},journal = J) = if I == J
then (journal = S)
else (journal = J)
fi .
eq replace-aux(@STRING{I = S},JOURNAL = J) = if I == J
then (JOURNAL = S)
else (JOURNAL = J)
fi .
eq replace-aux(D,key = S) = (key = S) .
eq replace-aux(D,KEY = S) = (KEY = S) .
eq replace-aux(@string{I = S},key = J) = if I == J
then (key = S)
else (key = J)
fi .
eq replace-aux(@string{I = S},KEY = J) = if I == J
then (KEY = S)
else (KEY = J)
fi .
eq replace-aux(@String{I = S},key = J) = if I == J
then (key = S)
else (key = J)
fi .
eq replace-aux(@String{I = S},KEY = J) = if I == J
then (KEY = S)
else (KEY = J)
fi .
eq replace-aux(@STRING{I = S},key = J) = if I == J
then (key = S)
else (key = J)
fi .
eq replace-aux(@STRING{I = S},KEY = J) = if I == J
then (KEY = S)
else (KEY = J)
fi .
eq replace-aux(D,month = S) = (month = S) .
eq replace-aux(D,MONTH = S) = (MONTH = S) .
eq replace-aux(@string{I = S},month = J) = if I == J
then (month = S)
else (month = J)
fi .
eq replace-aux(@string{I = S},MONTH = J) = if I == J
then (MONTH = S)
else (MONTH = J)
fi .
eq replace-aux(@String{I = S},month = J) = if I == J
then (month = S)
else (month = J)
fi .
eq replace-aux(@String{I = S},MONTH = J) = if I == J
then (MONTH = S)
else (MONTH = J)
fi .
eq replace-aux(@STRING{I = S},month = J) = if I == J
then (month = S)
else (month = J)
fi .
eq replace-aux(@STRING{I = S},MONTH = J) = if I == J
then (MONTH = S)
else (MONTH = J)
fi .
eq replace-aux(D,note = S) = (note = S) .
eq replace-aux(D,NOTE = S) = (NOTE = S) .
eq replace-aux(@string{I = S},note = J) = if I == J
then (note = S)
else (note = J)
fi .
eq replace-aux(@string{I = S},NOTE = J) = if I == J
then (NOTE = S)
else (NOTE = J)
fi .
eq replace-aux(@String{I = S},note = J) = if I == J
then (note = S)
else (note = J)
fi .
eq replace-aux(@String{I = S},NOTE = J) = if I == J
then (NOTE = S)
else (NOTE = J)
fi .
eq replace-aux(@STRING{I = S},note = J) = if I == J
then (note = S)
else (note = J)
fi .
eq replace-aux(@STRING{I = S},NOTE = J) = if I == J
then (NOTE = S)
else (NOTE = J)
fi .
eq replace-aux(D,number = DT)= (number = DT).
eq replace-aux(D,NUMBER = DT) = (NUMBER = DT) .
eq replace-aux(@string{I = S},number = J) = if I == J
then (number = S)
else (number = J)
fi .
eq replace-aux(@string{I = S},NUMBER = J) = if I == J
then (NUMBER = S)
else (NUMBER = J)
fi .
eq replace-aux(@String{I = S},number = J) = if I == J
then (number = S)
else (number = J)
fi .
eq replace-aux(@String{I = S},NUMBER = J) = if I == J
then (NUMBER = S)
else (NUMBER = J)
fi .
eq replace-aux(@STRING{I = S},number = J) = if I == J
then (number = S)
else (number = J)
fi .
eq replace-aux(@STRING{I = S},NUMBER = J) = if I == J
then (NUMBER = S)
else (NUMBER = J)
fi .
eq replace-aux(D,organization = S) = (organization = S) .
eq replace-aux(D,ORGANIZATION = S) = (ORGANIZATION = S) .
eq replace-aux(@string{I = S},organization = J) = if I == J
then (organization = S)
else (organization = J)
fi .
eq replace-aux(@string{I = S},ORGANIZATION = J) = if I == J
then (ORGANIZATION = S)
else (ORGANIZATION = J)
fi .
eq replace-aux(@String{I = S},organization = J) = if I == J
then (organization = S)
else (organization = J)
fi .
eq replace-aux(@String{I = S},ORGANIZATION = J) = if I == J
then (ORGANIZATION = S)
else (ORGANIZATION = J)
fi .
eq replace-aux(@STRING{I = S},organization = J) = if I == J
then (organization = S)
else (organization = J)
fi .
eq replace-aux(@STRING{I = S},ORGANIZATION = J) = if I == J
then (ORGANIZATION = S)
else (ORGANIZATION = J)
fi .
eq replace-aux(D,pages = S) = (pages = S) .
eq replace-aux(D,PAGES = S) = (PAGES = S) .
eq replace-aux(@string{I = S},pages = J) = if I == J
then (pages = S)
else (pages = J)
fi .
eq replace-aux(@string{I = S},PAGES = J) = if I == J
then (PAGES = S)
else (PAGES = J)
fi .
eq replace-aux(@String{I = S},pages = J) = if I == J
then (pages = S)
else (pages = J)
fi .
eq replace-aux(@String{I = S},PAGES = J) = if I == J
then (PAGES = S)
else (PAGES = J)
fi .
eq replace-aux(@STRING{I = S},pages = J) = if I == J
then (pages = S)
else (pages = J)
fi .
eq replace-aux(@STRING{I = S},PAGES = J) = if I == J
then (PAGES = S)
else (PAGES = J)
fi .
eq replace-aux(D,publisher = S) = (publisher = S) .
eq replace-aux(D,PUBLISHER = S) = (PUBLISHER = S) .
eq replace-aux(@string{I = S},publisher = J) = if I == J
then (publisher = S)
else (publisher = J)
fi .
eq replace-aux(@string{I = S},PUBLISHER = J) = if I == J
then (PUBLISHER = S)
else (PUBLISHER = J)
fi .
eq replace-aux(@String{I = S},publisher = J) = if I == J
then (publisher = S)
else (publisher = J)
fi .
eq replace-aux(@String{I = S},PUBLISHER = J) = if I == J
then (PUBLISHER = S)
else (PUBLISHER = J)
fi .
eq replace-aux(@STRING{I = S},publisher = J) = if I == J
then (publisher = S)
else (publisher = J)
fi .
eq replace-aux(@STRING{I = S},PUBLISHER = J) = if I == J
then (PUBLISHER = S)
else (PUBLISHER = J)
fi .
eq replace-aux(D,school = S) = (school = S) .
eq replace-aux(D,SCHOOL = S) = (SCHOOL = S) .
eq replace-aux(@string{I = S},school = J) = if I == J
then (school = S)
else (school = J)
fi .
eq replace-aux(@string{I = S},SCHOOL = J) = if I == J
then (SCHOOL = S)
else (SCHOOL = J)
fi .
eq replace-aux(@String{I = S},school = J) = if I == J
then (school = S)
else (school = J)
fi .
eq replace-aux(@String{I = S},SCHOOL = J) = if I == J
then (SCHOOL = S)
else (SCHOOL = J)
fi .
eq replace-aux(@STRING{I = S},school = J) = if I == J
then (school = S)
else (school = J)
fi .
eq replace-aux(@STRING{I = S},SCHOOL = J) = if I == J
then (SCHOOL = S)
else (SCHOOL = J)
fi .
eq replace-aux(D,series = S) = (series = S) .
eq replace-aux(D,SERIES = S) = (SERIES = S) .
eq replace-aux(@string{I = S},series = J) = if I == J
then (series = S)
else (series = J)
fi .
eq replace-aux(@string{I = S},SERIES = J) = if I == J
then (SERIES = S)
else (SERIES = J)
fi .
eq replace-aux(@String{I = S},series = J) = if I == J
then (series = S)
else (series = J)
fi .
eq replace-aux(@String{I = S},SERIES = J) = if I == J
then (SERIES = S)
else (SERIES = J)
fi .
eq replace-aux(@STRING{I = S},series = J) = if I == J
then (series = S)
else (series = J)
fi .
eq replace-aux(@STRING{I = S},SERIES = J) = if I == J
then (SERIES = S)
else (SERIES = J)
fi .
eq replace-aux(D,title = S) = (title = S) .
eq replace-aux(D,TITLE = S) = (TITLE = S) .
eq replace-aux(@string{I = S},title = J) = if I == J
then (title = S)
else (title = J)
fi .
eq replace-aux(@string{I = S},TITLE = J) = if I == J
then (TITLE = S)
else (TITLE = J)
fi .
eq replace-aux(@String{I = S},title = J) = if I == J
then (title = S)
else (title = J)
fi .
eq replace-aux(@String{I = S},TITLE = J) = if I == J
then (TITLE = S)
else (TITLE = J)
fi .
eq replace-aux(@STRING{I = S},title = J) = if I == J
then (title = S)
else (title = J)
fi .
eq replace-aux(@STRING{I = S},TITLE = J) = if I == J
then (TITLE = S)
else (TITLE = J)
fi .
eq replace-aux(D,type = S) = (type = S) .
eq replace-aux(D,TYPE = S) = (TYPE = S) .
eq replace-aux(@string{I = S},type = J) = if I == J
then (type = S)
else (type = J)
fi .
eq replace-aux(@string{I = S},TYPE = J) = if I == J
then (TYPE = S)
else (TYPE = J)
fi .
eq replace-aux(@String{I = S},type = J) = if I == J
then (type = S)
else (type = J)
fi .
eq replace-aux(@String{I = S},TYPE = J) = if I == J
then (TYPE = S)
else (TYPE = J)
fi .
eq replace-aux(@STRING{I = S},type = J) = if I == J
then (type = S)
else (type = J)
fi .
eq replace-aux(@STRING{I = S},TYPE = J) = if I == J
then (TYPE = S)
else (TYPE = J)
fi .
eq replace-aux(D,volume = DT)= (volume = DT).
eq replace-aux(D,VOLUME = DT) = (VOLUME = DT) .
eq replace-aux(@string{I = S},volume = J) = if I == J
then (volume = S)
else (volume = J)
fi .
eq replace-aux(@string{I = S},VOLUME = J) = if I == J
then (VOLUME = S)
else (VOLUME = J)
fi .
eq replace-aux(@String{I = S},volume = J) = if I == J
then (volume = S)
else (volume = J)
fi .
eq replace-aux(@String{I = S},VOLUME = J) = if I == J
then (VOLUME = S)
else (VOLUME = J)
fi .
eq replace-aux(@STRING{I = S},volume = J) = if I == J
then (volume = S)
else (volume = J)
fi .
eq replace-aux(@STRING{I = S},VOLUME = J) = if I == J
then (VOLUME = S)
else (VOLUME = J)
fi .
eq replace-aux(D,url = S) = (url = S) .
eq replace-aux(D,URL = S) = (URL = S) .
eq replace-aux(@string{I = S},url = J) = if I == J
then (url = S)
else (url = J)
fi .
eq replace-aux(@string{I = S},URL = J) = if I == J
then (URL = S)
else (URL = J)
fi .
eq replace-aux(@String{I = S},url = J) = if I == J
then (url = S)
else (url = J)
fi .
eq replace-aux(@String{I = S},URL = J) = if I == J
then (URL = S)
else (URL = J)
fi .
eq replace-aux(@STRING{I = S},url = J) = if I == J
then (url = S)
else (url = J)
fi .
eq replace-aux(@STRING{I = S},URL = J) = if I == J
then (URL = S)
else (URL = J)
fi .
eq replace-aux(D,year = DT)= (year = DT).
eq replace-aux(D,YEAR = DT) = (YEAR = DT) .
eq replace-aux(@string{I = S},year = J) = if I == J
then (year = S)
else (year = J)
fi .
eq replace-aux(@string{I = S},YEAR = J) = if I == J
then (YEAR = S)
else (YEAR = J)
fi .
eq replace-aux(@String{I = S},year = J) = if I == J
then (year = S)
else (year = J)
fi .
eq replace-aux(@String{I = S},YEAR = J) = if I == J
then (YEAR = S)
else (YEAR = J)
fi .
eq replace-aux(@STRING{I = S},year = J) = if I == J
then (year = S)
else (year = J)
fi .
eq replace-aux(@STRING{I = S},YEAR = J) = if I == J
then (YEAR = S)
else (YEAR = J)
fi .
endfm
fmod DAML-PUBL is
protecting STRING .
protecting MACHINE-INT .
sorts Property Properties Publication-ref Publication-refs .
subsorts Property < Properties .
subsorts Publication-ref < Publication-refs .
op __ : Properties Properties -> Properties [assoc] .
op __ : Publication-refs Publication-refs -> Publication-refs [assoc] .
op _ : String Properties ->
Publication-ref .
op _ : String Properties ->
Publication-ref .
op _ : String Properties ->
Publication-ref .
op _ : String Properties ->
Publication-ref .
op _ : String Properties ->
Publication-ref .
op _ : String Properties
-> Publication-ref .
op _ : String Properties
-> Publication-ref .
op _ : String Properties ->
Publication-ref .
op _ : String Properties
-> Publication-ref .
op _ : String Properties ->
Publication-ref .
op _ : String Properties ->
Publication-ref .
op _ : String Properties ->
Publication-ref .
op _ : String Properties ->
Publication-ref .
op _ : String Properties ->
Publication-ref .
op _ : String -> Property .
op _ : String -> Property .
op _ : String -> Property .
op _ : String -> Property .
op _ : String -> Property .
op _ : String -> Property .
op _ : String -> Property .
op _ : String -> Property .
op _ : String -> Property .
op _ : String -> Property .
op _ : String -> Property .
op _ : String -> Property .
op _ : String -> Property .
op _ : String -> Property .
op _ : String -> Property .
op _ : String -> Property .
op _ : String -> Property .
op _ : String -> Property .
op _ : String -> Property .
op _ : String -> Property .
op _ : String -> Property .
op _ : String -> Property .
op _ : String -> Property .
op _ : String -> Property .
op _ : String -> Property .
op _ : String -> Property .
endfm
fmod BIBTEX2DAML is
protecting AND-CONVERSION .
protecting BIBTEX .
protecting DAML-PUBL .
op tr : RefDatabase -> Publication-refs .
op tr : Fields -> Properties .
op tr-author : Strings -> Properties .
op tr-editor : Strings -> Properties .
var I : Qid .
var S : String .
var SS : Strings .
var N : MachineInt .
var F : Field .
var FS : Fields .
var R : Reference .
var DB : RefDatabase .
eq tr(R DB) = tr(R) tr(DB) .
eq tr(@article{I,FS}) = tr(FS)
.
eq tr(@Article{I,FS}) = tr(FS)
.
eq tr(@ARTICLE{I,FS}) = tr(FS)
.
eq tr(@book{I,FS}) = tr(FS) .
eq tr(@Book{I,FS}) = tr(FS) .
eq tr(@BOOK{I,FS}) = tr(FS) .
eq tr(@booklet{I,FS}) = tr(FS)
.
eq tr(@Booklet{I,FS}) = tr(FS)
.
eq tr(@BOOKLET{I,FS}) = tr(FS)
.
eq tr(@conference{I,FS}) = tr(FS)
.
eq tr(@Conference{I,FS}) = tr(FS)
.
eq tr(@CONFERENCE{I,FS}) = tr(FS)
.
eq tr(@inbook{I,FS}) = tr(FS)
.
eq tr(@Inbook{I,FS}) = tr(FS)
.
eq tr(@INBOOK{I,FS}) = tr(FS)
.
eq tr(@incollection{I,FS}) = tr(FS)
.
eq tr(@Incollection{I,FS}) = tr(FS)
.
eq tr(@InCollection{I,FS}) = tr(FS)
.
eq tr(@INCOLLECTION{I,FS}) = tr(FS)
.
eq tr(@inproceedings{I,FS}) = tr(FS)
.
eq tr(@Inproceedings{I,FS}) = tr(FS)
.
eq tr(@InProceedings{I,FS}) = tr(FS)
.
eq tr(@INPROCEEDINGS{I,FS}) = tr(FS)
.
eq tr(@manual{I,FS}) = tr(FS)
.
eq tr(@Manual{I,FS}) = tr(FS)
.
eq tr(@MANUAL{I,FS}) = tr(FS)
.
eq tr(@masterthesis{I,FS}) = tr(FS)
.
eq tr(@Masterthesis{I,FS}) = tr(FS)
.
eq tr(@MasterThesis{I,FS}) = tr(FS)
.
eq tr(@MASTERTHESIS{I,FS}) = tr(FS)
.
eq tr(@misc{I,FS}) = tr(FS)
.
eq tr(@Misc{I,FS}) = tr(FS) .
eq tr(@MISC{I,FS}) = tr(FS) .
eq tr(@phdthesis{I,FS}) = tr(FS)
.
eq tr(@Phdthesis{I,FS}) = tr(FS)
.
eq tr(@PhdThesis{I,FS}) = tr(FS)
.
eq tr(@PHDTHESIS{I,FS}) = tr(FS)
.
eq tr(@proceedings{I,FS}) = tr(FS)
.
eq tr(@Proceedings{I,FS}) = tr(FS)
.
eq tr(@PROCEEDINGS{I,FS}) = tr(FS)
.
eq tr(@techreport{I,FS}) = tr(FS)
.
eq tr(@Techreport{I,FS}) = tr(FS)
.
eq tr(@TechReport{I,FS}) = tr(FS)
.
eq tr(@TECHREPORT{I,FS}) = tr(FS)
.
eq tr(@unpublished{I,FS}) = tr(FS)
.
eq tr(@Unpublished{I,FS}) = tr(FS)
.
eq tr(@UNPUBLISHED{I,FS}) = tr(FS)
.
eq tr(F,FS) = tr(F) tr(FS) .
eq tr(abstract = S) = S .
eq tr(ABSTRACT = S) = S .
eq tr(address = S) = S .
eq tr(ADDRESS = S) = S .
eq tr(annote = S) = S .
eq tr(ANNOTE = S) = S .
eq tr(author = S) = tr-author(and-conv(S)) .
eq tr(AUTHOR = S) = tr-author(and-conv(S)) .
eq tr(booktitle = S) = S .
eq tr(BOOKTITLE = S) = S .
eq tr(chapter = S) = S .
eq tr(CHAPTER = S) = S .
eq tr(crossref = S) = S .
eq tr(CROSSREF = S) = S .
eq tr(edition = S) = S .
eq tr(EDITION = S) = S .
eq tr(editor = S) = tr-editor(and-conv(S)) .
eq tr(EDITOR = S) = tr-editor(and-conv(S)) .
eq tr(howpublished = S) = S .
eq tr(HOWPUBLISHED = S) = S .
eq tr(institution = S) = S .
eq tr(INSTITUTION = S) = S .
eq tr(journal = S) = S .
eq tr(JOURNAL = S) = S .
eq tr(key = S) = S .
eq tr(KEY = S) = S .
eq tr(month = S) = S .
eq tr(MONTH = S) = S .
eq tr(note = S) = S .
eq tr(NOTE = S) = S .
eq tr(number = S) = S .
eq tr(NUMBER = S) = S .
eq tr(number = N) = int2string(N,10) .
eq tr(NUMBER = N) = int2string(N,10) .
eq tr(organization = S) = S .
eq tr(ORGANIZATION = S) = S .
eq tr(pages = S) = S .
eq tr(PAGES = S) = S .
eq tr(publisher = S) = S .
eq tr(PUBLISHER = S) = S .
eq tr(school = S) = S .
eq tr(SCHOOL = S) = S .
eq tr(series = S) = S .
eq tr(SERIES = S) = S .
eq tr(title = S) = S .
eq tr(TITLE = S) = S .
eq tr(type = S) = S .
eq tr(TYPE = S) = S .
eq tr(volume = S) = S .
eq tr(VOLUME = S) = S .
eq tr(volume = N) = int2string(N,10) .
eq tr(VOLUME = N) = int2string(N,10) .
eq tr(url = S) = S .
eq tr(URL = S) = S .
eq tr(year = S) = S .
eq tr(YEAR = S) = S .
eq tr(year = N) = int2string(N,10) .
eq tr(YEAR = N) = int2string(N,10) .
eq tr-author(S) = S .
eq tr-author(S @ SS) = S tr-author(SS) .
eq tr-editor(S) = S .
eq tr-editor(S @ SS) = S tr-author(SS) .
endfm