+H=@
+
# This Makefile must be included by another one defining:
# $PACKAGE
# $PREDICATES
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))
-LIBRARIES_DEPS = $(foreach X,$(LIBRARIES),$(wildcard \
- $(shell dirname $(X))/*.mli \
- $(shell dirname $(X))/*.ml \
- $(shell dirname $(X))/*/*.ml \
- $(shell dirname $(X))/*/*.mli))
+LIBRARIES_DEPS = \
+ $(foreach X,$(filter-out /usr/lib/ocaml%,$(LIBRARIES)),\
+ $(wildcard \
+ $(shell dirname $(X))/*.mli \
+ $(shell dirname $(X))/*.ml \
+ $(shell dirname $(X))/paramodulation/*.ml \
+ $(shell dirname $(X))/paramodultation/*.mli))
ARCHIVE = $(PACKAGE).cma
DEPEND_FILES = $(INTERFACE_FILES) $(IMPLEMENTATION_FILES)
$(ARCHIVE): $(IMPLEMENTATION_FILES:%.ml=%.cmo) $(LIBRARIES)
- @if [ $(PACKAGE) != dummy ]; then \
- echo OCAMLC $@;\
+ $(H)if [ $(PACKAGE) != dummy ]; then \
+ echo " OCAMLC -a $@";\
$(OCAMLC) $(OCAMLARCHIVEOPTIONS) -a -o $@ \
$(IMPLEMENTATION_FILES:%.ml=%.cmo); fi
$(ARCHIVE_OPT): $(IMPLEMENTATION_FILES:%.ml=%.cmx) $(LIBRARIES_OPT)
- @if [ $(PACKAGE) != dummy ]; then \
- echo OCAMLOPT $@;\
+ $(H)if [ $(PACKAGE) != dummy ]; then \
+ echo " OCAMLOPT -a $@";\
$(OCAMLOPT) $(OCAMLARCHIVEOPTIONS) -a -o $@ \
$(IMPLEMENTATION_FILES:%.ml=%.cmx); fi
prereq: $(PREREQ)
all: prereq $(IMPLEMENTATION_FILES:%.ml=%.cmo) $(ARCHIVE)
+ @echo -n
opt: prereq $(IMPLEMENTATION_FILES:%.ml=%.cmx) $(ARCHIVE_OPT)
+ @echo -n
world: all opt
test: test.ml $(ARCHIVE)
$(OCAMLC) $(ARCHIVE) -linkpkg -o $@ $<
ocamldot < .depend > $@
%.cmi: %.mli
- @echo OCAMLC $<
- @$(OCAMLC) -c $<
+ @echo " OCAMLC $<"
+ $(H)$(OCAMLC) -c $<
%.cmo %.cmi: %.ml
- @echo OCAMLC $<
- @$(OCAMLC) -c $<
+ @echo " OCAMLC $<"
+ $(H)$(OCAMLC) -c $<
%.cmx: %.ml
- @echo OCAMLOPT $<
- @$(OCAMLOPT) -c $<
+ @echo " OCAMLOPT $<"
+ $(H)$(OCAMLOPT) -c $<
%.annot: %.ml
$(OCAMLC) -dtypes $(PKGS) -c $<
%.ml %.mli: %.mly
.PHONY: all opt world metas depend install uninstall clean clean_metas distclean
%.all:
- @OCAMLPATH=$(OCAMLPATH):$$OCAMLPATH $(MAKE) -C $* all
+ @echo building module: $*
+ @OCAMLPATH=$(OCAMLPATH):$$OCAMLPATH $(MAKE) -C $* all --no-print-directory
%.opt:
- @OCAMLPATH=$(OCAMLPATH):$$OCAMLPATH $(MAKE) -C $* opt
+ @echo building module: $*
+ @OCAMLPATH=$(OCAMLPATH):$$OCAMLPATH $(MAKE) -C $* opt --no-print-directory
%.clean:
- @OCAMLPATH=$(OCAMLPATH):$$OCAMLPATH $(MAKE) -C $* clean
+ @echo cleaning module: $*
+ @OCAMLPATH=$(OCAMLPATH):$$OCAMLPATH $(MAKE) -C $* clean --no-print-directory
%.depend:
- @OCAMLPATH=$(OCAMLPATH):$$OCAMLPATH $(MAKE) -C $* depend
+ @echo calculating dependencies for module: $*
+ @OCAMLPATH=$(OCAMLPATH):$$OCAMLPATH $(MAKE) -C $* depend --no-print-directory
%.stats:
+ @echo generating stats for module: $*
@$(MAKE) -C $* .stats
$(MODULES:%=%.install):
OCAMLARCHIVEOPTIONS += -linkall
disambiguateTypes.cmi: disambiguateTypes.mli
- $(OCAMLC) -c -rectypes $<
+ @echo " OCAMLC -rectypes $<"
+ @$(OCAMLC) -c -rectypes $<
disambiguateTypes.cmo: disambiguateTypes.ml disambiguateTypes.cmi
- $(OCAMLC) -c -rectypes $<
+ @echo " OCAMLC -rectypes $<"
+ @$(OCAMLC) -c -rectypes $<
disambiguateTypes.cmx: disambiguateTypes.ml disambiguateTypes.cmi
- $(OCAMLOPT) -c -rectypes $<
+ @echo " OCAMLOPT -rectypes $<"
+ @$(OCAMLOPT) -c -rectypes $<
opt: opt_utilities
all_utilities:
- $(MAKE) -C utilities/ all
+ @echo " building: utilities"
+ @$(MAKE) -C utilities/ all --no-print-directory
opt_utilities:
- $(MAKE) -C utilities/ opt
+ @echo " building: utilities"
+ @$(MAKE) -C utilities/ opt --no-print-directory
clean: clean_utilities
clean_utilities:
- $(MAKE) -C utilities/ clean
+ @echo " cleaning: utilities"
+ @$(MAKE) -C utilities/ clean --no-print-directory
OCAMLC = ocamlfind ocamlc $(LINKOPTS) -package $(LIBS)
OCAMLOPT = ocamlfind opt $(LINKOPTS) -package $(LIBS)
all: $(UTILITIES)
+ @echo -n
opt: $(UTILITIES_OPT)
+ @echo -n
%: %.ml
- $(OCAMLC) -o $@ $<
+ @echo " OCAMLC $<"
+ @$(OCAMLC) -o $@ $<
%.opt: %.ml
- $(OCAMLOPT) -o $@ $<
+ @echo " OCAMLOPT $<"
+ @$(OCAMLOPT) -o $@ $<
clean:
rm -f $(UTILITIES) $(UTILITIES_OPT) *.cm[iox] *.o
LOCAL_LINKOPTS = -package helm-content_pres -linkpkg
test: test_lexer
test_lexer: test_lexer.ml $(PACKAGE).cma
- $(OCAMLC) $(LOCAL_LINKOPTS) -o $@ $<
+ @echo " OCAMLC $<"
+ @$(OCAMLC) $(LOCAL_LINKOPTS) -o $@ $<
clean_tests:
rm -f test_lexer{,.opt}
LOCAL_LINKOPTS = -package helm-$(PACKAGE) -linkpkg
test: test_parser print_grammar test_dep
test_parser: test_parser.ml $(PACKAGE).cma
- $(OCAMLC) $(LOCAL_LINKOPTS) -o $@ $<
+ @echo " OCAMLC $<"
+ @$(OCAMLC) $(LOCAL_LINKOPTS) -o $@ $<
print_grammar: print_grammar.ml $(PACKAGE).cma
- $(OCAMLC) $(LOCAL_LINKOPTS) -o $@ $<
+ @echo " OCAMLC $<"
+ @$(OCAMLC) $(LOCAL_LINKOPTS) -o $@ $<
test_dep: test_dep.ml $(PACKAGE).cma
- $(OCAMLC) $(LOCAL_LINKOPTS) -o $@ $<
+ @echo " OCAMLC $<"
+ @$(OCAMLC) $(LOCAL_LINKOPTS) -o $@ $<
include ../Makefile.common
opt: opt_table_creator opt_extractor
all_table_creator:
- make -C table_creator/ all
+ @echo " building: table_creator"
+ @make -C table_creator/ all --no-print-directory
opt_table_creator:
- make -C table_creator/ opt
+ @echo " building: table_creator"
+ @make -C table_creator/ opt --no-print-directory
all_extractor:
- make -C extractor/ all
+ @echo " building: extractor"
+ @make -C extractor/ all --no-print-directory
opt_extractor:
- make -C extractor/ opt
+ @echo " building: extractor"
+ @make -C extractor/ opt --no-print-directory
clean: clean_table_creator clean_extractor
clean_table_creator:
- make -C table_creator/ clean
+ @echo " cleaning: table_creator"
+ @make -C table_creator/ clean --no-print-directory
clean_extractor:
- make -C extractor/ clean
+ @echo " cleaning: extractor"
+ @make -C extractor/ clean --no-print-directory
OCAMLFIND=ocamlfind
all: extractor extractor_manager
+ @echo -n
opt: extractor.opt extractor_manager.opt
+ @echo -n
clean:
rm -f *.cm[ixo] *.[ao] extractor extractor.opt *.err *.out extractor_manager extractor_manager.opt
extractor: extractor.ml
- $(OCAMLFIND) ocamlc \
+ @echo " OCAMLC $<"
+ @$(OCAMLFIND) ocamlc \
-thread -package mysql,helm-metadata -linkpkg -o $@ $<
extractor.opt: extractor.ml
- $(OCAMLFIND) ocamlopt \
+ @echo " OCAMLOPT $<"
+ @$(OCAMLFIND) ocamlopt \
-thread -package mysql,helm-metadata -linkpkg -o $@ $<
extractor_manager: extractor_manager.ml
- $(OCAMLFIND) ocamlc \
+ @echo " OCAMLC $<"
+ @$(OCAMLFIND) ocamlc \
-thread -package mysql,helm-metadata -linkpkg -o $@ $<
extractor_manager.opt: extractor_manager.ml
- $(OCAMLFIND) ocamlopt \
+ @echo " OCAMLOPT $<"
+ @$(OCAMLFIND) ocamlopt \
-thread -package mysql,helm-metadata -linkpkg -o $@ $<
export: extractor.opt extractor_manager.opt
table_creator table_creator.opt table_destructor table_destructor.opt
all: table_creator table_destructor
+ @echo -n
opt: table_creator.opt table_destructor.opt
+ @echo -n
table_creator: table_creator.ml ../metadata.cma
- $(OCAMLFIND) ocamlc \
+ @echo " OCAMLC $<"
+ @$(OCAMLFIND) ocamlc \
-thread -package mysql,helm-metadata -linkpkg -o $@ $<
table_destructor: table_creator
- ln -f $< $@
+ @ln -f $< $@
table_creator.opt: table_creator.ml ../metadata.cmxa
- $(OCAMLFIND) ocamlopt \
+ @echo " OCAMLOPT $<"
+ @$(OCAMLFIND) ocamlopt \
-thread -package mysql,helm-metadata -linkpkg -o $@ $<
table_destructor.opt: table_creator.opt
- ln -f $< $@
+ @ln -f $< $@
clean:
rm -f *.cm[iox] *.a *.o
primitiveTactics.cmi: proofEngineTypes.cmi
metadataQuery.cmi: proofEngineTypes.cmi
paramodulation/inference.cmi: proofEngineTypes.cmi
-paramodulation/indexing.cmi: proofEngineTypes.cmi
paramodulation/saturation.cmi: proofEngineTypes.cmi
variousTactics.cmi: proofEngineTypes.cmi
autoTactic.cmi: proofEngineTypes.cmi
hashtbl_equiv.cmi metadataQuery.cmi
metadataQuery.cmx: proofEngineTypes.cmx primitiveTactics.cmx \
hashtbl_equiv.cmx metadataQuery.cmi
-paramodulation/utils.cmo: paramodulation/utils.cmi
-paramodulation/utils.cmx: paramodulation/utils.cmi
+paramodulation/utils.cmo: proofEngineReduction.cmi paramodulation/utils.cmi
+paramodulation/utils.cmx: proofEngineReduction.cmx paramodulation/utils.cmi
paramodulation/inference.cmo: proofEngineReduction.cmi proofEngineHelpers.cmi \
metadataQuery.cmi paramodulation/inference.cmi
paramodulation/inference.cmx: proofEngineReduction.cmx proofEngineHelpers.cmx \
metadataQuery.cmx paramodulation/inference.cmi
paramodulation/equality_indexing.cmo: paramodulation/equality_indexing.cmi
paramodulation/equality_indexing.cmx: paramodulation/equality_indexing.cmi
-paramodulation/indexing.cmo: proofEngineTypes.cmi primitiveTactics.cmi \
- paramodulation/indexing.cmi
-paramodulation/indexing.cmx: proofEngineTypes.cmx primitiveTactics.cmx \
- paramodulation/indexing.cmi
-paramodulation/saturation.cmo: proofEngineTypes.cmi proofEngineReduction.cmi \
- primitiveTactics.cmi paramodulation/saturation.cmi
-paramodulation/saturation.cmx: proofEngineTypes.cmx proofEngineReduction.cmx \
- primitiveTactics.cmx paramodulation/saturation.cmi
+paramodulation/indexing.cmo: paramodulation/indexing.cmi
+paramodulation/indexing.cmx: paramodulation/indexing.cmi
+paramodulation/saturation.cmo: reductionTactics.cmi proofEngineTypes.cmi \
+ proofEngineReduction.cmi primitiveTactics.cmi \
+ paramodulation/saturation.cmi
+paramodulation/saturation.cmx: reductionTactics.cmx proofEngineTypes.cmx \
+ proofEngineReduction.cmx primitiveTactics.cmx \
+ paramodulation/saturation.cmi
variousTactics.cmo: tacticals.cmi proofEngineTypes.cmi \
proofEngineReduction.cmi proofEngineHelpers.cmi primitiveTactics.cmi \
variousTactics.cmi
include ../../Makefile.common
all $(PACKAGE).cma :saturate
+ @echo -n
opt $(PACKAGE).cmxa:saturate.opt
+ @echo -n
saturate: saturate_main.ml $(LIBRARIES)
- $(OCAMLC) $(LOCALLINKOPTS) -thread -linkpkg -o $@ $<
+ @echo " OCAMLC $<"
+ @$(OCAMLC) $(LOCALLINKOPTS) -thread -linkpkg -o $@ $<
saturate.opt: saturate_main.ml $(LIBRARIES)
- $(OCAMLOPT) $(LOCALLINKOPTS) -thread -linkpkg -o $@ $<
+ @echo " OCAMLOPT $<"
+ @$(OCAMLOPT) $(LOCALLINKOPTS) -thread -linkpkg -o $@ $<
clean:
rm -f saturate saturate.opt
let module M = CicMetaSubst in
let module HL = HelmLibraryObjects in
let cmp = !Utils.compare_terms in
- ignore(CicTypeChecker.type_of_aux' metasenv context term);
let check = match termty with C.Implicit None -> false | _ -> true in
function
| [] -> None
match_unif_time_no := !match_unif_time_no +. (t2 -. t1);
raise e
| CicUtil.Meta_not_found _ as exn ->
- prerr_endline "siam qua"; raise exn
+ prerr_endline "zurg";
+ raise exn
in
Some (C.Rel (1 + lift_amount), subst', metasenv', ugraph',
(candidate, eq_URI))
let module S = CicSubstitution in
let module M = CicMetaSubst in
let module HL = HelmLibraryObjects in
- let candidates = get_candidates Matching table term in
+ let candidates = get_candidates Matching table term in
match term with
| C.Meta _ -> None
| term ->
in
!maxmeta, res
in
+ let _ =
+ try
+ CicTypeChecker.type_of_aux' metasenv' context left ugraph;
+ CicTypeChecker.type_of_aux' metasenv' context right ugraph;
+ with
+ CicUtil.Meta_not_found _ as exn ->
+ begin
+ prerr_endline "siamo in demodulation_equality 1";
+ prerr_endline (CicPp.ppterm left);
+ prerr_endline (CicPp.ppterm right);
+ raise exn
+ end
+ in
let res = demodulation_aux metasenv' context ugraph table 0 left in
let newmeta, newtarget =
match res with
bo, Inference.ProofGoalBlock (Inference.NoProof, goal_proof)
in
let m = Inference.metas_of_term newterm in
- let newmetasenv = List.filter (fun (i, _, _) -> List.mem i m) (metas @ menv')in
+ (* QUA *)
+ let newmetasenv = List.filter (fun (i, _, _) -> List.mem i m) (menv @ menv')in
!maxmeta, (newproof, newmetasenv, newterm)
in
let res =
let demodulate table current =
let newmeta, newcurrent =
+ let _ =
+ let w, proof, (eq_ty, left, right, order), metas, args = current in
+ let metasenv, context, ugraph = env in
+ let metasenv' = metasenv @ metas in
+ try
+ CicTypeChecker.type_of_aux' metasenv' context left ugraph;
+ CicTypeChecker.type_of_aux' metasenv' context right ugraph;
+ with
+ CicUtil.Meta_not_found _ as exn ->
+ begin
+ prerr_endline "siamo in forward_simplify";
+ prerr_endline (CicPp.ppterm left);
+ prerr_endline (CicPp.ppterm right);
+ raise exn
+ end
+ in
Indexing.demodulation_equality !maxmeta env table sign current in
maxmeta := newmeta;
if is_identity env newcurrent then
let demodulate sign table target =
let newmeta, newtarget =
+ let _ =
+ let w, proof, (eq_ty, left, right, order), metas, args = target in
+ let metasenv, context, ugraph = env in
+ let metasenv' = metasenv @ metas in
+ try
+ CicTypeChecker.type_of_aux' metasenv' context left ugraph;
+ CicTypeChecker.type_of_aux' metasenv' context right ugraph;
+ with
+ CicUtil.Meta_not_found _ as exn ->
+ begin
+ prerr_endline "siamo in forward_simplify_new";
+ prerr_endline (CicPp.ppterm left);
+ prerr_endline (CicPp.ppterm right);
+ raise exn
+ end
+ in
Indexing.demodulation_equality !maxmeta env table sign target in
maxmeta := newmeta;
newtarget
include ../Makefile.common
fake/threadSafe.cmi: fake/threadSafe.mli
- cd fake/ \
+ @echo " OCAMLC $<"
+ @cd fake/ \
&& ocamlfind ocamlc -c threadSafe.mli
thread_fake.cma: fake/threadSafe.cmi
- cd fake/ \
+ @echo " OCAMLC -a $@"
+ @cd fake/ \
&& ocamlfind ocamlc -a -o $@ threadSafe.ml \
&& cp $@ ../
thread_fake.cmxa: fake/threadSafe.cmi
- cd fake/ \
+ @echo " OCAMLOPT -a $@"
+ @cd fake/ \
&& ocamlfind opt -a -o $@ threadSafe.ml \
&& cp $@ ../
all: utf8_macros.cma pa_unicode_macro.cma
make_table: make_table.ml
- $(OCAMLFIND) ocamlc -package $(MAKE_TABLE_PACKAGES) -linkpkg -o $@ $^
+ @echo " OCAMLC $<"
+ @$(OCAMLFIND) ocamlc -package $(MAKE_TABLE_PACKAGES) -linkpkg -o $@ $^
utf8MacroTable.ml:
./make_table $@
utf8MacroTable.cmo: utf8MacroTable.ml
- $(OCAMLFIND) ocamlc -c $<
+ @echo " OCAMLC $<"
+ @$(OCAMLFIND) ocamlc -c $<
pa_unicode_macro.cmo: pa_unicode_macro.ml utf8Macro.cmo
- $(OCAMLFIND) ocamlc -package camlp4 -pp "camlp4o q_MLast.cmo pa_extend.cmo -loc loc" -c $<
+ @echo " OCAMLC $<"
+ @$(OCAMLFIND) ocamlc -package camlp4 -pp "camlp4o q_MLast.cmo pa_extend.cmo -loc loc" -c $<
pa_unicode_macro.cma: utf8MacroTable.cmo utf8Macro.cmo pa_unicode_macro.cmo
- $(OCAMLFIND) ocamlc -a -o $@ $^
+ @echo " OCAMLC -a $@"
+ @$(OCAMLFIND) ocamlc -a -o $@ $^
.PHONY: test
test: test.ml