[m-rev.] diff: update Aditi interface
Simon Taylor
stayl at cs.mu.OZ.AU
Sun Aug 24 00:02:11 AEST 2003
Estimated hours taken: 0.1
Branches: main
tests/{valid,invalid}/aditi.m:
tests/{valid,invalid}/aditi_private_builtin.m:
Updated for the new Aditi API.
Index: invalid/aditi.m
===================================================================
RCS file: /home/mercury1/repository/tests/invalid/aditi.m,v
retrieving revision 1.2
diff -u -u -r1.2 aditi.m
--- invalid/aditi.m 5 May 2000 06:08:07 -0000 1.2
+++ invalid/aditi.m 22 Aug 2003 04:07:10 -0000
@@ -8,6 +8,7 @@
:- mode aditi_di :: in.
:- mode aditi_uo :: out.
:- mode aditi_mui :: in.
+:- mode aditi_ui :: in.
:- implementation.
Index: invalid/aditi_private_builtin.m
===================================================================
RCS file: /home/mercury1/repository/tests/invalid/aditi_private_builtin.m,v
retrieving revision 1.1
diff -u -u -r1.1 aditi_private_builtin.m
--- invalid/aditi_private_builtin.m 18 Mar 2003 02:43:50 -0000 1.1
+++ invalid/aditi_private_builtin.m 22 Aug 2003 04:07:10 -0000
@@ -7,47 +7,55 @@
:- type relation_ticket == c_pointer.
- % do_call_returning_relation(ProcName, InputSchema, InputTuple,
+ % do_call_returning_relation(DB, ProcName, InputSchema, InputTuple,
% OutputRel).
%
% Call an Aditi procedure, returning a reference to the output
% relation. InputTuple is a tuple containing the
% input arguments. InputSchema is an Aditi schema string
% describing the tuple of input arguments.
-:- impure pred do_call_returning_relation(string, string,
+:- impure pred do_call_returning_relation(aditi__state, string, string,
T, relation_ticket).
-:- mode do_call_returning_relation(in, in, in, out) is det.
+:- mode do_call_returning_relation(aditi_ui, in, in, in, out) is det.
% Find the single solution for a deterministic database call.
% Abort the transaction if the call does not succeed at
% least once.
% InputTuple and OutputTuple must have type '{}/N' (the arity
% depends on the relation being called).
-:- impure pred do_det_call(string, string, InputTuple, OutputTuple).
-:- mode do_det_call(in, in, in, out) is det.
-
-:- impure pred do_semidet_call(string, string, InputTuple, OutputTuple).
-:- mode do_semidet_call(in, in, in, out) is semidet.
-
-:- impure pred do_nondet_call(string, string, InputTuple, OutputTuple).
-:- mode do_nondet_call(in, in, in, out) is nondet.
-
-:- impure pred do_multi_call(string, string, InputTuple, OutputTuple).
-:- mode do_multi_call(in, in, in, out) is multi.
+:- impure pred do_det_call(aditi__state, string, string,
+ InputTuple, OutputTuple).
+:- mode do_det_call(aditi_ui, in, in, in, out) is det.
+
+:- impure pred do_semidet_call(aditi__state, string, string,
+ InputTuple, OutputTuple).
+:- mode do_semidet_call(aditi_ui, in, in, in, out) is semidet.
+
+:- impure pred do_nondet_call(aditi__state, string, string,
+ InputTuple, OutputTuple).
+:- mode do_nondet_call(aditi_ui, in, in, in, out) is nondet.
+
+:- impure pred do_multi_call(aditi__state, string, string,
+ InputTuple, OutputTuple).
+:- mode do_multi_call(aditi_ui, in, in, in, out) is multi.
% XXX I'm not sure whether it makes sense to have
% committed choice Aditi predicates.
-:- impure pred do_cc_nondet_call(string, string, InputTuple, OutputTuple).
-:- mode do_cc_nondet_call(in, in, in, out) is cc_nondet.
-
-:- impure pred do_cc_multi_call(string, string, InputTuple, OutputTuple).
-:- mode do_cc_multi_call(in, in, in, out) is cc_multi.
-
-:- impure pred do_erroneous_call(string, string, InputTuple, OutputTuple).
-:- mode do_erroneous_call(in, in, in, out) is erroneous.
-
-:- impure pred do_failure_call(string, string, InputTuple, OutputTuple).
-:- mode do_failure_call(in, in, in, out) is failure.
+:- impure pred do_cc_nondet_call(aditi__state, string, string,
+ InputTuple, OutputTuple).
+:- mode do_cc_nondet_call(aditi_ui, in, in, in, out) is cc_nondet.
+
+:- impure pred do_cc_multi_call(aditi__state, string, string,
+ InputTuple, OutputTuple).
+:- mode do_cc_multi_call(aditi_ui, in, in, in, out) is cc_multi.
+
+:- impure pred do_erroneous_call(aditi__state, string, string,
+ InputTuple, OutputTuple).
+:- mode do_erroneous_call(aditi_ui, in, in, in, out) is erroneous.
+
+:- impure pred do_failure_call(aditi__state, string, string,
+ InputTuple, OutputTuple).
+:- mode do_failure_call(aditi_ui, in, in, in, out) is failure.
% do_insert_tuple(BaseRelationName, Tuple).
%
Index: valid/aditi.m
===================================================================
RCS file: /home/mercury1/repository/tests/valid/aditi.m,v
retrieving revision 1.2
diff -u -u -r1.2 aditi.m
--- valid/aditi.m 5 May 2000 06:08:19 -0000 1.2
+++ valid/aditi.m 22 Aug 2003 03:38:24 -0000
@@ -8,6 +8,7 @@
:- mode aditi_di :: in.
:- mode aditi_uo :: out.
:- mode aditi_mui :: in.
+:- mode aditi_ui :: in.
:- implementation.
Index: valid/aditi_private_builtin.m
===================================================================
RCS file: /home/mercury1/repository/tests/valid/aditi_private_builtin.m,v
retrieving revision 1.1
diff -u -u -r1.1 aditi_private_builtin.m
--- valid/aditi_private_builtin.m 18 Mar 2003 02:43:52 -0000 1.1
+++ valid/aditi_private_builtin.m 22 Aug 2003 03:39:44 -0000
@@ -7,47 +7,55 @@
:- type relation_ticket == c_pointer.
- % do_call_returning_relation(ProcName, InputSchema, InputTuple,
+ % do_call_returning_relation(DB, ProcName, InputSchema, InputTuple,
% OutputRel).
%
% Call an Aditi procedure, returning a reference to the output
% relation. InputTuple is a tuple containing the
% input arguments. InputSchema is an Aditi schema string
% describing the tuple of input arguments.
-:- impure pred do_call_returning_relation(string, string,
+:- impure pred do_call_returning_relation(aditi__state, string, string,
T, relation_ticket).
-:- mode do_call_returning_relation(in, in, in, out) is det.
+:- mode do_call_returning_relation(aditi_ui, in, in, in, out) is det.
% Find the single solution for a deterministic database call.
% Abort the transaction if the call does not succeed at
% least once.
% InputTuple and OutputTuple must have type '{}/N' (the arity
% depends on the relation being called).
-:- impure pred do_det_call(string, string, InputTuple, OutputTuple).
-:- mode do_det_call(in, in, in, out) is det.
-
-:- impure pred do_semidet_call(string, string, InputTuple, OutputTuple).
-:- mode do_semidet_call(in, in, in, out) is semidet.
-
-:- impure pred do_nondet_call(string, string, InputTuple, OutputTuple).
-:- mode do_nondet_call(in, in, in, out) is nondet.
-
-:- impure pred do_multi_call(string, string, InputTuple, OutputTuple).
-:- mode do_multi_call(in, in, in, out) is multi.
+:- impure pred do_det_call(aditi__state, string, string,
+ InputTuple, OutputTuple).
+:- mode do_det_call(aditi_ui, in, in, in, out) is det.
+
+:- impure pred do_semidet_call(aditi__state, string, string,
+ InputTuple, OutputTuple).
+:- mode do_semidet_call(aditi_ui, in, in, in, out) is semidet.
+
+:- impure pred do_nondet_call(aditi__state, string, string,
+ InputTuple, OutputTuple).
+:- mode do_nondet_call(aditi_ui, in, in, in, out) is nondet.
+
+:- impure pred do_multi_call(aditi__state, string, string,
+ InputTuple, OutputTuple).
+:- mode do_multi_call(aditi_ui, in, in, in, out) is multi.
% XXX I'm not sure whether it makes sense to have
% committed choice Aditi predicates.
-:- impure pred do_cc_nondet_call(string, string, InputTuple, OutputTuple).
-:- mode do_cc_nondet_call(in, in, in, out) is cc_nondet.
-
-:- impure pred do_cc_multi_call(string, string, InputTuple, OutputTuple).
-:- mode do_cc_multi_call(in, in, in, out) is cc_multi.
-
-:- impure pred do_erroneous_call(string, string, InputTuple, OutputTuple).
-:- mode do_erroneous_call(in, in, in, out) is erroneous.
-
-:- impure pred do_failure_call(string, string, InputTuple, OutputTuple).
-:- mode do_failure_call(in, in, in, out) is failure.
+:- impure pred do_cc_nondet_call(aditi__state, string, string,
+ InputTuple, OutputTuple).
+:- mode do_cc_nondet_call(aditi_ui, in, in, in, out) is cc_nondet.
+
+:- impure pred do_cc_multi_call(aditi__state, string, string,
+ InputTuple, OutputTuple).
+:- mode do_cc_multi_call(aditi_ui, in, in, in, out) is cc_multi.
+
+:- impure pred do_erroneous_call(aditi__state, string, string,
+ InputTuple, OutputTuple).
+:- mode do_erroneous_call(aditi_ui, in, in, in, out) is erroneous.
+
+:- impure pred do_failure_call(aditi__state, string, string,
+ InputTuple, OutputTuple).
+:- mode do_failure_call(aditi_ui, in, in, in, out) is failure.
% do_insert_tuple(BaseRelationName, Tuple).
%
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list