Skip to content
/ hamsa Public

A tool to extract complexities and costs from programs and kernels

License

Notifications You must be signed in to change notification settings

lac-dcc/hamsa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hamsa

Kernels are nests of loops that process multidimensional arrays. Hamsa is a tool to extract kernels from programs and infer their asymptotic complexity. Figure 1 illustrates this:

kernels

For linear loop bounds, inferring the complexity is trivial. However, for non-linear bounds this task is more challenging. We intend to use the approach proposed by Gulwani et al. to implement it.


Building the tool

First of all, you need to inform the directory where LLVM is built. You can do this by changing the value of LLVM_BUILD_DIR at tool/setup.sh.

After configuring the build dir, you can setup the tool by running this command:

./setup.sh

Running

After you've built the tool, you can run it as a Clang plugin. However the tool/run.sh script makes it easier to run. You can use it like this:

./run.sh inputFile outputFile outputFormat

Setup tutorial

You can also watch our tutorial video about how to setup the tool and run it inside a Docker container.

About

A tool to extract complexities and costs from programs and kernels

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •