[m-dev.] for review: Aditi [5]
Fergus Henderson
fjh at cs.mu.OZ.AU
Thu Jul 16 17:38:54 AEST 1998
On 07-Jul-1998, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
magic.m:
> % This should attempt to reorder within rules so that no supplementary
> % predicates are created with partially instantiated arguments, since Aditi
> % can only handle ground terms in relations. The problem occurs if there are
> % partially instantiated terms live across a database predicate call. At the
> % moment an error is reported.
Should that comment have an "XXX"?
> magic__separate_proc(PredId, ProcId) -->
...
> %
> % Create a new pred_info for the procedure.
> %
>
> % Produce a unique name for the procedure.
> { pred_info_module(PredInfo0, Module) },
> { pred_info_name(PredInfo0, Name) },
> { pred_info_get_markers(PredInfo0, Markers) },
> { proc_id_to_int(ProcId, ProcInt) },
>
> ( { check_marker(Markers, base_relation) } ->
> { NewName = Name }
> ;
> { string__format("%s__aditi%i",
> [s(Name), i(ProcInt)], NewName) }
> ),
Perhaps you should use make_pred_name_with_context
defined in prog_util.m.
You should modify the demanglers (util/mdemangle.c
and profiler/demangle.m) to handle the new names.
> magic__create_interface_proc(Index, CPredProcId, AditiPredProcId,
> ExportedPredInfo0, ExportedProcInfo0, LocalProcInfo,
> HeadVars1, ArgTypes1, ArgModes1, MagicVars,
> MagicTypes, MagicModes) -->
>
> %
> % Create the local version.
> %
> { proc_info_goal(LocalProcInfo, Goal) },
> magic_info_get_module_info(ModuleInfo1),
> { proc_info_get_initial_instmap(LocalProcInfo, ModuleInfo1, InstMap) },
> { pred_info_name(ExportedPredInfo0, PredName0) },
> { string__append(PredName0, "__local", PredName) },
Ditto.
> { string__append(PredName, "__c_interface", NewPredName) },
Ditto.
> { string__append(PredName, "__do_aditi_call", CallPredName) },
Ditto.
> { string__append(PredName, "__magic", NewPredName) },
Ditto.
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3 | -- the last words of T. S. Garp.
More information about the developers
mailing list