Class SceneOps

java.lang.Object
org.checkerframework.afu.scenelib.util.SceneOps

public class SceneOps extends Object
Algebraic operations on scenes.

Also includes a main(String[]) method that lets these operations be performed from the command line.

  • Method Details

    • main

      public static void main(String[] args) throws IOException
      Run an operation on a subcommand-specific number of JAIFs. Currently the only available subcommand is "diff", which must be the first of three arguments, followed in order by the "minuend" and the "subtrahend" (see diff(AScene, AScene)). If successful, the diff subcommand writes the scene it calculates to System.out.
      Throws:
      IOException - if there is trouble reading a file
    • diff

      public static AScene diff(AScene s1, AScene s2)
      Compute the difference of two scenes, that is, a scene containing all and only those insertion specifications that exist in the first but not in the second.
      Parameters:
      s1 - the "minuend"
      s2 - the "subtrahend"
      Returns:
      s1 - s2 ("set difference")
    • testDiffEmpties

      public static void testDiffEmpties()
    • testDiffSame

      public static void testDiffSame() throws IOException
      Test that X-X=0, for several scenes X.
      Throws:
      IOException - if there is trouble with IO