[m-dev.] I want to move and rename the dependency_graph module

Julien Fischer jfischer at opturion.com
Wed Feb 15 13:18:11 AEDT 2017

Hi Paul,

On Wed, 15 Feb 2017, Paul Bone wrote:

> On Tue, Feb 14, 2017 at 04:58:05PM +1100, Zoltan Somogyi wrote:

>> Then for each entry point, we could just call this TSCC procedure
>> specifying the id of the procedure as p_to_call, the actual values
>> of its input arguments, and dummy values for the input args of all
>> the other procs in the TSCC.
>> However, I am not sure about how easy it would be to generate dummy
>> arguments that would be type correct in each target language.
> Java and C# both have null which can be used for objects.  I think we
> understand the possible primitive types (like int) and can use values such
> as 0.
> Can a user give a foreign_type pragma with a primitive Java/C# type?

Yes, both backends allow the foreign type to be any accessible Java / C#

> I don't think that would interact with Mercury's polymorphism well so
> it's probably not supported.

Both backends already support generating an appropriate initializer for
any mlds_type (and hence Mercury type), since we need to assign values
to local variables in the generated code to "get around" definite
assignment analysis.
(See mlds_to_java.get_java_type_initializer/1 and the similar
predicate in mlds_to_cs.m.)


More information about the developers mailing list