[PPL-devel] Fwd: Question regarding OCaml Interface of PPL

Enea Zaffanella zaffanella at cs.unipr.it
Wed Mar 7 09:08:58 CET 2012


On 03/06/2012 09:33 PM, Roberto Bagnara wrote:
>
>
> -------- Original Message --------
> Subject: Question regarding OCaml Interface of PPL
> Date: Tue, 6 Mar 2012 13:49:10 -0500
> From: Brian Pak <bpak at andrew.cmu.edu>
> To: support at bugseng.com
>
> Hi all,
>
> I'm a student in Carnegie Mellon University in US, and trying to use PPL
> for my research project.
>
> First, thank you for your great work! It is truly amazing :)



> I was fiddling with the library and interfaces (especially OCaml), and
> got stuck on one thing. I wanted to use 'get_interval' or
> 'get_lower/upper_bound' functions in Box class, but it seems it's not
> available in OCaml interface. Is there any way to get around this?
>
> I'm not too familiar with these mathematical concepts (I'm reading
> materials to grasp better understanding, though), but here's what I want
> to accomplish:
> - Given n variables where each of them is bounded (in some linear
> relation) -- build a constraint system out of these
> - Generate an n-polytope that above equations describe (currently
> planning to use C_Polyhedron)
> - I want to enumerate integer points in this polytope, but that's known
> to be difficult (please correct me if I'm wrong)
> - Create an n-dimensional Box object from C_Polyhedron we generated
> (which is basically a hyper-rectangle surrounding the polytope, possibly?)
> - Get the interval (low and upper bound) for each variable for the Box
> above.
> - Pick a random point in the Box (hopefully this is easier since we know
> the interval of each dimension)
> - Perform a rejection sampling to check if the picked point is contained
> in the polytope.
> - There doesn't seem to be a way to do this natively, so I'm planning to
> use the trick where I make a very small polytope that is constrained by
> Variable(0) == c_1 && Variable(1) == c_2 && … && Variable(n-1) == c_n,
> and use 'contains' function to check if it's contained in the polytope
> (represented by C_Polyhedron object above).
>
>
> Thanks for your help in advance! :D
> -Brian
> _______________________________________________
> PPL-devel mailing list
> PPL-devel at cs.unipr.it
> http://www.cs.unipr.it/mailman/listinfo/ppl-devel
>




More information about the PPL-devel mailing list