From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id XAA28196; Sun, 25 Nov 2001 23:53:39 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id XAA27562 for ; Sun, 25 Nov 2001 23:53:38 +0100 (MET) Received: from smtp.nwlink.com (smtp.nwlink.com [209.20.130.57]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id fAPMrar26934 for ; Sun, 25 Nov 2001 23:53:37 +0100 (MET) Received: from ip178.usw22.rb1.bel.nwlink.com (ip178.usw22.rb1.bel.nwlink.com [207.202.195.178]) by smtp.nwlink.com (8.9.3/8.9.1) with SMTP id OAA28747 for ; Sun, 25 Nov 2001 14:52:54 -0800 (PST) Received: (qmail 26580 invoked by uid 500); 25 Nov 2001 22:52:07 -0000 Date: Sun, 25 Nov 2001 14:52:07 -0800 From: Mike Leary To: caml Subject: [Caml-list] optional dependency representation/selection/verification? Message-ID: <20011125145207.A26538@ip178.usw22.rb1.bel.nwlink.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Organization: is a poor substitute for less junk Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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 ... http://www.research.att.com/sw/tools/graphviz/ 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", , "long text", , ), 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. :) thanks, Mike -- "You mean, I'm the bad guy?" --Bill Foster, aka D-FENS ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr