Files
mercury/tests/valid/empty_bound_inst_list.m
Andrew Bromage b539cb29f7 Better handling of abstract unification of insts which always fail.
Estimated hours taken: 8

Better handling of abstract unification of insts which always fail.

compiler/det_analysis.m:
	New predicate det_par_conjunction_detism/3 to compute the
	determinism of parallel conjunctions (or virtual parallel
	conjunctions).

compiler/hlds_data.m:
	Make the ground_inst_table store the determinism of the
	grounding operation.  The reason for this is that
	make_ground_inst* now returns the determinism of the
	grounding operation, and so it makes sense to store the
	determinisms along with cached groundings to avoid
	recomputing them.

compiler/inst_util.m:
	Add a new argument to return the determinism of the
	unification/grounding to the following predicates:

		abstractly_unify_inst_functor
		abstractly_unify_bound_inst_list
		abstractly_unify_bound_inst_list_lives
		abstractly_unify_inst_list_lives
		make_ground_inst_list_lives
		make_ground_inst_list
		make_ground_inst
		make_ground_bound_inst_list

	This is to make it easier to locate unifications which
	cannot succeed.

compiler/instmap.m:
	If you attempt to insert a not_reached into an instmap, the
	entire instmap becomes unreachable.

compiler/modecheck_unify.m:
	Slight reorganisation of code dealing with var-functor
	unifications.  Simple optimisations have been moved to
	modecheck_unify_functor.

	All unifications which definitely fail are now optimised
	to `fail'.

compiler/mode_util.m:
	Minor change to support the alteration to the ground_inst_table
	above.

tests/valid/Mmake:
tests/valid/empty_bound_inst_list.m:
	Test case.
1997-08-21 07:29:35 +00:00

18 lines
237 B
Mathematica

:- module empty_bound_inst_list.
:- interface.
:- pred p is failure.
:- implementation.
:- import_module std_util.
:- type some_functors ---> foo ; bar ; baz.
p :-
( Y = yes(bar), Z = foo
; Y = yes(baz), Z = foo
),
Y = yes(Z).