Giter VIP home page Giter VIP logo

remodel's Introduction

remodel

691ST Project 2 - make->remodel

Usage

After cloning, run build.sh. build.sh performs the following steps:

This will create a REMODELFILE in the current directory that will be used for testing. The following executables must be accessible from the current directory: ocamlbuild, md5, g++. Note that the md5 call is used to perform the tests and is not used in the remodel executable.

Each of the four tests is separated by a sleep command. This allows more dynamic testing conditions.

remodel is executed in the REMODELFILE's directory and takes zero or more target names.

Freshness and Parallelism

remodel checks for freshness in several places. At the beginning of a build, it loads in the MD5 hashes of its dependencies. The program traverses the dependency tree recursively, forking processes for each each dependency from a target. The target waits on the children to return before invoking its command.

Before executing a command, the current process first checks whether the old MD5 hashes of both the target file and its dependencies are consistent with the current hash of each file. If the check is consistent, it skips executing this command and returns to its calling parent. If the check is not consistent, then it needs to perform another check - it needs to look at the log to see if another processs has already executed this command. It first scans the log directory for files having the target name in the file name. If it does not find any, then it executes its command and logs this file. If it finds files with the target's filename, it then reads each of them, checking whether the same command has already been executed. If the same command has already been executed for this target by another process, it does not execute its command and returns to the parent. If the command has not been executed, then it executes its command and logs this appropriately.

Known Problems

MD5 hashes for files are stored in the same order that they are entered in the REMODELFILE. They are not tagged with their filename, so they cannot detect when their recorded order changes. A future implementation would sort the files lexicographically before hashing.

There is the potential for race conditions between multiple processes operating on the same file and recording their status to the .remodel/logdone directory. However, since each command is in a file named by the target's name and the pid of the processes executing the command within, such scenarios can be detected post-build.

The REMODEL file cannot handle nested double quotations in commands.

The graph type is not currently used. I had wanted to do something like check the md5 of the remodel file. Not sure this is worth doing.

remodel's People

Contributors

etosch avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.