[PPL-devel] assign names to variables.
Enea Zaffanella
zaffanella at cs.unipr.it
Tue Aug 7 20:00:07 CEST 2012
On 08/06/2012 05:57 PM, Zell wrote:
> Dear all,
>
> Is there a quick way to pretty-print a Box or Polyhedha object using my
> variables names rather than the build-in "A", "B", "C"...? For
> example, below are an interval analysis result for a single instruction
> "x=10". PPL uses its built-in names A,B,...for each dimension.
>
> *******************************
> {true} x = 10 {A in 10}
> *******************************
>
> I do not see how to assign a user-defined names for PPL's variable objects.
>
> Any ideas? Thanks.
> Zell.
If you are using the C++ interface, then the solution is to use static
method
//! Sets the output function to be used for printing Variable objects.
static void set_output_function(output_function_type* p);
to provide the address of your own function for printing variables.
A similar approach is made available in the C interface, using function
int
ppl_io_set_variable_output_function(
ppl_io_variable_output_function_type* p);
As for the Java interface, the currently released versions of the
library do not provide such an option. If you are willing to try the
top-of-tree version, I have just added the required code for
customization in the Java interface: see files
interfaces/Java/tests/Custom_Variable_Stringifier.java
and
interfaces/Java/tests/Variable_Output_test1.java
Clearly, the mechanism is new and still to be tested
(any feedback appreciated).
Cheers,
Enea.
More information about the PPL-devel
mailing list