ANIMATION_FUNCTION images path

Description

ProB2 and ProB2-UI do not find all images that ProB Tcl/Tk finds. For example, ProB Tcl/Tk looks relative to the DEFINITION file which defines the images, in case a DEFINITION file is used. For those models, ProB2-UI does not find the images.

Activity

Show:

Fabian Vu October 7, 2020 at 9:31 AM

This issue is solved by

  1. Normalizing the resulting path

  2. Accessing the directory of the machine instead of the machine itself. It assumed that the .mch file was a directory

Fabian Vu October 7, 2020 at 9:10 AM

The path seems to be returned relative to the main machine already

Fabian Vu August 24, 2020 at 1:59 PM

Paths returned by prob2_interface:get_animation_image_list/1 should be relative to main machine.

dgelessus May 11, 2020 at 5:28 PM

Is this issue still present? If so, do you have an example machine/set of files that demonstrates this issue, i. e. for which the visualisation images are found by Tcl/Tk but not by the ProB 2 UI?

Most likely this problem cannot be solved on the Java side alone. We use the ProB 2 command GetImagesForMachineCommand, which internally calls the predicate prob2_interface:get_animation_image_list/1. This predicate returns the animation images and their file names as a list of image_file(Nr,File) terms with no further context, so there's no way for the Java side to know which machine or definition file each animation image comes from. Currently the ProB 2 UI assumes that all animation image file names/paths are relative to either the main machine's directory, the project file's directory, or the ProB home directory.

Fixed

Details

Assignee

Reporter

Priority

Created September 26, 2018 at 8:50 AM
Updated October 7, 2020 at 9:31 AM
Resolved October 7, 2020 at 9:31 AM