From e2a938b39ba0f99c2a033d36e1a9cbfb7bef9c6c Mon Sep 17 00:00:00 2001 From: Stefano Zacchiroli Date: Thu, 2 Feb 2006 18:11:00 +0000 Subject: [PATCH] moved some old stuff to the history --- helm/fix_params/.cvsignore | 1 - helm/fix_params/.depend | 2 - helm/fix_params/Makefile | 41 - helm/fix_params/cic2Xml.ml | 251 -- helm/fix_params/cicFindParameters.ml | 158 - helm/fix_params/fix_params.ml | 74 - helm/gTopLevel/.cvsignore | 15 - helm/gTopLevel/.depend | 42 - helm/gTopLevel/INSTALL | 12 - helm/gTopLevel/Makefile.in | 161 - helm/gTopLevel/TATTICHE | 144 - helm/gTopLevel/batchParser.ml | 90 - helm/gTopLevel/batchParser.mli | 54 - helm/gTopLevel/chosenTermEditor.ml.in | 1 - helm/gTopLevel/chosenTermEditor.mli | 23 - helm/gTopLevel/configure.ac | 82 - helm/gTopLevel/dictionary-cic.xml | 40 - helm/gTopLevel/disambiguatingParser.ml.in | 104 - helm/gTopLevel/disambiguatingParser.mli | 50 - helm/gTopLevel/esempi/and_implies_or.cic | 11 - helm/gTopLevel/esempi/and_implies_or2.cic | 8 - helm/gTopLevel/esempi/apply.cic | 21 - helm/gTopLevel/esempi/bug.cic | 22 - .../gTopLevel/esempi/calcolo_proposizioni.cic | 17 - helm/gTopLevel/esempi/conversion.cic | 17 - helm/gTopLevel/esempi/decompose.cic | 8 - helm/gTopLevel/esempi/elim.cic | 13 - helm/gTopLevel/esempi/elim2.cic | 44 - helm/gTopLevel/esempi/evars.cic | 33 - helm/gTopLevel/esempi/fourier.cic | 35 - helm/gTopLevel/esempi/fourier/fourier.cic | 137 - .../esempi/fourier/fourier_benchmarks.cic | 170 - .../esempi/fourier/fourier_make_benchmarks.ml | 61 - helm/gTopLevel/esempi/prova.cic | 16 - helm/gTopLevel/esempi/rewrite.cic | 5 - helm/gTopLevel/esempi/ring/0eq0.cic | 10 - helm/gTopLevel/esempi/ring/aliases.cic | 24 - helm/gTopLevel/esempi/ring/caso0.cic | 23 - helm/gTopLevel/esempi/ring/caso1.cic | 25 - helm/gTopLevel/esempi/ring/caso2.cic | 25 - helm/gTopLevel/esempi/ring/caso3.1.cic | 25 - helm/gTopLevel/esempi/ring/caso3.1bis.cic | 25 - helm/gTopLevel/esempi/ring/caso3.2.cic | 25 - helm/gTopLevel/esempi/ring/caso3.3.cic | 25 - .../esempi/ring/coq_overkill_helm_rulez.cic | 23 - helm/gTopLevel/esempi/ring/novarmap.cic | 13 - .../esempi/ring/novarmap_tofinish.cic | 13 - helm/gTopLevel/esempi/ring/varmap.cic | 14 - helm/gTopLevel/esempi/ring/varmap2.cic | 14 - helm/gTopLevel/esempi/ring/varmap_trivial.cic | 14 - .../gTopLevel/esempi/ring/varmap_trivial2.cic | 14 - .../gTopLevel/esempi/ring/varmap_trivial3.cic | 14 - .../ring/varmap_trivial_molte_variabili.cic | 14 - helm/gTopLevel/esempi/sets.cic | 17 - helm/gTopLevel/esempi/various.cic | 7 - helm/gTopLevel/gTopLevel.conf.xml.sample | 58 - helm/gTopLevel/gTopLevel.ml | 2879 ----------------- helm/gTopLevel/hbugs.ml | 143 - helm/gTopLevel/hbugs.mli | 57 - helm/gTopLevel/helmGtkLogger.ml | 71 - helm/gTopLevel/helmGtkLogger.mli | 31 - helm/gTopLevel/invokeTactics.ml | 359 -- helm/gTopLevel/invokeTactics.mli | 110 - helm/gTopLevel/logicalOperations.ml | 121 - helm/gTopLevel/logicalOperations.mli | 32 - helm/gTopLevel/oldDisambiguate.ml | 354 -- helm/gTopLevel/oldDisambiguate.mli | 74 - helm/gTopLevel/proofEngine.ml | 268 -- helm/gTopLevel/proofEngine.mli | 103 - helm/gTopLevel/regtest.ml | 385 --- helm/gTopLevel/rootcontent.xsl | 94 - helm/gTopLevel/script.sh.sample | 4 - helm/gTopLevel/termEditor.ml | 121 - helm/gTopLevel/termEditor.mli | 50 - helm/gTopLevel/termViewer.ml | 304 -- helm/gTopLevel/termViewer.mli | 125 - helm/gTopLevel/testlibrary.ml | 226 -- helm/gTopLevel/tests/.cvsignore | 1 - helm/gTopLevel/tests/apply00.cic | 1 - helm/gTopLevel/tests/fix00.cic | 8 - helm/gTopLevel/tests/fix00.cic.test | 222 -- helm/gTopLevel/tests/forall00.cic | 1 - helm/gTopLevel/tests/forall00.cic.test | 14 - helm/gTopLevel/tests/lambda01.cic | 2 - helm/gTopLevel/tests/lambda01.cic.test | 16 - helm/gTopLevel/tests/lambda02.cic | 1 - helm/gTopLevel/tests/lambda02.cic.test | 16 - helm/gTopLevel/tests/lambda03.cic | 3 - helm/gTopLevel/tests/lambda03.cic.test | 17 - helm/gTopLevel/tests/match00.cic | 6 - helm/gTopLevel/tests/match00.cic.test | 33 - helm/gTopLevel/tests/match01.cic | 4 - helm/gTopLevel/tests/match01.cic.test | 24 - helm/gTopLevel/tests/match02.cic | 4 - helm/gTopLevel/tests/match02.cic.test | 24 - helm/gTopLevel/tests/match03.cic | 4 - helm/gTopLevel/tests/match03.cic.test | 23 - helm/gTopLevel/tests/match04.cic | 4 - helm/gTopLevel/tests/match04.cic.test | 21 - helm/gTopLevel/tests/match05.cic | 4 - helm/gTopLevel/tests/match05.cic.test | 72 - helm/gTopLevel/tests/match06.cic | 3 - helm/gTopLevel/tests/match06.cic.test | 19 - helm/gTopLevel/tests/match07.cic | 4 - helm/gTopLevel/tests/match07.cic.test | 23 - helm/gTopLevel/texTermEditor.ml | 239 -- helm/gTopLevel/texTermEditor.mli | 51 - helm/gTopLevel/typecheck_uri.ml | 23 - helm/header/getheader.xml | 21 - helm/header/provaurl | 1 - helm/header/provaurl1 | 2 - helm/header/setheader.xsl | 33 - helm/hxp/.cvsignore | 2 - helm/hxp/.depend | 9 - helm/hxp/EXAMPLE.txt | 5 - helm/hxp/Makefile | 66 - helm/hxp/hxpLexer.mll | 56 - helm/hxp/hxpParser.mly | 56 - helm/hxp/hxpTop.ml | 345 -- helm/hxp/hxpTypes.ml | 57 - helm/hxp/hxpXML.ml | 91 - helm/hxsp/config | 47 - helm/hxsp/hxsp.pl | 1250 ------- helm/hxsp/make.pl | 17 - helm/hxsp/msg/error.en | 45 - helm/hxsp/msg/error.it | 46 - helm/hxsp/msg/message.en | 96 - helm/hxsp/msg/message.it | 96 - helm/hxsp/splitted/0.init.p.pl | 30 - helm/hxsp/splitted/1.globvars.p.pl | 95 - helm/hxsp/splitted/2.start.p.pl | 49 - helm/hxsp/splitted/3.daemon.p.pl | 131 - helm/hxsp/splitted/4.hash.p.pl | 150 - helm/hxsp/splitted/5.libxslt.p.pl | 174 - helm/hxsp/splitted/6.commands.p.pl | 215 -- helm/hxsp/splitted/7.qsparse.p.pl | 172 - helm/hxsp/splitted/8.strrep.p.pl | 76 - helm/hxsp/splitted/9.load.p.pl | 149 - helm/hxsp/tpl/ok.tpl | 5 - helm/hxsp/tpl/operror.tpl | 5 - helm/hxsp/tpl/synerror.tpl | 6 - helm/{ => mathql}/mathql_test/.cvsignore | 0 helm/{ => mathql}/mathql_test/.depend | 0 helm/{ => mathql}/mathql_test/Makefile | 0 helm/{ => mathql}/mathql_test/mQGTopLexer.mll | 0 .../{ => mathql}/mathql_test/mQGTopParser.mly | 0 helm/{ => mathql}/mathql_test/mqgtop.ml | 0 helm/{ => mathql}/mathql_test/mqitop.ml | 0 helm/{ => mathql}/mathql_test/mqtop.ml | 0 helm/minidom/.cvsignore | 23 - helm/minidom/AUTHORS | 1 - helm/minidom/COPYING | 340 -- helm/minidom/ChangeLog | 0 helm/minidom/HEADER | 24 - helm/minidom/INSTALL | 182 -- helm/minidom/Makefile.am | 42 - helm/minidom/NEWS | 0 helm/minidom/README | 0 helm/minidom/TODO | 2 - helm/minidom/acconfig.h | 36 - helm/minidom/config.guess | 1308 -------- helm/minidom/config.sub | 1417 -------- helm/minidom/configure.in | 82 - helm/minidom/debian/README.helm | 7 - helm/minidom/debian/autopippe.helm | 5 - helm/minidom/debian/changelog | 40 - helm/minidom/debian/control | 23 - helm/minidom/debian/copyright | 28 - helm/minidom/debian/debianize.helm | 97 - helm/minidom/debian/docs | 2 - helm/minidom/debian/garbage.helm | 2 - helm/minidom/debian/libminidom-dev.files | 5 - .../debian/libminidom-dev.undocumented | 1 - helm/minidom/debian/libminidom0.files | 1 - helm/minidom/debian/libminidom0.postinst | 47 - helm/minidom/debian/rules | 101 - helm/minidom/minidom-config.in | 48 - helm/minidom/minidom.c | 393 --- helm/minidom/minidom.h | 105 - helm/minidom/minidom.spec.in | 31 - helm/minidom/stamp-h.in | 1 - helm/pacchetti/Makefile | 76 - helm/xsltd/.cvsignore | 1 - helm/xsltd/AUTHORS | 1 - helm/xsltd/COPYING | 340 -- helm/xsltd/ChangeLog | 1 - helm/xsltd/Makefile.in | 16 - helm/xsltd/Makefile.old | 48 - helm/xsltd/NEWS | 1 - helm/xsltd/README | 8 - helm/xsltd/config.cache.pkg | 4 - helm/xsltd/configure.in | 92 - helm/xsltd/helm_xsltd.spec.in | 32 - helm/xsltd/start-xaland.in | 55 - helm/xsltd/xaland-cpp/xaland.cpp | 207 -- helm/xsltd/xaland-java-DOM/xaland_DOM.class | Bin 3555 -> 0 bytes helm/xsltd/xaland-java-DOM/xaland_DOM.java | 114 - helm/xsltd/xaland-java/rompi.class | Bin 732 -> 0 bytes helm/xsltd/xaland-java/rompi.java | 35 - helm/xsltd/xaland-java/sped.class | Bin 1142 -> 0 bytes helm/xsltd/xaland-java/sped.java | 51 - helm/xsltd/xaland-java/xaland.class | Bin 3509 -> 0 bytes helm/xsltd/xaland-java/xaland.java | 105 - .../xaland.java.prima_del_loro_baco | 85 - ...d.java.prima_del_loro_baco_ma_dopo_i_reset | 87 - helm/xsltd/xaland-java2/xaland2.class | Bin 3773 -> 0 bytes helm/xsltd/xaland-java2/xaland2.java | 157 - helm/xsltd/xaland-uwobo/.cvsignore | 1 - helm/xsltd/xaland-uwobo/xaland_uwobo.java | 79 - helm/xsltd/xaland.class | Bin 3509 -> 0 bytes helm/xsltd/xaland2.class | Bin 3773 -> 0 bytes helm/xsltd/xaland_DOM.class | Bin 3555 -> 0 bytes 212 files changed, 18771 deletions(-) delete mode 100644 helm/fix_params/.cvsignore delete mode 100644 helm/fix_params/.depend delete mode 100644 helm/fix_params/Makefile delete mode 100644 helm/fix_params/cic2Xml.ml delete mode 100644 helm/fix_params/cicFindParameters.ml delete mode 100644 helm/fix_params/fix_params.ml delete mode 100644 helm/gTopLevel/.cvsignore delete mode 100644 helm/gTopLevel/.depend delete mode 100644 helm/gTopLevel/INSTALL delete mode 100644 helm/gTopLevel/Makefile.in delete mode 100644 helm/gTopLevel/TATTICHE delete mode 100644 helm/gTopLevel/batchParser.ml delete mode 100644 helm/gTopLevel/batchParser.mli delete mode 100644 helm/gTopLevel/chosenTermEditor.ml.in delete mode 100644 helm/gTopLevel/chosenTermEditor.mli delete mode 100644 helm/gTopLevel/configure.ac delete mode 100644 helm/gTopLevel/dictionary-cic.xml delete mode 100644 helm/gTopLevel/disambiguatingParser.ml.in delete mode 100644 helm/gTopLevel/disambiguatingParser.mli delete mode 100644 helm/gTopLevel/esempi/and_implies_or.cic delete mode 100644 helm/gTopLevel/esempi/and_implies_or2.cic delete mode 100644 helm/gTopLevel/esempi/apply.cic delete mode 100644 helm/gTopLevel/esempi/bug.cic delete mode 100644 helm/gTopLevel/esempi/calcolo_proposizioni.cic delete mode 100644 helm/gTopLevel/esempi/conversion.cic delete mode 100644 helm/gTopLevel/esempi/decompose.cic delete mode 100644 helm/gTopLevel/esempi/elim.cic delete mode 100644 helm/gTopLevel/esempi/elim2.cic delete mode 100644 helm/gTopLevel/esempi/evars.cic delete mode 100644 helm/gTopLevel/esempi/fourier.cic delete mode 100644 helm/gTopLevel/esempi/fourier/fourier.cic delete mode 100644 helm/gTopLevel/esempi/fourier/fourier_benchmarks.cic delete mode 100644 helm/gTopLevel/esempi/fourier/fourier_make_benchmarks.ml delete mode 100644 helm/gTopLevel/esempi/prova.cic delete mode 100644 helm/gTopLevel/esempi/rewrite.cic delete mode 100644 helm/gTopLevel/esempi/ring/0eq0.cic delete mode 100644 helm/gTopLevel/esempi/ring/aliases.cic delete mode 100644 helm/gTopLevel/esempi/ring/caso0.cic delete mode 100644 helm/gTopLevel/esempi/ring/caso1.cic delete mode 100644 helm/gTopLevel/esempi/ring/caso2.cic delete mode 100644 helm/gTopLevel/esempi/ring/caso3.1.cic delete mode 100644 helm/gTopLevel/esempi/ring/caso3.1bis.cic delete mode 100644 helm/gTopLevel/esempi/ring/caso3.2.cic delete mode 100644 helm/gTopLevel/esempi/ring/caso3.3.cic delete mode 100644 helm/gTopLevel/esempi/ring/coq_overkill_helm_rulez.cic delete mode 100644 helm/gTopLevel/esempi/ring/novarmap.cic delete mode 100644 helm/gTopLevel/esempi/ring/novarmap_tofinish.cic delete mode 100644 helm/gTopLevel/esempi/ring/varmap.cic delete mode 100644 helm/gTopLevel/esempi/ring/varmap2.cic delete mode 100644 helm/gTopLevel/esempi/ring/varmap_trivial.cic delete mode 100644 helm/gTopLevel/esempi/ring/varmap_trivial2.cic delete mode 100644 helm/gTopLevel/esempi/ring/varmap_trivial3.cic delete mode 100644 helm/gTopLevel/esempi/ring/varmap_trivial_molte_variabili.cic delete mode 100644 helm/gTopLevel/esempi/sets.cic delete mode 100644 helm/gTopLevel/esempi/various.cic delete mode 100644 helm/gTopLevel/gTopLevel.conf.xml.sample delete mode 100644 helm/gTopLevel/gTopLevel.ml delete mode 100644 helm/gTopLevel/hbugs.ml delete mode 100644 helm/gTopLevel/hbugs.mli delete mode 100644 helm/gTopLevel/helmGtkLogger.ml delete mode 100644 helm/gTopLevel/helmGtkLogger.mli delete mode 100644 helm/gTopLevel/invokeTactics.ml delete mode 100644 helm/gTopLevel/invokeTactics.mli delete mode 100644 helm/gTopLevel/logicalOperations.ml delete mode 100644 helm/gTopLevel/logicalOperations.mli delete mode 100644 helm/gTopLevel/oldDisambiguate.ml delete mode 100644 helm/gTopLevel/oldDisambiguate.mli delete mode 100644 helm/gTopLevel/proofEngine.ml delete mode 100644 helm/gTopLevel/proofEngine.mli delete mode 100644 helm/gTopLevel/regtest.ml delete mode 100644 helm/gTopLevel/rootcontent.xsl delete mode 100755 helm/gTopLevel/script.sh.sample delete mode 100644 helm/gTopLevel/termEditor.ml delete mode 100644 helm/gTopLevel/termEditor.mli delete mode 100644 helm/gTopLevel/termViewer.ml delete mode 100644 helm/gTopLevel/termViewer.mli delete mode 100644 helm/gTopLevel/testlibrary.ml delete mode 100644 helm/gTopLevel/tests/.cvsignore delete mode 100644 helm/gTopLevel/tests/apply00.cic delete mode 100644 helm/gTopLevel/tests/fix00.cic delete mode 100644 helm/gTopLevel/tests/fix00.cic.test delete mode 100644 helm/gTopLevel/tests/forall00.cic delete mode 100644 helm/gTopLevel/tests/forall00.cic.test delete mode 100644 helm/gTopLevel/tests/lambda01.cic delete mode 100644 helm/gTopLevel/tests/lambda01.cic.test delete mode 100644 helm/gTopLevel/tests/lambda02.cic delete mode 100644 helm/gTopLevel/tests/lambda02.cic.test delete mode 100644 helm/gTopLevel/tests/lambda03.cic delete mode 100644 helm/gTopLevel/tests/lambda03.cic.test delete mode 100644 helm/gTopLevel/tests/match00.cic delete mode 100644 helm/gTopLevel/tests/match00.cic.test delete mode 100644 helm/gTopLevel/tests/match01.cic delete mode 100644 helm/gTopLevel/tests/match01.cic.test delete mode 100644 helm/gTopLevel/tests/match02.cic delete mode 100644 helm/gTopLevel/tests/match02.cic.test delete mode 100644 helm/gTopLevel/tests/match03.cic delete mode 100644 helm/gTopLevel/tests/match03.cic.test delete mode 100644 helm/gTopLevel/tests/match04.cic delete mode 100644 helm/gTopLevel/tests/match04.cic.test delete mode 100644 helm/gTopLevel/tests/match05.cic delete mode 100644 helm/gTopLevel/tests/match05.cic.test delete mode 100644 helm/gTopLevel/tests/match06.cic delete mode 100644 helm/gTopLevel/tests/match06.cic.test delete mode 100644 helm/gTopLevel/tests/match07.cic delete mode 100644 helm/gTopLevel/tests/match07.cic.test delete mode 100644 helm/gTopLevel/texTermEditor.ml delete mode 100644 helm/gTopLevel/texTermEditor.mli delete mode 100644 helm/gTopLevel/typecheck_uri.ml delete mode 100644 helm/header/getheader.xml delete mode 100644 helm/header/provaurl delete mode 100644 helm/header/provaurl1 delete mode 100644 helm/header/setheader.xsl delete mode 100644 helm/hxp/.cvsignore delete mode 100644 helm/hxp/.depend delete mode 100644 helm/hxp/EXAMPLE.txt delete mode 100644 helm/hxp/Makefile delete mode 100644 helm/hxp/hxpLexer.mll delete mode 100644 helm/hxp/hxpParser.mly delete mode 100644 helm/hxp/hxpTop.ml delete mode 100644 helm/hxp/hxpTypes.ml delete mode 100644 helm/hxp/hxpXML.ml delete mode 100644 helm/hxsp/config delete mode 100644 helm/hxsp/hxsp.pl delete mode 100644 helm/hxsp/make.pl delete mode 100644 helm/hxsp/msg/error.en delete mode 100644 helm/hxsp/msg/error.it delete mode 100644 helm/hxsp/msg/message.en delete mode 100644 helm/hxsp/msg/message.it delete mode 100644 helm/hxsp/splitted/0.init.p.pl delete mode 100644 helm/hxsp/splitted/1.globvars.p.pl delete mode 100644 helm/hxsp/splitted/2.start.p.pl delete mode 100644 helm/hxsp/splitted/3.daemon.p.pl delete mode 100644 helm/hxsp/splitted/4.hash.p.pl delete mode 100644 helm/hxsp/splitted/5.libxslt.p.pl delete mode 100644 helm/hxsp/splitted/6.commands.p.pl delete mode 100644 helm/hxsp/splitted/7.qsparse.p.pl delete mode 100644 helm/hxsp/splitted/8.strrep.p.pl delete mode 100644 helm/hxsp/splitted/9.load.p.pl delete mode 100644 helm/hxsp/tpl/ok.tpl delete mode 100644 helm/hxsp/tpl/operror.tpl delete mode 100644 helm/hxsp/tpl/synerror.tpl rename helm/{ => mathql}/mathql_test/.cvsignore (100%) rename helm/{ => mathql}/mathql_test/.depend (100%) rename helm/{ => mathql}/mathql_test/Makefile (100%) rename helm/{ => mathql}/mathql_test/mQGTopLexer.mll (100%) rename helm/{ => mathql}/mathql_test/mQGTopParser.mly (100%) rename helm/{ => mathql}/mathql_test/mqgtop.ml (100%) rename helm/{ => mathql}/mathql_test/mqitop.ml (100%) rename helm/{ => mathql}/mathql_test/mqtop.ml (100%) delete mode 100644 helm/minidom/.cvsignore delete mode 100644 helm/minidom/AUTHORS delete mode 100644 helm/minidom/COPYING delete mode 100644 helm/minidom/ChangeLog delete mode 100644 helm/minidom/HEADER delete mode 100644 helm/minidom/INSTALL delete mode 100644 helm/minidom/Makefile.am delete mode 100644 helm/minidom/NEWS delete mode 100644 helm/minidom/README delete mode 100644 helm/minidom/TODO delete mode 100644 helm/minidom/acconfig.h delete mode 100644 helm/minidom/config.guess delete mode 100644 helm/minidom/config.sub delete mode 100644 helm/minidom/configure.in delete mode 100644 helm/minidom/debian/README.helm delete mode 100644 helm/minidom/debian/autopippe.helm delete mode 100644 helm/minidom/debian/changelog delete mode 100644 helm/minidom/debian/control delete mode 100644 helm/minidom/debian/copyright delete mode 100755 helm/minidom/debian/debianize.helm delete mode 100644 helm/minidom/debian/docs delete mode 100644 helm/minidom/debian/garbage.helm delete mode 100644 helm/minidom/debian/libminidom-dev.files delete mode 100644 helm/minidom/debian/libminidom-dev.undocumented delete mode 100644 helm/minidom/debian/libminidom0.files delete mode 100644 helm/minidom/debian/libminidom0.postinst delete mode 100755 helm/minidom/debian/rules delete mode 100644 helm/minidom/minidom-config.in delete mode 100644 helm/minidom/minidom.c delete mode 100644 helm/minidom/minidom.h delete mode 100644 helm/minidom/minidom.spec.in delete mode 100644 helm/minidom/stamp-h.in delete mode 100644 helm/pacchetti/Makefile delete mode 100644 helm/xsltd/.cvsignore delete mode 100644 helm/xsltd/AUTHORS delete mode 100644 helm/xsltd/COPYING delete mode 100644 helm/xsltd/ChangeLog delete mode 100644 helm/xsltd/Makefile.in delete mode 100644 helm/xsltd/Makefile.old delete mode 100644 helm/xsltd/NEWS delete mode 100644 helm/xsltd/README delete mode 100644 helm/xsltd/config.cache.pkg delete mode 100644 helm/xsltd/configure.in delete mode 100644 helm/xsltd/helm_xsltd.spec.in delete mode 100755 helm/xsltd/start-xaland.in delete mode 100644 helm/xsltd/xaland-cpp/xaland.cpp delete mode 100644 helm/xsltd/xaland-java-DOM/xaland_DOM.class delete mode 100644 helm/xsltd/xaland-java-DOM/xaland_DOM.java delete mode 100644 helm/xsltd/xaland-java/rompi.class delete mode 100644 helm/xsltd/xaland-java/rompi.java delete mode 100644 helm/xsltd/xaland-java/sped.class delete mode 100644 helm/xsltd/xaland-java/sped.java delete mode 100644 helm/xsltd/xaland-java/xaland.class delete mode 100644 helm/xsltd/xaland-java/xaland.java delete mode 100644 helm/xsltd/xaland-java/xaland.java.prima_del_loro_baco delete mode 100644 helm/xsltd/xaland-java/xaland.java.prima_del_loro_baco_ma_dopo_i_reset delete mode 100644 helm/xsltd/xaland-java2/xaland2.class delete mode 100644 helm/xsltd/xaland-java2/xaland2.java delete mode 100644 helm/xsltd/xaland-uwobo/.cvsignore delete mode 100644 helm/xsltd/xaland-uwobo/xaland_uwobo.java delete mode 100644 helm/xsltd/xaland.class delete mode 100644 helm/xsltd/xaland2.class delete mode 100644 helm/xsltd/xaland_DOM.class diff --git a/helm/fix_params/.cvsignore b/helm/fix_params/.cvsignore deleted file mode 100644 index 7335d1661..000000000 --- a/helm/fix_params/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -*.cm[iox] *.o fix_params fix_params.opt diff --git a/helm/fix_params/.depend b/helm/fix_params/.depend deleted file mode 100644 index 152053f35..000000000 --- a/helm/fix_params/.depend +++ /dev/null @@ -1,2 +0,0 @@ -fix_params.cmo: cicFindParameters.cmo -fix_params.cmx: cicFindParameters.cmx diff --git a/helm/fix_params/Makefile b/helm/fix_params/Makefile deleted file mode 100644 index 92ac930bc..000000000 --- a/helm/fix_params/Makefile +++ /dev/null @@ -1,41 +0,0 @@ -REQUIRES = helm-getter helm-cic_cache helm-xml -PREDICATES = -OCAMLOPTIONS = -package "$(REQUIRES)" -predicates "$(PREDICATES)" -pp camlp4o -OCAMLDEP = ocamldep -OCAMLFIND = ocamlfind -OCAMLC = $(OCAMLFIND) ocamlc $(OCAMLOPTIONS) -OCAMLOPT = $(OCAMLFIND) ocamlopt $(OCAMLOPTIONS) - -LIBRARIES = $(shell ocamlfind query -recursive -predicates "byte $(PREDICATES)" -format "%d/%a" $(REQUIRES)) -LIBRARIES_OPT = $(shell ocamlfind query -recursive -predicates "native $(PREDICATES)" -format "%d/%a" $(REQUIRES)) - -all: fix_params -opt: fix_params.opt - -DEPOBJS = cic2Xml.ml cicFindParameters.ml fix_params.ml - -FIXPARAMSOBJS = cic2Xml.cmo cicFindParameters.cmo fix_params.cmo - -depend: - $(OCAMLDEP) $(DEPOBJS) > .depend - -fix_params: $(FIXPARAMSOBJS) $(LIBRARIES) - $(OCAMLC) -linkpkg -o fix_params $(FIXPARAMSOBJS) - -fix_params.opt: $(FIXPARAMSOBJS:.cmo=.cmx) $(LIBRARIES_OPT) - $(OCAMLOPT) -linkpkg -o fix_params.opt $(FIXPARAMSOBJS:.cmo=.cmx) - -.SUFFIXES: .ml .mli .cmo .cmi .cmx -.ml.cmo: $(LIBRARIES) - $(OCAMLC) -c $< -.mli.cmi: $(LIBRARIES) - $(OCAMLC) -c $< -.ml.cmx: $(LIBRARIES_OPT) - $(OCAMLOPT) -c $< - -clean: - rm -f *.cm[iox] *.o fix_params fix_params.opt - -.PHONY: clean - -include .depend diff --git a/helm/fix_params/cic2Xml.ml b/helm/fix_params/cic2Xml.ml deleted file mode 100644 index 0d433d64a..000000000 --- a/helm/fix_params/cic2Xml.ml +++ /dev/null @@ -1,251 +0,0 @@ - -(* Copyright (C) 2000, HELM Team. - * - * This file is part of HELM, an Hypertextual, Electronic - * Library of Mathematics, developed at the Computer Science - * Department, University of Bologna, Italy. - * - * HELM is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * HELM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with HELM; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. - * - * For details, see the HELM World-Wide-Web page, - * http://cs.unibo.it/helm/. - *) - -(*CSC codice cut & paste da cicPp e xmlcommand *) - -exception ImpossiblePossible;; -exception NotImplemented;; -let dtdname = "http://localhost:8081/getdtd?url=cic.dtd";; - -(*CSC ottimizzazione: al posto di curi cdepth (vedi codice) *) -let print_term curi = - let rec aux = - let module C = Cic in - let module X = Xml in - let module U = UriManager in - function - C.ARel (id,n,b) -> - X.xml_empty "REL" ["value",(string_of_int n);"binder",b;"id",id] - | C.AVar (id,uri) -> - let vdepth = U.depth_of_uri uri - and cdepth = U.depth_of_uri curi in - X.xml_empty "VAR" - ["relUri",(string_of_int (cdepth - vdepth)) ^ "," ^ - (U.name_of_uri uri) ; - "id",id] - | C.AMeta (id,n) -> - X.xml_empty "META" ["no",(string_of_int n) ; "id",id] - | C.ASort (id,s) -> - let string_of_sort = - function - C.Prop -> "Prop" - | C.Set -> "Set" - | C.Type -> "Type" - in - X.xml_empty "SORT" ["value",(string_of_sort s) ; "id",id] - | C.AImplicit _ -> raise NotImplemented - | C.AProd (id,C.Anonimous,s,t) -> - X.xml_nempty "PROD" ["id",id] - [< X.xml_nempty "source" [] (aux s) ; - X.xml_nempty "target" [] (aux t) - >] - | C.AProd (xid,C.Name id,s,t) -> - X.xml_nempty "PROD" ["id",xid] - [< X.xml_nempty "source" [] (aux s) ; - X.xml_nempty "target" ["binder",id] (aux t) - >] - | C.ACast (id,v,t) -> - X.xml_nempty "CAST" ["id",id] - [< X.xml_nempty "term" [] (aux v) ; - X.xml_nempty "type" [] (aux t) - >] - | C.ALambda (id,C.Anonimous,s,t) -> - X.xml_nempty "LAMBDA" ["id",id] - [< X.xml_nempty "source" [] (aux s) ; - X.xml_nempty "target" [] (aux t) - >] - | C.ALambda (xid,C.Name id,s,t) -> - X.xml_nempty "LAMBDA" ["id",xid] - [< X.xml_nempty "source" [] (aux s) ; - X.xml_nempty "target" ["binder",id] (aux t) - >] - | C.ALetIn (xid,C.Anonimous,s,t) -> - assert false (*CSC: significa che e' sbagliato il tipo di LetIn!!!*) - | C.ALetIn (xid,C.Name id,s,t) -> - X.xml_nempty "LETIN" ["id",xid] - [< X.xml_nempty "term" [] (aux s) ; - X.xml_nempty "letintarget" ["binder",id] (aux t) - >] - | C.AAppl (id,li) -> - X.xml_nempty "APPLY" ["id",id] - [< (List.fold_right (fun x i -> [< (aux x) ; i >]) li [<>]) - >] - | C.AConst (id,uri,_) -> - X.xml_empty "CONST" ["uri", (U.string_of_uri uri) ; "id",id] - | C.AMutInd (id,uri,_,i) -> - X.xml_empty "MUTIND" - ["uri", (U.string_of_uri uri) ; - "noType",(string_of_int i) ; - "id",id] - | C.AMutConstruct (id,uri,_,i,j) -> - X.xml_empty "MUTCONSTRUCT" - ["uri", (U.string_of_uri uri) ; - "noType",(string_of_int i) ; "noConstr",(string_of_int j) ; - "id",id] - | C.AMutCase (id,uri,_,typeno,ty,te,patterns) -> - X.xml_nempty "MUTCASE" - ["uriType",(U.string_of_uri uri) ; - "noType", (string_of_int typeno) ; - "id", id] - [< X.xml_nempty "patternsType" [] [< (aux ty) >] ; - X.xml_nempty "inductiveTerm" [] [< (aux te) >] ; - List.fold_right - (fun x i -> [< X.xml_nempty "pattern" [] [< aux x >] ; i>]) - patterns [<>] - >] - | C.AFix (id, no, funs) -> - X.xml_nempty "FIX" ["noFun", (string_of_int no) ; "id",id] - [< List.fold_right - (fun (fi,ai,ti,bi) i -> - [< X.xml_nempty "FixFunction" - ["name", fi; "recIndex", (string_of_int ai)] - [< X.xml_nempty "type" [] [< aux ti >] ; - X.xml_nempty "body" [] [< aux bi >] - >] ; - i - >] - ) funs [<>] - >] - | C.ACoFix (id,no,funs) -> - X.xml_nempty "COFIX" ["noFun", (string_of_int no) ; "id",id] - [< List.fold_right - (fun (fi,ti,bi) i -> - [< X.xml_nempty "CofixFunction" ["name", fi] - [< X.xml_nempty "type" [] [< aux ti >] ; - X.xml_nempty "body" [] [< aux bi >] - >] ; - i - >] - ) funs [<>] - >] - in - aux -;; - -let encode params = - List.fold_right - (fun (n,l) i -> - match l with - [] -> i - | _ -> - string_of_int n ^ ": " ^ - String.concat " " (List.map UriManager.name_of_uri l) ^ - i - ) params "" -;; - -let print_mutual_inductive_type curi (typename,inductive,arity,constructors) = - let module C = Cic in - let module X = Xml in - [< X.xml_nempty "InductiveType" - ["name",typename ; - "inductive",(string_of_bool inductive) - ] - [< X.xml_nempty "arity" [] (print_term curi arity) ; - (List.fold_right - (fun (name,ty,_) i -> - [< X.xml_nempty "Constructor" ["name",name] - (print_term curi ty) ; - i - >]) - constructors - [<>] - ) - >] - >] -;; - -let pp obj curi = - let module C = Cic in - let module X = Xml in - match obj with - C.ADefinition (xid, id, te, ty, params) -> - [< X.xml_cdata "\n" ; - X.xml_cdata ("\n\n") ; - X.xml_nempty "Definition" - (["name", id ; "id",xid] @ - match params with - C.Possible _ -> raise ImpossiblePossible - (*CSC params are kept in inverted order in the internal *) - (* representation (the order of application) *) - | C.Actual fv' -> ["params",(encode (List.rev fv'))]) - [< X.xml_nempty "body" [] (print_term curi te) ; - X.xml_nempty "type" [] (print_term curi ty) >] - >] - | C.AAxiom (xid, id, ty, params) -> - [< X.xml_cdata "\n" ; - X.xml_cdata ("\n\n") ; - X.xml_nempty "Axiom" - (*CSC params are kept in inverted order in the internal *) - (* representation (the order of application) *) - ["name",id ; "params",(encode (List.rev params)) ; "id",xid] - [< X.xml_nempty "type" [] (print_term curi ty) >] - >] - | C.AVariable (xid, name, bo, ty) -> - [< X.xml_cdata "\n" ; - X.xml_cdata ("\n\n") ; - X.xml_nempty "Variable" ["name",name ; "id",xid] - [< (match bo with - None -> [<>] - | Some bo -> X.xml_nempty "body" [] (print_term curi bo) - ) ; - X.xml_nempty "type" [] (print_term curi ty) - >] - >] - | C.ACurrentProof (xid, name, conjs, bo, ty) -> - [< X.xml_cdata "\n" ; - X.xml_cdata ("\n\n"); - X.xml_nempty "CurrentProof" ["name",name ; "id",xid] - [< List.fold_right - (fun (j,t) i -> - [< X.xml_nempty "Conjecture" ["no",(string_of_int j)] - [< print_term curi t >] ; i >]) - conjs [<>] ; - X.xml_nempty "body" [] [< print_term curi bo >] ; - X.xml_nempty "type" [] [< print_term curi ty >] - >] - >] - | C.AInductiveDefinition (xid, tys, params, paramsno) -> - let names = - List.map - (fun (typename,_,_,_) -> typename) - tys - in - [< X.xml_cdata "\n" ; - X.xml_cdata ("\n\n") ; - X.xml_nempty "InductiveDefinition" - (*CSC params are kept in inverted order in the internal *) - (* representation (the order of application) *) - ["noParams",string_of_int paramsno ; - "params",(encode (List.rev params)) ; - "id",xid] - [< List.fold_right - (fun x i -> [< print_mutual_inductive_type curi x ; i >]) - tys [< >] - >] - >] -;; diff --git a/helm/fix_params/cicFindParameters.ml b/helm/fix_params/cicFindParameters.ml deleted file mode 100644 index c78d8d219..000000000 --- a/helm/fix_params/cicFindParameters.ml +++ /dev/null @@ -1,158 +0,0 @@ -(* Copyright (C) 2000, HELM Team. - * - * This file is part of HELM, an Hypertextual, Electronic - * Library of Mathematics, developed at the Computer Science - * Department, University of Bologna, Italy. - * - * HELM is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * HELM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with HELM; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. - * - * For details, see the HELM World-Wide-Web page, - * http://cs.unibo.it/helm/. - *) - -exception WrongUriToConstant;; -exception WrongUriToInductiveDefinition;; -exception CircularDependency of string;; - -module OrderedUris = - struct - type t = UriManager.uri - let compare (s1 : t) (s2 : t) = - (* library function for = *) - compare s1 s2 - (*if s1 = s2 then 0 else if s1 < s2 then (-1) else 1*) - end -;; - -let filename_of_uri uri = - let uri' = UriManager.string_of_uri uri in - let fn = Str.replace_first (Str.regexp "cic:") Configuration.helm_dir uri' in - fn ^ ".xml" -;; - -(* quite inefficient coding of a set of strings: the only operations *) -(* performed are mem O(log n), and union O(n * log n?) *) -(* Perhaps a better implementation would be an array of bits or a map *) -(* from uri to booleans *) -module SetOfUris = Set.Make(OrderedUris);; - -let (@@) = SetOfUris.union;; - -let rec parameters_of te ty pparams= - let module S = SetOfUris in - let module C = Cic in - let rec aux = - function - C.Rel _ -> S.empty - | C.Var uri -> S.singleton uri - | C.Meta _ -> S.empty - | C.Sort _ -> S.empty - | C.Implicit -> S.empty - | C.Cast (te, ty) -> aux te @@ aux ty - | C.Prod (_, s, t) -> aux s @@ aux t - | C.Lambda (_, s, t) -> aux s @@ aux t - | C.LetIn (_, s, t) -> aux s @@ aux t - | C.Appl l -> List.fold_right (fun x i -> aux x @@ i) l S.empty - | C.Const (uri,_) -> - (* the parameters could be not exact but only possible *) - fix_params uri (Some (filename_of_uri uri)) ; - (* now the parameters are surely possible *) - (match CicCache.get_obj uri with - C.Definition (_, _, _, params) -> - List.fold_right - (fun (_,l) i -> - List.fold_right - (fun x i -> S.singleton x @@ i) l i - ) params S.empty - | C.Axiom (_, _, params) -> - List.fold_right - (fun (_,l) i -> - List.fold_right - (fun x i -> S.singleton x @@ i) l i - ) params S.empty - | C.CurrentProof _ -> S.empty (*CSC wrong *) - | _ -> raise WrongUriToConstant - ) - | C.MutInd (uri,_,_) -> - (match CicCache.get_obj uri with - C.InductiveDefinition (_, params, _) -> - List.fold_right - (fun (_,l) i -> - List.fold_right - (fun x i -> S.singleton x @@ i) l i - ) params S.empty - | _ -> raise WrongUriToInductiveDefinition - ) - | C.MutConstruct (uri,_,_,_) -> - (match CicCache.get_obj uri with - C.InductiveDefinition (_, params, _) -> - List.fold_right - (fun (_,l) i -> - List.fold_right - (fun x i -> S.singleton x @@ i) l i - ) params S.empty - | _ -> raise WrongUriToInductiveDefinition - ) - | C.MutCase (uri,_,_,outtype,term,patterns) -> - (*CSC cosa basta? Ci vuole anche uri? *) - (match CicCache.get_obj uri with - C.InductiveDefinition (_, params, _) -> - List.fold_right - (fun (_,l) i -> - List.fold_right - (fun x i -> S.singleton x @@ i) l i - ) params S.empty - | _ -> raise WrongUriToInductiveDefinition - ) @@ aux outtype @@ aux term @@ - List.fold_right (fun x i -> aux x @@ i) patterns S.empty - | C.Fix (_,fl) -> - List.fold_right - (fun (_,_,ty,bo) i -> aux ty @@ aux bo @@ i) - fl S.empty - | C.CoFix (_,fl) -> - List.fold_right - (fun (_,ty,bo) i -> aux ty @@ aux bo @@ i) - fl S.empty - in - let actual_params = aux te @@ aux ty in - (* sort_actual_params wants in input the ordered list of possible params *) - let rec sort_actual_params2 = - function - [] -> [] - | he::tl when S.mem he actual_params -> he::(sort_actual_params2 tl) - | _::tl -> sort_actual_params2 tl - in - let rec sort_actual_params = - function - [] -> [] - | (n,l)::tl -> (n, sort_actual_params2 l)::(sort_actual_params tl) - in - sort_actual_params pparams - -and fix_params uri filename = - let module C = Cic in - let ann = CicCache.get_annobj uri in - match ann with - C.ADefinition (xid, id, te, ty, C.Possible pparams) -> - let te' = Deannotate.deannotate_term te in - let ty' = Deannotate.deannotate_term ty in - let real_params = parameters_of te' ty' pparams in - let fixed = - C.ADefinition (xid,id,te,ty,C.Actual real_params) - in - Xml.pp (Cic2Xml.pp fixed uri) filename ; - | _ -> () -;; diff --git a/helm/fix_params/fix_params.ml b/helm/fix_params/fix_params.ml deleted file mode 100644 index f1edf091a..000000000 --- a/helm/fix_params/fix_params.ml +++ /dev/null @@ -1,74 +0,0 @@ -(* Copyright (C) 2000, HELM Team. - * - * This file is part of HELM, an Hypertextual, Electronic - * Library of Mathematics, developed at the Computer Science - * Department, University of Bologna, Italy. - * - * HELM is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * HELM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with HELM; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. - * - * For details, see the HELM World-Wide-Web page, - * http://cs.unibo.it/helm/. - *) - -let read_from_stdin = ref false;; - -let uri_of_filename fn = - let uri = - Str.replace_first (Str.regexp (Str.quote Configuration.helm_dir)) "cic:" fn - in - let uri' = Str.replace_first (Str.regexp "\.xml$") "" uri in - UriManager.uri_of_string uri' -;; - -let main() = - Deannotate.expect_possible_parameters := true ; - let files = ref [] in - Arg.parse - ["-stdin", Arg.Set read_from_stdin, "Read from stdin"] - (fun x -> files := (x, uri_of_filename x) :: !files) - " -usage: experiment file ... - -List of options:"; - if !read_from_stdin then - begin - try - while true do - let l = Str.split (Str.regexp " ") (read_line ()) in - List.iter (fun x -> files := (x, uri_of_filename x) :: !files) l - done - with - End_of_file -> () - end ; - files := List.rev !files; - Getter.update () ; - print_endline "ATTENTION: have you changed servers.txt so that you'll try \ - to repair your own objs instead of others'?" ; - flush stdout ; - List.iter - (function (fn, uri) -> - print_string (UriManager.string_of_uri uri) ; - flush stdout ; - (try - CicFindParameters.fix_params uri (Some fn) - with - e -> print_newline () ; flush stdout ; raise e ) ; - print_endline " OK!" ; - flush stdout - ) !files -;; - -main();; diff --git a/helm/gTopLevel/.cvsignore b/helm/gTopLevel/.cvsignore deleted file mode 100644 index ddbcaa9ee..000000000 --- a/helm/gTopLevel/.cvsignore +++ /dev/null @@ -1,15 +0,0 @@ -*.cm[aiox] *.cmxa *.[ao] -gTopLevel gTopLevel.opt -regtest regtest.opt -testlibrary testlibrary.opt -typecheck_uri typecheck_uri.opt -styles stylesheets meta_stylesheets -chosenTermEditor.ml -chosenTransformer.ml -disambiguatingParser.ml -.debug_script -autom4te.cache -config.log -config.status -configure -Makefile diff --git a/helm/gTopLevel/.depend b/helm/gTopLevel/.depend deleted file mode 100644 index d28c5220f..000000000 --- a/helm/gTopLevel/.depend +++ /dev/null @@ -1,42 +0,0 @@ -termEditor.cmi: disambiguatingParser.cmi -texTermEditor.cmi: disambiguatingParser.cmi -invokeTactics.cmi: termViewer.cmi termEditor.cmi -hbugs.cmi: invokeTactics.cmi -chosenTermEditor.cmi: disambiguatingParser.cmi -proofEngine.cmo: proofEngine.cmi -proofEngine.cmx: proofEngine.cmi -logicalOperations.cmo: proofEngine.cmi logicalOperations.cmi -logicalOperations.cmx: proofEngine.cmx logicalOperations.cmi -disambiguatingParser.cmo: disambiguatingParser.cmi -disambiguatingParser.cmx: disambiguatingParser.cmi -termEditor.cmo: disambiguatingParser.cmi termEditor.cmi -termEditor.cmx: disambiguatingParser.cmx termEditor.cmi -texTermEditor.cmo: disambiguatingParser.cmi texTermEditor.cmi -texTermEditor.cmx: disambiguatingParser.cmx texTermEditor.cmi -chosenTransformer.cmo: chosenTransformer.cmi -chosenTransformer.cmx: chosenTransformer.cmi -termViewer.cmo: logicalOperations.cmi termViewer.cmi -termViewer.cmx: logicalOperations.cmx termViewer.cmi -invokeTactics.cmo: termViewer.cmi termEditor.cmi proofEngine.cmi \ - logicalOperations.cmi invokeTactics.cmi -invokeTactics.cmx: termViewer.cmx termEditor.cmx proofEngine.cmx \ - logicalOperations.cmx invokeTactics.cmi -hbugs.cmo: proofEngine.cmi invokeTactics.cmi hbugs.cmi -hbugs.cmx: proofEngine.cmx invokeTactics.cmx hbugs.cmi -chosenTermEditor.cmo: termEditor.cmi chosenTermEditor.cmi -chosenTermEditor.cmx: termEditor.cmx chosenTermEditor.cmi -helmGtkLogger.cmo: helmGtkLogger.cmi -helmGtkLogger.cmx: helmGtkLogger.cmi -gTopLevel.cmo: termViewer.cmi termEditor.cmi proofEngine.cmi \ - logicalOperations.cmi invokeTactics.cmi helmGtkLogger.cmi hbugs.cmi \ - disambiguatingParser.cmi chosenTermEditor.cmi -gTopLevel.cmx: termViewer.cmx termEditor.cmx proofEngine.cmx \ - logicalOperations.cmx invokeTactics.cmx helmGtkLogger.cmx hbugs.cmx \ - disambiguatingParser.cmx chosenTermEditor.cmx -regtest.cmo: disambiguatingParser.cmi batchParser.cmi -regtest.cmx: disambiguatingParser.cmx batchParser.cmx -testlibrary.cmo: batchParser.cmi -testlibrary.cmx: batchParser.cmx -batchParser.cmo: disambiguatingParser.cmi batchParser.cmi -batchParser.cmx: disambiguatingParser.cmx batchParser.cmi -batchParser.cmi: disambiguatingParser.cmi diff --git a/helm/gTopLevel/INSTALL b/helm/gTopLevel/INSTALL deleted file mode 100644 index d8a8d1f8a..000000000 --- a/helm/gTopLevel/INSTALL +++ /dev/null @@ -1,12 +0,0 @@ -1) Customize script.sh. You should load script.sh before compiling or - executing gTopLevel -2) Customize gTopLevel.ml and rootcontent.xsl in order to make them communicate. -3) Check out the "stylesheets" and "meta_stylesheets" directories from the - MoWGLI CVS repository. -4) Type "make" to compile to bytecode and "make opt" to compile to nativecode. - -Enjoy! - -Note: - Every time that you upgrade stylesheets, you should "rm -rf" the styles - directory and do make again. diff --git a/helm/gTopLevel/Makefile.in b/helm/gTopLevel/Makefile.in deleted file mode 100644 index b64716cc2..000000000 --- a/helm/gTopLevel/Makefile.in +++ /dev/null @@ -1,161 +0,0 @@ -BIN_DIR = /usr/local/bin - -TEST_REQUIRES = \ - helm-registry \ - helm-tactics \ - helm-cic_transformations \ - helm-cic_textual_parser2 \ - helm-mathql_interpreter \ - helm-mathql_generator \ - helm-xmldiff \ - lablgtk2 \ - mathml-editor \ - lablgtkmathview \ - mysql - -REQUIRES = $(TEST_REQUIRES) gdome2-xslt helm-hbugs lablgtk2.init lablgtk2.glade - -OCAMLOPTIONS = \ - -package "$(REQUIRES)" -predicates "$(PREDICATES)" -pp camlp4o -thread -OCAMLFIND = @OCAMLFIND@ -OCAMLDEBUGOPTIONS = -g -OCAMLC = $(OCAMLFIND) ocamlc $(OCAMLDEBUGOPTIONS) $(OCAMLOPTIONS) -OCAMLOPT = $(OCAMLFIND) ocamlopt $(OCAMLOPTIONS) -OCAMLDEP = $(OCAMLFIND) ocamldep -pp camlp4o -OCAMLDEBUG = wowcamldebug - -LIBRARIES = $(shell $(OCAMLFIND) query -recursive -predicates "byte $(PREDICATES)" -format "%d/%a" $(REQUIRES)) -LIBRARIES_OPT = $(shell $(OCAMLFIND) query -recursive -predicates "native $(PREDICATES)" -format "%d/%a" $(REQUIRES)) -TEST_LIBRARIES = $(shell $(OCAMLFIND) query -recursive -predicates "byte $(PREDICATES)" -format "%d/%a" $(TEST_REQUIRES)) -TEST_LIBRARIES_OPT = $(shell $(OCAMLFIND) query -recursive -predicates "native $(PREDICATES)" -format "%d/%a" $(TEST_REQUIRES)) - -all: styles gTopLevel -opt: styles gTopLevel.opt - -start: - $(MAKE) -C ../hbugs/ start -stop: - $(MAKE) -C ../hbugs/ stop - -INTERFACE_FILES = \ - proofEngine.mli \ - logicalOperations.mli \ - disambiguatingParser.mli \ - termEditor.mli \ - texTermEditor.mli \ - termViewer.mli \ - invokeTactics.mli \ - hbugs.mli \ - chosenTermEditor.mli \ - helmGtkLogger.mli - -DEPOBJS = \ - $(INTERFACE_FILES) $(INTERFACE_FILES:%.mli=%.ml) \ - gTopLevel.ml regtest.ml testlibrary.ml batchParser.ml batchParser.mli - -TOPLEVELOBJS = $(INTERFACE_FILES:%.mli=%.cmo) gTopLevel.cmo -TESTOBJS = \ - disambiguatingParser.cmo \ - batchParser.cmo -REGTESTOBJS = $(TESTOBJS) regtest.cmo -TESTLIBOBJS = $(TESTOBJS) testlibrary.cmo - -$(INTERFACE_FILES:%.mli=%.cmo): $(LIBRARIES) -$(INTERFACE_FILES:%.mli=%.cmx): $(LIBRARIES_OPT) - -styles: - @echo "***********************************************************************" - @if [ -d stylesheets -a -d meta_stylesheets ] ; then echo -e "* stylesheets and metastylesheets found: *\\n* I will create the request hyperlinks in styles *" ; else echo -e "* stylesheets or meta_stylesheets not found: *\\n* you should check-out the two directories from the MoWGLI repository *" ; exit -1 ; fi - @echo "***********************************************************************" - mkdir styles - (cd styles && for i in ../stylesheets/*.xsl ; do ln -s $$i; done) - (cd styles && for i in ../stylesheets/generated/*.xsl ; do ln -s $$i; done) - (cd styles && rm rootcontent.xsl && ln -s ../rootcontent.xsl) - -depend: - $(OCAMLDEP) $(DEPOBJS) > .depend - -gTopLevel: $(TOPLEVELOBJS) $(LIBRARIES) - $(OCAMLC) -thread -linkpkg -o $@ $(TOPLEVELOBJS) -gTopLevel.opt: $(TOPLEVELOBJS:.cmo=.cmx) $(LIBRARIES_OPT) - $(OCAMLOPT) -thread -linkpkg -o $@ $(TOPLEVELOBJS:.cmo=.cmx) - -testlibrary: $(TESTLIBOBJS) $(TEST_LIBRARIES) - $(OCAMLFIND) ocamlc -thread $(OCAMLDEBUGOPTIONS) -linkpkg \ - -package "$(TEST_REQUIRES)" -o $@ $(TESTLIBOBJS) -testlibrary.opt: $(TESTLIBOBJS:.cmo=.cmx) $(TEST_LIBRARIES_OPT) - $(OCAMLFIND) ocamlopt -thread -linkpkg -package "$(TEST_REQUIRES)" -o $@ \ - $(TESTLIBOBJS:.cmo=.cmx) - -regtest: $(REGTESTOBJS) $(TEST_LIBRARIES) - $(OCAMLFIND) ocamlc -thread $(OCAMLDEBUGOPTIONS) -linkpkg \ - -package "$(TEST_REQUIRES)" -o $@ $(REGTESTOBJS) -regtest.opt: $(REGTESTOBJS:.cmo=.cmx) $(TEST_LIBRARIES_OPT) - $(OCAMLFIND) ocamlopt -thread -linkpkg -package "$(TEST_REQUIRES)" -o $@ \ - $(REGTESTOBJS:.cmo=.cmx) - -.SUFFIXES: .ml .mli .cmo .cmi .cmx -.ml.cmo: - $(OCAMLC) -c $< -.mli.cmi: - $(OCAMLC) -c $< -.ml.cmx: - $(OCAMLOPT) -c $< - -$(TOPLEVELOBJS): $(LIBRARIES) -$(TOPLEVELOBJS:.cmo=.cmx)): $(LIBRARIES_OPT) - -clean: - rm -f *.cm[iox] *.o gTopLevel{,.opt} regtest{,.opt} testlibrary{,.opt} -install: - cp gTopLevel gTopLevel.opt $(BIN_DIR) -uninstall: - rm -f $(BIN_DIR)/gTopLevel $(BIN_DIR)/gTopLevel.opt - -.PHONY: install uninstall clean test - -INTESTS := $(wildcard tests/*.cic) -OUTTESTS := $(patsubst %, %.test, $(INTESTS)) -gentest: $(OUTTESTS) -cleantest: - rm -f $(OUTTESTS) -tests/%.cic.test: tests/%.cic regtest - time ./regtest -gen $< -test: regtest - ./regtest $(INTESTS) 2> /dev/null -test.opt: regtest.opt - ./regtest.opt $(INTESTS) 2> /dev/null -envtest: regtest - ./regtest -dump $(INTESTS) 2> /dev/null -envtest.opt: regtest.opt - ./regtest.opt -dump $(INTESTS) 2> /dev/null -librarytest: testlibrary - ./testlibrary -vars -varsprefix cic:/Coq index.txt 2>/dev/null >LOG -librarytest.opt: testlibrary.opt - ./testlibrary.opt -vars -varsprefix cic:/Coq index.txt 2>/dev/null >LOG -typecheck_uri: typecheck_uri.ml - $(OCAMLFIND) ocamlc -thread -package helm-cic_proof_checking -linkpkg -o $@ $< -typecheck_uri.opt: typecheck_uri.ml - $(OCAMLFIND) opt -thread -package helm-cic_proof_checking -linkpkg -o $@ $< - -MAIN = ./gTopLevel -ARGS = -debug: - echo "load_printer \"threads.cma\"" > .debug_script - $(OCAMLFIND) query -recursive -predicates "mt,byte" -a-format \ - helm-cic_unification | \ - sed 's/\(.*\)/load_printer "\1"/' \ - >> .debug_script - echo "install_printer CicMetaSubst.fppsubst" >> .debug_script - echo "install_printer CicMetaSubst.fppterm" >> .debug_script - echo "install_printer CicMetaSubst.fppmetasenv" >> .debug_script - ledit $(OCAMLDEBUG) \ - -source .debug_script \ - -I +threads \ - $(shell $(OCAMLFIND) query -recursive -i-format $(REQUIRES)) \ - $(MAIN) $(ARGS) - -ifneq ($(MAKECMDGOALS), depend) - include .depend -endif - diff --git a/helm/gTopLevel/TATTICHE b/helm/gTopLevel/TATTICHE deleted file mode 100644 index 88d989ded..000000000 --- a/helm/gTopLevel/TATTICHE +++ /dev/null @@ -1,144 +0,0 @@ -V7.2: - -Da valutare: - * MetaLinguaggio di David Delayale per l'implementazione di tattiche - -V6.3: - -Da valutare: - * Print - * Extraction - * Opaque/Transparent - * SearchIsos - * Load di script di tattiche - * "Pretty" Parsing - * Log dei tempi per ogni possibile richiesta - * Undo - * Focus/Unfocus (nella prova completa in linguaggio naturale) - * Show Tree (resa dell'albero dei sequenti) - * Tatticali: - - OrElse - - Repeat - - Do - - Info - - Try - - First - - Solve - - Abstract - - ; - - ; [ ... | ... | ... ] - - (...) - * Assumption - * Apply with - * LApply - * Absurd - * Contradiction - * Cbv/Lazy Beta Delta Iota Zeta - * Red (riduzione di un backbone con delta della testa + beta e iota) - * Unfold (equivalente a Hnf dell'occorrenza) - * Pattern - * Constructor n / Split / Left/ Right/ Exists/ Reflexivity - * Elim term quando term ha come tipo un Pi - * ElimType (fatta da Zack; metterla disponibile) - * Induction su una applicazione - * Induction su una ipotesi - * Case su una applicazione e su una ipotesi - * Intros destrutturante - * Decompose - * Double Induction - * Rewrite (ma eliminare un'uguaglianza o applicare eq_ind_r non funziona gia'?) - * Replace (che prende due termini _NON_ convertibili e genera come goal - l'uguaglianza dei due). Unificarla con la change, che diventa la replace - non overkilling? - * Symmetry e Transitivity (basta applicare i due teoremi giusti) - * Decide Equality (ma non dovrebbe essere un teorema???) - * Compare - * Discriminate - * Injection - * Simplify_eq (== Discriminate o Injection su una ipotesi) - * Dependent Rewrite - * Inversion [Nota: Derive Inversion genera e salva il teorema!] - * Quote (per implementare tattiche riflessive senza scrivere codice ML!!!!) - * Tauto/Intuition - * Linear - * AutoRewrite - * Realizer/Program - * Scheme - * Omega - -Implementate: - * Enunciare un teorema - * (Ri)aprire un teorema gia' dimostrato per modificarne certe parti - * Check (e successiva possibilita' di applicare reduction tactics) - * Exact - * Apply/EApply - * Cut - * Change [Una conversion tactic. Problema: il termine digitato viene - parsato nel contesto della conclusione e non in quello della selezione!!!] - * Conversion tactics, sia nelle ipotesi che nella conclusione: - - Reduce (== Compute) - - Hnf - - Simpl - * Fold - * ElimIntrosSimpl - * Let...In (= LetTac) - * Salvare e caricare una prova incompleta (ma nel posto sbagliato!) - * ClearBody - * Clear - * Ring - -Da implementare: - * Implicit: quando si usano gli implicit, l'input non puo' piu' essere - type-checkato, ma bisogna fare una refine (ancora non implementata). - Di conseguenza _OGNI_ tattica si rompe. Inoltre l'implementazione di - Implicit e' ancora errata in quanto il contesto canonico delle nuove - variabili e' sempre vuoto anche se dovrebbe essere uguale a quello - di partenza + le nuove variabili introdotte durante il parsing. - * Nella type_of NON viene controllato che il metasenv di una current-proof - sia ben formato. PUNTO IMPORTANTE: farlo nel metasenv parziale, cosi' da - evitare cicli; ma dopo e' un bordello l'unificazione. Oppure fare un - semplice controllo di aciclicita'. - * ClearBody e Clear NON restringono ancora altre metavariabili. Invece viene - sollevata un'eccezione di tipaggio. Esempio: n:nat |- ?1[n] se faccio clear - di n dovrei restringere ?1. Se invece prima faccio clear di n in ?1, quando - torno su questo goal e faccio clear di n ottengo un'eccezione di CicPp. - * La reduction_tactic (in ProofEngine.ml) e' bacatissima, come descritto - nei commenti. Fixare. - * Reimplementare Cut usando LetIn + applicazione + Intro oppure usando - LetIn + ClearBody (soluzione piu' elegante IMHO) - * Refine - ? Sia [x:=t]r il tipo di [x:t]k e x non occorra mai libera in r. - Dovrei forse tornare semplicemente r? - ? Cambiare il nome delle META da int a una stringa? - [ATTENZIONE: CAMBIAMENTO NELLA DTD] - * Fold e' l'inverso di Reduce e quindi non disfa cio' che viene fatto da - Simpl e da Whd. Generalizzarlo facendo Reduce e poi Change con ogni termine? - Oppure fare una FoldWhd, una FoldHnf, una FoldSimpl, etc.? - * Fold localizzato in un termine selezionato - * Move e "Unclear" (che fa l'undo di Clear/Move e conversioni nelle ipotesi) - Non sono implementabili. Ma avrebbero senso? - * queries e roba basata sulle queries: - - Search - - Locate (anche di tipi induttivi e costruttori) - - Auto - - EAuto - - Prolog (???????????) - * Save con tanto di esportazione: esportare nel posto giusto! - * Dare una definizione (quasi equivalente a check + unfold, ma mancano - gli inner-types) - * Dare una definizione induttiva - * Intro (Come scegliere i nomi freschi?) e Intros until - * Generalize - * Fissare il bug di change (ovvero il problema del contesto in cui viene - parsato l'input dell'utente) - * Tornare un errore se si cerca di applicare una reduction tactic in una - ipotesi nella scratch area - * Field - * JProver. Che rapporto c'e' fra JProver e Tauto/Intuition? - * altre contrib da integrare? - -Da non implementare: - * Print All - * Compile/Read/Require - * Print/Save/Restore States - * Let diff --git a/helm/gTopLevel/batchParser.ml b/helm/gTopLevel/batchParser.ml deleted file mode 100644 index 8eb800b84..000000000 --- a/helm/gTopLevel/batchParser.ml +++ /dev/null @@ -1,90 +0,0 @@ -(* Copyright (C) 2004, HELM Team. - * - * This file is part of HELM, an Hypertextual, Electronic - * Library of Mathematics, developed at the Computer Science - * Department, University of Bologna, Italy. - * - * HELM is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * HELM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with HELM; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. - * - * For details, see the HELM World-Wide-Web page, - * http://helm.cs.unibo.it/ - *) - -let verbose = false - -exception Failure of string -let fail msg = raise (Failure msg) - -let constants_only ~prefix = - let test_prefix = - if prefix = "" then - (fun _ -> true) - else - (fun uri -> Pcre.pmatch ~rex:(Pcre.regexp ("^" ^ prefix)) uri) - in - fun uri -> - test_prefix uri && (not (String.sub uri (String.length uri - 4) 4 = ".var")) - -let uri_predicate = ref (constants_only ~prefix:"") - -let uri_pred_of_conf tryvars ~prefix ~varsprefix = - if not tryvars then - constants_only ~prefix - else - let test_prefix = Pcre.pmatch ~rex:(Pcre.regexp ("^" ^ prefix)) in - let test_varsprefix = Pcre.pmatch ~rex:(Pcre.regexp ("^" ^ varsprefix)) in - fun uri -> - if String.sub uri (String.length uri - 4) 4 = ".var" then - test_varsprefix uri - else - test_prefix uri - -module DisambiguateCallbacks = - struct - let interactive_user_uri_choice - ~selection_mode ?ok ?enable_button_for_non_vars ~title ~msg ~id choices = - List.filter !uri_predicate choices - - let interactive_interpretation_choice = - let rec aux n = - function - [] -> [] - | _::tl -> n::(aux (n+1) tl) - in - aux 0 - - let input_or_locate_uri ~title = fail "Unknown identifier" - end - -module Disambiguate' = DisambiguatingParser.Make (DisambiguateCallbacks) - -let parse dbd ?(uri_pred = constants_only ~prefix:"") = - uri_predicate := uri_pred; - let empty_environment = - DisambiguatingParser.EnvironmentP3.of_string - DisambiguatingParser.EnvironmentP3.empty - in - let empty_context = [] in - let empty_metasenv = [] in - fun input ugraph -> - (Disambiguate'.disambiguate_term - ~dbd empty_context empty_metasenv input empty_environment - ~initial_ugraph:ugraph) - -let parse_pp dbd ?uri_pred input ugraph = - List.map (fun (_,_,t,_) -> CicPp.ppterm t) - (parse dbd ?uri_pred input ugraph ) - diff --git a/helm/gTopLevel/batchParser.mli b/helm/gTopLevel/batchParser.mli deleted file mode 100644 index 6d2900304..000000000 --- a/helm/gTopLevel/batchParser.mli +++ /dev/null @@ -1,54 +0,0 @@ -(* Copyright (C) 2004, HELM Team. - * - * This file is part of HELM, an Hypertextual, Electronic - * Library of Mathematics, developed at the Computer Science - * Department, University of Bologna, Italy. - * - * HELM is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * HELM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with HELM; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. - * - * For details, see the HELM World-Wide-Web page, - * http://helm.cs.unibo.it/ - *) - -exception Failure of string - - (** uri_pred which rejects ll .var URIs *) -val constants_only: prefix:string -> (string -> bool) - - (** @param variables enabled - * @param variables prefix varsprefix - * @return uri predicate suitable for functions below *) -val uri_pred_of_conf: - bool -> prefix:string -> varsprefix:string -> (string -> bool) - - (** Parse a cic term from the given string using disambiguating parser in - * batch mode if possible, otherwise raises Failure above. - * uri_pred is the predicate used to select which uris are tried. Per default - * only constant URIs are accepted *) -val parse: - Mysql.dbd -> ?uri_pred:(string -> bool) -> string -> - CicUniv.universe_graph -> - (DisambiguatingParser.EnvironmentP3.t * - Cic.metasenv * - Cic.term * - CicUniv.universe_graph) list - - (** as above, but instead of returning the parsed cic term, pretty prints it - * (ignoring returned metasenv) - *) -val parse_pp: Mysql.dbd -> ?uri_pred:(string -> bool) -> - string -> CicUniv.universe_graph -> string list - diff --git a/helm/gTopLevel/chosenTermEditor.ml.in b/helm/gTopLevel/chosenTermEditor.ml.in deleted file mode 100644 index d501e8d06..000000000 --- a/helm/gTopLevel/chosenTermEditor.ml.in +++ /dev/null @@ -1 +0,0 @@ -@CHOSEN_TERM_EDITOR@ diff --git a/helm/gTopLevel/chosenTermEditor.mli b/helm/gTopLevel/chosenTermEditor.mli deleted file mode 100644 index 8a5402449..000000000 --- a/helm/gTopLevel/chosenTermEditor.mli +++ /dev/null @@ -1,23 +0,0 @@ -class type term_editor = - object - method coerce : GObj.widget - method get_as_string : string - method get_metasenv_and_term : - context:Cic.context -> - metasenv:Cic.metasenv -> Cic.metasenv * Cic.term * CicUniv.universe_graph - method environment : DisambiguatingParser.EnvironmentP3.t ref - method reset : unit - method set_term : string -> unit - end - -module Make : - functor (C : DisambiguateTypes.Callbacks) -> - sig - val term_editor : - dbd:Mysql.dbd -> - ?packing:(GObj.widget -> unit) -> - ?width:int -> - ?height:int -> - ?isnotempty_callback:(bool -> unit) -> - ?share_environment_with:term_editor -> unit -> term_editor - end diff --git a/helm/gTopLevel/configure.ac b/helm/gTopLevel/configure.ac deleted file mode 100644 index 27d1ac8df..000000000 --- a/helm/gTopLevel/configure.ac +++ /dev/null @@ -1,82 +0,0 @@ -AC_INIT(gTopLevel.ml) - -AC_CHECK_PROG(HAVE_OCAMLFIND, ocamlfind, yes, no) -if test $HAVE_OCAMLFIND = "yes"; then - OCAMLFIND="ocamlfind" -else - AC_MSG_ERROR(could not find ocamlfind) -fi -OCAMLFIND_COMMANDS="" -AC_CHECK_PROG(HAVE_OCAMLC_OPT, ocamlc.opt, yes, no) -if test $HAVE_OCAMLC_OPT = "yes"; then - if test "$OCAMLFIND_COMMANDS" = ""; then - OCAMLFIND_COMMANDS="ocamlc=ocamlc.opt" - else - OCAMLFIND_COMMANDS="$OCAMLFIND_COMMANDS ocamlc=ocamlc.opt" - fi -fi -AC_CHECK_PROG(HAVE_OCAMLOPT_OPT, ocamlopt.opt, yes, no) -if test $HAVE_OCAMLOPT_OPT = "yes"; then - if test "$OCAMLFIND_COMMANDS" = ""; then - OCAMLFIND_COMMANDS="ocamlopt=ocamlopt.opt" - else - OCAMLFIND_COMMANDS="$OCAMLFIND_COMMANDS ocamlopt=ocamlopt.opt" - fi -fi -if test "$OCAMLFIND_COMMANDS" != ""; then - OCAMLFIND="OCAMLFIND_COMMANDS='$OCAMLFIND_COMMANDS' $OCAMLFIND" -fi - - -AC_ARG_WITH(term-editor, - AS_HELP_STRING([--with-term-editor=(tex|textual)], - [choose term editor (default is tex)]), - [TERM_EDITOR=$withval], [TERM_EDITOR=textual]) -if test $TERM_EDITOR = "tex"; then - CHOSEN_TERM_EDITOR="include TexTermEditor" -else - if test $TERM_EDITOR = "textual"; then - CHOSEN_TERM_EDITOR="include TermEditor" - else - AC_MSG_ERROR(unknwon term editor $TERM_EDITOR) - fi -fi - -AC_ARG_WITH(term-parser, - AS_HELP_STRING([--with-term-parser=(cscTex|cscTextual|new)], - [choose term parser (default is new)]), - [TERM_PARSER=$withval], [TERM_PARSER=new]) -if test $TERM_PARSER = "cscTex"; then - CHOSEN_TERM_PARSER="include CSCTexDisambiguatingParser" -else - if test $TERM_PARSER = "cscTextual"; then - CHOSEN_TERM_PARSER="include CSCTextualDisambiguatingParser" - else - if test $TERM_PARSER = "new"; then - CHOSEN_TERM_PARSER="include AndreaAndZackDisambiguatingParser" - else - AC_MSG_ERROR(unknwon term parser $TERM_PARSER) - fi - fi -fi - -if test $TERM_EDITOR = "tex"; then - CHOSEN_TERM_EDITOR="include TexTermEditor" -else - if test $TERM_EDITOR = "textual"; then - CHOSEN_TERM_EDITOR="include TermEditor" - else - AC_MSG_ERROR(unknwon term editor $TERM_EDITOR) - fi -fi - -AC_SUBST(OCAMLFIND) -AC_SUBST(CHOSEN_TERM_EDITOR) -AC_SUBST(CHOSEN_TERM_PARSER) - -AC_OUTPUT([ - chosenTermEditor.ml - disambiguatingParser.ml - Makefile -]) - diff --git a/helm/gTopLevel/dictionary-cic.xml b/helm/gTopLevel/dictionary-cic.xml deleted file mode 100644 index 1d63dac83..000000000 --- a/helm/gTopLevel/dictionary-cic.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/helm/gTopLevel/disambiguatingParser.ml.in b/helm/gTopLevel/disambiguatingParser.ml.in deleted file mode 100644 index c3302c8b9..000000000 --- a/helm/gTopLevel/disambiguatingParser.ml.in +++ /dev/null @@ -1,104 +0,0 @@ -(* Copyright (C) 2004, HELM Team. - * - * This file is part of HELM, an Hypertextual, Electronic - * Library of Mathematics, developed at the Computer Science - * Department, University of Bologna, Italy. - * - * HELM is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * HELM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with HELM; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. - * - * For details, see the HELM World-Wide-Web page, - * http://helm.cs.unibo.it/ - *) - -exception NoWellTypedInterpretation - -module AndreaAndZackDisambiguatingParser = - struct - module EnvironmentP3 = CicTextualParser2.EnvironmentP3 - - module Make (C : DisambiguateTypes.Callbacks) = - struct - let disambiguate_term ~(dbd:Mysql.dbd) ~context ~metasenv - ?initial_ugraph ~aliases term_as_string - = - let module Disambiguate' = Disambiguate.Make (C) in - let term = - CicTextualParser2.parse_term (Stream.of_string term_as_string) - in - Disambiguate'.disambiguate_term ~dbd ~context ~metasenv - ?initial_ugraph ~aliases term - end - end - - -(* -module CSCTextualDisambiguatingParser = - struct - module EnvironmentP3 = OldDisambiguate.EnvironmentP3 - - module Make (C : DisambiguateTypes.Callbacks) = - struct - let - disambiguate_term mqi_handle context metasenv term_as_string environment - = - let module Disambiguate' = OldDisambiguate.Make (C) in - let name_context = - List.map - (function - Some (n,_) -> Some n - | None -> None - ) context - in - let lexbuf = Lexing.from_string term_as_string in - let dom,mk_metasenv_and_expr = - CicTextualParserContext.main - ~context:name_context ~metasenv CicTextualLexer.token lexbuf - in - Disambiguate'.disambiguate_input mqi_handle - context metasenv dom mk_metasenv_and_expr environment - end - end - -module CSCTexDisambiguatingParser = - struct - module EnvironmentP3 = OldDisambiguate.EnvironmentP3 - - module Make (C : DisambiguateTypes.Callbacks) = - struct - let - disambiguate_term mqi_handle context metasenv term_as_string environment - = - let module Disambiguate' = OldDisambiguate.Make (C) in - let name_context = - List.map - (function - Some (n,_) -> Some n - | None -> None - ) context - in - let lexbuf = Lexing.from_string term_as_string in - let dom,mk_metasenv_and_expr = - TexCicTextualParserContext.main - ~context:name_context ~metasenv TexCicTextualLexer.token lexbuf - in - Disambiguate'.disambiguate_input mqi_handle - context metasenv dom mk_metasenv_and_expr environment - end - end -*) - -@CHOSEN_TERM_PARSER@ - diff --git a/helm/gTopLevel/disambiguatingParser.mli b/helm/gTopLevel/disambiguatingParser.mli deleted file mode 100644 index 710401f4a..000000000 --- a/helm/gTopLevel/disambiguatingParser.mli +++ /dev/null @@ -1,50 +0,0 @@ -(* Copyright (C) 2004, HELM Team. - * - * This file is part of HELM, an Hypertextual, Electronic - * Library of Mathematics, developed at the Computer Science - * Department, University of Bologna, Italy. - * - * HELM is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * HELM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with HELM; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. - * - * For details, see the HELM World-Wide-Web page, - * http://helm.cs.unibo.it/ - *) - -exception NoWellTypedInterpretation - -module EnvironmentP3 : - sig - type t - val empty : string - val to_string : t -> string - val of_string : string -> t - end - -module Make (C : DisambiguateTypes.Callbacks) : - sig - val disambiguate_term : - dbd:Mysql.dbd -> - context:Cic.context -> - metasenv:Cic.metasenv -> - ?initial_ugraph:CicUniv.universe_graph -> - aliases:EnvironmentP3.t -> (* previous interpretation status *) - string -> - (EnvironmentP3.t * (* new interpretation status *) - Cic.metasenv * (* new metasenv *) - Cic.term * - CicUniv.universe_graph) list (* disambiguated term *) - end - diff --git a/helm/gTopLevel/esempi/and_implies_or.cic b/helm/gTopLevel/esempi/and_implies_or.cic deleted file mode 100644 index c47bf76b6..000000000 --- a/helm/gTopLevel/esempi/and_implies_or.cic +++ /dev/null @@ -1,11 +0,0 @@ -alias and /Coq/Init/Logic/Conjunction/and.ind#1/1 -alias conj /Coq/Init/Logic/Conjunction/and.ind#1/1/1 - -alias or /Coq/Init/Logic/Disjunction/or.ind#1/1 -alias or_introl /Coq/Init/Logic/Disjunction/or.ind#1/1/1 -alias or_intror /Coq/Init/Logic/Disjunction/or.ind#1/1/2 - -\A:Prop. -\B:Prop. -\H:(and A B). - Case (H : and ; (or A B)) { \a:A.\b:B.(or_introl A B a) } diff --git a/helm/gTopLevel/esempi/and_implies_or2.cic b/helm/gTopLevel/esempi/and_implies_or2.cic deleted file mode 100644 index 46cfb9e1b..000000000 --- a/helm/gTopLevel/esempi/and_implies_or2.cic +++ /dev/null @@ -1,8 +0,0 @@ -alias and /Coq/Init/Logic/and.ind#1/1 -alias conj /Coq/Init/Logic/and.ind#1/1/1 - -alias or /Coq/Init/Logic/or.ind#1/1 -alias or_introl /Coq/Init/Logic/or.ind#1/1/1 -alias or_intror /Coq/Init/Logic/or.ind#1/1/2 - -!A:Prop.!B:Prop.!H:(and A B).(or A B) diff --git a/helm/gTopLevel/esempi/apply.cic b/helm/gTopLevel/esempi/apply.cic deleted file mode 100644 index 902ae2fbb..000000000 --- a/helm/gTopLevel/esempi/apply.cic +++ /dev/null @@ -1,21 +0,0 @@ -alias nat /Coq/Init/Datatypes/nat.ind#1/1 -alias eq /Coq/Init/Logic/eq.ind#1/1 -alias eq_ind /Coq/Init/Logic/eq_ind.con -alias O /Coq/Init/Datatypes/nat.ind#1/1/1 -alias S /Coq/Init/Datatypes/nat.ind#1/1/2 -alias plus /Coq/Init/Peano/plus.con -alias mult /Coq/Init/Peano/mult.con -alias le /Coq/Init/Peano/le.ind#1/1 -alias lt /Coq/Init/Peano/lt.con -alias not /Coq/Init/Logic/not.con -(eq nat (\x:nat.\y:nat.O O O) (\x:nat.\y:nat.O O O)) -/Coq/Init/Logic/f_equal2.con -/Coq/Init/Logic/eq.ind#1/1/1 - -(* -(le O (S O)) -/Coq/Arith/Gt/gt_S_le.con - -(not (lt O (plus O O))) -/Coq/Arith/Lt/lt_n_n.con -*) diff --git a/helm/gTopLevel/esempi/bug.cic b/helm/gTopLevel/esempi/bug.cic deleted file mode 100644 index cab0f5ff2..000000000 --- a/helm/gTopLevel/esempi/bug.cic +++ /dev/null @@ -1,22 +0,0 @@ -alias nat /Coq/Init/Datatypes/nat.ind#1/1 -alias eqT /Coq/Init/Logic_Type/eqT.ind#1/1 -alias eq /Coq/Init/Logic/eq.ind#1/1 -alias refl_equal /Coq/Init/Logic/eq.ind#1/1/1 -alias eq_ind /Coq/Init/Logic/eq_ind.con -alias eq_ind_r /Coq/Init/Logic/eq_ind_r.con -alias O /Coq/Init/Datatypes/nat.ind#1/1/1 -alias S /Coq/Init/Datatypes/nat.ind#1/1/2 -alias plus /Coq/Init/Peano/plus.con -alias mult /Coq/Init/Peano/mult.con -alias le /Coq/Init/Peano/le.ind#1/1 -alias lt /Coq/Init/Peano/lt.con -alias not /Coq/Init/Logic/not.con -alias f_equal /Coq/Init/Logic/f_equal.con -alias le_trans /Coq/Arith/Le/le_trans.con - -alias plus_n_O /Coq/Init/Peano/plus_n_O.con - -alias or /Coq/Init/Logic/or.ind#1/1 -alias or_ind /Coq/Init/Logic/or_ind.con - -(or (eq nat O O) (eq nat O O)) -> (lt O O) diff --git a/helm/gTopLevel/esempi/calcolo_proposizioni.cic b/helm/gTopLevel/esempi/calcolo_proposizioni.cic deleted file mode 100644 index a069a8b39..000000000 --- a/helm/gTopLevel/esempi/calcolo_proposizioni.cic +++ /dev/null @@ -1,17 +0,0 @@ -alias True /Coq/Init/Logic/True.ind#1/1 -alias I /Coq/Init/Logic/True.ind#1/1/1 -alias True_ind /Coq/Init/Logic/True_ind.con - -alias False /Coq/Init/Logic/False.ind#1/1 -alias False_ind /Coq/Init/Logic/False_ind.con - -alias and /Coq/Init/Logic/and.ind#1/1 -alias conj /Coq/Init/Logic/and.ind#1/1/1 -alias and_ind /Coq/Init/Logic/and_ind.con - -alias or /Coq/Init/Logic/or.ind#1/1 -alias or_introl /Coq/Init/Logic/or.ind#1/1/1 -alias or_intror /Coq/Init/Logic/or.ind#1/1/2 -alias or_ind /Coq/Init/Logic/or_ind.con - -alias not /Coq/Init/Logic/not.con diff --git a/helm/gTopLevel/esempi/conversion.cic b/helm/gTopLevel/esempi/conversion.cic deleted file mode 100644 index 9114f3aa5..000000000 --- a/helm/gTopLevel/esempi/conversion.cic +++ /dev/null @@ -1,17 +0,0 @@ -alias nat /Coq/Init/Datatypes/nat.ind#1/1 -alias eqT /Coq/Init/Logic_Type/eqT.ind#1/1 -alias eq /Coq/Init/Logic/eq.ind#1/1 -alias refl_equal /Coq/Init/Logic/eq.ind#1/1/1 -alias eq_ind /Coq/Init/Logic/eq_ind.con -alias eq_ind_r /Coq/Init/Logic/eq_ind_r.con -alias O /Coq/Init/Datatypes/nat.ind#1/1/1 -alias S /Coq/Init/Datatypes/nat.ind#1/1/2 -alias plus /Coq/Init/Peano/plus.con -alias mult /Coq/Init/Peano/mult.con -alias le /Coq/Init/Peano/le.ind#1/1 -alias lt /Coq/Init/Peano/lt.con -alias not /Coq/Init/Logic/not.con -alias f_equal /Coq/Init/Logic/f_equal.con - -!n:nat.(eq nat (mult (S (S O)) n) O) -!n:nat.(eq nat (plus O n) (plus n O)) diff --git a/helm/gTopLevel/esempi/decompose.cic b/helm/gTopLevel/esempi/decompose.cic deleted file mode 100644 index 1a06fcba3..000000000 --- a/helm/gTopLevel/esempi/decompose.cic +++ /dev/null @@ -1,8 +0,0 @@ -!A:Prop.!B:Prop.!C:Prop.(and (sumbool A False) (and (or True B) (or B False))) -> True - -!A:Prop.!B:Prop.!C:Prop.(and (sumbool A C) (and (or A B) !D:Prop.(or B D))) -> True - -!A:Prop.!B:Prop.!C:Prop.(and (and A C) (and (and A B) (and B C))) -> True - -(and True True) -> True -(and True False) -> True diff --git a/helm/gTopLevel/esempi/elim.cic b/helm/gTopLevel/esempi/elim.cic deleted file mode 100644 index 0ef611ff7..000000000 --- a/helm/gTopLevel/esempi/elim.cic +++ /dev/null @@ -1,13 +0,0 @@ -alias nat /Coq/Init/Datatypes/nat.ind#1/1 -alias eq /Coq/Init/Logic/eq.ind#1/1 -alias eq_ind /Coq/Init/Logic/eq_ind.con -alias O /Coq/Init/Datatypes/nat.ind#1/1/1 -alias S /Coq/Init/Datatypes/nat.ind#1/1/2 -alias plus /Coq/Init/Peano/plus.con -alias mult /Coq/Init/Peano/mult.con -alias le /Coq/Init/Peano/le.ind#1/1 -alias lt /Coq/Init/Peano/lt.con -alias not /Coq/Init/Logic/not.con -alias f_equal /Coq/Init/Logic/f_equal.con - -!n:nat.(eq nat (plus O n) (plus n O)) diff --git a/helm/gTopLevel/esempi/elim2.cic b/helm/gTopLevel/esempi/elim2.cic deleted file mode 100644 index f44eba834..000000000 --- a/helm/gTopLevel/esempi/elim2.cic +++ /dev/null @@ -1,44 +0,0 @@ -alias nat /Coq/Init/Datatypes/nat.ind#1/1 -alias eq /Coq/Init/Logic/eq.ind#1/1 -alias eq_ind /Coq/Init/Logic/eq_ind.con -alias eqT /Coq/Init/Logic_Type/eqT.ind#1/1 -alias O /Coq/Init/Datatypes/nat.ind#1/1/1 -alias S /Coq/Init/Datatypes/nat.ind#1/1/2 -alias plus /Coq/Init/Peano/plus.con -alias mult /Coq/Init/Peano/mult.con -alias le /Coq/Init/Peano/le.ind#1/1 -alias lt /Coq/Init/Peano/lt.con -alias not /Coq/Init/Logic/not.con -alias and /Coq/Init/Logic/and.ind#1/1 -alias prod /Coq/Init/Datatypes/prod.ind#1/1 -alias list /Coq/Lists/PolyList/list.ind#1/1 -alias AllS_assoc /Coq/Lists/TheoryList/AllS_assoc.ind#1/1 -alias V /Coq/Lists/PolyList/Lists/A.var -alias VA /Coq/Lists/TheoryList/Lists/A.var -alias VB /Coq/Lists/TheoryList/Lists/Assoc_sec/B.var - -!A:Set.!B:Set.!P:!a:A.Prop.!l:list{V := (prod A B)}. - !H:(AllS_assoc {VA := A ; VB := B} P l). - (and - (eq list{V := (prod A B)} l l) - (eqT !n:A.Prop P P)) - -\forall A,B: Set. \forall P: A \to Prop. - \forall l: list \subst [ A \Assign (prod A B) ]. - \forall H:(AllS_assoc \subst [ A \Assign A ; B \Assign B] P l). - l = l \wedge P = P - -(* Intros; Elim H: - -?1: (A,B:Set; P:(A->Prop); l:(list A*B)) - (AllS_assoc A B P l) -> (nil A*B)=(nil A*B)/\P==P -?2: (A,B:Set; P:(A->Prop); l:(list A*B)) - (AllS_assoc A B P l) -> - (a:A; b:B; l0:(list A*B)) - (P a) -> (AllS_assoc A B P l0) -> l0=l0/\P==P -> - (cons (a,b) l0)=(cons (a,b) l0)/\P==P -[A,B:Set; P:(A->Prop); l:(list A*B); H:(AllS_assoc A B P l)] - (AllS_assoc_ind A B P [l0:(list A*B)]l0=l0/\P==P - (?1 A B P l H) (?2 A B P l H) l H) - -*) diff --git a/helm/gTopLevel/esempi/evars.cic b/helm/gTopLevel/esempi/evars.cic deleted file mode 100644 index 36ce17e2e..000000000 --- a/helm/gTopLevel/esempi/evars.cic +++ /dev/null @@ -1,33 +0,0 @@ -alias nat /Coq/Init/Datatypes/nat.ind#1/1 -alias eqT /Coq/Init/Logic_Type/eqT.ind#1/1 -alias eq /Coq/Init/Logic/eq.ind#1/1 -alias refl_equal /Coq/Init/Logic/eq.ind#1/1/1 -alias eq_ind /Coq/Init/Logic/eq_ind.con -alias eq_ind_r /Coq/Init/Logic/eq_ind_r.con -alias O /Coq/Init/Datatypes/nat.ind#1/1/1 -alias S /Coq/Init/Datatypes/nat.ind#1/1/2 -alias plus /Coq/Init/Peano/plus.con -alias mult /Coq/Init/Peano/mult.con -alias le /Coq/Init/Peano/le.ind#1/1 -alias lt /Coq/Init/Peano/lt.con -alias not /Coq/Init/Logic/not.con -alias f_equal /Coq/Init/Logic/f_equal.con -alias le_trans /Coq/Arith/Le/le_trans.con - -alias le_plus_plus /Coq/Arith/Plus/le_plus_plus.con -alias le_reg_r /Coq/Arith/Plus/le_reg_r.con -alias le_reg_l /Coq/Arith/Plus/le_reg_l.con - -alias plus_n_O /Coq/Init/Peano/plus_n_O.con - -!n:nat.!m:nat.(le n m)->(le (mult (S (S O)) n) (mult (S (S O)) m)) - -(* Lo scopo dell'esercizio e' riuscire a effettuare la dimostrazione che *) -(* (n <= m) -> (2*n <= 2*m) come la si farebbe su carta, ovvero: *) -(* *) -(* 2 * n *) -(* == n + n + 0 Simpl *) -(* <= m + n + 0 le_reg_r because n <= m because hypothesis *) -(* <= m + m + 0 le_reg_l because n + 0 <= m + 0 because le_reg_r *) -(* because hypothesis *) -(* == 2 * m Change *) diff --git a/helm/gTopLevel/esempi/fourier.cic b/helm/gTopLevel/esempi/fourier.cic deleted file mode 100644 index 09caea79b..000000000 --- a/helm/gTopLevel/esempi/fourier.cic +++ /dev/null @@ -1,35 +0,0 @@ -alias Rge /Coq/Reals/Rdefinitions/Rge.con -alias Rle /Coq/Reals/Rdefinitions/Rle.con -alias Rgt /Coq/Reals/Rdefinitions/Rgt.con -alias Rlt /Coq/Reals/Rdefinitions/Rlt.con -alias Ropp /Coq/Reals/Rdefinitions/Ropp.con -alias Rinv /Coq/Reals/Rdefinitions/Rinv.con -alias Rplus /Coq/Reals/Rdefinitions/Rplus.con -alias Rminus /Coq/Reals/Rdefinitions/Rminus.con -alias R1 /Coq/Reals/Rdefinitions/R1.con -alias R0 /Coq/Reals/Rdefinitions/R0.con -alias R /Coq/Reals/Rdefinitions/R.con -alias Eq /Coq/Init/Logic_Type/eqT.ind#1/1 - -//test base1 ok -!x:R.!y:R.(Rle x y) -> (Rge (Rplus y R1) (Rminus x R1)) - -//test base2 ok -!x:R.!y:R.(Rlt x y) -> (Rgt (Rplus y R1) (Rminus x R1)) - -//test base3 (unification fails) -!x:R.!y:R.(Rge x y) -> (Rlt (Rplus y R1) (Rplus x (Rplus R1 R1))) - -//test base4 ok -!x:R.!y:R.(Rgt x y) -> (Rle (Rminus y R1) (Rplus x R1)) - -//test base5 ok -!x:R.!y:R.(Rlt x ( Rplus y R1 ) ) -> (Rge (Rplus y (Rplus R1 R1)) (Rminus x R0)) - -//test base6 (unification fails) -!x:R.!y:R.(Eq R x y) -> (Rgt (Rplus y R1) (Rminus x R1)) - -//test base7 (should fail) ok -!x:R.!y:R.(Rlt x y) -> (Rlt (Rplus y R1) (Rminus x R1)) - - diff --git a/helm/gTopLevel/esempi/fourier/fourier.cic b/helm/gTopLevel/esempi/fourier/fourier.cic deleted file mode 100644 index 23062f3bd..000000000 --- a/helm/gTopLevel/esempi/fourier/fourier.cic +++ /dev/null @@ -1,137 +0,0 @@ -alias Rge /Coq/Reals/Rdefinitions/Rge.con -alias Rle /Coq/Reals/Rdefinitions/Rle.con -alias Rgt /Coq/Reals/Rdefinitions/Rgt.con -alias Rlt /Coq/Reals/Rdefinitions/Rlt.con -alias Ropp /Coq/Reals/Rdefinitions/Ropp.con -alias Rinv /Coq/Reals/Rdefinitions/Rinv.con -alias Rplus /Coq/Reals/Rdefinitions/Rplus.con -alias Rminus /Coq/Reals/Rdefinitions/Rminus.con -alias Rmult /Coq/Reals/Rdefinitions/Rmult.con -alias R1 /Coq/Reals/Rdefinitions/R1.con -alias R0 /Coq/Reals/Rdefinitions/R0.con -alias R /Coq/Reals/Rdefinitions/R.con -alias eqT /Coq/Init/Logic_Type/eqT.ind#1/1 -alias not /Coq/Init/Logic/not.con -alias or /Coq/Init/Logic/or.ind#1/1 - -!x:R. -(Rlt (Rmult(Ropp x)R1) -R0) -->(Rlt R0 x) - -// test 3x4 -> 35'' -!x:R.!y:R.!z:R. -(Rge -(Rplus - (Rmult (Ropp (Rplus R1 R1)) x) (Rplus - (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) y) (Rplus - (Rmult (Rplus R1 (Rplus R1 R1)) z) R1) -)) R0) --> -(Rge -(Rplus - (Rmult (Ropp (Rplus R1 (Rplus R1 R1))) x) (Rplus - (Rmult (Ropp (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) y) (Rplus - R1 (Rplus R1 R1)) -)) R0) --> -(Rgt -(Rplus - x (Rplus - (Rmult (Rplus R1 R1) y) (Ropp z) ) -) R0) --> -(Rgt -(Rplus - (Rmult (Rplus R1 (Rplus R1 R1)) x) (Rplus - z (Ropp R1)) -) R0) - --> (Rlt z R1) - -// test 6x6 -> - -!x:R.!y:R.!z:R.!t:R.!u:R.!v:R. -(Rgt -(Rplus (Ropp x) (Rplus y (Rplus z (Rplus t (Rplus u (Rplus v (Rplus R1 R1))))))) - R0) --> -(Rgt -(Rplus x (Rplus (Ropp y) (Rplus (Ropp z) (Rplus (Ropp t) (Rplus (Ropp u) (Rplus R1 R1)))))) - R0) --> -(Rgt -(Rplus y (Rplus (Ropp z) (Rplus t (Rplus u (Rplus R1 R1))))) - R0) --> -(Rgt -(Rplus y (Rplus z (Rplus (Ropp t) (Rplus (Ropp (Rmult (Rplus R1 R1)v)) (Rplus R1 R1))))) - R0) --> -(Rgt -(Rplus y (Rplus z (Rplus t (Rplus (Ropp u) (Rplus R1 R1))))) - R0) --> -(Rlt -(Rplus (Rmult (Rplus R1 R1) x) (Rplus v y)) - R0) --> (Rlt (Rmult (Rplus R1 R1) x) R0) - - - - - - -//test base1 ok -!x:R.!y:R.(Rle x y) -> (Rge (Rplus y R1) (Rminus x R1)) - -//test base2 ok -!x:R.!y:R.(Rlt x y) -> (Rgt (Rplus y R1) (Rminus x R1)) - -//test base3 ok -!x:R.!y:R.(Rge x y) -> (Rlt (Rplus y R1) (Rplus x (Rplus R1 R1))) - -/Coq/fourier/Fourier_util/Rfourier_not_ge_lt.con - -intros - -/Coq/Init/Logic/False.ind#1/1 - -(not (Rle (Rplus (Rmult (Rmult R1 (Rinv R1)) (Rplus x (Rplus R1 R1))) (Rmult (Rmult R1 (Rinv R1)) y)) (Rplus (Rmult (Rmult R1 (Rinv R1)) (Rplus y R1)) (Rmult (Rmult R1 (Rinv R1)) x)))) - -/Coq/fourier/Fourier_util/Rnot_le_le.con - -t1=(Rplus (Rmult (Rmult R1 (Rinv R1)) (Rplus x (Rplus R1 R1))) (Rmult (Rmult R1 (Rinv R1)) y)) - -t2=(Rplus (Rmult (Rmult R1 (Rinv R1)) (Rplus y R1)) (Rmult (Rmult R1 (Rinv R1)) x)) - -(t1-t2)=(Rminus -(Rplus (Rmult (Rmult R1 (Rinv R1)) (Rplus x (Rplus R1 R1))) (Rmult (Rmult R1 (Rinv R1)) y)) -(Rplus (Rmult (Rmult R1 (Rinv R1)) (Rplus y R1)) (Rmult (Rmult R1 (Rinv R1)) x))) - -tc=(Rmult (Ropp R1) (Rinv R1)) - -rewrite=(eqT R (Rminus (Rplus (Rmult (Rmult R1 (Rinv R1)) (Rplus y R1)) (Rmult (Rmult R1 (Rinv R1)) x)) - (Rplus (Rmult (Rmult R1 (Rinv R1)) (Rplus x (Rplus R1 R1))) (Rmult (Rmult R1 (Rinv R1)) y))) (Rmult (Ropp R1) (Rinv R1))) - -change=(not (or -(Rlt R0 (Rmult (Ropp R1) (Rinv R1))) -(eqT R R0 (Rmult (Ropp R1) (Rinv R1))) -)) - -tac2 -/Coq/fourier/Fourier_util/Rnot_lt0.con - -//test base4 ok -!x:R.!y:R.(Rgt x y) -> (Rle (Rminus y R1) (Rplus x R1)) - -//test base5 ok -!x:R.!y:R.(Rlt x ( Rplus y R1 ) ) -> (Rge (Rplus y (Rplus R1 R1)) (Rminus x R0)) - -//test base6 ok -!x:R.!y:R.(eqT R x y) -> (Rgt (Rplus y R1) (Rminus x R1)) - -//test base7 (should fail) ok -!x:R.!y:R.(Rlt x y) -> (Rlt (Rplus y R1) (Rminus x R1)) - - diff --git a/helm/gTopLevel/esempi/fourier/fourier_benchmarks.cic b/helm/gTopLevel/esempi/fourier/fourier_benchmarks.cic deleted file mode 100644 index 68166c149..000000000 --- a/helm/gTopLevel/esempi/fourier/fourier_benchmarks.cic +++ /dev/null @@ -1,170 +0,0 @@ -!x:R.!y:R.!z:R.!t:R. -(Rle (Rplus (Rmult R0 x) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) y) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) z) (Rplus (Rmult R1 t) (Ropp R1))))) R0) --> -(Rle (Rplus (Rmult R1 x) (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) y) (Rplus (Rmult R0 z) (Rplus (Rmult (Rplus R1 R1) t) (Ropp R1))))) R0) --> -(Rle (Rplus (Rmult R0 x) (Rplus (Rmult (Rplus R1 R1) y) (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))) z) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) t) (Ropp R1))))) R0) --> -(Rle (Rplus (Rmult R1 x) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) y) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) z) (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) t) (Ropp R1))))) R0) --> -(Rle (Rplus (Rmult R1 x) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) y) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) z) (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) t) (Ropp R1))))) R0) - -[1'02'' 363K m=5 n=4 K=8] - ------------------------------------------------------------------------------------------------------------- -!x:R.!y:R.!z:R.!t:R.!u:R.!v:R. -(Rle (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))) x) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) y) (Rplus (Rmult (Rplus R1 R1) z) (Rplus (Rmult (Rplus R1 R1) t) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) u) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) v) (Ropp R1))))))) R0) --> -(Rle (Rplus (Rmult R1 x) (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 R1))) y) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) z) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) t) (Rplus (Rmult R1 u) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) v) (Ropp R1))))))) R0) --> -(Rle (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) x) (Rplus (Rmult R0 y) (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) z) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) t) (Rplus (Rmult (Rplus R1 R1) u) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) v) (Ropp R1))))))) R0) --> -(Rle (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) x) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) y) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) z) (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))) t) (Rplus (Rmult R0 u) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) v) (Ropp R1))))))) R0) --> -(Rle (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) x) (Rplus (Rmult R0 y) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) z) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) t) (Rplus (Rmult (Ropp (Rplus R1 R1)) u) (Rplus (Rmult R1 v) (Ropp R1))))))) R0) --> -(Rle (Rplus (Rmult (Rplus R1 R1) x) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) y) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) z) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) t) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) u) (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 (Rplus R1 R1)))) v) (Ropp R1))))))) R0) --> -(Rle (Rplus (Rmult (Rplus R1 R1) x) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) y) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) z) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) t) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) u) (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 (Rplus R1 R1)))) v) (Ropp R1))))))) R0) - -[1'25'' 501K m=7 n=6 K=8] - ------------------------------------------------------------------------------------------------------------ -!x:R.!y:R.!z:R.!t:R.!u:R.!v:R.!w:R.!g:R.!h:R.!j:R. -(Rle (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) x) (Rplus (Rmult R1 y) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) z) (Rplus (Rmult R1 t) (Rplus (Rmult (Rplus R1 R1) u) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) v) (Rplus (Rmult R0 w) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) g) (Rplus (Rmult R0 h) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) j) (Ropp R1))))))))))) R0) --> -(Rle (Rplus (Rmult (Rplus R1 R1) x) (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 R1))) y) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) z) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) t) (Rplus (Rmult R0 u) (Rplus (Rmult R0 v) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) w) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) g) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) h) (Rplus (Rmult (Rplus R1 R1) j) (Ropp R1))))))))))) R0) --> -(Rle (Rplus (Rmult R1 x) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) y) (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))) z) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) t) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) u) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) v) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) w) (Rplus (Rmult R0 g) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) h) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) j) (Ropp R1))))))))))) R0) --> -(Rle (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) x) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) y) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) z) (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))) t) (Rplus (Rmult R0 u) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) v) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) w) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) g) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) h) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) j) (Ropp R1))))))))))) R0) --> -(Rle (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) x) (Rplus (Rmult R0 y) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) z) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) t) (Rplus (Rmult R0 u) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) v) (Rplus (Rmult R1 w) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) g) (Rplus (Rmult R0 h) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) j) (Ropp R1))))))))))) R0) --> -(Rle (Rplus (Rmult R1 x) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) y) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) z) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) t) (Rplus (Rmult R0 u) (Rplus (Rmult (Ropp R1) v) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) w) (Rplus (Rmult R0 g) (Rplus (Rmult R1 h) (Rplus (Rmult R1 j) (Ropp R1))))))))))) R0) --> -(Rle (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) x) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) y) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) z) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) t) (Rplus (Rmult (Rplus R1 R1) u) (Rplus (Rmult (Rplus R1 R1) v) (Rplus (Rmult (Ropp (Rplus R1 R1)) w) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) g) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) h) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) j) (Ropp R1))))))))))) R0) --> -(Rle (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) x) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) y) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) z) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) t) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) u) (Rplus (Rmult R0 v) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) w) (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))) g) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) h) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) j) (Ropp R1))))))))))) R0) --> -(Rle (Rplus (Rmult (Rplus R1 R1) x) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) y) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) z) (Rplus (Rmult R1 t) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) u) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) v) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) w) (Rplus (Rmult (Rplus R1 R1) g) (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) h) (Rplus (Rmult R1 j) (Ropp R1))))))))))) R0) --> -(Rle (Rplus (Rmult R0 x) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) y) (Rplus (Rmult R1 z) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) t) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) u) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) v) (Rplus (Rmult R1 w) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) g) (Rplus (Rmult (Rplus R1 R1) h) (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 R1))) j) (Ropp R1))))))))))) R0) --> -(Rle (Rplus (Rmult R0 x) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) y) (Rplus (Rmult R1 z) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) t) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) u) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) v) (Rplus (Rmult R1 w) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) g) (Rplus (Rmult (Rplus R1 R1) h) (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 R1))) j) (Ropp R1))))))))))) R0) - -[1'50'' 787K m=11 n=10 K=8] - -------------------------------------------------------------------------------------------------------- - -!x:R.!y:R.!z:R.!t:R.!u:R.!v:R.!w:R.!g:R.!h:R.!j:R.!l:R.!m:R.!n:R.!o:R.!p:R.!q:R.!r:R.!s:R.!a:R.!b:R. -(Rle (Rplus (Rmult (Ropp (Rplus R1 R1)) x) (Rplus (Rmult R0 y) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) z) (Rplus (Rmult R0 t) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) u) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) v) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) w) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) g) (Rplus (Rmult R1 h) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) j) (Rplus (Rmult R1 l) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) m) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) n) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) o) (Rplus (Rmult R1 p) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) q) (Rplus (Rmult (Rplus R1 R1) r) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) s) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) a) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) b) (Ropp R1))))))))))))))))))))) R0) --> -(Rle (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) x) (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) y) (Rplus (Rmult (Rplus R1 R1) z) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) t) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) u) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) v) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) w) (Rplus (Rmult (Rplus R1 R1) g) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) h) (Rplus (Rmult (Rplus R1 R1) j) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) l) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) m) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) n) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) o) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) p) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) q) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) r) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) s) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) a) (Rplus (Rmult R0 b) (Ropp R1))))))))))))))))))))) R0) --> -(Rle (Rplus (Rmult R1 x) (Rplus (Rmult R1 y) (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) z) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) t) (Rplus (Rmult R1 u) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) v) (Rplus (Rmult R0 w) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) g) (Rplus (Rmult R0 h) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) j) (Rplus (Rmult (Rplus R1 R1) l) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) m) (Rplus (Rmult R1 n) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) o) (Rplus (Rmult R1 p) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) q) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) r) (Rplus (Rmult R0 s) (Rplus (Rmult (Rplus R1 R1) a) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) b) (Ropp R1))))))))))))))))))))) R0) --> -(Rle (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) x) (Rplus (Rmult R1 y) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) z) (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) t) (Rplus (Rmult (Rplus R1 R1) u) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) v) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) w) (Rplus (Rmult R0 g) (Rplus (Rmult (Rplus R1 R1) h) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) j) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) l) (Rplus (Rmult (Rplus R1 R1) m) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) n) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) o) (Rplus (Rmult R0 p) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) q) (Rplus (Rmult R1 r) (Rplus (Rmult R1 s) (Rplus (Rmult R0 a) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) b) (Ropp R1))))))))))))))))))))) R0) --> -(Rle (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) x) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) y) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) z) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) t) (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) u) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) v) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) w) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) g) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) h) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) j) (Rplus (Rmult R1 l) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) m) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) n) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) o) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) p) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) q) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) r) (Rplus (Rmult R0 s) (Rplus (Rmult (Rplus R1 R1) a) (Rplus (Rmult (Rplus R1 R1) b) (Ropp R1))))))))))))))))))))) R0) --> -(Rle (Rplus (Rmult R1 x) (Rplus (Rmult (Rplus R1 R1) y) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) z) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) t) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) u) (Rplus (Rmult (Ropp R1) v) (Rplus (Rmult (Rplus R1 R1) w) (Rplus (Rmult R1 g) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) h) (Rplus (Rmult R1 j) (Rplus (Rmult (Rplus R1 R1) l) (Rplus (Rmult R0 m) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) n) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) o) (Rplus (Rmult (Rplus R1 R1) p) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) q) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) r) (Rplus (Rmult (Rplus R1 R1) s) (Rplus (Rmult (Rplus R1 R1) a) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) b) (Ropp R1))))))))))))))))))))) R0) --> -(Rle (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) x) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) y) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) z) (Rplus (Rmult R1 t) (Rplus (Rmult R1 u) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) v) (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) w) (Rplus (Rmult R1 g) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) h) (Rplus (Rmult R1 j) (Rplus (Rmult R1 l) (Rplus (Rmult (Rplus R1 R1) m) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) n) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) o) (Rplus (Rmult R1 p) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) q) (Rplus (Rmult R0 r) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) s) (Rplus (Rmult R0 a) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) b) (Ropp R1))))))))))))))))))))) R0) --> -(Rle (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) x) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) y) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) z) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) t) (Rplus (Rmult (Rplus R1 R1) u) (Rplus (Rmult (Rplus R1 R1) v) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) w) (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 (Rplus R1 R1)))) g) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) h) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) j) (Rplus (Rmult R0 l) (Rplus (Rmult R1 m) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) n) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) o) (Rplus (Rmult (Rplus R1 R1) p) (Rplus (Rmult (Rplus R1 R1) q) (Rplus (Rmult R0 r) (Rplus (Rmult R1 s) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) a) (Rplus (Rmult R1 b) (Ropp R1))))))))))))))))))))) R0) --> -(Rle (Rplus (Rmult (Rplus R1 R1) x) (Rplus (Rmult (Rplus R1 R1) y) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) z) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) t) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) u) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) v) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) w) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) g) (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 (Rplus R1 R1)))) h) (Rplus (Rmult R1 j) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) l) (Rplus (Rmult R1 m) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) n) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) o) (Rplus (Rmult R0 p) (Rplus (Rmult R0 q) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) r) (Rplus (Rmult R0 s) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) a) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) b) (Ropp R1))))))))))))))))))))) R0) --> -(Rle (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) x) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) y) (Rplus (Rmult (Rplus R1 R1) z) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) t) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) u) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) v) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) w) (Rplus (Rmult (Rplus R1 R1) g) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) h) (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))) j) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) l) (Rplus (Rmult R1 m) (Rplus (Rmult R0 n) (Rplus (Rmult (Rplus R1 R1) o) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) p) (Rplus (Rmult (Rplus R1 R1) q) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) r) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) s) (Rplus (Rmult R0 a) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) b) (Ropp R1))))))))))))))))))))) R0) --> -(Rle (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) x) (Rplus (Rmult R0 y) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) z) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) t) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) u) (Rplus (Rmult R0 v) (Rplus (Rmult R1 w) (Rplus (Rmult R0 g) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) h) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) j) (Rplus (Rmult R0 l) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) m) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) n) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) o) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) p) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) q) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) r) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) s) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) a) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) b) (Ropp R1))))))))))))))))))))) R0) --> -(Rle (Rplus (Rmult R1 x) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) y) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) z) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) t) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) u) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) v) (Rplus (Rmult (Rplus R1 R1) w) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) g) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) h) (Rplus (Rmult R0 j) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) l) (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))) m) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) n) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) o) (Rplus (Rmult R0 p) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) q) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) r) (Rplus (Rmult (Rplus R1 R1) s) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) a) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) b) (Ropp R1))))))))))))))))))))) R0) --> -(Rle (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) x) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) y) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) z) (Rplus (Rmult (Rplus R1 R1) t) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) u) (Rplus (Rmult (Rplus R1 R1) v) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) w) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) g) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) h) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) j) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) l) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) m) (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) n) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) o) (Rplus (Rmult R0 p) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) q) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) r) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) s) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) a) (Rplus (Rmult R1 b) (Ropp R1))))))))))))))))))))) R0) --> -(Rle (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) x) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) y) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) z) (Rplus (Rmult (Rplus R1 R1) t) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) u) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) v) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) w) (Rplus (Rmult R0 g) (Rplus (Rmult R1 h) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) j) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) l) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) m) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) n) (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 (Rplus R1 R1)))) o) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) p) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) q) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) r) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) s) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) a) (Rplus (Rmult R1 b) (Ropp R1))))))))))))))))))))) R0) --> -(Rle (Rplus (Rmult R1 x) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) y) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) z) (Rplus (Rmult (Rplus R1 R1) t) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) u) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) v) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) w) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) g) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) h) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) j) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) l) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) m) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) n) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) o) (Rplus (Rmult (Ropp R1) p) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) q) (Rplus (Rmult (Rplus R1 R1) r) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) s) (Rplus (Rmult R1 a) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) b) (Ropp R1))))))))))))))))))))) R0) --> -(Rle (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) x) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) y) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) z) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) t) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) u) (Rplus (Rmult R0 v) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) w) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) g) (Rplus (Rmult (Rplus R1 R1) h) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) j) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) l) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) m) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) n) (Rplus (Rmult R0 o) (Rplus (Rmult (Rplus R1 R1) p) (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 (Rplus R1 R1)))) q) (Rplus (Rmult R1 r) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) s) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) a) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) b) (Ropp R1))))))))))))))))))))) R0) --> -(Rle (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) x) (Rplus (Rmult R1 y) (Rplus (Rmult (Rplus R1 R1) z) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) t) (Rplus (Rmult R0 u) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) v) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) w) (Rplus (Rmult R0 g) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) h) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) j) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) l) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) m) (Rplus (Rmult R0 n) (Rplus (Rmult (Rplus R1 R1) o) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) p) (Rplus (Rmult R0 q) (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) r) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) s) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) a) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) b) (Ropp R1))))))))))))))))))))) R0) --> -(Rle (Rplus (Rmult R1 x) (Rplus (Rmult R0 y) (Rplus (Rmult (Rplus R1 R1) z) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) t) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) u) (Rplus (Rmult R1 v) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) w) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) g) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) h) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) j) (Rplus (Rmult R1 l) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) m) (Rplus (Rmult R0 n) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) o) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) p) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) q) (Rplus (Rmult R0 r) (Rplus (Rmult (Ropp R1) s) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) a) (Rplus (Rmult R1 b) (Ropp R1))))))))))))))))))))) R0) --> -(Rle (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) x) (Rplus (Rmult R1 y) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) z) (Rplus (Rmult (Rplus R1 R1) t) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) u) (Rplus (Rmult (Rplus R1 R1) v) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) w) (Rplus (Rmult R0 g) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) h) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) j) (Rplus (Rmult (Rplus R1 R1) l) (Rplus (Rmult (Rplus R1 R1) m) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) n) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) o) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) p) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) q) (Rplus (Rmult (Rplus R1 R1) r) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) s) (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) a) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) b) (Ropp R1))))))))))))))))))))) R0) --> -(Rle (Rplus (Rmult (Rplus R1 R1) x) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) y) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) z) (Rplus (Rmult (Rplus R1 R1) t) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) u) (Rplus (Rmult R0 v) (Rplus (Rmult R0 w) (Rplus (Rmult R0 g) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) h) (Rplus (Rmult (Rplus R1 R1) j) (Rplus (Rmult R0 l) (Rplus (Rmult R1 m) (Rplus (Rmult R0 n) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) o) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) p) (Rplus (Rmult R0 q) (Rplus (Rmult (Rplus R1 R1) r) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) s) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) a) (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) b) (Ropp R1))))))))))))))))))))) R0) --> -(Rle (Rplus (Rmult (Rplus R1 R1) x) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) y) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) z) (Rplus (Rmult (Rplus R1 R1) t) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) u) (Rplus (Rmult R0 v) (Rplus (Rmult R0 w) (Rplus (Rmult R0 g) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) h) (Rplus (Rmult (Rplus R1 R1) j) (Rplus (Rmult R0 l) (Rplus (Rmult R1 m) (Rplus (Rmult R0 n) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) o) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) p) (Rplus (Rmult R0 q) (Rplus (Rmult (Rplus R1 R1) r) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) s) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) a) (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) b) (Ropp R1))))))))))))))))))))) R0) - - -[19'30'' 1.9M m=21 n=20 K=8 ty=13'35''] - --------------------------------------------------------------------------------------------------------- - -!x:R.!y:R.!z:R.!t:R.!u:R.!v:R.!w:R.!g:R.!h:R.!j:R. -(Rle (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))))))))) x) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))))))))))) y) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))))))) z) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) t) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) u) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))))) v) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))))) w) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))))))))) g) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) h) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))) j) (Ropp R1))))))))))) R0) --> -(Rle (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) x) (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))))))))))))) y) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))))))))) z) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))) t) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) u) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))) v) (Rplus (Rmult R0 w) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))))))) g) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) h) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))))))))) j) (Ropp R1))))))))))) R0) --> -(Rle (Rplus (Rmult R1 x) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))))) y) (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))))))))))))) z) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) t) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))))))))) u) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))))) v) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))))))) w) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))))) g) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))))))) h) (Rplus (Rmult (Rplus R1 R1) j) (Ropp R1))))))))))) R0) --> -(Rle (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) x) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))))) y) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))))))))))))) z) (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))))))))) t) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) u) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) v) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) w) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) g) (Rplus (Rmult R0 h) (Rplus (Rmult R1 j) (Ropp R1))))))))))) R0) --> -(Rle (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) x) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) y) (Rplus (Rmult R0 z) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))))))))))))) t) (Rplus (Rmult (Ropp (Rplus R1 R1)) u) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))))))) v) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))))))))) w) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))))))) g) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) h) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) j) (Ropp R1))))))))))) R0) --> -(Rle (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) x) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))))))) y) (Rplus (Rmult R0 z) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) t) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) u) (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))))) v) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))))))))) w) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))))))) g) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))))))) h) (Rplus (Rmult R0 j) (Ropp R1))))))))))) R0) --> -(Rle (Rplus (Rmult R1 x) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) y) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))))))))) z) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))))))) t) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))))) u) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))))) v) (Rplus (Rmult (Ropp R1) w) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))))) g) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) h) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) j) (Ropp R1))))))))))) R0) --> -(Rle (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))))) x) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))))))) y) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) z) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))))))))) t) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))))))) u) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))))) v) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) w) (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))))))))) g) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))))) h) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))))) j) (Ropp R1))))))))))) R0) --> -(Rle (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) x) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))) y) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))))))) z) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))))))) t) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))) u) (Rplus (Rmult (Rplus R1 R1) v) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))))) w) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) g) (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))))))))))) h) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))))) j) (Ropp R1))))))))))) R0) --> -(Rle (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) x) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) y) (Rplus (Rmult R1 z) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))))))))) t) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))))))))) u) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))))))))))) v) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) w) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))) g) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))) h) (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))))))))) j) (Ropp R1))))))))))) R0) --> -(Rle (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) x) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) y) (Rplus (Rmult R1 z) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))))))))) t) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))))))))) u) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))))))))))) v) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) w) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))) g) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))) h) (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))))))))) j) (Ropp R1))))))))))) R0) - -[ K m=11 n=10 K=18 ty=] (TRASH) - - ----------------------------------------------- - -!x:R.!y:R.!z:R.!t:R.!u:R.!v:R. -(Rle (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))) x) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))))))) y) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) z) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) t) (Rplus (Rmult (Rplus R1 R1) u) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) v) (Ropp R1))))))) R0) --> -(Rle (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) x) (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) y) (Rplus (Rmult R0 z) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 R1))) t) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))))) u) (Rplus (Rmult R0 v) (Ropp R1))))))) R0) --> -(Rle (Rplus (Rmult (Rplus R1 R1) x) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) y) (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) z) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) t) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))))) u) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))) v) (Ropp R1))))))) R0) --> -(Rle (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))))) x) (Rplus (Rmult R0 y) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))))))) z) (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) t) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) u) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))) v) (Ropp R1))))))) R0) --> -(Rle (Rplus (Rmult (Rplus R1 R1) x) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) y) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) z) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))) t) (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))))))) u) (Rplus (Rmult (Rplus R1 (Rplus R1 R1)) v) (Ropp R1))))))) R0) --> -(Rle (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))))))) x) (Rplus (Rmult R1 y) (Rplus (Rmult R1 z) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))))) t) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) u) (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) v) (Ropp R1))))))) R0) --> -(Rle (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))))))) x) (Rplus (Rmult R1 y) (Rplus (Rmult R1 z) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))))) t) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) u) (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))) v) (Ropp R1))))))) R0) - -[4' 658K m=7 n=6 K=13 ty=50''] - ----------------------------------------------------------------- - -!x:R.!y:R.!z:R.!t:R. -(Rle (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))))))))) x) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))) y) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))))))) z) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))))))) t) (Ropp R1))))) R0) --> -(Rle (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))) x) (Rplus (Rmult (Ropp (Rplus R1 R1)) y) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))) z) (Rplus (Rmult (Rplus R1 R1) t) (Ropp R1))))) R0) --> -(Rle (Rplus (Rmult (Rplus R1 R1) x) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))))))) y) (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))))))))) z) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))))))))) t) (Ropp R1))))) R0) --> -(Rle (Rplus (Rmult (Rplus R1 R1) x) (Rplus (Rmult R1 y) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) z) (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))))))) t) (Ropp R1))))) R0) --> -(Rle (Rplus (Rmult (Rplus R1 R1) x) (Rplus (Rmult R1 y) (Rplus (Rmult (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1)))) z) (Rplus (Rmult (Ropp (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 (Rplus R1 R1))))))))))) t) (Ropp R1))))) R0) - -[3':20'' 658K m=5 n=4 K=13 ty=41''] - - - - diff --git a/helm/gTopLevel/esempi/fourier/fourier_make_benchmarks.ml b/helm/gTopLevel/esempi/fourier/fourier_make_benchmarks.ml deleted file mode 100644 index d783089a2..000000000 --- a/helm/gTopLevel/esempi/fourier/fourier_make_benchmarks.ml +++ /dev/null @@ -1,61 +0,0 @@ -let rec int_to_cic n = - if n < 0 then - "(Ropp "^int_to_cic (-n)^")" - else - match n with - 0 -> " R0" - |1 -> " R1" - |k -> "(Rplus R1 " ^ int_to_cic (n-1) ^")" -;; - -let dimx = ref 3;; -let dimy = ref 3;; -let kmax = ref 5;; -let vl = [|"x";"y";"z";"t";"u";"v";"w";"g";"h";"j";"l";"m";"n";"o";"p";"q";"r";"s";"a";"b";"c";"d"|] -;; - -let nth_inc n = - vl.(n) -;; - -let preamble () = - for i = 0 to !dimx do - print_string ("!"^nth_inc i^":R."); - done; - print_string "\n"; -;; - -let main () = - print_string "Immetti m : ";dimy := (read_int ()) - 1; - print_string "Immetti n : ";dimx := (read_int ()) - 1; - print_string "Immetti K : ";kmax := (read_int ()) + 1; - print_string ("Genero un sistema di "^ - string_of_int (!dimy+1)^" disequazioni in "^ - string_of_int (!dimx+1)^" incognite con coefficenti "^string_of_int !kmax^"\n\n"); - Random.self_init (); - preamble (); - let max = ref 0 in - for i=0 to !dimy do - begin - print_string "(Rle "; - for o=0 to !dimx do - let k = ref ((Random.int !kmax)) in - if !k > !max then max := !k; - if i=o then - k := - !k - else - k := !k; - print_string ("(Rplus (Rmult "^int_to_cic !k^" "^nth_inc o^") "); - done; - print_string "(Ropp R1)"; - for o=0 to !dimx do - print_string (")"); - done; - print_string (" R0)\n->\n"); - end - done; - print_string ("\n\nIl massimo K e' "^string_of_int !max^".\nLa tesi la puoi scegliere tu, ma se ricopi una ipotesi vai tranquillo.\n"); -;; - - -main ();; diff --git a/helm/gTopLevel/esempi/prova.cic b/helm/gTopLevel/esempi/prova.cic deleted file mode 100644 index 3f65458d2..000000000 --- a/helm/gTopLevel/esempi/prova.cic +++ /dev/null @@ -1,16 +0,0 @@ -alias eq /Coq/Init/Logic/eq.ind#1/1 -alias nat /Coq/Init/Datatypes/nat.ind#1/1 -alias O /Coq/Init/Datatypes/nat.ind#1/1/1 -alias S /Coq/Init/Datatypes/nat.ind#1/1/2 -alias plus /Coq/Init/Peano/plus.con -alias mult /Coq/Init/Peano/mult.con -(mult (plus (S (S O)) (S O)) (S (S O))) -Case ((S O) : nat ; nat) { O ; \x:nat.x } -Fix f {f(0) : !x:nat.nat ; g(0) : !x:nat.nat} - { \x:nat.O - ; \x:nat. - Case (x : nat ; nat) { (S O) ; \x:nat.(f x) } - } - -(* Nel caso seguente sbagliavamo a fare la whd!!!! *) -!n:nat.(eq nat O (Case (n : nat ; \z:nat.!a:nat.nat) {\x:nat.x ; \y:nat.\x:nat.x} O)) diff --git a/helm/gTopLevel/esempi/rewrite.cic b/helm/gTopLevel/esempi/rewrite.cic deleted file mode 100644 index ff2b92e52..000000000 --- a/helm/gTopLevel/esempi/rewrite.cic +++ /dev/null @@ -1,5 +0,0 @@ -!v:nat.(eq nat -> nat -> nat \x:nat.\y:nat.(plus y v) \x:nat.\y:nat.O) - -Fare cut di: - (eq nat -> nat \w:nat.(plus w v) \w:nat.(plus (plus w w) v)) -e poi riscriverlo diff --git a/helm/gTopLevel/esempi/ring/0eq0.cic b/helm/gTopLevel/esempi/ring/0eq0.cic deleted file mode 100644 index 0b6f8f22e..000000000 --- a/helm/gTopLevel/esempi/ring/0eq0.cic +++ /dev/null @@ -1,10 +0,0 @@ -(* prova di 0 == 0 *) -alias eq /Coq/Init/Logic/Equality/eq.ind#1/1 -alias eqT /Coq/Init/Logic_Type/eqT.ind#1/1 -alias R /Coq/Reals/Rdefinitions/R.con -alias Rplus /Coq/Reals/Rdefinitions/Rplus.con -alias Rmult /Coq/Reals/Rdefinitions/Rmult.con -alias R1 /Coq/Reals/Rdefinitions/R1.con -alias R0 /Coq/Reals/Rdefinitions/R0.con -alias Ropp /Coq/Reals/Rdefinitions/Ropp.con -(eqT R R0 R0) diff --git a/helm/gTopLevel/esempi/ring/aliases.cic b/helm/gTopLevel/esempi/ring/aliases.cic deleted file mode 100644 index f3fb95c0b..000000000 --- a/helm/gTopLevel/esempi/ring/aliases.cic +++ /dev/null @@ -1,24 +0,0 @@ -alias false /Coq/Init/Datatypes/bool.ind#1/1/2 -alias apolynomial_normalize_ok /Coq/ring/Ring_abstract/abstract_rings/apolynomial_normalize_ok.con -alias RTheory /Coq/Reals/Rbase/RTheory.con -alias eq /Coq/Init/Logic/Equality/eq.ind#1/1 -alias eqT /Coq/Init/Logic_Type/eqT.ind#1/1 -alias R /Coq/Reals/Rdefinitions/R.con -alias Rplus /Coq/Reals/Rdefinitions/Rplus.con -alias Rmult /Coq/Reals/Rdefinitions/Rmult.con -alias R1 /Coq/Reals/Rdefinitions/R1.con -alias R0 /Coq/Reals/Rdefinitions/R0.con -alias Ropp /Coq/Reals/Rdefinitions/Ropp.con -alias interp_sacs /Coq/ring/Ring_abstract/abstract_rings/interp_sacs.con -alias apolynomial_normalize /Coq/ring/Ring_abstract/abstract_rings/apolynomial_normalize.con -alias Node_vm /Coq/ring/Quote/variables_map/varmap.ind#1/1/2 -alias Empty_vm /Coq/ring/Quote/variables_map/varmap.ind#1/1/1 -alias APvar /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/1 -alias AP0 /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/2 -alias AP1 /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/3 -alias APplus /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/4 -alias APmult /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/5 -alias APopp /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/6 -alias Left_idx /Coq/ring/Quote/variables_map/index.ind#1/1/1 -alias Right_idx /Coq/ring/Quote/variables_map/index.ind#1/1/2 -alias End_idx /Coq/ring/Quote/variables_map/index.ind#1/1/3 diff --git a/helm/gTopLevel/esempi/ring/caso0.cic b/helm/gTopLevel/esempi/ring/caso0.cic deleted file mode 100644 index afe37f563..000000000 --- a/helm/gTopLevel/esempi/ring/caso0.cic +++ /dev/null @@ -1,23 +0,0 @@ -(* OK, meglio di coq *) -alias eq /Coq/Init/Logic/Equality/eq.ind#1/1 -alias eqT /Coq/Init/Logic_Type/eqT.ind#1/1 -alias R /Coq/Reals/Rdefinitions/R.con -alias Rplus /Coq/Reals/Rdefinitions/Rplus.con -alias Rmult /Coq/Reals/Rdefinitions/Rmult.con -alias R1 /Coq/Reals/Rdefinitions/R1.con -alias R0 /Coq/Reals/Rdefinitions/R0.con -alias Ropp /Coq/Reals/Rdefinitions/Ropp.con -alias interp_sacs /Coq/ring/Ring_abstract/abstract_rings/interp_sacs.con -alias apolynomial_normalize /Coq/ring/Ring_abstract/abstract_rings/apolynomial_normalize.con -alias Node_vm /Coq/ring/Quote/variables_map/varmap.ind#1/1/2 -alias Empty_vm /Coq/ring/Quote/variables_map/varmap.ind#1/1/1 -alias APvar /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/1 -alias AP0 /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/2 -alias AP1 /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/3 -alias APplus /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/4 -alias APmult /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/5 -alias APopp /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/6 -alias Left_idx /Coq/ring/Quote/variables_map/index.ind#1/1/1 -alias Right_idx /Coq/ring/Quote/variables_map/index.ind#1/1/2 -alias End_idx /Coq/ring/Quote/variables_map/index.ind#1/1/3 -(eqT R R1 R1) diff --git a/helm/gTopLevel/esempi/ring/caso1.cic b/helm/gTopLevel/esempi/ring/caso1.cic deleted file mode 100644 index 250e8cbeb..000000000 --- a/helm/gTopLevel/esempi/ring/caso1.cic +++ /dev/null @@ -1,25 +0,0 @@ -(* ok *) -alias eq /Coq/Init/Logic/Equality/eq.ind#1/1 -alias eqT /Coq/Init/Logic_Type/eqT.ind#1/1 -alias R /Coq/Reals/Rdefinitions/R.con -alias Rplus /Coq/Reals/Rdefinitions/Rplus.con -alias Rmult /Coq/Reals/Rdefinitions/Rmult.con -alias R1 /Coq/Reals/Rdefinitions/R1.con -alias R0 /Coq/Reals/Rdefinitions/R0.con -alias Ropp /Coq/Reals/Rdefinitions/Ropp.con -alias interp_sacs /Coq/ring/Ring_abstract/abstract_rings/interp_sacs.con -alias apolynomial_normalize /Coq/ring/Ring_abstract/abstract_rings/apolynomial_normalize.con -alias Node_vm /Coq/ring/Quote/variables_map/varmap.ind#1/1/2 -alias Empty_vm /Coq/ring/Quote/variables_map/varmap.ind#1/1/1 -alias APvar /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/1 -alias AP0 /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/2 -alias AP1 /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/3 -alias APplus /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/4 -alias APmult /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/5 -alias APopp /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/6 -alias Left_idx /Coq/ring/Quote/variables_map/index.ind#1/1/1 -alias Right_idx /Coq/ring/Quote/variables_map/index.ind#1/1/2 -alias End_idx /Coq/ring/Quote/variables_map/index.ind#1/1/3 -(eqT R - R1 - (Rmult R1 R1)) diff --git a/helm/gTopLevel/esempi/ring/caso2.cic b/helm/gTopLevel/esempi/ring/caso2.cic deleted file mode 100644 index c9c389674..000000000 --- a/helm/gTopLevel/esempi/ring/caso2.cic +++ /dev/null @@ -1,25 +0,0 @@ -(* ok *) -alias eq /Coq/Init/Logic/Equality/eq.ind#1/1 -alias eqT /Coq/Init/Logic_Type/eqT.ind#1/1 -alias R /Coq/Reals/Rdefinitions/R.con -alias Rplus /Coq/Reals/Rdefinitions/Rplus.con -alias Rmult /Coq/Reals/Rdefinitions/Rmult.con -alias R1 /Coq/Reals/Rdefinitions/R1.con -alias R0 /Coq/Reals/Rdefinitions/R0.con -alias Ropp /Coq/Reals/Rdefinitions/Ropp.con -alias interp_sacs /Coq/ring/Ring_abstract/abstract_rings/interp_sacs.con -alias apolynomial_normalize /Coq/ring/Ring_abstract/abstract_rings/apolynomial_normalize.con -alias Node_vm /Coq/ring/Quote/variables_map/varmap.ind#1/1/2 -alias Empty_vm /Coq/ring/Quote/variables_map/varmap.ind#1/1/1 -alias APvar /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/1 -alias AP0 /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/2 -alias AP1 /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/3 -alias APplus /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/4 -alias APmult /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/5 -alias APopp /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/6 -alias Left_idx /Coq/ring/Quote/variables_map/index.ind#1/1/1 -alias Right_idx /Coq/ring/Quote/variables_map/index.ind#1/1/2 -alias End_idx /Coq/ring/Quote/variables_map/index.ind#1/1/3 -(eqT R - (Rmult R1 R1) - R1) diff --git a/helm/gTopLevel/esempi/ring/caso3.1.cic b/helm/gTopLevel/esempi/ring/caso3.1.cic deleted file mode 100644 index 0d698cd48..000000000 --- a/helm/gTopLevel/esempi/ring/caso3.1.cic +++ /dev/null @@ -1,25 +0,0 @@ -(* ok *) -alias eq /Coq/Init/Logic/Equality/eq.ind#1/1 -alias eqT /Coq/Init/Logic_Type/eqT.ind#1/1 -alias R /Coq/Reals/Rdefinitions/R.con -alias Rplus /Coq/Reals/Rdefinitions/Rplus.con -alias Rmult /Coq/Reals/Rdefinitions/Rmult.con -alias R1 /Coq/Reals/Rdefinitions/R1.con -alias R0 /Coq/Reals/Rdefinitions/R0.con -alias Ropp /Coq/Reals/Rdefinitions/Ropp.con -alias interp_sacs /Coq/ring/Ring_abstract/abstract_rings/interp_sacs.con -alias apolynomial_normalize /Coq/ring/Ring_abstract/abstract_rings/apolynomial_normalize.con -alias Node_vm /Coq/ring/Quote/variables_map/varmap.ind#1/1/2 -alias Empty_vm /Coq/ring/Quote/variables_map/varmap.ind#1/1/1 -alias APvar /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/1 -alias AP0 /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/2 -alias AP1 /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/3 -alias APplus /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/4 -alias APmult /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/5 -alias APopp /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/6 -alias Left_idx /Coq/ring/Quote/variables_map/index.ind#1/1/1 -alias Right_idx /Coq/ring/Quote/variables_map/index.ind#1/1/2 -alias End_idx /Coq/ring/Quote/variables_map/index.ind#1/1/3 -(eqT R - (Rmult R1 R1) - (Rplus R1 R1)) diff --git a/helm/gTopLevel/esempi/ring/caso3.1bis.cic b/helm/gTopLevel/esempi/ring/caso3.1bis.cic deleted file mode 100644 index ec85c071a..000000000 --- a/helm/gTopLevel/esempi/ring/caso3.1bis.cic +++ /dev/null @@ -1,25 +0,0 @@ -(* ok *) -alias eq /Coq/Init/Logic/Equality/eq.ind#1/1 -alias eqT /Coq/Init/Logic_Type/eqT.ind#1/1 -alias R /Coq/Reals/Rdefinitions/R.con -alias Rplus /Coq/Reals/Rdefinitions/Rplus.con -alias Rmult /Coq/Reals/Rdefinitions/Rmult.con -alias R1 /Coq/Reals/Rdefinitions/R1.con -alias R0 /Coq/Reals/Rdefinitions/R0.con -alias Ropp /Coq/Reals/Rdefinitions/Ropp.con -alias interp_sacs /Coq/ring/Ring_abstract/abstract_rings/interp_sacs.con -alias apolynomial_normalize /Coq/ring/Ring_abstract/abstract_rings/apolynomial_normalize.con -alias Node_vm /Coq/ring/Quote/variables_map/varmap.ind#1/1/2 -alias Empty_vm /Coq/ring/Quote/variables_map/varmap.ind#1/1/1 -alias APvar /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/1 -alias AP0 /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/2 -alias AP1 /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/3 -alias APplus /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/4 -alias APmult /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/5 -alias APopp /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/6 -alias Left_idx /Coq/ring/Quote/variables_map/index.ind#1/1/1 -alias Right_idx /Coq/ring/Quote/variables_map/index.ind#1/1/2 -alias End_idx /Coq/ring/Quote/variables_map/index.ind#1/1/3 -(eqT R - (Rplus R1 R1) - (Rmult R1 R1)) diff --git a/helm/gTopLevel/esempi/ring/caso3.2.cic b/helm/gTopLevel/esempi/ring/caso3.2.cic deleted file mode 100644 index d6d0b5ad8..000000000 --- a/helm/gTopLevel/esempi/ring/caso3.2.cic +++ /dev/null @@ -1,25 +0,0 @@ -(* ok *) -alias eq /Coq/Init/Logic/Equality/eq.ind#1/1 -alias eqT /Coq/Init/Logic_Type/eqT.ind#1/1 -alias R /Coq/Reals/Rdefinitions/R.con -alias Rplus /Coq/Reals/Rdefinitions/Rplus.con -alias Rmult /Coq/Reals/Rdefinitions/Rmult.con -alias R1 /Coq/Reals/Rdefinitions/R1.con -alias R0 /Coq/Reals/Rdefinitions/R0.con -alias Ropp /Coq/Reals/Rdefinitions/Ropp.con -alias interp_sacs /Coq/ring/Ring_abstract/abstract_rings/interp_sacs.con -alias apolynomial_normalize /Coq/ring/Ring_abstract/abstract_rings/apolynomial_normalize.con -alias Node_vm /Coq/ring/Quote/variables_map/varmap.ind#1/1/2 -alias Empty_vm /Coq/ring/Quote/variables_map/varmap.ind#1/1/1 -alias APvar /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/1 -alias AP0 /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/2 -alias AP1 /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/3 -alias APplus /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/4 -alias APmult /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/5 -alias APopp /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/6 -alias Left_idx /Coq/ring/Quote/variables_map/index.ind#1/1/1 -alias Right_idx /Coq/ring/Quote/variables_map/index.ind#1/1/2 -alias End_idx /Coq/ring/Quote/variables_map/index.ind#1/1/3 -(eqT R - (Rmult (Rplus R1 R1) R1) - (Rmult R1 (Rplus R1 R1))) diff --git a/helm/gTopLevel/esempi/ring/caso3.3.cic b/helm/gTopLevel/esempi/ring/caso3.3.cic deleted file mode 100644 index 0ac953aa3..000000000 --- a/helm/gTopLevel/esempi/ring/caso3.3.cic +++ /dev/null @@ -1,25 +0,0 @@ -(* ok *) -alias eq /Coq/Init/Logic/Equality/eq.ind#1/1 -alias eqT /Coq/Init/Logic_Type/eqT.ind#1/1 -alias R /Coq/Reals/Rdefinitions/R.con -alias Rplus /Coq/Reals/Rdefinitions/Rplus.con -alias Rmult /Coq/Reals/Rdefinitions/Rmult.con -alias R1 /Coq/Reals/Rdefinitions/R1.con -alias R0 /Coq/Reals/Rdefinitions/R0.con -alias Ropp /Coq/Reals/Rdefinitions/Ropp.con -alias interp_sacs /Coq/ring/Ring_abstract/abstract_rings/interp_sacs.con -alias apolynomial_normalize /Coq/ring/Ring_abstract/abstract_rings/apolynomial_normalize.con -alias Node_vm /Coq/ring/Quote/variables_map/varmap.ind#1/1/2 -alias Empty_vm /Coq/ring/Quote/variables_map/varmap.ind#1/1/1 -alias APvar /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/1 -alias AP0 /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/2 -alias AP1 /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/3 -alias APplus /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/4 -alias APmult /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/5 -alias APopp /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/6 -alias Left_idx /Coq/ring/Quote/variables_map/index.ind#1/1/1 -alias Right_idx /Coq/ring/Quote/variables_map/index.ind#1/1/2 -alias End_idx /Coq/ring/Quote/variables_map/index.ind#1/1/3 -(eqT R - (Rmult (Rplus R1 R1) R1) - (Rmult R1 R1)) diff --git a/helm/gTopLevel/esempi/ring/coq_overkill_helm_rulez.cic b/helm/gTopLevel/esempi/ring/coq_overkill_helm_rulez.cic deleted file mode 100644 index f7879b576..000000000 --- a/helm/gTopLevel/esempi/ring/coq_overkill_helm_rulez.cic +++ /dev/null @@ -1,23 +0,0 @@ -(* meglio di coq *) -alias eq /Coq/Init/Logic/Equality/eq.ind#1/1 -alias eqT /Coq/Init/Logic_Type/eqT.ind#1/1 -alias R /Coq/Reals/Rdefinitions/R.con -alias Rplus /Coq/Reals/Rdefinitions/Rplus.con -alias Rmult /Coq/Reals/Rdefinitions/Rmult.con -alias R1 /Coq/Reals/Rdefinitions/R1.con -alias R0 /Coq/Reals/Rdefinitions/R0.con -alias Ropp /Coq/Reals/Rdefinitions/Ropp.con -alias interp_sacs /Coq/ring/Ring_abstract/abstract_rings/interp_sacs.con -alias apolynomial_normalize /Coq/ring/Ring_abstract/abstract_rings/apolynomial_normalize.con -alias Node_vm /Coq/ring/Quote/variables_map/varmap.ind#1/1/2 -alias Empty_vm /Coq/ring/Quote/variables_map/varmap.ind#1/1/1 -alias APvar /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/1 -alias AP0 /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/2 -alias AP1 /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/3 -alias APplus /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/4 -alias APmult /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/5 -alias APopp /Coq/ring/Ring_abstract/abstract_rings/apolynomial.ind#1/1/6 -alias Left_idx /Coq/ring/Quote/variables_map/index.ind#1/1/1 -alias Right_idx /Coq/ring/Quote/variables_map/index.ind#1/1/2 -alias End_idx /Coq/ring/Quote/variables_map/index.ind#1/1/3 -(eqT R R1 R0) diff --git a/helm/gTopLevel/esempi/ring/novarmap.cic b/helm/gTopLevel/esempi/ring/novarmap.cic deleted file mode 100644 index 63deeff13..000000000 --- a/helm/gTopLevel/esempi/ring/novarmap.cic +++ /dev/null @@ -1,13 +0,0 @@ -(* Goal ``-1 + 1*2 == 2*0 + 1`` *) -alias eq /Coq/Init/Logic/Equality/eq.ind#1/1 -alias eqT /Coq/Init/Logic_Type/eqT.ind#1/1 -alias R /Coq/Reals/Rdefinitions/R.con -alias Rplus /Coq/Reals/Rdefinitions/Rplus.con -alias Rmult /Coq/Reals/Rdefinitions/Rmult.con -alias R1 /Coq/Reals/Rdefinitions/R1.con -alias R0 /Coq/Reals/Rdefinitions/R0.con -alias Ropp /Coq/Reals/Rdefinitions/Ropp.con -(eqT R - (Rplus (Ropp R1) (Rmult R1 (Rplus R1 R1))) - (Rplus (Rmult (Rplus R1 R1) R0) R1) -) diff --git a/helm/gTopLevel/esempi/ring/novarmap_tofinish.cic b/helm/gTopLevel/esempi/ring/novarmap_tofinish.cic deleted file mode 100644 index 1a335f3b2..000000000 --- a/helm/gTopLevel/esempi/ring/novarmap_tofinish.cic +++ /dev/null @@ -1,13 +0,0 @@ -(* Goal: ``1 = 2`` *) -alias eq /Coq/Init/Logic/Equality/eq.ind#1/1 -alias eqT /Coq/Init/Logic_Type/eqT.ind#1/1 -alias R /Coq/Reals/Rdefinitions/R.con -alias Rplus /Coq/Reals/Rdefinitions/Rplus.con -alias Rmult /Coq/Reals/Rdefinitions/Rmult.con -alias R1 /Coq/Reals/Rdefinitions/R1.con -alias R0 /Coq/Reals/Rdefinitions/R0.con -alias Ropp /Coq/Reals/Rdefinitions/Ropp.con -(eqT R - R1 - (Rplus R1 R1) -) diff --git a/helm/gTopLevel/esempi/ring/varmap.cic b/helm/gTopLevel/esempi/ring/varmap.cic deleted file mode 100644 index d2cf450b3..000000000 --- a/helm/gTopLevel/esempi/ring/varmap.cic +++ /dev/null @@ -1,14 +0,0 @@ -(* Goal: ``x+y == 2*y+(x-y)`` *) -alias eq /Coq/Init/Logic/Equality/eq.ind#1/1 -alias eqT /Coq/Init/Logic_Type/eqT.ind#1/1 -alias R /Coq/Reals/Rdefinitions/R.con -alias Rplus /Coq/Reals/Rdefinitions/Rplus.con -alias Rmult /Coq/Reals/Rdefinitions/Rmult.con -alias R1 /Coq/Reals/Rdefinitions/R1.con -alias R0 /Coq/Reals/Rdefinitions/R0.con -alias Ropp /Coq/Reals/Rdefinitions/Ropp.con -!x:R.!y:R. -(eqT R - (Rplus x y) - (Rplus (Rmult (Rplus R1 R1) y) (Rplus x (Ropp y))) -) diff --git a/helm/gTopLevel/esempi/ring/varmap2.cic b/helm/gTopLevel/esempi/ring/varmap2.cic deleted file mode 100644 index d3aa6c85b..000000000 --- a/helm/gTopLevel/esempi/ring/varmap2.cic +++ /dev/null @@ -1,14 +0,0 @@ -(* Goal: ``x+y == x+y+x`` *) -alias eq /Coq/Init/Logic/Equality/eq.ind#1/1 -alias eqT /Coq/Init/Logic_Type/eqT.ind#1/1 -alias R /Coq/Reals/Rdefinitions/R.con -alias Rplus /Coq/Reals/Rdefinitions/Rplus.con -alias Rmult /Coq/Reals/Rdefinitions/Rmult.con -alias R1 /Coq/Reals/Rdefinitions/R1.con -alias R0 /Coq/Reals/Rdefinitions/R0.con -alias Ropp /Coq/Reals/Rdefinitions/Ropp.con -!x:R.!y:R. -(eqT R - (Rplus x y) - (Rplus (Rplus x y) x) -) diff --git a/helm/gTopLevel/esempi/ring/varmap_trivial.cic b/helm/gTopLevel/esempi/ring/varmap_trivial.cic deleted file mode 100644 index 15e2a512b..000000000 --- a/helm/gTopLevel/esempi/ring/varmap_trivial.cic +++ /dev/null @@ -1,14 +0,0 @@ -(* Goal (x,y:R)``x+y==y+x`` *) -alias eq /Coq/Init/Logic/Equality/eq.ind#1/1 -alias eqT /Coq/Init/Logic_Type/eqT.ind#1/1 -alias R /Coq/Reals/Rdefinitions/R.con -alias Rplus /Coq/Reals/Rdefinitions/Rplus.con -alias Rmult /Coq/Reals/Rdefinitions/Rmult.con -alias R1 /Coq/Reals/Rdefinitions/R1.con -alias R0 /Coq/Reals/Rdefinitions/R0.con -alias Ropp /Coq/Reals/Rdefinitions/Ropp.con -!x:R.!y:R. -(eqT R - (Rplus x y) - (Rplus y x) -) diff --git a/helm/gTopLevel/esempi/ring/varmap_trivial2.cic b/helm/gTopLevel/esempi/ring/varmap_trivial2.cic deleted file mode 100644 index e05aecd89..000000000 --- a/helm/gTopLevel/esempi/ring/varmap_trivial2.cic +++ /dev/null @@ -1,14 +0,0 @@ -(* Goal (x,y,z:R)``x+y+z==z+y+x`` *) -alias eq /Coq/Init/Logic/Equality/eq.ind#1/1 -alias eqT /Coq/Init/Logic_Type/eqT.ind#1/1 -alias R /Coq/Reals/Rdefinitions/R.con -alias Rplus /Coq/Reals/Rdefinitions/Rplus.con -alias Rmult /Coq/Reals/Rdefinitions/Rmult.con -alias R1 /Coq/Reals/Rdefinitions/R1.con -alias R0 /Coq/Reals/Rdefinitions/R0.con -alias Ropp /Coq/Reals/Rdefinitions/Ropp.con -!x:R.!y:R.!z:R. -(eqT R - (Rplus (Rplus x y) z) - (Rplus (Rplus z y) x) -) diff --git a/helm/gTopLevel/esempi/ring/varmap_trivial3.cic b/helm/gTopLevel/esempi/ring/varmap_trivial3.cic deleted file mode 100644 index c1bb161b8..000000000 --- a/helm/gTopLevel/esempi/ring/varmap_trivial3.cic +++ /dev/null @@ -1,14 +0,0 @@ -(* Goal (x:R)``2*x==x+x``. *) -alias eq /Coq/Init/Logic/Equality/eq.ind#1/1 -alias eqT /Coq/Init/Logic_Type/eqT.ind#1/1 -alias R /Coq/Reals/Rdefinitions/R.con -alias Rplus /Coq/Reals/Rdefinitions/Rplus.con -alias Rmult /Coq/Reals/Rdefinitions/Rmult.con -alias R1 /Coq/Reals/Rdefinitions/R1.con -alias R0 /Coq/Reals/Rdefinitions/R0.con -alias Ropp /Coq/Reals/Rdefinitions/Ropp.con -!x:R. -(eqT R - (Rmult (Rplus R1 R1) x) - (Rplus x x) -) diff --git a/helm/gTopLevel/esempi/ring/varmap_trivial_molte_variabili.cic b/helm/gTopLevel/esempi/ring/varmap_trivial_molte_variabili.cic deleted file mode 100644 index ce9d86da0..000000000 --- a/helm/gTopLevel/esempi/ring/varmap_trivial_molte_variabili.cic +++ /dev/null @@ -1,14 +0,0 @@ -(* Goal (u,v,w,x,y,z:R)``u+v+w+x+y+z==z+y+x+w+v+u``. *) -alias eq /Coq/Init/Logic/Equality/eq.ind#1/1 -alias eqT /Coq/Init/Logic_Type/eqT.ind#1/1 -alias R /Coq/Reals/Rdefinitions/R.con -alias Rplus /Coq/Reals/Rdefinitions/Rplus.con -alias Rmult /Coq/Reals/Rdefinitions/Rmult.con -alias R1 /Coq/Reals/Rdefinitions/R1.con -alias R0 /Coq/Reals/Rdefinitions/R0.con -alias Ropp /Coq/Reals/Rdefinitions/Ropp.con -!u:R.!v:R.!w:R.!x:R.!y:R.!z:R. -(eqT R - (Rplus (Rplus (Rplus (Rplus (Rplus u v) w) x) y) z) - (Rplus (Rplus (Rplus (Rplus (Rplus z y) x) w) v) u) -) diff --git a/helm/gTopLevel/esempi/sets.cic b/helm/gTopLevel/esempi/sets.cic deleted file mode 100644 index 5bd913e72..000000000 --- a/helm/gTopLevel/esempi/sets.cic +++ /dev/null @@ -1,17 +0,0 @@ -Open: -/Coq/Sets/Powerset_facts/Union_commutative.con - -We prove the conjunction again: - -alias U /Coq/Sets/Ensembles/Ensembles/U.var -alias V /Coq/Sets/Powerset_facts/Sets_as_an_algebra/U.var -alias Ensemble /Coq/Sets/Ensembles/Ensemble.con -alias Union /Coq/Sets/Ensembles/Union.ind#1/1 -alias Included /Coq/Sets/Ensembles/Included.con -alias and /Coq/Init/Logic/and.ind#1/1 - -The two parts of the conjunction can be proved in the same way. So we -can make a Cut: - -!C:Ensemble{U:=V}.!D:Ensemble{U:=V}. - (Included{U:=V} (Union{U:=V} C D) (Union{U:=V} D C)) diff --git a/helm/gTopLevel/esempi/various.cic b/helm/gTopLevel/esempi/various.cic deleted file mode 100644 index 11141d4ab..000000000 --- a/helm/gTopLevel/esempi/various.cic +++ /dev/null @@ -1,7 +0,0 @@ - -!n:nat.(eq nat n n) - -!n:nat.!m:nat.(eq nat n m)->(eq nat m n) - -!n:nat.!m:nat.!p:nat.(eq nat n p)->(eq nat p m)->(eq nat n m) - diff --git a/helm/gTopLevel/gTopLevel.conf.xml.sample b/helm/gTopLevel/gTopLevel.conf.xml.sample deleted file mode 100644 index e4f23f7ce..000000000 --- a/helm/gTopLevel/gTopLevel.conf.xml.sample +++ /dev/null @@ -1,58 +0,0 @@ - - - -
- - /home/sacerdot/helm/local_stuff - - - http://mowgli.cs.unibo.it -
- - -
- mowgli.cs.unibo.it - helm - mowgli -
-
- mathql_db_map.txt -
- mowgli.cs.unibo.it - mowgli - - - helm -
- dbname=mowgli host=mowgli.cs.unibo.it user=helm - - - - - - - - - - - -
-
- $(users_settings.per_user_work_directory)/objects - $(local_library.dir) -
-
- remote - $(users_settings.daemons_host):58081/ -
-
- $(users_settings.per_user_work_directory)/constanttype - $(users_settings.per_user_work_directory)/environment - $(users_settings.per_user_work_directory)/innertypes - $(users_settings.per_user_work_directory)/currentproof - $(users_settings.per_user_work_directory)/currentprooftype -
-
- $(users_settings.daemons_host):58080/ -
-
diff --git a/helm/gTopLevel/gTopLevel.ml b/helm/gTopLevel/gTopLevel.ml deleted file mode 100644 index d3e39351c..000000000 --- a/helm/gTopLevel/gTopLevel.ml +++ /dev/null @@ -1,2879 +0,0 @@ -(* Copyright (C) 2000-2004, HELM Team. - * - * This file is part of HELM, an Hypertextual, Electronic - * Library of Mathematics, developed at the Computer Science - * Department, University of Bologna, Italy. - * - * HELM is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * HELM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with HELM; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. - * - * For details, see the HELM World-Wide-Web page, - * http://helm.cs.unibo.it/ - *) - -(*****************************************************************************) -(* *) -(* PROJECT HELM *) -(* *) -(* Claudio Sacerdoti Coen *) -(* 06/01/2002 *) -(* *) -(* *) -(*****************************************************************************) - -let debug_level = ref 1 -let debug_print ?(level = 1) s = if !debug_level >= level then prerr_endline s -let error s = prerr_endline ("E: " ^ s) -let warning s = prerr_endline ("W: " ^ s) - -open Printf - -module MQI = MQueryInterpreter -module MQIC = MQIConn -module MQGT = MQGTypes -module MQGU = MQGUtil -module MQG = MQueryGenerator - -(* first of all let's initialize the Helm_registry *) -let _ = - let configuration_file = "gTopLevel.conf.xml" in - if not (Sys.file_exists configuration_file) then begin - eprintf "E: Can't find configuration file '%s'\n" configuration_file; - exit 2 - end; - Helm_registry.load_from configuration_file -;; - -(* GLOBAL CONSTANTS *) - -let mqi_handle = MQIC.init_if_connected () - -let dbd = - Mysql.quick_connect - ~host:(Helm_registry.get "db.host") - ~user:(Helm_registry.get "db.user") - ~database:(Helm_registry.get "db.database") - () - -let restore_environment_on_boot = true ;; -let notify_hbugs_on_goal_change = false ;; - -let auto_disambiguation = ref true ;; - -(* GLOBAL REFERENCES (USED BY CALLBACKS) *) - -let check_term = ref (fun _ _ _ -> assert false);; - -exception RenderingWindowsNotInitialized;; - -let set_rendering_window,rendering_window = - let rendering_window_ref = ref None in - (function rw -> rendering_window_ref := Some rw), - (function () -> - match !rendering_window_ref with - None -> raise RenderingWindowsNotInitialized - | Some rw -> rw - ) -;; - -exception SettingsWindowsNotInitialized;; - -let set_settings_window,settings_window = - let settings_window_ref = ref None in - (function rw -> settings_window_ref := Some rw), - (function () -> - match !settings_window_ref with - None -> raise SettingsWindowsNotInitialized - | Some rw -> rw - ) -;; - -exception QedSetSensitiveNotInitialized;; -let qed_set_sensitive = - ref (function _ -> raise QedSetSensitiveNotInitialized) -;; - -exception SaveSetSensitiveNotInitialized;; -let save_set_sensitive = - ref (function _ -> raise SaveSetSensitiveNotInitialized) -;; - -(* COMMAND LINE OPTIONS *) - -let usedb = ref true - -let argspec = - [ - "-nodb", Arg.Clear usedb, "disable use of MathQL DB" - ] -in -Arg.parse argspec ignore "" - -(* UTILITY FUNCTIONS TO DISAMBIGUATE AN URI *) - -(* Check window *) - -let check_window uris = - let window = - GWindow.window - ~width:800 ~modal:true ~title:"Check" ~border_width:2 () in - let notebook = - GPack.notebook ~scrollable:true ~packing:window#add () in - window#show () ; - let render_terms = - List.map - (function uri -> - let scrolled_window = - GBin.scrolled_window ~border_width:10 - ~packing: - (notebook#append_page ~tab_label:((GMisc.label ~text:uri ())#coerce)) - () - in - lazy - (let mmlwidget = - TermViewer.sequent_viewer - ~mml_of_cic_sequent:ApplyTransformation.mml_of_cic_sequent - ~packing:scrolled_window#add ~width:400 ~height:280 () in - let expr = - let term = CicUtil.term_of_uri uri in - (Cic.Cast (term, fst(CicTypeChecker.type_of_aux' [] [] term - CicUniv.empty_ugraph ))) - in - try - mmlwidget#load_sequent [] (111,[],expr) - with - e -> - HelmLogger.log (`Error (`T (Printexc.to_string e))) - ) - ) uris - in - ignore - (notebook#connect#switch_page - (function i -> - Lazy.force (List.nth render_terms i))) -;; - -exception NoChoice;; - -let interactive_user_uri_choice - ~(selection_mode:[ `SINGLE | `MULTIPLE ]) - ?(ok="Ok") ?(enable_button_for_non_vars=false) ~title ~msg uris -= - let only_constant_choices = - lazy - (List.filter - (fun uri -> not (String.sub uri (String.length uri - 4) 4 = ".var")) - uris) - in - if selection_mode <> `SINGLE && !auto_disambiguation then - Lazy.force only_constant_choices - else begin - let choices = ref [] in - let chosen = ref false in - let use_only_constants = ref false in - let window = - GWindow.dialog ~modal:true ~title ~width:600 () in - let lMessage = - GMisc.label ~text:msg - ~packing:(window#vbox#pack ~expand:false ~fill:false ~padding:5) () in - let scrolled_window = - GBin.scrolled_window ~border_width:10 - ~packing:(window#vbox#pack ~expand:true ~fill:true ~padding:5) () in - let clist = - let expected_height = 18 * List.length uris in - let height = if expected_height > 400 then 400 else expected_height in - GList.clist ~columns:1 ~packing:scrolled_window#add - ~height ~selection_mode:(selection_mode :> Gtk.Tags.selection_mode) () in - let _ = List.map (function x -> clist#append [x]) uris in - let hbox2 = - GPack.hbox ~border_width:0 - ~packing:(window#vbox#pack ~expand:false ~fill:false ~padding:5) () in - let explain_label = - GMisc.label ~text:"None of the above. Try this one:" - ~packing:(hbox2#pack ~expand:false ~fill:false ~padding:5) () in - let manual_input = - GEdit.entry ~editable:true - ~packing:(hbox2#pack ~expand:true ~fill:true ~padding:5) () in - let hbox = - GPack.hbox ~border_width:0 ~packing:window#action_area#add () in - let okb = - GButton.button ~label:ok - ~packing:(hbox#pack ~expand:false ~fill:false ~padding:5) () in - let _ = okb#misc#set_sensitive false in - let nonvarsb = - GButton.button - ~packing: - (function w -> - if enable_button_for_non_vars then - hbox#pack ~expand:false ~fill:false ~padding:5 w) - ~label:"Try constants only" () in - let autob = - GButton.button - ~packing: - (fun w -> - if enable_button_for_non_vars then - hbox#pack ~expand:false ~fill:false ~padding:5 w) - ~label:"Auto" () in - let checkb = - GButton.button ~label:"Check" - ~packing:(hbox#pack ~padding:5) () in - let _ = checkb#misc#set_sensitive false in - let cancelb = - GButton.button ~label:"Abort" - ~packing:(hbox#pack ~expand:false ~fill:false ~padding:5) () in - (* actions *) - let check_callback () = - assert (List.length !choices > 0) ; - check_window !choices - in - ignore (window#connect#destroy GMain.Main.quit) ; - ignore (cancelb#connect#clicked window#destroy) ; - ignore - (okb#connect#clicked (function () -> chosen := true ; window#destroy ())) ; - ignore - (nonvarsb#connect#clicked - (function () -> - use_only_constants := true ; - chosen := true ; - window#destroy () - )) ; - ignore (autob#connect#clicked (fun () -> - auto_disambiguation := true; - (rendering_window ())#set_auto_disambiguation true; - use_only_constants := true ; - chosen := true; - window#destroy ())); - ignore (checkb#connect#clicked check_callback) ; - ignore - (clist#connect#select_row - (fun ~row ~column ~event -> - checkb#misc#set_sensitive true ; - okb#misc#set_sensitive true ; - choices := (List.nth uris row)::!choices)) ; - ignore - (clist#connect#unselect_row - (fun ~row ~column ~event -> - choices := - List.filter (function uri -> uri != (List.nth uris row)) !choices)) ; - ignore - (manual_input#connect#changed - (fun _ -> - if manual_input#text = "" then - begin - choices := [] ; - checkb#misc#set_sensitive false ; - okb#misc#set_sensitive false ; - clist#misc#set_sensitive true - end - else - begin - choices := [manual_input#text] ; - clist#unselect_all () ; - checkb#misc#set_sensitive true ; - okb#misc#set_sensitive true ; - clist#misc#set_sensitive false - end)); - window#set_position `CENTER ; - window#show () ; - GtkThread.main (); - if !chosen then - if !use_only_constants then - Lazy.force only_constant_choices - else - if List.length !choices > 0 then !choices else raise NoChoice - else - raise NoChoice - end -;; - -let interactive_interpretation_choice interpretations = - let chosen = ref None in - let window = - GWindow.window - ~modal:true ~title:"Ambiguous well-typed input." ~border_width:2 () in - let vbox = GPack.vbox ~packing:window#add () in - let lMessage = - GMisc.label - ~text: - ("Ambiguous input since there are many well-typed interpretations." ^ - " Please, choose one of them.") - ~packing:(vbox#pack ~expand:false ~fill:false ~padding:5) () in - let notebook = - GPack.notebook ~scrollable:true - ~packing:(vbox#pack ~expand:true ~fill:true ~padding:5) () in - let _ = - List.map - (function interpretation -> - let clist = - let expected_height = 18 * List.length interpretation in - let height = if expected_height > 400 then 400 else expected_height in - GList.clist ~columns:2 ~packing:notebook#append_page ~height - ~titles:["id" ; "URI"] () - in - ignore - (List.map - (function (id,uri) -> - let n = clist#append [id;uri] in - clist#set_row ~selectable:false n - ) interpretation - ) ; - clist#columns_autosize () - ) interpretations in - let hbox = - GPack.hbox ~packing:(vbox#pack ~expand:false ~fill:false ~padding:5) () in - let okb = - GButton.button ~label:"Ok" - ~packing:(hbox#pack ~expand:false ~fill:false ~padding:5) () in - let cancelb = - GButton.button ~label:"Abort" - ~packing:(hbox#pack ~expand:false ~fill:false ~padding:5) () in - (* actions *) - ignore (window#connect#destroy GMain.Main.quit) ; - ignore (cancelb#connect#clicked window#destroy) ; - ignore - (okb#connect#clicked - (function () -> chosen := Some notebook#current_page ; window#destroy ())) ; - window#set_position `CENTER ; - window#show () ; - GtkThread.main (); - match !chosen with - None -> raise NoChoice - | Some n -> [n] -;; - - -(* MISC FUNCTIONS *) - -let - save_object_to_disk uri annobj ids_to_inner_sorts ids_to_inner_types pathname -= - let name = - let struri = UriManager.string_of_uri uri in - let idx = (String.rindex struri '/') + 1 in - String.sub struri idx (String.length struri - idx) - in - let path = pathname ^ "/" ^ name in - let xml, bodyxml = - Cic2Xml.print_object uri ~ids_to_inner_sorts ~ask_dtd_to_the_getter:false - annobj - in - let xmlinnertypes = - Cic2Xml.print_inner_types uri ~ids_to_inner_sorts ~ids_to_inner_types - ~ask_dtd_to_the_getter:false - in - (* innertypes *) - let innertypesuri = UriManager.innertypesuri_of_uri uri in - Xml.pp ~gzip:false xmlinnertypes (Some (path ^ ".types.xml")) ; - Http_getter.register' innertypesuri - (Helm_registry.get "local_library.url" ^ - Str.replace_first (Str.regexp "^cic:") "" - (UriManager.string_of_uri innertypesuri) ^ ".xml" - ) ; - (* constant type / variable / mutual inductive types definition *) - Xml.pp ~gzip:false xml (Some (path ^ ".xml")) ; - Http_getter.register' uri - (Helm_registry.get "local_library.url" ^ - Str.replace_first (Str.regexp "^cic:") "" - (UriManager.string_of_uri uri) ^ ".xml" - ) ; - match bodyxml with - None -> () - | Some bodyxml' -> - (* constant body *) - let bodyuri = - match UriManager.bodyuri_of_uri uri with - None -> assert false - | Some bodyuri -> bodyuri - in - Xml.pp ~gzip:false bodyxml' (Some (path ^ ".body.xml")) ; - Http_getter.register' bodyuri - (Helm_registry.get "local_library.url" ^ - Str.replace_first (Str.regexp "^cic:") "" - (UriManager.string_of_uri bodyuri) ^ ".xml" - ) -;; - - -(* CALLBACKS *) - -exception OpenConjecturesStillThere;; -exception WrongProof;; - -let pathname_of_annuri uristring = - Helm_registry.get "local_library.dir" ^ - Str.replace_first (Str.regexp "^cic:") "" uristring -;; - -let make_dirs dirpath = - ignore (Unix.system ("mkdir -p " ^ dirpath)) -;; - -let save_obj uri obj = - let - (acic,ids_to_terms,ids_to_father_ids,ids_to_inner_sorts, - ids_to_inner_types,ids_to_conjectures,ids_to_hypotheses) - = - Cic2acic.acic_object_of_cic_object ~eta_fix:false obj - in - (* let's save the theorem and register it to the getter *) - let pathname = pathname_of_annuri (UriManager.buri_of_uri uri) in - make_dirs pathname ; - save_object_to_disk uri acic ids_to_inner_sorts ids_to_inner_types - pathname -;; - -let qed () = - match ProofEngine.get_proof () with - None -> assert false - | Some (uri,[],bo,ty) -> - let uri = match uri with Some uri -> uri | _ -> assert false in - (* we want to typecheck in the ENV *) - prerr_endline "-------------> QED"; - let ty_bo,u = - CicTypeChecker.type_of_aux' [] [] bo CicUniv.empty_ugraph in - let b,u1 = CicReduction.are_convertible [] ty_bo ty u in - if b then - begin - (*CSC: Wrong: [] is just plainly wrong *) - let proof = - Cic.Constant (UriManager.name_of_uri uri,Some bo,ty,[],[]) - in - let (acic,ids_to_inner_types,ids_to_inner_sorts) = - (rendering_window ())#output#load_proof proof - in - !qed_set_sensitive false ; - (* let's save the theorem and register it to the getter *) - let pathname = - pathname_of_annuri (UriManager.buri_of_uri uri) - in - let list_of_universes = - CicUnivUtils.universes_of_obj uri - (Cic.Constant ("",None,ty,[],[])) - in - let u1_clean = CicUniv.clean_ugraph u1 list_of_universes in - let u2 = CicUniv.fill_empty_nodes_with_uri u1_clean uri in - (********************************************** - TASSI: to uncomment whe universes will be ON - ***********************************************) - (* - make_dirs pathname ; - save_object_to_disk uri acic ids_to_inner_sorts - ids_to_inner_types pathname; - *) - (* save the universe graph u2 *) - (* add the object to the env *) - CicEnvironment.add_type_checked_term uri (( - Cic.Constant ((UriManager.name_of_uri uri), - (Some bo),ty,[],[])),u2); - (* FIXME: the variable list!! *) - prerr_endline "-------------> FINE"; - end - else - raise WrongProof - | _ -> raise OpenConjecturesStillThere -;; - - (** save an unfinished proof on the filesystem *) -let save_unfinished_proof () = - let (xml, bodyxml) = ProofEngine.get_current_status_as_xml () in - let proof_file_type = Helm_registry.get "gtoplevel.proof_file_type" in - let proof_file = Helm_registry.get "gtoplevel.proof_file" in - Xml.pp ~gzip:false xml (Some proof_file_type) ; - HelmLogger.log - (`Msg (`T ("Current proof type saved to " ^ proof_file_type))) ; - Xml.pp ~gzip:false bodyxml (Some proof_file) ; - HelmLogger.log - (`Msg (`T ("Current proof body saved to " ^ proof_file))) -;; - -(* Used to typecheck the loaded proofs *) -let typecheck_loaded_proof metasenv bo ty = - let module T = CicTypeChecker in - ignore ( - List.fold_left - (fun metasenv ((_,context,ty) as conj) -> - ignore (T.type_of_aux' metasenv context ty CicUniv.empty_ugraph) ; - metasenv @ [conj] - ) [] metasenv) ; - ignore (T.type_of_aux' metasenv [] ty CicUniv.empty_ugraph) ; - ignore (T.type_of_aux' metasenv [] bo CicUniv.empty_ugraph) -;; - -let decompose_uris_choice_callback uris = -(* N.B.: in questo passaggio perdo l'informazione su exp_named_subst !!!! *) - let module U = UriManager in - List.map - (function uri -> - match CicUtil.term_of_uri uri with - | Cic.MutInd (uri, typeno, _) -> (uri, typeno, []) - | _ -> assert false) - (interactive_user_uri_choice - ~selection_mode:`MULTIPLE ~ok:"Ok" ~enable_button_for_non_vars:false - ~title:"Decompose" ~msg:"Please, select the Inductive Types to decompose" - (List.map - (function (uri,typeno,_) -> - U.string_of_uri uri ^ "#1/" ^ string_of_int (typeno+1) - ) uris) - ) -;; - -let mk_fresh_name_callback metasenv context name ~typ = - let fresh_name = - match FreshNamesGenerator.mk_fresh_name ~subst:[] metasenv context name ~typ with - Cic.Name fresh_name -> fresh_name - | Cic.Anonymous -> assert false - in - match - GToolbox.input_string ~title:"Enter a fresh hypothesis name" ~text:fresh_name - ("Enter a fresh name for the hypothesis " ^ - CicPp.pp typ - (List.map (function None -> None | Some (n,_) -> Some n) context)) - with - Some fresh_name' -> Cic.Name fresh_name' - | None -> raise NoChoice -;; - -let refresh_proof (output : TermViewer.proof_viewer) = - try - let uri,currentproof = - match ProofEngine.get_proof () with - None -> assert false - | Some (uri,metasenv,bo,ty) -> - ProofEngine.set_proof (Some (uri,metasenv,bo,ty)) ; - if List.length metasenv = 0 then - begin - !qed_set_sensitive true ; - Hbugs.clear () - end - else - Hbugs.notify () ; - (*CSC: Wrong: [] is just plainly wrong *) - let uri = match uri with Some uri -> uri | _ -> assert false in - (uri, - Cic.CurrentProof (UriManager.name_of_uri uri,metasenv,bo,ty,[],[])) - in - ignore (output#load_proof currentproof) - with - e -> - match ProofEngine.get_proof () with - None -> assert false - | Some (uri,metasenv,bo,ty) -> - debug_print ("Offending proof: " ^ - CicPp.ppobj (Cic.CurrentProof ("questa",metasenv,bo,ty,[],[]))); - raise (InvokeTactics.RefreshProofException e) - -let set_proof_engine_goal g = - ProofEngine.goal := g -;; - -let refresh_goals ?(empty_notebook=true) notebook = - try - match !ProofEngine.goal with - None -> - if empty_notebook then - begin - notebook#remove_all_pages ~skip_switch_page_event:false ; - notebook#set_empty_page - end - else - notebook#proofw#unload - | Some metano -> - let metasenv = - match ProofEngine.get_proof () with - None -> assert false - | Some (_,metasenv,_,_) -> metasenv - in - let currentsequent = - List.find (function (m,_,_) -> m=metano) metasenv - in - let regenerate_notebook () = - let skip_switch_page_event = - match metasenv with - (m,_,_)::_ when m = metano -> false - | _ -> true - in - notebook#remove_all_pages ~skip_switch_page_event ; - List.iter (function (m,_,_) -> notebook#add_page m) metasenv ; - in - if empty_notebook then - begin - regenerate_notebook () ; - notebook#set_current_page - ~may_skip_switch_page_event:false metano - end - else - begin - notebook#set_current_page - ~may_skip_switch_page_event:true metano ; - notebook#proofw#load_sequent metasenv currentsequent ; - end - with - e -> -let metano = - match !ProofEngine.goal with - None -> assert false - | Some m -> m -in -let metasenv = - match ProofEngine.get_proof () with - None -> assert false - | Some (_,metasenv,_,_) -> metasenv -in -try - let currentsequent = List.find (function (m,_,_) -> m=metano) metasenv in - debug_print - ("Offending sequent: " ^ SequentPp.TextualPp.print_sequent currentsequent); - raise (InvokeTactics.RefreshSequentException e) -with Not_found -> - debug_print ("Offending sequent " ^ string_of_int metano ^ " unknown."); - raise (InvokeTactics.RefreshSequentException e) - -module InvokeTacticsCallbacks = - struct - let sequent_viewer () = (rendering_window ())#notebook#proofw - let term_editor () = (rendering_window ())#inputt - let scratch_window () = (rendering_window ())#scratch_window - - let refresh_proof () = - let output = ((rendering_window ())#output : TermViewer.proof_viewer) in - refresh_proof output - - let refresh_goals () = - let notebook = (rendering_window ())#notebook in - refresh_goals notebook - - let decompose_uris_choice_callback = decompose_uris_choice_callback - let mk_fresh_name_callback = mk_fresh_name_callback - let mqi_handle = mqi_handle - let dbd = dbd - end -;; -module InvokeTactics' = InvokeTactics.Make (InvokeTacticsCallbacks);; -(* -(* Just to initialize the Hbugs module *) -module Ignore = Hbugs.Initialize (InvokeTactics');; -Hbugs.set_describe_hint_callback (fun hint -> - match hint with - | Hbugs_types.Use_apply_Luke term -> check_window [term] - | _ -> ()) -;; -*) -let dummy_uri = "/dummy.con" - - (** load an unfinished proof from filesystem *) -let load_unfinished_proof () = - let output = ((rendering_window ())#output : TermViewer.proof_viewer) in - let notebook = (rendering_window ())#notebook in - try - match - GToolbox.input_string ~title:"Load Unfinished Proof" ~text:dummy_uri - "Choose an URI:" - with - None -> raise NoChoice - | Some uri0 -> - let uri = UriManager.uri_of_string ("cic:" ^ uri0) in - let proof_file_type = Helm_registry.get "gtoplevel.proof_file_type" in - let proof_file = Helm_registry.get "gtoplevel.proof_file" in - match CicParser.obj_of_xml proof_file_type (Some proof_file) with - Cic.CurrentProof (_,metasenv,bo,ty,_,_) -> - typecheck_loaded_proof metasenv bo ty ; - ProofEngine.set_proof (Some (Some uri, metasenv, bo, ty)); - refresh_proof output ; - set_proof_engine_goal - (match metasenv with - [] -> None - | (metano,_,_)::_ -> Some metano - ) ; - refresh_goals notebook ; - HelmLogger.log - (`Msg (`T ("Current proof type loaded from " ^ proof_file_type))); - HelmLogger.log - (`Msg (`T ("Current proof body loaded from " ^ proof_file))) ; - !save_set_sensitive true; - | _ -> assert false - with - InvokeTactics.RefreshSequentException e -> - HelmLogger.log - (`Error (`T ("Exception raised during the refresh of the " ^ - "sequent: " ^ Printexc.to_string e))) - | InvokeTactics.RefreshProofException e -> - HelmLogger.log - (`Error (`T ("Exception raised during the refresh of the " ^ - "proof: " ^ Printexc.to_string e))) - | e -> - HelmLogger.log - (`Error (`T (Printexc.to_string e))) -;; - -let clear_aliases () = - let inputt = ((rendering_window ())#inputt : TermEditor.term_editor) in - inputt#environment := - DisambiguatingParser.EnvironmentP3.of_string - DisambiguatingParser.EnvironmentP3.empty -;; - -let edit_aliases () = - let inputt = ((rendering_window ())#inputt : TermEditor.term_editor) in - let disambiguation_env = inputt#environment in - let chosen_aliases = ref None in - let window = - GWindow.window - ~width:400 ~modal:true ~title:"Edit Aliases..." ~border_width:2 () in - let vbox = - GPack.vbox ~border_width:0 ~packing:window#add () in - let scrolled_window = - GBin.scrolled_window ~border_width:10 - ~packing:(vbox#pack ~expand:true ~fill:true ~padding:5) () in - let input = GText.view ~editable:true ~width:400 ~height:100 - ~packing:scrolled_window#add () in - let hbox = - GPack.hbox ~border_width:0 - ~packing:(vbox#pack ~expand:false ~fill:false ~padding:5) () in - let okb = - GButton.button ~label:"Ok" - ~packing:(hbox#pack ~expand:false ~fill:false ~padding:5) () in - let clearb = - GButton.button ~label:"Clear" - ~packing:(hbox#pack ~expand:false ~fill:false ~padding:5) () in - let cancelb = - GButton.button ~label:"Cancel" - ~packing:(hbox#pack ~expand:false ~fill:false ~padding:5) () in - ignore (window#connect#destroy GMain.Main.quit) ; - ignore (cancelb#connect#clicked window#destroy) ; - ignore (clearb#connect#clicked (fun () -> - input#buffer#set_text DisambiguatingParser.EnvironmentP3.empty)) ; - ignore (okb#connect#clicked (fun () -> - chosen_aliases := Some (input#buffer#get_text ()); - window#destroy ())); - ignore - (input#buffer#insert ~iter:(input#buffer#get_iter_at_char 0) - (DisambiguatingParser.EnvironmentP3.to_string !disambiguation_env ^ "\n")); - window#show () ; - GtkThread.main (); - match !chosen_aliases with - | None -> () - | Some raw_aliases -> - let new_disambiguation_env = - (try - DisambiguatingParser.EnvironmentP3.of_string raw_aliases - with e -> - HelmLogger.log - (`Error (`T - ("Error while parsing aliases: " ^ Printexc.to_string e))); - !disambiguation_env) - in - disambiguation_env := new_disambiguation_env -;; - -let proveit () = - let module L = LogicalOperations in - let module G = Gdome in - let notebook = (rendering_window ())#notebook in - let output = (rendering_window ())#output in - try - output#make_sequent_of_selected_term ; - refresh_proof output ; - refresh_goals notebook - with - InvokeTactics.RefreshSequentException e -> - HelmLogger.log - (`Error (`T ("Exception raised during the refresh of the " ^ - "sequent: " ^ Printexc.to_string e))) - | InvokeTactics.RefreshProofException e -> - HelmLogger.log - (`Error (`T ("Exception raised during the refresh of the " ^ - "proof: " ^ Printexc.to_string e))) - | e -> - HelmLogger.log - (`Error (`T (Printexc.to_string e))) -;; - -let focus () = - let module L = LogicalOperations in - let module G = Gdome in - let notebook = (rendering_window ())#notebook in - let output = (rendering_window ())#output in - try - output#focus_sequent_of_selected_term ; - refresh_goals notebook - with - InvokeTactics.RefreshSequentException e -> - HelmLogger.log - (`Error (`T ("Exception raised during the refresh of the " ^ - "sequent: " ^ Printexc.to_string e))) - | InvokeTactics.RefreshProofException e -> - HelmLogger.log - (`Error (`T ("Exception raised during the refresh of the " ^ - "proof: " ^ Printexc.to_string e))) - | e -> - HelmLogger.log - (`Error (`T (Printexc.to_string e))) -;; - -exception NoPrevGoal;; -exception NoNextGoal;; - -let setgoal metano = - let module L = LogicalOperations in - let module G = Gdome in - let notebook = (rendering_window ())#notebook in - let output = (rendering_window ())#output in - let metasenv = - match ProofEngine.get_proof () with - None -> assert false - | Some (_,metasenv,_,_) -> metasenv - in - try - refresh_goals ~empty_notebook:false notebook - with - InvokeTactics.RefreshSequentException e -> - HelmLogger.log - (`Error (`T ("Exception raised during the refresh of the " ^ - "sequent: " ^ Printexc.to_string e))) - | e -> - HelmLogger.log - (`Error (`T (Printexc.to_string e))) -;; - -let - show_in_show_window_obj, show_in_show_window_uri, show_in_show_window_callback -= - let window = - GWindow.window ~width:800 ~border_width:2 () in - let scrolled_window = - GBin.scrolled_window ~border_width:10 ~packing:window#add () in - let mmlwidget = - GMathViewAux.single_selection_math_view - ~packing:scrolled_window#add ~width:600 ~height:400 () - in - let _ = window#event#connect#delete (fun _ -> window#misc#hide () ; true ) in - let href = Gdome.domString "href" in - let show_in_show_window_obj uri obj = - try - let mml,(_,(ids_to_terms,ids_to_father_ids,ids_to_conjectures, - ids_to_hypotheses,_,_)) = - ApplyTransformation.mml_of_cic_object obj - in - window#set_title (UriManager.string_of_uri uri) ; - window#misc#hide () ; window#show () ; - mmlwidget#load_root mml#get_documentElement ; - with - e -> - HelmLogger.log - (`Error (`T (Printexc.to_string e))) - in - let show_in_show_window_uri uri = - let obj,_ = CicEnvironment.get_obj CicUniv.empty_ugraph uri in - show_in_show_window_obj uri obj - in - let show_in_show_window_callback mmlwidget ((n : Gdome.element option),_,_,_) = - match n with - None -> () - | Some n' -> - if n'#hasAttributeNS ~namespaceURI:Misc.xlink_ns ~localName:href then - let uri = - (n'#getAttributeNS ~namespaceURI:Misc.xlink_ns ~localName:href)#to_string - in - show_in_show_window_uri (UriManager.uri_of_string uri) - else - ignore (mmlwidget#action_toggle n') - in - let _ = - mmlwidget#connect#click (show_in_show_window_callback mmlwidget) - in - show_in_show_window_obj, show_in_show_window_uri, - show_in_show_window_callback -;; - -exception NoObjectsLocated;; - -let user_uri_choice ~title ~msg uris = - let uri = - match uris with - [] -> raise NoObjectsLocated - | [uri] -> uri - | uris -> - match - interactive_user_uri_choice ~selection_mode:`SINGLE ~title ~msg uris - with - [uri] -> uri - | _ -> assert false - in - String.sub uri 4 (String.length uri - 4) -;; - -let locate_callback id = - let uris = MetadataQuery.locate ~dbd id in - HelmLogger.log (`Msg (`T ("Locate Query: " ^ id))) ; - HelmLogger.log (`Msg (`T "Result:")) ; - List.iter (fun uri -> HelmLogger.log (`Msg (`T uri))) uris; - user_uri_choice ~title:"Ambiguous input." - ~msg:(sprintf "Ambiguous input \"%s\". Please, choose one interpetation:" id) - uris -;; - - -let input_or_locate_uri ~title = - let uri = ref None in - let window = - GWindow.window - ~width:400 ~modal:true ~title ~border_width:2 () in - let vbox = GPack.vbox ~packing:window#add () in - let hbox1 = - GPack.hbox ~packing:(vbox#pack ~expand:false ~fill:false ~padding:5) () in - let _ = - GMisc.label ~text:"Enter a valid URI:" ~packing:(hbox1#pack ~padding:5) () in - let manual_input = - GEdit.entry ~editable:true - ~packing:(hbox1#pack ~expand:true ~fill:true ~padding:5) () in - let checkb = - GButton.button ~label:"Check" - ~packing:(hbox1#pack ~expand:false ~fill:false ~padding:5) () in - let _ = checkb#misc#set_sensitive false in - let hbox2 = - GPack.hbox ~packing:(vbox#pack ~expand:false ~fill:false ~padding:5) () in - let _ = - GMisc.label ~text:"You can also enter an indentifier to locate:" - ~packing:(hbox2#pack ~padding:5) () in - let locate_input = - GEdit.entry ~editable:true - ~packing:(hbox2#pack ~expand:true ~fill:true ~padding:5) () in - let locateb = - GButton.button ~label:"Locate" - ~packing:(hbox2#pack ~expand:false ~fill:false ~padding:5) () in - let _ = locateb#misc#set_sensitive false in - let hbox3 = - GPack.hbox ~packing:(vbox#pack ~expand:false ~fill:false ~padding:5) () in - let okb = - GButton.button ~label:"Ok" - ~packing:(hbox3#pack ~expand:false ~fill:false ~padding:5) () in - let _ = okb#misc#set_sensitive false in - let cancelb = - GButton.button ~label:"Cancel" - ~packing:(hbox3#pack ~expand:false ~fill:false ~padding:5) () - in - ignore (window#connect#destroy GMain.Main.quit) ; - ignore - (cancelb#connect#clicked (function () -> uri := None ; window#destroy ())) ; - let check_callback () = - let uri = "cic:" ^ manual_input#text in - try - ignore (Http_getter.resolve' (UriManager.uri_of_string uri)) ; - HelmLogger.log (`Msg (`T "OK")) ; - true - with - Http_getter_types.Key_not_found _ -> - HelmLogger.log - (`Error (`T ("URI " ^ uri ^ - " does not correspond to any object."))) ; - false - | UriManager.IllFormedUri _ -> - HelmLogger.log - (`Error (`T ("URI " ^ uri ^ " is not well-formed."))) ; - false - | e -> - HelmLogger.log - (`Error (`T (Printexc.to_string e))) ; - false - in - ignore - (okb#connect#clicked - (function () -> - if check_callback () then - begin - uri := Some manual_input#text ; - window#destroy () - end - )) ; - ignore (checkb#connect#clicked (function () -> ignore (check_callback ()))) ; - ignore - (manual_input#connect#changed - (fun _ -> - if manual_input#text = "" then - begin - checkb#misc#set_sensitive false ; - okb#misc#set_sensitive false - end - else - begin - checkb#misc#set_sensitive true ; - okb#misc#set_sensitive true - end)); - ignore - (locate_input#connect#changed - (fun _ -> locateb#misc#set_sensitive (locate_input#text <> ""))) ; - ignore - (locateb#connect#clicked - (function () -> - let id = locate_input#text in - manual_input#set_text (locate_callback id) ; - locate_input#delete_text 0 (String.length id) - )) ; - window#show () ; - GtkThread.main (); - match !uri with - None -> raise NoChoice - | Some uri -> UriManager.uri_of_string ("cic:" ^ uri) -;; - -exception AmbiguousInput;; - -(* A WIDGET TO ENTER CIC TERMS *) - -module DisambiguateCallbacks = - struct - let interactive_user_uri_choice = - fun ~selection_mode ?ok ?enable_button_for_non_vars ~title ~msg ~id -> - interactive_user_uri_choice ~selection_mode ?ok - ?enable_button_for_non_vars ~title ~msg - let interactive_interpretation_choice = interactive_interpretation_choice - let input_or_locate_uri ~title ?id () = input_or_locate_uri ~title - end -;; - -module TermEditor' = ChosenTermEditor.Make (DisambiguateCallbacks);; - -(* OTHER FUNCTIONS *) - -let locate () = - let inputt = ((rendering_window ())#inputt : TermEditor.term_editor) in - try - match - GToolbox.input_string ~title:"Locate" "Enter an identifier to locate:" - with - None -> raise NoChoice - | Some input -> - let uri = locate_callback input in - inputt#set_term uri - with - e -> - HelmLogger.log - (`Error (`T (Printexc.to_string e))) -;; - - -exception UriAlreadyInUse;; -exception NotAUriToAConstant;; - -let new_inductive () = - let inputt = ((rendering_window ())#inputt : TermEditor.term_editor) in - let output = ((rendering_window ())#output : TermViewer.proof_viewer) in - let notebook = (rendering_window ())#notebook in - - let chosen = ref false in - let inductive = ref true in - let paramsno = ref 0 in - let get_uri = ref (function _ -> assert false) in - let get_base_uri = ref (function _ -> assert false) in - let get_names = ref (function _ -> assert false) in - let get_types_and_cons = ref (function _ -> assert false) in - let get_context_and_subst = ref (function _ -> assert false) in - let window = - GWindow.window - ~width:600 ~modal:true ~position:`CENTER - ~title:"New Block of Mutual (Co)Inductive Definitions" - ~border_width:2 () in - let vbox = GPack.vbox ~packing:window#add () in - let hbox = - GPack.hbox ~border_width:0 - ~packing:(vbox#pack ~expand:false ~fill:false ~padding:5) () in - let _ = - GMisc.label ~text:"Enter the URI for the new block:" - ~packing:(hbox#pack ~expand:false ~fill:false ~padding:5) () in - let uri_entry = - GEdit.entry ~editable:true - ~packing:(hbox#pack ~expand:true ~fill:true ~padding:5) () in - let hbox0 = - GPack.hbox ~border_width:0 - ~packing:(vbox#pack ~expand:false ~fill:false ~padding:5) () in - let _ = - GMisc.label - ~text: - "Enter the number of left parameters in every arity and constructor type:" - ~packing:(hbox0#pack ~expand:false ~fill:false ~padding:5) () in - let paramsno_entry = - GEdit.entry ~editable:true ~text:"0" - ~packing:(hbox0#pack ~expand:true ~fill:true ~padding:5) () in - let hbox1 = - GPack.hbox ~border_width:0 - ~packing:(vbox#pack ~expand:false ~fill:false ~padding:5) () in - let _ = - GMisc.label ~text:"Are the definitions inductive or coinductive?" - ~packing:(hbox1#pack ~expand:false ~fill:false ~padding:5) () in - let inductiveb = - GButton.radio_button ~label:"Inductive" - ~packing:(hbox1#pack ~expand:false ~fill:false ~padding:5) () in - let coinductiveb = - GButton.radio_button ~label:"Coinductive" - ~group:inductiveb#group - ~packing:(hbox1#pack ~expand:false ~fill:false ~padding:5) () in - let hbox2 = - GPack.hbox ~border_width:0 - ~packing:(vbox#pack ~expand:false ~fill:false ~padding:5) () in - let _ = - GMisc.label ~text:"Enter the list of the names of the types:" - ~packing:(hbox2#pack ~expand:false ~fill:false ~padding:5) () in - let names_entry = - GEdit.entry ~editable:true - ~packing:(hbox2#pack ~expand:true ~fill:true ~padding:5) () in - let hboxn = - GPack.hbox ~border_width:0 - ~packing:(vbox#pack ~expand:false ~fill:false ~padding:5) () in - let okb = - GButton.button ~label:"> Next" - ~packing:(hboxn#pack ~expand:false ~fill:false ~padding:5) () in - let _ = okb#misc#set_sensitive true in - let cancelb = - GButton.button ~label:"Abort" - ~packing:(hboxn#pack ~expand:false ~fill:false ~padding:5) () in - ignore (window#connect#destroy GMain.Main.quit) ; - ignore (cancelb#connect#clicked window#destroy) ; - (* First phase *) - let rec phase1 () = - ignore - (okb#connect#clicked - (function () -> - try - let uristr = "cic:" ^ uri_entry#text in - let namesstr = names_entry#text in - let paramsno' = int_of_string (paramsno_entry#text) in - match Str.split (Str.regexp " +") namesstr with - [] -> assert false - | (he::tl) as names -> - let uri = UriManager.uri_of_string (uristr ^ "/" ^ he ^ ".ind") in - begin - try - ignore (Http_getter.resolve' uri) ; - raise UriAlreadyInUse - with Http_getter_types.Key_not_found _ -> - get_uri := (function () -> uri) ; - get_names := (function () -> names) ; - inductive := inductiveb#active ; - paramsno := paramsno' ; - phase2 () - end - with - e -> - HelmLogger.log - (`Error (`T (Printexc.to_string e))) - )) - (* Second phase *) - and phase2 () = - let type_widgets = - List.map - (function name -> - let frame = - GBin.frame ~label:name - ~packing:(vbox#pack ~expand:true ~fill:true ~padding:5) () in - let vbox = GPack.vbox ~packing:frame#add () in - let hbox = GPack.hbox ~packing:(vbox#pack ~expand:false ~fill:false) () in - let _ = - GMisc.label ~text:("Enter its type:") - ~packing:(hbox#pack ~expand:false ~fill:false ~padding:5) () in - let scrolled_window = - GBin.scrolled_window ~border_width:5 - ~packing:(vbox#pack ~expand:true ~padding:0) () in - let newinputt = - TermEditor'.term_editor - ~dbd - ~width:400 ~height:20 ~packing:scrolled_window#add - ~share_environment_with:inputt () - ~isnotempty_callback: - (function b -> - (*non_empty_type := b ;*) - okb#misc#set_sensitive true) (*(b && uri_entry#text <> ""))*) - in - let hbox = - GPack.hbox ~border_width:0 - ~packing:(vbox#pack ~expand:false ~fill:false ~padding:5) () in - let _ = - GMisc.label ~text:("Enter the list of its constructors:") - ~packing:(hbox#pack ~expand:false ~fill:false ~padding:5) () in - let cons_names_entry = - GEdit.entry ~editable:true - ~packing:(hbox#pack ~expand:true ~fill:true ~padding:5) () in - (newinputt,cons_names_entry) - ) (!get_names ()) - in - vbox#remove hboxn#coerce ; - let hboxn = - GPack.hbox ~border_width:0 - ~packing:(vbox#pack ~expand:false ~fill:false ~padding:5) () in - let okb = - GButton.button ~label:"> Next" - ~packing:(hboxn#pack ~expand:false ~fill:false ~padding:5) () in - let cancelb = - GButton.button ~label:"Abort" - ~packing:(hboxn#pack ~expand:false ~fill:false ~padding:5) () in - ignore (cancelb#connect#clicked window#destroy) ; - ignore - (okb#connect#clicked - (function () -> - try - let names = !get_names () in - let types_and_cons = - List.map2 - (fun name (newinputt,cons_names_entry) -> - let consnamesstr = cons_names_entry#text in - let cons_names = Str.split (Str.regexp " +") consnamesstr in - let metasenv,expr,ugraph = - newinputt#get_metasenv_and_term ~context:[] ~metasenv:[] - in - match metasenv with - [] -> expr,cons_names - | _ -> raise AmbiguousInput - ) names type_widgets - in - let uri = !get_uri () in - let _ = - (* Let's see if so far the definition is well-typed *) - let params = [] in - let paramsno = 0 in - (* To test if the arities of the inductive types are well *) - (* typed, we check the inductive block definition where *) - (* no constructor is given to each type. *) - let tys = - List.map2 - (fun name (ty,cons) -> (name, !inductive, ty, [])) - names types_and_cons - in - CicTypeChecker.typecheck_mutual_inductive_defs uri - (tys,params,paramsno) - in - get_context_and_subst := - (function () -> - let i = ref 0 in - List.fold_left2 - (fun (context,subst) name (ty,_) -> - let res = - (Some (Cic.Name name, Cic.Decl ty))::context, - (Cic.MutInd (uri,!i,[]))::subst - in - incr i ; res - ) ([],[]) names types_and_cons) ; - let types_and_cons' = - List.map2 - (fun name (ty,cons) -> (name, !inductive, ty, phase3 name cons)) - names types_and_cons - in - get_types_and_cons := (function () -> types_and_cons') ; - chosen := true ; - window#destroy () - with - e -> - HelmLogger.log - (`Error (`T (Printexc.to_string e))) - )) - (* Third phase *) - and phase3 name cons = - let get_cons_types = ref (function () -> assert false) in - let window2 = - GWindow.window - ~width:600 ~modal:true ~position:`CENTER - ~title:(name ^ " Constructors") - ~border_width:2 () in - let vbox = GPack.vbox ~packing:window2#add () in - let cons_type_widgets = - List.map - (function consname -> - let hbox = - GPack.hbox ~border_width:0 - ~packing:(vbox#pack ~expand:false ~fill:false ~padding:5) () in - let _ = - GMisc.label ~text:("Enter the type of " ^ consname ^ ":") - ~packing:(hbox#pack ~expand:false ~fill:false ~padding:5) () in - let scrolled_window = - GBin.scrolled_window ~border_width:5 - ~packing:(vbox#pack ~expand:true ~padding:0) () in - let newinputt = - TermEditor'.term_editor - ~dbd - ~width:400 ~height:20 ~packing:scrolled_window#add - ~share_environment_with:inputt () - ~isnotempty_callback: - (function b -> - (* (*non_empty_type := b ;*) - okb#misc#set_sensitive true) (*(b && uri_entry#text <> ""))*) *)()) - in - newinputt - ) cons in - let hboxn = - GPack.hbox ~border_width:0 - ~packing:(vbox#pack ~expand:false ~fill:false ~padding:5) () in - let okb = - GButton.button ~label:"> Next" - ~packing:(hboxn#pack ~expand:false ~fill:false ~padding:5) () in - let _ = okb#misc#set_sensitive true in - let cancelb = - GButton.button ~label:"Abort" - ~packing:(hboxn#pack ~expand:false ~fill:false ~padding:5) () in - ignore (window2#connect#destroy GMain.Main.quit) ; - ignore (cancelb#connect#clicked window2#destroy) ; - ignore - (okb#connect#clicked - (function () -> - try - chosen := true ; - let context,subst= !get_context_and_subst () in - let cons_types = - List.map2 - (fun name inputt -> - let metasenv,expr,ugraph = - inputt#get_metasenv_and_term ~context ~metasenv:[] - in - match metasenv with - [] -> - let undebrujined_expr = - List.fold_left - (fun expr t -> CicSubstitution.subst t expr) expr subst - in - name, undebrujined_expr - | _ -> raise AmbiguousInput - ) cons cons_type_widgets - in - get_cons_types := (function () -> cons_types) ; - window2#destroy () - with - e -> - HelmLogger.log - (`Error (`T (Printexc.to_string e))) - )) ; - window2#show () ; - GtkThread.main (); - let okb_pressed = !chosen in - chosen := false ; - if (not okb_pressed) then - begin - window#destroy () ; - assert false (* The control never reaches this point *) - end - else - (!get_cons_types ()) - in - phase1 () ; - (* No more phases left or Abort pressed *) - window#show () ; - GtkThread.main (); - window#destroy () ; - if !chosen then - try - let uri = !get_uri () in -(*CSC: Da finire *) - let params = [] in - let tys = !get_types_and_cons () in - let obj = Cic.InductiveDefinition(tys,params,!paramsno,[]) in - let u = - begin - try - debug_print (CicPp.ppobj obj); - CicTypeChecker.typecheck_mutual_inductive_defs uri - (tys,params,!paramsno) CicUniv.empty_ugraph - with - e -> - debug_print "Offending mutual (co)inductive type declaration:" ; - debug_print (CicPp.ppobj obj) ; - (* I think we should fail here! *) - CicUniv.empty_ugraph - end - in - (* We already know that obj is well-typed. We need to add it to the *) - (* environment in order to compute the inner-types without having to *) - (* debrujin it or having to modify lots of other functions to avoid *) - (* asking the environment for the MUTINDs we are defining now. *) - - (* u should be cleaned before adding it to the env *) - CicEnvironment.put_inductive_definition uri (obj,u) ; - save_obj uri obj ; - (* TASSI: FIXME we should save the cleaned u here *) - show_in_show_window_obj uri obj - with - e -> - HelmLogger.log - (`Error (`T (Printexc.to_string e))) -;; - -let new_proof () = - let inputt = ((rendering_window ())#inputt : TermEditor.term_editor) in - let output = ((rendering_window ())#output : TermViewer.proof_viewer) in - let notebook = (rendering_window ())#notebook in - - let chosen = ref false in - let get_metasenv_and_term = ref (function _ -> assert false) in - let get_uri = ref (function _ -> assert false) in - let non_empty_type = ref false in - let window = - GWindow.window - ~width:600 ~modal:true ~title:"New Proof or Definition" - ~border_width:2 () in - let vbox = GPack.vbox ~packing:window#add () in - let hbox = - GPack.hbox ~border_width:0 - ~packing:(vbox#pack ~expand:false ~fill:false ~padding:5) () in - let _ = - GMisc.label ~text:"Enter the URI for the new theorem or definition:" - ~packing:(hbox#pack ~expand:false ~fill:false ~padding:5) () in - let uri_entry = - GEdit.entry ~editable:true - ~packing:(hbox#pack ~expand:true ~fill:true ~padding:5) () in - uri_entry#set_text dummy_uri; - uri_entry#select_region ~start:1 ~stop:(String.length dummy_uri); - let hbox1 = - GPack.hbox ~border_width:0 - ~packing:(vbox#pack ~expand:false ~fill:false ~padding:5) () in - let _ = - GMisc.label ~text:"Enter the theorem or definition type:" - ~packing:(hbox1#pack ~expand:false ~fill:false ~padding:5) () in - let scrolled_window = - GBin.scrolled_window ~border_width:5 - ~packing:(vbox#pack ~expand:true ~padding:0) () in - (* the content of the scrolled_window is moved below (see comment) *) - let hbox = - GPack.hbox ~border_width:0 - ~packing:(vbox#pack ~expand:false ~fill:false ~padding:5) () in - let okb = - GButton.button ~label:"Ok" - ~packing:(hbox#pack ~expand:false ~fill:false ~padding:5) () in - let _ = okb#misc#set_sensitive false in - let cancelb = - GButton.button ~label:"Cancel" - ~packing:(hbox#pack ~expand:false ~fill:false ~padding:5) () in - (* moved here to have visibility of the ok button *) - let newinputt = - TermEditor'.term_editor - ~dbd - ~width:400 ~height:100 ~packing:scrolled_window#add - ~share_environment_with:inputt () - ~isnotempty_callback: - (function b -> - non_empty_type := b ; - okb#misc#set_sensitive (b && uri_entry#text <> "")) - in - let _ = - newinputt#set_term inputt#get_as_string ; - inputt#reset in - let _ = - uri_entry#connect#changed - (function () -> - okb#misc#set_sensitive (!non_empty_type && uri_entry#text <> "")) - in - ignore (window#connect#destroy GMain.Main.quit) ; - ignore (cancelb#connect#clicked window#destroy) ; - ignore - (okb#connect#clicked - (function () -> - chosen := true ; - try - let metasenv,parsed,ugraph = newinputt#get_metasenv_and_term [] [] in - let uristr = "cic:" ^ uri_entry#text in - let uri = UriManager.uri_of_string uristr in - if String.sub uristr (String.length uristr - 4) 4 <> ".con" then - raise NotAUriToAConstant - else - begin - try - ignore (Http_getter.resolve' uri) ; - raise UriAlreadyInUse - with Http_getter_types.Key_not_found _ -> - get_metasenv_and_term := (function () -> metasenv,parsed) ; - get_uri := (function () -> uri) ; - window#destroy () - end - with - e -> - HelmLogger.log - (`Error (`T (Printexc.to_string e))) - )) ; - window#show () ; - GtkThread.main (); - if !chosen then - try - let metasenv,expr = !get_metasenv_and_term () in - let _ = CicTypeChecker.type_of_aux' metasenv [] expr in - ProofEngine.set_proof - (Some (Some (!get_uri ()), (1,[],expr)::metasenv, Cic.Meta (1,[]), expr)); - set_proof_engine_goal (Some 1) ; - refresh_goals notebook ; - refresh_proof output ; - !save_set_sensitive true ; - inputt#reset ; - ProofEngine.intros ~mk_fresh_name_callback () ; - refresh_goals notebook ; - refresh_proof output - with - InvokeTactics.RefreshSequentException e -> - HelmLogger.log - (`Error (`T ("Exception raised during the refresh of the " ^ - "sequent: " ^ Printexc.to_string e))) - | InvokeTactics.RefreshProofException e -> - HelmLogger.log - (`Error (`T ("Exception raised during the refresh of the " ^ - "proof: " ^ Printexc.to_string e))) - | e -> - HelmLogger.log - (`Error (`T (Printexc.to_string e))) -;; - -let check_term_in_scratch scratch_window metasenv context expr = - try - let ty,ugraph = - CicTypeChecker.type_of_aux' metasenv context expr CicUniv.empty_ugraph - in - let expr = Cic.Cast (expr,ty) in - scratch_window#show () ; - scratch_window#set_term expr ; - scratch_window#set_context context ; - scratch_window#set_metasenv metasenv ; - scratch_window#sequent_viewer#load_sequent metasenv (111,context,expr) - with - e -> - print_endline ("? " ^ CicPp.ppterm expr) ; - raise e -;; - -let check scratch_window () = - let inputt = ((rendering_window ())#inputt : TermEditor.term_editor) in - let metasenv = - match ProofEngine.get_proof () with - None -> [] - | Some (_,metasenv,_,_) -> metasenv - in - let context = - match !ProofEngine.goal with - None -> [] - | Some metano -> - let (_,canonical_context,_) = - List.find (function (m,_,_) -> m=metano) metasenv - in - canonical_context - in - try - let metasenv',expr,ugraph = - inputt#get_metasenv_and_term context metasenv - in - check_term_in_scratch scratch_window metasenv' context expr - with - e -> - HelmLogger.log - (`Error (`T (Printexc.to_string e))) -;; - -let show () = - try - show_in_show_window_uri (input_or_locate_uri ~title:"Show") - with - e -> - HelmLogger.log - (`Error (`T (Printexc.to_string e))) -;; - -exception NotADefinition;; - -let open_ () = - let output = ((rendering_window ())#output : TermViewer.proof_viewer) in - let notebook = (rendering_window ())#notebook in - try - let uri = input_or_locate_uri ~title:"Open" in - ignore(CicTypeChecker.typecheck uri CicUniv.empty_ugraph); - (* TASSI: typecheck mette la uri nell'env... cosa fa la open_ ?*) - let metasenv,bo,ty = - match fst(CicEnvironment.get_cooked_obj CicUniv.empty_ugraph uri ) with - Cic.Constant (_,Some bo,ty,_,_) -> [],bo,ty - | Cic.CurrentProof (_,metasenv,bo,ty,_,_) -> metasenv,bo,ty - | Cic.Constant _ - | Cic.Variable _ - | Cic.InductiveDefinition _ -> raise NotADefinition - in - ProofEngine.set_proof (Some (Some uri, metasenv, bo, ty)) ; - set_proof_engine_goal None ; - refresh_goals notebook ; - refresh_proof output ; - !save_set_sensitive true - with - InvokeTactics.RefreshSequentException e -> - HelmLogger.log - (`Error (`T ("Exception raised during the refresh of the " ^ - "sequent: " ^ Printexc.to_string e))) - | InvokeTactics.RefreshProofException e -> - HelmLogger.log - (`Error (`T ("Exception raised during the refresh of the " ^ - "proof: " ^ Printexc.to_string e))) - | e -> - HelmLogger.log - (`Error (`T (Printexc.to_string e))) -;; - -let show_query_results results = - let window = - GWindow.window - ~modal:false ~title:"Query results." ~border_width:2 () in - let vbox = GPack.vbox ~packing:window#add () in - let hbox = - GPack.hbox ~packing:(vbox#pack ~expand:false ~fill:false ~padding:5) () in - let lMessage = - GMisc.label - ~text:"Click on a URI to show that object" - ~packing:hbox#add () in - let scrolled_window = - GBin.scrolled_window ~border_width:10 ~height:400 ~width:600 - ~packing:(vbox#pack ~expand:true ~fill:true ~padding:5) () in - let clist = GList.clist ~columns:1 ~packing:scrolled_window#add () in - ignore - (List.map - (function (uri,_) -> - let n = - clist#append [uri] - in - clist#set_row ~selectable:false n - ) results - ) ; - clist#columns_autosize () ; - ignore - (clist#connect#select_row - (fun ~row ~column ~event -> - let (uristr,_) = List.nth results row in - match CicUtil.term_of_uri uristr with - | Cic.Const (uri, _) - | Cic.Var (uri, _) - | Cic.MutInd (uri, _, _) - | Cic.MutConstruct (uri, _, _, _) -> - show_in_show_window_uri uri - | _ -> assert false - ) - ) ; - window#show () -;; - -let refine_constraints (must_obj,must_rel,must_sort) = - let chosen = ref false in - let use_only = ref false in - let window = - GWindow.window - ~modal:true ~title:"Constraints refinement." - ~width:800 ~border_width:2 () in - let vbox = GPack.vbox ~packing:window#add () in - let hbox = - GPack.hbox ~packing:(vbox#pack ~expand:false ~fill:false ~padding:5) () in - let lMessage = - GMisc.label - ~text: "\"Only\" constraints can be enforced or not." - ~packing:(hbox#pack ~expand:false ~fill:false ~padding:5) () in - let onlyb = - GButton.toggle_button ~label:"Enforce \"only\" constraints" - ~active:false ~packing:(hbox#pack ~expand:false ~fill:false ~padding:5) () - in - ignore - (onlyb#connect#toggled (function () -> use_only := onlyb#active)) ; - (* Notebook for the constraints choice *) - let notebook = - GPack.notebook ~scrollable:true - ~packing:(vbox#pack ~expand:true ~fill:true ~padding:5) () in - (* Rel constraints *) - let label = - GMisc.label - ~text: "Constraints on Rels" () in - let vbox' = - GPack.vbox ~packing:(notebook#append_page ~tab_label:label#coerce) - () in - let hbox = - GPack.hbox ~packing:(vbox'#pack ~expand:false ~fill:false ~padding:5) () in - let lMessage = - GMisc.label - ~text: "You can now specify the constraints on Rels." - ~packing:(hbox#pack ~expand:false ~fill:false ~padding:5) () in - let expected_height = 25 * (List.length must_rel + 2) in - let height = if expected_height > 400 then 400 else expected_height in - let scrolled_window = - GBin.scrolled_window ~border_width:10 ~height ~width:600 - ~packing:(vbox'#pack ~expand:true ~fill:true ~padding:5) () in - let scrolled_vbox = GPack.vbox ~packing:scrolled_window#add_with_viewport () in - let mk_depth_button (hbox:GPack.box) d = - let mutable_ref = ref (Some d) in - let depthb = - GButton.toggle_button - ~label:("depth = " ^ string_of_int d) - ~active:true - ~packing:(hbox#pack ~expand:false ~fill:false ~padding:5) () - in - ignore - (depthb#connect#toggled - (function () -> - let sel_depth = if depthb#active then Some d else None in - mutable_ref := sel_depth - )) ; mutable_ref - in - let rel_constraints = - List.map - (function p -> - let hbox = - GPack.hbox - ~packing:(scrolled_vbox#pack ~expand:false ~fill:false ~padding:5) () in - let lMessage = - GMisc.label - ~text:(MQGU.text_of_position (p:>MQGT.full_position)) - ~packing:(hbox#pack ~expand:false ~fill:false ~padding:5) () in - match p with - | `MainHypothesis None - | `MainConclusion None -> p, ref None - | `MainHypothesis (Some depth') - | `MainConclusion (Some depth') -> p, mk_depth_button hbox depth' - ) must_rel in - (* Sort constraints *) - let label = - GMisc.label - ~text: "Constraints on Sorts" () in - let vbox' = - GPack.vbox ~packing:(notebook#append_page ~tab_label:label#coerce) - () in - let hbox = - GPack.hbox ~packing:(vbox'#pack ~expand:false ~fill:false ~padding:5) () in - let lMessage = - GMisc.label - ~text: "You can now specify the constraints on Sorts." - ~packing:(hbox#pack ~expand:false ~fill:false ~padding:5) () in - let expected_height = 25 * (List.length must_sort + 2) in - let height = if expected_height > 400 then 400 else expected_height in - let scrolled_window = - GBin.scrolled_window ~border_width:10 ~height ~width:600 - ~packing:(vbox'#pack ~expand:true ~fill:true ~padding:5) () in - let scrolled_vbox = GPack.vbox ~packing:scrolled_window#add_with_viewport () in - let sort_constraints = - List.map - (function (p, sort) -> - let hbox = - GPack.hbox - ~packing:(scrolled_vbox#pack ~expand:false ~fill:false ~padding:5) () in - let lMessage = - GMisc.label - ~text:(MQGU.text_of_sort sort ^ " " ^ MQGU.text_of_position (p:>MQGT.full_position)) - ~packing:(hbox#pack ~expand:false ~fill:false ~padding:5) () in - match p with - | `MainHypothesis None - | `MainConclusion None -> p, ref None, sort - | `MainHypothesis (Some depth') - | `MainConclusion (Some depth') -> p, mk_depth_button hbox depth', sort - ) must_sort in - (* Obj constraints *) - let label = - GMisc.label - ~text: "Constraints on constants" () in - let vbox' = - GPack.vbox ~packing:(notebook#append_page ~tab_label:label#coerce) - () in - let hbox = - GPack.hbox ~packing:(vbox'#pack ~expand:false ~fill:false ~padding:5) () in - let lMessage = - GMisc.label - ~text: "You can now specify the constraints on constants." - ~packing:(hbox#pack ~expand:false ~fill:false ~padding:5) () in - let expected_height = 25 * (List.length must_obj + 2) in - let height = if expected_height > 400 then 400 else expected_height in - let scrolled_window = - GBin.scrolled_window ~border_width:10 ~height ~width:600 - ~packing:(vbox'#pack ~expand:true ~fill:true ~padding:5) () in - let scrolled_vbox = GPack.vbox ~packing:scrolled_window#add_with_viewport () in - let obj_constraints = - List.map - (function (p, uri) -> - let hbox = - GPack.hbox - ~packing:(scrolled_vbox#pack ~expand:false ~fill:false ~padding:5) () in - let lMessage = - GMisc.label - ~text:(uri ^ " " ^ (MQGU.text_of_position p)) - ~packing:(hbox#pack ~expand:false ~fill:false ~padding:5) () in - match p with - | `InBody - | `InHypothesis - | `InConclusion - | `MainHypothesis None - | `MainConclusion None -> p, ref None, uri - | `MainHypothesis (Some depth') - | `MainConclusion (Some depth') -> p, mk_depth_button hbox depth', uri - ) must_obj in - (* Confirm/abort buttons *) - let hbox = - GPack.hbox ~packing:(vbox#pack ~expand:false ~fill:false ~padding:5) () in - let okb = - GButton.button ~label:"Ok" - ~packing:(hbox#pack ~expand:false ~fill:false ~padding:5) () in - let cancelb = - GButton.button ~label:"Abort" - ~packing:(hbox#pack ~expand:false ~fill:false ~padding:5) () - in - ignore (window#connect#destroy GMain.Main.quit) ; - ignore (cancelb#connect#clicked window#destroy) ; - ignore - (okb#connect#clicked (function () -> chosen := true ; window#destroy ())); - window#set_position `CENTER ; - window#show () ; - GtkThread.main (); - if !chosen then - let chosen_must_rel = - List.map - (function (position, ref_depth) -> MQGU.set_main_position position !ref_depth) - rel_constraints - in - let chosen_must_sort = - List.map - (function (position, ref_depth, sort) -> - MQGU.set_main_position position !ref_depth,sort) - sort_constraints - in - let chosen_must_obj = - List.map - (function (position, ref_depth, uri) -> MQGU.set_full_position position !ref_depth, uri) - obj_constraints - in - (chosen_must_obj,chosen_must_rel,chosen_must_sort), - (if !use_only then -(*CSC: ???????????????????????? I assume that must and only are the same... *) - Some chosen_must_obj,Some chosen_must_rel,Some chosen_must_sort - else - None,None,None - ) - else - raise NoChoice -;; - -let completeSearchPattern () = - let inputt = ((rendering_window ())#inputt : TermEditor.term_editor) in - try - let metasenv,expr,ugraph = - inputt#get_metasenv_and_term ~context:[] ~metasenv:[] in - let must = CGSearchPattern.get_constraints expr in - let must',only = refine_constraints must in - let query = - MQG.query_of_constraints (Some CGSearchPattern.universe) must' only - in - let results = MQI.execute mqi_handle query in - show_query_results results - with - e -> - HelmLogger.log - (`Error (`T (Printexc.to_string e))) -;; - -let insertQuery () = - try - let chosen = ref None in - let window = - GWindow.window - ~modal:true ~title:"Insert Query (Experts Only)" ~border_width:2 () in - let vbox = GPack.vbox ~packing:window#add () in - let label = - GMisc.label ~text:"Insert Query. For Experts Only." - ~packing:(vbox#pack ~expand:false ~fill:false ~padding:5) () in - let scrolled_window = - GBin.scrolled_window ~border_width:10 ~height:400 ~width:600 - ~packing:(vbox#pack ~expand:true ~fill:true ~padding:5) () in - let input = GText.view ~editable:true - ~packing:scrolled_window#add () in - let hbox = - GPack.hbox ~packing:(vbox#pack ~expand:false ~fill:false ~padding:5) () in - let okb = - GButton.button ~label:"Ok" - ~packing:(hbox#pack ~expand:false ~fill:false ~padding:5) () in - let loadb = - GButton.button ~label:"Load from file..." - ~packing:(hbox#pack ~expand:false ~fill:false ~padding:5) () in - let cancelb = - GButton.button ~label:"Abort" - ~packing:(hbox#pack ~expand:false ~fill:false ~padding:5) () in - ignore (window#connect#destroy GMain.Main.quit) ; - ignore (cancelb#connect#clicked window#destroy) ; - ignore - (okb#connect#clicked - (function () -> - chosen := Some (input#buffer#get_text ()) ; window#destroy ())) ; - ignore - (loadb#connect#clicked - (function () -> - match - GToolbox.select_file ~title:"Select Query File" () - with - None -> () - | Some filename -> - let inch = open_in filename in - let rec read_file () = - try - let line = input_line inch in - line ^ "\n" ^ read_file () - with - End_of_file -> "" - in - let text = read_file () in - input#buffer#delete input#buffer#start_iter input#buffer#end_iter ; - ignore (input#buffer#insert text))) ; - window#set_position `CENTER ; - window#show () ; - GtkThread.main (); - match !chosen with - None -> () - | Some q -> - let results = - MQI.execute mqi_handle (MQueryUtil.query_of_text (Lexing.from_string q)) - in - show_query_results results - with - e -> - HelmLogger.log - (`Error (`T (Printexc.to_string e))) -;; - -let choose_must list_of_must only = - let chosen = ref None in - let user_constraints = ref [] in - let window = - GWindow.window - ~modal:true ~title:"Query refinement." ~border_width:2 () in - let vbox = GPack.vbox ~packing:window#add () in - let hbox = - GPack.hbox ~packing:(vbox#pack ~expand:false ~fill:false ~padding:5) () in - let lMessage = - GMisc.label - ~text: - ("You can now specify the genericity of the query. " ^ - "The more generic the slower.") - ~packing:(hbox#pack ~expand:false ~fill:false ~padding:5) () in - let hbox = - GPack.hbox ~packing:(vbox#pack ~expand:false ~fill:false ~padding:5) () in - let lMessage = - GMisc.label - ~text: - "Suggestion: start with faster queries before moving to more generic ones." - ~packing:(hbox#pack ~expand:false ~fill:false ~padding:5) () in - let notebook = - GPack.notebook ~scrollable:true - ~packing:(vbox#pack ~expand:true ~fill:true ~padding:5) () in - let _ = - let page = ref 0 in - let last = List.length list_of_must in - List.map - (function must -> - incr page ; - let label = - GMisc.label ~text: - (if !page = 1 then "More generic" else - if !page = last then "More precise" else " ") () in - let expected_height = 25 * (List.length must + 2) in - let height = if expected_height > 400 then 400 else expected_height in - let scrolled_window = - GBin.scrolled_window ~border_width:10 ~height ~width:600 - ~packing:(notebook#append_page ~tab_label:label#coerce) () in - let clist = - GList.clist ~columns:2 ~packing:scrolled_window#add - ~titles:["URI" ; "Position"] () - in - ignore - (List.map - (function (position, uri) -> - let n = - clist#append - [uri; MQGUtil.text_of_position position] - in - clist#set_row ~selectable:false n - ) must - ) ; - clist#columns_autosize () - ) list_of_must in - let _ = - let label = GMisc.label ~text:"User provided" () in - let vbox = - GPack.vbox ~packing:(notebook#append_page ~tab_label:label#coerce) () in - let hbox = - GPack.hbox ~packing:(vbox#pack ~expand:false ~fill:false ~padding:5) () in - let lMessage = - GMisc.label - ~text:"Select the constraints that must be satisfied and press OK." - ~packing:(hbox#pack ~expand:false ~fill:false ~padding:5) () in - let expected_height = 25 * (List.length only + 2) in - let height = if expected_height > 400 then 400 else expected_height in - let scrolled_window = - GBin.scrolled_window ~border_width:10 ~height ~width:600 - ~packing:(vbox#pack ~expand:true ~fill:true ~padding:5) () in - let clist = - GList.clist ~columns:2 ~packing:scrolled_window#add - ~selection_mode:`MULTIPLE - ~titles:["URI" ; "Position"] () - in - ignore - (List.map - (function (position, uri) -> - let n = - clist#append - [uri; MQGUtil.text_of_position position] - in - clist#set_row ~selectable:true n - ) only - ) ; - clist#columns_autosize () ; - ignore - (clist#connect#select_row - (fun ~row ~column ~event -> - user_constraints := (List.nth only row)::!user_constraints)) ; - ignore - (clist#connect#unselect_row - (fun ~row ~column ~event -> - user_constraints := - List.filter - (function uri -> uri != (List.nth only row)) !user_constraints)) ; - in - let hbox = - GPack.hbox ~packing:(vbox#pack ~expand:false ~fill:false ~padding:5) () in - let okb = - GButton.button ~label:"Ok" - ~packing:(hbox#pack ~expand:false ~fill:false ~padding:5) () in - let cancelb = - GButton.button ~label:"Abort" - ~packing:(hbox#pack ~expand:false ~fill:false ~padding:5) () in - (* actions *) - ignore (window#connect#destroy GMain.Main.quit) ; - ignore (cancelb#connect#clicked window#destroy) ; - ignore - (okb#connect#clicked - (function () -> chosen := Some notebook#current_page ; window#destroy ())) ; - window#set_position `CENTER ; - window#show () ; - GtkThread.main (); - match !chosen with - None -> raise NoChoice - | Some n -> - if n = List.length list_of_must then - (* user provided constraints *) - !user_constraints - else - List.nth list_of_must n -;; - -let searchPattern () = - let inputt = ((rendering_window ())#inputt : TermEditor.term_editor) in - try - let proof = - match ProofEngine.get_proof () with - None -> assert false - | Some proof -> proof - in - match !ProofEngine.goal with - | None -> () - | Some metano -> - let uris' = List.map fst (MetadataQuery.hint ~dbd (proof, metano)) in - let uri' = - user_uri_choice ~title:"Ambiguous input." - ~msg: "Many lemmas can be successfully applied. Please, choose one:" - uris' - in - inputt#set_term uri' ; - InvokeTactics'.apply () - with - e -> - HelmLogger.log - (`Error (`T (Printexc.to_string e))) -;; - -let choose_selection mmlwidget (element : Gdome.element option) = - let module G = Gdome in - let rec aux element = - if element#hasAttributeNS - ~namespaceURI:Misc.helm_ns - ~localName:(G.domString "xref") - then - mmlwidget#set_selection (Some element) - else - try - match element#get_parentNode with - None -> assert false - (*CSC: OCAML DIVERGES! - | Some p -> aux (new G.element_of_node p) - *) - | Some p -> aux (new Gdome.element_of_node p) - with - GdomeInit.DOMCastException _ -> - debug_print - "******* trying to select above the document root ********" - in - match element with - Some x -> aux x - | None -> mmlwidget#set_selection None -;; - -(* STUFF TO BUILD THE GTK INTERFACE *) - -(* Stuff for the widget settings *) - -(* -let export_to_postscript output = - let lastdir = ref (Unix.getcwd ()) in - function () -> - match - GToolbox.select_file ~title:"Export to PostScript" - ~dir:lastdir ~filename:"screenshot.ps" () - with - None -> () - | Some filename -> - (output :> GMathView.math_view)#export_to_postscript - ~filename:filename (); -;; -*) - -(* -let activate_t1 output button_set_anti_aliasing - button_set_transparency export_to_postscript_menu_item - button_t1 () -= - let is_set = button_t1#active in - output#set_font_manager_type - ~fm_type:(if is_set then `font_manager_t1 else `font_manager_gtk) ; - if is_set then - begin - button_set_anti_aliasing#misc#set_sensitive true ; - button_set_transparency#misc#set_sensitive true ; - export_to_postscript_menu_item#misc#set_sensitive true ; - end - else - begin - button_set_anti_aliasing#misc#set_sensitive false ; - button_set_transparency#misc#set_sensitive false ; - export_to_postscript_menu_item#misc#set_sensitive false ; - end -;; - -let set_anti_aliasing output button_set_anti_aliasing () = - output#set_anti_aliasing button_set_anti_aliasing#active -;; - -let set_transparency output button_set_transparency () = - output#set_transparency button_set_transparency#active -;; -*) - -let changefont output font_size_spinb () = - output#set_font_size font_size_spinb#value_as_int -;; - -let set_log_verbosity output log_verbosity_spinb () = - output#set_log_verbosity log_verbosity_spinb#value_as_int -;; - -class settings_window output sw - export_to_postscript_menu_item selection_changed_callback -= - let settings_window = GWindow.window ~title:"GtkMathView settings" () in - let vbox = - GPack.vbox ~packing:settings_window#add () in - let table = - GPack.table - ~rows:1 ~columns:3 ~homogeneous:false ~row_spacings:5 ~col_spacings:5 - ~border_width:5 ~packing:vbox#add () in - let button_t1 = - GButton.toggle_button ~label:"activate t1 fonts" - ~packing:(table#attach ~left:0 ~top:0) () in - let button_set_anti_aliasing = - GButton.toggle_button ~label:"set_anti_aliasing" - ~packing:(table#attach ~left:0 ~top:1) () in - let button_set_transparency = - GButton.toggle_button ~label:"set_transparency" - ~packing:(table#attach ~left:2 ~top:1) () in - let table = - GPack.table - ~rows:2 ~columns:2 ~homogeneous:false ~row_spacings:5 ~col_spacings:5 - ~border_width:5 ~packing:vbox#add () in - let font_size_label = - GMisc.label ~text:"font size:" - ~packing:(table#attach ~left:0 ~top:0 ~expand:`NONE) () in - let font_size_spinb = - let sadj = - GData.adjustment ~value:(float_of_int output#get_font_size) - ~lower:5.0 ~upper:50.0 ~step_incr:1.0 () - in - GEdit.spin_button - ~adjustment:sadj ~packing:(table#attach ~left:1 ~top:0 ~fill:`NONE) () in - let log_verbosity_label = - GMisc.label ~text:"log verbosity:" - ~packing:(table#attach ~left:0 ~top:1) () in - let log_verbosity_spinb = - let sadj = - GData.adjustment ~value:0.0 ~lower:0.0 ~upper:3.0 ~step_incr:1.0 () - in - GEdit.spin_button - ~adjustment:sadj ~packing:(table#attach ~left:1 ~top:1) () in - let hbox = - GPack.hbox ~packing:(vbox#pack ~expand:false ~fill:false ~padding:5) () in - let closeb = - GButton.button ~label:"Close" - ~packing:(hbox#pack ~expand:false ~fill:false ~padding:5) () in -object(self) - method show = settings_window#show - initializer - button_set_anti_aliasing#misc#set_sensitive false ; - button_set_transparency#misc#set_sensitive false ; - (* Signals connection *) - (* - ignore(button_t1#connect#clicked - (activate_t1 output button_set_anti_aliasing - button_set_transparency export_to_postscript_menu_item button_t1)) ; - *) - ignore(font_size_spinb#connect#changed (changefont output font_size_spinb)) ; - (* - ignore(button_set_anti_aliasing#connect#toggled - (set_anti_aliasing output button_set_anti_aliasing)); - ignore(button_set_transparency#connect#toggled - (set_transparency output button_set_transparency)) ; - *) - ignore(log_verbosity_spinb#connect#changed - (set_log_verbosity output log_verbosity_spinb)) ; - ignore(closeb#connect#clicked settings_window#misc#hide) -end;; - -(* Scratch window *) - -class scratch_window = - let window = - GWindow.window - ~title:"MathML viewer" - ~border_width:2 () in - let vbox = - GPack.vbox ~packing:window#add () in - let hbox = - GPack.hbox ~packing:(vbox#pack ~expand:false ~fill:false ~padding:5) () in - let whdb = - GButton.button ~label:"Whd" - ~packing:(hbox#pack ~expand:false ~fill:false ~padding:5) () in - let reduceb = - GButton.button ~label:"Reduce" - ~packing:(hbox#pack ~expand:false ~fill:false ~padding:5) () in - let simplb = - GButton.button ~label:"Simpl" - ~packing:(hbox#pack ~expand:false ~fill:false ~padding:5) () in - let scrolled_window = - GBin.scrolled_window ~border_width:10 - ~packing:(vbox#pack ~expand:true ~padding:5) () in - let sequent_viewer = - TermViewer.sequent_viewer - ~mml_of_cic_sequent:ApplyTransformation.mml_of_cic_sequent - ~packing:(scrolled_window#add) ~width:400 ~height:280 () in -object(self) - val mutable term = Cic.Rel 1 (* dummy value *) - val mutable context = ([] : Cic.context) (* dummy value *) - val mutable metasenv = ([] : Cic.metasenv) (* dummy value *) - method sequent_viewer = sequent_viewer - method show () = window#misc#hide () ; window#show () - method term = term - method set_term t = term <- t - method context = context - method set_context t = context <- t - method metasenv = metasenv - method set_metasenv t = metasenv <- t - initializer - ignore - (sequent_viewer#connect#selection_changed (choose_selection sequent_viewer)); - ignore(window#event#connect#delete (fun _ -> window#misc#hide () ; true )) ; - ignore(whdb#connect#clicked InvokeTactics'.whd_in_scratch) ; - ignore(reduceb#connect#clicked InvokeTactics'.reduce_in_scratch) ; - ignore(simplb#connect#clicked InvokeTactics'.simpl_in_scratch) -end;; - -let open_contextual_menu_for_selected_terms mmlwidget infos = - let button = GdkEvent.Button.button infos in - let terms_selected = List.length mmlwidget#get_selections > 0 in - if button = 3 then - begin - let time = GdkEvent.Button.time infos in - let menu = GMenu.menu () in - let f = new GMenu.factory menu in - let whd_menu_item = - f#add_item "Whd" ~key:GdkKeysyms._W ~callback:InvokeTactics'.whd in - let reduce_menu_item = - f#add_item "Reduce" ~key:GdkKeysyms._R ~callback:InvokeTactics'.reduce in - let simpl_menu_item = - f#add_item "Simpl" ~key:GdkKeysyms._S ~callback:InvokeTactics'.simpl in - let _ = f#add_separator () in - let generalize_menu_item = - f#add_item "Generalize" - ~key:GdkKeysyms._G ~callback:InvokeTactics'.generalize in - let _ = f#add_separator () in - let clear_menu_item = - f#add_item "Clear" ~key:GdkKeysyms._C ~callback:InvokeTactics'.clear in - let clearbody_menu_item = - f#add_item "ClearBody" - ~key:GdkKeysyms._B ~callback:InvokeTactics'.clearbody - in - whd_menu_item#misc#set_sensitive terms_selected ; - reduce_menu_item#misc#set_sensitive terms_selected ; - simpl_menu_item#misc#set_sensitive terms_selected ; - generalize_menu_item#misc#set_sensitive terms_selected ; - clear_menu_item#misc#set_sensitive terms_selected ; - clearbody_menu_item#misc#set_sensitive terms_selected ; - menu#popup ~button ~time - end ; - true -;; - -class page () = - let vbox1 = GPack.vbox () in -object(self) - val mutable proofw_ref = None - val mutable compute_ref = None - method proofw = - Lazy.force self#compute ; - match proofw_ref with - None -> assert false - | Some proofw -> proofw - method content = vbox1 - method compute = - match compute_ref with - None -> assert false - | Some compute -> compute - initializer - compute_ref <- - Some (lazy ( - let scrolled_window1 = - GBin.scrolled_window ~border_width:10 - ~packing:(vbox1#pack ~expand:true ~padding:5) () in - let proofw = - TermViewer.sequent_viewer - ~mml_of_cic_sequent:ApplyTransformation.mml_of_cic_sequent - ~width:400 ~height:275 ~packing:(scrolled_window1#add) () in - let _ = proofw_ref <- Some proofw in - let hbox3 = - GPack.hbox ~packing:(vbox1#pack ~expand:false ~fill:false ~padding:5) () in - let ringb = - GButton.button ~label:"Ring" - ~packing:(hbox3#pack ~expand:false ~fill:false ~padding:5) () in - let fourierb = - GButton.button ~label:"Fourier" - ~packing:(hbox3#pack ~expand:false ~fill:false ~padding:5) () in - let reflexivityb = - GButton.button ~label:"Reflexivity" - ~packing:(hbox3#pack ~expand:false ~fill:false ~padding:5) () in - let symmetryb = - GButton.button ~label:"Symmetry" - ~packing:(hbox3#pack ~expand:false ~fill:false ~padding:5) () in - let assumptionb = - GButton.button ~label:"Assumption" - ~packing:(hbox3#pack ~expand:false ~fill:false ~padding:5) () in - let contradictionb = - GButton.button ~label:"Contradiction" - ~packing:(hbox3#pack ~expand:false ~fill:false ~padding:5) () in - let autob= - GButton.button ~label:"Auto" - ~packing:(hbox3#pack ~expand:false ~fill:false ~padding:5) () in - let hbox4 = - GPack.hbox ~packing:(vbox1#pack ~expand:false ~fill:false ~padding:5) () in - let existsb = - GButton.button ~label:"Exists" - ~packing:(hbox4#pack ~expand:false ~fill:false ~padding:5) () in - let splitb = - GButton.button ~label:"Split" - ~packing:(hbox4#pack ~expand:false ~fill:false ~padding:5) () in - let leftb = - GButton.button ~label:"Left" - ~packing:(hbox4#pack ~expand:false ~fill:false ~padding:5) () in - let rightb = - GButton.button ~label:"Right" - ~packing:(hbox4#pack ~expand:false ~fill:false ~padding:5) () in - let searchpatternb = - GButton.button ~label:"SearchPattern_Apply" - ~packing:(hbox4#pack ~expand:false ~fill:false ~padding:5) () in - let hbox5 = - GPack.hbox ~packing:(vbox1#pack ~expand:false ~fill:false ~padding:5) () in - let exactb = - GButton.button ~label:"Exact" - ~packing:(hbox5#pack ~expand:false ~fill:false ~padding:5) () in - let introsb = - GButton.button ~label:"Intros" - ~packing:(hbox5#pack ~expand:false ~fill:false ~padding:5) () in - let applyb = - GButton.button ~label:"Apply" - ~packing:(hbox5#pack ~expand:false ~fill:false ~padding:5) () in - let elimintrossimplb = - GButton.button ~label:"ElimIntrosSimpl" - ~packing:(hbox5#pack ~expand:false ~fill:false ~padding:5) () in - let elimtypeb = - GButton.button ~label:"ElimType" - ~packing:(hbox5#pack ~expand:false ~fill:false ~padding:5) () in - let foldwhdb = - GButton.button ~label:"Fold_whd" - ~packing:(hbox5#pack ~expand:false ~fill:false ~padding:5) () in - let foldreduceb = - GButton.button ~label:"Fold_reduce" - ~packing:(hbox5#pack ~expand:false ~fill:false ~padding:5) () in - let hbox6 = - GPack.hbox ~packing:(vbox1#pack ~expand:false ~fill:false ~padding:5) () in - let foldsimplb = - GButton.button ~label:"Fold_simpl" - ~packing:(hbox6#pack ~expand:false ~fill:false ~padding:5) () in - let cutb = - GButton.button ~label:"Cut" - ~packing:(hbox6#pack ~expand:false ~fill:false ~padding:5) () in - let changeb = - GButton.button ~label:"Change" - ~packing:(hbox6#pack ~expand:false ~fill:false ~padding:5) () in - let letinb = - GButton.button ~label:"Let ... In" - ~packing:(hbox6#pack ~expand:false ~fill:false ~padding:5) () in - let rewritesimplb = - GButton.button ~label:"RewriteSimpl ->" - ~packing:(hbox6#pack ~expand:false ~fill:false ~padding:5) () in - let rewritebacksimplb = - GButton.button ~label:"RewriteSimpl <-" - ~packing:(hbox6#pack ~expand:false ~fill:false ~padding:5) () in - let hbox7 = - GPack.hbox ~packing:(vbox1#pack ~expand:false ~fill:false ~padding:5) () in - let absurdb = - GButton.button ~label:"Absurd" - ~packing:(hbox7#pack ~expand:false ~fill:false ~padding:5) () in - let decomposeb = - GButton.button ~label:"Decompose" - ~packing:(hbox7#pack ~expand:false ~fill:false ~padding:5) () in - let transitivityb = - GButton.button ~label:"Transitivity" - ~packing:(hbox7#pack ~expand:false ~fill:false ~padding:5) () in - let replaceb = - GButton.button ~label:"Replace" - ~packing:(hbox7#pack ~expand:false ~fill:false ~padding:5) () in - let injectionb = - GButton.button ~label:"Injection" - ~packing:(hbox7#pack ~expand:false ~fill:false ~padding:5) () in - let discriminateb = - GButton.button ~label:"Discriminate" - ~packing:(hbox7#pack ~expand:false ~fill:false ~padding:5) () in -(* Zack: spostare in una toolbar - let generalizeb = - GButton.button ~label:"Generalize" - ~packing:(hbox7#pack ~expand:false ~fill:false ~padding:5) () in - let clearbodyb = - GButton.button ~label:"ClearBody" - ~packing:(hbox5#pack ~expand:false ~fill:false ~padding:5) () in - let clearb = - GButton.button ~label:"Clear" - ~packing:(hbox5#pack ~expand:false ~fill:false ~padding:5) () in - let whdb = - GButton.button ~label:"Whd" - ~packing:(hbox3#pack ~expand:false ~fill:false ~padding:5) () in - let reduceb = - GButton.button ~label:"Reduce" - ~packing:(hbox3#pack ~expand:false ~fill:false ~padding:5) () in - let simplb = - GButton.button ~label:"Simpl" - ~packing:(hbox3#pack ~expand:false ~fill:false ~padding:5) () in -*) - - ignore(exactb#connect#clicked InvokeTactics'.exact) ; - ignore(applyb#connect#clicked InvokeTactics'.apply) ; - ignore(elimintrossimplb#connect#clicked InvokeTactics'.elimintrossimpl) ; - ignore(elimtypeb#connect#clicked InvokeTactics'.elimtype) ; - ignore(foldwhdb#connect#clicked InvokeTactics'.fold_whd) ; - ignore(foldreduceb#connect#clicked InvokeTactics'.fold_reduce) ; - ignore(foldsimplb#connect#clicked InvokeTactics'.fold_simpl) ; - ignore(cutb#connect#clicked InvokeTactics'.cut) ; - ignore(changeb#connect#clicked InvokeTactics'.change) ; - ignore(letinb#connect#clicked InvokeTactics'.letin) ; - ignore(ringb#connect#clicked InvokeTactics'.ring) ; - ignore(fourierb#connect#clicked InvokeTactics'.fourier) ; - ignore(rewritesimplb#connect#clicked InvokeTactics'.rewritesimpl) ; - ignore(rewritebacksimplb#connect#clicked InvokeTactics'.rewritebacksimpl) ; - ignore(replaceb#connect#clicked InvokeTactics'.replace) ; - ignore(reflexivityb#connect#clicked InvokeTactics'.reflexivity) ; - ignore(symmetryb#connect#clicked InvokeTactics'.symmetry) ; - ignore(transitivityb#connect#clicked InvokeTactics'.transitivity) ; - ignore(existsb#connect#clicked InvokeTactics'.exists) ; - ignore(splitb#connect#clicked InvokeTactics'.split) ; - ignore(leftb#connect#clicked InvokeTactics'.left) ; - ignore(rightb#connect#clicked InvokeTactics'.right) ; - ignore(assumptionb#connect#clicked InvokeTactics'.assumption) ; - ignore(absurdb#connect#clicked InvokeTactics'.absurd) ; - ignore(contradictionb#connect#clicked InvokeTactics'.contradiction) ; - ignore(introsb#connect#clicked InvokeTactics'.intros) ; - ignore(decomposeb#connect#clicked InvokeTactics'.decompose) ; - ignore(searchpatternb#connect#clicked searchPattern) ; - ignore(injectionb#connect#clicked InvokeTactics'.injection) ; - ignore(discriminateb#connect#clicked InvokeTactics'.discriminate) ; - ignore(autob#connect#clicked InvokeTactics'.auto) ; -(* Zack: spostare in una toolbar - ignore(whdb#connect#clicked whd) ; - ignore(reduceb#connect#clicked reduce) ; - ignore(simplb#connect#clicked simpl) ; - ignore(clearbodyb#connect#clicked clearbody) ; - ignore(clearb#connect#clicked clear) ; - ignore(generalizeb#connect#clicked generalize) ; -*) - ignore(proofw#connect#selection_changed (choose_selection proofw)) ; - ignore - ((new GObj.event_ops proofw#as_widget)#connect#button_press - (open_contextual_menu_for_selected_terms proofw)) ; - )) -end -;; - -class empty_page = - let vbox1 = GPack.vbox () in - let scrolled_window1 = - GBin.scrolled_window ~border_width:10 - ~packing:(vbox1#pack ~expand:true ~padding:5) () in - let proofw = - TermViewer.sequent_viewer - ~mml_of_cic_sequent:ApplyTransformation.mml_of_cic_sequent - ~width:400 ~height:275 ~packing:(scrolled_window1#add) () in -object(self) - method proofw = (assert false : TermViewer.sequent_viewer) - method content = vbox1 - method compute = (assert false : unit) -end -;; - -let empty_page = new empty_page;; - -class notebook = -object(self) - val notebook = GPack.notebook () - val pages = ref [] - val mutable skip_switch_page_event = false - val mutable empty = true - method notebook = notebook - method add_page n = - let new_page = new page () in - empty <- false ; - pages := !pages @ [n,lazy (setgoal n),new_page] ; - notebook#append_page - ~tab_label:((GMisc.label ~text:("?" ^ string_of_int n) ())#coerce) - new_page#content#coerce - method remove_all_pages ~skip_switch_page_event:skip = - if empty then - notebook#remove_page 0 (* let's remove the empty page *) - else - List.iter (function _ -> notebook#remove_page 0) !pages ; - pages := [] ; - skip_switch_page_event <- skip - method set_current_page ~may_skip_switch_page_event n = - let (_,_,page) = List.find (function (m,_,_) -> m=n) !pages in - let new_page = notebook#page_num page#content#coerce in - if may_skip_switch_page_event && new_page <> notebook#current_page then - skip_switch_page_event <- true ; - notebook#goto_page new_page - method set_empty_page = - empty <- true ; - pages := [] ; - notebook#append_page - ~tab_label:((GMisc.label ~text:"No proof in progress" ())#coerce) - empty_page#content#coerce - method proofw = - let (_,_,page) = List.nth !pages notebook#current_page in - page#proofw - initializer - ignore - (notebook#connect#switch_page - (function i -> - let skip = skip_switch_page_event in - skip_switch_page_event <- false ; - if not skip then - try - let (metano,setgoal,page) = List.nth !pages i in - set_proof_engine_goal (Some metano) ; - Lazy.force (page#compute) ; - Lazy.force setgoal; - if notify_hbugs_on_goal_change then - Hbugs.notify () - with _ -> () - )) -end -;; - -let dump_environment () = - try - let oc = open_out (Helm_registry.get "gtoplevel.environment_file") in - HelmLogger.log (`Msg (`T "Dumping environment ...")); - CicEnvironment.dump_to_channel oc; - HelmLogger.log (`Msg (`T "... done!")) ; - close_out oc - with exc -> - HelmLogger.log - (`Error (`T (Printf.sprintf "Dump failure, uncaught exception:%s" - (Printexc.to_string exc)))) -;; -let restore_environment () = - try - let ic = open_in (Helm_registry.get "gtoplevel.environment_file") in - HelmLogger.log (`Msg (`T "Restoring environment ... ")); - CicEnvironment.restore_from_channel ic; - HelmLogger.log (`Msg (`T "... done!")); - close_in ic - with exc -> - HelmLogger.log - (`Error (`T (Printf.sprintf "Restore failure, uncaught exception:%s" - (Printexc.to_string exc)))) -;; - -(* Main window *) - -class rendering_window output (notebook : notebook) = - let scratch_window = new scratch_window in - let window = - GWindow.window - ~title:"gTopLevel - Helm's Proof Assistant" - ~border_width:0 ~allow_shrink:false () in - let vbox_for_menu = GPack.vbox ~packing:window#add () in - (* menus *) - let handle_box = GBin.handle_box ~border_width:2 - ~packing:(vbox_for_menu#pack ~padding:0) () in - let menubar = GMenu.menu_bar ~packing:handle_box#add () in - let factory0 = new GMenu.factory menubar in - let accel_group = factory0#accel_group in - (* file menu *) - let file_menu = factory0#add_submenu "File" in - let factory1 = new GMenu.factory file_menu ~accel_group in - (* let export_to_postscript_menu_item = *) - let _ = - begin - let _ = - factory1#add_item "New Block of (Co)Inductive Definitions..." - ~key:GdkKeysyms._B ~callback:new_inductive - in - let _ = - factory1#add_item "New Proof or Definition..." ~key:GdkKeysyms._N - ~callback:new_proof - in - let reopen_menu_item = - factory1#add_item "Reopen a Finished Proof..." ~key:GdkKeysyms._R - ~callback:open_ - in - let qed_menu_item = - factory1#add_item "Qed" ~key:GdkKeysyms._E ~callback:qed in - ignore (factory1#add_separator ()) ; - ignore - (factory1#add_item "Load Unfinished Proof..." ~key:GdkKeysyms._L - ~callback:load_unfinished_proof) ; - let save_menu_item = - factory1#add_item "Save Unfinished Proof" ~key:GdkKeysyms._S - ~callback:save_unfinished_proof - in - ignore (factory1#add_separator ()) ; - ignore (factory1#add_item "Clear Environment" ~callback:CicEnvironment.empty); - ignore (factory1#add_item "Dump Environment" ~callback:dump_environment); - ignore - (factory1#add_item "Restore Environment" ~callback:restore_environment); - ignore - (save_set_sensitive := function b -> save_menu_item#misc#set_sensitive b); - ignore (!save_set_sensitive false); - ignore (qed_set_sensitive:=function b -> qed_menu_item#misc#set_sensitive b); - ignore (!qed_set_sensitive false); - ignore (factory1#add_separator ()) ; - (* - let export_to_postscript_menu_item = - factory1#add_item "Export to PostScript..." - ~callback:(export_to_postscript output) in - *) - ignore (factory1#add_separator ()) ; - ignore - (factory1#add_item "Exit" ~key:GdkKeysyms._Q ~callback:GMain.Main.quit) (*; - export_to_postscript_menu_item *) - end in - (* edit menu *) - let edit_menu = factory0#add_submenu "Edit Current Proof" in - let factory2 = new GMenu.factory edit_menu ~accel_group in - let focus_and_proveit_set_sensitive = ref (function _ -> assert false) in - let proveit_menu_item = - factory2#add_item "Prove It" ~key:GdkKeysyms._I - ~callback:(function () -> proveit ();!focus_and_proveit_set_sensitive false) - in - let focus_menu_item = - factory2#add_item "Focus" ~key:GdkKeysyms._F - ~callback:(function () -> focus () ; !focus_and_proveit_set_sensitive false) - in - let _ = - focus_and_proveit_set_sensitive := - function b -> - proveit_menu_item#misc#set_sensitive b ; - focus_menu_item#misc#set_sensitive b - in - let _ = !focus_and_proveit_set_sensitive false in - (* edit term menu *) - let edit_term_menu = factory0#add_submenu "Edit Term" in - let factory5 = new GMenu.factory edit_term_menu ~accel_group in - let check_menu_item = - factory5#add_item "Check Term" ~key:GdkKeysyms._C - ~callback:(check scratch_window) in - let _ = check_menu_item#misc#set_sensitive false in - (* search menu *) - let search_menu = factory0#add_submenu "Search" in - let factory4 = new GMenu.factory search_menu ~accel_group in - let _ = - factory4#add_item "Locate..." ~key:GdkKeysyms._T - ~callback:locate in - let searchPattern_menu_item = - factory4#add_item "SearchPattern..." ~key:GdkKeysyms._D - ~callback:completeSearchPattern in - let _ = searchPattern_menu_item#misc#set_sensitive false in - let show_menu_item = - factory4#add_item "Show..." ~key:GdkKeysyms._H ~callback:show - in - let insert_query_item = - factory4#add_item "Insert Query (Experts Only)..." ~key:GdkKeysyms._Y - ~callback:insertQuery in - (* hbugs menu *) - let hbugs_menu = factory0#add_submenu "HBugs" in - let factory6 = new GMenu.factory hbugs_menu ~accel_group in - let _ = - factory6#add_check_item - ~active:false ~key:GdkKeysyms._F5 ~callback:Hbugs.toggle "HBugs enabled" - in - let _ = - factory6#add_item ~key:GdkKeysyms._Return ~callback:Hbugs.notify - "(Re)Submit status!" - in - let _ = factory6#add_separator () in - let _ = - factory6#add_item ~callback:Hbugs.start_web_services "Start Web Services" - in - let _ = - factory6#add_item ~callback:Hbugs.stop_web_services "Stop Web Services" - in - (* settings menu *) - let settings_menu = factory0#add_submenu "Settings" in - let factory3 = new GMenu.factory settings_menu ~accel_group in - let _ = - factory3#add_item "Edit Aliases..." ~key:GdkKeysyms._A - ~callback:edit_aliases in - let _ = - factory3#add_item "Clear Aliases" ~key:GdkKeysyms._K - ~callback:clear_aliases in - let autoitem = - factory3#add_check_item "Auto disambiguation" - ~callback:(fun checked -> auto_disambiguation := checked) in - let _ = factory3#add_separator () in - let _ = - factory3#add_item "MathML Widget Preferences..." ~key:GdkKeysyms._P - ~callback:(function _ -> (settings_window ())#show ()) in - let _ = factory3#add_separator () in - let _ = - factory3#add_item "Reload Stylesheets" - ~callback: - (function _ -> - if ProofEngine.get_proof () <> None then - try - refresh_goals notebook ; - refresh_proof output - with - InvokeTactics.RefreshSequentException e -> - HelmLogger.log - (`Error (`T ("An error occurred while refreshing the " ^ - "sequent: " ^ Printexc.to_string e))) ; - (*notebook#remove_all_pages ~skip_switch_page_event:false ;*) - notebook#set_empty_page - | InvokeTactics.RefreshProofException e -> - HelmLogger.log - (`Error (`T ("An error occurred while refreshing the proof: " ^ Printexc.to_string e))) ; - output#unload - ) in - (* accel group *) - let _ = window#add_accel_group accel_group in - (* end of menus *) - let hbox0 = - GPack.hbox - ~packing:(vbox_for_menu#pack ~expand:true ~fill:true ~padding:5) () in - let vbox = - GPack.vbox ~packing:(hbox0#pack ~expand:true ~fill:true ~padding:5) () in - let scrolled_window0 = - GBin.scrolled_window ~border_width:10 - ~packing:(vbox#pack ~expand:true ~padding:5) () in - let _ = scrolled_window0#add output#coerce in - let frame = - GBin.frame ~label:"Insert Term" - ~packing:(vbox#pack ~expand:true ~fill:true ~padding:5) () in - let scrolled_window1 = - GBin.scrolled_window ~border_width:5 - ~packing:frame#add () in - let inputt = - TermEditor'.term_editor - ~dbd - ~width:400 ~height:100 ~packing:scrolled_window1#add () - ~isnotempty_callback: - (function b -> - check_menu_item#misc#set_sensitive b ; - searchPattern_menu_item#misc#set_sensitive b) in - let vboxl = - GPack.vbox ~packing:(hbox0#pack ~expand:true ~fill:true ~padding:5) () in - let _ = - vboxl#pack ~expand:true ~fill:true ~padding:5 notebook#notebook#coerce in - let frame = - GBin.frame ~shadow_type:`IN ~packing:(vboxl#pack ~expand:true ~padding:5) () - in - let _ = - new HelmGtkLogger.html_logger - ~width:400 ~height: 100 ~show:true ~packing:frame#add () - in -object - method inputt = inputt - method output = (output : TermViewer.proof_viewer) - method scratch_window = scratch_window - method notebook = notebook - method show = window#show - method set_auto_disambiguation set = autoitem#set_active set - initializer - notebook#set_empty_page ; - (*export_to_postscript_menu_item#misc#set_sensitive false ;*) - check_term := (check_term_in_scratch scratch_window) ; - - (* signal handlers here *) - ignore(output#connect#selection_changed - (function elem -> - choose_selection output elem ; - !focus_and_proveit_set_sensitive true - )) ; - ignore (output#connect#click (show_in_show_window_callback output)) ; - let settings_window = new settings_window output scrolled_window0 - (*export_to_postscript_menu_item*)() (choose_selection output) in - set_settings_window settings_window ; - ignore(window#event#connect#delete (fun _ -> GMain.Main.quit () ; true )) -end - -(* MAIN *) - -let initialize_everything () = - let output = - TermViewer.proof_viewer - ~mml_of_cic_object:ApplyTransformation.mml_of_cic_object - ~width:350 ~height:280 () - in - let notebook = new notebook in - let rendering_window' = new rendering_window output notebook in - rendering_window'#set_auto_disambiguation !auto_disambiguation; - set_rendering_window rendering_window'; - let print_error_as_html prefix msg = - HelmLogger.log (`Error (`T (prefix ^ msg))) - in - Gdome_xslt.setErrorCallback (Some (print_error_as_html "XSLT Error: ")); - Gdome_xslt.setDebugCallback - (Some (print_error_as_html "XSLT Debug Message: ")); - rendering_window'#show () ; - if restore_environment_on_boot && - Sys.file_exists (Helm_registry.get "gtoplevel.environment_file") - then - restore_environment (); - GtkThread.main () -;; - -let main () = - ignore (GtkMain.Main.init ()) ; - initialize_everything () ; - MQIC.close mqi_handle; - Hbugs.quit () -;; - -try -(* CicEnvironment.set_trust (fun _ -> false); *) - Sys.catch_break true; - main (); -with Sys.Break -> () (* exit nicely, invoking at_exit functions *) - diff --git a/helm/gTopLevel/hbugs.ml b/helm/gTopLevel/hbugs.ml deleted file mode 100644 index c8947c54d..000000000 --- a/helm/gTopLevel/hbugs.ml +++ /dev/null @@ -1,143 +0,0 @@ -(* - * Copyright (C) 2003: - * Stefano Zacchiroli - * for the HELM Team http://helm.cs.unibo.it/ - * - * This file is part of HELM, an Hypertextual, Electronic - * Library of Mathematics, developed at the Computer Science - * Department, University of Bologna, Italy. - * - * HELM is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * HELM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with HELM; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. - * - * For details, see the HELM World-Wide-Web page, - * http://helm.cs.unibo.it/ - *) - -open Hbugs_types;; -open Printf;; - -let debug_print = - let debug = true in - fun s -> prerr_endline (sprintf "HBUGS DEBUG: %s" s) -;; - -exception NoProofInProgress;; - -let hbugs_client = ref None -let use_hint_callback = ref ignore -let describe_hint_callback = ref ignore - -let set_describe_hint_callback c = describe_hint_callback := c - -let quit () = - match !hbugs_client with - | Some c -> c#unregisterFromBroker () - | None -> () - -let hbugs_enabled = ref false - -let get_hbugs_client () = - match !hbugs_client with - | Some c -> c - | None -> assert false - -let disable () = - match !hbugs_client with None -> () | Some c -> c#hide () - -let notify () = - try - if !hbugs_enabled then begin - let client = get_hbugs_client () in - let goal = - match !ProofEngine.goal with - | Some g -> g - | None -> raise NoProofInProgress - in - let (type_string, body_string) = - let (type_xml, body_xml) = ProofEngine.get_current_status_as_xml () in - (Xml.pp_to_string type_xml, Xml.pp_to_string body_xml) - in - let new_state = - (Misc.strip_xml_headings type_string, - Misc.strip_xml_headings body_string, - goal) - in - client#stateChange (Some new_state) - end - with NoProofInProgress -> () - -let clear () = - if !hbugs_enabled then - begin - let client = get_hbugs_client () in - client#stateChange None - end - -let rec enable () = - (match !hbugs_client with - | None -> (* create an hbugs client and show its window *) - hbugs_client := - (try - Some (new Hbugs_client.hbugsClient - ~use_hint_callback:!use_hint_callback - ~describe_hint_callback:!describe_hint_callback - ()) - with e -> - prerr_endline (sprintf "Can't start HBugs client: %s" - (Printexc.to_string e)); - None); - (match !hbugs_client with - |Some client -> - client#show (); - client#subscribeAll () - | None -> ()) - | Some c -> (* show hbugs client window *) - c#show ()) - -let toggle state = - if state <> !hbugs_enabled then begin (* status has been changed *) - if state then enable () else disable (); - clear () - end; - hbugs_enabled := state - -module type Unit = sig end - -module Initialize (Tactics: InvokeTactics.Tactics) : Unit = - struct - let use_hint = function - | Use_ring -> Tactics.ring () - | Use_fourier -> Tactics.fourier () - | Use_reflexivity -> Tactics.reflexivity () - | Use_symmetry -> Tactics.symmetry () - | Use_assumption -> Tactics.assumption () - | Use_contradiction -> Tactics.contradiction () - | Use_exists -> Tactics.exists () - | Use_split -> Tactics.split () - | Use_left -> Tactics.left () - | Use_right -> Tactics.right () - | Use_apply term -> - (* we remove the "cic:" prefix *) - let term' = String.sub term 4 (String.length term - 4) in - Tactics.apply ~term:term' () - | Hints _ -> assert false - - let _ = use_hint_callback := use_hint - end - -let start_web_services () = ignore (Unix.system "make -C ../hbugs/ start") -let stop_web_services () = ignore (Unix.system "make -C ../hbugs/ stop") - diff --git a/helm/gTopLevel/hbugs.mli b/helm/gTopLevel/hbugs.mli deleted file mode 100644 index 80f8c74e9..000000000 --- a/helm/gTopLevel/hbugs.mli +++ /dev/null @@ -1,57 +0,0 @@ -(* - * Copyright (C) 2003: - * Stefano Zacchiroli - * for the HELM Team http://helm.cs.unibo.it/ - * - * This file is part of HELM, an Hypertextual, Electronic - * Library of Mathematics, developed at the Computer Science - * Department, University of Bologna, Italy. - * - * HELM is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * HELM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with HELM; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. - * - * For details, see the HELM World-Wide-Web page, - * http://helm.cs.unibo.it/ - *) - -val enable: unit -> unit -val disable: unit -> unit -val toggle: bool -> unit - -val quit: unit -> unit - - (** send current proof assistant state to hbugs broker *) -val notify: unit -> unit - -val clear: unit -> unit - -module type Unit = sig end - -module Initialize (Tactics: InvokeTactics.Tactics) : Unit - -(* - External Web Services controls. TEMPORARY(?) -*) - -val start_web_services: unit -> unit -val stop_web_services: unit -> unit - -(* Other callbacks *) - -open Hbugs_types - - (* what to do when the user single click on an hint *) -val set_describe_hint_callback: (hint -> unit) -> unit - diff --git a/helm/gTopLevel/helmGtkLogger.ml b/helm/gTopLevel/helmGtkLogger.ml deleted file mode 100644 index cfb2c487a..000000000 --- a/helm/gTopLevel/helmGtkLogger.ml +++ /dev/null @@ -1,71 +0,0 @@ -(* Copyright (C) 2004, HELM Team. - * - * This file is part of HELM, an Hypertextual, Electronic - * Library of Mathematics, developed at the Computer Science - * Department, University of Bologna, Italy. - * - * HELM is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * HELM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with HELM; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. - * - * For details, see the HELM World-Wide-Web page, - * http://helm.cs.unibo.it/ - *) - -class html_logger ?width ?height ?packing ?show () = - let scrolled_window = GBin.scrolled_window ?packing ?show () in - let vadj = scrolled_window#vadjustment in - let tv = - GText.view ~editable:false ~cursor_visible:false - ?width ?height ~packing:(scrolled_window#add) () - in - let colors = Hashtbl.create 13 in - let get_color color = - try - Hashtbl.find colors color - with Not_found -> - let tag = - tv#buffer#create_tag - [`FOREGROUND_SET true ; - `FOREGROUND_GDK - (Gdk.Color.alloc (Gdk.Color.get_system_colormap ()) (`NAME color))] - in - Hashtbl.add colors color tag; - tag - in - let log ?(append_NL = true) msg = - let rec aux color indent = - let indent_str = String.make indent ' ' in - function - | `T s -> tv#buffer#insert ~tags:[ get_color color ] s - | `L tags -> - List.iter - (fun tag -> aux color indent tag; tv#buffer#insert indent_str) - tags - | `BR -> tv#buffer#insert ("\n" ^ indent_str) - | `DIV (local_indent, new_color, tag) -> - tv#buffer#insert ("\n" ^ indent_str); - aux - (match new_color with None -> color | Some new_color -> new_color) - (indent + local_indent) tag - in - (match msg with - | `Error tag -> aux "red" 0 tag - | `Msg tag -> aux "black" 0 tag); - if append_NL then tv#buffer#insert "\n" - in - object (self) - initializer HelmLogger.register_log_callback log - end - diff --git a/helm/gTopLevel/helmGtkLogger.mli b/helm/gTopLevel/helmGtkLogger.mli deleted file mode 100644 index 06206dd3d..000000000 --- a/helm/gTopLevel/helmGtkLogger.mli +++ /dev/null @@ -1,31 +0,0 @@ -(* Copyright (C) 2004, HELM Team. - * - * This file is part of HELM, an Hypertextual, Electronic - * Library of Mathematics, developed at the Computer Science - * Department, University of Bologna, Italy. - * - * HELM is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * HELM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with HELM; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. - * - * For details, see the HELM World-Wide-Web page, - * http://helm.cs.unibo.it/ - *) - -class html_logger: - ?width:int -> ?height:int -> ?packing:(GObj.widget -> unit) -> ?show:bool -> - unit -> - object - end - diff --git a/helm/gTopLevel/invokeTactics.ml b/helm/gTopLevel/invokeTactics.ml deleted file mode 100644 index 13dc83f1d..000000000 --- a/helm/gTopLevel/invokeTactics.ml +++ /dev/null @@ -1,359 +0,0 @@ -(* Copyright (C) 2000-2002, HELM Team. - * - * This file is part of HELM, an Hypertextual, Electronic - * Library of Mathematics, developed at the Computer Science - * Department, University of Bologna, Italy. - * - * HELM is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * HELM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with HELM; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. - * - * For details, see the HELM World-Wide-Web page, - * http://cs.unibo.it/helm/. - *) - -(******************************************************************************) -(* *) -(* PROJECT HELM *) -(* *) -(* Claudio Sacerdoti Coen *) -(* 29/01/2003 *) -(* *) -(* *) -(******************************************************************************) - -open Printf - -exception RefreshSequentException of exn;; -exception RefreshProofException of exn;; - -module type Callbacks = - sig - (* input widgets *) - val sequent_viewer : unit -> TermViewer.sequent_viewer - val term_editor : unit -> TermEditor.term_editor - val scratch_window : - unit -> - < sequent_viewer: TermViewer.sequent_viewer ; - show: unit -> unit ; - term: Cic.term ; - set_term : Cic.term -> unit ; - metasenv: Cic.metasenv ; - set_metasenv : Cic.metasenv -> unit ; - context: Cic.context ; - set_context : Cic.context -> unit > - (* GUI refresh functions *) - val refresh_proof : unit -> unit - val refresh_goals : unit -> unit - (* callbacks for user-tactics interaction *) - val decompose_uris_choice_callback : - (UriManager.uri * int * 'a) list -> - (UriManager.uri * int * 'b list) list - val mk_fresh_name_callback : ProofEngineTypes.mk_fresh_name_type - val mqi_handle : MQIConn.handle - val dbd:Mysql.dbd - end -;; - -module type Tactics = - sig - val intros : unit -> unit - val exact : ?term:string -> unit -> unit - val apply : ?term:string -> unit -> unit - val elimintrossimpl : ?term:string -> unit -> unit - val elimtype : ?term:string -> unit -> unit - val whd : unit -> unit - val reduce : unit -> unit - val simpl : unit -> unit - val fold_whd : ?term:string -> unit -> unit - val fold_reduce : ?term:string -> unit -> unit - val fold_simpl : ?term:string -> unit -> unit - val cut : ?term:string -> unit -> unit - val change : unit -> unit - val letin : ?term:string -> unit -> unit - val ring : unit -> unit - val clearbody : unit -> unit - val clear : unit -> unit - val fourier : unit -> unit - val rewritesimpl : ?term:string -> unit -> unit - val rewritebacksimpl : ?term:string -> unit -> unit - val replace : unit -> unit - val reflexivity : unit -> unit - val symmetry : unit -> unit - val transitivity : ?term:string -> unit -> unit - val exists : unit -> unit - val split : unit -> unit - val left : unit -> unit - val right : unit -> unit - val assumption : unit -> unit - val generalize : unit -> unit - val absurd : ?term:string -> unit -> unit - val contradiction : unit -> unit - val decompose : ?term:string -> unit -> unit - val injection : ?term:string -> unit -> unit - val discriminate : ?term:string -> unit -> unit - val whd_in_scratch : unit -> unit - val reduce_in_scratch : unit -> unit - val simpl_in_scratch : unit -> unit - val auto : unit -> unit - end - -module Make (C: Callbacks) : Tactics = - struct - - let print_uncaught_exception e = - HelmLogger.log (`Error (`T (sprintf "Uncaught exception: %s" - (Printexc.to_string e)))) - - let handle_refresh_exception f savedproof savedgoal = - try - f () - with - | RefreshSequentException e -> - HelmLogger.log (`Error (`T - (sprintf "Exception raised during the refresh of the sequent: %s" - (Printexc.to_string e)))); - ProofEngine.set_proof savedproof ; - ProofEngine.goal := savedgoal ; - C.refresh_goals () - | RefreshProofException e -> - HelmLogger.log (`Error (`T - (sprintf "Exception raised during the refresh of the proof: %s" - (Printexc.to_string e)))); - ProofEngine.set_proof savedproof ; - ProofEngine.goal := savedgoal ; - C.refresh_goals () ; - C.refresh_proof () - | e -> - print_uncaught_exception e; - ProofEngine.set_proof savedproof ; - ProofEngine.goal := savedgoal - - let call_tactic tactic () = - let savedproof = ProofEngine.get_proof () in - let savedgoal = !ProofEngine.goal in - handle_refresh_exception - (fun () -> - tactic (); - C.refresh_goals (); - C.refresh_proof ()) - savedproof savedgoal - - let call_tactic_with_input tactic ?term () = - let savedproof = ProofEngine.get_proof () in - let savedgoal = !ProofEngine.goal in - let uri,metasenv,bo,ty = - match ProofEngine.get_proof () with - None -> assert false - | Some (uri,metasenv,bo,ty) -> uri,metasenv,bo,ty - in - let canonical_context = - match !ProofEngine.goal with - None -> assert false - | Some metano -> - let (_,canonical_context,_) = - List.find (function (m,_,_) -> m=metano) metasenv - in - canonical_context - in - handle_refresh_exception - (fun () -> - let metasenv',expr,ugraph = (*TASSI: FIX THIS*) - (match term with - | None -> () - | Some t -> (C.term_editor ())#set_term t); - (C.term_editor ())#get_metasenv_and_term canonical_context metasenv - in - ProofEngine.set_proof (Some (uri,metasenv',bo,ty)) ; - tactic expr ; - C.refresh_goals () ; - C.refresh_proof () ; - (C.term_editor ())#reset) - savedproof savedgoal - - let call_tactic_with_goal_input tactic () = - let module L = LogicalOperations in - let module G = Gdome in - let savedproof = ProofEngine.get_proof () in - let savedgoal = !ProofEngine.goal in - match (C.sequent_viewer ())#get_selected_terms with - | [term] -> - handle_refresh_exception - (fun () -> - tactic term ; - C.refresh_goals () ; - C.refresh_proof ()) - savedproof savedgoal - | [] -> HelmLogger.log (`Error (`T "No term selected")) - | _ -> HelmLogger.log (`Error (`T "Too many terms selected")) - - let call_tactic_with_goal_inputs tactic () = - let module L = LogicalOperations in - let module G = Gdome in - let savedproof = ProofEngine.get_proof () in - let savedgoal = !ProofEngine.goal in - handle_refresh_exception - (fun () -> - match (C.sequent_viewer ())#get_selected_terms with - | [] -> HelmLogger.log (`Error (`T "No term selected")) - | terms -> - tactic terms ; - C.refresh_goals () ; - C.refresh_proof ()) - savedproof savedgoal - - let call_tactic_with_input_and_goal_input tactic () = - let module L = LogicalOperations in - let module G = Gdome in - let savedproof = ProofEngine.get_proof () in - let savedgoal = !ProofEngine.goal in - match (C.sequent_viewer ())#get_selected_terms with - [term] -> - handle_refresh_exception - (fun () -> - let uri,metasenv,bo,ty = - match ProofEngine.get_proof () with - None -> assert false - | Some (uri,metasenv,bo,ty) -> uri,metasenv,bo,ty - in - let canonical_context = - match !ProofEngine.goal with - None -> assert false - | Some metano -> - let (_,canonical_context,_) = - List.find (function (m,_,_) -> m=metano) metasenv - in - canonical_context in - let (metasenv',expr,ugraph) =(* FIX THIS AND *) - (C.term_editor ())#get_metasenv_and_term - canonical_context metasenv - in - ProofEngine.set_proof (Some (uri,metasenv',bo,ty)) ; - tactic ~goal_input:term ~input:expr ; - C.refresh_goals () ; - C.refresh_proof () ; - (C.term_editor ())#reset) - savedproof savedgoal - | [] -> HelmLogger.log (`Error (`T "No term selected")) - | _ -> HelmLogger.log (`Error (`T "Too many terms selected")) - - let call_tactic_with_goal_input_in_scratch tactic () = - let module L = LogicalOperations in - let module G = Gdome in - let scratch_window = C.scratch_window () in - match scratch_window#sequent_viewer#get_selected_terms with - | [term] -> - begin - try - let expr = tactic term scratch_window#term in - scratch_window#sequent_viewer#load_sequent - scratch_window#metasenv (111,scratch_window#context,expr) ; - scratch_window#set_term expr ; - scratch_window#show () ; - with - e -> print_uncaught_exception e - end - | [] -> HelmLogger.log (`Error (`T "No term selected")) - | _ -> HelmLogger.log (`Error (`T "Too many terms selected")) - - let call_tactic_with_goal_inputs_in_scratch tactic () = - let module L = LogicalOperations in - let module G = Gdome in - let scratch_window = C.scratch_window () in - match scratch_window#sequent_viewer#get_selected_terms with - | [] -> HelmLogger.log (`Error (`T "No term selected")) - | terms -> - try - let expr = tactic terms scratch_window#term in - scratch_window#sequent_viewer#load_sequent - scratch_window#metasenv (111,scratch_window#context,expr) ; - scratch_window#set_term expr ; - scratch_window#show () ; - with - e -> print_uncaught_exception e - - let call_tactic_with_hypothesis_input tactic () = - let module L = LogicalOperations in - let module G = Gdome in - let savedproof = ProofEngine.get_proof () in - let savedgoal = !ProofEngine.goal in - match (C.sequent_viewer ())#get_selected_hypotheses with - | [hypothesis] -> - handle_refresh_exception - (fun () -> - tactic hypothesis ; - C.refresh_goals () ; - C.refresh_proof ()) - savedproof savedgoal - | [] -> HelmLogger.log (`Error (`T "No hypothesis selected")) - | _ -> HelmLogger.log (`Error (`T "Too many hypotheses selected")) - - - - let intros = - call_tactic - (ProofEngine.intros ~mk_fresh_name_callback:C.mk_fresh_name_callback) - let exact = call_tactic_with_input ProofEngine.exact - let apply = call_tactic_with_input ProofEngine.apply - let auto = call_tactic (ProofEngine.auto ~dbd:C.dbd) - let elimintrossimpl = call_tactic_with_input ProofEngine.elim_intros_simpl - let elimtype = call_tactic_with_input ProofEngine.elim_type - let whd = call_tactic_with_goal_inputs ProofEngine.whd - let reduce = call_tactic_with_goal_inputs ProofEngine.reduce - let simpl = call_tactic_with_goal_inputs ProofEngine.simpl - let fold_whd = call_tactic_with_input ProofEngine.fold_whd - let fold_reduce = call_tactic_with_input ProofEngine.fold_reduce - let fold_simpl = call_tactic_with_input ProofEngine.fold_simpl - let cut = - call_tactic_with_input - (ProofEngine.cut ~mk_fresh_name_callback:C.mk_fresh_name_callback) - let change = call_tactic_with_input_and_goal_input ProofEngine.change - let letin = - call_tactic_with_input - (ProofEngine.letin ~mk_fresh_name_callback:C.mk_fresh_name_callback) - let ring = call_tactic ProofEngine.ring - let clearbody = call_tactic_with_hypothesis_input ProofEngine.clearbody - let clear = call_tactic_with_hypothesis_input ProofEngine.clear - let fourier = call_tactic ProofEngine.fourier - let rewritesimpl = call_tactic_with_input ProofEngine.rewrite_simpl - let rewritebacksimpl = call_tactic_with_input ProofEngine.rewrite_back_simpl - let replace = call_tactic_with_input_and_goal_input ProofEngine.replace - let reflexivity = call_tactic ProofEngine.reflexivity - let symmetry = call_tactic ProofEngine.symmetry - let transitivity = call_tactic_with_input ProofEngine.transitivity - let exists = call_tactic ProofEngine.exists - let split = call_tactic ProofEngine.split - let left = call_tactic ProofEngine.left - let right = call_tactic ProofEngine.right - let assumption = call_tactic ProofEngine.assumption - let injection = call_tactic_with_input ProofEngine.injection - let discriminate = call_tactic_with_input ProofEngine.discriminate - let generalize = - call_tactic_with_goal_inputs - (ProofEngine.generalize ~mk_fresh_name_callback:C.mk_fresh_name_callback) - let absurd = call_tactic_with_input ProofEngine.absurd - let contradiction = call_tactic ProofEngine.contradiction - let decompose = - call_tactic_with_input - (ProofEngine.decompose - ~uris_choice_callback:C.decompose_uris_choice_callback) - let whd_in_scratch = - call_tactic_with_goal_inputs_in_scratch ProofEngine.whd_in_scratch - let reduce_in_scratch = - call_tactic_with_goal_inputs_in_scratch ProofEngine.reduce_in_scratch - let simpl_in_scratch = - call_tactic_with_goal_inputs_in_scratch ProofEngine.simpl_in_scratch - -end -;; diff --git a/helm/gTopLevel/invokeTactics.mli b/helm/gTopLevel/invokeTactics.mli deleted file mode 100644 index 993199fe4..000000000 --- a/helm/gTopLevel/invokeTactics.mli +++ /dev/null @@ -1,110 +0,0 @@ -(* Copyright (C) 2000-2002, HELM Team. - * - * This file is part of HELM, an Hypertextual, Electronic - * Library of Mathematics, developed at the Computer Science - * Department, University of Bologna, Italy. - * - * HELM is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * HELM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with HELM; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. - * - * For details, see the HELM World-Wide-Web page, - * http://cs.unibo.it/helm/. - *) - -(******************************************************************************) -(* *) -(* PROJECT HELM *) -(* *) -(* Claudio Sacerdoti Coen *) -(* 30/01/2003 *) -(* *) -(* *) -(******************************************************************************) - -exception RefreshSequentException of exn -exception RefreshProofException of exn - -module type Callbacks = - sig - (* input widgets *) - val sequent_viewer : unit -> TermViewer.sequent_viewer - val term_editor : unit -> TermEditor.term_editor - val scratch_window : - unit -> - < sequent_viewer: TermViewer.sequent_viewer ; - show: unit -> unit ; - term: Cic.term ; - set_term : Cic.term -> unit ; - metasenv: Cic.metasenv ; - set_metasenv : Cic.metasenv -> unit ; - context: Cic.context ; - set_context : Cic.context -> unit > - (* GUI refresh functions *) - val refresh_proof : unit -> unit - val refresh_goals : unit -> unit - (* callbacks for user-tactics interaction *) - val decompose_uris_choice_callback : - (UriManager.uri * int * 'a) list -> - (UriManager.uri * int * 'b list) list - val mk_fresh_name_callback : ProofEngineTypes.mk_fresh_name_type - val mqi_handle : MQIConn.handle - val dbd:Mysql.dbd - end - -module type Tactics = - sig - val intros : unit -> unit - val exact : ?term:string -> unit -> unit - val apply : ?term:string -> unit -> unit - val elimintrossimpl : ?term:string -> unit -> unit - val elimtype : ?term:string -> unit -> unit - val whd : unit -> unit - val reduce : unit -> unit - val simpl : unit -> unit - val fold_whd : ?term:string -> unit -> unit - val fold_reduce : ?term:string -> unit -> unit - val fold_simpl : ?term:string -> unit -> unit - val cut : ?term:string -> unit -> unit - val change : unit -> unit - val letin : ?term:string -> unit -> unit - val ring : unit -> unit - val clearbody : unit -> unit - val clear : unit -> unit - val fourier : unit -> unit - val rewritesimpl : ?term:string -> unit -> unit - val rewritebacksimpl : ?term:string -> unit -> unit - val replace : unit -> unit - val reflexivity : unit -> unit - val symmetry : unit -> unit - val transitivity : ?term:string -> unit -> unit - val exists : unit -> unit - val split : unit -> unit - val left : unit -> unit - val right : unit -> unit - val assumption : unit -> unit - val generalize : unit -> unit - val absurd : ?term:string -> unit -> unit - val contradiction : unit -> unit - val decompose : ?term:string -> unit -> unit - val injection : ?term:string -> unit -> unit - val discriminate : ?term:string -> unit -> unit - val whd_in_scratch : unit -> unit - val reduce_in_scratch : unit -> unit - val simpl_in_scratch : unit -> unit - val auto : unit -> unit - end - -module Make (C : Callbacks) : Tactics - diff --git a/helm/gTopLevel/logicalOperations.ml b/helm/gTopLevel/logicalOperations.ml deleted file mode 100644 index 3fab938a0..000000000 --- a/helm/gTopLevel/logicalOperations.ml +++ /dev/null @@ -1,121 +0,0 @@ -(* Copyright (C) 2002, HELM Team. - * - * This file is part of HELM, an Hypertextual, Electronic - * Library of Mathematics, developed at the Computer Science - * Department, University of Bologna, Italy. - * - * HELM is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * HELM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with HELM; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. - * - * For details, see the HELM World-Wide-Web page, - * http://cs.unibo.it/helm/. - *) - -let get_parent id ids_to_terms ids_to_father_ids = - match Hashtbl.find ids_to_father_ids id with - None -> None - | Some id -> Some (id, Hashtbl.find ids_to_terms id) -;; - -let get_context ids_to_terms ids_to_father_ids = - let module C = Cic in - let rec aux id = - match get_parent id ids_to_terms ids_to_father_ids with - None -> [] - | Some (parentid,parent) -> - let term = Hashtbl.find ids_to_terms id in - let binding = - match parent with - C.Rel _ - | C.Var _ - | C.Meta _ - | C.Sort _ - | C.Implicit _ - | C.Cast _ -> [] - | C.Prod (n,s,t) when t == term -> [Some (n,C.Decl s)] - | C.Prod _ -> [] - | C.Lambda (n,s,t) when t == term -> [Some (n,C.Decl s)] - | C.Lambda _ -> [] - | C.LetIn (n,s,t) when t == term -> [Some (n,C.Def (s,None))] - | C.LetIn _ -> [] - | C.Appl _ - | C.Const _ -> [] - | C.MutInd _ - | C.MutConstruct _ - | C.MutCase _ -> [] -(*CSC: sbagliato: manca il when *) - | C.Fix (_,ifl) -> - let counter = ref 0 in - List.rev_map - (function (name,_,ty,bo) -> - let res = - Some (C.Name name, (C.Def ((C.Fix (!counter,ifl)), Some ty))) - in - incr counter ; - res - ) ifl - | C.CoFix (_,ifl) -> - let counter = ref 0 in - List.rev_map - (function (name,ty,bo) -> - let res = - Some (C.Name name,(C.Def ((C.CoFix (!counter,ifl)), Some ty))) - in - incr counter ; - res - ) ifl - in - binding@(aux parentid) - in - aux -;; - -exception NotImplemented;; - -(* A subterm is changed into a fresh meta *) -let to_sequent id ids_to_terms ids_to_father_ids = - let module P = ProofEngine in - let term = Hashtbl.find ids_to_terms id in - let context = get_context ids_to_terms ids_to_father_ids id in - let metasenv = - match P.get_proof () with - None -> assert false - | Some (_,metasenv,_,_) -> metasenv - in - let ty,_ = (* TASSI: FIXME ehhmmmm *) - CicTypeChecker.type_of_aux' metasenv context term CicUniv.empty_ugraph - in - P.perforate context term ty (* P.perforate also sets the goal *) -;; - -exception FocusOnlyOnMeta;; - -(* If the current selection is a Meta, that Meta becomes the current goal *) -let focus id ids_to_terms ids_to_father_ids = - let module P = ProofEngine in - let term = Hashtbl.find ids_to_terms id in - let context = get_context ids_to_terms ids_to_father_ids id in - let metasenv = - match P.get_proof () with - None -> assert false - | Some (_,metasenv,_,_) -> metasenv - in - let ty,_ = - CicTypeChecker.type_of_aux' metasenv context term CicUniv.empty_ugraph - in - match term with - Cic.Meta (n,_) -> P.goal := Some n - | _ -> raise FocusOnlyOnMeta -;; diff --git a/helm/gTopLevel/logicalOperations.mli b/helm/gTopLevel/logicalOperations.mli deleted file mode 100644 index c44acfcbb..000000000 --- a/helm/gTopLevel/logicalOperations.mli +++ /dev/null @@ -1,32 +0,0 @@ -(* Copyright (C) 2002, HELM Team. - * - * This file is part of HELM, an Hypertextual, Electronic - * Library of Mathematics, developed at the Computer Science - * Department, University of Bologna, Italy. - * - * HELM is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * HELM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with HELM; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. - * - * For details, see the HELM World-Wide-Web page, - * http://cs.unibo.it/helm/. - *) - -exception NotImplemented -exception FocusOnlyOnMeta - -val to_sequent : - 'a -> ('a, Cic.term) Hashtbl.t -> ('a, 'a option) Hashtbl.t -> unit -val focus : - 'a -> ('a, Cic.term) Hashtbl.t -> ('a, 'a option) Hashtbl.t -> unit diff --git a/helm/gTopLevel/oldDisambiguate.ml b/helm/gTopLevel/oldDisambiguate.ml deleted file mode 100644 index 24dd30f91..000000000 --- a/helm/gTopLevel/oldDisambiguate.ml +++ /dev/null @@ -1,354 +0,0 @@ -(* Copyright (C) 2000-2002, HELM Team. - * - * This file is part of HELM, an Hypertextual, Electronic - * Library of Mathematics, developed at the Computer Science - * Department, University of Bologna, Italy. - * - * HELM is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * HELM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with HELM; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. - * - * For details, see the HELM World-Wide-Web page, - * http://cs.unibo.it/helm/. - *) - -(******************************************************************************) -(* *) -(* PROJECT HELM *) -(* *) -(* Claudio Sacerdoti Coen *) -(* 06/01/2002 *) -(* *) -(* *) -(******************************************************************************) - -open Printf - -(** This module provides a functor to disambiguate the input **) -(** given a set of user-interface call-backs **) - -module type Callbacks = - sig - val interactive_user_uri_choice : - selection_mode:[`SINGLE | `MULTIPLE] -> - ?ok:string -> - ?enable_button_for_non_vars:bool -> - title:string -> msg:string -> id:string -> string list -> string list - val interactive_interpretation_choice : - (string * string) list list -> int list - val input_or_locate_uri : title:string -> ?id:string -> unit -> UriManager.uri - end -;; - -type domain_and_interpretation = - CicTextualParser0.interpretation_domain_item list * - CicTextualParser0.interpretation -;; - -module Make(C:Callbacks) = - struct - - let locate_one_id mqi_handle id = - let query = MQueryGenerator.locate id in - let result = MQueryInterpreter.execute mqi_handle query in - let uris = - List.map - (function uri,_ -> - MQueryMisc.wrong_xpointer_format_from_wrong_xpointer_format' uri - ) result in - HelmLogger.log (`Msg (`T "Locate query:")); - MQueryUtil.text_of_query - (fun s -> HelmLogger.log ~append_NL:false (`Msg (`T s))) - "" query; - HelmLogger.log (`Msg (`T "Result:")); - MQueryUtil.text_of_result (fun s -> HelmLogger.log (`Msg (`T s))) "" result; - let uris' = - match uris with - [] -> - [UriManager.string_of_uri - (C.input_or_locate_uri - ~title:("URI matching \"" ^ id ^ "\" unknown.") ~id ())] - | [uri] -> [uri] - | _ -> - C.interactive_user_uri_choice - ~selection_mode:`MULTIPLE - ~ok:"Try every selection." - ~enable_button_for_non_vars:true - ~title:"Ambiguous input." - ~msg: - ("Ambiguous input \"" ^ id ^ - "\". Please, choose one or more interpretations:") - ~id - uris - in - List.map MQueryMisc.cic_textual_parser_uri_of_string uris' - - - exception ThereDoesNotExistAnyWellTypedInterpretationOfTheInput - - type test_result = - Ok of Cic.term * Cic.metasenv - | Ko - | Uncertain - - type ambiguous_choices = - Uris of CicTextualParser0.uri list - | Symbols of (CicTextualParser0.interpretation -> Cic.term) list - - let disambiguate_input mqi_handle context metasenv dom mk_metasenv_and_expr ~id_to_uris= - let known_ids,resolve_id = id_to_uris in - let dom' = - let rec filter = - function - [] -> [] - | he::tl -> - if List.mem he known_ids then filter tl else he::(filter tl) - in - filter dom - in - (* for each id in dom' we get the list of uris associated to it *) - let list_of_uris = - List.map - (function - CicTextualParser0.Id id -> Uris (locate_one_id mqi_handle id) - | CicTextualParser0.Symbol (descr,choices) -> - (* CSC: Implementare la funzione di filtraggio manuale *) - (* CSC: corrispondente alla locate_one_id *) - Symbols (List.map snd choices) - ) dom' in - let tests_no = - List.fold_left - (fun i uris -> - let len = - match uris with - Uris l -> List.length l - | Symbols l -> List.length l - in - i * len - ) 1 list_of_uris - in - if tests_no > 1 then - HelmLogger.log (`Msg (`T (sprintf - "Disambiguation phase started: up to %d cases will be tried" - tests_no))); - (* and now we compute the list of all possible assignments from *) - (* id to uris that generate well-typed terms *) - let resolve_ids = - (* function to test if a partial interpretation is so far correct *) - let test resolve_id residual_dom = - (* We put implicits in place of every identifier that is not *) - (* resolved by resolve_id *) - let resolve_id' = - List.fold_left - (fun f id -> - function id' -> - if id = id' then Some (CicTextualParser0.Implicit) else f id' - ) resolve_id residual_dom - in - (* and we try to refine the term *) - let metasenv',expr = mk_metasenv_and_expr resolve_id' in -(*CSC: Bug here: we do not try to typecheck also the metasenv' *) - try - let term,_,metasenv'',_ = (* TASSI: FIXME what are we doning here?*) - CicRefine.type_of_aux' metasenv' context expr CicUniv.empty_ugraph - in - Ok (term,metasenv'') (* TASSI: whould we pass back the ugraph? *) - with - CicRefine.Uncertain _ -> -prerr_endline ("%%% UNCERTAIN!!! " ^ CicPp.ppterm expr) ; - Uncertain - | CicRefine.RefineFailure _ -> -prerr_endline ("%%% PRUNED!!! " ^ CicPp.ppterm expr) ; - Ko - in - let rec aux resolve_id ids list_of_uris = - match ids,list_of_uris with - [],[] -> - (match test resolve_id [] with - Ok (term,metasenv) -> [resolve_id,term,metasenv] - | Ko | Uncertain -> []) - | id::idtl,uris::uristl -> - let rec filter = - function - [] -> [] - | (uri : CicTextualParser0.interpretation_codomain_item)::uritl -> - let resolve_id' = - function id' -> if id = id' then Some uri else resolve_id id' - in - (match test resolve_id' idtl with - Ok (term,metasenv) -> - (* the next three ``if''s are used to avoid the base *) - (* case where the term would be refined a second time. *) - (if uristl = [] then - [resolve_id',term,metasenv] - else - (aux resolve_id' idtl uristl) - ) @ (filter uritl) - | Uncertain -> - (if uristl = [] then [] - else - (aux resolve_id' idtl uristl) - ) @ (filter uritl) - | Ko -> - filter uritl - ) - in - (match uris with - Uris uris -> - filter - (List.map (function uri -> CicTextualParser0.Uri uri) uris) - | Symbols symbols -> - filter - (List.map - (function sym -> CicTextualParser0.Term sym) symbols)) - | _,_ -> assert false - in - aux resolve_id dom' list_of_uris - in - List.iter - (function (resolve,term,newmetasenv) -> - (* If metasen <> newmetasenv is a normal condition, we should *) - (* be prepared to apply the returned substitution to the *) - (* whole current proof. *) - if metasenv <> newmetasenv then - begin - prerr_endline - (Printf.sprintf - "+++++ ASSERTION FAILED: a refine operation should not modify the metasenv. Old metasenv:\n %s\n New metasenv:\n %s\n" - (CicMetaSubst.ppmetasenv metasenv []) - (CicMetaSubst.ppmetasenv newmetasenv [])) ; - (* an assert would raise an exception that could be caught *) - exit 1 - end - ) resolve_ids ; - let res = - match resolve_ids with - [] -> raise ThereDoesNotExistAnyWellTypedInterpretationOfTheInput - | [_] -> resolve_ids - | _ -> - let choices = - List.map - (function (resolve,_,_) -> - List.map - (function id -> - (match id with - CicTextualParser0.Id id -> id - | CicTextualParser0.Symbol (descr,_) -> descr - ), - match resolve id with - None -> assert false - | Some (CicTextualParser0.Uri uri) -> - (match uri with - CicTextualParser0.ConUri uri - | CicTextualParser0.VarUri uri -> - UriManager.string_of_uri uri - | CicTextualParser0.IndTyUri (uri,tyno) -> - UriManager.string_of_uri uri ^ "#xpointer(1/" ^ - string_of_int (tyno+1) ^ ")" - | CicTextualParser0.IndConUri (uri,tyno,consno) -> - UriManager.string_of_uri uri ^ "#xpointer(1/" ^ - string_of_int (tyno+1) ^ "/" ^ string_of_int consno ^ ")") - | Some (CicTextualParser0.Term term) -> - (* CSC: Implementare resa delle scelte *) - "To be implemented XXX01" - | Some CicTextualParser0.Implicit -> assert false - ) dom - ) resolve_ids - in - let indexes = C.interactive_interpretation_choice choices in - List.map (List.nth resolve_ids) indexes - in - List.map - (fun (resolve_id',term,metasenv') -> - (known_ids @ dom', resolve_id'), metasenv',term - ) res -end -;; - -module EnvironmentP3 = - struct - type t = domain_and_interpretation - - let empty = "" - - let to_string (dom,resolve_id) = - let string_of_cic_textual_parser_uri uri = - let module C = Cic in - let module CTP = CicTextualParser0 in - let uri' = - match uri with - CTP.ConUri uri -> UriManager.string_of_uri uri - | CTP.VarUri uri -> UriManager.string_of_uri uri - | CTP.IndTyUri (uri,tyno) -> - UriManager.string_of_uri uri ^ "#1/" ^ string_of_int (tyno + 1) - | CTP.IndConUri (uri,tyno,consno) -> - UriManager.string_of_uri uri ^ "#1/" ^ string_of_int (tyno + 1) ^ "/" ^ - string_of_int consno - in - (* 4 = String.length "cic:" *) - String.sub uri' 4 (String.length uri' - 4) - in - String.concat "\n" - (List.map - (function v -> - let uri = - match resolve_id v with - None -> assert false - | Some (CicTextualParser0.Uri uri) -> uri - | Some (CicTextualParser0.Term _) - | Some CicTextualParser0.Implicit -> assert false - in - "alias " ^ - (match v with - CicTextualParser0.Id id -> id - | CicTextualParser0.Symbol (descr,_) -> - (* CSC: To be implemented *) - assert false - )^ " " ^ (string_of_cic_textual_parser_uri uri) - ) dom) - - let of_string inputtext = - let regexpr = - let alfa = "[a-zA-Z_-]" in - let digit = "[0-9]" in - let ident = alfa ^ "\\(" ^ alfa ^ "\\|" ^ digit ^ "\\)*" in - let blanks = "\\( \\|\t\\|\n\\)+" in - let nonblanks = "[^ \t\n]+" in - let uri = "/\\(" ^ ident ^ "/\\)*" ^ nonblanks in - (* not very strict check *) - Str.regexp - ("alias" ^ blanks ^ "\\(" ^ ident ^ "\\)" ^ blanks ^ "\\(" ^ uri ^ "\\)") - in - let rec aux n = - try - let n' = Str.search_forward regexpr inputtext n in - let id = CicTextualParser0.Id (Str.matched_group 2 inputtext) in - let uri = - MQueryMisc.cic_textual_parser_uri_of_string - ("cic:" ^ (Str.matched_group 5 inputtext)) - in - let dom,resolve_id = aux (n' + 1) in - if List.mem id dom then - dom,resolve_id - else - id::dom, - (function id' -> - if id = id' then - Some (CicTextualParser0.Uri uri) - else resolve_id id') - with - Not_found -> ([],function _ -> None) - in - aux 0 - end diff --git a/helm/gTopLevel/oldDisambiguate.mli b/helm/gTopLevel/oldDisambiguate.mli deleted file mode 100644 index c9b2775fe..000000000 --- a/helm/gTopLevel/oldDisambiguate.mli +++ /dev/null @@ -1,74 +0,0 @@ -(* Copyright (C) 2000-2002, HELM Team. - * - * This file is part of HELM, an Hypertextual, Electronic - * Library of Mathematics, developed at the Computer Science - * Department, University of Bologna, Italy. - * - * HELM is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * HELM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with HELM; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. - * - * For details, see the HELM World-Wide-Web page, - * http://cs.unibo.it/helm/. - *) - -(******************************************************************************) -(* *) -(* PROJECT HELM *) -(* *) -(* Claudio Sacerdoti Coen *) -(* 15/01/2003 *) -(* *) -(* *) -(******************************************************************************) - -(** This module provides a functor to disambiguate the input **) -(** given a set of user-interface call-backs **) - -module type Callbacks = - sig - val interactive_user_uri_choice : - selection_mode:[`SINGLE | `MULTIPLE] -> - ?ok:string -> - ?enable_button_for_non_vars:bool -> - title:string -> msg:string -> id:string -> string list -> string list - val interactive_interpretation_choice : - (string * string) list list -> int list - val input_or_locate_uri : title:string -> ?id:string -> unit -> UriManager.uri - end - -type domain_and_interpretation = - CicTextualParser0.interpretation_domain_item list * - CicTextualParser0.interpretation - -module Make (C : Callbacks) : - sig - exception ThereDoesNotExistAnyWellTypedInterpretationOfTheInput - val disambiguate_input : - MQIConn.handle -> - Cic.context -> - Cic.metasenv -> - CicTextualParser0.interpretation_domain_item list -> - (CicTextualParser0.interpretation -> Cic.metasenv * Cic.term) -> - id_to_uris:domain_and_interpretation -> - (domain_and_interpretation * Cic.metasenv * Cic.term) list - end - -module EnvironmentP3 : - sig - type t = domain_and_interpretation - val empty : string - val to_string : t -> string - val of_string : string -> t - end diff --git a/helm/gTopLevel/proofEngine.ml b/helm/gTopLevel/proofEngine.ml deleted file mode 100644 index 0cfd8f07c..000000000 --- a/helm/gTopLevel/proofEngine.ml +++ /dev/null @@ -1,268 +0,0 @@ -(* Copyright (C) 2000, HELM Team. - * - * This file is part of HELM, an Hypertextual, Electronic - * Library of Mathematics, developed at the Computer Science - * Department, University of Bologna, Italy. - * - * HELM is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * HELM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with HELM; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. - * - * For details, see the HELM World-Wide-Web page, - * http://cs.unibo.it/helm/. - *) - -open ProofEngineHelpers -open ProofEngineTypes - - (* proof assistant status *) - -let proof = ref (None : proof option) -let goal = ref (None : goal option) - -let get_proof () = !proof;; -let set_proof p = proof := p;; - -let get_current_status_as_xml () = - match get_proof () with - None -> assert false - | Some (uri, metasenv, bo, ty) -> - let uri = match uri with Some uri -> uri | None -> assert false in - let currentproof = - (*CSC: Wrong: [] is just plainly wrong *) - Cic.CurrentProof (UriManager.name_of_uri uri,metasenv,bo,ty,[],[]) - in - let (acurrentproof,_,_,ids_to_inner_sorts,_,_,_) = - Cic2acic.acic_object_of_cic_object ~eta_fix:false currentproof - in - let xml, bodyxml = - match - Cic2Xml.print_object uri ~ids_to_inner_sorts - ~ask_dtd_to_the_getter:true acurrentproof - with - xml,Some bodyxml -> xml,bodyxml - | _,None -> assert false - in - (xml, bodyxml) -;; - -let apply_tactic ~tactic = - let module PET = ProofEngineTypes in - match get_proof (),!goal with - | None,_ - | _,None -> assert false - | Some proof', Some goal' -> - let (newproof, newgoals) = PET.apply_tactic tactic (proof', goal') in - set_proof (Some newproof); - goal := - (match newgoals, newproof with - goal::_, _ -> Some goal - | [], (_,(goal,_,_)::_,_,_) -> - (* the tactic left no open goal ; let's choose the first open goal *) - (*CSC: here we could implement and use a proof-tree like notion... *) - Some goal - | _, _ -> None) -;; - -(* metas_in_term term *) -(* Returns the ordered list of the metas that occur in [term]. *) -(* Duplicates are removed. The implementation is not very efficient. *) -let metas_in_term term = - let module C = Cic in - let rec aux = - function - C.Rel _ -> [] - | C.Meta (n,_) -> [n] - | C.Sort _ - | C.Implicit _ -> [] - | C.Cast (te,ty) -> (aux te) @ (aux ty) - | C.Prod (_,s,t) -> (aux s) @ (aux t) - | C.Lambda (_,s,t) -> (aux s) @ (aux t) - | C.LetIn (_,s,t) -> (aux s) @ (aux t) - | C.Appl l -> List.fold_left (fun i t -> i @ (aux t)) [] l - | C.Var (_,exp_named_subst) - | C.Const (_,exp_named_subst) - | C.MutInd (_,_,exp_named_subst) - | C.MutConstruct (_,_,_,exp_named_subst) -> - List.fold_left (fun i (_,t) -> i @ (aux t)) [] exp_named_subst - | C.MutCase (_,_,outt,t,pl) -> - (aux outt) @ (aux t) @ - (List.fold_left (fun i t -> i @ (aux t)) [] pl) - | C.Fix (_,fl) -> - List.fold_left (fun i (_,_,ty,bo) -> i @ (aux bo) @ (aux ty)) [] fl - | C.CoFix (_,fl) -> - List.fold_left (fun i (_,ty,bo) -> i @ (aux bo) @ (aux ty)) [] fl - in - let metas = aux term in - let rec elim_duplicates = - function - [] -> [] - | he::tl -> - he::(elim_duplicates (List.filter (function el -> he <> el) tl)) - in - elim_duplicates metas - -(* perforate context term ty *) -(* replaces the term [term] in the proof with a new metavariable whose type *) -(* is [ty]. [context] must be the context of [term] in the whole proof. This *) -(* could be easily computed; so the only reasons to have it as an argument *) -(* are efficiency reasons. *) -let perforate context term ty = - let module C = Cic in - match get_proof () with - None -> assert false - | Some (uri,metasenv,bo,gty as proof') -> - let newmeta = new_meta_of_proof proof' in - (* We push the new meta at the end of the list for pretty-printing *) - (* purposes: in this way metas are ordered. *) - let metasenv' = metasenv@[newmeta,context,ty] in - let irl = - CicMkImplicit.identity_relocation_list_for_metavariable context - in -(*CSC: Bug: se ci sono due term uguali nella prova dovrei bucarne uno solo!!!*) - let bo' = - ProofEngineReduction.replace (==) [term] [C.Meta (newmeta,irl)] bo - in - (* It may be possible that some metavariables occurred only in *) - (* the term we are perforating and they now occurs no more. We *) - (* get rid of them, collecting the really useful metavariables *) - (* in metasenv''. *) -(*CSC: Bug: una meta potrebbe non comparire in bo', ma comparire nel tipo *) -(*CSC: di una metavariabile che compare in bo'!!!!!!! *) - let newmetas = metas_in_term bo' in - let metasenv'' = - List.filter (function (n,_,_) -> List.mem n newmetas) metasenv' - in - set_proof (Some (uri,metasenv'',bo',gty)) ; - goal := Some newmeta - - -(************************************************************) -(* Some easy tactics. *) -(************************************************************) - -(* Reduces [term] using [reduction_function] in the current scratch goal [ty] *) -let reduction_tactic_in_scratch reduction_function terms ty = - let metasenv = - match get_proof () with - None -> [] - | Some (_,metasenv,_,_) -> metasenv - in - let metano,context,_ = - match !goal with - None -> assert false - | Some metano -> List.find (function (m,_,_) -> m=metano) metasenv - in - let terms' = List.map (reduction_function context) terms in - ProofEngineReduction.replace - ~equality:(==) ~what:terms ~with_what:terms' ~where:ty -;; - -let whd_in_scratch = reduction_tactic_in_scratch CicReduction.whd -let reduce_in_scratch = reduction_tactic_in_scratch ProofEngineReduction.reduce -let simpl_in_scratch = reduction_tactic_in_scratch ProofEngineReduction.simpl - -(************************************************************) -(* Tactics defined elsewhere *) -(************************************************************) - - (* primitive tactics *) - -let apply term = apply_tactic (PrimitiveTactics.apply_tac ~term) -let intros ?mk_fresh_name_callback () = - apply_tactic (PrimitiveTactics.intros_tac ?mk_fresh_name_callback ()) -let cut ?mk_fresh_name_callback term = - apply_tactic (PrimitiveTactics.cut_tac ?mk_fresh_name_callback ~term) -let letin ?mk_fresh_name_callback term = - apply_tactic (PrimitiveTactics.letin_tac ?mk_fresh_name_callback ~term) -let exact term = apply_tactic (PrimitiveTactics.exact_tac ~term) -let elim_intros_simpl term = - apply_tactic (PrimitiveTactics.elim_intros_simpl_tac ~term) -let change ~goal_input:what ~input:with_what = - apply_tactic (PrimitiveTactics.change_tac ~what ~with_what) - - (* structural tactics *) - -let clearbody hyp = apply_tactic (ProofEngineStructuralRules.clearbody ~hyp) -let clear hyp = apply_tactic (ProofEngineStructuralRules.clear ~hyp) - - (* reduction tactics *) - -let whd terms = - apply_tactic - (ReductionTactics.whd_tac ~also_in_hypotheses:true ~terms:(Some terms)) -let reduce terms = - apply_tactic - (ReductionTactics.reduce_tac ~also_in_hypotheses:true ~terms:(Some terms)) -let simpl terms = - apply_tactic - (ReductionTactics.simpl_tac ~also_in_hypotheses:true ~terms:(Some terms)) - -let fold_whd term = - apply_tactic - (ReductionTactics.fold_tac ~reduction:CicReduction.whd - ~also_in_hypotheses:true ~term) -let fold_reduce term = - apply_tactic - (ReductionTactics.fold_tac ~reduction:ProofEngineReduction.reduce - ~also_in_hypotheses:true ~term) -let fold_simpl term = - apply_tactic - (ReductionTactics.fold_tac ~reduction:ProofEngineReduction.simpl - ~also_in_hypotheses:true ~term) - - (* other tactics *) - -let elim_type term = apply_tactic (EliminationTactics.elim_type_tac ~term) -let ring () = apply_tactic Ring.ring_tac -let fourier () = apply_tactic FourierR.fourier_tac - -(* let auto ~dbd () = apply_tactic (AutoTactic.auto_tac ~dbd) *) -let auto ~dbd () = apply_tactic (AutoTactic.auto_tac_new ~dbd) - - -let rewrite_simpl term = apply_tactic (EqualityTactics.rewrite_simpl_tac ~term) -let rewrite_back_simpl term = apply_tactic (EqualityTactics.rewrite_back_simpl_tac ~term) -let replace ~goal_input:what ~input:with_what = - apply_tactic (EqualityTactics.replace_tac ~what ~with_what) - -let reflexivity () = apply_tactic EqualityTactics.reflexivity_tac -let symmetry () = apply_tactic EqualityTactics.symmetry_tac -let transitivity term = apply_tactic (EqualityTactics.transitivity_tac ~term) - -let exists () = apply_tactic IntroductionTactics.exists_tac -let split () = apply_tactic IntroductionTactics.split_tac -let left () = apply_tactic IntroductionTactics.left_tac -let right () = apply_tactic IntroductionTactics.right_tac - -let assumption () = apply_tactic VariousTactics.assumption_tac - -let generalize ?mk_fresh_name_callback terms = - apply_tactic (VariousTactics.generalize_tac ?mk_fresh_name_callback terms) - -let absurd term = apply_tactic (NegationTactics.absurd_tac ~term) -let contradiction () = apply_tactic NegationTactics.contradiction_tac - -let decompose ~uris_choice_callback term = - apply_tactic (EliminationTactics.decompose_tac ~uris_choice_callback term) - -let injection term = apply_tactic (DiscriminationTactics.injection_tac ~term) -let discriminate term = apply_tactic (DiscriminationTactics.discriminate_tac ~term) -let decide_equality () = apply_tactic DiscriminationTactics.decide_equality_tac -let compare term = apply_tactic (DiscriminationTactics.compare_tac ~term) - -(* -let prova_tatticali () = apply_tactic Tacticals.prova_tac -*) - diff --git a/helm/gTopLevel/proofEngine.mli b/helm/gTopLevel/proofEngine.mli deleted file mode 100644 index a38a02947..000000000 --- a/helm/gTopLevel/proofEngine.mli +++ /dev/null @@ -1,103 +0,0 @@ -(* Copyright (C) 2002, HELM Team. - * - * This file is part of HELM, an Hypertextual, Electronic - * Library of Mathematics, developed at the Computer Science - * Department, University of Bologna, Italy. - * - * HELM is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * HELM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with HELM; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. - * - * For details, see the HELM World-Wide-Web page, - * http://cs.unibo.it/helm/. - *) - - (* proof engine status *) -val get_proof : unit -> ProofEngineTypes.proof option -val set_proof : ProofEngineTypes.proof option -> unit -val goal : ProofEngineTypes.goal option ref - - (** return a pair of "xml" (as defined in Xml module) representing the current - proof type and body, respectively *) -val get_current_status_as_xml : unit -> Xml.token Stream.t * Xml.token Stream.t - - (* start a new goal undoing part of the proof *) -val perforate : Cic.context -> Cic.term -> Cic.term -> unit - - (* reduction tactics *) -val whd : Cic.term list -> unit -val reduce : Cic.term list -> unit -val simpl : Cic.term list -> unit -val fold_whd : Cic.term -> unit -val fold_reduce : Cic.term -> unit -val fold_simpl : Cic.term -> unit - - (* scratch area reduction tactics *) -val whd_in_scratch : Cic.term list -> Cic.term -> Cic.term -val reduce_in_scratch : Cic.term list -> Cic.term -> Cic.term -val simpl_in_scratch : Cic.term list -> Cic.term -> Cic.term - - (* "primitive" tactics *) -val apply : Cic.term -> unit -val intros : - ?mk_fresh_name_callback:ProofEngineTypes.mk_fresh_name_type -> unit -> unit -val cut : - ?mk_fresh_name_callback:ProofEngineTypes.mk_fresh_name_type -> Cic.term -> unit -val letin : - ?mk_fresh_name_callback:ProofEngineTypes.mk_fresh_name_type -> Cic.term -> unit -val exact : Cic.term -> unit -val elim_intros_simpl : Cic.term -> unit -val change : goal_input:Cic.term -> input:Cic.term -> unit - - (* structural tactics *) -val clearbody : Cic.hypothesis -> unit -val clear : Cic.hypothesis -> unit - - (* other tactics *) -val elim_type : Cic.term -> unit -val ring : unit -> unit -val fourier : unit -> unit -val rewrite_simpl : Cic.term -> unit -val rewrite_back_simpl : Cic.term -> unit -val replace : goal_input:Cic.term -> input:Cic.term -> unit -val auto : dbd:Mysql.dbd -> unit -> unit - -val reflexivity : unit -> unit -val symmetry : unit -> unit -val transitivity : Cic.term -> unit - -val exists : unit -> unit -val split : unit -> unit -val left : unit -> unit -val right : unit -> unit - -val assumption : unit -> unit - -val generalize : - ?mk_fresh_name_callback:ProofEngineTypes.mk_fresh_name_type -> - Cic.term list -> unit - -val absurd : Cic.term -> unit -val contradiction : unit -> unit - -val decompose : - uris_choice_callback: - ((UriManager.uri * int * (UriManager.uri * Cic.term) list) list -> - (UriManager.uri * int * (UriManager.uri * Cic.term) list) list) -> - Cic.term -> unit - -val injection : Cic.term -> unit -val discriminate : Cic.term -> unit -val decide_equality : unit -> unit -val compare : Cic.term -> unit diff --git a/helm/gTopLevel/regtest.ml b/helm/gTopLevel/regtest.ml deleted file mode 100644 index bee1c2816..000000000 --- a/helm/gTopLevel/regtest.ml +++ /dev/null @@ -1,385 +0,0 @@ -(* Copyright (C) 2004, HELM Team. - * - * This file is part of HELM, an Hypertextual, Electronic - * Library of Mathematics, developed at the Computer Science - * Department, University of Bologna, Italy. - * - * HELM is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * HELM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with HELM; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. - * - * For details, see the HELM World-Wide-Web page, - * http://helm.cs.unibo.it/ - *) - -open Printf - -let argc = Array.length Sys.argv - -let rawsep = "###" -let sep = Pcre.regexp (sprintf "^%s" rawsep) -let sep2 = Pcre.regexp (sprintf "^%s%s" rawsep rawsep) -let print s = print_string s; flush stdout -let print_endline s = print_endline s -let print_endline_to_channel ch s = output_string ch (s ^ "\n") - -type state = Term | EEnv | EMetasenv | ETerm | EType | EReduced - -(* regtest file format - * < cic term in concrete syntax > - * separatorseparator INTERPRETATION NUMBER separatorseparator - * separator (* see sep above *) - * < expected disambiguating environment (EnvironmentP3.to_string) > - * separator (* see sep above *) - * < expected metasenv after disambiguation (CicMetaSubst.ppmetasenv) > - * separator (* see sep above *) - * < expected cic term after disambiguation (CicPp.ppterm) > - * separator (* see sep above *) - * < expected cic type as per type_of (CicPp.ppterm) > - * separator (* see sep above *) - * < expected reduced cic term as (CicPp.ppterm) > - * ... (* repeat from ... INTERPRETATION NUMBER ... *) - *) - -type regtest = { - term: string; (* raw cic term *) - eenv : string; (* disambiguating parsing environment *) - emetasenv : string; (* expected metasenv *) - eterm: string; (* expected term *) - etype: string; (* expected type *) - ereduced: string; (* expected reduced term *) -} - -let print_test tests fname = - let oc = open_out fname in - output_string oc (List.hd tests).term; - let i = ref 0 in - List.iter - (function test -> - incr i ; - output_string oc - (String.concat "" - [ sprintf "%s%s INTERPRETATION NUMBER %d %s%s\n" rawsep rawsep !i rawsep rawsep ; - sprintf "%s (* disambiguation environment *)\n" rawsep; - test.eenv; - sprintf "%s (* METASENV after disambiguation *)\n" rawsep; - test.emetasenv; - sprintf "%s (* TERM after disambiguation *)\n" rawsep; - test.eterm; - sprintf "%s (* TYPE_OF the disambiguated term *)\n" rawsep; - test.etype; - sprintf "%s (* REDUCED disambiguated term *)\n" rawsep; - test.ereduced ]) - ) tests; - close_out oc - -let parse_regtest = - let term = Buffer.create 1024 in (* raw term *) - let eenv = Buffer.create 1024 in (* disambiguating parser environment *) - let emetasenv = Buffer.create 1024 in (* expected metasenv *) - let eterm = Buffer.create 1024 in (* raw expected term *) - let etype = Buffer.create 1024 in (* raw expected type *) - let ereduced = Buffer.create 1024 in (* raw expected reducted term *) - let state = ref Term in - let bump_state () = - match !state with - | Term -> state := EEnv - | EEnv -> state := EMetasenv - | EMetasenv -> state := ETerm - | ETerm -> state := EType - | EType -> state := EReduced - | EReduced -> assert false - in - let buffer_of_state = function - | Term -> term | EEnv -> eenv | EMetasenv -> emetasenv | ETerm -> eterm | EType -> etype - | EReduced -> ereduced - in - let clear_buffers () = - List.iter Buffer.clear [ eenv; emetasenv; eterm; etype; ereduced ] - in - fun fname -> - state := Term; - let first = ref true in - let res = ref [] in - let push_res () = - res := - {term = Buffer.contents term; - eenv = Buffer.contents eenv; - emetasenv = Buffer.contents emetasenv; - eterm = Buffer.contents eterm; - etype = Buffer.contents etype; - ereduced = Buffer.contents ereduced } :: !res ; - in - Buffer.clear term; - let ic = open_in fname in - (try - while true do - let line = input_line ic in - match line with - | l when Pcre.pmatch ~rex:sep2 l -> - if !first then first := false else push_res () ; - clear_buffers (); - state := Term - | l when Pcre.pmatch ~rex:sep l -> bump_state () - | l -> Buffer.add_string (buffer_of_state !state) (line ^ "\n") - done - with End_of_file -> ()); - push_res () ; - List.rev !res - -let as_expected_one och expected found = (* ignores "term" field *) - let eterm_ok = expected.eterm = found.eterm in - let eenv_ok = expected.eenv = found.eenv in - let emetasenv_ok = expected.emetasenv = found.emetasenv in - let etype_ok = expected.etype = found.etype in - let ereduced_ok = expected.ereduced = found.ereduced in - let outcome = - eterm_ok && eenv_ok && emetasenv_ok && etype_ok && ereduced_ok - in - begin - let print_endline s = print_endline_to_channel (Lazy.force och) s in - if not eterm_ok then begin - print_endline "### Term mismatch ###"; - print_endline "# expected:"; - print_endline (" " ^ expected.eterm); - print_endline "# found:"; - print_endline (" " ^ found.eterm); - end; - if not eenv_ok then begin - print_endline "### Disambiguation environment mismatch ###"; - print_endline "# expected:"; - print_endline (" " ^ expected.eenv); - print_endline "# found:"; - print_endline (" " ^ found.eenv); - end; - if not emetasenv_ok then begin - print_endline "### Metasenv mismatch ###"; - print_endline "# expected:"; - print_endline (" " ^ expected.emetasenv); - print_endline "# found:"; - print_endline (" " ^ found.emetasenv); - end; - if not etype_ok then begin - print_endline "### Type mismatch ###"; - print_endline "# expected:"; - print_endline (" " ^ expected.etype); - print_endline "# found:"; - print_endline (" " ^ found.etype); - end; - if expected.ereduced <> found.ereduced then begin - print_endline "### Reduced term mismatch ###"; - print_endline "# expected:"; - print_endline (" " ^ expected.ereduced); - print_endline "# found:"; - print_endline (" " ^ found.ereduced); - end; - end; - outcome - -let as_expected report_fname expected found = - (if Sys.file_exists report_fname then Sys.remove report_fname) ; - let och = lazy (open_out report_fname) in - let print_endline s = print_endline_to_channel (Lazy.force och) s in - let print_interpretation test = - print_endline "## Interpretation dump ##"; - print_endline "# Disambiguation environment:"; - print_endline test.eenv; - print_endline "# Metasenv:"; - print_endline test.emetasenv; - print_endline "# Term:"; - print_endline test.eterm; - print_endline "# Type:"; - print_endline test.etype; - print_endline "# Reduced term:"; - print_endline test.ereduced; - in - let rec aux = - function - [],[] -> true - | ex::extl, fo::fotl -> - let outcome1 = as_expected_one och ex fo in - let outcome2 = aux (extl,fotl) in - outcome1 && outcome2 - | [],found -> - print_endline "### Too many interpretations found:" ; - List.iter print_interpretation found; - false - | expected,[] -> - print_endline "### Too few interpretations found:" ; - List.iter print_interpretation expected; - false - in - let outcome = aux (expected,found) in - (if Lazy.lazy_is_val och then close_out (Lazy.force och)) ; - outcome - -let test_this mqi_handle uri_pred raw_term = - let empty_context = [] in - List.map - (function (env, metasenv, cic_term,ugraph ) -> - let etype = - try - let ty, _ = - (CicTypeChecker.type_of_aux' metasenv empty_context cic_term ugraph) - in - CicPp.ppterm ty - with _ -> "MALFORMED" - in - let ereduced = - try - CicPp.ppterm (CicReduction.whd empty_context cic_term) - with _ -> "MALFORMED" - in - { term = raw_term; (* useless *) - eenv = DisambiguatingParser.EnvironmentP3.to_string env ^ "\n"; - emetasenv = CicMetaSubst.ppmetasenv metasenv [] ^ "\n"; - eterm = CicPp.ppterm cic_term ^ "\n"; - etype = etype ^ "\n"; - ereduced = ereduced ^ "\n"; - } - ) (BatchParser.parse mqi_handle ~uri_pred raw_term CicUniv.empty_ugraph) - -let dump_environment filename = - try - let oc = open_out filename in - CicEnvironment.dump_to_channel oc; - close_out oc - with exc -> - prerr_endline - ("DUMP_ENVIRONMENT FAILURE, uncaught excecption " ^ - Printexc.to_string exc) ; - raise exc - -let restore_environment filename = - if Sys.file_exists filename then - begin - try - let ic = open_in filename in - CicEnvironment.restore_from_channel ic; - close_in ic - with exc -> - prerr_endline - ("RESTORE_ENVIRONMENT FAILURE, uncaught excecption " ^ - Printexc.to_string exc) ; - raise exc - end - else - CicEnvironment.empty () - -let main mqi_handle generate dump fnames tryvars prefix varsprefix = - let uri_pred = BatchParser.uri_pred_of_conf tryvars ~prefix ~varsprefix in - if generate then - begin - (* gen mode *) - print_endline "[ Gen mode ]"; - List.iter - (function fname -> - let test_fname = fname ^ ".test" in - let env_fname = fname ^ ".env" in - print_endline (sprintf "Generating regtest %s -> %s\n ..." - fname test_fname); - let raw_term = (List.hd (parse_regtest fname)).term in - let results = test_this mqi_handle uri_pred raw_term in - print_test results test_fname ; - if dump then dump_environment env_fname ; - ) fnames - end else - begin - (* regtest mode *) - print_endline "[ Regtest mode ]"; - let (ok, nok) = (ref 0, ref []) in - List.iter - (function fname -> - let env_fname = fname ^ ".env" in - let test_fname = fname ^ ".test" in - let report_fname = fname ^ ".report" in - restore_environment env_fname ; - let time = Unix.gettimeofday () in - print ("Processing " ^ fname ^":\t") ; - let is_ok = - try - let expected = parse_regtest test_fname in - let actual = test_this mqi_handle uri_pred (List.hd expected).term in - if dump then dump_environment env_fname ; - if as_expected report_fname expected actual then - (incr ok ; true) - else - (nok := fname :: !nok ; false) - with e -> (nok := fname :: !nok ; false) - in - let timediff = Unix.gettimeofday () -. time in - print (sprintf "done in %f seconds\t" timediff) ; - print_endline - (if is_ok then - "[ OK ]" - else - "[ FAILED ]") - ) fnames ; - print_endline "*** Summary ***"; - print_endline (sprintf "Succeeded: %d" !ok); - print_endline (sprintf "Failed: %d" (List.length !nok)); - List.iter (fun fname -> print_endline (sprintf " %s failed :-(" fname)) - (List.rev !nok) - end - -let _ = - - Helm_registry.load_from "gTopLevel.conf.xml"; - HelmLogger.register_log_callback - (fun ?(append_NL = true) msg -> - (if append_NL then prerr_endline else prerr_string) - (HelmLogger.string_of_html_msg msg)); - Helm_registry.load_from "gTopLevel.conf.xml"; - let dbd = - Mysql.quick_connect - ~host:(Helm_registry.get "db.host") - ~user:(Helm_registry.get "db.user") - ~database:(Helm_registry.get "db.database") - () - in - let fnames = ref [] in - let gen = ref false in - let tryvars = ref false in - let dump = ref false in - let nodump = ref false in - let prefix = ref "" in - let varsprefix = ref "###" in - let usage = "regtest [OPTION] ... test1 ..." in - let spec = - ["-gen", Arg.Set gen, - "generate the tests; implies -dump (unless -nodump is specified)" ; - "--gen", Arg.Set gen, - "generate the tests; implies -dump (unless -nodump is specified)" ; - "-dump", Arg.Set dump, "dump the final environment" ; - "--dump", Arg.Set dump, "dump the final environment" ; - "-nodump", Arg.Set nodump, "do not dump the final environment" ; - "--nodump", Arg.Set nodump, "do not dump the final environment" ; - "-vars", Arg.Set tryvars, "try also variables" ; - "-novars", Arg.Clear tryvars, "do not try variables (default)" ; - "-prefix", Arg.Set_string prefix, - "limit object choices to URIs beginning with prefix" ; - "--prefix", Arg.Set_string prefix, - "limit object choices to URIs beginning with prefix" ; - "-varsprefix", Arg.Set_string varsprefix, - "limit variable choices to URIs beginning with prefix; overrides -prefix" ; - "--varsprefix", Arg.Set_string varsprefix, - "limit variable choices to URIs beginning with prefix; overrides -prefix" - ] - in - Arg.parse spec (fun filename -> fnames := filename::!fnames ) usage ; - if !fnames = [] then - Arg.usage spec (Sys.argv.(0) ^ ": missing argument test. You must provide at least one test file.\n" ^ usage) ; - if !varsprefix = "###" then varsprefix := !prefix ; - main dbd !gen ((!gen || !dump) && (not !nodump)) !fnames !tryvars !prefix !varsprefix; - Mysql.disconnect dbd diff --git a/helm/gTopLevel/rootcontent.xsl b/helm/gTopLevel/rootcontent.xsl deleted file mode 100644 index 96c92aeea..000000000 --- a/helm/gTopLevel/rootcontent.xsl +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/helm/gTopLevel/script.sh.sample b/helm/gTopLevel/script.sh.sample deleted file mode 100755 index a95140604..000000000 --- a/helm/gTopLevel/script.sh.sample +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -#/projects/helm/galax/sources/natile-galax-0.1-alpha-installed/lib: -export OCAMLPATH=/home/sacerdot/miohelm/helm/ocaml/METAS diff --git a/helm/gTopLevel/termEditor.ml b/helm/gTopLevel/termEditor.ml deleted file mode 100644 index 1b9986caa..000000000 --- a/helm/gTopLevel/termEditor.ml +++ /dev/null @@ -1,121 +0,0 @@ -(* Copyright (C) 2000-2002, HELM Team. - * - * This file is part of HELM, an Hypertextual, Electronic - * Library of Mathematics, developed at the Computer Science - * Department, University of Bologna, Italy. - * - * HELM is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * HELM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with HELM; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. - * - * For details, see the HELM World-Wide-Web page, - * http://cs.unibo.it/helm/. - *) - -(*****************************************************************************) -(* *) -(* PROJECT HELM *) -(* *) -(* Claudio Sacerdoti Coen *) -(* 06/01/2002 *) -(* *) -(* *) -(*****************************************************************************) - -open Printf - -(* A WIDGET TO ENTER CIC TERMS *) - -class type term_editor = - object - method coerce : GObj.widget - (* get_as_string returns the unquoted string *) - method get_as_string : string - method get_metasenv_and_term : - context:Cic.context -> - metasenv:Cic.metasenv -> - Cic.metasenv * Cic.term * CicUniv.universe_graph - method reset : unit - (* The input of set_term is unquoted *) - method set_term : string -> unit - method environment : DisambiguatingParser.EnvironmentP3.t ref - end - -module Make(C:DisambiguateTypes.Callbacks) = - struct - - module Disambiguate' = DisambiguatingParser.Make(C);; - - class term_editor_impl ~(dbd:Mysql.dbd) ?packing ?width ?height - ?isnotempty_callback ?share_environment_with () : term_editor - = - let environment = - match share_environment_with with - None -> ref (*DisambiguateTypes.empty_environment*) - (DisambiguatingParser.EnvironmentP3.of_string - DisambiguatingParser.EnvironmentP3.empty) - | Some obj -> obj#environment - in - let input = GText.view ~editable:true ?width ?height ?packing () in - let _ = - match isnotempty_callback with - None -> () - | Some callback -> - ignore(input#buffer#connect#changed - (function () -> callback (input#buffer#char_count > 0))) - in - object(self) - - method coerce = input#coerce - - method reset = - input#buffer#delete input#buffer#start_iter input#buffer#end_iter - (* CSC: txt is now a string, but should be of type Cic.term *) - - method set_term txt = - self#reset ; - ignore (input#buffer#insert txt) - - (* CSC: this method should disappear *) - (* get_as_string returns the unquoted string *) - method get_as_string = input#buffer#get_text () - - method get_metasenv_and_term ~context ~metasenv = - let name_context = - List.map - (function - Some (n,_) -> Some n - | None -> None - ) context - in - let environment',metasenv,expr,ugraph = - match - Disambiguate'.disambiguate_term ~dbd ~context ~metasenv - (input#buffer#get_text ()) ~initial_ugraph:CicUniv.empty_ugraph - ~aliases:!environment - with - [environment',metasenv,expr,u] -> environment',metasenv,expr,u - | _ -> assert false - in - environment := environment'; - (metasenv, expr,ugraph) - (* TASSI: FIXME ?are we sure we have to keep this? *) - - method environment = environment - end - - let term_editor = new term_editor_impl - -end - diff --git a/helm/gTopLevel/termEditor.mli b/helm/gTopLevel/termEditor.mli deleted file mode 100644 index 2817f812a..000000000 --- a/helm/gTopLevel/termEditor.mli +++ /dev/null @@ -1,50 +0,0 @@ -(* Copyright (C) 2000-2002, HELM Team. - * - * This file is part of HELM, an Hypertextual, Electronic - * Library of Mathematics, developed at the Computer Science - * Department, University of Bologna, Italy. - * - * HELM is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * HELM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with HELM; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. - * - * For details, see the HELM World-Wide-Web page, - * http://cs.unibo.it/helm/. - *) - -class type term_editor = - object - method coerce : GObj.widget - (* get_as_string returns the unquoted string *) - method get_as_string : string - method get_metasenv_and_term : - context:Cic.context -> - metasenv:Cic.metasenv -> - Cic.metasenv * Cic.term * CicUniv.universe_graph - method reset : unit - method set_term : string -> unit - method environment : DisambiguatingParser.EnvironmentP3.t ref - end - -module Make (C : DisambiguateTypes.Callbacks) : - sig - val term_editor : - dbd:Mysql.dbd -> - ?packing:(GObj.widget -> unit) -> - ?width:int -> - ?height:int -> - ?isnotempty_callback:(bool -> unit) -> - ?share_environment_with:term_editor -> - unit -> term_editor - end diff --git a/helm/gTopLevel/termViewer.ml b/helm/gTopLevel/termViewer.ml deleted file mode 100644 index 0f2019ad5..000000000 --- a/helm/gTopLevel/termViewer.ml +++ /dev/null @@ -1,304 +0,0 @@ -(* Copyright (C) 2000-2002, HELM Team. - * - * This file is part of HELM, an Hypertextual, Electronic - * Library of Mathematics, developed at the Computer Science - * Department, University of Bologna, Italy. - * - * HELM is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * HELM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with HELM; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. - * - * For details, see the HELM World-Wide-Web page, - * http://cs.unibo.it/helm/. - *) - -(***************************************************************************) -(* *) -(* PROJECT HELM *) -(* *) -(* 29/01/2003 Claudio Sacerdoti Coen *) -(* *) -(* *) -(***************************************************************************) - -let debug = false -let debug_print s = if debug then prerr_endline s - -type mml_of_cic_sequent = - Cic.metasenv -> - int * Cic.context * Cic.term -> - Gdome.document * - (Cic.annconjecture * - ((Cic.id, Cic.term) Hashtbl.t * - (Cic.id, Cic.id option) Hashtbl.t * - (string, Cic.hypothesis) Hashtbl.t * - (Cic.id, string) Hashtbl.t)) - - -type mml_of_cic_object = - Cic.obj -> - Gdome.document * - (Cic.annobj * - ((Cic.id, Cic.term) Hashtbl.t * - (Cic.id, Cic.id option) Hashtbl.t * - (Cic.id, Cic.conjecture) Hashtbl.t * - (Cic.id, Cic.hypothesis) Hashtbl.t * - (Cic.id, string) Hashtbl.t * - (Cic.id, Cic2acic.anntypes) Hashtbl.t)) - -(* List utility functions *) -exception Skip;; - -let list_map_fail f = - let rec aux = - function - [] -> [] - | he::tl -> - try - let he' = f he in - he'::(aux tl) - with Skip -> - (aux tl) - in - aux -;; -(* End of the list utility functions *) - -(** A widget to render sequents **) - -class sequent_viewer ~(mml_of_cic_sequent:mml_of_cic_sequent) obj = - object(self) - - inherit GMathViewAux.multi_selection_math_view obj - - val mutable current_infos = None - - (* returns the list of selected terms *) - (* selections which are not terms are ignored *) - method get_selected_terms = - debug_print (string_of_int (List.length self#get_selections)) ; - let selections = self#get_selections in - list_map_fail - (function node -> - let xpath = - ((node : Gdome.element)#getAttributeNS - ~namespaceURI:Misc.helm_ns - ~localName:(Gdome.domString "xref"))#to_string - in - if xpath = "" then assert false (* "ERROR: No xref found!!!" *) - else - match current_infos with - Some (ids_to_terms,_,_) -> - let id = xpath in - (try - Hashtbl.find ids_to_terms id - with _ -> raise Skip) - | None -> assert false (* "ERROR: No current term!!!" *) - ) selections - - (* returns the list of selected hypotheses *) - (* selections which are not hypotheses are ignored *) - method get_selected_hypotheses = - let selections = self#get_selections in - list_map_fail - (function node -> - let xpath = - ((node : Gdome.element)#getAttributeNS - ~namespaceURI:Misc.helm_ns - ~localName:(Gdome.domString "xref"))#to_string - in - if xpath = "" then assert false (* "ERROR: No xref found!!!" *) - else - match current_infos with - Some (_,_,ids_to_hypotheses) -> - let id = xpath in - (try - Hashtbl.find ids_to_hypotheses id - with _ -> raise Skip) - | None -> assert false (* "ERROR: No current term!!!" *) - ) selections - - method load_sequent metasenv sequent = -(**** SIAM QUI ****) - let sequent_mml,(_,(ids_to_terms,ids_to_father_ids,ids_to_hypotheses,ids_to_inner_sorts)) = - mml_of_cic_sequent metasenv sequent - in - self#load_root ~root:sequent_mml#get_documentElement ; -ignore (Misc.domImpl#saveDocumentToFile ~name:"/tmp/pippo" ~doc:sequent_mml ()); - current_infos <- - Some (ids_to_terms,ids_to_father_ids,ids_to_hypotheses) - end -;; - -let sequent_viewer ~(mml_of_cic_sequent: mml_of_cic_sequent) - ?hadjustment ?vadjustment ?font_size ?log_verbosity -= - GtkBase.Widget.size_params ~cont:( - OgtkMathViewProps.pack_return - (fun p -> - OgtkMathViewProps.set_params - (new sequent_viewer ~mml_of_cic_sequent - (GtkMathViewProps.MathView_GMetaDOM.create p)) - ~font_size ~log_verbosity)) [] -;; - -(* -let sequent_viewer ?adjustmenth ?adjustmentv ?font_size ?font_manager - ?border_width ?width ?height ?packing ?show () = - let w = - GtkMathView.MathView.create - ?adjustmenth:(Gaux.may_map ~f:GData.as_adjustment adjustmenth) - ?adjustmentv:(Gaux.may_map ~f:GData.as_adjustment adjustmentv) - () - in - GtkBase.Container.set w ?border_width ?width ?height; - let mathview = GObj.pack_return (new sequent_viewer w) ~packing ~show in - begin - match font_size with - | Some size -> mathview#set_font_size size - | None -> () - end; - begin - match font_manager with - | Some manager -> mathview#set_font_manager_type ~fm_type:manager - | None -> () - end; - mathview -;; -*) - -(** A widget to render proofs **) - -class proof_viewer ~(mml_of_cic_object:mml_of_cic_object) obj = - object(self) - - inherit GMathViewAux.single_selection_math_view obj - -(* initializer self#set_font_size 10 *) - - val mutable current_infos = None - val mutable current_mml = None - - method make_sequent_of_selected_term = - match self#get_selection with - Some node -> - let xpath = - ((node : Gdome.element)#getAttributeNS - ~namespaceURI:Misc.helm_ns - ~localName:(Gdome.domString "xref"))#to_string - in - if xpath = "" then assert false (* "ERROR: No xref found!!!" *) - else - begin - match current_infos with - Some (ids_to_terms, ids_to_father_ids, _, _) -> - let id = xpath in - LogicalOperations.to_sequent id ids_to_terms ids_to_father_ids - | None -> assert false (* "ERROR: No current term!!!" *) - end - | None -> assert false (* "ERROR: No selection!!!" *) - - method focus_sequent_of_selected_term = - match self#get_selection with - Some node -> - let xpath = - ((node : Gdome.element)#getAttributeNS - ~namespaceURI:Misc.helm_ns - ~localName:(Gdome.domString "xref"))#to_string - in - if xpath = "" then assert false (* "ERROR: No xref found!!!" *) - else - begin - match current_infos with - Some (ids_to_terms, ids_to_father_ids, _, _) -> - let id = xpath in - LogicalOperations.focus id ids_to_terms ids_to_father_ids - | None -> assert false (* "ERROR: No current term!!!" *) - end - | None -> assert false (* "ERROR: No selection!!!" *) - - method load_proof currentproof = - let mml, - (acic, - (ids_to_terms,ids_to_father_ids,ids_to_conjectures, - ids_to_hypotheses,ids_to_inner_sorts,ids_to_inner_types)) = - mml_of_cic_object currentproof - in - current_infos <- - Some - (ids_to_terms,ids_to_father_ids,ids_to_conjectures,ids_to_hypotheses); - (* self#load_doc ~dom:mml ; - current_mml <- Some mml ; *) - ignore(Misc.domImpl#saveDocumentToFile ~name:"/tmp/prova" ~doc:mml ()); - (match current_mml with - None -> - let time1 = Sys.time () in - self#load_root ~root:mml#get_documentElement ; - let time2 = Sys.time () in - debug_print ("Loading and displaying the proof took " ^ - string_of_float (time2 -. time1) ^ "seconds") ; - current_mml <- Some mml - | Some current_mml' -> - self#freeze ; - let time1 = Sys.time () in - XmlDiff.update_dom ~from:current_mml' mml ; - let time2 = Sys.time () in - debug_print ("XMLDIFF took " ^ - string_of_float (time2 -. time1) ^ "seconds") ; - self#thaw ; - let time3 = Sys.time () in - debug_print ("The refresh of the widget took " ^ - string_of_float (time3 -. time2) ^ "seconds")); - (acic, ids_to_inner_types, ids_to_inner_sorts) - end -;; - - -let proof_viewer ~(mml_of_cic_object: mml_of_cic_object) - ?hadjustment ?vadjustment ?font_size ?log_verbosity -= - GtkBase.Widget.size_params ~cont:( - OgtkMathViewProps.pack_return - (fun p -> - OgtkMathViewProps.set_params - (new proof_viewer ~mml_of_cic_object - (GtkMathViewProps.MathView_GMetaDOM.create p)) - ~font_size ~log_verbosity)) [] -;; - -(* -let proof_viewer ?adjustmenth ?adjustmentv ?font_size ?font_manager - ?border_width ?width ?height ?packing ?show () = - let w = - GtkMathView.MathView.create - ?adjustmenth:(Gaux.may_map ~f:GData.as_adjustment adjustmenth) - ?adjustmentv:(Gaux.may_map ~f:GData.as_adjustment adjustmentv) - () - in - GtkBase.Container.set w ?border_width ?width ?height; - let mathview = GObj.pack_return (new proof_viewer w) ~packing ~show in - begin - match font_size with - | Some size -> mathview#set_font_size size - | None -> () - end; - begin - match font_manager with - | Some manager -> mathview#set_font_manager_type ~fm_type:manager - | None -> () - end; - mathview -;; -*) - diff --git a/helm/gTopLevel/termViewer.mli b/helm/gTopLevel/termViewer.mli deleted file mode 100644 index f391363eb..000000000 --- a/helm/gTopLevel/termViewer.mli +++ /dev/null @@ -1,125 +0,0 @@ -(* Copyright (C) 2000-2002, HELM Team. - * - * This file is part of HELM, an Hypertextual, Electronic - * Library of Mathematics, developed at the Computer Science - * Department, University of Bologna, Italy. - * - * HELM is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * HELM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with HELM; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. - * - * For details, see the HELM World-Wide-Web page, - * http://cs.unibo.it/helm/. - *) - -(******************************************************************************) -(* *) -(* PROJECT HELM *) -(* *) -(* Claudio Sacerdoti Coen *) -(* 29/01/2003 *) -(* *) -(* *) -(******************************************************************************) - -type mml_of_cic_sequent = - Cic.metasenv -> - int * Cic.context * Cic.term -> - Gdome.document * - (Cic.annconjecture * - ((Cic.id, Cic.term) Hashtbl.t * - (Cic.id, Cic.id option) Hashtbl.t * - (string, Cic.hypothesis) Hashtbl.t * - (Cic.id, string) Hashtbl.t)) - - -type mml_of_cic_object = - Cic.obj -> - Gdome.document * - (Cic.annobj * - ((Cic.id, Cic.term) Hashtbl.t * - (Cic.id, Cic.id option) Hashtbl.t * - (Cic.id, Cic.conjecture) Hashtbl.t * - (Cic.id, Cic.hypothesis) Hashtbl.t * - (Cic.id, string) Hashtbl.t * - (Cic.id, Cic2acic.anntypes) Hashtbl.t)) - -(** A widget to render sequents **) - -class sequent_viewer : - mml_of_cic_sequent:mml_of_cic_sequent -> - Gtk_mathview.math_view Gtk.obj -> - object - inherit GMathViewAux.multi_selection_math_view - - (* returns the list of selected terms *) - (* selections which are not terms are ignored *) - method get_selected_terms : Cic.term list - - (* returns the list of selected hypotheses *) - (* selections which are not hypotheses are ignored *) - method get_selected_hypotheses : Cic.hypothesis list - - method load_sequent : Cic.metasenv -> Cic.conjecture -> unit - end - -val sequent_viewer : - mml_of_cic_sequent:mml_of_cic_sequent -> - ?hadjustment:GData.adjustment -> - ?vadjustment:GData.adjustment -> - ?font_size:int -> - ?log_verbosity:int -> - ?width:int -> - ?height:int -> - ?packing:(GObj.widget -> unit) -> - ?show:bool -> - unit -> sequent_viewer - -(** A widget to render proofs **) - -class proof_viewer : - mml_of_cic_object:mml_of_cic_object -> - Gtk_mathview.math_view Gtk.obj -> - object - inherit GMathViewAux.single_selection_math_view - - (* the new current sequent becomes the one obtained *) - (* perforating the proof where the selection is *) - method make_sequent_of_selected_term : unit - - (* the new current sequent becomes the one obtained *) - (* focusing the proof on the selected metavariable *) - method focus_sequent_of_selected_term : unit - - (* load_proof also returns the annotated cic term and the *) - (* ids_to_inner_types and ids_to_inner_sorts maps. *) - method load_proof : - Cic.obj -> - Cic.annobj * (Cic.id, Cic2acic.anntypes) Hashtbl.t * - (Cic.id, string) Hashtbl.t - - end - -val proof_viewer : - mml_of_cic_object:mml_of_cic_object -> - ?hadjustment:GData.adjustment -> - ?vadjustment:GData.adjustment -> - ?font_size:int -> - ?log_verbosity:int -> - ?width:int -> - ?height:int -> - ?packing:(GObj.widget -> unit) -> - ?show:bool -> - unit -> proof_viewer - diff --git a/helm/gTopLevel/testlibrary.ml b/helm/gTopLevel/testlibrary.ml deleted file mode 100644 index 34f71d412..000000000 --- a/helm/gTopLevel/testlibrary.ml +++ /dev/null @@ -1,226 +0,0 @@ - -open Printf - -let time_out = ref 5;; - -Helm_registry.load_from "gTopLevel.conf.xml";; - -let mqi_debug_fun s = - HelmLogger.log ~append_NL:true (`Msg (`T s)) -let mqi_flags = [] - -let dbd = Mysql.quick_connect - ~host:(Helm_registry.get "db.host") - ~user:(Helm_registry.get "db.user") - ~database:(Helm_registry.get "db.database") - () -(* -let mqi_handle = MQIConn.init ~flags:mqi_flags ~log:mqi_debug_fun () -*) - -let verbose = false - -exception Failure of string -let fail msg = raise (Failure msg) - -let uri_predicate = ref (BatchParser.constants_only ~prefix:"") - -module DisambiguateCallbacks = - struct - let interactive_user_uri_choice - ~selection_mode ?ok ?enable_button_for_non_vars ~title ~msg ~id choices = - List.filter !uri_predicate choices - - let interactive_interpretation_choice = - let rec aux n = - function - [] -> [] - | _::tl -> n::(aux (n+1) tl) - in - aux 0 - - let input_or_locate_uri ~title = fail ("Unknown identifier: " ^ title) - end - -module Disambiguate' = Disambiguate.Make (DisambiguateCallbacks) - -let debug_print s = prerr_endline ("^^^^^^ " ^ s) - -let test_uri typecheck uri = - if typecheck then - try ignore(CicTypeChecker.typecheck uri CicUniv.empty_ugraph);1 - with CicTypeChecker.TypeCheckerFailure s | - CicTypeChecker.AssertFailure s -> 0 - else - let obj,_ = CicEnvironment.get_obj CicUniv.empty_ugraph uri in - let (annobj, _, _, ids_to_inner_sorts, _, _, _) = - Cic2acic.acic_object_of_cic_object ~eta_fix:false obj - in - let ids_to_uris = Hashtbl.create 1023 in - let round_trip annterm = - debug_print "(1) acic -> ast"; - let (ast, _) = - Acic2Ast.ast_of_acic ids_to_inner_sorts (*ids_to_uris*) annterm - in - let new_pp = BoxPp.pp_term ast in - debug_print ("ast:\n" ^ new_pp); - let new_ast = CicTextualParser2.parse_term (Stream.of_string new_pp) in - debug_print ("new_ast:\n" ^ CicAstPp.pp_term ast); - let res = - Disambiguate'.disambiguate_term ~dbd [] [] new_ast - ~aliases:DisambiguateTypes.Environment.empty - ~initial_ugraph:CicUniv.empty_ugraph - in - List.iter - (fun (domain, _, term, _) -> - debug_print - ("domain: " ^ CicTextualParser2.EnvironmentP3.to_string domain) ; - debug_print ("term: " ^ CicPp.ppterm term) - ) res ; - List.length res - in - match annobj with - | Cic.AConstant (_, _, _, None, ty, _) -> - debug_print "Cic.AConstant (ty)"; - round_trip ty - | Cic.AConstant (_, _, _, Some bo, ty, _) -> -(* - debug_print "Cic.AConstant (bo)"; - let n = round_trip bo in -*) - debug_print "Cic.AConstant (ty)"; - round_trip ty (* + n *) - | Cic.AVariable (_, _, None, ty, _) -> - debug_print "Cic.AVariable (ty)"; - round_trip ty - | Cic.AVariable (_, _, Some bo, ty, _) -> -(* - debug_print "Cic.AVariable (bo)"; - let n = round_trip bo in -*) - debug_print "Cic.AVariable (ty)"; - round_trip ty (* + n *) - | Cic.ACurrentProof (_, _, _, _, _, _, _) -> - assert false - | Cic.AInductiveDefinition _ -> - debug_print "AInductiveDefinition: boh ..." ; - assert false - -exception TimeOut;; - -ignore - (Sys.signal Sys.sigalrm - (Sys.Signal_handle - (fun _ -> - (* We do this in case that some "with _" intercepts the first exception *) - ignore (Unix.alarm 1) ; - raise TimeOut))) -;; - - -let test_uri typecheck uri = - try - ignore (Unix.alarm !time_out) ; - if test_uri typecheck uri = 1 then `Ok else `Maybe - with - | TimeOut -> - (* We do this to clear the alarm set by the signal handler *) - ignore (Unix.alarm 0) ; - `TimeOut - (* - | exn -> - prerr_endline (sprintf "Top Level Uncaught Exception: %s" - (Printexc.to_string exn)); - `Nok*) - | exn -> raise exn - -let report (ok,nok,maybe,timeout) = - print_newline (); - print_endline "TestLibrary report"; - print_endline "Succeeded URIs:"; - List.iter (fun s -> print_endline ("\t" ^ s)) (List.rev !ok); - print_endline "Failed URIs:"; - List.iter (fun s -> print_endline ("\t" ^ s)) (List.rev !nok); - print_endline "Multiple answers URIs:"; - List.iter (fun s -> print_endline ("\t" ^ s)) (List.rev !maybe); - print_newline (); - print_endline ("URIs that timeout (" ^ string_of_int !time_out ^ "s):"); - List.iter (fun s -> print_endline ("\t" ^ s)) (List.rev !timeout); - print_newline () - -let do_uri typecheck (ok, nok, maybe, timeout) uri = - let uri_str = UriManager.string_of_uri uri in - printf "Testing URI: %-55s %!" (uri_str ^ " ..."); - (match test_uri typecheck uri with - | `Ok -> - print_endline "[ OK ]"; - ok := uri_str :: !ok - | `Nok -> - print_endline "[ FAILED ]"; - nok := uri_str :: !nok - | `Maybe -> - print_endline "[ MANY ]"; - maybe := uri_str :: !maybe - | `TimeOut -> - print_endline "[TIMEOUT!]"; - timeout := uri_str :: !timeout) - -let do_file typecheck status fname = - try - let ic = open_in fname in - (try - while true do - let line = input_line ic in - try - let uri = UriManager.uri_of_string line in - do_uri typecheck status uri - with UriManager.IllFormedUri _ -> - printf "Error parsing URI '%s', ignoring it" line - done - with End_of_file -> - close_in ic) - with exn -> - printf "Error trying to access '%s' (%s), skipping the file\n%!" - fname (Printexc.to_string exn) - -let _ = - HelmLogger.register_log_callback - (fun ?(append_NL = true) msg -> - (if append_NL then prerr_endline else prerr_string) - (HelmLogger.string_of_html_msg msg)); - let names = ref [] in - let tryvars = ref false in - let typecheck = ref false in - let prefix = ref "" in - let varsprefix = ref "####" in - let usage = "testlibrary [OPTION] ... (uri1 | file1) (uri2 | file2) ..." in - let spec = - [ "-vars", Arg.Set tryvars, "try also variables" ; - "-novars", Arg.Clear tryvars, "do not try variables (default)" ; - "-prefix", Arg.Set_string prefix, - "limit object choices to URIs beginning with prefix" ; - "-varsprefix", Arg.Set_string varsprefix, - "limit variable choices to URIs beginning with prefix; overrides -prefix" ; - "-timeout", Arg.Set_int time_out, - "number of seconds before a timeout; 0 means no timeout"; - "-typecheck", Arg.Set typecheck, "simply typechek the uri" - ] - in - Arg.parse spec (fun name -> names := name :: !names) usage; - let names = List.rev !names in - if !varsprefix = "####" then varsprefix := !prefix ; - uri_predicate := - BatchParser.uri_pred_of_conf !tryvars ~prefix:!prefix ~varsprefix:!varsprefix; - let status = (ref [], ref [], ref [], ref []) in (* URIs *) - List.iter - (fun name -> - try - let uri = UriManager.uri_of_string name in - do_uri !typecheck status uri - with UriManager.IllFormedUri _ -> - if Sys.file_exists name then - do_file !typecheck status name - else - printf "Don't know what to do with '%s', ignoring it\n%!" name) - names ; - report status diff --git a/helm/gTopLevel/tests/.cvsignore b/helm/gTopLevel/tests/.cvsignore deleted file mode 100644 index 8fa95a300..000000000 --- a/helm/gTopLevel/tests/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -*.env *.report diff --git a/helm/gTopLevel/tests/apply00.cic b/helm/gTopLevel/tests/apply00.cic deleted file mode 100644 index f320002f7..000000000 --- a/helm/gTopLevel/tests/apply00.cic +++ /dev/null @@ -1 +0,0 @@ -\forall x,y,f. x=y \to (f x) = (f y) diff --git a/helm/gTopLevel/tests/fix00.cic b/helm/gTopLevel/tests/fix00.cic deleted file mode 100644 index f7b196c87..000000000 --- a/helm/gTopLevel/tests/fix00.cic +++ /dev/null @@ -1,8 +0,0 @@ -let rec fact = - \lambda x:nat. - [\lambda x:nat. nat] - match x:nat with - [ O \Rightarrow 1 - | (S (x: nat)) \Rightarrow (mult (S x) (fact x)) ] -in -(fact 4) diff --git a/helm/gTopLevel/tests/fix00.cic.test b/helm/gTopLevel/tests/fix00.cic.test deleted file mode 100644 index c3a4cfcd2..000000000 --- a/helm/gTopLevel/tests/fix00.cic.test +++ /dev/null @@ -1,222 +0,0 @@ -let rec fact = - \lambda x:nat. - [\lambda x:nat. nat] - match x:nat with - [ O \Rightarrow 1 - | (S (x: nat)) \Rightarrow (mult (S x) (fact x)) ] -in -(fact 4) -###### INTERPRETATION NUMBER 1 ###### -### (* disambiguation environment *) -alias id S = cic:/Coq/Init/Datatypes/nat.ind#xpointer(1/1/2) -alias id mult = cic:/Coq/Init/Peano/mult.con -alias id nat = cic:/Coq/Init/Datatypes/nat.ind#xpointer(1/1) -alias num (instance 0) = "natural number" -### (* METASENV after disambiguation *) - -### (* TERM after disambiguation *) -[fact:= -Fix fact { -fact / 0 : (nat->nat) := -[x:nat] -<[x:nat]nat>Cases x of - O => (S O) - S => [x:nat](mult (S x) (fact x)) -end} -](fact (S (S (S (S O))))) -### (* TYPE_OF the disambiguated term *) -nat -### (* REDUCED disambiguated term *) -(S ( -Fix plus { -plus / 0 : (nat->(nat->nat)) := -[n:nat][m:nat] -<[n0:nat]nat>Cases n of - O => m - S => [p:nat](S (plus p m)) -end} - (S ( -Fix plus { -plus / 0 : (nat->(nat->nat)) := -[n:nat][m:nat] -<[n0:nat]nat>Cases n of - O => m - S => [p:nat](S (plus p m)) -end} - O (S ( -Fix plus { -plus / 0 : (nat->(nat->nat)) := -[n:nat][m:nat] -<[n0:nat]nat>Cases n of - O => m - S => [p:nat](S (plus p m)) -end} - (S ( -Fix plus { -plus / 0 : (nat->(nat->nat)) := -[n:nat][m:nat] -<[n0:nat]nat>Cases n of - O => m - S => [p:nat](S (plus p m)) -end} - O O)) (S ( -Fix plus { -plus / 0 : (nat->(nat->nat)) := -[n:nat][m:nat] -<[n0:nat]nat>Cases n of - O => m - S => [p:nat](S (plus p m)) -end} - (S ( -Fix plus { -plus / 0 : (nat->(nat->nat)) := -[n:nat][m:nat] -<[n0:nat]nat>Cases n of - O => m - S => [p:nat](S (plus p m)) -end} - O O)) O)))))) (S ( -Fix plus { -plus / 0 : (nat->(nat->nat)) := -[n:nat][m:nat] -<[n0:nat]nat>Cases n of - O => m - S => [p:nat](S (plus p m)) -end} - (S ( -Fix plus { -plus / 0 : (nat->(nat->nat)) := -[n:nat][m:nat] -<[n0:nat]nat>Cases n of - O => m - S => [p:nat](S (plus p m)) -end} - O (S ( -Fix plus { -plus / 0 : (nat->(nat->nat)) := -[n:nat][m:nat] -<[n0:nat]nat>Cases n of - O => m - S => [p:nat](S (plus p m)) -end} - (S ( -Fix plus { -plus / 0 : (nat->(nat->nat)) := -[n:nat][m:nat] -<[n0:nat]nat>Cases n of - O => m - S => [p:nat](S (plus p m)) -end} - O O)) (S ( -Fix plus { -plus / 0 : (nat->(nat->nat)) := -[n:nat][m:nat] -<[n0:nat]nat>Cases n of - O => m - S => [p:nat](S (plus p m)) -end} - (S ( -Fix plus { -plus / 0 : (nat->(nat->nat)) := -[n:nat][m:nat] -<[n0:nat]nat>Cases n of - O => m - S => [p:nat](S (plus p m)) -end} - O O)) O)))))) (S ( -Fix plus { -plus / 0 : (nat->(nat->nat)) := -[n:nat][m:nat] -<[n0:nat]nat>Cases n of - O => m - S => [p:nat](S (plus p m)) -end} - (S ( -Fix plus { -plus / 0 : (nat->(nat->nat)) := -[n:nat][m:nat] -<[n0:nat]nat>Cases n of - O => m - S => [p:nat](S (plus p m)) -end} - O (S ( -Fix plus { -plus / 0 : (nat->(nat->nat)) := -[n:nat][m:nat] -<[n0:nat]nat>Cases n of - O => m - S => [p:nat](S (plus p m)) -end} - (S ( -Fix plus { -plus / 0 : (nat->(nat->nat)) := -[n:nat][m:nat] -<[n0:nat]nat>Cases n of - O => m - S => [p:nat](S (plus p m)) -end} - O O)) (S ( -Fix plus { -plus / 0 : (nat->(nat->nat)) := -[n:nat][m:nat] -<[n0:nat]nat>Cases n of - O => m - S => [p:nat](S (plus p m)) -end} - (S ( -Fix plus { -plus / 0 : (nat->(nat->nat)) := -[n:nat][m:nat] -<[n0:nat]nat>Cases n of - O => m - S => [p:nat](S (plus p m)) -end} - O O)) O)))))) (S ( -Fix plus { -plus / 0 : (nat->(nat->nat)) := -[n:nat][m:nat] -<[n0:nat]nat>Cases n of - O => m - S => [p:nat](S (plus p m)) -end} - (S ( -Fix plus { -plus / 0 : (nat->(nat->nat)) := -[n:nat][m:nat] -<[n0:nat]nat>Cases n of - O => m - S => [p:nat](S (plus p m)) -end} - O (S ( -Fix plus { -plus / 0 : (nat->(nat->nat)) := -[n:nat][m:nat] -<[n0:nat]nat>Cases n of - O => m - S => [p:nat](S (plus p m)) -end} - (S ( -Fix plus { -plus / 0 : (nat->(nat->nat)) := -[n:nat][m:nat] -<[n0:nat]nat>Cases n of - O => m - S => [p:nat](S (plus p m)) -end} - O O)) (S ( -Fix plus { -plus / 0 : (nat->(nat->nat)) := -[n:nat][m:nat] -<[n0:nat]nat>Cases n of - O => m - S => [p:nat](S (plus p m)) -end} - (S ( -Fix plus { -plus / 0 : (nat->(nat->nat)) := -[n:nat][m:nat] -<[n0:nat]nat>Cases n of - O => m - S => [p:nat](S (plus p m)) -end} - O O)) O)))))) O)))))))) diff --git a/helm/gTopLevel/tests/forall00.cic b/helm/gTopLevel/tests/forall00.cic deleted file mode 100644 index e53571c50..000000000 --- a/helm/gTopLevel/tests/forall00.cic +++ /dev/null @@ -1 +0,0 @@ -\forall n:nat. \forall m. n + m = n diff --git a/helm/gTopLevel/tests/forall00.cic.test b/helm/gTopLevel/tests/forall00.cic.test deleted file mode 100644 index fccef764e..000000000 --- a/helm/gTopLevel/tests/forall00.cic.test +++ /dev/null @@ -1,14 +0,0 @@ -\forall n:nat. \forall m. n + m = n -###### INTERPRETATION NUMBER 1 ###### -### (* disambiguation environment *) -alias id nat = cic:/Coq/Init/Datatypes/nat.ind#xpointer(1/1) -alias symbol "eq" (instance 0) = "leibnitz's equality" -alias symbol "plus" (instance 0) = "natural plus" -### (* METASENV after disambiguation *) - -### (* TERM after disambiguation *) -(n:nat)(m:nat)(eq nat (plus n m) n) -### (* TYPE_OF the disambiguated term *) -Prop -### (* REDUCED disambiguated term *) -(n:nat)(m:nat)(eq nat (plus n m) n) diff --git a/helm/gTopLevel/tests/lambda01.cic b/helm/gTopLevel/tests/lambda01.cic deleted file mode 100644 index 29f7a95dd..000000000 --- a/helm/gTopLevel/tests/lambda01.cic +++ /dev/null @@ -1,2 +0,0 @@ -(\lambda f. (f 0 (le_n 0)) - \lambda n. \lambda H. (refl_equal nat 0)) diff --git a/helm/gTopLevel/tests/lambda01.cic.test b/helm/gTopLevel/tests/lambda01.cic.test deleted file mode 100644 index 6140de0b1..000000000 --- a/helm/gTopLevel/tests/lambda01.cic.test +++ /dev/null @@ -1,16 +0,0 @@ -(\lambda f. (f 0 (le_n 0)) - \lambda n. \lambda H. (refl_equal nat 0)) -###### INTERPRETATION NUMBER 1 ###### -### (* disambiguation environment *) -alias id le_n = cic:/Coq/Init/Peano/le.ind#xpointer(1/1/1) -alias id nat = cic:/Coq/Init/Datatypes/nat.ind#xpointer(1/1) -alias id refl_equal = cic:/Coq/Init/Logic/eq.ind#xpointer(1/1/1) -alias num (instance 0) = "natural number" -### (* METASENV after disambiguation *) - -### (* TERM after disambiguation *) -([f:(nat->((le O O)->(eq nat O O)))](f O (le_n O)) [n:nat][H:(le O O)](refl_equal nat O)) -### (* TYPE_OF the disambiguated term *) -(eq nat O O) -### (* REDUCED disambiguated term *) -(refl_equal nat O) diff --git a/helm/gTopLevel/tests/lambda02.cic b/helm/gTopLevel/tests/lambda02.cic deleted file mode 100644 index dc6d57916..000000000 --- a/helm/gTopLevel/tests/lambda02.cic +++ /dev/null @@ -1 +0,0 @@ -\lambda f:(\forall n:nat. (\forall H:(le 0 n). (n=n))). (f 0 (le_n 0)) diff --git a/helm/gTopLevel/tests/lambda02.cic.test b/helm/gTopLevel/tests/lambda02.cic.test deleted file mode 100644 index 2d813315c..000000000 --- a/helm/gTopLevel/tests/lambda02.cic.test +++ /dev/null @@ -1,16 +0,0 @@ -\lambda f:(\forall n:nat. (\forall H:(le 0 n). (n=n))). (f 0 (le_n 0)) -###### INTERPRETATION NUMBER 1 ###### -### (* disambiguation environment *) -alias id le = cic:/Coq/Init/Peano/le.ind#xpointer(1/1) -alias id le_n = cic:/Coq/Init/Peano/le.ind#xpointer(1/1/1) -alias id nat = cic:/Coq/Init/Datatypes/nat.ind#xpointer(1/1) -alias num (instance 0) = "natural number" -alias symbol "eq" (instance 0) = "leibnitz's equality" -### (* METASENV after disambiguation *) - -### (* TERM after disambiguation *) -[f:(n:nat)((le O n)->(eq nat n n))](f O (le_n O)) -### (* TYPE_OF the disambiguated term *) -(f:(n:nat)((le O n)->(eq nat n n)))(eq nat O O) -### (* REDUCED disambiguated term *) -[f:(n:nat)((le O n)->(eq nat n n))](f O (le_n O)) diff --git a/helm/gTopLevel/tests/lambda03.cic b/helm/gTopLevel/tests/lambda03.cic deleted file mode 100644 index 0279eeecc..000000000 --- a/helm/gTopLevel/tests/lambda03.cic +++ /dev/null @@ -1,3 +0,0 @@ -\lambda n:nat. - \lambda H:n=n. - \lambda g:(?\to (le n 0))\to True.(g (\lambda f.(f n H))) diff --git a/helm/gTopLevel/tests/lambda03.cic.test b/helm/gTopLevel/tests/lambda03.cic.test deleted file mode 100644 index 6ae0213b1..000000000 --- a/helm/gTopLevel/tests/lambda03.cic.test +++ /dev/null @@ -1,17 +0,0 @@ -\lambda n:nat. - \lambda H:n=n.\lambda g:(?\to (le n 0))\to True.(g \lambda f.(f n H)) -###### INTERPRETATION NUMBER 1 ###### -### (* disambiguation environment *) -alias id True = cic:/Coq/Init/Logic/True.ind#xpointer(1/1) -alias id le = cic:/Coq/Init/Peano/le.ind#xpointer(1/1) -alias id nat = cic:/Coq/Init/Datatypes/nat.ind#xpointer(1/1) -alias num (instance 0) = "natural number" -alias symbol "eq" (instance 0) = "leibnitz's equality" -### (* METASENV after disambiguation *) - -### (* TERM after disambiguation *) -[n:nat][H:(eq nat n n)][g:(((x:nat)((eq nat x x)->(le x O))->(le n O))->True)](g [f:(x:nat)((eq nat x x)->(le x O))](f n H)) -### (* TYPE_OF the disambiguated term *) -(n:nat)(H:(eq nat n n))(g:(((x:nat)((eq nat x x)->(le x O))->(le n O))->True))True -### (* REDUCED disambiguated term *) -[n:nat][H:(eq nat n n)][g:(((x:nat)((eq nat x x)->(le x O))->(le n O))->True)](g [f:(x:nat)((eq nat x x)->(le x O))](f n H)) diff --git a/helm/gTopLevel/tests/match00.cic b/helm/gTopLevel/tests/match00.cic deleted file mode 100644 index bcfd70ea7..000000000 --- a/helm/gTopLevel/tests/match00.cic +++ /dev/null @@ -1,6 +0,0 @@ -[\lambda x:nat. - [\lambda y:nat. Set] - match x:nat with [ O \Rightarrow nat | (S x) \Rightarrow bool ]] -match (S O):nat with -[ O \Rightarrow O -| (S x) \Rightarrow false ] diff --git a/helm/gTopLevel/tests/match00.cic.test b/helm/gTopLevel/tests/match00.cic.test deleted file mode 100644 index 28a4a412f..000000000 --- a/helm/gTopLevel/tests/match00.cic.test +++ /dev/null @@ -1,33 +0,0 @@ -[\lambda x:nat. - [\lambda y:nat. Set] - match x:nat with [ O \Rightarrow nat | (S x) \Rightarrow bool ]] -match (S O):nat with -[ O \Rightarrow O -| (S x) \Rightarrow false ] -###### INTERPRETATION NUMBER 1 ###### -### (* disambiguation environment *) -alias id O = cic:/Coq/Init/Datatypes/nat.ind#xpointer(1/1/1) -alias id S = cic:/Coq/Init/Datatypes/nat.ind#xpointer(1/1/2) -alias id bool = cic:/Coq/Init/Datatypes/bool.ind#xpointer(1/1) -alias id false = cic:/Coq/Init/Datatypes/bool.ind#xpointer(1/1/2) -alias id nat = cic:/Coq/Init/Datatypes/nat.ind#xpointer(1/1) -### (* METASENV after disambiguation *) - -### (* TERM after disambiguation *) - -<[x:nat] -<[y:nat]Set>Cases x of - O => nat - S => [x:nat]bool -end>Cases (S O) of - O => O - S => [x:nat]false -end -### (* TYPE_OF the disambiguated term *) -([x:nat] -<[y:nat]Set>Cases x of - O => nat - S => [x:nat]bool -end (S O)) -### (* REDUCED disambiguated term *) -false diff --git a/helm/gTopLevel/tests/match01.cic b/helm/gTopLevel/tests/match01.cic deleted file mode 100644 index 04948778a..000000000 --- a/helm/gTopLevel/tests/match01.cic +++ /dev/null @@ -1,4 +0,0 @@ -[\lambda z:nat. \lambda h:(le O z). (eq nat O O)] -match (le_n O): le with -[ le_n \Rightarrow (refl_equal nat O) -| (le_S x y) \Rightarrow (refl_equal nat O) ] diff --git a/helm/gTopLevel/tests/match01.cic.test b/helm/gTopLevel/tests/match01.cic.test deleted file mode 100644 index 13fbce756..000000000 --- a/helm/gTopLevel/tests/match01.cic.test +++ /dev/null @@ -1,24 +0,0 @@ -[\lambda z:nat. \lambda h:(le O z). (eq nat O O)] -match (le_n O): le with -[ le_n \Rightarrow (refl_equal nat O) -| (le_S x y) \Rightarrow (refl_equal nat O) ] -###### INTERPRETATION NUMBER 1 ###### -### (* disambiguation environment *) -alias id O = cic:/Coq/Init/Datatypes/nat.ind#xpointer(1/1/1) -alias id eq = cic:/Coq/Init/Logic/eq.ind#xpointer(1/1) -alias id le = cic:/Coq/Init/Peano/le.ind#xpointer(1/1) -alias id le_n = cic:/Coq/Init/Peano/le.ind#xpointer(1/1/1) -alias id nat = cic:/Coq/Init/Datatypes/nat.ind#xpointer(1/1) -alias id refl_equal = cic:/Coq/Init/Logic/eq.ind#xpointer(1/1/1) -### (* METASENV after disambiguation *) - -### (* TERM after disambiguation *) - -<[z:nat][h:(le O z)](eq nat O O)>Cases (le_n O) of - le_n => (refl_equal nat O) - le_S => [x:nat][y:(le O x)](refl_equal nat O) -end -### (* TYPE_OF the disambiguated term *) -([z:nat][h:(le O z)](eq nat O O) O (le_n O)) -### (* REDUCED disambiguated term *) -(refl_equal nat O) diff --git a/helm/gTopLevel/tests/match02.cic b/helm/gTopLevel/tests/match02.cic deleted file mode 100644 index 4a5c69782..000000000 --- a/helm/gTopLevel/tests/match02.cic +++ /dev/null @@ -1,4 +0,0 @@ -[\lambda z:nat. \lambda h:(le 0 z). (le 0 (S z))] -match (le_S 0 0 (le_n 0)): le with -[ le_n \Rightarrow (le_S 0 0 (le_n 0)) -| (le_S x y) \Rightarrow (le_S 0 (S x) (le_S 0 x y)) ] diff --git a/helm/gTopLevel/tests/match02.cic.test b/helm/gTopLevel/tests/match02.cic.test deleted file mode 100644 index 08a583805..000000000 --- a/helm/gTopLevel/tests/match02.cic.test +++ /dev/null @@ -1,24 +0,0 @@ -[\lambda z:nat. \lambda h:(le 0 z). (le 0 (S z))] -match (le_S 0 0 (le_n 0)): le with -[ le_n \Rightarrow (le_S 0 0 (le_n 0)) -| (le_S x y) \Rightarrow (le_S 0 (S x) (le_S 0 x y)) ] -###### INTERPRETATION NUMBER 1 ###### -### (* disambiguation environment *) -alias id S = cic:/Coq/Init/Datatypes/nat.ind#xpointer(1/1/2) -alias id le = cic:/Coq/Init/Peano/le.ind#xpointer(1/1) -alias id le_S = cic:/Coq/Init/Peano/le.ind#xpointer(1/1/2) -alias id le_n = cic:/Coq/Init/Peano/le.ind#xpointer(1/1/1) -alias id nat = cic:/Coq/Init/Datatypes/nat.ind#xpointer(1/1) -alias num (instance 0) = "natural number" -### (* METASENV after disambiguation *) - -### (* TERM after disambiguation *) - -<[z:nat][h:(le O z)](le O (S z))>Cases (le_S O O (le_n O)) of - le_n => (le_S O O (le_n O)) - le_S => [x:nat][y:(le O x)](le_S O (S x) (le_S O x y)) -end -### (* TYPE_OF the disambiguated term *) -([z:nat][h:(le O z)](le O (S z)) (S O) (le_S O O (le_n O))) -### (* REDUCED disambiguated term *) -(le_S O (S O) (le_S O O (le_n O))) diff --git a/helm/gTopLevel/tests/match03.cic b/helm/gTopLevel/tests/match03.cic deleted file mode 100644 index e4064b378..000000000 --- a/helm/gTopLevel/tests/match03.cic +++ /dev/null @@ -1,4 +0,0 @@ -[\lambda x:bool. nat] -match true:bool with -[ true \Rightarrow O -| false \Rightarrow (S O) ] diff --git a/helm/gTopLevel/tests/match03.cic.test b/helm/gTopLevel/tests/match03.cic.test deleted file mode 100644 index bc5db2d04..000000000 --- a/helm/gTopLevel/tests/match03.cic.test +++ /dev/null @@ -1,23 +0,0 @@ -[\lambda x:bool. nat] -match true:bool with -[ true \Rightarrow O -| false \Rightarrow (S O) ] -###### INTERPRETATION NUMBER 1 ###### -### (* disambiguation environment *) -alias id O = cic:/Coq/Init/Datatypes/nat.ind#xpointer(1/1/1) -alias id S = cic:/Coq/Init/Datatypes/nat.ind#xpointer(1/1/2) -alias id bool = cic:/Coq/Init/Datatypes/bool.ind#xpointer(1/1) -alias id nat = cic:/Coq/Init/Datatypes/nat.ind#xpointer(1/1) -alias id true = cic:/Coq/Init/Datatypes/bool.ind#xpointer(1/1/1) -### (* METASENV after disambiguation *) - -### (* TERM after disambiguation *) - -<[x:bool]nat>Cases true of - true => O - false => (S O) -end -### (* TYPE_OF the disambiguated term *) -([x:bool]nat true) -### (* REDUCED disambiguated term *) -O diff --git a/helm/gTopLevel/tests/match04.cic b/helm/gTopLevel/tests/match04.cic deleted file mode 100644 index 6de9a5ba1..000000000 --- a/helm/gTopLevel/tests/match04.cic +++ /dev/null @@ -1,4 +0,0 @@ -[\lambda x:nat. nat] -match O:nat with -[ O \Rightarrow O -| (S x) \Rightarrow (S (S x)) ] diff --git a/helm/gTopLevel/tests/match04.cic.test b/helm/gTopLevel/tests/match04.cic.test deleted file mode 100644 index 8befe4c3d..000000000 --- a/helm/gTopLevel/tests/match04.cic.test +++ /dev/null @@ -1,21 +0,0 @@ -[\lambda x:nat. nat] -match O:nat with -[ O \Rightarrow O -| (S x) \Rightarrow (S (S x)) ] -###### INTERPRETATION NUMBER 1 ###### -### (* disambiguation environment *) -alias id O = cic:/Coq/Init/Datatypes/nat.ind#xpointer(1/1/1) -alias id S = cic:/Coq/Init/Datatypes/nat.ind#xpointer(1/1/2) -alias id nat = cic:/Coq/Init/Datatypes/nat.ind#xpointer(1/1) -### (* METASENV after disambiguation *) - -### (* TERM after disambiguation *) - -<[x:nat]nat>Cases O of - O => O - S => [x:nat](S (S x)) -end -### (* TYPE_OF the disambiguated term *) -([x:nat]nat O) -### (* REDUCED disambiguated term *) -O diff --git a/helm/gTopLevel/tests/match05.cic b/helm/gTopLevel/tests/match05.cic deleted file mode 100644 index 10a54db0d..000000000 --- a/helm/gTopLevel/tests/match05.cic +++ /dev/null @@ -1,4 +0,0 @@ -[\lambda x:list. list] -match nil:list with -[ nil \Rightarrow nil -| (cons x y) \Rightarrow (cons x y) ] diff --git a/helm/gTopLevel/tests/match05.cic.test b/helm/gTopLevel/tests/match05.cic.test deleted file mode 100644 index 1e80b5748..000000000 --- a/helm/gTopLevel/tests/match05.cic.test +++ /dev/null @@ -1,72 +0,0 @@ -[\lambda x:list. list] -match nil:list with -[ nil \Rightarrow nil -| (cons x y) \Rightarrow (cons x y) ] -###### INTERPRETATION NUMBER 1 ###### -### (* disambiguation environment *) -alias id cons = cic:/CoRN/algebra/ListType/list.ind#xpointer(1/1/2) -alias id list = cic:/CoRN/algebra/ListType/list.ind#xpointer(1/1) -alias id nil = cic:/CoRN/algebra/ListType/list.ind#xpointer(1/1/1) -### (* METASENV after disambiguation *) -_ :? _; _ :? _ |- ?25: Type -### (* TERM after disambiguation *) - -<[x:list{A:=?25[_ ; _]}]list{A:=?25[_ ; _]}>Cases nil{A:=?25[_ ; _]} of - nil => nil{A:=?25[_ ; _]} - cons => [x:?25[_ ; _]][y:list{A:=?25[_ ; x]}](cons{A:=?25[x ; y]} x y) -end -### (* TYPE_OF the disambiguated term *) -([x:list{A:=?25[_ ; _]}]list{A:=?25[_ ; _]} nil{A:=?25[_ ; _]}) -### (* REDUCED disambiguated term *) -nil{A:=?25[_ ; _]} -###### INTERPRETATION NUMBER 2 ###### -### (* disambiguation environment *) -alias id cons = cic:/Coq/Lists/List/list.ind#xpointer(1/1/2) -alias id list = cic:/Coq/Lists/List/list.ind#xpointer(1/1) -alias id nil = cic:/Coq/Lists/List/list.ind#xpointer(1/1/1) -### (* METASENV after disambiguation *) -_ :? _; _ :? _ |- ?25: Set -### (* TERM after disambiguation *) - -<[x:list{A:=?25[_ ; _]}]list{A:=?25[_ ; _]}>Cases nil{A:=?25[_ ; _]} of - nil => nil{A:=?25[_ ; _]} - cons => [x:?25[_ ; _]][y:list{A:=?25[_ ; x]}](cons{A:=?25[x ; y]} x y) -end -### (* TYPE_OF the disambiguated term *) -([x:list{A:=?25[_ ; _]}]list{A:=?25[_ ; _]} nil{A:=?25[_ ; _]}) -### (* REDUCED disambiguated term *) -nil{A:=?25[_ ; _]} -###### INTERPRETATION NUMBER 3 ###### -### (* disambiguation environment *) -alias id cons = cic:/Coq/Lists/MonoList/list.ind#xpointer(1/1/2) -alias id list = cic:/Coq/Lists/MonoList/list.ind#xpointer(1/1) -alias id nil = cic:/Coq/Lists/MonoList/list.ind#xpointer(1/1/1) -### (* METASENV after disambiguation *) - -### (* TERM after disambiguation *) - -<[x:list]list>Cases nil of - nil => nil - cons => [x:A][y:list](cons x y) -end -### (* TYPE_OF the disambiguated term *) -([x:list]list nil) -### (* REDUCED disambiguated term *) -nil -###### INTERPRETATION NUMBER 4 ###### -### (* disambiguation environment *) -alias id cons = cic:/Lannion/continuations/weight/specif/list.ind#xpointer(1/1/2) -alias id list = cic:/Lannion/continuations/weight/specif/list.ind#xpointer(1/1) -alias id nil = cic:/Lannion/continuations/weight/specif/list.ind#xpointer(1/1/1) -### (* METASENV after disambiguation *) -_ :? _; _ :? _ |- ?25: Set -### (* TERM after disambiguation *) - -<[x:list{A:=?25[_ ; _]}]list{A:=?25[_ ; _]}>Cases nil{A:=?25[_ ; _]} of - nil => nil{A:=?25[_ ; _]} - cons => [x:?25[_ ; _]][y:list{A:=?25[_ ; x]}](cons{A:=?25[x ; y]} x y) -end -### (* TYPE_OF the disambiguated term *) -([x:list{A:=?25[_ ; _]}]list{A:=?25[_ ; _]} nil{A:=?25[_ ; _]}) -### (* REDUCED disambiguated term *) -nil{A:=?25[_ ; _]} diff --git a/helm/gTopLevel/tests/match06.cic b/helm/gTopLevel/tests/match06.cic deleted file mode 100644 index fd9677fc1..000000000 --- a/helm/gTopLevel/tests/match06.cic +++ /dev/null @@ -1,3 +0,0 @@ -\lambda x:False. - [\lambda h:False. True] - match x:False with [] diff --git a/helm/gTopLevel/tests/match06.cic.test b/helm/gTopLevel/tests/match06.cic.test deleted file mode 100644 index eb134e429..000000000 --- a/helm/gTopLevel/tests/match06.cic.test +++ /dev/null @@ -1,19 +0,0 @@ -\lambda x:False. - [\lambda h:False. True] - match x:False with [] -###### INTERPRETATION NUMBER 1 ###### -### (* disambiguation environment *) -alias id False = cic:/Coq/Init/Logic/False.ind#xpointer(1/1) -alias id True = cic:/Coq/Init/Logic/True.ind#xpointer(1/1) -### (* METASENV after disambiguation *) - -### (* TERM after disambiguation *) -[x:False] -<[h:False]True>Cases x of -end -### (* TYPE_OF the disambiguated term *) -(x:False)([h:False]True x) -### (* REDUCED disambiguated term *) -[x:False] -<[h:False]True>Cases x of -end diff --git a/helm/gTopLevel/tests/match07.cic b/helm/gTopLevel/tests/match07.cic deleted file mode 100644 index 15ead0774..000000000 --- a/helm/gTopLevel/tests/match07.cic +++ /dev/null @@ -1,4 +0,0 @@ -[\lambda x:bool. nat] -match true with -[ true \Rightarrow O -| false \Rightarrow (S O) ] diff --git a/helm/gTopLevel/tests/match07.cic.test b/helm/gTopLevel/tests/match07.cic.test deleted file mode 100644 index 690ccd28a..000000000 --- a/helm/gTopLevel/tests/match07.cic.test +++ /dev/null @@ -1,23 +0,0 @@ -[\lambda x:bool. nat] -match true with -[ true \Rightarrow O -| false \Rightarrow (S O) ] -###### INTERPRETATION NUMBER 1 ###### -### (* disambiguation environment *) -alias id O = cic:/Coq/Init/Datatypes/nat.ind#xpointer(1/1/1) -alias id S = cic:/Coq/Init/Datatypes/nat.ind#xpointer(1/1/2) -alias id bool = cic:/Coq/Init/Datatypes/bool.ind#xpointer(1/1) -alias id nat = cic:/Coq/Init/Datatypes/nat.ind#xpointer(1/1) -alias id true = cic:/Coq/Init/Datatypes/bool.ind#xpointer(1/1/1) -### (* METASENV after disambiguation *) - -### (* TERM after disambiguation *) - -<[x:bool]nat>Cases true of - true => O - false => (S O) -end -### (* TYPE_OF the disambiguated term *) -([x:bool]nat true) -### (* REDUCED disambiguated term *) -O diff --git a/helm/gTopLevel/texTermEditor.ml b/helm/gTopLevel/texTermEditor.ml deleted file mode 100644 index 5ea965f2f..000000000 --- a/helm/gTopLevel/texTermEditor.ml +++ /dev/null @@ -1,239 +0,0 @@ -(* Copyright (C) 2000-2002, HELM Team. - * - * This file is part of HELM, an Hypertextual, Electronic - * Library of Mathematics, developed at the Computer Science - * Department, University of Bologna, Italy. - * - * HELM is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * HELM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with HELM; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. - * - * For details, see the HELM World-Wide-Web page, - * http://cs.unibo.it/helm/. - *) - -let debug = true -let debug_print s = if debug then prerr_endline s - -(******************************************************************************) -(* *) -(* PROJECT HELM *) -(* *) -(* Claudio Sacerdoti Coen *) -(* 06/01/2002 *) -(* *) -(* *) -(******************************************************************************) - -(* A WIDGET TO ENTER CIC TERMS *) - -class type term_editor = - object - method coerce : GObj.widget - (* get_as_string returns the unquoted string *) - method get_as_string : string - method get_metasenv_and_term : - context:Cic.context -> - metasenv:Cic.metasenv -> - Cic.metasenv * Cic.term * CicUniv.universe_graph - method reset : unit - (* The input of set_term is unquoted *) - method set_term : string -> unit - method environment : DisambiguatingParser.EnvironmentP3.t ref - end -;; - -module Make(C:DisambiguateTypes.Callbacks) = - struct - - module Disambiguate' = DisambiguatingParser.Make(C);; - - class term_editor_impl - ~dbd - ?packing ?width ?height - ?isnotempty_callback ?share_environment_with () : term_editor - = - let mmlwidget = - GMathViewAux.single_selection_math_view - ?packing ?width ?height () in -(* - let drawing_area = mmlwidget#get_drawing_area in - let _ = drawing_area#misc#set_can_focus true in - let _ = drawing_area#misc#grab_focus () in -*) - let logger = - fun l s -> prerr_endline ("TERM_EDITOR (" ^ string_of_int l ^ "): " ^ s) in - let tex_editor = - Mathml_editor.create - ~alt_lexer:true - ~dictionary_uri:"dictionary-cic.xml" - ~mml_uri:Mathml_editor.default_mathml_stylesheet_path -(*CSC: togliere il path assoluto - ~tml_uri:Mathml_editor.default_tex_stylesheet_path -*) - ~tml_uri:"/usr/share/editex/tml-litex.xsl" - ~log:logger - in -(* - let _ = - (new GObj.event_ops mmlwidget#coerce#as_widget)#connect#button_press - ~callback:(fun _ -> drawing_area#misc#grab_focus () ; true) in -*) - let _ = -(* (new GObj.event_ops drawing_area#coerce#as_widget)#connect#focus_in *) - (new GObj.event_ops mmlwidget#coerce#as_widget)#connect#focus_in - ~callback: - (fun _ -> - mmlwidget#freeze ; - Mathml_editor.cursor_show ~editor:tex_editor ; - mmlwidget#thaw ; - true) in - let _ = -(* (new GObj.event_ops drawing_area#coerce#as_widget)#connect#focus_out *) - (new GObj.event_ops mmlwidget#coerce#as_widget)#connect#focus_out - ~callback: - (fun _ -> - mmlwidget#freeze ; - Mathml_editor.cursor_hide ~editor:tex_editor ; - mmlwidget#thaw ; - true) in - let _ = Mathml_editor.push tex_editor '$' in - let dom_tree = Mathml_editor.get_mml tex_editor in - let _ = mmlwidget#load_root dom_tree#get_documentElement in - let _ = -(* drawing_area#event#connect#key_press *) - (new GObj.event_ops mmlwidget#coerce#as_widget)#connect#key_press - (function e -> - let key = GdkEvent.Key.keyval e in - mmlwidget#freeze ; - if - key >= 32 && key < 256 && - (GdkEvent.Key.state e = [] || GdkEvent.Key.state e = [`SHIFT]) - then - Mathml_editor.push tex_editor (Char.chr key) - else if key = GdkKeysyms._u then - begin - mmlwidget#freeze ; - ignore (Mathml_editor.freeze tex_editor) ; - Mathml_editor.reset tex_editor ; - Mathml_editor.push tex_editor '$' ; - ignore (Mathml_editor.thaw tex_editor) ; - mmlwidget#thaw - end - else if key = GdkKeysyms._BackSpace then - Mathml_editor.drop tex_editor - (List.mem `CONTROL (GdkEvent.Key.state e)) - else if key = GdkKeysyms._v then - ignore (mmlwidget#misc#convert_selection "STRING" Gdk.Atom.primary); - let hadj, _ = mmlwidget#get_adjustments in - mmlwidget#thaw ; - hadj#set_value hadj#upper ; - false) in - let environment = - match share_environment_with with - None -> - ref - (DisambiguatingParser.EnvironmentP3.of_string - DisambiguatingParser.EnvironmentP3.empty) - | Some obj -> obj#environment - in - let _ = - match isnotempty_callback with - None -> () - | Some callback -> - (* This approximation of the test that checks if the tree is empty *) - (* is utterly unprecise. We assume a tree to look as an empty tree *) - (* iff it is made of just one node m:mtext (which should be the *) - (* cursor). *) - let is_empty_tree () = - let root = dom_tree#get_documentElement in - match root#get_firstChild with - None -> true - | Some n -> n#get_nodeName#to_string = "m:mtext" - in - dom_tree#addEventListener - ~typ:(Gdome.domString "DOMSubtreeModified") - ~listener: - (Gdome.eventListener - (function _ -> callback (not (is_empty_tree ())))) - ~useCapture:false - in - object(self) - - initializer - ignore (mmlwidget#misc#connect#selection_received - ~callback: (fun selection_data ~time -> - let input = try selection_data#data with Gpointer.Null -> "" in - mmlwidget#freeze ; - ignore (Mathml_editor.freeze tex_editor) ; - for i = 0 to String.length input - 1 do - Mathml_editor.push tex_editor input.[i] - done; - ignore (Mathml_editor.thaw tex_editor) ; - mmlwidget#thaw)) - - method coerce = mmlwidget#coerce - method reset = - mmlwidget#freeze ; - ignore (Mathml_editor.freeze tex_editor) ; - Mathml_editor.reset tex_editor ; - Mathml_editor.push tex_editor '$' ; - ignore (Mathml_editor.thaw tex_editor) ; - mmlwidget#thaw - - (* The input of set_term is unquoted *) - method set_term txt = - mmlwidget#freeze ; - ignore (Mathml_editor.freeze tex_editor) ; - self#reset ; - let txt' = Str.global_replace (Str.regexp "_") "\\_" txt in - String.iter (fun ch -> Mathml_editor.push tex_editor ch) txt' ; - ignore (Mathml_editor.thaw tex_editor) ; - mmlwidget#thaw - - (* get_as_string returns the unquoted string *) - method get_as_string = - let term = Mathml_editor.get_tex tex_editor in - Str.global_replace (Str.regexp "^\\$\\$?") "" - (Str.global_replace (Str.regexp "\\$\\$?$") "" - (Str.global_replace (Str.regexp "\\\\_") "_" term)) - - method get_metasenv_and_term ~context ~metasenv = - let name_context = - List.map - (function - Some (n,_) -> Some n - | None -> None - ) context - in - debug_print ("TexTermEditor: Raw Tex: " ^ (Mathml_editor.get_tex tex_editor)) ; - let environment',metasenv,expr,ugraph = - match - Disambiguate'.disambiguate_term ~dbd - ~context ~metasenv (Mathml_editor.get_tex tex_editor) - ~initial_ugraph:CicUniv.empty_ugraph ~aliases:!environment - with - [environment',metasenv,expr,u] -> environment',metasenv,expr,u - | _ -> assert false - in - environment := environment' ; - metasenv,expr,ugraph - - method environment = environment - end - - let term_editor = new term_editor_impl - -end -;; diff --git a/helm/gTopLevel/texTermEditor.mli b/helm/gTopLevel/texTermEditor.mli deleted file mode 100644 index ece0bd8d9..000000000 --- a/helm/gTopLevel/texTermEditor.mli +++ /dev/null @@ -1,51 +0,0 @@ -(* Copyright (C) 2000-2002, HELM Team. - * - * This file is part of HELM, an Hypertextual, Electronic - * Library of Mathematics, developed at the Computer Science - * Department, University of Bologna, Italy. - * - * HELM is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * HELM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with HELM; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. - * - * For details, see the HELM World-Wide-Web page, - * http://cs.unibo.it/helm/. - *) - -class type term_editor = - object - method coerce : GObj.widget - (* get_as_string returns the unquoted string *) - method get_as_string : string - method get_metasenv_and_term : - context:Cic.context -> - metasenv:Cic.metasenv -> - Cic.metasenv * Cic.term * CicUniv.universe_graph - method reset : unit - (* The input of set_term is unquoted *) - method set_term : string -> unit - method environment : DisambiguatingParser.EnvironmentP3.t ref - end - -module Make (C : DisambiguateTypes.Callbacks) : - sig - val term_editor : - dbd:Mysql.dbd -> - ?packing:(GObj.widget -> unit) -> - ?width:int -> - ?height:int -> - ?isnotempty_callback:(bool -> unit) -> - ?share_environment_with:term_editor -> - unit -> term_editor - end diff --git a/helm/gTopLevel/typecheck_uri.ml b/helm/gTopLevel/typecheck_uri.ml deleted file mode 100644 index e6df5cd61..000000000 --- a/helm/gTopLevel/typecheck_uri.ml +++ /dev/null @@ -1,23 +0,0 @@ - - -open Printf - -let _ = Helm_registry.load_from "gTopLevel.conf.xml" - -let test_uri uri = - (try - Printf.printf "%s ... " uri; - let uri = UriManager.uri_of_string uri in - flush stdout; - ignore (CicTypeChecker.typecheck uri); - print_endline "ok"; - with _ -> print_endline "failure"); - flush stdout - -let _ = - try - while true do - test_uri (input_line stdin) - done - with End_of_file -> () - diff --git a/helm/header/getheader.xml b/helm/header/getheader.xml deleted file mode 100644 index a0f903f87..000000000 --- a/helm/header/getheader.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - String baseURL = request.getParameter("baseurl"); - String styleURL1 = request.getParameter("stylesheet1"); - String styleURL2 = request.getParameter("stylesheet2"); - String xmlURI = request.getParameter("xmluri"); - String annURI = request.getParameter("annuri"); - - baseURL - styleURL1 - styleURL2 - xmlURI - annURI - - diff --git a/helm/header/provaurl b/helm/header/provaurl deleted file mode 100644 index 86344dc78..000000000 --- a/helm/header/provaurl +++ /dev/null @@ -1 +0,0 @@ -http://phd.cs.unibo.it/helm/PARSER/examples/header/getheader.xml?baseurl=http://cartoonia.cs.unibo.it/helm/PARSER/examples/style/&stylesheet1=content.xsl&stylesheet2=mmlextension.xsl&xmlfile=file:///really_very_local/helm/PARSER/examples/prove/provaIota/bool_ind.con.xml diff --git a/helm/header/provaurl1 b/helm/header/provaurl1 deleted file mode 100644 index d95769884..000000000 --- a/helm/header/provaurl1 +++ /dev/null @@ -1,2 +0,0 @@ -http://cartoonia.cs.unibo.it/helm/PARSER/examples/header/getheader.xml?baseurl=http://cartoonia.cs.unibo.it/helm/PARSER/examples/style/&stylesheet1=content.xsl&stylesheet2=content_to_html.xsl&xmlfile=/really_very_local/helm/PARSER/examples/prove/prova/forest_rec.con.xml:wq - diff --git a/helm/header/setheader.xsl b/helm/header/setheader.xsl deleted file mode 100644 index dd6ecad34..000000000 --- a/helm/header/setheader.xsl +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - -http://localhost:8081/getciconly?uri= - - - - - - - type="text/xml" - href="" type="text/xsl" - type="xslt" - - - - - - - - - - - - - diff --git a/helm/hxp/.cvsignore b/helm/hxp/.cvsignore deleted file mode 100644 index bc0401ddc..000000000 --- a/helm/hxp/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -*.cm[aiox] *.cmxa *.output *.opt hxp -hxpParser.ml hxpParser.mli hxpLexer.ml diff --git a/helm/hxp/.depend b/helm/hxp/.depend deleted file mode 100644 index 7f855a44b..000000000 --- a/helm/hxp/.depend +++ /dev/null @@ -1,9 +0,0 @@ -hxpTop.cmo: hxpTypes.cmo hxpXML.cmo -hxpTop.cmx: hxpTypes.cmx hxpXML.cmx -hxpParser.cmo: hxpTypes.cmo hxpParser.cmi -hxpParser.cmx: hxpTypes.cmx hxpParser.cmi -hxpParser.cmi: hxpTypes.cmo -hxpLexer.cmo: hxpParser.cmi -hxpLexer.cmx: hxpParser.cmx -hxpXML.cmo: hxpLexer.cmo hxpParser.cmi hxpTypes.cmo -hxpXML.cmx: hxpLexer.cmx hxpParser.cmx hxpTypes.cmx diff --git a/helm/hxp/EXAMPLE.txt b/helm/hxp/EXAMPLE.txt deleted file mode 100644 index 83e02a5cb..000000000 --- a/helm/hxp/EXAMPLE.txt +++ /dev/null @@ -1,5 +0,0 @@ -On mowgli.cs.unibo.it this line outputs the names' list in a format suitable for -Postgres. Each line of this list contains a uri and its short name separated by -a tab character (as produced by pg_dump). see hxp --help for details. - -hxp.opt -l /projects/helm/EXPORT/examples_mowgli/objects -r pg-names diff --git a/helm/hxp/Makefile b/helm/hxp/Makefile deleted file mode 100644 index 4c41e6598..000000000 --- a/helm/hxp/Makefile +++ /dev/null @@ -1,66 +0,0 @@ -BIN_DIR = /usr/local/bin -REQUIRES = zip -# unix helm-cic_textual_parser \ -# helm-mathql helm-mathql_interpreter helm-mathql_generator -PREDICATES = -OCAMLOPTIONS = -package "$(REQUIRES)" -predicates "$(PREDICATES)" -OCAMLC = ocamlfind ocamlc $(OCAMLOPTIONS) -OCAMLOPT = ocamlfind ocamlopt $(OCAMLOPTIONS) -OCAMLDEP = ocamldep -OCAMLYACC = ocamlyacc -OCAMLLEX = ocamllex - -LIBRARIES = $(shell ocamlfind query -recursive -predicates "byte $(PREDICATES)" -format "%d/%a" $(REQUIRES)) -LIBRARIES_OPT = $(shell ocamlfind query -recursive -predicates "native $(PREDICATES)" -format "%d/%a" $(REQUIRES)) - -HXPTOP = hxpTop.ml - -DEPOBJS = $(HXPTOP) -AUXOBJS = hxpTypes.ml hxpParser.ml hxpParser.mli hxpLexer.ml hxpXML.ml - -all: hxp -opt: hxp.opt - -depend: $(AUXOBJS) - $(OCAMLDEP) $(DEPOBJS) $(AUXOBJS) > .depend - -hxp: hxpParser.cmi $(AUXOBJS:.ml=.cmo) $(HXPTOP:.ml=.cmo) $(LIBRARIES) - $(OCAMLC) -linkpkg -o hxp $(AUXOBJS:.ml=.cmo) $(HXPTOP:.ml=.cmo) - -hxp.opt: $(AUXOBJS:.ml=.cmx) $(HXPTOP:.ml=.cmx) $(LIBRARIES_OPT) - $(OCAMLOPT) -linkpkg -o hxp.opt $(AUXOBJS:.ml=.cmx) $(HXPTOP:.ml=.cmx) - -.SUFFIXES: .ml .mli .cmo .cmi .cmx .mly .mll -.ml.cmo: $(LIBRARIES) - $(OCAMLC) -c $< -.mli.cmi: $(LIBRARIES) - $(OCAMLC) -c $< -.ml.cmx: $(LIBRARIES_OPT) - $(OCAMLOPT) -c $< -.mly.ml: - $(OCAMLYACC) $< -.mly.mli: - $(OCAMLYACC) $< -.mll.ml: - $(OCAMLLEX) $< - -$(DEPOBJS:%.ml=%.cmo): $(LIBRARIES) -$(DEPOBJS:%.ml=%.cmx): $(LIBRARIES_OPT) - -clean: - rm -f *.cm[iox] *.o hxp hxp.opt \ - hxpParser.ml hxpParser.mli hxpLexer.ml - -install: - cp hxp hxp.opt $(BIN_DIR) - -uninstall: - cd $(BIN_DIR) - rm -f hxp hxp.opt - -.PHONY: install uninstall clean - -ifneq ($(MAKECMDGOALS), depend) - include .depend -endif - diff --git a/helm/hxp/hxpLexer.mll b/helm/hxp/hxpLexer.mll deleted file mode 100644 index fbec4aca7..000000000 --- a/helm/hxp/hxpLexer.mll +++ /dev/null @@ -1,56 +0,0 @@ -(* Copyright (C) 2000, HELM Team. - * - * This file is part of HELM, an Hypertextual, Electronic - * Library of Mathematics, developed at the Computer Science - * Department, University of Bologna, Italy. - * - * HELM is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * HELM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with HELM; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. - * - * For details, see the HELM World-Wide-Web page, - * http://www.cs.unibo.it/helm/. - *) - -(* AUTOR: Ferruccio Guidi - *) - -{ - open HxpParser -} - -let SPC = [' ' '\t' '\n' '\r' '?' '!']+ -let ALPHA = ['A'-'Z' 'a'-'z']+ -let STR = '"'[^'"']*'"' -let NUM = ['0'-'9' '.']+ -let BEF = [^ '=' '0'-'9' '.' ':' '*']* - -rule xml_token = parse - | SPC { xml_token lexbuf } - | '<' { OPEN } - | '>' { CLOSE } - | '=' { EQ } - | '/' { SL } - | ALPHA { NAME (Lexing.lexeme lexbuf) } - | STR { VAL (Lexing.lexeme lexbuf) } - | eof { DONE } - -and time_token = parse - | BEF { time_token lexbuf } - | NUM { DATA (float_of_string (Lexing.lexeme lexbuf)) } - | '=' { EQ } - | ':' { CLN } - | _ { DONE } - | eof { DONE } - diff --git a/helm/hxp/hxpParser.mly b/helm/hxp/hxpParser.mly deleted file mode 100644 index aed627abf..000000000 --- a/helm/hxp/hxpParser.mly +++ /dev/null @@ -1,56 +0,0 @@ -/* Copyright (C) 2000, HELM Team. - * - * This file is part of HELM, an Hypertextual, Electronic - * Library of Mathematics, developed at the Computer Science - * Department, University of Bologna, Italy. - * - * HELM is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * HELM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with HELM; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. - * - * For details, see the HELM World-Wide-Web page, - * http://cs.unibo.it/helm/. - */ - -/* AUTOR: Ferruccio Guidi - */ - -%{ - module T = HxpTypes -%} - %token DONE - %token NAME VAL - %token OPEN CLOSE EQ SL /* < > = / */ - %start xml - %type xml - - %token DATA - %token CLN - %start time - %type time -%% - xml : - OPEN NAME { T.XML_Open $2 } - | NAME EQ VAL { T.XML_Attribute ($1, $3) } - | CLOSE { T.XML_End } - | OPEN SL NAME CLOSE { T.XML_Close $3 } - | SL CLOSE { T.XML_Close "" } - | NAME NAME VAL { T.XML_Attribute ($1 ^ " " ^ $2, $3) } - | DONE { T.XML_Done } - ; - time : - EQ DATA CLN DATA { ($2, $4) } - | DATA EQ DATA CLN DATA { ($3, $5) } - | DONE { (-1., -1.) } - ; diff --git a/helm/hxp/hxpTop.ml b/helm/hxp/hxpTop.ml deleted file mode 100644 index 1030c6447..000000000 --- a/helm/hxp/hxpTop.ml +++ /dev/null @@ -1,345 +0,0 @@ -(* Copyright (C) 2000, HELM Team. - * - * This file is part of HELM, an Hypertextual, Electronic - * Library of Mathematics, developed at the Computer Science - * Department, University of Bologna, Italy. - * - * HELM is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * HELM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with HELM; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. - * - * For details, see the HELM World-Wide-Web page, - * http://www.cs.unibo.it/helm/. - *) - -(* AUTOR: Ferruccio Guidi - *) - -module T = HxpTypes - -module X = HxpXML.Make - -let build = ref "EXPORT" - -let lib = ref Filename.current_dir_name - -let uq s = String.sub s 1 (String.length s - 2) - -let rec esc s = - try - let i = String.index s '\'' in - let l = String.length s in - String.sub s 0 i ^ "\\\'" ^ esc (String.sub s (succ i) (l - succ i)) - with Not_found -> s - -let split_filename f = - let len = String.length f in - let dot = String.rindex f '.' in - let slash = String.rindex f '/' in - let path = String.sub f 0 slash in - let name = String.sub f (succ slash) (dot - succ slash) in - let ext = String.sub f (succ dot) (len - succ dot) in - (path, (name, ext)) - -let ins0 name filter = - let sort = ref "\"\"" in - let relative = ref 0 in - let count = ref 0 in - let max = ref 0 in - let flags = String.create 3 in - let set_flags_for = function - | T.XML_Open "LAMBDA" -> flags.[0] <- 'L' - | T.XML_Open "MUTCASE" -> flags.[1] <- 'C' - | T.XML_Open "FIX" -> flags.[2] <- 'F' - | T.XML_Open "COFIX" -> flags.[2] <- 'F' - | _ -> () - in - let rec skip_premises h = - match X.xnext h with - | h, (T.XML_Attribute _, _) -> skip_premises h - | h, (T.XML_End, _) -> skip_premises h - | h, (T.XML_Open "PROD", i) -> - let h = - if ! sort = "\"\"" then - match X.xnext h with - | h, (T.XML_Attribute ("type", str), _) -> sort := str; h - | h, _ -> sort := ""; h - else h - in - let h = X.scan_for h (T.XML_Close "source", succ i) in - let h, (obj, i) = X.xnext h in - relative := i + 2; (* XML_Open "target" *) - skip_premises h - | h, (obj, _) -> - print_string (! sort ^ " " ^ T.string_of_object obj); - set_flags_for obj; h - in - let rec ins_aux h = - match X.xnext h with - | h, (T.XML_Done, _) -> h - | h, (T.XML_Attribute ("uri", v), i) -> - incr count; - if i > ! max then max := i; - ins_aux h - | h, (obj, _) -> - set_flags_for obj; ins_aux h - in - if snd (snd (split_filename name)) = "con" then begin - flags.[0] <- '-'; flags.[1] <- '-'; flags.[2] <- '-'; - let h = X.start (Filename.concat ! lib (name ^ ".xml")) filter in - let h = X.scan_for h (T.XML_Open "type", 3) in - X.stop (ins_aux (skip_premises h)); - print_endline (" \"cic:" ^ name ^ "\" " ^ flags ^ - " count " ^ string_of_int ! count ^ - " max_depth " ^ string_of_int (! max - ! relative) ^ - "

"); - flush stdout - end - -type style_t = HTML | PG | RDF - -let ins1 style name filter = - let maior = ref 0 in - let minor = ref (-1) in - let make_uris () = - let make_ref pre sep post = - if ! maior > 0 then - name ^ pre ^ string_of_int ! maior ^ - (if ! minor > 0 then sep ^ string_of_int ! minor else "") ^ post - else name - in - incr minor; - (make_ref "#xpointer(1/" "/" ")", make_ref "," "," "") - in - let out_alias n = - match style with - | HTML -> - print_endline ("\"" ^ n ^ "\" alias of \"cic:" ^ - fst (make_uris ()) ^ "\"

") - | PG -> - print_endline ("cic:/" ^ fst (make_uris ()) ^ "\t" ^ n) - | RDF -> - let uris = make_uris () in - let dir = ! build ^ fst (split_filename name) in - let rc = Sys.command ("mkdir -p " ^ esc dir) in - let och = open_out (! build ^ snd uris ^ ".xml") in - output_string och "\n\n"; - output_string och "\n"; - output_string och (" \n"); - output_string och (" " ^ n ^ "\n"); - output_string och " \n"; - output_string och "\n"; - close_out och; -(* print_endline ("\"" ^ fst uris ^ "\" alias \"" ^ n ^ "\"") -*) in - let rec ins_aux h = - match X.xnext h with - | h, (T.XML_Done, _) -> h - | h, (T.XML_Attribute ("name", n), i) -> - if i = 4 then begin incr maior; minor := -1; out_alias (uq n) end else - if i = 5 then out_alias (uq n); - ins_aux h - | h, _ -> ins_aux h - in - let split = snd (split_filename name) in - if snd split <> "ind" then out_alias (fst split) else - let h = X.start (Filename.concat ! lib (name ^ ".xml")) filter in - X.stop (ins_aux h); - flush stdout - -let test s name filter = - if s = "con-info" then ins0 name filter else - if s = "html-names" then ins1 HTML name filter else - if s = "pg-names" then ins1 PG name filter else - if s = "rdf-names" then ins1 RDF name filter else () - -let read_index_txt () = - let uris = ref [] in - let ich = open_in (Filename.concat ! lib "index.txt") in - let rec aux () = - let line = input_line ich in - let p0 = succ (String.index line '/') in - let p1 = succ (String.rindex line '.') in - let uri = String.sub line p0 (p1 - p0) in - let ext = String.sub line p1 (String.length line - p1) in - match ext with - | "con gz" -> uris := (uri ^ "con", true) :: ! uris; aux () - | "ind gz" -> uris := (uri ^ "ind", true) :: ! uris; aux () - | "var gz" -> uris := (uri ^ "var", true) :: ! uris; aux () - | "con" -> uris := (uri ^ "con", false) :: ! uris; aux () - | "ind" -> uris := (uri ^ "ind", false) :: ! uris; aux () - | "var" -> uris := (uri ^ "var", false) :: ! uris; aux () - | _ -> aux () - in - begin try aux () with End_of_file -> close_in ich end; ! uris - -let read_xml s = - let l = read_index_txt () in - let rec loop_on = function - | [] -> () - | (uri, filter) :: tail -> test s uri filter; loop_on tail - in loop_on l; - prerr_endline ("total time: " ^ string_of_float (Sys.time ()) ^ " seconds") -(* -let get_timing () = - let lexbuf = Lexing.from_channel stdin in - let tm = ref [] in - let cont = ref true in - while ! cont do - let data = Parser.tm Lexer.tmt lexbuf in - if fst data > 0. then begin - let d = (fst data, snd data, snd data /. fst data) in - tm := d :: ! tm end else - if fst data < 0. then cont := false else - print_endline ("[" ^ string_of_int (1 + List.length ! tm) ^ "] "); - done; print_newline (); ! tm - -let compare1 (r1, t1, p1) (r2, t2, p2) = - if r1 > r2 then 1 else - if r1 < r2 then -1 else - if p1 > p2 then 1 else - if p1 < p2 then -1 else 0 - -let rec count min max = function - | [] -> 0 - | (r, _, _) :: tail -> - let p = count min max tail in - if r >= min && r <= max then succ p else p - -let mean min max l = - let num = ref 0. in - let sum = ref 0. in - let rec mean_aux = function - | [] -> ! sum /. ! num - | (r, _, p) :: tail -> - if r >= min && r <= max then begin - num := ! num +. 1.; sum := ! sum +. p; mean_aux tail end - else mean_aux tail - in mean_aux l - -let variance min max m l = - let num = ref 0. in - let sum = ref 0. in - let rec variance_aux = function - | [] -> ! sum /. ! num - | (r, _, p) :: tail -> - if r >= min && r <= max then begin - num := ! num +. 1.; sum := ! sum +. (p -. m) *. (p -. m); - variance_aux tail end - else variance_aux tail - in sqrt (variance_aux l) - -let read_timing min max = - let l = List.sort compare1 (get_timing ()) in - let c = count min max l in - let m = mean min max l in - let v = variance min max m l in - print_timing l; - print_endline (string_of_int c ^ " " ^ string_of_float m ^ " " ^ - string_of_float v); - flush stdout - -let diff_timing () = - let rec diff_aux = function - | ((r1, q1, p1) :: t1, (r2, q2, p2) :: t2) when r1 = r2 -> - (r1, q1 -. q2, p1 -. p2) :: diff_aux (t1, t2) - | ([], []) -> print_newline (); [] - | (_ :: t1, _ :: t2) -> - print_string ("[" ^ string_of_int (1 + List.length t1) ^ "] "); - diff_aux (t1, t2) - | _ -> assert false - in - let l1 = get_timing () in - let l2 = get_timing () in - print_string (string_of_int (List.length l1) ^ " "); - print_string (string_of_int (List.length l2) ^ "\n"); - diff_aux (l1, l2) - -let comp_timing min max = - let l = List.sort compare1 (diff_timing ()) in - let c = count min max l in - let m = mean min max l in - let v = variance min max m l in - print_timing l; - print_endline (string_of_int c ^ " " ^ string_of_float m ^ " " ^ - string_of_float v); - flush stdout - -let print file = - let rec print_aux () = - let xobj = Xml.xnext() in - if fst xobj = XML_Done then () else - begin print_endline (string_of_xobject xobj); print_aux () end - in Xml.start file false; print_aux (); Xml.stop () - -let count_bytes s = - let mbytes = ref 0.0 in - let num = ref 0 in - let k = 1024.0 ** float (int_of_string s) in - let rec count_bytes_aux () = - try - let s = read_line () in - (* prerr_endline ("*" ^ s ^ "*"); *) - let j = String.rindex s ' ' in - let i = - try succ (String.rindex_from s (pred j) ' ') - with Not_found -> 0 in - (* prerr_endline ("*" ^ String.sub s i (j - i) ^ "*"); *) - let b = int_of_string (String.sub s i (j - i)) in - mbytes := ! mbytes +. float b /. k; incr num; - count_bytes_aux () - with End_of_file -> () - in - count_bytes_aux (); - prerr_endline (string_of_int ! num ^ " " ^ string_of_float ! mbytes) -*) - -let _ = - let usage = "Usage: hxp [-lx

] [-p ]" in - - let _l = " set the path to the index.txt file (default is .)" in - let _x = " set the path to the RDF export directory (default is EXPORT)" in - let _r = " read the XML files extracting the specified information - : con-info produce information about .con files in HTML format - html-names produce short names' list in HTML format - pg-names produce short names' list in Postgres input format - rdf-names produce RDF files with short names' metadata" - in - - Arg.parse [ - ("-l", Arg.String (fun dir -> lib := dir), _l); - ("-x", Arg.String (fun dir -> build := dir), _x); - ("-r", Arg.String read_xml, _r) - ] ignore usage - -(* -let parse_args () = - let rec parse = function - | [] -> () - | ("-l"|"-library") :: dir :: rem -> lib := dir; parse rem - | ("-x"|"-export") :: dir :: rem -> build := dir; parse rem - | ("-s"|"-stat") :: min :: max :: rem -> - read_timing (float_of_string min) (float_of_string max); parse rem - | ("-c"|"-comp") :: min :: max :: rem -> - comp_timing (float_of_string min) (float_of_string max); parse rem - | ("-i"|"-ins") :: s :: file :: rem -> test s file false; parse rem - | ("-t"|"-text") :: s :: rem -> read_xml s false; parse rem - | ("-z"|"-gzip") :: s :: rem -> read_xml s true; parse rem - | ("-b"|"-bytes") :: s :: rem -> count_bytes s; parse rem - | _ :: rem -> parse rem - in - parse (List.tl (Array.to_list Sys.argv)) -*) diff --git a/helm/hxp/hxpTypes.ml b/helm/hxp/hxpTypes.ml deleted file mode 100644 index fb8cfeceb..000000000 --- a/helm/hxp/hxpTypes.ml +++ /dev/null @@ -1,57 +0,0 @@ -(* Copyright (C) 2000, HELM Team. - * - * This file is part of HELM, an Hypertextual, Electronic - * Library of Mathematics, developed at the Computer Science - * Department, University of Bologna, Italy. - * - * HELM is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * HELM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with HELM; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. - * - * For details, see the HELM World-Wide-Web page, - * http://www.cs.unibo.it/helm/. - *) - -(* AUTOR: Ferruccio Guidi - *) - -type xml_object = - | XML_Open of string - | XML_Attribute of string * string - | XML_Close of string - | XML_End - | XML_Done - -type xml_xobject = xml_object * int - -type timing = float * float * float - -let string_of_object = function - | XML_Open t -> "OPEN " ^ t - | XML_Close t -> "CLOSE " ^ t - | XML_Attribute (n, v) -> "ATTRIBUTE " ^ n ^ "=" ^ v - | XML_End -> "END" - | XML_Done -> "" - -let string_of_xobject (o, i) = - string_of_object o ^ " [" ^ string_of_int i ^ "]" - -let string_of_timing (r, t, p) = - string_of_float r ^ "," ^ string_of_float t ^ "s, " ^ string_of_float p - -let rec print_timing = function - | [] -> () - | head :: tail -> - print_endline (string_of_timing head); flush stdout; - print_timing tail diff --git a/helm/hxp/hxpXML.ml b/helm/hxp/hxpXML.ml deleted file mode 100644 index 7c4dc4cb4..000000000 --- a/helm/hxp/hxpXML.ml +++ /dev/null @@ -1,91 +0,0 @@ -(* Copyright (C) 2000, HELM Team. - * - * This file is part of HELM, an Hypertextual, Electronic - * Library of Mathematics, developed at the Computer Science - * Department, University of Bologna, Italy. - * - * HELM is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * HELM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with HELM; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. - * - * For details, see the HELM World-Wide-Web page, - * http://www.cs.unibo.it/helm/. - *) - -(* AUTOR: Ferruccio Guidi - *) - -module T = HxpTypes - -module type Type = sig - - type handle - - val start : string -> bool -> handle - - val stop : handle -> unit - - val next : handle -> T.xml_object - - val xnext : handle -> handle * T.xml_xobject - - val scan_for : handle -> T.xml_xobject -> handle - -end - -module Make : Type = struct - - module L = HxpLexer - - module P = HxpParser - - type mode_t = Text of in_channel * Lexing.lexbuf - | GZip of Gzip.in_channel * Lexing.lexbuf - - type handle = {mode : mode_t; level : int} - - let start s filter = - let gread gch s n = Gzip.input gch s 0 n in - if filter then - let gch = Gzip.open_in (s ^ ".gz") in - let glb = Lexing.from_function (gread gch) in - {mode = GZip (gch, glb); level = 0} - else - let ch = open_in s in - let lb = Lexing.from_channel ch in - {mode = Text (ch, lb); level = 0} - - let stop = function - | {mode = GZip (gch, _)} -> Gzip.close_in gch - | {mode = Text (ch, _)} -> close_in ch - - let next h = - let lexbuf = match h.mode with - | GZip (_, glb) -> glb - | Text (_, lb) -> lb - in - P.xml L.xml_token lexbuf - - let xnext h = - let obj = next h in - match obj with - | T.XML_Open _ -> {h with level = succ h.level}, (obj, h.level) - | T.XML_Close _ -> {h with level = pred h.level}, (obj, pred h.level) - | _ -> h, (obj, h.level) - - let rec scan_for h xobj = - let h, curr_xobj = xnext h in - if curr_xobj = xobj then h else scan_for h xobj - -end diff --git a/helm/hxsp/config b/helm/hxsp/config deleted file mode 100644 index 87cd74d8a..000000000 --- a/helm/hxsp/config +++ /dev/null @@ -1,47 +0,0 @@ -######################################################################## -######################################################################## -# -# Main config file for hxsp -# Author: Alessandro Barzanti (barzu@libero.it) -# -######################################################################## -######################################################################## - -######################################################################## -# Working path of hxsp -######################################################################## -#working_path = helm/puwobo -working_path = helm/uwobo -#working_path = helm/hxsp - -######################################################################## -# Port to use for hxsp -######################################################################## -port = 8080 - -######################################################################## -# Interface language -######################################################################## -language = IT -#language = EN - -######################################################################## -# Use complete command description on syntax error if ON -######################################################################## -all_usage_synerr = OFF -#all_usage_synerr = ON - -######################################################################## -# Include XIncludes on the fly if ON -######################################################################## -expand_xinc = OFF -#expand_xinc = ON - -######################################################################## -# Max Depth of the DOM tree while parsing -######################################################################## -max_depth = 1000 - -######################################################################## -######################################################################## -######################################################################## diff --git a/helm/hxsp/hxsp.pl b/helm/hxsp/hxsp.pl deleted file mode 100644 index 14fd24361..000000000 --- a/helm/hxsp/hxsp.pl +++ /dev/null @@ -1,1250 +0,0 @@ -#!/usr/bin/perl - -################################################################################################# -################################################################################################# -################################################################################################# -# -# H.X.S.P. V 1.0 -# T S T R -# T L Y O -# P T E C -# S E -# H S -# E S -# E O -# T R -# -################################################################################################# -################################################################################################# -################################################################################################# - -use HTTP::Daemon; -use HTTP::Status; -use HTTP::Request; -use LWP::UserAgent; -use URI::Escape; -use CGI; -use FindBin; -use XML::LibXML; -use XML::LibXSLT; -use IO; - -################################################################################################# -################################################################################################# -################################################################################################# -# Global Variables -################################################################################################# -################################################################################################# -################################################################################################# - -# Version number -my $ver ="1.0"; - -# Working path of hxsp (loaded from config) -my $working_path; - -# Interface language (loaded from config) -my $language; - -# Port to use for hxsp (loaded from config) -my $port; - -# Use complete command description on syntax error if ON (loaded from config) -my $all_usage_synerr; - -# Include XIncludes on the fly if ON (loaded from config) -my $expand_xinc; - -# Max Depth of the DOM tree while parsing -my $max_depth; - -# Message sent when hxsp was called without commands (loaded from message.##) -my $home_message; - -# Message sent when hxsp was called with the help command (loaded from message.##) -my $help_message; - -# Message sent when a stylesheet is added (loaded from message.##) -my $s_add; - -# Message sent when a stylesheet is reloaded (loaded from message.##) -my $s_reload; - -# Message sent when a stylesheet is removed (loaded from message.##) -my $s_remove; - -# Message to print the stylesheet status for list command (loaded from message.##) -my $list; - -# Message sent when the list command was called -# and there is no stylesheet loaded (loaded from message.##) -my $empty; - -# Message sent after "home_message" when hxsp was called without commands -# and sent after "help_message" when hxsp was called with the help command -# and after all syntax errors if "all_usage_synerr" is set ON (loaded from message.##) -my $all_usage; - -# All the following syntax errors messages are used #only# if "all_usage_synerr" is set OFF - -# Message sent on help syntax errors (loaded from message.##) -my $help_usage; - -# Message sent on add syntax errors (loaded from message.##) -my $add_usage; - -# Message sent on remove syntax errors (loaded from message.##) -my $remove_usage; - -# Message sent on list syntax errors (loaded from message.##) -my $list_usage; - -# Message sent on reload syntax errors (loaded from message.##) -my $reload_usage; - -# Message sent on apply syntax errors (loaded from message.##) -my $apply_usage; - -# The error hash contains the error messages to call in case of syntax -# or operative errors, the keys are defined by the left value of each line in error## -my %error; - -# load ok template -my $ok_tpl; - -# load operror template -my $operror_tpl; - -# load synerror template -my $synerror_tpl; - -# This is the data structure to store the loaded stylesheets (hash of array) -# [0] :Styleseet URI , [1] : Loaded styleseet -my %stylesheet_hash; - -# This is a hash for fast duplicate uri detection -my %by_name; - -################################################################################################# -################################################################################################# -################################################################################################# -# Starting Operations -################################################################################################# -################################################################################################# -################################################################################################# - -# chdir to the directory of this perl script -chdir $FindBin::Bin; - -# load CONFIG -load_conf(); - -# initialize the objects to use LibXML and LibXSLT -my $parser = XML::LibXML->new(); -my $xslt = XML::LibXSLT->new(); - -# initialize the LibXML callbacks to load uri's -XML::LibXML->callbacks(\&match_uri,\&open_uri,\&read_uri,\&close_uri); - -# include XIncludes on the fly if required -if ($expand_xinc eq "ON") { $parser->expand_xinclude( 1 ); } - -# initialize the hxsp as HTTP::Daemon -my $d = new HTTP::Daemon LocalPort => $port; - -# get the complete working url of hxsp -my $puwobo_url = $d->url().$working_path; - -# set the working path to be comparable with url->path -$working_path = "/". $working_path; - -# load messages -load_messages(); - -# load error -load_err(); - -# load templates -load_templates(); - -# print starting information on console -print qq{ -hxsp v$ver active at: - Language is $language - On syntax error usage of every command is $all_usage_synerr - Include XIncludes on the fly is $expand_xinc; -}; - -################################################################################################# -################################################################################################# -# HTTP::Daemon Operations -################################################################################################# -################################################################################################# - -# do not accumulate defunct processes -$SIG{CHLD} = "IGNORE"; -$SIG{USR1} = \&listen; # sent by the child to make the parent read the pipe - -pipe LIST_CHILD, TELL_PARENT; -pipe LIST_PARENT, TELL_CHILD; -TELL_PARENT->autoflush(1); -TELL_CHILD->autoflush(1); - - -sub listen { - my $res; - my $query = ; - if ($query =~ /^add /) { - $query =~ s/^add //; - chomp($query); - $res = add($query); - } - elsif ($query =~ /^reload /) { - $query =~ s/^reload //; - chomp($query); - $res = reload($query); - } - elsif ($query =~ /^remove /) { - $query =~ s/^remove //; - chomp($query); - $res = remove($query); - } - print TELL_CHILD "$res\n"; - print TELL_CHILD "____\n"; # end of response -} - -while (my $c = $d->accept) #connect -{ - if (fork() == 0) #start new concurrent process - { - while (my $r = $c->get_request) #get http request - { - if ($r->method eq 'GET' && - ($r->url->path eq $working_path or $r->url->path eq $working_path."/"))#start dir - { - my $response = new HTTP::Response; - $response->header('Cache-Control' => 'no-cache','Pragma' => "no-cache",'Expires' => '0'); - $response->content(home($r->url->query)); - $c->send_response($response); - } - elsif ($r->method eq 'GET' && $r->url->path eq $working_path."/help")#usage - { - my $response = new HTTP::Response; - $response->header('Cache-Control' => 'no-cache','Pragma' => "no-cache",'Expires' => '0'); - $response->content(help($r->url->query)); - $c->send_response($response); - } - elsif ($r->method eq 'GET' && $r->url->path eq $working_path."/add")#add - { - my $response = new HTTP::Response; - kill(USR1,getppid()); # ask the parent to read the pipe - my $qs = $r->url->query; - print TELL_PARENT "add $qs\n"; - my $in; - while (($in = ) ne "____\n") { - $res .= $in; - } - chomp($res); - $response->header('Cache-Control' => 'no-cache','Pragma' => "no-cache",'Expires' => '0'); - $response->content($res); - $c->send_response($response); - } - elsif ($r->method eq 'GET' && $r->url->path eq $working_path."/remove")#remove - { - my $response = new HTTP::Response; - kill(USR1,getppid()); # ask the parent to read the pipe - my $qs = $r->url->query; - print TELL_PARENT "remove $qs\n"; - my $in; - my $res=""; - while (($in = ) ne "____\n") { - $res .= $in; - } - chomp($res); - $response->content($res); - $response->header('Cache-Control' => 'no-cache','Pragma' => "no-cache",'Expires' => '0'); - $c->send_response($response); - } - elsif ($r->method eq 'GET' && $r->url->path eq $working_path."/reload")#reload - { - my $response = new HTTP::Response; - kill(USR1,getppid()); # ask the parent to read the pipe - my $qs = $r->url->query; - print TELL_PARENT "reload $qs\n"; - my $in; - my $res=""; - while (($in = ) ne "____\n") { - $res .= $in; - } - chomp($res); - $response->content($res); - $response->header('Cache-Control' => 'no-cache','Pragma' => "no-cache",'Expires' => '0'); - $c->send_response($response); - } - elsif ($r->method eq 'GET' && $r->url->path eq $working_path."/list")#list - { - my $response = new HTTP::Response; - $response->header('Cache-Control' => 'no-cache','Pragma' => "no-cache",'Expires' => '0'); - $response->content(list($r->url->query)); - $c->send_response($response); - } - elsif ($r->method eq 'GET' && $r->url->path eq $working_path."/apply")#apply - { - my %headers; - my $response = new HTTP::Response; - $response->content(apply($r->url->query,\%headers)); - $response->header(%headers); - $c->send_response($response); - } - else #wrong command or not working_path - { - $c->send_error(RC_FORBIDDEN) - } - } - $c->close; - undef($c); - exit; - } # fork -} - -################################################################################################# -################################################################################################# -################################################################################################# -# Stylesheet hash check subrutines -################################################################################################# -################################################################################################# -################################################################################################# - -################################################################################################# -# sub addcheckvalues -# Usage: addcheckvalues($key,$uri); -# Returns: error message or 0 if no errors found -# Do: check if key and uri are already loaded -# Used by: addvalues -# Uses : err_replace -################################################################################################# -sub addcheckvalues -{ - my $ac_key = shift(@_); - my $ac_uri = shift(@_); - if (exists $stylesheet_hash{$ac_key}) - { - return err_replace($error{"add_dup_key"},$ac_key,$ac_uri,""); - } - elsif (exists $by_name{$ac_uri}) - { - return err_replace($error{"add_dup_value"},$ac_key,$ac_uri,$by_name{$ac_key}); - } - else { return 0; } -} -################################################################################################# - -################################################################################################# -# sub recheckvalues -# Usage: recheckvalues($key); -# Returns: error message or 0 if no errors found -# Do: check if key are loaded -# Used by: remove, reloadvalues -# Uses : err_replace -################################################################################################# -sub recheckvalues -{ - my $re_key = shift(@_); - if (not exists $stylesheet_hash{$re_key}) - { - return err_replace($error{"re_inv_key"},$re_key,"",""); - } - else { return 0; } -} -################################################################################################# - -################################################################################################# -# sub applycheckvalues -# Usage: applycheckvalues(\@keys); -# Returns: error message or 0 if no errors found -# Do: check if keys in @keys are loaded -# Used by: remove, reloadvalues -# Uses : err_replace -################################################################################################# -sub applycheckvalues -{ - my $applykeys_ptr = shift(@_); - foreach $applykey (@$applykeys_ptr) - { - if (not exists $stylesheet_hash{$applykey}) - { - return err_replace($error{"apply_inv_key"},$applykey,"",""); - } - } - return 0; -} -################################################################################################# - -################################################################################################# -################################################################################################# -################################################################################################# -# Stylesheet hash modify subrutines -################################################################################################# -################################################################################################# -################################################################################################# - -################################################################################################# -# sub addvalues -# Usage: if add_halt_on_errors is ON addvalues($key,$uri,@added); -# else addvalues($key,$uri) -# Returns: error message or 0 on success, -# if add_halt_on_errors is ON return all the added keys on @added -# Do: add the values to the stylesheet hash -# Used by: add -# Uses : addcheckvalues, loadstyle -################################################################################################# -sub addvalues -{ - my $av_key = shift(@_); - my $av_uri = shift(@_); - my $av_stylesheet; #parsed stylesheet to be placed in hash - if (my $err = addcheckvalues($av_key,$av_uri)) { return $err; } - elsif (my $err = loadstyle($av_key, $av_uri, $av_stylesheet)) { return $err; } - else - { - $stylesheet_hash{$av_key}[0]=$av_uri; - $stylesheet_hash{$av_key}[1]=$av_stylesheet; - $by_name{$av_uri}=$av_key; - return 0; - } -} -################################################################################################# - -################################################################################################# -# sub removevalues -# Usage: removevalues($key); -# Returns: message -# Do: remove the key specified and relative values from the stylesheet hash -# Used by: remove, do_remove -# Uses : ok_replace -################################################################################################# -sub removevalues -{ - my $cr_key = shift(@_); - my $cr_uri = $stylesheet_hash{$cr_key}[0]; - delete $stylesheet_hash{$cr_key}; - delete $by_name{$cr_uri}; - return ok_replace("$s_remove\n",$cr_key,$cr_uri); -} -################################################################################################# - -################################################################################################# -# sub reloadvalues -# Usage: if add_halt_on_errors is ON reloadvalues($key.\%reloaded); -# else reloadvalues($key); -# Returns: error message or 0 on success, -# if add_halt_on_errors is ON return the old stylesheets in %reloaded -# Do: reload the stlylesheet with the key specified -# Used by: do_reload -# Uses : recheckvalues, loadstyle -################################################################################################# -sub reloadvalues -{ - my $rv_key = shift(@_); - my $rv_uri = $stylesheet_hash{$rv_key}[0]; - my $rv_stylesheet; #parsed stylesheet to be placed in hash - if (my $err = recheckvalues($rv_key)) { return $err; } - elsif (my $err = loadstyle($rv_key, $rv_uri, $rv_stylesheet)) { return $err; } - else - { - $stylesheet_hash{$rv_key}[1] = $rv_stylesheet; - return 0; - } -} -################################################################################################# - -################################################################################################# -################################################################################################# -################################################################################################# -# LibXML LIBXSLT access subrutines -################################################################################################# -################################################################################################# -################################################################################################# - -################################################################################################# -# sub loadstyle -# Usage: loadstyle($key,$uri,$stylesheet); -# Returns: error message or 0 on success, -# parsed stylesheet in $stylesheet -# Do: parse the stylesheet at the given uri -# Used by: addvalues , reloadvalues -# Uses : err_replace, parser_error_replace -################################################################################################# -sub loadstyle -{ - my $ls_key= shift(@_); - my $ls_uri= shift(@_); - my $uncatched = ""; - my $line = ""; - my $style_doc; - pipe P, STDERR; - STDERR->autoflush(1); - eval { $style_doc = $parser->parse_file($ls_uri); }; - print STDERR "____\n"; - while(($line =

) ne "____\n") { $uncatched .= $line; } - close P; - - if ($@ or $uncatched ne "") - { - return err_replace($error{"add_xml_error"},$ls_key,$ls_uri,parser_error_replace($@.$uncatched)); - } - else - { - pipe P, STDERR; - STDERR->autoflush(1); - $uncatched = ""; - $line = ""; - eval { $_[0] = $xslt->parse_stylesheet($style_doc); }; - print STDERR "____\n"; - while(($line =

) ne "____\n") { $uncatched .= $line; } - close P; - if ($@ or $uncatched ne "") - { - return err_replace($error{"add_xslt_error"},$ls_key,$ls_uri,parser_error_replace($@.$uncatched)); - } - else {return 0} - } -} - -sub load_xml_doc -{ - my $xmluri = shift(@_); - my $uncatched = ""; - my $line = ""; - pipe P, STDERR; - STDERR->autoflush(1); - eval { $_[0] = $parser->parse_file($xmluri); }; - print STDERR "____\n"; - while(($line =

) ne "____\n") { $uncatched .= $line; } - close P; - if ($@ or $uncatched ne "") - { - return err_replace($error{"apply_xml_error"},"",$xmluri,parser_error_replace($@.$uncatched)); - } - else {return 0} -} - -sub apply_style -{ - my $k = shift(@_); - my $params_ptr = shift(@_); - my %params = XML::LibXSLT::xpath_to_string(%$params_ptr); - my $pippo; - my $uncatched = ""; - my $line = ""; - pipe P, STDERR; - STDERR->autoflush(1); - XML::LibXSLT->max_depth($max_depth); - eval { $_[0] = $stylesheet_hash{$k}[1]->transform($_[0],%params); }; - print STDERR "____\n"; - while(($line =

) ne "____\n") { $uncatched .= $line; } - close P; - if ($@ or $uncatched ne "") - { - my $e_r = parser_error_replace($@.$uncatched); - return err_replace($error{"apply_xslt_error"},$k,$stylesheet_hash{$k}[0],$e_r); - } - else {return 0} -} -sub get_results -{ - my $k = shift(@_); - my $results = shift(@_); - my $retval; - my $uncatched = ""; - my $line = ""; - pipe P, STDERR; - STDERR->autoflush(1); - eval { $retval = $stylesheet_hash{$k}[1]->output_string($results); }; - print STDERR "____\n"; - while(($line =

) ne "____\n") { $uncatched .= $line; } - close P; - if ($@ or $uncatched ne "") - { - my $e_r = parser_error_replace($@.$uncatched); - return operror_print(err_replace($error{"apply_xslt_out_error"},"","",$e_r)); - } - else { return $retval; } -} -sub get_results_prop -{ - my $result = shift(@_); - my $retval; - my $uncatched = ""; - my $line = ""; - pipe P, STDERR; - STDERR->autoflush(1); - eval { $retval = $result->toString; }; - print STDERR "____\n"; - while(($line =

) ne "____\n") { $uncatched .= $line; } - close P; - if ($@ or $uncatched ne "") - { - my $e_r = parser_error_replace($@.$uncatched); - return operror_print(err_replace($error{"apply_xslt_out_error"},"","",$e_r)); - } - else { return $retval; } -} - -sub get_results_html -{ - my $result = shift(@_); - my $retval; - my $uncatched = ""; - my $line = ""; - pipe P, STDERR; - STDERR->autoflush(1); - eval { $retval = $result->toStringHTML();}; - print STDERR "____\n"; - while(($line =

) ne "____\n") { $uncatched .= $line; } - close P; - if ($@ or $uncatched ne "") - { - my $e_r = parser_error_replace($@.$uncatched); - return operror_print(err_replace($error{"apply_xslt_out_error"},"","",$e_r)); - } - else { return $retval; } -} - -sub decode -{ - my $result = shift(@_); - my $enc = shift(@_); - my $retval; - my $uncatched = ""; - my $line = ""; - pipe P, STDERR; - STDERR->autoflush(1); - eval { $retval = decodeFromUTF8($enc, $result);}; - print STDERR "____\n"; - while(($line =

) ne "____\n") { $uncatched .= $line; } - close P; - if ($@ or $uncatched ne "") - { - my $e_r = parser_error_replace($@.$uncatched); - return operror_print(err_replace($error{"apply_xslt_out_error"},"","",$e_r)); - } - else { return $retval; } -} -################################################################################################# - -################################################################################################# -################################################################################################# -################################################################################################# -# Commands subrutines -################################################################################################# -################################################################################################# -################################################################################################# - -################################################################################################# -# sub add -# Usage: add($http_query); -# Returns: values for HTTP::Response -# Do: add stylesheet(s) to hash -# Used by: daemon -# Uses : addparsequery, addvalues, ok_replace, -# ok_print, synerror_print, operror_print -################################################################################################# -sub add -{ - my $http_query = shift(@_); # querystring - my $cont =""; # return value - my @binds; #values of binds passed via querystring - my $err; # error string - if ($err = addparsequery($http_query,\@binds)) { return synerror_print($err,$add_usage); } - else - { - foreach my $bind (@binds) - { - my ($a_key , $e_uri) = split(/,/,$bind,2); - my $une_uri = uri_unescape($e_uri); - if ($err = addvalues($a_key,$une_uri)) { $cont .= "$err\n"; } - else { $cont .= ok_replace("$s_add\n",$a_key,$une_uri); } - }#foreach - return ok_print($cont); - } -} -################################################################################################# - -################################################################################################# -# sub remove -# Usage: remove($http_query); -# Returns: values for HTTP::Response -# Do: remove stylesheet(s) from hash -# Used by: daemon -# Uses : reparsequery, getkeys, recheckvalues, removevalues, -# ok_print, synerror_print, operror_print -################################################################################################# -sub remove -{ - my $http_query = shift(@_); # querystring - my $rem_keys; - my $cont=""; - my $err; - if ($http_query eq "") - { - my $i=0; - foreach my $rem_key (keys %stylesheet_hash) - { - $cont .= removevalues($rem_key); - $i++; - } - if ($i==0) { return operror_print($error{"re_no_sl"}); } - } - elsif ($err = reparsequery($http_query,$rem_keys)){return synerror_print($err,$remove_usage);} - else - { - foreach my $rem_key (split (/,/,$rem_keys)) - { - if (my $err = recheckvalues($rem_key)) { $cont .= "$err\n"; } - else { $cont .= removevalues($rem_key); } - } - } - return ok_print($cont); -} -################################################################################################# - -################################################################################################# -# sub reload -# Usage: remove($http_query); -# Returns: values for HTTP::Response -# Do: remove stylesheet(s) from hash -# Used by: daemon -# Uses : reparsequery, getkeys, recheckvalues, removevalues, -# ok_print, synerror_print, operror_print -################################################################################################# -sub reload #reload stylesheet(s) from hash -{ - my $http_query = shift(@_); - my $rel_keys; - my @rel_k; - my $dr_cont = ""; - if ($http_query eq "") - { - my $i=0; - foreach my $key (keys %stylesheet_hash) - { - if (my $err = reloadvalues($key)) { return $dr_cont .= $err; } - else {$dr_cont .= ok_replace("$s_reload\n",$key,$stylesheet_hash{$key}[0]);} - $i++; - } - if ($i==0) { return operror_print($error{"re_no_sl"}); } - } - elsif ($err = reparsequery($http_query,$rel_keys)){return synerror_print($err,$reload_usage);} - else - { - foreach my $key (split (/,/,$rel_keys)) - { - if (my $err = reloadvalues($key)) { return $dr_cont .= $err; } - else {$dr_cont .= ok_replace("$s_reload\n",$key,$stylesheet_hash{$key}[0]);} - } - } - return ok_print($dr_cont); -} -################################################################################################# - -sub apply #apply stylesheets -{ - my $http_query = shift(@_); - my $headers_ptr = shift(@_); - my $xmluri; - my @applykeys; - my %app_param; - my %app_prop; - my $results; - my $lastkey; - my $enc; - - if (my $err=applyparsequery($http_query,\@applykeys,\%app_param,\%app_prop,$xmluri)) - { - return synerror_print($err,$apply_usage); - } - elsif (my $err=applycheckvalues(\@applykeys)) { return operror_print($err); } - elsif (my $err=load_xml_doc($xmluri,$results)) { return operror_print($err); } - #apply - foreach my $applykey (@applykeys) - { - $lastkey=$applykey; - if (my $err=apply_style($applykey,\%{$app_param{$applykey}},$results)) - { - return operror_print($err); - } - }#foreach - my $i=0; - while (my ($n, $v) = each %app_prop) - { - if (($n eq "method") or ($n eq "METHOD")) - { - if ($v eq 'html') { $headers_ptr->{'Content-Type'}='text/html'; } - elsif ($v eq 'text') { $headers_ptr->{'Content-Type'}='text/plain'; } - else { $headers_ptr->{'Content-Type'}='text/xml'; } - } - if (($n eq "encoding") or ($n eq "ENCODING")) - { - $headers_ptr->{'Content-Encoding'}=$v; - if ($v ne "UTF-8") { $enc = $v; } - } - if (($n eq "media-type") or ($n eq "MEDIA_TYPE") or ($n eq "MEDIA-TYPE")) - { - $headers_ptr->{'Content-Type'}=$v; - } - $i++; - } - if ($i == 0) - { - %$headers_ptr= ('Cache-Control' => 'no-cache','Pragma' => "no-cache",'Expires' => '0'); - return get_results($lastkey,$results); - } - else - { - my $result; - $headers_ptr->{'Cache-Control'} = 'no-cache'; - $headers_ptr->{'Pragma'} = "no-cache"; - $headers_ptr->{'Expires'} = '0'; - if ($headers_ptr->{'Content-Type'} eq 'text/html') - { - $result = get_results_html($results); - } - else - { - $result = get_results_prop($results); - if ($enc) - { - $result = decode($result,$enc); - } - } - return $result; - } -} - -sub list #list all the stylesheet loaded -{ - my $cont=""; - my $ind = 0; - foreach $key (keys %stylesheet_hash) - { - $cont .= ok_replace("$list\n",$key,$stylesheet_hash{$key}[0]); - $ind++; - } - if ($ind > 0) { return ok_print($cont); } - else { return ok_print($empty); } -} - -sub home #return Dispay active -{ - if ($_[0] ne "") { return synerror_print($error{"home_qs"},$all_usage); } - else { - return ok_print($home_message.$all_usage); - } -} - -sub help #return html help -{ - if ($_[0] ne "") { return synerror_print($error{"help_qs"},$help_usage); } - return ok_print($help_message.$all_usage); -} - -################################################################################################# -################################################################################################# -# Subrutines to get parameters for commands from Query String (query string parsing) -################################################################################################# -################################################################################################# - -sub add_comma_analysis -{ - my $bind = shift(@_); - my ($l , $r) = split(/,/,$bind,2); - if (index($bind ,",") == -1) { return $error{"add_no_sep"}; } - elsif (index($r ,",") != -1) { return $error{"add_many_sep"}; } - elsif (($l eq "") or ($r eq "")) { return $error{"add_null_bind"}; } - else { return 0; } -} -## -#usage: -#addparsequery($querystring,\@binds) -#returns $errcode; -sub addparsequery -{ - my $query = shift(@_); - my $value_ptr = shift(@_); - if ($query eq "") { return $error{"add_no_bind"}; } - else - { - foreach my $params (split(/&/,$query)) - { - my ($k , $v) = split(/=/,$params,2); - $v=uri_unescape($v); - if ($k ne "bind") { return $error{"add_oth"}; } - elsif ($v eq "") { return $error{"add_null_bind"}; } - elsif (my $err=add_comma_analysis($v)) { return $err; } - else { push @$value_ptr,$v;} - }#foreach - return 0; - } -} - -sub reparsequery -{ - my $query = shift(@_); - my $k; - my $v; - my $err; - if (index($query, "&") == -1) - { - ($k , $v) = split(/=/,$query,2); - $v=uri_unescape($v); - if ($k ne "keys") { return $error{"re_oth"}; } - elsif ($v eq "") { return $error{"re_null_keys"}; } - elsif ((index($v,",")==0) or (index($v,",,")!=-1) or (substr($v,-1) eq ",")) - { - return $error{"re_null_keys"}; - } - else { $_[0] = $v; return 0; } - } - else { return $error{"re_many"}; } -} - -sub get_req -{ - my $arr_ptr = shift(@_); - my $xmluri_found = 0; - my $keys_found = 0; - foreach my $el (@$arr_ptr) - { - my ($k , $v) = split(/=/,$el,2); - $v=uri_unescape($v); - if ($k eq "param") { return $error{"apply_no_dots_param"}; } - elsif ($k eq "prop") { return $error{"apply_no_dots_prop"}; } - elsif ($k eq "xmluri") - { - if ($xmluri_found) { return $error{"apply_many_uri"}; } - else - { - if ($v eq "") { return $error{"apply_null_uri"}; } - else { $_[0] = $v; $xmluri_found = 1; } - } - } - elsif ($k eq "keys") - { - if ($keys_found) { return $error{"apply_many_keys"}; } - else - { - if ($v eq "") { return $error{"apply_null_keys"}; } - elsif ((index($v,",")==0) or (index($v,",,")!=-1) or (substr($v,-1) eq ",")) - { - return $error{"apply_null_keys"}; - } - else { $_[1] = $v; $keys_found = 1; } - } - } - else { return $error{"apply_oth"}; } - }#foreach my $el (@$arr_ptr) - if ((!$xmluri_found or !$keys_found)) { return $error{"apply_few_pars"}; } - else { return 0; } -} - -sub applyparsequery -{ - my $query = shift(@_); - my $apply_keys_ptr = shift(@_); - my $keyparshoh = shift(@_); - my $proph_ptr = shift(@_); - my $applykeys; - my %prop_h; - my %genparam_h; - my %keyparam_h; - my @nodots; - - if ($query eq "") { return $error{"apply_few_pars"}; } - if (index($query, "&") == -1) { return $error{"apply_few_pars"}; } - foreach my $param (split(/&/,$query)) - { - my ($k , $v) = split(/=/,$param,2); - $v=uri_unescape($v); - if (index($k, ".") == -1) { push @nodots,$param; } - else - { - my ($l , $r) = split(/\./,$k,2); - if ($l eq "prop") - { - if (($r eq "") or ($v eq "")) { return $error{"apply_null_prop"}; } - elsif (index($r, ".") > -1) { return $error{"apply_dots_prop"}; } - else { $prop_h{$r} = $v; } - } - elsif ($l eq "param") - { - if (($r eq "") or ($v eq "")) { return $error{"apply_null_param"}; } - elsif (index($r, ".") == -1) { $genparam_h{$r} = $v; } - else - { - my ($kk , $va) = split(/\./,$r,2); - if (index($va, ".") > -1) { return $error{"apply_dots_param"}; } - elsif (($kk eq "") or ($va eq "")) { return $error{"apply_null_param"}; } - else { $keyparam_h{$kk}{$va}=$v; } - } - } - else { return $error{"apply_oth"}; } - } - } - - if (my $err = get_req(\@nodots,$_[0],$applykeys)) { return $err; } - while (my ($gn, $gv) = each %prop_h) - { - $proph_ptr->{$gn} = $gv; - } - foreach my $pkey ( keys %keyparam_h ) - { - my $k_found=0; - foreach my $verkey (split (/,/,$applykeys)) - { - if ($pkey eq $verkey) { $k_found = 1; } - } - if (! $k_found) { return $error{"apply_inv_param"}; } - } - - foreach my $applykey (split (/,/,$applykeys)) - { - while (my ($gn, $gv) = each %genparam_h) - { - $keyparshoh->{$applykey}{$gn} = $gv; - } - while (my ($kn, $kv) = each %{ $keyparam_h{$applykey} } ) - { - $keyparshoh->{$applykey}{$kn} = $kv; - } - push @$apply_keys_ptr, $applykey; - }#foreach - return 0; -} - -################################################################################################# -################################################################################################# -################################################################################################# -# Subrutines to replace values between {} on loaded templates -################################################################################################# -################################################################################################# -################################################################################################# - -sub ok_print -{ - my $message = shift(@_); - $message =~ s/(\n)/
\1/g; - my $retval = $ok_tpl; - $retval =~ s/\{MESSAGE\}/$message/g; - return $retval; -} - -sub operror_print -{ - my $message = shift(@_); - $message =~ s/(\n)/
\1/g; - my $retval = $operror_tpl; - $retval =~ s/\{ERROR\}/$message/g; - return $retval; -} - -sub synerror_print -{ - my $message = shift(@_); - my $us = shift(@_); - $message =~ s/(\n)/
\1/g; - my $retval = $synerror_tpl; - $retval =~ s/\{ERROR\}/$message/g; - $retval =~ s/\{USAGE\}/$us/g; - return $retval; -} - -################################################################################################# -################################################################################################# -################################################################################################# -# Subrutines to replace values between {} on loaded messages -################################################################################################# -################################################################################################# -################################################################################################# - -sub ok_replace -{ - my $message = shift(@_); - my $key = shift(@_); - my $s_uri = shift(@_); - $message =~ s/\{KEY\}/$key/g; - $message =~ s/\{URI\}/$s_uri/g; - return $message; -} - -sub err_replace -{ - my $message = shift(@_); - my $key = shift(@_); - my $s_uri = shift(@_); - my $errr = shift(@_); - $message =~ s/\{KEY\}/$key/g; - $message =~ s/\{URI\}/$s_uri/g; - $message =~ s/\{ERROR\}/$errr/g; - $message =~ s/\{OLDKEY\}/$errr/g; - return $message; -} - -sub parser_error_replace -{ - my $no_at = shift(@_); - $no_at =~ s/(.*)\sat\s(.*)/\1/g; - $no_at =~ s//>/g; - return $no_at; -} - -################################################################################################# -################################################################################################# -################################################################################################# -# Subrutines to load config files and templates -################################################################################################# -################################################################################################# -################################################################################################# - -sub load_messages -{ - if ($language eq "IT") - { - open(MESSAGE, "./msg/message.it") || die "Can't open config file '/msg/message.it' : $!"; - } - else - { - open(MESSAGE, "./msg/message.en") || die "Can't open config file '/msg/message.en' : $!"; - } - while(my $line = ) { - # ignore comments and full line comments - $line =~ s/#.*$//; - next unless $line =~ /\S/; - $line =~ s/\{URL\}/$puwobo_url/g; - $line =~ s/\{VER\}/$ver/g; - if ($line =~ /^(home_message)\s*=\s*(.*)$/) {$home_message = $2; } - if ($line =~ /^(help_message)\s*=\s*(.*)$/) {$help_message = $2; } - if ($line =~ /^(s_add)\s*=\s*(.*)$/) {$s_add = $2; } - if ($line =~ /^(s_reload)\s*=\s*(.*)$/) {$s_reload = $2; } - if ($line =~ /^(s_remove)\s*=\s*(.*)$/) {$s_remove = $2; } - if ($line =~ /^(list)\s*=\s*(.*)$/) {$list = $2; } - if ($line =~ /^(empty)\s*=\s*(.*)$/) {$empty = $2; } - if ($line =~ /^(all_usage)\s*=\s*(.*)$/) {$all_usage = $2; } - if ($all_usage_synerr eq "ON") - { - $help_usage=$add_usage=$remove_usage=$list_usage=$reload_usage=$apply_usage=$all_usage; - } - else - { - if ($line =~ /^(help_usage)\s*=\s*(.*)$/) {$help_usage = $2; } - if ($line =~ /^(add_usage)\s*=\s*(.*)$/) {$add_usage = $2; } - if ($line =~ /^(remove_usage)\s*=\s*(.*)$/) {$remove_usage = $2; } - if ($line =~ /^(list_usage)\s*=\s*(.*)$/) {$list_usage = $2; } - if ($line =~ /^(reload_usage)\s*=\s*(.*)$/) {$reload_usage = $2; } - if ($line =~ /^(apply_usage)\s*=\s*(.*)$/) {$apply_usage = $2; } - } - } - close MESSAGE; -} - -sub load_conf -{ - open(CONFIG, "./config") || die "Can't open config file 'config' : $!"; - while(my $line = ) { - # ignore comments and full line comments - $line =~ s/#.*$//; - next unless $line =~ /\S/; - if ($line =~ /^(working_path)\s*=\s*(.*)$/) {$working_path = $2; } - if ($line =~ /^(language)\s*=\s*(.*)$/) {$language = $2; } - if ($line =~ /^(port)\s*=\s*(.*)$/) {$port = $2; } - if ($line =~ /^(all_usage_synerr)\s*=\s*(.*)$/) {$all_usage_synerr = $2; } - if ($line =~ /^(expand_xinc)\s*=\s*(.*)$/) {$expand_xinc = $2; } - if ($line =~ /^(max_depth)\s*=\s*(.*)$/) {$max_depth = $2; } - } - close CONFIG; -} - -sub load_err -{ - if ($language eq "IT") - { - open(ERRO, "./msg/error.it") || die "Can't open config file '/msg/error.it' : $!"; - } - else - { - open(ERRO, "./msg/error.en") || die "Can't open config file '/msg/error.en' : $!"; - } - while(my $line = ) - { - # ignore comments and full line comments - $line =~ s/#.*$//; - next unless $line =~ /\S/; - if ($line =~ /^(.*?)\s*=\s*(.*)$/) {$error{$1} = $2; } - } - close ERRO; -} - -sub load_templates -{ - # load ok template - open(OK_TPL, "./tpl/ok.tpl") - || die "Can't open template file '/tpl/ok.tpl' : $!"; - while(my $line = ) {$ok_tpl .= $line; } - close OK_TPL; - - # load operror template - open(OPERROR_TPL, "./tpl/operror.tpl") - || die "Can't open template file '/tpl/operror.tpl' : $!"; - while(my $line = ) {$operror_tpl .= $line; } - close OPERROR_TPL; - - # load synerror template - open(SYNERROR_TPL, "./tpl/synerror.tpl") - || die "Can't open template file '/tpl/synerror.tpl' : $!"; - while(my $line = ) {$synerror_tpl .= $line; } - close SYNERROR_TPL; -} - -################################################################################################# -################################################################################################# -################################################################################################# -# the LibXML callbacks follow -# these callbacks are used for both the original parse AND the XInclude (if set) -################################################################################################# -################################################################################################# -################################################################################################# - -sub match_uri { - my $uri = shift; - return $uri !~ /:\/\// ? 1 : 0; # we handle only files -} - -sub open_uri { - my $uri = shift; - - my $handler = new IO::File; - if ( not $handler->open( "<$uri" ) ){ - $file = 0; - } - - return $file; -} - -sub read_uri { - my $handler = shift; - my $length = shift; - my $buffer = undef; - if ( $handler ) { - $handler->read( $rv , $length ); - } - return $buffer; -} - -sub close_uri { - my $handler = shift; - if ( $handler ) { - $handler->close(); - } - return 1; -} diff --git a/helm/hxsp/make.pl b/helm/hxsp/make.pl deleted file mode 100644 index ecd3a2886..000000000 --- a/helm/hxsp/make.pl +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/perl -open(MAIN, ">","./hxsp.pl")|| die "Can't open ./hxsp.pl : $!"; -my $pd = "./splitted/"; -my @pieces = ("0.init.p.pl","1.globvars.p.pl","2.start.p.pl", - "3.daemon.p.pl","4.hash.p.pl","5.libxslt.p.pl", - "6.commands.p.pl","7.qsparse.p.pl", - "8.strrep.p.pl","9.load.p.pl"); - -foreach $p (@pieces) -{ - open(P, "$pd$p") || die "Can't open $pd$p : $!"; - while(my $line =

) { print MAIN $line; } - close P; - print MAIN "\n"; -} - -close MAIN; diff --git a/helm/hxsp/msg/error.en b/helm/hxsp/msg/error.en deleted file mode 100644 index 9ac62ab87..000000000 --- a/helm/hxsp/msg/error.en +++ /dev/null @@ -1,45 +0,0 @@ -#syntax errors - -home_qs = syntax error: don't use parameters on hxsp if they aren't required by a specific command - -help_qs = syntax error: too parameters, help don't require any parameter - -list_qs = syntax error: too parameters, list don't require any parameter - -add_no_bind = syntax error: you must use the "bind" parameter -add_oth = syntax error: you may use only the "bind" parameter -add_null_bind = syntax error: bad bind value (NULL) -add_many_sep = syntax error: bad bind value (too commas) -add_no_sep = syntax error: bad bind value (no comma) - -re_oth = syntax error: you may use only the "keys" parameter -re_many = syntax error: you may use only the "keys" parameter and you must use it once -re_null_keys = syntax error: bad keys value (NULL) - -apply_few_pars = syntax error: xmluri and keys are both required -apply_oth = syntax error: you may use only keys, xmluri e param as parameters -apply_many_uri = syntax error: you must use the xmluri parameter once -apply_null_uri = syntax error: bad xmluri value (NULL) -apply_many_keys = syntax error: you must use the keys parameter once -apply_null_keys = syntax error: bad keys value (NULL) -apply_no_dots_param = syntax error: bad param value (no dots) -apply_no_dots_prop = syntax error: bad prop value (no dots) -apply_dots_param = syntax error: bad param value (more than 2 dots) -apply_dots_prop = syntax error: bad prop value (many dots) -apply_null_param = syntax error: bad param value (NULL) -apply_null_prop = syntax error: bad prop value (NULL) -apply_inv_param = syntax error: bad param value (key not specified in the keys parameter) - -#operative errors -add_dup_key = error in the stylesheet with key {KEY} and uri {URI}: a stylesheet with key {KEY} was already loaded use another key -add_dup_value = error in the stylesheet with key {KEY} and uri {URI}: the stylesheet with uri {URI} was already loaded with key {OLDKEY} use "reload" instead -add_xml_error = the XML parser found an error in the stylesheet with key {KEY} and uri {URI}:
{ERROR} -add_xslt_error = the XSLT parser found an error in the stylesheet with key {KEY} and uri {URI}:
{ERROR} - -re_inv_key = the stylesheet with key {KEY} was not loaded -re_no_sl = there is no stylesheets loaded - -apply_inv_key = the stylesheet with key {KEY} was not loaded -apply_xml_error = the XML parser found an error in the file {URI}:
{ERROR} -apply_xslt_error = the LibXSLT library found an error applying the stylesheet with key {KEY} and uri {URI}:
{ERROR} -apply_xslt_out_error = lthe LibXSLT library found an error creating the return file:
{ERROR} diff --git a/helm/hxsp/msg/error.it b/helm/hxsp/msg/error.it deleted file mode 100644 index ebbfa8f6b..000000000 --- a/helm/hxsp/msg/error.it +++ /dev/null @@ -1,46 +0,0 @@ -#sintax errors - -home_qs = errore di sintassi: non passare parametri a hxsp se non per l'utilizzo dei comandi specificati - -help_qs = errore di sintassi: troppi parametri specificati, help non richiede parametri - -list_qs = errore di sintassi: troppi parametri specificati, list non richiede parametri - -add_no_bind = errore di sintassi: si deve assegnare almeno un valore a bind -add_oth = errore di sintassi: si possono assegnare valori solo a bind -add_null_bind = errore di sintassi: valore di bind errato (NULL) -add_many_sep = errore di sintassi: valore di bind errato (troppe virgole) -add_no_sep = errore di sintassi: valore di bind errato (non seperato da virgola) - -re_oth = errore di sintassi: si possono assegnare valori solo a keys -re_many = errore di sintassi: si possono assegnare valori solo a keys e una sola volta -re_null_keys = errore di sintassi: valore di keys errato (NULL) - -apply_few_pars = errore di sintassi: richiesti almeno xmluri e keys -apply_oth = errore di sintassi: si possono assegnare valori solo a keys, xmluri e param -apply_many_uri = errore di sintassi: si può assegnare solo un valore a xmluri -apply_null_uri = errore di sintassi: valore di xmluri errato (NULL) -apply_many_keys = errore di sintassi: si possono assegnare valori a keys una sola volta -apply_null_keys = errore di sintassi: valore di keys errato (NULL) -apply_no_dots_param = errore di sintassi: valore di param errato (param richiede il punto) -apply_no_dots_prop = errore di sintassi: valore di prop errato (prop richiede il punto) -apply_dots_param = errore di sintassi: valore di param errato (param richiede al massimo 2 punti) -apply_dots_prop = errore di sintassi: valore di prop errato (prop richiede un solo punto) -apply_null_param = errore di sintassi: valore di param errato (NULL) -apply_null_prop = errore di sintassi: valore di prop errato (NULL) -apply_inv_param = errore di sintassi: valore di param errato (chiave non indicata in keys) - -#operative errors -add_dup_key = errore nello stylesheet con chiave {KEY} e uri {URI}: esiste già uno stilesheet con chiave {KEY} usare un altra chiave -add_dup_value = errore nello stylesheet con chiave {KEY} e uri {URI}: lo stylesheet con uri {URI} è già stato caricato con la chiave {OLDKEY} usare "reload" per ricaricarlo -add_xml_error = il parser xml ha rilevato un errore nello stylesheet con chiave {KEY} e uri {URI}:
{ERROR} -add_xslt_error = il parser xslt ha rilevato un errore nello stylesheet con chiave {KEY} e uri {URI}:
{ERROR} - -re_inv_key = lo stylesheet con chiave {KEY} non è stato caricato -re_no_sl = nessuno stylesheet è stato caricato - -apply_inv_key = lo stylesheet con chiave {KEY} non è stato caricato -apply_xml_error = il parser xml ha rilevato un errore nello file {URI}:
{ERROR} -apply_xslt_error = la libreria LibXSLT ha rilevato un errore applicando lo stylesheet con chiave {KEY} e uri {URI}:
{ERROR} -apply_xslt_out_error = la libreria LibXSLT ha rilevato un errore nella creazione del file in uscita:
{ERROR} - diff --git a/helm/hxsp/msg/message.en b/helm/hxsp/msg/message.en deleted file mode 100644 index 6a43e828b..000000000 --- a/helm/hxsp/msg/message.en +++ /dev/null @@ -1,96 +0,0 @@ -######################################################################## -######################################################################## -# -# Interface messages config file in EN language for hxsp -# Author: Alessandro Barzanti (barzu@libero.it) -# -######################################################################## -######################################################################## - -######################################################################## -######################################################################## -# usage messages -######################################################################## -######################################################################## - -######################################################################## -# Message sent after help syntax errors if "all_usage_synerr" is set OFF -######################################################################## -help_usage = usage:
{URL}/help - -######################################################################## -# Message sent after add syntax errors if "all_usage_synerr" is set OFF -######################################################################## -add_usage = usage:
{URL}/add?bind=key,stylesheet[&bind=key,stylesheet]* - -######################################################################## -# Message sent after remove syntax errors if "all_usage_synerr" is set OFF -######################################################################## -remove_usage = usage:
{URL}/remove[?keys=key_1,...,key_n] - -######################################################################## -# Message sent after list syntax errors if "all_usage_synerr" is set OFF -######################################################################## -list_usage = usage:
{URL}/list - -######################################################################## -# Message sent after reload syntax errors if "all_usage_synerr" is set OFF -######################################################################## -reload_usage =usage:
{URL}/reload[?keys=key_1,...,key_n] - -######################################################################## -# Message sent after apply syntax errors if "all_usage_synerr" is set OFF -######################################################################## -apply_usage =usage:
{URL}/apply?xmluri=xmldata&keys=key_1,...,key_n[¶m.name=value]*[¶m.key.name=value]*[&prop.name=[value]]* - -######################################################################## -# Message sent after "home_message" when hxsp was called without commands -# and sent after "help_message" when hxsp was called with the help command -# and after all syntax errors if "all_usage_synerr" is set ON -######################################################################## -all_usage = usage:

  • {URL}/help
  • {URL}/add?bind=key,stylesheet&bind=key,stylesheet]*
  • {URL}/remove[?keys=key_1,...,key_n]
  • {URL}/list
  • {URL}/reload[?keys=key_1,...,key_n]
  • {URL}/apply?xmluri=xmldata&keys=key_1,...,key_n[¶m.name=value]*[¶m.key.name=value]*[&prop.name=[value]]*
- -######################################################################## -######################################################################## -#operative messages -######################################################################## -######################################################################## - -######################################################################## -# Message sent when hxsp was called without commands -######################################################################## -home_message =

hxsp v{VER} active


- -######################################################################## -# Message sent when hxsp was called with the help command -######################################################################## -help_message = - -######################################################################## -# Message sent when a stylesheet is added -######################################################################## -s_add = the stylesheet with key: {KEY} and uri: {URI} was successfully loaded - -######################################################################## -# Message sent when a stylesheet is reloaded -######################################################################## -s_reload = the stylesheet with key: {KEY} and uri: {URI} was successfully reloaded - -######################################################################## -# Message sent when a stylesheet is removed -######################################################################## -s_remove = the stylesheet with key: {KEY} and uri: {URI} was successfully removed - -######################################################################## -# Message to print the stylesheet status for list command -######################################################################## -list = the stylesheet with key: {KEY} and uri: {URI} was loaded - -######################################################################## -# Message sent when the list command was called -# and there is no stylesheet loaded -######################################################################## -empty = there is no stylesheet loaded - -######################################################################## -######################################################################## diff --git a/helm/hxsp/msg/message.it b/helm/hxsp/msg/message.it deleted file mode 100644 index 77c1d6b79..000000000 --- a/helm/hxsp/msg/message.it +++ /dev/null @@ -1,96 +0,0 @@ -######################################################################## -######################################################################## -# -# Interface messages config file in IT language for hxsp -# Author: Alessandro Barzanti (barzu@libero.it) -# -######################################################################## -######################################################################## - -######################################################################## -######################################################################## -# usage messages -######################################################################## -######################################################################## - -######################################################################## -# Message sent after help syntax errors if "all_usage_synerr" is set OFF -######################################################################## -help_usage = utilizzo:
{URL}/help - -######################################################################## -# Message sent after add syntax errors if "all_usage_synerr" is set OFF -######################################################################## -add_usage = utilizzo:
{URL}/add?bind=key,stylesheet[&bind=key,stylesheet]* - -######################################################################## -# Message sent after remove syntax errors if "all_usage_synerr" is set OFF -######################################################################## -remove_usage = utilizzo:
{URL}/remove[?keys=key_1,...,key_n] - -######################################################################## -# Message sent after list syntax errors if "all_usage_synerr" is set OFF -######################################################################## -list_usage = utilizzo:
{URL}/list - -######################################################################## -# Message sent after reload syntax errors if "all_usage_synerr" is set OFF -######################################################################## -reload_usage = utilizzo:
{URL}/reload[?keys=key_1,...,key_n] - -######################################################################## -# Message sent after apply syntax errors if "all_usage_synerr" is set OFF -######################################################################## -apply_usage = utilizzo:
{URL}/apply?xmluri=xmldata&keys=key_1,...,key_n[¶m.name=value]*[¶m.key.name=value]*[&prop.name=[value]]* - -######################################################################## -# Message sent after "home_message" when hxsp was called without commands -# and sent after "help_message" when hxsp was called with the help command -# and after all syntax errors if "all_usage_synerr" is set ON -######################################################################## -all_usage = utilizzo:
  • {URL}/help
  • {URL}/add?bind=key,stylesheet&bind=key,stylesheet]*
  • {URL}/remove[?keys=key_1,...,key_n]
  • {URL}/list
  • {URL}/reload[?keys=key_1,...,key_n]
  • {URL}/apply?xmluri=xmldata&keys=key_1,...,key_n[¶m.name=value]*[¶m.key.name=value]*[&prop.name=[value]]*
- -######################################################################## -######################################################################## -#operative messages -######################################################################## -######################################################################## - -######################################################################## -# Message sent when hxsp was called without commands -######################################################################## -home_message =

hxsp v{VER} attivo


- -######################################################################## -# Message sent when hxsp was called with the help command -######################################################################## -help_message =

hxsp v{VER} attivo


- -######################################################################## -# Message sent when a stylesheet is added -######################################################################## -s_add = lo stylesheet con chiave: {KEY} e uri: {URI} è stato caricato con successo - -######################################################################## -# Message sent when a stylesheet is reloaded -######################################################################## -s_reload = lo stylesheet con chiave: {KEY} e uri: {URI} è stato ricaricato con successo - -######################################################################## -# Message sent when a stylesheet is removed -######################################################################## -s_remove = lo stylesheet con chiave: {KEY} e uri: {URI} è stato rimosso - -######################################################################## -# Message to print the stylesheet status for list command -######################################################################## -list = lo stylesheet con chiave: {KEY} e uri: {URI} è presente nel sistema - -######################################################################## -# Message sent when the list command was called -# and there is no stylesheet loaded -######################################################################## -empty = non è ancora stato caricato nessuno stylesheet - -######################################################################## -######################################################################## diff --git a/helm/hxsp/splitted/0.init.p.pl b/helm/hxsp/splitted/0.init.p.pl deleted file mode 100644 index 6c378c716..000000000 --- a/helm/hxsp/splitted/0.init.p.pl +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/perl - -################################################################################################# -################################################################################################# -################################################################################################# -# -# H.X.S.P. V 1.0 -# T S T R -# T L Y O -# P T E C -# S E -# H S -# E S -# E O -# T R -# -################################################################################################# -################################################################################################# -################################################################################################# - -use HTTP::Daemon; -use HTTP::Status; -use HTTP::Request; -use LWP::UserAgent; -use URI::Escape; -use CGI; -use FindBin; -use XML::LibXML; -use XML::LibXSLT; -use IO; diff --git a/helm/hxsp/splitted/1.globvars.p.pl b/helm/hxsp/splitted/1.globvars.p.pl deleted file mode 100644 index 9a9a88708..000000000 --- a/helm/hxsp/splitted/1.globvars.p.pl +++ /dev/null @@ -1,95 +0,0 @@ -################################################################################################# -################################################################################################# -################################################################################################# -# Global Variables -################################################################################################# -################################################################################################# -################################################################################################# - -# Version number -my $ver ="1.0"; - -# Working path of hxsp (loaded from config) -my $working_path; - -# Interface language (loaded from config) -my $language; - -# Port to use for hxsp (loaded from config) -my $port; - -# Use complete command description on syntax error if ON (loaded from config) -my $all_usage_synerr; - -# Include XIncludes on the fly if ON (loaded from config) -my $expand_xinc; - -# Max Depth of the DOM tree while parsing -my $max_depth; - -# Message sent when hxsp was called without commands (loaded from message.##) -my $home_message; - -# Message sent when hxsp was called with the help command (loaded from message.##) -my $help_message; - -# Message sent when a stylesheet is added (loaded from message.##) -my $s_add; - -# Message sent when a stylesheet is reloaded (loaded from message.##) -my $s_reload; - -# Message sent when a stylesheet is removed (loaded from message.##) -my $s_remove; - -# Message to print the stylesheet status for list command (loaded from message.##) -my $list; - -# Message sent when the list command was called -# and there is no stylesheet loaded (loaded from message.##) -my $empty; - -# Message sent after "home_message" when hxsp was called without commands -# and sent after "help_message" when hxsp was called with the help command -# and after all syntax errors if "all_usage_synerr" is set ON (loaded from message.##) -my $all_usage; - -# All the following syntax errors messages are used #only# if "all_usage_synerr" is set OFF - -# Message sent on help syntax errors (loaded from message.##) -my $help_usage; - -# Message sent on add syntax errors (loaded from message.##) -my $add_usage; - -# Message sent on remove syntax errors (loaded from message.##) -my $remove_usage; - -# Message sent on list syntax errors (loaded from message.##) -my $list_usage; - -# Message sent on reload syntax errors (loaded from message.##) -my $reload_usage; - -# Message sent on apply syntax errors (loaded from message.##) -my $apply_usage; - -# The error hash contains the error messages to call in case of syntax -# or operative errors, the keys are defined by the left value of each line in error## -my %error; - -# load ok template -my $ok_tpl; - -# load operror template -my $operror_tpl; - -# load synerror template -my $synerror_tpl; - -# This is the data structure to store the loaded stylesheets (hash of array) -# [0] :Styleseet URI , [1] : Loaded styleseet -my %stylesheet_hash; - -# This is a hash for fast duplicate uri detection -my %by_name; diff --git a/helm/hxsp/splitted/2.start.p.pl b/helm/hxsp/splitted/2.start.p.pl deleted file mode 100644 index a123ca798..000000000 --- a/helm/hxsp/splitted/2.start.p.pl +++ /dev/null @@ -1,49 +0,0 @@ -################################################################################################# -################################################################################################# -################################################################################################# -# Starting Operations -################################################################################################# -################################################################################################# -################################################################################################# - -# chdir to the directory of this perl script -chdir $FindBin::Bin; - -# load CONFIG -load_conf(); - -# initialize the objects to use LibXML and LibXSLT -my $parser = XML::LibXML->new(); -my $xslt = XML::LibXSLT->new(); - -# initialize the LibXML callbacks to load uri's -XML::LibXML->callbacks(\&match_uri,\&open_uri,\&read_uri,\&close_uri); - -# include XIncludes on the fly if required -if ($expand_xinc eq "ON") { $parser->expand_xinclude( 1 ); } - -# initialize the hxsp as HTTP::Daemon -my $d = new HTTP::Daemon LocalPort => $port; - -# get the complete working url of hxsp -my $puwobo_url = $d->url().$working_path; - -# set the working path to be comparable with url->path -$working_path = "/". $working_path; - -# load messages -load_messages(); - -# load error -load_err(); - -# load templates -load_templates(); - -# print starting information on console -print qq{ -hxsp v$ver active at: - Language is $language - On syntax error usage of every command is $all_usage_synerr - Include XIncludes on the fly is $expand_xinc; -}; diff --git a/helm/hxsp/splitted/3.daemon.p.pl b/helm/hxsp/splitted/3.daemon.p.pl deleted file mode 100644 index 3e3787336..000000000 --- a/helm/hxsp/splitted/3.daemon.p.pl +++ /dev/null @@ -1,131 +0,0 @@ -################################################################################################# -################################################################################################# -# HTTP::Daemon Operations -################################################################################################# -################################################################################################# - -# do not accumulate defunct processes -$SIG{CHLD} = "IGNORE"; -$SIG{USR1} = \&listen; # sent by the child to make the parent read the pipe - -pipe LIST_CHILD, TELL_PARENT; -pipe LIST_PARENT, TELL_CHILD; -TELL_PARENT->autoflush(1); -TELL_CHILD->autoflush(1); - - -sub listen { - my $res; - my $query = ; - if ($query =~ /^add /) { - $query =~ s/^add //; - chomp($query); - $res = add($query); - } - elsif ($query =~ /^reload /) { - $query =~ s/^reload //; - chomp($query); - $res = reload($query); - } - elsif ($query =~ /^remove /) { - $query =~ s/^remove //; - chomp($query); - $res = remove($query); - } - print TELL_CHILD "$res\n"; - print TELL_CHILD "____\n"; # end of response -} - -while (my $c = $d->accept) #connect -{ - if (fork() == 0) #start new concurrent process - { - while (my $r = $c->get_request) #get http request - { - if ($r->method eq 'GET' && - ($r->url->path eq $working_path or $r->url->path eq $working_path."/"))#start dir - { - my $response = new HTTP::Response; - $response->header('Cache-Control' => 'no-cache','Pragma' => "no-cache",'Expires' => '0'); - $response->content(home($r->url->query)); - $c->send_response($response); - } - elsif ($r->method eq 'GET' && $r->url->path eq $working_path."/help")#usage - { - my $response = new HTTP::Response; - $response->header('Cache-Control' => 'no-cache','Pragma' => "no-cache",'Expires' => '0'); - $response->content(help($r->url->query)); - $c->send_response($response); - } - elsif ($r->method eq 'GET' && $r->url->path eq $working_path."/add")#add - { - my $response = new HTTP::Response; - kill(USR1,getppid()); # ask the parent to read the pipe - my $qs = $r->url->query; - print TELL_PARENT "add $qs\n"; - my $in; - while (($in = ) ne "____\n") { - $res .= $in; - } - chomp($res); - $response->header('Cache-Control' => 'no-cache','Pragma' => "no-cache",'Expires' => '0'); - $response->content($res); - $c->send_response($response); - } - elsif ($r->method eq 'GET' && $r->url->path eq $working_path."/remove")#remove - { - my $response = new HTTP::Response; - kill(USR1,getppid()); # ask the parent to read the pipe - my $qs = $r->url->query; - print TELL_PARENT "remove $qs\n"; - my $in; - my $res=""; - while (($in = ) ne "____\n") { - $res .= $in; - } - chomp($res); - $response->content($res); - $response->header('Cache-Control' => 'no-cache','Pragma' => "no-cache",'Expires' => '0'); - $c->send_response($response); - } - elsif ($r->method eq 'GET' && $r->url->path eq $working_path."/reload")#reload - { - my $response = new HTTP::Response; - kill(USR1,getppid()); # ask the parent to read the pipe - my $qs = $r->url->query; - print TELL_PARENT "reload $qs\n"; - my $in; - my $res=""; - while (($in = ) ne "____\n") { - $res .= $in; - } - chomp($res); - $response->content($res); - $response->header('Cache-Control' => 'no-cache','Pragma' => "no-cache",'Expires' => '0'); - $c->send_response($response); - } - elsif ($r->method eq 'GET' && $r->url->path eq $working_path."/list")#list - { - my $response = new HTTP::Response; - $response->header('Cache-Control' => 'no-cache','Pragma' => "no-cache",'Expires' => '0'); - $response->content(list($r->url->query)); - $c->send_response($response); - } - elsif ($r->method eq 'GET' && $r->url->path eq $working_path."/apply")#apply - { - my %headers; - my $response = new HTTP::Response; - $response->content(apply($r->url->query,\%headers)); - $response->header(%headers); - $c->send_response($response); - } - else #wrong command or not working_path - { - $c->send_error(RC_FORBIDDEN) - } - } - $c->close; - undef($c); - exit; - } # fork -} diff --git a/helm/hxsp/splitted/4.hash.p.pl b/helm/hxsp/splitted/4.hash.p.pl deleted file mode 100644 index e3b1fc140..000000000 --- a/helm/hxsp/splitted/4.hash.p.pl +++ /dev/null @@ -1,150 +0,0 @@ -################################################################################################# -################################################################################################# -################################################################################################# -# Stylesheet hash check subrutines -################################################################################################# -################################################################################################# -################################################################################################# - -################################################################################################# -# sub addcheckvalues -# Usage: addcheckvalues($key,$uri); -# Returns: error message or 0 if no errors found -# Do: check if key and uri are already loaded -# Used by: addvalues -# Uses : err_replace -################################################################################################# -sub addcheckvalues -{ - my $ac_key = shift(@_); - my $ac_uri = shift(@_); - if (exists $stylesheet_hash{$ac_key}) - { - return err_replace($error{"add_dup_key"},$ac_key,$ac_uri,""); - } - elsif (exists $by_name{$ac_uri}) - { - return err_replace($error{"add_dup_value"},$ac_key,$ac_uri,$by_name{$ac_key}); - } - else { return 0; } -} -################################################################################################# - -################################################################################################# -# sub recheckvalues -# Usage: recheckvalues($key); -# Returns: error message or 0 if no errors found -# Do: check if key are loaded -# Used by: remove, reloadvalues -# Uses : err_replace -################################################################################################# -sub recheckvalues -{ - my $re_key = shift(@_); - if (not exists $stylesheet_hash{$re_key}) - { - return err_replace($error{"re_inv_key"},$re_key,"",""); - } - else { return 0; } -} -################################################################################################# - -################################################################################################# -# sub applycheckvalues -# Usage: applycheckvalues(\@keys); -# Returns: error message or 0 if no errors found -# Do: check if keys in @keys are loaded -# Used by: remove, reloadvalues -# Uses : err_replace -################################################################################################# -sub applycheckvalues -{ - my $applykeys_ptr = shift(@_); - foreach $applykey (@$applykeys_ptr) - { - if (not exists $stylesheet_hash{$applykey}) - { - return err_replace($error{"apply_inv_key"},$applykey,"",""); - } - } - return 0; -} -################################################################################################# - -################################################################################################# -################################################################################################# -################################################################################################# -# Stylesheet hash modify subrutines -################################################################################################# -################################################################################################# -################################################################################################# - -################################################################################################# -# sub addvalues -# Usage: if add_halt_on_errors is ON addvalues($key,$uri,@added); -# else addvalues($key,$uri) -# Returns: error message or 0 on success, -# if add_halt_on_errors is ON return all the added keys on @added -# Do: add the values to the stylesheet hash -# Used by: add -# Uses : addcheckvalues, loadstyle -################################################################################################# -sub addvalues -{ - my $av_key = shift(@_); - my $av_uri = shift(@_); - my $av_stylesheet; #parsed stylesheet to be placed in hash - if (my $err = addcheckvalues($av_key,$av_uri)) { return $err; } - elsif (my $err = loadstyle($av_key, $av_uri, $av_stylesheet)) { return $err; } - else - { - $stylesheet_hash{$av_key}[0]=$av_uri; - $stylesheet_hash{$av_key}[1]=$av_stylesheet; - $by_name{$av_uri}=$av_key; - return 0; - } -} -################################################################################################# - -################################################################################################# -# sub removevalues -# Usage: removevalues($key); -# Returns: message -# Do: remove the key specified and relative values from the stylesheet hash -# Used by: remove, do_remove -# Uses : ok_replace -################################################################################################# -sub removevalues -{ - my $cr_key = shift(@_); - my $cr_uri = $stylesheet_hash{$cr_key}[0]; - delete $stylesheet_hash{$cr_key}; - delete $by_name{$cr_uri}; - return ok_replace("$s_remove\n",$cr_key,$cr_uri); -} -################################################################################################# - -################################################################################################# -# sub reloadvalues -# Usage: if add_halt_on_errors is ON reloadvalues($key.\%reloaded); -# else reloadvalues($key); -# Returns: error message or 0 on success, -# if add_halt_on_errors is ON return the old stylesheets in %reloaded -# Do: reload the stlylesheet with the key specified -# Used by: do_reload -# Uses : recheckvalues, loadstyle -################################################################################################# -sub reloadvalues -{ - my $rv_key = shift(@_); - my $rv_uri = $stylesheet_hash{$rv_key}[0]; - my $rv_stylesheet; #parsed stylesheet to be placed in hash - if (my $err = recheckvalues($rv_key)) { return $err; } - elsif (my $err = loadstyle($rv_key, $rv_uri, $rv_stylesheet)) { return $err; } - else - { - $stylesheet_hash{$rv_key}[1] = $rv_stylesheet; - return 0; - } -} -################################################################################################# diff --git a/helm/hxsp/splitted/5.libxslt.p.pl b/helm/hxsp/splitted/5.libxslt.p.pl deleted file mode 100644 index 4d90dc1fb..000000000 --- a/helm/hxsp/splitted/5.libxslt.p.pl +++ /dev/null @@ -1,174 +0,0 @@ -################################################################################################# -################################################################################################# -################################################################################################# -# LibXML LIBXSLT access subrutines -################################################################################################# -################################################################################################# -################################################################################################# - -################################################################################################# -# sub loadstyle -# Usage: loadstyle($key,$uri,$stylesheet); -# Returns: error message or 0 on success, -# parsed stylesheet in $stylesheet -# Do: parse the stylesheet at the given uri -# Used by: addvalues , reloadvalues -# Uses : err_replace, parser_error_replace -################################################################################################# -sub loadstyle -{ - my $ls_key= shift(@_); - my $ls_uri= shift(@_); - my $uncatched = ""; - my $line = ""; - my $style_doc; - pipe P, STDERR; - STDERR->autoflush(1); - eval { $style_doc = $parser->parse_file($ls_uri); }; - print STDERR "____\n"; - while(($line =

) ne "____\n") { $uncatched .= $line; } - close P; - - if ($@ or $uncatched ne "") - { - return err_replace($error{"add_xml_error"},$ls_key,$ls_uri,parser_error_replace($@.$uncatched)); - } - else - { - pipe P, STDERR; - STDERR->autoflush(1); - $uncatched = ""; - $line = ""; - eval { $_[0] = $xslt->parse_stylesheet($style_doc); }; - print STDERR "____\n"; - while(($line =

) ne "____\n") { $uncatched .= $line; } - close P; - if ($@ or $uncatched ne "") - { - return err_replace($error{"add_xslt_error"},$ls_key,$ls_uri,parser_error_replace($@.$uncatched)); - } - else {return 0} - } -} - -sub load_xml_doc -{ - my $xmluri = shift(@_); - my $uncatched = ""; - my $line = ""; - pipe P, STDERR; - STDERR->autoflush(1); - eval { $_[0] = $parser->parse_file($xmluri); }; - print STDERR "____\n"; - while(($line =

) ne "____\n") { $uncatched .= $line; } - close P; - if ($@ or $uncatched ne "") - { - return err_replace($error{"apply_xml_error"},"",$xmluri,parser_error_replace($@.$uncatched)); - } - else {return 0} -} - -sub apply_style -{ - my $k = shift(@_); - my $params_ptr = shift(@_); - my %params = XML::LibXSLT::xpath_to_string(%$params_ptr); - my $pippo; - my $uncatched = ""; - my $line = ""; - pipe P, STDERR; - STDERR->autoflush(1); - XML::LibXSLT->max_depth($max_depth); - eval { $_[0] = $stylesheet_hash{$k}[1]->transform($_[0],%params); }; - print STDERR "____\n"; - while(($line =

) ne "____\n") { $uncatched .= $line; } - close P; - if ($@ or $uncatched ne "") - { - my $e_r = parser_error_replace($@.$uncatched); - return err_replace($error{"apply_xslt_error"},$k,$stylesheet_hash{$k}[0],$e_r); - } - else {return 0} -} -sub get_results -{ - my $k = shift(@_); - my $results = shift(@_); - my $retval; - my $uncatched = ""; - my $line = ""; - pipe P, STDERR; - STDERR->autoflush(1); - eval { $retval = $stylesheet_hash{$k}[1]->output_string($results); }; - print STDERR "____\n"; - while(($line =

) ne "____\n") { $uncatched .= $line; } - close P; - if ($@ or $uncatched ne "") - { - my $e_r = parser_error_replace($@.$uncatched); - return operror_print(err_replace($error{"apply_xslt_out_error"},"","",$e_r)); - } - else { return $retval; } -} -sub get_results_prop -{ - my $result = shift(@_); - my $retval; - my $uncatched = ""; - my $line = ""; - pipe P, STDERR; - STDERR->autoflush(1); - eval { $retval = $result->toString; }; - print STDERR "____\n"; - while(($line =

) ne "____\n") { $uncatched .= $line; } - close P; - if ($@ or $uncatched ne "") - { - my $e_r = parser_error_replace($@.$uncatched); - return operror_print(err_replace($error{"apply_xslt_out_error"},"","",$e_r)); - } - else { return $retval; } -} - -sub get_results_html -{ - my $result = shift(@_); - my $retval; - my $uncatched = ""; - my $line = ""; - pipe P, STDERR; - STDERR->autoflush(1); - eval { $retval = $result->toStringHTML();}; - print STDERR "____\n"; - while(($line =

) ne "____\n") { $uncatched .= $line; } - close P; - if ($@ or $uncatched ne "") - { - my $e_r = parser_error_replace($@.$uncatched); - return operror_print(err_replace($error{"apply_xslt_out_error"},"","",$e_r)); - } - else { return $retval; } -} - -sub decode -{ - my $result = shift(@_); - my $enc = shift(@_); - my $retval; - my $uncatched = ""; - my $line = ""; - pipe P, STDERR; - STDERR->autoflush(1); - eval { $retval = decodeFromUTF8($enc, $result);}; - print STDERR "____\n"; - while(($line =

) ne "____\n") { $uncatched .= $line; } - close P; - if ($@ or $uncatched ne "") - { - my $e_r = parser_error_replace($@.$uncatched); - return operror_print(err_replace($error{"apply_xslt_out_error"},"","",$e_r)); - } - else { return $retval; } -} -################################################################################################# diff --git a/helm/hxsp/splitted/6.commands.p.pl b/helm/hxsp/splitted/6.commands.p.pl deleted file mode 100644 index 142acc590..000000000 --- a/helm/hxsp/splitted/6.commands.p.pl +++ /dev/null @@ -1,215 +0,0 @@ -################################################################################################# -################################################################################################# -################################################################################################# -# Commands subrutines -################################################################################################# -################################################################################################# -################################################################################################# - -################################################################################################# -# sub add -# Usage: add($http_query); -# Returns: values for HTTP::Response -# Do: add stylesheet(s) to hash -# Used by: daemon -# Uses : addparsequery, addvalues, ok_replace, -# ok_print, synerror_print, operror_print -################################################################################################# -sub add -{ - my $http_query = shift(@_); # querystring - my $cont =""; # return value - my @binds; #values of binds passed via querystring - my $err; # error string - if ($err = addparsequery($http_query,\@binds)) { return synerror_print($err,$add_usage); } - else - { - foreach my $bind (@binds) - { - my ($a_key , $e_uri) = split(/,/,$bind,2); - my $une_uri = uri_unescape($e_uri); - if ($err = addvalues($a_key,$une_uri)) { $cont .= "$err\n"; } - else { $cont .= ok_replace("$s_add\n",$a_key,$une_uri); } - }#foreach - return ok_print($cont); - } -} -################################################################################################# - -################################################################################################# -# sub remove -# Usage: remove($http_query); -# Returns: values for HTTP::Response -# Do: remove stylesheet(s) from hash -# Used by: daemon -# Uses : reparsequery, getkeys, recheckvalues, removevalues, -# ok_print, synerror_print, operror_print -################################################################################################# -sub remove -{ - my $http_query = shift(@_); # querystring - my $rem_keys; - my $cont=""; - my $err; - if ($http_query eq "") - { - my $i=0; - foreach my $rem_key (keys %stylesheet_hash) - { - $cont .= removevalues($rem_key); - $i++; - } - if ($i==0) { return operror_print($error{"re_no_sl"}); } - } - elsif ($err = reparsequery($http_query,$rem_keys)){return synerror_print($err,$remove_usage);} - else - { - foreach my $rem_key (split (/,/,$rem_keys)) - { - if (my $err = recheckvalues($rem_key)) { $cont .= "$err\n"; } - else { $cont .= removevalues($rem_key); } - } - } - return ok_print($cont); -} -################################################################################################# - -################################################################################################# -# sub reload -# Usage: remove($http_query); -# Returns: values for HTTP::Response -# Do: remove stylesheet(s) from hash -# Used by: daemon -# Uses : reparsequery, getkeys, recheckvalues, removevalues, -# ok_print, synerror_print, operror_print -################################################################################################# -sub reload #reload stylesheet(s) from hash -{ - my $http_query = shift(@_); - my $rel_keys; - my @rel_k; - my $dr_cont = ""; - if ($http_query eq "") - { - my $i=0; - foreach my $key (keys %stylesheet_hash) - { - if (my $err = reloadvalues($key)) { return $dr_cont .= $err; } - else {$dr_cont .= ok_replace("$s_reload\n",$key,$stylesheet_hash{$key}[0]);} - $i++; - } - if ($i==0) { return operror_print($error{"re_no_sl"}); } - } - elsif ($err = reparsequery($http_query,$rel_keys)){return synerror_print($err,$reload_usage);} - else - { - foreach my $key (split (/,/,$rel_keys)) - { - if (my $err = reloadvalues($key)) { return $dr_cont .= $err; } - else {$dr_cont .= ok_replace("$s_reload\n",$key,$stylesheet_hash{$key}[0]);} - } - } - return ok_print($dr_cont); -} -################################################################################################# - -sub apply #apply stylesheets -{ - my $http_query = shift(@_); - my $headers_ptr = shift(@_); - my $xmluri; - my @applykeys; - my %app_param; - my %app_prop; - my $results; - my $lastkey; - my $enc; - - if (my $err=applyparsequery($http_query,\@applykeys,\%app_param,\%app_prop,$xmluri)) - { - return synerror_print($err,$apply_usage); - } - elsif (my $err=applycheckvalues(\@applykeys)) { return operror_print($err); } - elsif (my $err=load_xml_doc($xmluri,$results)) { return operror_print($err); } - #apply - foreach my $applykey (@applykeys) - { - $lastkey=$applykey; - if (my $err=apply_style($applykey,\%{$app_param{$applykey}},$results)) - { - return operror_print($err); - } - }#foreach - my $i=0; - while (my ($n, $v) = each %app_prop) - { - if (($n eq "method") or ($n eq "METHOD")) - { - if ($v eq 'html') { $headers_ptr->{'Content-Type'}='text/html'; } - elsif ($v eq 'text') { $headers_ptr->{'Content-Type'}='text/plain'; } - else { $headers_ptr->{'Content-Type'}='text/xml'; } - } - if (($n eq "encoding") or ($n eq "ENCODING")) - { - $headers_ptr->{'Content-Encoding'}=$v; - if ($v ne "UTF-8") { $enc = $v; } - } - if (($n eq "media-type") or ($n eq "MEDIA_TYPE") or ($n eq "MEDIA-TYPE")) - { - $headers_ptr->{'Content-Type'}=$v; - } - $i++; - } - if ($i == 0) - { - %$headers_ptr= ('Cache-Control' => 'no-cache','Pragma' => "no-cache",'Expires' => '0'); - return get_results($lastkey,$results); - } - else - { - my $result; - $headers_ptr->{'Cache-Control'} = 'no-cache'; - $headers_ptr->{'Pragma'} = "no-cache"; - $headers_ptr->{'Expires'} = '0'; - if ($headers_ptr->{'Content-Type'} eq 'text/html') - { - $result = get_results_html($results); - } - else - { - $result = get_results_prop($results); - if ($enc) - { - $result = decode($result,$enc); - } - } - return $result; - } -} - -sub list #list all the stylesheet loaded -{ - my $cont=""; - my $ind = 0; - foreach $key (keys %stylesheet_hash) - { - $cont .= ok_replace("$list\n",$key,$stylesheet_hash{$key}[0]); - $ind++; - } - if ($ind > 0) { return ok_print($cont); } - else { return ok_print($empty); } -} - -sub home #return Dispay active -{ - if ($_[0] ne "") { return synerror_print($error{"home_qs"},$all_usage); } - else { - return ok_print($home_message.$all_usage); - } -} - -sub help #return html help -{ - if ($_[0] ne "") { return synerror_print($error{"help_qs"},$help_usage); } - return ok_print($help_message.$all_usage); -} diff --git a/helm/hxsp/splitted/7.qsparse.p.pl b/helm/hxsp/splitted/7.qsparse.p.pl deleted file mode 100644 index aa7be53b5..000000000 --- a/helm/hxsp/splitted/7.qsparse.p.pl +++ /dev/null @@ -1,172 +0,0 @@ -################################################################################################# -################################################################################################# -# Subrutines to get parameters for commands from Query String (query string parsing) -################################################################################################# -################################################################################################# - -sub add_comma_analysis -{ - my $bind = shift(@_); - my ($l , $r) = split(/,/,$bind,2); - if (index($bind ,",") == -1) { return $error{"add_no_sep"}; } - elsif (index($r ,",") != -1) { return $error{"add_many_sep"}; } - elsif (($l eq "") or ($r eq "")) { return $error{"add_null_bind"}; } - else { return 0; } -} -## -#usage: -#addparsequery($querystring,\@binds) -#returns $errcode; -sub addparsequery -{ - my $query = shift(@_); - my $value_ptr = shift(@_); - if ($query eq "") { return $error{"add_no_bind"}; } - else - { - foreach my $params (split(/&/,$query)) - { - my ($k , $v) = split(/=/,$params,2); - $v=uri_unescape($v); - if ($k ne "bind") { return $error{"add_oth"}; } - elsif ($v eq "") { return $error{"add_null_bind"}; } - elsif (my $err=add_comma_analysis($v)) { return $err; } - else { push @$value_ptr,$v;} - }#foreach - return 0; - } -} - -sub reparsequery -{ - my $query = shift(@_); - my $k; - my $v; - my $err; - if (index($query, "&") == -1) - { - ($k , $v) = split(/=/,$query,2); - $v=uri_unescape($v); - if ($k ne "keys") { return $error{"re_oth"}; } - elsif ($v eq "") { return $error{"re_null_keys"}; } - elsif ((index($v,",")==0) or (index($v,",,")!=-1) or (substr($v,-1) eq ",")) - { - return $error{"re_null_keys"}; - } - else { $_[0] = $v; return 0; } - } - else { return $error{"re_many"}; } -} - -sub get_req -{ - my $arr_ptr = shift(@_); - my $xmluri_found = 0; - my $keys_found = 0; - foreach my $el (@$arr_ptr) - { - my ($k , $v) = split(/=/,$el,2); - $v=uri_unescape($v); - if ($k eq "param") { return $error{"apply_no_dots_param"}; } - elsif ($k eq "prop") { return $error{"apply_no_dots_prop"}; } - elsif ($k eq "xmluri") - { - if ($xmluri_found) { return $error{"apply_many_uri"}; } - else - { - if ($v eq "") { return $error{"apply_null_uri"}; } - else { $_[0] = $v; $xmluri_found = 1; } - } - } - elsif ($k eq "keys") - { - if ($keys_found) { return $error{"apply_many_keys"}; } - else - { - if ($v eq "") { return $error{"apply_null_keys"}; } - elsif ((index($v,",")==0) or (index($v,",,")!=-1) or (substr($v,-1) eq ",")) - { - return $error{"apply_null_keys"}; - } - else { $_[1] = $v; $keys_found = 1; } - } - } - else { return $error{"apply_oth"}; } - }#foreach my $el (@$arr_ptr) - if ((!$xmluri_found or !$keys_found)) { return $error{"apply_few_pars"}; } - else { return 0; } -} - -sub applyparsequery -{ - my $query = shift(@_); - my $apply_keys_ptr = shift(@_); - my $keyparshoh = shift(@_); - my $proph_ptr = shift(@_); - my $applykeys; - my %prop_h; - my %genparam_h; - my %keyparam_h; - my @nodots; - - if ($query eq "") { return $error{"apply_few_pars"}; } - if (index($query, "&") == -1) { return $error{"apply_few_pars"}; } - foreach my $param (split(/&/,$query)) - { - my ($k , $v) = split(/=/,$param,2); - $v=uri_unescape($v); - if (index($k, ".") == -1) { push @nodots,$param; } - else - { - my ($l , $r) = split(/\./,$k,2); - if ($l eq "prop") - { - if (($r eq "") or ($v eq "")) { return $error{"apply_null_prop"}; } - elsif (index($r, ".") > -1) { return $error{"apply_dots_prop"}; } - else { $prop_h{$r} = $v; } - } - elsif ($l eq "param") - { - if (($r eq "") or ($v eq "")) { return $error{"apply_null_param"}; } - elsif (index($r, ".") == -1) { $genparam_h{$r} = $v; } - else - { - my ($kk , $va) = split(/\./,$r,2); - if (index($va, ".") > -1) { return $error{"apply_dots_param"}; } - elsif (($kk eq "") or ($va eq "")) { return $error{"apply_null_param"}; } - else { $keyparam_h{$kk}{$va}=$v; } - } - } - else { return $error{"apply_oth"}; } - } - } - - if (my $err = get_req(\@nodots,$_[0],$applykeys)) { return $err; } - while (my ($gn, $gv) = each %prop_h) - { - $proph_ptr->{$gn} = $gv; - } - foreach my $pkey ( keys %keyparam_h ) - { - my $k_found=0; - foreach my $verkey (split (/,/,$applykeys)) - { - if ($pkey eq $verkey) { $k_found = 1; } - } - if (! $k_found) { return $error{"apply_inv_param"}; } - } - - foreach my $applykey (split (/,/,$applykeys)) - { - while (my ($gn, $gv) = each %genparam_h) - { - $keyparshoh->{$applykey}{$gn} = $gv; - } - while (my ($kn, $kv) = each %{ $keyparam_h{$applykey} } ) - { - $keyparshoh->{$applykey}{$kn} = $kv; - } - push @$apply_keys_ptr, $applykey; - }#foreach - return 0; -} diff --git a/helm/hxsp/splitted/8.strrep.p.pl b/helm/hxsp/splitted/8.strrep.p.pl deleted file mode 100644 index 90557fefd..000000000 --- a/helm/hxsp/splitted/8.strrep.p.pl +++ /dev/null @@ -1,76 +0,0 @@ -################################################################################################# -################################################################################################# -################################################################################################# -# Subrutines to replace values between {} on loaded templates -################################################################################################# -################################################################################################# -################################################################################################# - -sub ok_print -{ - my $message = shift(@_); - $message =~ s/(\n)/
\1/g; - my $retval = $ok_tpl; - $retval =~ s/\{MESSAGE\}/$message/g; - return $retval; -} - -sub operror_print -{ - my $message = shift(@_); - $message =~ s/(\n)/
\1/g; - my $retval = $operror_tpl; - $retval =~ s/\{ERROR\}/$message/g; - return $retval; -} - -sub synerror_print -{ - my $message = shift(@_); - my $us = shift(@_); - $message =~ s/(\n)/
\1/g; - my $retval = $synerror_tpl; - $retval =~ s/\{ERROR\}/$message/g; - $retval =~ s/\{USAGE\}/$us/g; - return $retval; -} - -################################################################################################# -################################################################################################# -################################################################################################# -# Subrutines to replace values between {} on loaded messages -################################################################################################# -################################################################################################# -################################################################################################# - -sub ok_replace -{ - my $message = shift(@_); - my $key = shift(@_); - my $s_uri = shift(@_); - $message =~ s/\{KEY\}/$key/g; - $message =~ s/\{URI\}/$s_uri/g; - return $message; -} - -sub err_replace -{ - my $message = shift(@_); - my $key = shift(@_); - my $s_uri = shift(@_); - my $errr = shift(@_); - $message =~ s/\{KEY\}/$key/g; - $message =~ s/\{URI\}/$s_uri/g; - $message =~ s/\{ERROR\}/$errr/g; - $message =~ s/\{OLDKEY\}/$errr/g; - return $message; -} - -sub parser_error_replace -{ - my $no_at = shift(@_); - $no_at =~ s/(.*)\sat\s(.*)/\1/g; - $no_at =~ s//>/g; - return $no_at; -} diff --git a/helm/hxsp/splitted/9.load.p.pl b/helm/hxsp/splitted/9.load.p.pl deleted file mode 100644 index 2746b273a..000000000 --- a/helm/hxsp/splitted/9.load.p.pl +++ /dev/null @@ -1,149 +0,0 @@ -################################################################################################# -################################################################################################# -################################################################################################# -# Subrutines to load config files and templates -################################################################################################# -################################################################################################# -################################################################################################# - -sub load_messages -{ - if ($language eq "IT") - { - open(MESSAGE, "./msg/message.it") || die "Can't open config file '/msg/message.it' : $!"; - } - else - { - open(MESSAGE, "./msg/message.en") || die "Can't open config file '/msg/message.en' : $!"; - } - while(my $line = ) { - # ignore comments and full line comments - $line =~ s/#.*$//; - next unless $line =~ /\S/; - $line =~ s/\{URL\}/$puwobo_url/g; - $line =~ s/\{VER\}/$ver/g; - if ($line =~ /^(home_message)\s*=\s*(.*)$/) {$home_message = $2; } - if ($line =~ /^(help_message)\s*=\s*(.*)$/) {$help_message = $2; } - if ($line =~ /^(s_add)\s*=\s*(.*)$/) {$s_add = $2; } - if ($line =~ /^(s_reload)\s*=\s*(.*)$/) {$s_reload = $2; } - if ($line =~ /^(s_remove)\s*=\s*(.*)$/) {$s_remove = $2; } - if ($line =~ /^(list)\s*=\s*(.*)$/) {$list = $2; } - if ($line =~ /^(empty)\s*=\s*(.*)$/) {$empty = $2; } - if ($line =~ /^(all_usage)\s*=\s*(.*)$/) {$all_usage = $2; } - if ($all_usage_synerr eq "ON") - { - $help_usage=$add_usage=$remove_usage=$list_usage=$reload_usage=$apply_usage=$all_usage; - } - else - { - if ($line =~ /^(help_usage)\s*=\s*(.*)$/) {$help_usage = $2; } - if ($line =~ /^(add_usage)\s*=\s*(.*)$/) {$add_usage = $2; } - if ($line =~ /^(remove_usage)\s*=\s*(.*)$/) {$remove_usage = $2; } - if ($line =~ /^(list_usage)\s*=\s*(.*)$/) {$list_usage = $2; } - if ($line =~ /^(reload_usage)\s*=\s*(.*)$/) {$reload_usage = $2; } - if ($line =~ /^(apply_usage)\s*=\s*(.*)$/) {$apply_usage = $2; } - } - } - close MESSAGE; -} - -sub load_conf -{ - open(CONFIG, "./config") || die "Can't open config file 'config' : $!"; - while(my $line = ) { - # ignore comments and full line comments - $line =~ s/#.*$//; - next unless $line =~ /\S/; - if ($line =~ /^(working_path)\s*=\s*(.*)$/) {$working_path = $2; } - if ($line =~ /^(language)\s*=\s*(.*)$/) {$language = $2; } - if ($line =~ /^(port)\s*=\s*(.*)$/) {$port = $2; } - if ($line =~ /^(all_usage_synerr)\s*=\s*(.*)$/) {$all_usage_synerr = $2; } - if ($line =~ /^(expand_xinc)\s*=\s*(.*)$/) {$expand_xinc = $2; } - if ($line =~ /^(max_depth)\s*=\s*(.*)$/) {$max_depth = $2; } - } - close CONFIG; -} - -sub load_err -{ - if ($language eq "IT") - { - open(ERRO, "./msg/error.it") || die "Can't open config file '/msg/error.it' : $!"; - } - else - { - open(ERRO, "./msg/error.en") || die "Can't open config file '/msg/error.en' : $!"; - } - while(my $line = ) - { - # ignore comments and full line comments - $line =~ s/#.*$//; - next unless $line =~ /\S/; - if ($line =~ /^(.*?)\s*=\s*(.*)$/) {$error{$1} = $2; } - } - close ERRO; -} - -sub load_templates -{ - # load ok template - open(OK_TPL, "./tpl/ok.tpl") - || die "Can't open template file '/tpl/ok.tpl' : $!"; - while(my $line = ) {$ok_tpl .= $line; } - close OK_TPL; - - # load operror template - open(OPERROR_TPL, "./tpl/operror.tpl") - || die "Can't open template file '/tpl/operror.tpl' : $!"; - while(my $line = ) {$operror_tpl .= $line; } - close OPERROR_TPL; - - # load synerror template - open(SYNERROR_TPL, "./tpl/synerror.tpl") - || die "Can't open template file '/tpl/synerror.tpl' : $!"; - while(my $line = ) {$synerror_tpl .= $line; } - close SYNERROR_TPL; -} - -################################################################################################# -################################################################################################# -################################################################################################# -# the LibXML callbacks follow -# these callbacks are used for both the original parse AND the XInclude (if set) -################################################################################################# -################################################################################################# -################################################################################################# - -sub match_uri { - my $uri = shift; - return $uri !~ /:\/\// ? 1 : 0; # we handle only files -} - -sub open_uri { - my $uri = shift; - - my $handler = new IO::File; - if ( not $handler->open( "<$uri" ) ){ - $file = 0; - } - - return $file; -} - -sub read_uri { - my $handler = shift; - my $length = shift; - my $buffer = undef; - if ( $handler ) { - $handler->read( $rv , $length ); - } - return $buffer; -} - -sub close_uri { - my $handler = shift; - if ( $handler ) { - $handler->close(); - } - return 1; -} \ No newline at end of file diff --git a/helm/hxsp/tpl/ok.tpl b/helm/hxsp/tpl/ok.tpl deleted file mode 100644 index 633267e4e..000000000 --- a/helm/hxsp/tpl/ok.tpl +++ /dev/null @@ -1,5 +0,0 @@ - - -{MESSAGE} - - diff --git a/helm/hxsp/tpl/operror.tpl b/helm/hxsp/tpl/operror.tpl deleted file mode 100644 index 4dbe1f56b..000000000 --- a/helm/hxsp/tpl/operror.tpl +++ /dev/null @@ -1,5 +0,0 @@ - - -{ERROR} - - diff --git a/helm/hxsp/tpl/synerror.tpl b/helm/hxsp/tpl/synerror.tpl deleted file mode 100644 index 990df9cb5..000000000 --- a/helm/hxsp/tpl/synerror.tpl +++ /dev/null @@ -1,6 +0,0 @@ - - -{ERROR}
-{USAGE} - - diff --git a/helm/mathql_test/.cvsignore b/helm/mathql/mathql_test/.cvsignore similarity index 100% rename from helm/mathql_test/.cvsignore rename to helm/mathql/mathql_test/.cvsignore diff --git a/helm/mathql_test/.depend b/helm/mathql/mathql_test/.depend similarity index 100% rename from helm/mathql_test/.depend rename to helm/mathql/mathql_test/.depend diff --git a/helm/mathql_test/Makefile b/helm/mathql/mathql_test/Makefile similarity index 100% rename from helm/mathql_test/Makefile rename to helm/mathql/mathql_test/Makefile diff --git a/helm/mathql_test/mQGTopLexer.mll b/helm/mathql/mathql_test/mQGTopLexer.mll similarity index 100% rename from helm/mathql_test/mQGTopLexer.mll rename to helm/mathql/mathql_test/mQGTopLexer.mll diff --git a/helm/mathql_test/mQGTopParser.mly b/helm/mathql/mathql_test/mQGTopParser.mly similarity index 100% rename from helm/mathql_test/mQGTopParser.mly rename to helm/mathql/mathql_test/mQGTopParser.mly diff --git a/helm/mathql_test/mqgtop.ml b/helm/mathql/mathql_test/mqgtop.ml similarity index 100% rename from helm/mathql_test/mqgtop.ml rename to helm/mathql/mathql_test/mqgtop.ml diff --git a/helm/mathql_test/mqitop.ml b/helm/mathql/mathql_test/mqitop.ml similarity index 100% rename from helm/mathql_test/mqitop.ml rename to helm/mathql/mathql_test/mqitop.ml diff --git a/helm/mathql_test/mqtop.ml b/helm/mathql/mathql_test/mqtop.ml similarity index 100% rename from helm/mathql_test/mqtop.ml rename to helm/mathql/mathql_test/mqtop.ml diff --git a/helm/minidom/.cvsignore b/helm/minidom/.cvsignore deleted file mode 100644 index 19aef19d8..000000000 --- a/helm/minidom/.cvsignore +++ /dev/null @@ -1,23 +0,0 @@ -*.lo -*.la -.libs -.deps -.emacs.desktop -config.h -config.h.in -config.cache -config.log -config.status -libtool -stamp-h -stamp-h.in -Makefile -Makefile.in -*.gz -configure -aclocal.m4 -install-sh -minidom-config -minidom.spec -missing -mkinstalldirs diff --git a/helm/minidom/AUTHORS b/helm/minidom/AUTHORS deleted file mode 100644 index fe59f14d6..000000000 --- a/helm/minidom/AUTHORS +++ /dev/null @@ -1 +0,0 @@ -Luca Padovani diff --git a/helm/minidom/COPYING b/helm/minidom/COPYING deleted file mode 100644 index d60c31a97..000000000 --- a/helm/minidom/COPYING +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/helm/minidom/ChangeLog b/helm/minidom/ChangeLog deleted file mode 100644 index e69de29bb..000000000 diff --git a/helm/minidom/HEADER b/helm/minidom/HEADER deleted file mode 100644 index acd4a4d8c..000000000 --- a/helm/minidom/HEADER +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2000, Luca Padovani . - * - * This file is part of MambaCC, a compiler for the Mamba - * Functional Language - * - * MambaCC is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * MambaCC is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with MambaCC; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * For details, see the MambaCC World-Wide-Web page, - * http://cs.unibo.it/~lpadovan/mamba/, or send a mail to - * - */ diff --git a/helm/minidom/INSTALL b/helm/minidom/INSTALL deleted file mode 100644 index b42a17ac4..000000000 --- a/helm/minidom/INSTALL +++ /dev/null @@ -1,182 +0,0 @@ -Basic Installation -================== - - These are generic installation instructions. - - The `configure' shell script attempts to guess correct values for -various system-dependent variables used during compilation. It uses -those values to create a `Makefile' in each directory of the package. -It may also create one or more `.h' files containing system-dependent -definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, a file -`config.cache' that saves the results of its tests to speed up -reconfiguring, and a file `config.log' containing compiler output -(useful mainly for debugging `configure'). - - If you need to do unusual things to compile the package, please try -to figure out how `configure' could check whether to do them, and mail -diffs or instructions to the address given in the `README' so they can -be considered for the next release. If at some point `config.cache' -contains results you don't want to keep, you may remove or edit it. - - The file `configure.in' is used to create `configure' by a program -called `autoconf'. You only need `configure.in' if you want to change -it or regenerate `configure' using a newer version of `autoconf'. - -The simplest way to compile this package is: - - 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. If you're - using `csh' on an old version of System V, you might need to type - `sh ./configure' instead to prevent `csh' from trying to execute - `configure' itself. - - Running `configure' takes awhile. While running, it prints some - messages telling which features it is checking for. - - 2. Type `make' to compile the package. - - 3. Optionally, type `make check' to run any self-tests that come with - the package. - - 4. Type `make install' to install the programs and any data files and - documentation. - - 5. You can remove the program binaries and object files from the - source code directory by typing `make clean'. To also remove the - files that `configure' created (so you can compile the package for - a different kind of computer), type `make distclean'. There is - also a `make maintainer-clean' target, but that is intended mainly - for the package's developers. If you use it, you may have to get - all sorts of other programs in order to regenerate files that came - with the distribution. - -Compilers and Options -===================== - - Some systems require unusual options for compilation or linking that -the `configure' script does not know about. You can give `configure' -initial values for variables by setting them in the environment. Using -a Bourne-compatible shell, you can do that on the command line like -this: - CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure - -Or on systems that have the `env' program, you can do it like this: - env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure - -Compiling For Multiple Architectures -==================================== - - You can compile the package for more than one kind of computer at the -same time, by placing the object files for each architecture in their -own directory. To do this, you must use a version of `make' that -supports the `VPATH' variable, such as GNU `make'. `cd' to the -directory where you want the object files and executables to go and run -the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. - - If you have to use a `make' that does not supports the `VPATH' -variable, you have to compile the package for one architecture at a time -in the source code directory. After you have installed the package for -one architecture, use `make distclean' before reconfiguring for another -architecture. - -Installation Names -================== - - By default, `make install' will install the package's files in -`/usr/local/bin', `/usr/local/man', etc. You can specify an -installation prefix other than `/usr/local' by giving `configure' the -option `--prefix=PATH'. - - You can specify separate installation prefixes for -architecture-specific files and architecture-independent files. If you -give `configure' the option `--exec-prefix=PATH', the package will use -PATH as the prefix for installing programs and libraries. -Documentation and other data files will still use the regular prefix. - - In addition, if you use an unusual directory layout you can give -options like `--bindir=PATH' to specify different values for particular -kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. - - If the package supports it, you can cause programs to be installed -with an extra prefix or suffix on their names by giving `configure' the -option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. - -Optional Features -================= - - Some packages pay attention to `--enable-FEATURE' options to -`configure', where FEATURE indicates an optional part of the package. -They may also pay attention to `--with-PACKAGE' options, where PACKAGE -is something like `gnu-as' or `x' (for the X Window System). The -`README' should mention any `--enable-' and `--with-' options that the -package recognizes. - - For packages that use the X Window System, `configure' can usually -find the X include and library files automatically, but if it doesn't, -you can use the `configure' options `--x-includes=DIR' and -`--x-libraries=DIR' to specify their locations. - -Specifying the System Type -========================== - - There may be some features `configure' can not figure out -automatically, but needs to determine by the type of host the package -will run on. Usually `configure' can figure that out, but if it prints -a message saying it can not guess the host type, give it the -`--host=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name with three fields: - CPU-COMPANY-SYSTEM - -See the file `config.sub' for the possible values of each field. If -`config.sub' isn't included in this package, then this package doesn't -need to know the host type. - - If you are building compiler tools for cross-compiling, you can also -use the `--target=TYPE' option to select the type of system they will -produce code for and the `--build=TYPE' option to select the type of -system on which you are compiling the package. - -Sharing Defaults -================ - - If you want to set default values for `configure' scripts to share, -you can create a site shell script called `config.site' that gives -default values for variables like `CC', `cache_file', and `prefix'. -`configure' looks for `PREFIX/share/config.site' if it exists, then -`PREFIX/etc/config.site' if it exists. Or, you can set the -`CONFIG_SITE' environment variable to the location of the site script. -A warning: not all `configure' scripts look for a site script. - -Operation Controls -================== - - `configure' recognizes the following options to control how it -operates. - -`--cache-file=FILE' - Use and save the results of the tests in FILE instead of - `./config.cache'. Set FILE to `/dev/null' to disable caching, for - debugging `configure'. - -`--help' - Print a summary of the options to `configure', and exit. - -`--quiet' -`--silent' -`-q' - Do not print messages saying which checks are being made. To - suppress all normal output, redirect it to `/dev/null' (any error - messages will still be shown). - -`--srcdir=DIR' - Look for the package's source code in directory DIR. Usually - `configure' can determine that directory automatically. - -`--version' - Print the version of Autoconf used to generate the `configure' - script, and exit. - -`configure' also accepts some other, not widely useful, options. diff --git a/helm/minidom/Makefile.am b/helm/minidom/Makefile.am deleted file mode 100644 index 2bc9d7189..000000000 --- a/helm/minidom/Makefile.am +++ /dev/null @@ -1,42 +0,0 @@ - -lib_LTLIBRARIES = libminidom.la -bin_SCRIPTS = minidom-config - -libminidom_la_LDFLAGS = -version-info @MINIDOM_VERSION_INFO@ - -EXTRA_DIST = minidom-config.in - -CLEANFILES = minidom-config - -libminidom_la_SOURCES = \ - minidom.c - -pkginclude_HEADERS = \ - minidom.h - -minidom-config: minidom-config.in - @echo "#!/bin/sh" >minidom-config - @echo >>minidom-config - @echo VERSION=\"$(VERSION)\" >>minidom-config - @echo XML_CONFIG=\"$(XML_CONFIG)\" >>minidom-config - @echo libdir=\"$(libdir)\" >>minidom-config - @echo pkglibdir=\"$(pkglibdir)\" >>minidom-config - @echo includedir=\"$(includedir)\" >>minidom-config - @echo pkgincludedir=\"$(pkgincludedir)\" >>minidom-config - @echo >>minidom-config - @cat $(srcdir)/minidom-config.in >>minidom-config - @chmod a+x minidom-config - -backup: - tar cvfz ../@PACKAGE@-@VERSION@-`date|tr ' ' '_'|tr ':' '_'`.tar.gz . - -cleanbak: - -rm -f `find . -name "*~"` - -lc: - @( \ - CFILES=`find . -name "*.c"`; \ - HFILES=`find . -name "*.h"`; \ - ICCFILES=`find . -name "*.inc"`; \ - wc -l $$CFILES $$HFILES $$INCFILES | tail -n 1 \ - ) diff --git a/helm/minidom/NEWS b/helm/minidom/NEWS deleted file mode 100644 index e69de29bb..000000000 diff --git a/helm/minidom/README b/helm/minidom/README deleted file mode 100644 index e69de29bb..000000000 diff --git a/helm/minidom/TODO b/helm/minidom/TODO deleted file mode 100644 index bebb4b616..000000000 --- a/helm/minidom/TODO +++ /dev/null @@ -1,2 +0,0 @@ -+ support for converting string to/from Unicode - diff --git a/helm/minidom/acconfig.h b/helm/minidom/acconfig.h deleted file mode 100644 index ac44dc34f..000000000 --- a/helm/minidom/acconfig.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2000, Luca Padovani . - * - * This file is part of miniDOM, a minimal implementation of the - * Document Object Model based on the libxml library. - * - * miniDOM is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * miniDOM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with miniDOM; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * For details, see the miniDOM World-Wide-Web page, - * http://cs.unibo.it/~lpadovan/minidom/, or send a mail to - * - */ - -#ifndef config_h -#define config_h - -@TOP@ - -/* Define to compile with libxml 2.x (recommended) */ -#undef HAVE_LIBXML2 - -@BOTTOM@ - -#endif /* config_h */ diff --git a/helm/minidom/config.guess b/helm/minidom/config.guess deleted file mode 100644 index 28fcc5e22..000000000 --- a/helm/minidom/config.guess +++ /dev/null @@ -1,1308 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 -# Free Software Foundation, Inc. - -timestamp='2001-11-08' - -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Originally written by Per Bothner . -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 -Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit 0 ;; - --version | -v ) - echo "$version" ; exit 0 ;; - --help | --h* | -h ) - echo "$usage"; exit 0 ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - - -dummy=dummy-$$ -trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int dummy(){}" > $dummy.c ; - for c in cc gcc c89 ; do - ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; - if test $? = 0 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - rm -f $dummy.c $dummy.o $dummy.rel ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # Determine the machine/vendor (is the vendor relevant). - case "${UNAME_MACHINE}" in - amiga) machine=m68k-unknown ;; - arm32) machine=arm-unknown ;; - atari*) machine=m68k-atari ;; - sun3*) machine=m68k-sun ;; - mac68k) machine=m68k-apple ;; - macppc) machine=powerpc-apple ;; - hp3[0-9][05]) machine=m68k-hp ;; - ibmrt|romp-ibm) machine=romp-ibm ;; - sparc*) machine=`uname -p`-unknown ;; - *) machine=${UNAME_MACHINE}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE}" in - i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep __ELF__ >/dev/null - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit 0 ;; - amiga:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - arc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - hp300:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mac68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - macppc:OpenBSD:*:*) - echo powerpc-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme88k:OpenBSD:*:*) - echo m88k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvmeppc:OpenBSD:*:*) - echo powerpc-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - pmax:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sgi:OpenBSD:*:*) - echo mipseb-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sun3:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - wgrisc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - *:OpenBSD:*:*) - echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - alpha:OSF1:*:*) - if test $UNAME_RELEASE = "V4.0"; then - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - fi - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - cat <$dummy.s - .data -\$Lformat: - .byte 37,100,45,37,120,10,0 # "%d-%x\n" - - .text - .globl main - .align 4 - .ent main -main: - .frame \$30,16,\$26,0 - ldgp \$29,0(\$27) - .prologue 1 - .long 0x47e03d80 # implver \$0 - lda \$2,-1 - .long 0x47e20c21 # amask \$2,\$1 - lda \$16,\$Lformat - mov \$0,\$17 - not \$1,\$18 - jsr \$26,printf - ldgp \$29,0(\$26) - mov 0,\$16 - jsr \$26,exit - .end main -EOF - eval $set_cc_for_build - $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null - if test "$?" = 0 ; then - case `./$dummy` in - 0-0) - UNAME_MACHINE="alpha" - ;; - 1-0) - UNAME_MACHINE="alphaev5" - ;; - 1-1) - UNAME_MACHINE="alphaev56" - ;; - 1-101) - UNAME_MACHINE="alphapca56" - ;; - 2-303) - UNAME_MACHINE="alphaev6" - ;; - 2-307) - UNAME_MACHINE="alphaev67" - ;; - 2-1307) - UNAME_MACHINE="alphaev68" - ;; - esac - fi - rm -f $dummy.s $dummy - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit 0 ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit 0 ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit 0 ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit 0;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit 0 ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit 0 ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit 0;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit 0;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit 0 ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit 0 ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - i86pc:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit 0 ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit 0 ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit 0 ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit 0 ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit 0 ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit 0 ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit 0 ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit 0 ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit 0 ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit 0 ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit 0 ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit 0 ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD $dummy.c -o $dummy \ - && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ - && rm -f $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy - echo mips-mips-riscos${UNAME_RELEASE} - exit 0 ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit 0 ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit 0 ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit 0 ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit 0 ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit 0 ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit 0 ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit 0 ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit 0 ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit 0 ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit 0 ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit 0 ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit 0 ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit 0 ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy - echo rs6000-ibm-aix3.2.5 - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit 0 ;; - *:AIX:*:[45]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit 0 ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit 0 ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit 0 ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit 0 ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit 0 ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit 0 ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit 0 ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit 0 ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`./$dummy` - if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi - rm -f $dummy.c $dummy - fi ;; - esac - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit 0 ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit 0 ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy - echo unknown-hitachi-hiuxwe2 - exit 0 ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit 0 ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit 0 ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit 0 ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit 0 ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit 0 ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit 0 ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit 0 ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit 0 ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit 0 ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit 0 ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit 0 ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit 0 ;; - CRAY*X-MP:*:*:*) - echo xmp-cray-unicos - exit 0 ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit 0 ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; - CRAY*T3D:*:*:*) - echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; - CRAY-2:*:*:*) - echo cray2-cray-unicos - exit 0 ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit 0 ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit 0 ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; - *:FreeBSD:*:*) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit 0 ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit 0 ;; - i*:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit 0 ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit 0 ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i386-pc-interix - exit 0 ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit 0 ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit 0 ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - *:GNU:*:*) - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit 0 ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit 0 ;; - arm*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux - exit 0 ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; - mips:Linux:*:*) - case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in - big) echo mips-unknown-linux-gnu && exit 0 ;; - little) echo mipsel-unknown-linux-gnu && exit 0 ;; - esac - ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit 0 ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit 0 ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit 0 ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac - exit 0 ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit 0 ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit 0 ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu - exit 0 ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - ld_supported_targets=`cd /; ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g - s/.*supported targets: *// - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit 0 ;; - coff-i386) - echo "${UNAME_MACHINE}-pc-linux-gnucoff" - exit 0 ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit 0 ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - cat >$dummy.c < -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif -#ifdef __ELF__ -# ifdef __GLIBC__ -# if __GLIBC__ >= 2 - printf ("%s-pc-linux-gnu\n", argv[1]); -# else - printf ("%s-pc-linux-gnulibc1\n", argv[1]); -# endif -# else - printf ("%s-pc-linux-gnulibc1\n", argv[1]); -# endif -#else - printf ("%s-pc-linux-gnuaout\n", argv[1]); -#endif - return 0; -} -EOF - $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy - test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 - ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit 0 ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit 0 ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit 0 ;; - i*86:*:5:[78]*) - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit 0 ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` - (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit 0 ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit 0 ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i386. - echo i386-pc-msdosdjgpp - exit 0 ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit 0 ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit 0 ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit 0 ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit 0 ;; - M68*:*:R3V[567]*:*) - test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; - 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4.3${OS_REL} && exit 0 - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4 && exit 0 ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit 0 ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit 0 ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit 0 ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit 0 ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit 0 ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit 0 ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit 0 ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit 0 ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit 0 ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit 0 ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit 0 ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit 0 ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit 0 ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit 0 ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit 0 ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit 0 ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit 0 ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit 0 ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit 0 ;; - *:Darwin:*:*) - echo `uname -p`-apple-darwin${UNAME_RELEASE} - exit 0 ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - if test "${UNAME_MACHINE}" = "x86pc"; then - UNAME_MACHINE=pc - fi - echo `uname -p`-${UNAME_MACHINE}-nto-qnx - exit 0 ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit 0 ;; - NSR-[KW]:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit 0 ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit 0 ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit 0 ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit 0 ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit 0 ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit 0 ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit 0 ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit 0 ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit 0 ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit 0 ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit 0 ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit 0 ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit 0 ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit 0 ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0 -rm -f $dummy.c $dummy - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit 0 ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit 0 ;; - c34*) - echo c34-convex-bsd - exit 0 ;; - c38*) - echo c38-convex-bsd - exit 0 ;; - c4*) - echo c4-convex-bsd - exit 0 ;; - esac -fi - -cat >&2 < in order to provide the needed -information to handle your system. - -config.guess timestamp = $timestamp - -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/helm/minidom/config.sub b/helm/minidom/config.sub deleted file mode 100644 index 24794696d..000000000 --- a/helm/minidom/config.sub +++ /dev/null @@ -1,1417 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 -# Free Software Foundation, Inc. - -timestamp='2001-11-08' - -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS - -Canonicalize a configuration name. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 -Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit 0 ;; - --version | -v ) - echo "$version" ; exit 0 ;; - --help | --h* | -h ) - echo "$usage"; exit 0 ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 - exit 0;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis) - os= - basic_machine=$1 - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ - | c4x | clipper \ - | d10v | d30v | dsp16xx \ - | fr30 \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ - | m32r | m68000 | m68k | m88k | mcore \ - | mips16 | mips64 | mips64el | mips64orion | mips64orionel \ - | mips64vr4100 | mips64vr4100el | mips64vr4300 \ - | mips64vr4300el | mips64vr5000 | mips64vr5000el \ - | mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \ - | mipsisa32 \ - | mn10200 | mn10300 \ - | ns16k | ns32k \ - | openrisc \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ - | sh | sh[34] | sh[34]eb | shbe | shle \ - | sparc | sparc64 | sparclet | sparclite | sparcv9 | sparcv9b \ - | strongarm \ - | tahoe | thumb | tic80 | tron \ - | v850 \ - | we32k \ - | x86 | xscale | xstormy16 \ - | z8k) - basic_machine=$basic_machine-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alphapca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armv*-* \ - | avr-* \ - | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c54x-* \ - | clipper-* | cray2-* | cydra-* \ - | d10v-* | d30v-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fr30-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | m32r-* \ - | m68000-* | m680[01234]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | mcore-* \ - | mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \ - | mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipseb-* \ - | mipsle-* | mipsel-* | mipstx39-* | mipstx39el-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* \ - | sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* \ - | sparc-* | sparc64-* | sparc86x-* | sparclite-* \ - | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* \ - | t3e-* | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \ - | v850-* | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xmp-* | xps100-* | xscale-* | xstormy16-* \ - | ymp-* \ - | z8k-*) - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | ymp) - basic_machine=ymp-cray - os=-unicos - ;; - cray2) - basic_machine=cray2-cray - os=-unicos - ;; - [cjt]90) - basic_machine=${basic_machine}-cray - os=-unicos - ;; - crds | unos) - basic_machine=m68k-crds - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mipsel*-linux*) - basic_machine=mipsel-unknown - os=-linux-gnu - ;; - mips*-linux*) - basic_machine=mips-unknown - os=-linux-gnu - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - mmix*) - basic_machine=mmix-knuth - os=-mmixware - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon) - basic_machine=i686-pc - ;; - pentiumii | pentium2) - basic_machine=i686-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=t3e-cray - os=-unicos - ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - windows32) - basic_machine=i386-pc - os=-windows32-msvcrt - ;; - xmp) - basic_machine=xmp-cray - os=-unicos - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - mips) - if [ x$os = x-linux-gnu ]; then - basic_machine=mips-unknown - else - basic_machine=mips-mips - fi - ;; - romp) - basic_machine=romp-ibm - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh3 | sh4 | sh3eb | sh4eb) - basic_machine=sh-unknown - ;; - sparc | sparcv9 | sparcv9b) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - c4x*) - basic_machine=c4x-none - os=-coff - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ - | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto*) - os=-nto-qnx - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -ns2 ) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - m68*-cisco) - os=-aout - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-ibm) - os=-aix - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -vxsim* | -vxworks*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os -exit 0 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/helm/minidom/configure.in b/helm/minidom/configure.in deleted file mode 100644 index c6067b0ae..000000000 --- a/helm/minidom/configure.in +++ /dev/null @@ -1,82 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. -AC_INIT(minidom.c) - -MINIDOM_MAJOR_VERSION=0 -MINIDOM_MINOR_VERSION=1 -MINIDOM_MICRO_VERSION=4 -MINIDOM_VERSION=$MINIDOM_MAJOR_VERSION.$MINIDOM_MINOR_VERSION.$MINIDOM_MICRO_VERSION -MINIDOM_VERSION_INFO=`expr $MINIDOM_MAJOR_VERSION + $MINIDOM_MINOR_VERSION`:$MINIDOM_MICRO_VERSION:$MINIDOM_MINOR_VERSION - -AC_SUBST(MINIDOM_VERSION) -AC_SUBST(MINIDOM_VERSION_INFO) - -AC_ARG_WITH( - libxml2, - [ --with-libxml2[=ARG] compile with libxml 2.x library [default=auto]], - libxml2=$withval, - libxml2="auto" -) - -AM_INIT_AUTOMAKE(minidom, $MINIDOM_VERSION) -AM_CONFIG_HEADER(config.h) -AM_PROG_LIBTOOL - -dnl Checks for programs. -AC_PROG_CC -AC_LANG_C -AC_PROG_RANLIB - -dnl Checks for libraries. -AC_CHECK_LIB(glib, g_malloc, - [ - CFLAGS="$CFLAGS `glib-config --cflags`" - CXXFLAGS="$CXXFLAGS `glib-config --cflags`" - LIBS="$LIBS `glib-config --libs`" - ], - AC_MSG_ERROR(cound not find glib), - `glib-config --libs` -) - -AC_CHECK_PROG(XML_CONFIG, xml2-config, xml2-config, no) -if test $XML_CONFIG = "no"; then - AC_CHECK_PROG(XML_CONFIG, xml-config, xml-config, no) -fi -AC_SUBST(XML_CONFIG) - -if test $XML_CONFIG = "no"; then - AC_MSG_ERROR(could not find configuration script for libxml) -fi - -if test $XML_CONFIG = "xml2-config" -a $libxml2 = "auto"; then - libxml2="yes" -fi - -CFLAGS="$CFLAGS `$XML_CONFIG --cflags`" -CXXFLAGS="$CXXFLAGS `$XML_CONFIG --cflags`" -LIBS="$LIBS `$XML_CONFIG --libs`" - -dnl if the user gave no explicit libxml2 option, try to guess its value -if test $libxml2 = "auto"; then - AC_MSG_CHECKING(for libxml version 2) - AC_TRY_COMPILE( - [#include ], - [ - xmlEntity e; - e.etype = e.etype; - ], - [ - AC_DEFINE(HAVE_LIBXML2) - AC_MSG_RESULT(maybe) - ], - AC_MSG_RESULT(no) - ) -elif test $libxml2 = "yes"; then - AC_DEFINE(HAVE_LIBXML2) -fi - -dnl Checks for header files. - -AC_OUTPUT([ - Makefile - minidom.spec -]) diff --git a/helm/minidom/debian/README.helm b/helm/minidom/debian/README.helm deleted file mode 100644 index d899a74d2..000000000 --- a/helm/minidom/debian/README.helm +++ /dev/null @@ -1,7 +0,0 @@ -To obtain a *clean* debianized source tree from which invoke debuild, -dpkg-buildpackage or so, run debian/debianize.helm from the root directory of -this module. - -Next change to that dir and have fun with debian packaging! - --- Zack diff --git a/helm/minidom/debian/autopippe.helm b/helm/minidom/debian/autopippe.helm deleted file mode 100644 index 9c5e5e706..000000000 --- a/helm/minidom/debian/autopippe.helm +++ /dev/null @@ -1,5 +0,0 @@ -aclocal -autoheader -automake -a -automake -a -autoconf diff --git a/helm/minidom/debian/changelog b/helm/minidom/debian/changelog deleted file mode 100644 index 55032b93f..000000000 --- a/helm/minidom/debian/changelog +++ /dev/null @@ -1,40 +0,0 @@ -minidom (0.1.3-1) unstable; urgency=low - - * New upstream release - - -- Stefano Zacchiroli Mon, 12 Nov 2001 17:26:18 +0100 - -minidom (0.1.2-2) unstable; urgency=low - - * upgraded config.sub and config.guess in order to support hppa and other - architectures (closes: Bug#103063, Bug#103351) - - -- Stefano Zacchiroli Wed, 4 Jul 2001 19:04:24 +0200 - -minidom (0.1.2-1) unstable; urgency=low - - * New upstream release - - -- Stefano Zacchiroli Tue, 22 May 2001 14:18:19 +0200 - -minidom (0.1.0-3) unstable; urgency=low - - * Changed section of libminidom0 and libminidom-dev - - -- Stefano Zacchiroli (Zack) Mon, 19 Feb 2001 21:25:26 +0100 - -minidom (0.1.0-2) unstable; urgency=low - - * Removed zero sized files and unnecessary extra license info - - -- Stefano Zacchiroli (Zack) Thu, 1 Feb 2001 18:37:12 +0100 - -minidom (0.1.0-1) unstable; urgency=low - - * Initial Release. - - -- Stefano Zacchiroli (Zack) Sun, 21 Jan 2001 18:24:26 +0100 - -Local variables: -mode: debian-changelog -End: diff --git a/helm/minidom/debian/control b/helm/minidom/debian/control deleted file mode 100644 index 1914d0e61..000000000 --- a/helm/minidom/debian/control +++ /dev/null @@ -1,23 +0,0 @@ -Source: minidom -Section: devel -Priority: optional -Maintainer: Stefano Zacchiroli (Zack) -Build-Depends: debhelper (>> 2.0.0), libxml2-dev, libglib1.2-dev -Standards-Version: 3.2.1 - -Package: libminidom0 -Section: libs -Architecture: any -Depends: ${shlibs:Depends} -Description: A minimal implementation of the Document Object Model - Minidom is a minimal implementation of the Document Object Model. - This package include the shared library. - -Package: libminidom-dev -Section: devel -Architecture: any -Depends: libminidom0 (= ${Source-Version}), libc6-dev -Description: A minimal implementation of the Document Object Model - Minidom is a minimal implementation of the Document Object Model. - This package includes the development and runtime support files. - diff --git a/helm/minidom/debian/copyright b/helm/minidom/debian/copyright deleted file mode 100644 index 5acf27224..000000000 --- a/helm/minidom/debian/copyright +++ /dev/null @@ -1,28 +0,0 @@ -This package was debianized by Stefano Zacchiroli on -Sun, 21 Jan 2001 18:24:26 +0100. - -It was packed from source obtained via cvs, with this CVSROOT: - :pserver:anonymous@phd.cs.unibo.it:/home/lpadovan/PHELM/ - -Upstream Author(s): Luca Padovani - -Copyright: - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the Free - Software Foundation; either version 2 of the License, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - On Debian GNU/Linux systems, the complete text of the GNU General - Public License can be found in `/usr/share/common-licenses/GPL'. - The GNU Public Licenses in /usr/share/common-licenses were taken from - ftp.gnu.org and are copyrighted by the Free Software Foundation, Inc. - diff --git a/helm/minidom/debian/debianize.helm b/helm/minidom/debian/debianize.helm deleted file mode 100755 index 5bdbe1789..000000000 --- a/helm/minidom/debian/debianize.helm +++ /dev/null @@ -1,97 +0,0 @@ -#!/bin/sh - -# HELM project convenience script -# -# call this as "debian/debianize.helm" to convert a checked out CVS -# module to a debianize source tree ready to be called against debuild -# or dpkg-buildpackage -# -# Stefano "Zack" Zacchiroli -# Sun Nov 25 16:50:10 CET 2001 - -NAME="MINIDOM" # package name in configure.in's opinion -CONFIGURE_IN="configure.in" # configure.in - -# TAR="tar" -# TARFLAGS="-cz" # tar flags used when creating source package - -if [ -z $NAME ]; then - echo "Please edit me and configure the 'NAME' parameter." - exit 1 -fi - - # parse version number from configure.in -echo "Retrieving version number from $CONFIGURE_IN ..." -VERSION="" -for v in MAJOR MINOR MICRO; do - T=`grep "$NAME\_$v\_VERSION\=" $CONFIGURE_IN` - T=`echo $T | sed -e 's/.*=//'` - if [ -z $VERSION ]; then - VERSION=$T - else - VERSION="$VERSION.$T" - fi -done -echo "Version number is: $VERSION" - - # create a new working dir named with the "name-version" schema -echo "Creating debianized source tree ..." -OLDDIR=`basename \`pwd\`` -NEWDIR="$OLDDIR-$VERSION" -cd .. -if [ -d $NEWDIR ]; then - echo "'../$NEWDIR' already exists, please remove it before continue" - exit 1 -fi -cp -r $OLDDIR $NEWDIR -cd $NEWDIR -echo "Debianized source tree starts at `pwd`" - - # autopippe: autoconf, automake, aclocal, ... -echo "Executing auto-* tools ..." -source debian/autopippe.helm -echo "auto-* executed!" - - # remove CVS related files, and other garbage -echo "Removing garbage files ..." -find . -regex '.*\.cvsignore' -exec rm -f {} \; -find . -regex '.*CVS.*' -and -type d -exec rm -rf {} \; -GARBAGES=`egrep -v '^#' debian/garbage.helm` -for p in $GARBAGES; do - find . -name $p -exec rm -f {} \; -done -echo "Garbage removed!" - - # fix remote symlinks -echo "Dereferencing absolute symlinks ..." -PWD=`pwd` -for l in `find . -type l -maxdepth 1`; do # loop on symlink in this dir - SOURCE=$l - TARGET=`readlink $l` - if `echo $TARGET | egrep "^/" > /dev/null`; then - echo "$SOURCE -> $TARGET" - rm -f $SOURCE - cp $TARGET $SOURCE - fi # if symlink does not begin with "/" then it is relative -done -echo "Dereferencing done!" - - # upgrade debian changelog -echo "Upgrading debian changelog version to $VERSION ..." -dch --newversion $VERSION -echo "Debian changelog upgraded!" - -# # build debian native source package -# echo -n "Building debian (native) source package: " -# DEBVERSION=`dpkg-parsechangelog -ldebian/changelog | egrep '^Version: ' | sed -e 's/Version: //'` -# DEBNAME=`dpkg-parsechangelog -ldebian/changelog | egrep '^Source: ' | sed -e 's/Source: //'` -# SOURCEPKGFILE="$DEBNAME""_""$DEBVERSION.tar.gz" -# echo "../$SOURCEPKGFILE" -# cd .. -# $TAR $TARFLAGS -f $SOURCEPKGFILE $NEWDIR - -echo -echo "Debianization is over." -echo "Please change to ../$NEWDIR in order to build the debian package." - - diff --git a/helm/minidom/debian/docs b/helm/minidom/debian/docs deleted file mode 100644 index 7d96d4e7e..000000000 --- a/helm/minidom/debian/docs +++ /dev/null @@ -1,2 +0,0 @@ -AUTHORS -TODO diff --git a/helm/minidom/debian/garbage.helm b/helm/minidom/debian/garbage.helm deleted file mode 100644 index 3542a1b97..000000000 --- a/helm/minidom/debian/garbage.helm +++ /dev/null @@ -1,2 +0,0 @@ -# find patterns; files that match will be removed from debian package. -*.helm diff --git a/helm/minidom/debian/libminidom-dev.files b/helm/minidom/debian/libminidom-dev.files deleted file mode 100644 index afb977f37..000000000 --- a/helm/minidom/debian/libminidom-dev.files +++ /dev/null @@ -1,5 +0,0 @@ -usr/lib/*.so -usr/lib/*.a -usr/lib/*.la -usr/include/ -usr/bin/ diff --git a/helm/minidom/debian/libminidom-dev.undocumented b/helm/minidom/debian/libminidom-dev.undocumented deleted file mode 100644 index 8d08f8e71..000000000 --- a/helm/minidom/debian/libminidom-dev.undocumented +++ /dev/null @@ -1 +0,0 @@ -minidom-config.1 diff --git a/helm/minidom/debian/libminidom0.files b/helm/minidom/debian/libminidom0.files deleted file mode 100644 index 093956b17..000000000 --- a/helm/minidom/debian/libminidom0.files +++ /dev/null @@ -1 +0,0 @@ -usr/lib/*.so.* diff --git a/helm/minidom/debian/libminidom0.postinst b/helm/minidom/debian/libminidom0.postinst deleted file mode 100644 index 1b6c8ba16..000000000 --- a/helm/minidom/debian/libminidom0.postinst +++ /dev/null @@ -1,47 +0,0 @@ -#! /bin/sh -# postinst script for libminidom0 -# -# see: dh_installdeb(1) - -set -e - -# summary of how this script can be called: -# * `configure' -# * `abort-upgrade' -# * `abort-remove' `in-favour' -# -# * `abort-deconfigure' `in-favour' -# `removing' -# -# for details, see /usr/share/doc/packaging-manual/ -# -# quoting from the policy: -# Any necessary prompting should almost always be confined to the -# post-installation script, and should be protected with a conditional -# so that unnecessary prompting doesn't happen if a package's -# installation fails and the `postinst' is called with `abort-upgrade', -# `abort-remove' or `abort-deconfigure'. - -case "$1" in - configure) - ldconfig - ;; - - abort-upgrade|abort-remove|abort-deconfigure) - - ;; - - *) - echo "postinst called with unknown argument \`$1'" >&2 - exit 0 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 - - diff --git a/helm/minidom/debian/rules b/helm/minidom/debian/rules deleted file mode 100755 index 8ff12e4ac..000000000 --- a/helm/minidom/debian/rules +++ /dev/null @@ -1,101 +0,0 @@ -#!/usr/bin/make -f -# Sample debian/rules that uses debhelper. -# GNU copyright 1997 to 1999 by Joey Hess. - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - -# This is the debhelper compatability version to use. -export DH_COMPAT=2 - -# shared library versions, option 1 -#version=0.1.0 -#major=0 -# option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so -version=`ls src/.libs/lib*.so.* | \ - awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'` -major=`ls src/.libs/lib*.so.* | \ - awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'` - -configure: configure-stamp -configure-stamp: - dh_testdir - # Add here commands to configure the package. - ./configure --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info - - touch configure-stamp - -build: configure-stamp build-stamp -build-stamp: - dh_testdir - - # Add here commands to compile the package. - $(MAKE) - - touch build-stamp - -clean: - dh_testdir - dh_testroot - rm -f build-stamp configure-stamp - - # Add here commands to clean up after the build process. - -$(MAKE) distclean - - dh_clean - -install: build - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs - - # Add here commands to install the package into debian/minidom. - $(MAKE) install prefix=$(CURDIR)/debian/tmp/usr - - -# Build architecture-independent files here. -binary-indep: build install -# We have nothing to do by default. - -# Build architecture-dependent files here. -binary-arch: build install - dh_testdir - dh_testroot - # - # build libminidom${major} package by moving files from minidom-dev - # -# dh_movefiles -plibminidom$(major) \ -# usr/lib/libminidom.so.$(major) \ -# usr/lib/libminidom.so.$(version) -# dh_movefiles get file contents from debian/*.files - dh_movefiles - -# dh_installdebconf - dh_installdocs - dh_installexamples - dh_installmenu -# dh_installemacsen -# dh_installpam -# dh_installinit - dh_installcron - dh_installmanpages - dh_installinfo - dh_undocumented - dh_installchangelogs ChangeLog - dh_link - dh_strip - dh_compress - dh_fixperms - # You may want to make some executables suid here. -# dh_suidregister - dh_makeshlibs - dh_installdeb -# dh_perl - dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/helm/minidom/minidom-config.in b/helm/minidom/minidom-config.in deleted file mode 100644 index 5ed302925..000000000 --- a/helm/minidom/minidom-config.in +++ /dev/null @@ -1,48 +0,0 @@ - -usage() -{ - cat <&2 -fi - -while test $# -gt 0; do - case "$1" in - -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) optarg= ;; - esac - - case $1 in - --version) - echo $VERSION - ;; - --cflags) - echo_cflags=yes - ;; - --libs) - echo_libs=yes - ;; - *) - usage 1 1>&2 - ;; - esac - shift -done - -if test "$echo_cflags" = "yes"; then - echo `$XML_CONFIG --cflags` -I$pkgincludedir -fi - -if test "$echo_libs" = "yes"; then - echo `$XML_CONFIG --libs` -L$libdir -lminidom -fi - diff --git a/helm/minidom/minidom.c b/helm/minidom/minidom.c deleted file mode 100644 index 93cae440d..000000000 --- a/helm/minidom/minidom.c +++ /dev/null @@ -1,393 +0,0 @@ -/* - * Copyright (C) 2000, Luca Padovani . - * - * This file is part of miniDOM, a minimal implementation of the - * Document Object Model - * - * miniDOM is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * miniDOM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with miniDOM; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * For details, send a mail to - */ - -#include -#include -#include -#include - -#include "minidom.h" - -gboolean -mdom_string_eq(mDOMConstStringRef s1, mDOMConstStringRef s2) -{ - g_return_val_if_fail(s1 != NULL, FALSE); - g_return_val_if_fail(s2 != NULL, FALSE); - - return strcmp(C_CONST_STRING(s1), C_CONST_STRING(s2)) ? FALSE : TRUE; -} - -mDOMStringRef -mdom_string_dup(mDOMConstStringRef s) -{ - g_return_val_if_fail(s != NULL, NULL); - return xmlStrdup(s); -} - -void -mdom_string_free(mDOMStringRef s) -{ - g_free(s); -} - -mDOMDocRef -mdom_load(const char* file_name, gboolean subst, mDOMEntityResolver entity_resolver) -{ - xmlParserCtxtPtr ctxt; - mDOMDocRef doc; - - g_return_val_if_fail(file_name != NULL, NULL); - - xmlSubstituteEntitiesDefault(subst); - - ctxt = xmlCreateFileParserCtxt(file_name); - if (ctxt == NULL) return NULL; - g_assert(ctxt->sax != NULL); - ctxt->sax->getEntity = entity_resolver; - - xmlParseDocument(ctxt); - - doc = ctxt->myDoc; - xmlFreeParserCtxt(ctxt); - - return doc; -} - -void -mdom_unload(mDOMDocRef doc) -{ - g_return_if_fail(doc != NULL); - xmlFreeDoc(doc); -} - -mDOMDocRef -mdom_doc_new(mDOMConstStringRef version) -{ - mDOMDocRef doc; - - g_return_val_if_fail(version != NULL, NULL); - doc = xmlNewDoc(version); - g_return_val_if_fail(doc != NULL, NULL); - - doc->extSubset = xmlNewDtd(doc, DOM_CONST_STRING("Entities"), NULL, NULL); - - return doc; -} - -void -mdom_doc_free(mDOMDocRef doc) -{ - g_return_if_fail(doc != NULL); - xmlFreeDoc(doc); -} - -mDOMEntityRef -mdom_doc_add_entity(mDOMDocRef doc, mDOMConstStringRef name, mDOMConstStringRef content) -{ - g_return_val_if_fail(doc != NULL, NULL); - g_return_val_if_fail(name != NULL, NULL); - g_return_val_if_fail(content != NULL, NULL); -#ifdef HAVE_LIBXML2 - return xmlAddDtdEntity(doc, name, XML_INTERNAL_GENERAL_ENTITY, NULL, NULL, content); -#else - xmlAddDtdEntity(doc, name, XML_INTERNAL_GENERAL_ENTITY, NULL, NULL, content); - return NULL; -#endif -} - -mDOMEntityRef -mdom_doc_get_entity(mDOMDocRef doc, mDOMConstStringRef name) -{ - g_return_val_if_fail(doc != NULL, NULL); - g_return_val_if_fail(name != NULL, NULL); - return xmlGetDtdEntity(doc, name); -} - -mDOMEntityRef -mdom_get_predefined_entity(mDOMConstStringRef name) -{ - g_return_val_if_fail(name != NULL, NULL); - return xmlGetPredefinedEntity(name); -} - -mDOMConstStringRef -mdom_entity_get_content(mDOMEntityRef entity) -{ - g_return_val_if_fail(entity != NULL, NULL); - return entity->content; -} - -mDOMNodeRef -mdom_doc_get_root_node(mDOMDocRef doc) -{ - g_return_val_if_fail(doc != NULL, NULL); - return xmlDocGetRootElement(doc); -} - -void -mdom_node_set_user_data(mDOMNodeRef node, gpointer user_data) -{ - g_return_if_fail(node != NULL); -#ifndef XML_WITHOUT_CORBA - node->_private = user_data; -#else - g_assert_not_reached(); -#endif -} - -gpointer -mdom_node_get_user_data(mDOMNodeRef node) -{ - g_return_val_if_fail(node != NULL, NULL); -#ifndef XML_WITHOUT_CORBA - return node->_private; -#else - g_assert_not_reached(); -#endif -} - -gboolean -mdom_node_is_text(mDOMNodeRef node) -{ - g_return_val_if_fail(node != NULL, FALSE); - return xmlNodeIsText(node) ? TRUE : FALSE; -} - -gboolean -mdom_node_is_element(mDOMNodeRef node) -{ - g_return_val_if_fail(node != NULL, FALSE); - return node->type == XML_ELEMENT_NODE; -} - -gboolean -mdom_node_is_blank(mDOMNodeRef node) -{ - g_return_val_if_fail(node != NULL, FALSE); -#ifdef HAVE_LIBXML2 - return xmlIsBlankNode(node) ? TRUE : FALSE; -#else - return FALSE; -#endif -} - -gboolean -mdom_node_is_entity_ref(mDOMNodeRef node) -{ - g_return_val_if_fail(node != NULL, FALSE); - return node->type == XML_ENTITY_REF_NODE; -} - -guint -mdom_node_get_type(mDOMNodeRef node) -{ - g_return_val_if_fail(node != NULL, 0); - return node->type; -} - -mDOMConstStringRef -mdom_node_get_name(mDOMNodeRef node) -{ - g_return_val_if_fail(node != NULL, NULL); - return node->name; -} - -mDOMConstStringRef -mdom_node_get_ns_uri(mDOMNodeRef node) -{ - g_return_val_if_fail(node != NULL, NULL); - if (node->ns == NULL) return NULL; - return node->ns->href; -} - -mDOMStringRef -mdom_node_get_attribute(mDOMNodeRef node, mDOMConstStringRef name) -{ - g_return_val_if_fail(node != NULL, NULL); - g_return_val_if_fail(name != NULL, NULL); - return xmlGetProp(node, name); -} - -mDOMStringRef -mdom_node_get_attribute_ns(mDOMNodeRef node, mDOMConstStringRef name, mDOMConstStringRef uri) -{ - g_return_val_if_fail(node != NULL, NULL); - g_return_val_if_fail(uri != NULL, NULL); - g_return_val_if_fail(name != NULL, NULL); - g_return_val_if_fail(mdom_node_is_element(node), NULL); - return xmlGetNsProp(node, name, uri); -} - -gboolean -mdom_node_has_attribute(mDOMNodeRef node, mDOMConstStringRef name) -{ -#ifndef HAVE_LIBXML2 - mDOMStringRef s = NULL; -#endif /* HAVE_LIBXML2 */ - g_return_val_if_fail(node != NULL, FALSE); - g_return_val_if_fail(name != NULL, FALSE); -#ifdef HAVE_LIBXML2 - return (xmlHasProp(node, name) != NULL) ? TRUE : FALSE; -#else - s = xmlGetProp(node, name); - if (s != NULL) { - mdom_string_free(s); - return TRUE; - } - return FALSE; -#endif /* HAVE_LIBXML2 */ -} - -gboolean -mdom_node_has_attribute_ns(mDOMNodeRef node, mDOMConstStringRef name, mDOMConstStringRef uri) -{ - g_return_val_if_fail(node != NULL, FALSE); - g_return_val_if_fail(name != NULL, FALSE); - g_return_val_if_fail(uri != NULL, FALSE); -#ifdef HAVE_LIBXML2 - return (xmlHasNsProp(node, name, uri) != NULL) ? TRUE : FALSE; -#else - return FALSE; -#endif /* HAVE_LIBXML2 */ -} - -mDOMStringRef -mdom_node_get_content(mDOMNodeRef node) -{ - g_return_val_if_fail(node != NULL, NULL); - return xmlNodeGetContent(node); -} - -mDOMNodeRef -mdom_node_get_parent(mDOMNodeRef node) -{ - g_return_val_if_fail(node != NULL, NULL); - return node->parent; -} - -mDOMNodeRef -mdom_node_get_prev_sibling(mDOMNodeRef node) -{ - g_return_val_if_fail(node != NULL, NULL); - return node->prev; -} - -mDOMNodeRef -mdom_node_get_next_sibling(mDOMNodeRef node) -{ - g_return_val_if_fail(node != NULL, NULL); - return node->next; -} - -mDOMNodeRef -mdom_node_get_first_child(mDOMNodeRef node) -{ - g_return_val_if_fail(node != NULL, NULL); -#ifdef HAVE_LIBXML2 - return node->children; -#else - return node->childs; -#endif -} - -mDOMAttrRef -mdom_node_get_first_attribute(mDOMNodeRef node) -{ - g_return_val_if_fail(node != NULL, NULL); - return node->properties; -} - -gboolean -mdom_node_is_first(mDOMNodeRef node) -{ - g_return_val_if_fail(node != NULL, FALSE); - return node->prev == NULL; -} - -gboolean -mdom_node_is_last(mDOMNodeRef node) -{ - g_return_val_if_fail(node != NULL, FALSE); - return node->next == NULL; -} - -mDOMConstStringRef -mdom_attr_get_name(mDOMAttrRef attr) -{ - g_return_val_if_fail(attr != NULL, NULL); - return attr->name; -} - -mDOMConstStringRef -mdom_attr_get_ns_uri(mDOMAttrRef attr) -{ - g_return_val_if_fail(attr != NULL, NULL); - if (attr->ns == NULL) return NULL; - return attr->ns->href; -} - -mDOMStringRef -mdom_attr_get_value(mDOMAttrRef attr) -{ -#ifdef HAVE_LIBXML2 - g_return_val_if_fail(attr != NULL, NULL); - return xmlNodeListGetString(attr->doc, attr->children, 1); -#else - mDOMNodeRef child; - g_return_val_if_fail(attr != NULL, NULL); - - child = attr->val; - if (child == NULL) return NULL; - else return xmlNodeListGetString(child->doc, attr->val, 1); -#endif -} - -mDOMAttrRef -mdom_attr_get_prev_sibling(mDOMAttrRef attr) -{ -#ifdef HAVE_LIBXML2 - g_return_val_if_fail(attr != NULL, NULL); - return attr->prev; -#else - /* in libxml 1.x there is no prev link in attributes */ - return NULL; -#endif -} - -mDOMAttrRef -mdom_attr_get_next_sibling(mDOMAttrRef attr) -{ - g_return_val_if_fail(attr != NULL, NULL); - return attr->next; -} - -mDOMNodeRef -mdom_attr_get_parent(mDOMAttrRef attr) -{ - g_return_val_if_fail(attr != NULL, NULL); -#ifdef HAVE_LIBXML2 - return attr->parent; -#else - return attr->node; -#endif -} diff --git a/helm/minidom/minidom.h b/helm/minidom/minidom.h deleted file mode 100644 index bb2b91013..000000000 --- a/helm/minidom/minidom.h +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (C) 2000, Luca Padovani . - * - * This file is part of miniDOM, a minimal implementation of the - * Document Object Model - * - * miniDOM is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * miniDOM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with miniDOM; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * For details, send a mail to - */ - -#ifndef minidom_h -#define minidom_h - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - typedef xmlChar* mDOMStringRef; - typedef const xmlChar* mDOMConstStringRef; - typedef xmlDocPtr mDOMDocRef; - typedef xmlNodePtr mDOMNodeRef; - typedef xmlAttrPtr mDOMAttrRef; - typedef xmlEntityPtr mDOMEntityRef; - typedef xmlNsPtr mDOMNsRef; - - typedef xmlEntityPtr (*mDOMEntityResolver)(void*, mDOMConstStringRef); - -#define C_STRING(s) ((char*) (s)) -#define C_CONST_STRING(s) ((const char*) (s)) -#define DOM_STRING(s) ((mDOMStringRef) (s)) -#define DOM_CONST_STRING(s) ((mDOMConstStringRef) (s)) - - mDOMDocRef mdom_load(const char*, gboolean, mDOMEntityResolver); - void mdom_unload(mDOMDocRef); - - gboolean mdom_string_eq(mDOMConstStringRef, mDOMConstStringRef); - void mdom_string_free(mDOMStringRef); - mDOMStringRef mdom_string_dup(mDOMConstStringRef); - - mDOMDocRef mdom_doc_new(mDOMConstStringRef); - void mdom_doc_free(mDOMDocRef); - mDOMNodeRef mdom_doc_get_root_node(mDOMDocRef); - mDOMEntityRef mdom_doc_add_entity(mDOMDocRef, mDOMConstStringRef, mDOMConstStringRef); - mDOMEntityRef mdom_doc_get_entity(mDOMDocRef, mDOMConstStringRef); - mDOMEntityRef mdom_get_predefined_entity(mDOMConstStringRef); - mDOMConstStringRef mdom_entity_get_content(mDOMEntityRef); - -#if 0 - mDOMNsRef mdom_doc_search_ns(mDOMDocRef, mDOMNodeRef, mDOMConstStringRef); - mDOMNsRef mdom_doc_search_ns_by_uri(mDOMDocRef, mDOMNodeRef, mDOMConstStringRef); - void mdom_ns_free(mDOMNsRef); - mDOMNsRef mdom_node_ns_new(mDOMNodeRef, mDOMConstStringRef, mDOMConstStringRef); -#endif - - void mdom_node_set_user_data(mDOMNodeRef, gpointer); - gpointer mdom_node_get_user_data(mDOMNodeRef); - gboolean mdom_node_is_text(mDOMNodeRef); - gboolean mdom_node_is_element(mDOMNodeRef); - gboolean mdom_node_is_entity_ref(mDOMNodeRef); - gboolean mdom_node_is_blank(mDOMNodeRef); - guint mdom_node_get_type(mDOMNodeRef); - mDOMConstStringRef mdom_node_get_name(mDOMNodeRef); - mDOMConstStringRef mdom_node_get_ns_uri(mDOMNodeRef); - mDOMStringRef mdom_node_get_attribute(mDOMNodeRef, mDOMConstStringRef); - mDOMStringRef mdom_node_get_attribute_ns(mDOMNodeRef, mDOMConstStringRef, mDOMConstStringRef); - gboolean mdom_node_has_attribute(mDOMNodeRef, mDOMConstStringRef); - gboolean mdom_node_has_attribute_ns(mDOMNodeRef, mDOMConstStringRef, mDOMConstStringRef); - mDOMStringRef mdom_node_get_content(mDOMNodeRef); - mDOMNodeRef mdom_node_get_parent(mDOMNodeRef); - mDOMNodeRef mdom_node_get_prev_sibling(mDOMNodeRef); - mDOMNodeRef mdom_node_get_next_sibling(mDOMNodeRef); - mDOMNodeRef mdom_node_get_first_child(mDOMNodeRef); - mDOMAttrRef mdom_node_get_first_attribute(mDOMNodeRef); - gboolean mdom_node_is_first(mDOMNodeRef); - gboolean mdom_node_is_last(mDOMNodeRef); - - mDOMConstStringRef mdom_attr_get_name(mDOMAttrRef); - mDOMConstStringRef mdom_attr_get_ns_uri(mDOMAttrRef); - mDOMStringRef mdom_attr_get_value(mDOMAttrRef); - mDOMAttrRef mdom_attr_get_prev_sibling(mDOMAttrRef); - mDOMAttrRef mdom_attr_get_next_sibling(mDOMAttrRef); - mDOMNodeRef mdom_attr_get_parent(mDOMAttrRef); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* minidom_h */ - diff --git a/helm/minidom/minidom.spec.in b/helm/minidom/minidom.spec.in deleted file mode 100644 index 6c44be122..000000000 --- a/helm/minidom/minidom.spec.in +++ /dev/null @@ -1,31 +0,0 @@ -Summary: A minimal implementation of the DOM based on libxml2 -Name: minidom -Version: @VERSION@ -Release: 1 -Copyright: GPL -Group: Development/Libraries -Source: www.cs.unibo.it:/~lpadovan/mml-widget/minidom-@VERSION@.tar.gz -%description -miniDOM is a minimal implementation of the Document Object -Model. - -%prep -%setup - -%build -./configure -make - -%install -make install - -%files -%doc AUTHORS BUGS COPYING ChangeLog HISTORY INSTALL LICENSE NEWS README TODO - -/usr/local/bin/minidom-config -/usr/local/lib/libminidom.so -/usr/local/lib/libminidom.so.0 -/usr/local/lib/libminidom.so.@VERSION@ -/usr/local/lib/libminidom.a -/usr/local/lib/libminidom.la -/usr/local/include/minidom/ diff --git a/helm/minidom/stamp-h.in b/helm/minidom/stamp-h.in deleted file mode 100644 index 9788f7023..000000000 --- a/helm/minidom/stamp-h.in +++ /dev/null @@ -1 +0,0 @@ -timestamp diff --git a/helm/pacchetti/Makefile b/helm/pacchetti/Makefile deleted file mode 100644 index e47e23f45..000000000 --- a/helm/pacchetti/Makefile +++ /dev/null @@ -1,76 +0,0 @@ -all: helm_configuration helm_data helm_http_getter helm_xsltd helm_gtk_interface -clean: - rm -f helm_*.spec helm_*.tar.gz - -helm_configuration: prep_helm_configuration clean_helm_configuration - -prep_helm_configuration: - cvs export -D20100101 configuration - mv configuration/helm_configuration-0.0.1-1.spec . - (cd configuration ; autoconf) - mv configuration helm_configuration-0.0.1 - tar -zcvf helm_configuration-0.0.1-1.tar.gz helm_configuration-0.0.1 - -clean_helm_configuration: - rm -rf helm_configuration-0.0.1 - - - -helm_data: prep_helm_data clean_helm_data - -prep_helm_data: - cvs export -D20100101 helm_data - mv helm_data/helm_data-0.0.1-1.spec . - (cd helm_data ; cvs export -D20100101 dtd ; cvs export -D20100101 style ; autoconf) - mv helm_data helm_data-0.0.1 - tar -zcvf helm_data-0.0.1-1.tar.gz helm_data-0.0.1 - -clean_helm_data: - rm -rf helm_data-0.0.1 - - - -helm_http_getter: prep_helm_http_getter clean_helm_http_getter - -prep_helm_http_getter: - cvs export -D20100101 http_getter - mv http_getter/helm_http_getter-0.0.1-1.spec . - (cd http_getter ; autoconf) - mv http_getter helm_http_getter-0.0.1 - tar -zcvf helm_http_getter-0.0.1-1.tar.gz helm_http_getter-0.0.1 - -clean_helm_http_getter: - rm -rf helm_http_getter-0.0.1 - - - -helm_xsltd: prep_helm_xsltd clean_helm_xsltd - -prep_helm_xsltd: - cvs export -D20100101 xsltd - mv xsltd/helm_xsltd-0.0.1-1.spec . - (cd xsltd ; autoconf) - mv xsltd helm_xsltd-0.0.1 - tar -zcvf helm_xsltd-0.0.1-1.tar.gz helm_xsltd-0.0.1 - -clean_helm_xsltd: - rm -rf helm_xsltd-0.0.1 - - - -helm_gtk_interface: prep_helm_gtk_interface clean_helm_gtk_interface - -prep_helm_gtk_interface: - cvs export -D20100101 interface - mv interface/helm_gtk_interface-0.0.1-1.spec . - (cd interface ; autoconf) - mv interface helm_gtk_interface-0.0.1 - tar -zcvf helm_gtk_interface-0.0.1-1.tar.gz helm_gtk_interface-0.0.1 - -clean_helm_gtk_interface: - rm -rf helm_gtk_interface-0.0.1 - - - - -PHONY: all clean helm_configuration prep_helm_configuration clean_helm_configuration diff --git a/helm/xsltd/.cvsignore b/helm/xsltd/.cvsignore deleted file mode 100644 index 4b1a68e29..000000000 --- a/helm/xsltd/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -Makefile configure config.log config.cache config.status start-xaland diff --git a/helm/xsltd/AUTHORS b/helm/xsltd/AUTHORS deleted file mode 100644 index 1088c5689..000000000 --- a/helm/xsltd/AUTHORS +++ /dev/null @@ -1 +0,0 @@ -Claudio Sacerdoti Coen diff --git a/helm/xsltd/COPYING b/helm/xsltd/COPYING deleted file mode 100644 index d60c31a97..000000000 --- a/helm/xsltd/COPYING +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/helm/xsltd/ChangeLog b/helm/xsltd/ChangeLog deleted file mode 100644 index 20c36b475..000000000 --- a/helm/xsltd/ChangeLog +++ /dev/null @@ -1 +0,0 @@ -28/12/2000: First alpha release diff --git a/helm/xsltd/Makefile.in b/helm/xsltd/Makefile.in deleted file mode 100644 index 1d43f9c18..000000000 --- a/helm/xsltd/Makefile.in +++ /dev/null @@ -1,16 +0,0 @@ - -BIN_DIR=@BIN_DIR@ -HELM_LIB_DIR=@HELM_LIB_DIR@ - -all: - -install: - cp start-xaland $(BIN_DIR) - cp xaland.class $(HELM_LIB_DIR) - -distclean: - rm -f Makefile configure config.log config.cache config.status \ - etc/configuration.xml etc/helm-math-engine-configuration.xml \ - lib/configuration.pl *.spec start-xaland - -.PHONY: all install distclean diff --git a/helm/xsltd/Makefile.old b/helm/xsltd/Makefile.old deleted file mode 100644 index a56803cc5..000000000 --- a/helm/xsltd/Makefile.old +++ /dev/null @@ -1,48 +0,0 @@ -JAVADIR = /opt/java/jdk1.3/bin -HELM_STYLES_DIR = file:/home/lpadovan/miohelm/style - -start-xaland: - java -ss1024K -oss8192K \ - xaland 12345 12346 \ - $(HELM_STYLES_DIR)/rootcontent.xsl \ - $(HELM_STYLES_DIR)/annotatedpres.xsl \ - $(HELM_STYLES_DIR)/theory_content.xsl \ - $(HELM_STYLES_DIR)/theory_pres.xsl - -start-xaland-DOM: - java -ss1024K -oss8192K \ - xaland_DOM 12345 12346 \ - $(HELM_STYLES_DIR)/rootcontent.xsl \ - $(HELM_STYLES_DIR)/annotatedpres.xsl \ - $(HELM_STYLES_DIR)/theory_content.xsl \ - $(HELM_STYLES_DIR)/theory_pres.xsl - -start-xaland-2: - java -ss1024K -oss8192K \ - xaland2 12345 12346 \ - $(HELM_STYLES_DIR)/rootcontent.xsl \ - $(HELM_STYLES_DIR)/annotatedpres.xsl \ - $(HELM_STYLES_DIR)/theory_content.xsl \ - $(HELM_STYLES_DIR)/theory_pres.xsl - -start-xaland-old: - java xaland 12345 12346 \ - $(HELM_STYLES_DIR)/style_prima_del_linguaggio_naturale/rootcontent.xsl \ - $(HELM_STYLES_DIR)/style_prima_del_linguaggio_naturale/annotatedpres.xsl \ - $(HELM_STYLES_DIR)/style_prima_del_linguaggio_naturale/theory_content.xsl \ - $(HELM_STYLES_DIR)/style_prima_del_linguaggio_naturale/theory_pres.xsl - -start-xaland-uwobo: - $(JAVADIR)/java -ss1024K -oss8192K \ - xaland_uwobo 12345 12346 12347 \ - $(HELM_STYLES_DIR)/rootcontent.xsl \ - $(HELM_STYLES_DIR)/annotatedpres.xsl \ - $(HELM_STYLES_DIR)/theory_content.xsl \ - $(HELM_STYLES_DIR)/theory_pres.xsl - -start-xaland3: - java xaland 12347 12348 \ - $(HELM_STYLES_DIR)/rootcontent.xsl \ - $(HELM_STYLES_DIR)/annotatedpres.xsl \ - $(HELM_STYLES_DIR)/theory_content.xsl \ - $(HELM_STYLES_DIR)/theory_pres.xsl diff --git a/helm/xsltd/NEWS b/helm/xsltd/NEWS deleted file mode 100644 index 20c36b475..000000000 --- a/helm/xsltd/NEWS +++ /dev/null @@ -1 +0,0 @@ -28/12/2000: First alpha release diff --git a/helm/xsltd/README b/helm/xsltd/README deleted file mode 100644 index ab2790be7..000000000 --- a/helm/xsltd/README +++ /dev/null @@ -1,8 +0,0 @@ -NOTE: This is the first alpha release of project HELM. - -HELM (Hypertextual Electronic Library of Mathematics) is a project aimed -at the creation of tools for the development and exploitation of a huge -distributed library of formal mathematical knowledge. This package holds -an UDP-based XSLT daemon. - -For more information see http://www.cs.unibo.it/helm diff --git a/helm/xsltd/config.cache.pkg b/helm/xsltd/config.cache.pkg deleted file mode 100644 index 97be23b13..000000000 --- a/helm/xsltd/config.cache.pkg +++ /dev/null @@ -1,4 +0,0 @@ -# This is the config.cache that holds the ``standard'' path for the -# HELM library. It is supposed to be used when creating packages - -helm_cv_HELM_STYLES_DIR=${helm_cv_HELM_STYLES_DIR='$RESOLVED_PREFIX/share/helm/style'} diff --git a/helm/xsltd/configure.in b/helm/xsltd/configure.in deleted file mode 100644 index 2a8fcd0f3..000000000 --- a/helm/xsltd/configure.in +++ /dev/null @@ -1,92 +0,0 @@ -AC_INIT(xaland.class) - -PACKAGE=helm_xsltd -MAJOR_VERSION=0 -MINOR_VERSION=0 -MICRO_VERSION=2 -VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION - -DEFAULT_HELM_LIB_DIR=/usr/local/lib/helm -DEFAULT_HELM_STYLE_DIR=/usr/local/share/helm/style - -AC_ARG_ENABLE( - defaults, - [ --enable-defaults[=ARG] if yes then use defaults (don't ask user) [default=auto]], - USE_DEFAULTS=$enableval, - USE_DEFAULTS=auto -) - -if test "x$prefix" != xNONE; then - RESOLVED_PREFIX=$prefix -else - RESOLVED_PREFIX=$ac_default_prefix -fi - -if test "x$exec_prefix" != xNONE; then - RESOLVED_EXEC_PREFIX=$exec_prefix -else - RESOLVED_EXEC_PREFIX=$RESOLVED_PREFIX -fi - -BIN_DIR=$RESOLVED_EXEC_PREFIX/bin - -if test $USE_DEFAULTS = auto; then - AC_CHECK_PROG(HAVE_HELM_CONFIG, helm-config, yes, no) - if test $HAVE_HELM_CONFIG = yes; then - HELM_LIB_DIR=`helm-config --lib-dir` - HELM_STYLE_DIR=`helm-config --style-dir` - else - USE_DEFAULTS=no - fi -fi - -if test $USE_DEFAULTS = no; then - echo - echo "\`helm-config' is not installed (or I can't find it in your path)." - echo "Please, insert the lib directory for HELM..." - echo - echo -n "[[$DEFAULT_HELM_LIB_DIR]] ? " - read HELM_LIB_DIR - if test "x$HELM_LIB_DIR" = "x"; then - HELM_LIB_DIR=$DEFAULT_HELM_LIB_DIR - fi - echo - echo "Please, insert the directory where I can find the stylesheets for HELM..." - echo - echo -n "[[$DEFAULT_HELM_STYLE_DIR]] ? " - read HELM_STYLE_DIR - if test "x$HELM_STYLE_DIR" = "x"; then - HELM_STYLE_DIR=$DEFAULT_HELM_STYLE_DIR - fi -elif test $USE_DEFAULTS = yes; then - HELM_LIB_DIR=$DEFAULT_HELM_LIB_DIR - HELM_STYLE_DIR=$DEFAULT_HELM_STYLE_DIR -fi - -AC_MSG_CHECKING(for the $HELM_LIB_DIR) -if test -d $HELM_LIB_DIR; then - AC_MSG_RESULT(ok) -else - AC_MSG_RESULT(no) - AC_MSG_ERROR(please check your installation) -fi - -AC_MSG_CHECKING(for $HELM_STYLE_DIR) -if test -d $HELM_STYLE_DIR; then - AC_MSG_RESULT(ok) -else - AC_MSG_RESULT(no) - AC_MSG_ERROR(please check your installation) -fi - -AC_SUBST(PACKAGE) -AC_SUBST(VERSION) -AC_SUBST(BIN_DIR) -AC_SUBST(HELM_LIB_DIR) -AC_SUBST(HELM_STYLE_DIR) - -AC_OUTPUT([ - Makefile - start-xaland - helm_xsltd.spec -], chmod +x start-xaland) diff --git a/helm/xsltd/helm_xsltd.spec.in b/helm/xsltd/helm_xsltd.spec.in deleted file mode 100644 index 9d9dafedd..000000000 --- a/helm/xsltd/helm_xsltd.spec.in +++ /dev/null @@ -1,32 +0,0 @@ -Summary: The UDP-based XSLTD daemon for project HELM. -Name: @PACKAGE@ -Version: @VERSION@ -Release: 1 -Copyright: GPL -URL: http://www.cs.unibo.it/helm -Packager: Claudio Sacerdoti Coen -Requires: helm_configuration = 0.0.1, helm_data = 0.0.1, helm_http_getter = 0.0.1 -Group: Applications/Publishing -Source: www.cs.unibo.it:/helm/@PACKAGE@-@VERSION@-1.tar.gz -%description -HELM (Hypertextual Electronic Library of Mathematics) is a project aimed -at the creation of tools for the development and exploitation of a huge -distributed library of formal mathematical knowledge. This package holds -an UDP-based XSLT daemon. -For more information see http://www.cs.unibo.it/helm - -%prep -%setup - -%build -cp config.cache.pkg config.cache -./configure -make - -%install -make install - -%files -%doc AUTHORS COPYING ChangeLog NEWS README -/usr/local/lib/helm/xaland.class -%attr(755,root,root) /usr/local/bin/start-xaland diff --git a/helm/xsltd/start-xaland.in b/helm/xsltd/start-xaland.in deleted file mode 100755 index 687e09bf8..000000000 --- a/helm/xsltd/start-xaland.in +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/bash - -# Copyright (C) 2000, HELM Team. -# -# This file is part of HELM, an Hypertextual, Electronic -# Library of Mathematics, developed at the Computer Science -# Department, University of Bologna, Italy. -# -# HELM is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# HELM is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with HELM; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# For details, see the HELM World-Wide-Web page, -# http://cs.unibo.it/helm/. - -########################################################################## -# BEGIN OF THE PART TO CONFIGURE BEFORE USING THE SCRIPT # -########################################################################## - -# In the next line you have to set the path to the jdk1.3 -export PATH=/opt/java/jdk1.3/bin/:$PATH - -# In the next line you have to give the classpath to the 1.1 version of -# xalan.jar -export CLASSPATH1=/projects/helm/shared/libraries/java/xalan_1_1/xalan.jar - -# In the next line you have to give the classpath to the 1.1 version of -# xerces.jar -export CLASSPATH2=/projects/helm/shared/libraries/java/xalan_1_1/xerces.jar - -########################################################################## -# END OF THE PART TO CONFIGURE # -########################################################################## - -export CLASSPATH=$CLASSPATH1:$CLASSPATH2:$CLASSPATH:. -export CLASS_DIR=@HELM_LIB_DIR@ -export HELM_STYLE_DIR=@HELM_STYLE_DIR@ - -cd $CLASS_DIR && -java -ss1024K -oss8192K \ - xaland 12345 12346 \ - $HELM_STYLE_DIR/rootcontent.xsl \ - $HELM_STYLE_DIR/annotatedpres.xsl \ - $HELM_STYLE_DIR/theory_content.xsl \ - $HELM_STYLE_DIR/theory_pres.xsl diff --git a/helm/xsltd/xaland-cpp/xaland.cpp b/helm/xsltd/xaland-cpp/xaland.cpp deleted file mode 100644 index e22140267..000000000 --- a/helm/xsltd/xaland-cpp/xaland.cpp +++ /dev/null @@ -1,207 +0,0 @@ -// Base header file. Must be first. -#include - -#include -#include - -#include - -#include - -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -int main(int argc, const char* []) -{ -#if !defined(XALAN_NO_NAMESPACES) - using std::cerr; - using std::endl; - using std::ofstream; -#endif - - if (argc != 1) { - cerr << "Usage: SimpleTransform" - << endl - << endl; - } else { - try { - // Call the static initializer for Xerces... - XMLPlatformUtils::Initialize(); - - { - // Initialize the Xalan XSLT subsystem... - XSLTInit theInit; - - // Create the support objects that are necessary for - // running the processor... - XercesDOMSupport theDOMSupport; - XercesParserLiaison theParserLiaison(theDOMSupport); - XPathSupportDefault theXPathSupport(theDOMSupport); - XSLTProcessorEnvSupportDefault theXSLTProcessorEnvSupport; - XObjectFactoryDefault theXObjectFactory; - XPathFactoryDefault theXPathFactory; - - // Create a processor... - XSLTEngineImpl theProcessor( - theParserLiaison, - theXPathSupport, - theXSLTProcessorEnvSupport, - theDOMSupport, - theXObjectFactory, - theXPathFactory); - - // Connect the processor to the support object... - theXSLTProcessorEnvSupport.setProcessor(&theProcessor); - - // Create a stylesheet construction context, and a stylesheet - // execution context... - StylesheetConstructionContextDefault theConstructionContext( - theProcessor, - theXSLTProcessorEnvSupport, - theXPathFactory); - - StylesheetExecutionContextDefault theExecutionContext( - theProcessor, - theXSLTProcessorEnvSupport, - theXPathSupport, - theXObjectFactory); - - // Our input files...The assumption is that the executable will be - // run from same directory as the input files. - const XalanDOMString theXMLFileName("foo.xml"); - const XalanDOMString theXSLFileName("foo.xsl"); - - // Our input sources... - XSLTInputSource theInputSource(c_wstr(theXMLFileName)); - XSLTInputSource theStylesheetSource(c_wstr(theXSLFileName)); - - // Our output target... - const XalanDOMString theOutputFileName("foo.out"); - XSLTResultTarget theResultTarget(theOutputFileName); - - theProcessor.process( - theInputSource, - theStylesheetSource, - theResultTarget, - theConstructionContext, - theExecutionContext); - - } - - // Call the static terminator for Xerces... - XMLPlatformUtils::Terminate(); - } - catch(...) { - cerr << "Exception caught!!!" - << endl - << endl; - } - } - - return 0; -} - -/**************************************************/ -/* - -public class xaland { - public static void Transform(StylesheetRoot style, String xmlSourceURL, String OutputURL) throws java.io.IOException, java.net.MalformedURLException, org.xml.sax.SAXException - { - XSLTInputSource xmlSource = new XSLTInputSource (xmlSourceURL); - XSLTResultTarget xmlResult = new XSLTResultTarget (OutputURL); - style.process(xmlSource, xmlResult); - } - - public static void main(String argv[]) throws java.io.IOException, java.net.MalformedURLException, org.xml.sax.SAXException - { - int port = Integer.parseInt(argv[0]); - int port2 = Integer.parseInt(argv[1]); - String xsl1 = argv[2]; - String xsl2 = argv[3]; - String theory_xsl1 = argv[4]; - String theory_xsl2 = argv[5]; - - XSLTProcessor theory_processor = - XSLTProcessorFactory.getProcessor(new org.apache.xalan.xpath.xdom.XercesLiaison()); - StylesheetRoot theory_style1 = - theory_processor.processStylesheet(theory_xsl1); - theory_processor.reset(); - StylesheetRoot theory_style2 = - theory_processor.processStylesheet(theory_xsl2); - theory_processor.setStylesheet(theory_style2); - - XSLTProcessor processor = - XSLTProcessorFactory.getProcessor(new org.apache.xalan.xpath.xdom.XercesLiaison()); - StylesheetRoot style1 = processor.processStylesheet(xsl1); - processor.reset(); - StylesheetRoot style2 = processor.processStylesheet(xsl2); - processor.setStylesheet(style2); - - DatagramSocket socket = new DatagramSocket(port); - - System.out.println("Demon activated on input port " + port + - " and output port " + port2); - while(true) { - System.out.print("Ready..."); - - /* Warning: the packet must be a fresh one! * / - DatagramPacket packet = new DatagramPacket(new byte[1024],1024); - socket.receive(packet); - byte data[] = packet.getData(); - int datalen = packet.getLength(); - String received = new String(data,0,datalen); - - int first = received.indexOf(' '); - int last = received.lastIndexOf(' '); - String mode = received.substring(0,first); - String input = received.substring(first+1,last); - String output = received.substring(last+1); - - System.out.println("request received! Parameters are"); - System.out.println("Mode: " + mode + " "); - System.out.println("Input file: \"" + input + "\""); - System.out.println("Output file: \"" + output + "\"\n"); - - if ((new File(output)).exists()) { - System.out.println("Using cached version\n"); - } else { - FileOutputStream fout = new FileOutputStream(output); - if (mode.equals("cic")) { - processor.setDocumentHandler(style2.getSAXSerializer(fout)); - XSLTResultTarget content = new XSLTResultTarget(processor); - style1.process(new XSLTInputSource(input), content); - } else if (mode.equals("theory")) { - theory_processor.setDocumentHandler( - theory_style2.getSAXSerializer(fout)); - XSLTResultTarget content = - new XSLTResultTarget(theory_processor); - theory_style1.process(new XSLTInputSource(input), content); - } - } - - InetAddress address = InetAddress.getLocalHost(); - DatagramSocket socket2 = new DatagramSocket(); - - byte buf[] = new byte[0]; - DatagramPacket packet2 = new DatagramPacket(buf,0,address,port2); - - socket2.send(packet2); - } - } -} - -*/ diff --git a/helm/xsltd/xaland-java-DOM/xaland_DOM.class b/helm/xsltd/xaland-java-DOM/xaland_DOM.class deleted file mode 100644 index 59c9683c9c09b9358475aa3f6416ac0488cc37a4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3555 zcma)9>vtPh5&vCT_O91^99y<*Z=9sctJrE{HE!d!n-@-;)DH3k%Q1FBNY>KYRw`-L z-IZ&%yeUv#rO?A8a0rxFN})gsmEtOtS9z5;gir7f@D)DxoE&C$Wm~T8bJ!1a=g!QX znLBr8_TJa;yz(k)a1j5HVasr2xH1YdJ}2YzGQJ?=s*JD5xF+MPGQK9`>oUG62lu(jzQ^K-@TM~XE;Z+GgmGCnOKbPlMFt^;AsY*X7G%PZ{WQQKCI$f_>hWk<8c+&@q~)! zv7q8RSXA)>KBnTk_<)M<;oT};VelHhtm0RAQpK-X{cjlj7N1b@JA6dN>v&4VAJ~mQ zGWI97`)7Py#b59q2Jct#H#{aFA_C13BbSO;1vg)CBYDeqi6-_41okKbHC^390b`K2hauJ#reQN> zotx257G`HnoAmKwQrOltwE618UB1q=6&v+-LQa}S_DFZ!vgcxp*-Xqa7GncevXC`% z?jY?rte`Mjf|luu;9aE&?J$c`DwM@({^*b`k|Jk}e? z8}7UpqN(Bdm|;7n9Zwr+$I4Zrw_cjvnM%Yb#%wD|XKnH6bZ@416TjJo@vUT8=}?Z6 zFkuz!q3kTqEaB8kqvkcMX_XD;F`6 zZhFCRO{%(FB+Xl1sXKYV%3D1>JydxO0|lE_n*K~Vy_hufZkqIwS}#nI*>uL#BUGu| z;^~|@QpnDj_JlE$Aw%KSY8azhbt}an&=|LpMrP8m(=11->W0ZtohrW3FPk-`^|Uf; z_}1ld(?~55PPYBiIYYL|%sGcTK_toPnu;u#wnGk*?{!8#Z{||e0Fvn>P0dFOMux4K zi)qItM52S^^c1KkENk_#7*>1B}{TYlYZQ^NliMJG8ac@ zN!DvmRQB?jTO5YCt-0dQ%7E1Q`L7V!B)w`MrPKsvu5htc)V(#4H?66hgPB% z%o^z&mG8!;{bSRO14Bx0b6q`sn{5b%v_SvX=zz z-dec2ZwTzE7W8)MHIJ2_#85V$p?@3;t@IB{zp7Z)&_7c^&U4G8^bn}cbFoocdSiwn zOPJRsDU~YNS|=y2Z6?k10u@rkrV=q7mqw40+8v=zY-CNBYARybBvMO%RzCTl<5gCO zCM%v+erHsiM65PY?-XVn?{7`D=gym6d}P;J$x_Ap#iT9`j1E&5S)2558qw9}Zn~H8 z7eGDA_zaED0yPEH(FF*Bi_x0in>cke8sy+jfbOsO=YxCYujqVO(h)Go3-YqND*)C3;9TYUyIgU6Al$IqPJ?z;ZX2$xP>QS znzRHj7cs22vAu1+UC*t0a!YF^mqLQTs!twIW?qv zhz5EGsC3unOMD}xXfy6X6TMnm&_|pH>B@eBl6H_T@n=aY!Iyrz)nB57P1A}zcH#+o zVmwK2h^OfVaE)FNFVOfR_Ty!A(OtTmZp=~KCawR(0sI?1_zz-u1NVwr91X;Yo@Uc!-2af|94{~a0ugpJ|qGsa4s-_$v^^Af%Eht`XWU^rWaZZ?O{K~ ihF%#2sUT@iH+C9pqb0oM1|eSHs7jg0@HrX-xcxt3%CU$5 diff --git a/helm/xsltd/xaland-java-DOM/xaland_DOM.java b/helm/xsltd/xaland-java-DOM/xaland_DOM.java deleted file mode 100644 index 354f3b213..000000000 --- a/helm/xsltd/xaland-java-DOM/xaland_DOM.java +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (C) 2000, HELM Team. -// -// This file is part of HELM, an Hypertextual, Electronic -// Library of Mathematics, developed at the Computer Science -// Department, University of Bologna, Italy. -// -// HELM is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. -// -// HELM is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with HELM; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// For details, see the HELM World-Wide-Web page, -// http://cs.unibo.it/helm/. - -import org.apache.xalan.xslt.*; -import org.w3c.dom.Document; -import java.net.*; -import java.io.*; - -public class xaland_DOM { - public static void main(String argv[]) throws java.io.IOException, java.net.MalformedURLException, org.xml.sax.SAXException - { - int port = Integer.parseInt(argv[0]); - int port2 = Integer.parseInt(argv[1]); - String xsl1 = argv[2]; - String xsl2 = argv[3]; - String theory_xsl1 = argv[4]; - String theory_xsl2 = argv[5]; - - XSLTProcessor theory_processor = - XSLTProcessorFactory.getProcessor(new org.apache.xalan.xpath.xdom.XercesLiaison()); - StylesheetRoot theory_style1 = - theory_processor.processStylesheet(theory_xsl1); - theory_processor.reset(); - StylesheetRoot theory_style2 = - theory_processor.processStylesheet(theory_xsl2); - theory_processor.setStylesheet(theory_style2); - - XSLTProcessor processor = - XSLTProcessorFactory.getProcessor(new org.apache.xalan.xpath.xdom.XercesLiaison()); - StylesheetRoot style1 = processor.processStylesheet(xsl1); - processor.reset(); - StylesheetRoot style2 = processor.processStylesheet(xsl2); - processor.setStylesheet(style2); - - DatagramSocket socket = new DatagramSocket(port); - - System.out.println("Demon activated on input port " + port + - " and output port " + port2); - while(true) { - System.out.print("Ready..."); - - /* Warning: the packet must be a fresh one! */ - DatagramPacket packet = new DatagramPacket(new byte[1024],1024); - socket.receive(packet); - byte data[] = packet.getData(); - int datalen = packet.getLength(); - String received = new String(data,0,datalen); - - int first = received.indexOf(' '); - int last = received.lastIndexOf(' '); - String mode = received.substring(0,first); - String input = received.substring(first+1,last); - String output = received.substring(last+1); - - System.out.println("request received! Parameters are"); - System.out.println("Mode: " + mode + " "); - System.out.println("Input file: \"" + input + "\""); - System.out.println("Output file: \"" + output + "\"\n"); - - if ((new File(output)).exists()) { - System.out.println("Using cached version\n"); - } else { - FileOutputStream fout = new FileOutputStream(output); - if (mode.equals("cic")) { -Document content_doc = new org.apache.xerces.dom.DocumentImpl(); -XSLTResultTarget content = new XSLTResultTarget(content_doc); -/* - processor.setDocumentHandler(style2.getSAXSerializer(fout)); - XSLTResultTarget content = new XSLTResultTarget(processor); -*/ -System.out.print("Prima...\n"); - style1.process(new XSLTInputSource(input), content); -System.out.print("Durante...\n"); - style2.process(new XSLTInputSource(content_doc),new XSLTResultTarget(fout)); -System.out.print("Dopo...\n"); - } else if (mode.equals("theory")) { - theory_processor.setDocumentHandler( - theory_style2.getSAXSerializer(fout)); - XSLTResultTarget content = - new XSLTResultTarget(theory_processor); - theory_style1.process(new XSLTInputSource(input), content); - } - } - - InetAddress address = InetAddress.getLocalHost(); - DatagramSocket socket2 = new DatagramSocket(); - - byte buf[] = new byte[0]; - DatagramPacket packet2 = new DatagramPacket(buf,0,address,port2); - - socket2.send(packet2); - } - } -} diff --git a/helm/xsltd/xaland-java/rompi.class b/helm/xsltd/xaland-java/rompi.class deleted file mode 100644 index 4abfe3865ad89dd63981985bc0c6ff02a72ffbf9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 732 zcmZuvTTc@~6#k~&?v!OCH`{vQvM9&`mE~12K6r~Htq`gvgs15;HiNr6&0dK9EPbGf z7=M62%6MiqrAFrA+~$1WIcMhl{Ppbzs(6UqI#xLDbF6W!b3EYK;P5#%Id&Xan03H0 z=fKAN6lz#-2zArM8ZH*mG@@n19T(eJbW`6-mc zTGGFTo?YO^cKZS|S5!?}JQ7xBcDnwqV KV)w|aAovY)#-^kI diff --git a/helm/xsltd/xaland-java/rompi.java b/helm/xsltd/xaland-java/rompi.java deleted file mode 100644 index 721b9b2ad..000000000 --- a/helm/xsltd/xaland-java/rompi.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (C) 2000, HELM Team. -// -// This file is part of HELM, an Hypertextual, Electronic -// Library of Mathematics, developed at the Computer Science -// Department, University of Bologna, Italy. -// -// HELM is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. -// -// HELM is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with HELM; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// For details, see the HELM World-Wide-Web page, -// http://cs.unibo.it/helm/. - -import java.net.*; - -public class rompi { - public static void main(String argv[]) throws java.io.IOException, java.net.MalformedURLException - { - /* Wait forever ;-) */ - DatagramSocket socket2 = new DatagramSocket(12346); - DatagramPacket packet2 = new DatagramPacket(new byte[1],1); - System.out.println("Ho preso il socket e non lo lascio piu', caro pu, caro pu"); - socket2.receive(packet2); - } -} diff --git a/helm/xsltd/xaland-java/sped.class b/helm/xsltd/xaland-java/sped.class deleted file mode 100644 index cc6f53dac35bcca947942989dc7259047fd6f055..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1142 zcmZuw+fvg|6kUg=O&T&nfdWB5@PeUSibYWZqLhn73pj$#Fg%6!vcu z4V98~6><{>RD^L`MFfKahJ-n+Lc$#t3PyxBDw6LCxF@3bh3|oe$4Cg65Req`NI*)% zJf=06nAEUISF04Fx(^JJVF{rambIS_)G?!_(e}Y1&-x2D_MU7_JU{VzV!D>k z^9r38zbT!L9z6F8hO4%37bnS_+uOoUTgrwH#&oS?sfTV1S<*d+Y}Wr~zK`b_Br-Dda{@?Ha) z8PTOWdgkP~e5RO+E`{Q=v{9P=8Ch+x{sJ!W{l)+Q diff --git a/helm/xsltd/xaland-java/sped.java b/helm/xsltd/xaland-java/sped.java deleted file mode 100644 index 8082020ee..000000000 --- a/helm/xsltd/xaland-java/sped.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (C) 2000, HELM Team. -// -// This file is part of HELM, an Hypertextual, Electronic -// Library of Mathematics, developed at the Computer Science -// Department, University of Bologna, Italy. -// -// HELM is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. -// -// HELM is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with HELM; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// For details, see the HELM World-Wide-Web page, -// http://cs.unibo.it/helm/. - -import java.net.*; - -public class sped { - public static void main(String argv[]) throws java.io.IOException, java.net.MalformedURLException - { - String input = argv[0]; - String out1 = argv[1]; - String out2 = argv[2]; - - String sent = input + " " + out1 + " " + out2; - - InetAddress address = InetAddress.getLocalHost(); - DatagramSocket socket = new DatagramSocket(); - - int strlen = sent.length(); - byte buf[] = new byte[strlen]; - sent.getBytes(0,strlen,buf,0); - DatagramPacket packet = new DatagramPacket(buf,strlen,address,12345); - - socket.send(packet); - - - /* Wait for answer (or forever ;-) */ - DatagramSocket socket2 = new DatagramSocket(12346); - DatagramPacket packet2 = new DatagramPacket(new byte[1],1); - socket2.receive(packet2); - } -} diff --git a/helm/xsltd/xaland-java/xaland.class b/helm/xsltd/xaland-java/xaland.class deleted file mode 100644 index 6871fda4b77e5da54ed99846b0a35652ccaf2961..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3509 zcma)9Yfu~475=Uyw9B%?Lm*%cr1G&A<;fE-Dy?5+qT zO`mC-PTx&m?jwEIY1*_++DIn2Y12pA=}dogCjUCq>Ay~A`l~Z-e{?3(b9My?kY@rj z=bn4s_uO;NUj6aSS6)RBefWcnw2W&q9+8oe@o^cSl<`>^pOf*7j4#UgvW!<{{8qxZ zBz#-KcO-mQ!uKS6U&0Lu&q?@!gy$vvP{NNSyddGH5?++>l7yd0__>6aB@`vRuAmvC z3fdWT_}B#n^>{!*1A{1oE(S3lBowq^OhF4SGB(a46AT_?+9c~vF=Lv+B?TI06ub@Z zRM3f87MWx4P%T<~BdlJ`-Wh0(3a*OdP*G}gahXmR;$T`!E zj}kbYO4+945R3F?Jou16sJrL#8D2)&R+N@%#yYCe&lDCGOq=YnG8t^`9<8o@tlPJl zw&LU7NhnCu$PV=+EPFA&lFh^&VuSbymQ2%~v@Dm-Tr~ztLTA}1 zXMNakjYZqYP8i8YObVUY)7{>gw>!ui?vj^=*|EfgVLPUsNE>O#%9S&;U7Ew0ok~nk z*jAG6)8ZTGsb;oH+#JH#Ta?|ExS`z?wl{e@dmQ9wjtY0mD%eSLsLIJV&N68_g^W9G z*o);n#eAc;s}1%W?!J7+t2>Di59?ygk8)?#mn-yg^)rM|q;qNaUMl6YR>~Am&RRLg zHFEBZktxvrj$t!vX!RKpgv(Gjm(T;r&*3ng~uo!otnPh@0=~8@}y~` zR{Q(=$)BI#^W;yUcG@;_&VprU$;~B)hCwXJ)trhgo3=v%(%=Xi`MjA+(F{nYle9G- zEf^X0X0D_imk^2WfvcCy5tcA>i|&$u$~Xr&VmYqA-7G?ZM&eGLo}Dr&_)Pk7(mtnv}&hPj+`hSK~}s-0C!xH+3pTFV)c|dCbW09hs?1lZlFR)@2OG z9o@)UC~KtYL(sE(Cix>HWo6^DCiRw69vA`#cFXRb0|E!Di|uGxf&I6atGN2!w;*+% zn#ZzN1rFU_xN;287mNirCID4dMVf;2MHGwKi2D+7D6j~-S07ep<-fDa&mkJ0WF?Q3Z5 zSVz~~;Szc;t|K;gq=dtIsJBlG6>;iCVhenVU<4t8G8w2PV+!^lj8Ax!AR1}6m*_vi zM}5=5A>wubfxCKx12=KvL~n?flf5+q7kk44WL_H3YkK7YJ-m*Nxe^ZE#67yCNm|Vs z?h8PdHE9j>f*?xRr_>T!yM}WCdh={*D4Npev+Fd)S5UN&Pf;~RQ_BkNa~&ld(v_Dm zw2tUpq^5+Pjv|gm0!7@}Nk|bRMchm5NNo`(*U>iD6v8c;KnZ<%J(;R6;xvQ1^#)#! z4K}W$Wln1dMjK1$*PFDa##j;W7>xLcKG>`^1*4H7?$=wirf4K|HQLOZC~cZUSBp5W zx3WLg_v?ivQCM0Fg%lA4He>R5Vdh1d7u>~@nb*oZy0fz0I_l@N))L-c#9h}>&#n}5 zbpwyBqru~J>up*~q^^j8>xgr*w6-FSuVI)|9GlaW5{~HYS{+x17Nzpg+NmOLV34%P z6lopdJK3Q{XJ9RPyVgw%>TT<2r>j1ow+C;@y2eS?w4m13SwdXjqqS>$ia2}Y%_lcY z?msw5cmpIVuzGrrN9ezeim#KN+j|K+Oi%Vcde0Bill(Z9;3?vaP}yCe-v?9l^WX|S z^B*S3G}V6|`|$)0;3*uUa_*)Fb`PGX^#!u>GWzj4;`kGe;tkx1zhD6Wz}@&4j^Te8 z6g9XUi_K%Z{U9M zSB!|iVO0E`)_>vw@o!uZ|3xAoVIrX7!9WyKfjyWG^k61%6umpzO3;snJT)PAY!|J9 W)|%cD_HXrO*e4SFJTU|K{r>@yPnx#? diff --git a/helm/xsltd/xaland-java/xaland.java b/helm/xsltd/xaland-java/xaland.java deleted file mode 100644 index b32106cf0..000000000 --- a/helm/xsltd/xaland-java/xaland.java +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (C) 2000, HELM Team. -// -// This file is part of HELM, an Hypertextual, Electronic -// Library of Mathematics, developed at the Computer Science -// Department, University of Bologna, Italy. -// -// HELM is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. -// -// HELM is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with HELM; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// For details, see the HELM World-Wide-Web page, -// http://cs.unibo.it/helm/. - -import org.apache.xalan.xslt.*; -import java.net.*; -import java.io.*; - -public class xaland { - public static void main(String argv[]) throws java.io.IOException, java.net.MalformedURLException, org.xml.sax.SAXException - { - int port = Integer.parseInt(argv[0]); - int port2 = Integer.parseInt(argv[1]); - String xsl1 = argv[2]; - String xsl2 = argv[3]; - String theory_xsl1 = argv[4]; - String theory_xsl2 = argv[5]; - - XSLTProcessor theory_processor = - XSLTProcessorFactory.getProcessor(new org.apache.xalan.xpath.xdom.XercesLiaison()); - StylesheetRoot theory_style1 = - theory_processor.processStylesheet(theory_xsl1); - theory_processor.reset(); - StylesheetRoot theory_style2 = - theory_processor.processStylesheet(theory_xsl2); - theory_processor.setStylesheet(theory_style2); - - XSLTProcessor processor = - XSLTProcessorFactory.getProcessor(new org.apache.xalan.xpath.xdom.XercesLiaison()); - StylesheetRoot style1 = processor.processStylesheet(xsl1); - processor.reset(); - StylesheetRoot style2 = processor.processStylesheet(xsl2); - processor.setStylesheet(style2); - - DatagramSocket socket = new DatagramSocket(port); - - System.out.println("Demon activated on input port " + port + - " and output port " + port2); - while(true) { - System.out.print("Ready..."); - - /* Warning: the packet must be a fresh one! */ - DatagramPacket packet = new DatagramPacket(new byte[1024],1024); - socket.receive(packet); - byte data[] = packet.getData(); - int datalen = packet.getLength(); - String received = new String(data,0,datalen); - - int first = received.indexOf(' '); - int last = received.lastIndexOf(' '); - String mode = received.substring(0,first); - String input = received.substring(first+1,last); - String output = received.substring(last+1); - - System.out.println("request received! Parameters are"); - System.out.println("Mode: " + mode + " "); - System.out.println("Input file: \"" + input + "\""); - System.out.println("Output file: \"" + output + "\"\n"); - - if ((new File(output)).exists()) { - System.out.println("Using cached version\n"); - } else { - FileOutputStream fout = new FileOutputStream(output); - if (mode.equals("cic")) { - processor.setDocumentHandler(style2.getSAXSerializer(fout)); - XSLTResultTarget content = new XSLTResultTarget(processor); - style1.process(new XSLTInputSource(input), content); - } else if (mode.equals("theory")) { - theory_processor.setDocumentHandler( - theory_style2.getSAXSerializer(fout)); - XSLTResultTarget content = - new XSLTResultTarget(theory_processor); - theory_style1.process(new XSLTInputSource(input), content); - } - } - - InetAddress address = InetAddress.getLocalHost(); - DatagramSocket socket2 = new DatagramSocket(); - - byte buf[] = new byte[0]; - DatagramPacket packet2 = new DatagramPacket(buf,0,address,port2); - - socket2.send(packet2); - } - } -} diff --git a/helm/xsltd/xaland-java/xaland.java.prima_del_loro_baco b/helm/xsltd/xaland-java/xaland.java.prima_del_loro_baco deleted file mode 100644 index b46ffa6aa..000000000 --- a/helm/xsltd/xaland-java/xaland.java.prima_del_loro_baco +++ /dev/null @@ -1,85 +0,0 @@ -import org.apache.xalan.xslt.*; -import java.net.*; -import java.io.*; - -public class xaland { - public static void Transform(StylesheetRoot style, String xmlSourceURL, String OutputURL) throws java.io.IOException, java.net.MalformedURLException, org.xml.sax.SAXException - { - XSLTInputSource xmlSource = new XSLTInputSource (xmlSourceURL); - XSLTResultTarget xmlResult = new XSLTResultTarget (OutputURL); - style.process(xmlSource, xmlResult); - } - - public static void main(String argv[]) throws java.io.IOException, java.net.MalformedURLException, org.xml.sax.SAXException - { - int port = Integer.parseInt(argv[0]); - int port2 = Integer.parseInt(argv[1]); - String xsl1 = argv[2]; - String xsl2 = argv[3]; - String theory_xsl1 = argv[4]; - String theory_xsl2 = argv[5]; - - XSLTProcessor theory_processor = XSLTProcessorFactory.getProcessor(); - StylesheetRoot theory_style1 = - theory_processor.processStylesheet(theory_xsl1); - StylesheetRoot theory_style2 = - theory_processor.processStylesheet(theory_xsl2); - theory_processor.setStylesheet(theory_style2); - - XSLTProcessor processor = XSLTProcessorFactory.getProcessor(); - StylesheetRoot style1 = processor.processStylesheet(xsl1); - StylesheetRoot style2 = processor.processStylesheet(xsl2); - processor.setStylesheet(style2); - - DatagramSocket socket = new DatagramSocket(port); - - System.out.println("Demon activated on input port " + port + - " and output port " + port2); - while(true) { - System.out.print("Ready..."); - - /* Warning: the packet must be a fresh one! */ - DatagramPacket packet = new DatagramPacket(new byte[1024],1024); - socket.receive(packet); - byte data[] = packet.getData(); - int datalen = packet.getLength(); - String received = new String(data,0,datalen); - - int first = received.indexOf(' '); - int last = received.lastIndexOf(' '); - String mode = received.substring(0,first); - String input = received.substring(first+1,last); - String output = received.substring(last+1); - - System.out.println("request received! Parameters are"); - System.out.println("Mode: " + mode + " "); - System.out.println("Input file: \"" + input + "\""); - System.out.println("Output file: \"" + output + "\"\n"); - - if ((new File(output)).exists()) { - System.out.println("Using cached version\n"); - } else { - FileOutputStream fout = new FileOutputStream(output); - if (mode.equals("cic")) { - processor.setDocumentHandler(style2.getSAXSerializer(fout)); - XSLTResultTarget content = new XSLTResultTarget(processor); - style1.process(new XSLTInputSource(input), content); - } else if (mode.equals("theory")) { - theory_processor.setDocumentHandler( - theory_style2.getSAXSerializer(fout)); - XSLTResultTarget content = - new XSLTResultTarget(theory_processor); - theory_style1.process(new XSLTInputSource(input), content); - } - } - - InetAddress address = InetAddress.getLocalHost(); - DatagramSocket socket2 = new DatagramSocket(); - - byte buf[] = new byte[0]; - DatagramPacket packet2 = new DatagramPacket(buf,0,address,port2); - - socket2.send(packet2); - } - } -} diff --git a/helm/xsltd/xaland-java/xaland.java.prima_del_loro_baco_ma_dopo_i_reset b/helm/xsltd/xaland-java/xaland.java.prima_del_loro_baco_ma_dopo_i_reset deleted file mode 100644 index 1467cdd2e..000000000 --- a/helm/xsltd/xaland-java/xaland.java.prima_del_loro_baco_ma_dopo_i_reset +++ /dev/null @@ -1,87 +0,0 @@ -import org.apache.xalan.xslt.*; -import java.net.*; -import java.io.*; - -public class xaland { - public static void Transform(StylesheetRoot style, String xmlSourceURL, String OutputURL) throws java.io.IOException, java.net.MalformedURLException, org.xml.sax.SAXException - { - XSLTInputSource xmlSource = new XSLTInputSource (xmlSourceURL); - XSLTResultTarget xmlResult = new XSLTResultTarget (OutputURL); - style.process(xmlSource, xmlResult); - } - - public static void main(String argv[]) throws java.io.IOException, java.net.MalformedURLException, org.xml.sax.SAXException - { - int port = Integer.parseInt(argv[0]); - int port2 = Integer.parseInt(argv[1]); - String xsl1 = argv[2]; - String xsl2 = argv[3]; - String theory_xsl1 = argv[4]; - String theory_xsl2 = argv[5]; - - XSLTProcessor theory_processor = XSLTProcessorFactory.getProcessor(); - StylesheetRoot theory_style1 = - theory_processor.processStylesheet(theory_xsl1); - theory_processor.reset(); - StylesheetRoot theory_style2 = - theory_processor.processStylesheet(theory_xsl2); - theory_processor.setStylesheet(theory_style2); - - XSLTProcessor processor = XSLTProcessorFactory.getProcessor(); - StylesheetRoot style1 = processor.processStylesheet(xsl1); - processor.reset(); - StylesheetRoot style2 = processor.processStylesheet(xsl2); - processor.setStylesheet(style2); - - DatagramSocket socket = new DatagramSocket(port); - - System.out.println("Demon activated on input port " + port + - " and output port " + port2); - while(true) { - System.out.print("Ready..."); - - /* Warning: the packet must be a fresh one! */ - DatagramPacket packet = new DatagramPacket(new byte[1024],1024); - socket.receive(packet); - byte data[] = packet.getData(); - int datalen = packet.getLength(); - String received = new String(data,0,datalen); - - int first = received.indexOf(' '); - int last = received.lastIndexOf(' '); - String mode = received.substring(0,first); - String input = received.substring(first+1,last); - String output = received.substring(last+1); - - System.out.println("request received! Parameters are"); - System.out.println("Mode: " + mode + " "); - System.out.println("Input file: \"" + input + "\""); - System.out.println("Output file: \"" + output + "\"\n"); - - if ((new File(output)).exists()) { - System.out.println("Using cached version\n"); - } else { - FileOutputStream fout = new FileOutputStream(output); - if (mode.equals("cic")) { - processor.setDocumentHandler(style2.getSAXSerializer(fout)); - XSLTResultTarget content = new XSLTResultTarget(processor); - style1.process(new XSLTInputSource(input), content); - } else if (mode.equals("theory")) { - theory_processor.setDocumentHandler( - theory_style2.getSAXSerializer(fout)); - XSLTResultTarget content = - new XSLTResultTarget(theory_processor); - theory_style1.process(new XSLTInputSource(input), content); - } - } - - InetAddress address = InetAddress.getLocalHost(); - DatagramSocket socket2 = new DatagramSocket(); - - byte buf[] = new byte[0]; - DatagramPacket packet2 = new DatagramPacket(buf,0,address,port2); - - socket2.send(packet2); - } - } -} diff --git a/helm/xsltd/xaland-java2/xaland2.class b/helm/xsltd/xaland-java2/xaland2.class deleted file mode 100644 index 95b42c712d3475766cddddbc121344701c3c66a8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3773 zcmb7HdvqLC8UNkcO=hw?Cyz}x$>h}~wvePv2GSB?(pLKljpWrPElpb_liizS+kJIr z5;m=-p#LGV>kL_ysoq@YL@Me&U#GEKm40NIC%W-%xjBi@U;qssI21q?Mgj;4P$$490qQXtKrIdn?1*68A;8ffHexJ*RvZ)D z<3jg@5V);4 z#U-3q@fEyJ#gllyimwXB*N|256wavlIzFu88@N}+3j%x(52|<(XI1d_=|Xai0M9tN0`47+8d%Dq^N$k@Sp{ znQt~-{Q)kiHeWlyH9B)3SSIWLh-CUl#)d($b0r+I|#dtSVH$sQej*rryEL`4(EBD37G$th~< zQZtj`sTf10X|HZP>Z)iwN^VA}z#YEabfm*i&zK3}2G7QAhY)#+J0i{0IE1 zLDu7`7|#w((!uU*qWF22t}EUaw<|++fz>y(oTDOYQT%Bxu1vf>8ckE&qHwLyys}?K z@@j~pu_EP>yk=f4J7+sQ$x!RcUfnS3aYoXjm1rC<>l6)Ls>@~afSGXTZ0zu%{-S$! z3W2N$u%0n3nj5x0?5>ox$@tWaWr~_DQV1qYoAR0uvp;FZQw+frzq`+Eh$vN9IqixD zJ2m+=MiayJ*O2I?&PrSKI%!3MtEbgEywSomU}#vYx5~jfOtu7^YU4$}gCb>iABBn(me%o#MDw{iNo3w&xtNSEK z6nYv&?@=Dg?3oGMee|jMooVhSM{&}HdY7{%J$|t+>cl+eRvL{G3Nu;G+6jmLMzzr& zJn@rIhVSB2v_1^@-b5+=or3goyRT~j`**ba#j>-#q-(Ifw9D|f%UwoEyV7NphAJ1Z z+mJPR37f{Wl6l;i!vRCllts|{ZJVGQ0!RCF8An~KhLPpDm=Z) zB{YmR%wwxj^(^)-p>8ZhM)igqwuht~Zf+zbhv6JM&!xC!8v}#{?!#ui-uokY2b={K5Ev=4R3NZr9KDj&!hpuUY=evrh2wuJ5`ImW1s2bDi z=h2bFtrt;VFm(xUEg|G`I*kUcE)>k+mW!|!@OGn7D_;aX!bX$Us5LF(b_rV3i@4z; zsPUJaN09m_J12L(}MrQaByA23)pEih-#R}7NgO3SuvVKsoq$Lkot-!X`PVhC^GAOjAuGK{cljIsz0 zvn{xTZNpJEgfVss$JlwCU=QO?_86^C;4bzQ#;ICNwuA|G1yS}YV(c|=_BUGpfhqPc z#MzrTDM>gb1(A?6q@)&%OPi6FbY!IMI4$jjCH2CV2H{9!w4T7MG>NR_U`{%VGtxPn zl`h~O=@Hy3J&yaNCvi@C8uv@j&A<;fE-Dy?5+qT zO`mC-PTx&m?jwEIY1*_++DIn2Y12pA=}dogCjUCq>Ay~A`l~Z-e{?3(b9My?kY@rj z=bn4s_uO;NUj6aSS6)RBefWcnw2W&q9+8oe@o^cSl<`>^pOf*7j4#UgvW!<{{8qxZ zBz#-KcO-mQ!uKS6U&0Lu&q?@!gy$vvP{NNSyddGH5?++>l7yd0__>6aB@`vRuAmvC z3fdWT_}B#n^>{!*1A{1oE(S3lBowq^OhF4SGB(a46AT_?+9c~vF=Lv+B?TI06ub@Z zRM3f87MWx4P%T<~BdlJ`-Wh0(3a*OdP*G}gahXmR;$T`!E zj}kbYO4+945R3F?Jou16sJrL#8D2)&R+N@%#yYCe&lDCGOq=YnG8t^`9<8o@tlPJl zw&LU7NhnCu$PV=+EPFA&lFh^&VuSbymQ2%~v@Dm-Tr~ztLTA}1 zXMNakjYZqYP8i8YObVUY)7{>gw>!ui?vj^=*|EfgVLPUsNE>O#%9S&;U7Ew0ok~nk z*jAG6)8ZTGsb;oH+#JH#Ta?|ExS`z?wl{e@dmQ9wjtY0mD%eSLsLIJV&N68_g^W9G z*o);n#eAc;s}1%W?!J7+t2>Di59?ygk8)?#mn-yg^)rM|q;qNaUMl6YR>~Am&RRLg zHFEBZktxvrj$t!vX!RKpgv(Gjm(T;r&*3ng~uo!otnPh@0=~8@}y~` zR{Q(=$)BI#^W;yUcG@;_&VprU$;~B)hCwXJ)trhgo3=v%(%=Xi`MjA+(F{nYle9G- zEf^X0X0D_imk^2WfvcCy5tcA>i|&$u$~Xr&VmYqA-7G?ZM&eGLo}Dr&_)Pk7(mtnv}&hPj+`hSK~}s-0C!xH+3pTFV)c|dCbW09hs?1lZlFR)@2OG z9o@)UC~KtYL(sE(Cix>HWo6^DCiRw69vA`#cFXRb0|E!Di|uGxf&I6atGN2!w;*+% zn#ZzN1rFU_xN;287mNirCID4dMVf;2MHGwKi2D+7D6j~-S07ep<-fDa&mkJ0WF?Q3Z5 zSVz~~;Szc;t|K;gq=dtIsJBlG6>;iCVhenVU<4t8G8w2PV+!^lj8Ax!AR1}6m*_vi zM}5=5A>wubfxCKx12=KvL~n?flf5+q7kk44WL_H3YkK7YJ-m*Nxe^ZE#67yCNm|Vs z?h8PdHE9j>f*?xRr_>T!yM}WCdh={*D4Npev+Fd)S5UN&Pf;~RQ_BkNa~&ld(v_Dm zw2tUpq^5+Pjv|gm0!7@}Nk|bRMchm5NNo`(*U>iD6v8c;KnZ<%J(;R6;xvQ1^#)#! z4K}W$Wln1dMjK1$*PFDa##j;W7>xLcKG>`^1*4H7?$=wirf4K|HQLOZC~cZUSBp5W zx3WLg_v?ivQCM0Fg%lA4He>R5Vdh1d7u>~@nb*oZy0fz0I_l@N))L-c#9h}>&#n}5 zbpwyBqru~J>up*~q^^j8>xgr*w6-FSuVI)|9GlaW5{~HYS{+x17Nzpg+NmOLV34%P z6lopdJK3Q{XJ9RPyVgw%>TT<2r>j1ow+C;@y2eS?w4m13SwdXjqqS>$ia2}Y%_lcY z?msw5cmpIVuzGrrN9ezeim#KN+j|K+Oi%Vcde0Bill(Z9;3?vaP}yCe-v?9l^WX|S z^B*S3G}V6|`|$)0;3*uUa_*)Fb`PGX^#!u>GWzj4;`kGe;tkx1zhD6Wz}@&4j^Te8 z6g9XUi_K%Z{U9M zSB!|iVO0E`)_>vw@o!uZ|3xAoVIrX7!9WyKfjyWG^k61%6umpzO3;snJT)PAY!|J9 W)|%cD_HXrO*e4SFJTU|K{r>@yPnx#? diff --git a/helm/xsltd/xaland2.class b/helm/xsltd/xaland2.class deleted file mode 100644 index 95b42c712d3475766cddddbc121344701c3c66a8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3773 zcmb7HdvqLC8UNkcO=hw?Cyz}x$>h}~wvePv2GSB?(pLKljpWrPElpb_liizS+kJIr z5;m=-p#LGV>kL_ysoq@YL@Me&U#GEKm40NIC%W-%xjBi@U;qssI21q?Mgj;4P$$490qQXtKrIdn?1*68A;8ffHexJ*RvZ)D z<3jg@5V);4 z#U-3q@fEyJ#gllyimwXB*N|256wavlIzFu88@N}+3j%x(52|<(XI1d_=|Xai0M9tN0`47+8d%Dq^N$k@Sp{ znQt~-{Q)kiHeWlyH9B)3SSIWLh-CUl#)d($b0r+I|#dtSVH$sQej*rryEL`4(EBD37G$th~< zQZtj`sTf10X|HZP>Z)iwN^VA}z#YEabfm*i&zK3}2G7QAhY)#+J0i{0IE1 zLDu7`7|#w((!uU*qWF22t}EUaw<|++fz>y(oTDOYQT%Bxu1vf>8ckE&qHwLyys}?K z@@j~pu_EP>yk=f4J7+sQ$x!RcUfnS3aYoXjm1rC<>l6)Ls>@~afSGXTZ0zu%{-S$! z3W2N$u%0n3nj5x0?5>ox$@tWaWr~_DQV1qYoAR0uvp;FZQw+frzq`+Eh$vN9IqixD zJ2m+=MiayJ*O2I?&PrSKI%!3MtEbgEywSomU}#vYx5~jfOtu7^YU4$}gCb>iABBn(me%o#MDw{iNo3w&xtNSEK z6nYv&?@=Dg?3oGMee|jMooVhSM{&}HdY7{%J$|t+>cl+eRvL{G3Nu;G+6jmLMzzr& zJn@rIhVSB2v_1^@-b5+=or3goyRT~j`**ba#j>-#q-(Ifw9D|f%UwoEyV7NphAJ1Z z+mJPR37f{Wl6l;i!vRCllts|{ZJVGQ0!RCF8An~KhLPpDm=Z) zB{YmR%wwxj^(^)-p>8ZhM)igqwuht~Zf+zbhv6JM&!xC!8v}#{?!#ui-uokY2b={K5Ev=4R3NZr9KDj&!hpuUY=evrh2wuJ5`ImW1s2bDi z=h2bFtrt;VFm(xUEg|G`I*kUcE)>k+mW!|!@OGn7D_;aX!bX$Us5LF(b_rV3i@4z; zsPUJaN09m_J12L(}MrQaByA23)pEih-#R}7NgO3SuvVKsoq$Lkot-!X`PVhC^GAOjAuGK{cljIsz0 zvn{xTZNpJEgfVss$JlwCU=QO?_86^C;4bzQ#;ICNwuA|G1yS}YV(c|=_BUGpfhqPc z#MzrTDM>gb1(A?6q@)&%OPi6FbY!IMI4$jjCH2CV2H{9!w4T7MG>NR_U`{%VGtxPn zl`h~O=@Hy3J&yaNCvi@C8uv@jvtPh5&vCT_O91^99y<*Z=9sctJrE{HE!d!n-@-;)DH3k%Q1FBNY>KYRw`-L z-IZ&%yeUv#rO?A8a0rxFN})gsmEtOtS9z5;gir7f@D)DxoE&C$Wm~T8bJ!1a=g!QX znLBr8_TJa;yz(k)a1j5HVasr2xH1YdJ}2YzGQJ?=s*JD5xF+MPGQK9`>oUG62lu(jzQ^K-@TM~XE;Z+GgmGCnOKbPlMFt^;AsY*X7G%PZ{WQQKCI$f_>hWk<8c+&@q~)! zv7q8RSXA)>KBnTk_<)M<;oT};VelHhtm0RAQpK-X{cjlj7N1b@JA6dN>v&4VAJ~mQ zGWI97`)7Py#b59q2Jct#H#{aFA_C13BbSO;1vg)CBYDeqi6-_41okKbHC^390b`K2hauJ#reQN> zotx257G`HnoAmKwQrOltwE618UB1q=6&v+-LQa}S_DFZ!vgcxp*-Xqa7GncevXC`% z?jY?rte`Mjf|luu;9aE&?J$c`DwM@({^*b`k|Jk}e? z8}7UpqN(Bdm|;7n9Zwr+$I4Zrw_cjvnM%Yb#%wD|XKnH6bZ@416TjJo@vUT8=}?Z6 zFkuz!q3kTqEaB8kqvkcMX_XD;F`6 zZhFCRO{%(FB+Xl1sXKYV%3D1>JydxO0|lE_n*K~Vy_hufZkqIwS}#nI*>uL#BUGu| z;^~|@QpnDj_JlE$Aw%KSY8azhbt}an&=|LpMrP8m(=11->W0ZtohrW3FPk-`^|Uf; z_}1ld(?~55PPYBiIYYL|%sGcTK_toPnu;u#wnGk*?{!8#Z{||e0Fvn>P0dFOMux4K zi)qItM52S^^c1KkENk_#7*>1B}{TYlYZQ^NliMJG8ac@ zN!DvmRQB?jTO5YCt-0dQ%7E1Q`L7V!B)w`MrPKsvu5htc)V(#4H?66hgPB% z%o^z&mG8!;{bSRO14Bx0b6q`sn{5b%v_SvX=zz z-dec2ZwTzE7W8)MHIJ2_#85V$p?@3;t@IB{zp7Z)&_7c^&U4G8^bn}cbFoocdSiwn zOPJRsDU~YNS|=y2Z6?k10u@rkrV=q7mqw40+8v=zY-CNBYARybBvMO%RzCTl<5gCO zCM%v+erHsiM65PY?-XVn?{7`D=gym6d}P;J$x_Ap#iT9`j1E&5S)2558qw9}Zn~H8 z7eGDA_zaED0yPEH(FF*Bi_x0in>cke8sy+jfbOsO=YxCYujqVO(h)Go3-YqND*)C3;9TYUyIgU6Al$IqPJ?z;ZX2$xP>QS znzRHj7cs22vAu1+UC*t0a!YF^mqLQTs!twIW?qv zhz5EGsC3unOMD}xXfy6X6TMnm&_|pH>B@eBl6H_T@n=aY!Iyrz)nB57P1A}zcH#+o zVmwK2h^OfVaE)FNFVOfR_Ty!A(OtTmZp=~KCawR(0sI?1_zz-u1NVwr91X;Yo@Uc!-2af|94{~a0ugpJ|qGsa4s-_$v^^Af%Eht`XWU^rWaZZ?O{K~ ihF%#2sUT@iH+C9pqb0oM1|eSHs7jg0@HrX-xcxt3%CU$5 -- 2.39.2