[m-dev.] Reconsidering initialisation of solver types

Ralph Becket rafe at csse.unimelb.edu.au
Thu Jul 27 13:55:55 AEST 2006


I propose that we remove automatic initialisation of solver variables
from the solver types design.

Problems induced by automatic initialisation include:
- significant complication in the Mercury compiler;
- unpredictable code generation (i.e., there may be several different
  ways local solver variables in a clause could be automatically
  initialised, each leading to different scheduled code) which makes it
  harder to understand error messages;
- solver code often appears near impure code and error messages in these
  circumstances are often misleading (i.e., a symptom is reported rather
  than the cause);
- manual initialisation does not seem to be an issue for most solver
  programs (i.e., most of them explicitly initialise solver variables
  anyway), although this will make Programs using Herbrand variables
  ever so slightly less concise (but who uses Herbrand variables? :-)

Any objections?

-- Ralph
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at csse.unimelb.edu.au
Administrative Queries: owner-mercury-developers at csse.unimelb.edu.au
Subscriptions:          mercury-developers-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the developers mailing list