Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] optional dependency representation/selection/verification?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-11-25 (22:53)
From: Mike Leary <leary@n...>
Subject: [Caml-list] optional dependency representation/selection/verification?
Continuing my tradition of making a relatively simple manual sytem into a
complex project beyond my current abilities ...

I'm trying to think of a program to create a custom 'dot' source file ...

which looks basically like:
  phys121 -> math124; // phys121 depends on math124
  phys122 -> math125;
  phys123 -> math126;

... that would prompt the user to select from a range of optional items,
but also prompt based on optional/missing dependecies.  For example:

math435 depends on:
( math335 or math327 ) and ( math309 or ( amath352 and amath353 ) )

So, when the user picks math435, the program would figure out which
dependecies were missing, display the dependencies (indicating missing
items) and prompt the user to select from a range of options (could be a
series of binary choices, or a listing of permutations).  There should be a
way to associate some text with each item, i.e. display a nice menu.
Ideally, the program should diplay a list of alternate, shortest "paths" to
satisfy the dependency, but that's _not_ a version 1.0 item.

It would also be nice to have the program diplay a list of items from a
list for which the dependencies are already met, or list them from 'most
met' to 'least met'.  Saving and reloading current state :) would also be
nice, but not necessary.

I was thinking maybe something like: ("item", <boolean>, "long text",
<function to set boolean based on dependency info>, <function to output
dependency info>), but I don't really want to have to write that many
functions.  I'd like it to be data driven, but I'm not sure how to generate
such functions (whatever they might be!) from text files in OCaml (I have
used the lex/yacc features tho').

What sort of data structure / algorithm would work for this?

Any input much appreciated. :)


"You mean, I'm the bad guy?"  --Bill Foster, aka D-FENS
Bug reports:  FAQ:
To unsubscribe, mail  Archives: