Class DeclReader


  • public class DeclReader
    extends Object
    Reads declaration files and provides methods to access the information within them. A declaration file consists of a number of program points and the variables for each program point.
    • Constructor Detail

      • DeclReader

        public DeclReader()
        Create a new DeclReader.
    • Method Detail

      • read

        public void read​(File pathname)
                  throws IOException
        Read declarations from the specified pathname.
        Parameters:
        pathname - a File for reading data
        Throws:
        IOException - if there is trouble reading the file
      • read_decl

        protected DeclReader.DeclPpt read_decl​(EntryReader decl_file)
                                        throws IOException
        Reads a single program point declaration from decl_file.
        Parameters:
        decl_file - EntryReader for reading data
        Returns:
        the program point declaration
        Throws:
        IOException - if there is trouble reading the file
      • find_ppt

        public @Nullable DeclReader.DeclPpt find_ppt​(String ppt_name)
        Fetches program point declaration for the ppt_name argument.

        This can return null. Example: when DynComp is run to compute comparability information, it produces no information (not even a declaration) for program points that are never executed. But, Chicory outputs a declaration for every program point, and this lookup can fail when using the --comparability-file=... command-line argument with a file produced by DynComp.

        Parameters:
        ppt_name - name of Ppt to fetch
        Returns:
        the program point declaration