public AlgReader(File file) throws FileNotFoundException {
        if (!file.exists())
            return;
        map = new TreeMap<String, String>();
        this.file = file;
        String ext = file.getName().substring(file.getName().lastIndexOf('.'));
        setValue("Program", "path", file.getParent() + "/");
        setValue("Program", "name", file.getName());
        if (ext.equals(".bin")) {
            setValue("Program", "source", file.getName());
        }
        if (ext.equals(".cpp") || ext.equals(".cc")) {
            readFromCpp();
            setValue("Program", "source", file.getName());
        }
        if (ext.equals(".alg")) {
            readFromAlg();
        }
    }