GithubHelp home page GithubHelp logo

davewathaverford / the-omega-project Goto Github PK

View Code? Open in Web Editor NEW
69.0 69.0 25.0 3.94 MB

Tools from Pugh et al.'s "Omega Project" for constraint-based compiler tools: The "Omega Library" for constraint manipulation; The "Omega Calculator" (text interface); the "Omega Test" for depedence analysis; the "Uniform Library" for code transformation; and the "Code generation" library for generating the transformed code. I am experimenting with tracking bugs with Lighthouse, but am not yet sure I've got it configure right --- see http://davew_haverford.lighthouseapp.com/projects/13658-the-omega-project/overview (if you can; if you can't, email [email protected]).

Home Page: http://www.cs.umd.edu/projects/omega/

License: BSD 2-Clause "Simplified" License

C 92.06% C++ 7.09% Shell 0.27% Racket 0.01% Perl 0.42% Awk 0.01% Io 0.14% Objective-C 0.02%

the-omega-project's People

Contributors

billpugh avatar davewathaverford avatar lamielle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

the-omega-project's Issues

Suggestion to Improve README by FTP Related Comments

An idea:

On Linux all of the Omega project deliverables MIGHT be downloaded with a 
command line program "lftp"

    mkdir ./the_copy
    cd ./the_copy
        lftp ftp://ftp.cs.umd.edu/pub/omega/
            # at lftp console please type
            mirror ./
            # and after the download is complete, please type
            exit

As of 2022_01_06 I haven't studied the Omega project yet, but I found it from

http://www.cs.cmu.edu/~scandal/research-groups.html

and my motivation is to assemble myself a collection of local copies of
various software projects. The idea is that in a chemistry lab there is a
storage area with a huge amount of different reagents. in electronics lab
there are storage containers with a huge variety of different electronic components
and in a software_laboratory there should be a "local storage" with
software components and their documentation. Basically, a classical paper-book-library
analogue of software components, a "private GitHub" with a personally assembled selection
of components that one has personally tested and has extra notes about how to
use/build them, preferably with custom build scripts, custom packaging.

One may call it an arms race between software developers and there have been
many fine projects that have gone offline and that are useful for interfacing with
legacy systems. Academics do not need to deal with legacy systems, but IRL the
newest and greatest oftentimes has to use something from the giants before us, specially
if it has something to do with hardware, because hardware costs and even if it were for free,
its installation costs. An example: mountains can be for free, but the builders, who crave caves/statues
into the mountains do ask/need some sort of payment. The same with hardware installation and setup.

Thank You for reading my comment.

can't build motif gui error: reference to ‘String’ is ambiguous

In file included from ../include/petit/motif.h:11,
                 from ../src/hpp.c:360:
/usr/include/X11/Intrinsic.h:186:5: error: reference to ‘String’ is ambiguous
  186 |     String*  /* params */,
      |     ^~~~~~
In file included from ../../omega_lib/include/omega/omega_core/oc.h:12,
                 from ../../omega_lib/include/omega/pres_gen.h:35,
                 from ../../omega_lib/include/omega/pres_form.h:10,
                 from ../../omega_lib/include/omega/RelBody.h:10,
                 from ../../omega_lib/include/omega/Relation.h:10,
                 from ../../omega_lib/include/omega/Relations.h:11,
                 from ../src/hpp.c:4:
../../basic/include/basic/String.h:24:7: note: candidates are: ‘class omega::String’
   24 | class String {
      |       ^~~~~~
In file included from ../include/petit/motif.h:11,
                 from ../src/hpp.c:360:
/usr/include/X11/Intrinsic.h:74:15: note:                 ‘typedef char* String’
   74 | typedef char *String;
      |               ^~~~~~
In file included from ../include/petit/motif.h:11,
                 from ../src/hpp.c:360:
/usr/include/X11/Intrinsic.h:186:5: error: ‘String’ has not been declared
  186 |     String*  /* params */,
      |     ^~~~~~
/usr/include/X11/Intrinsic.h:193:5: error: reference to ‘String’ is ambiguous
  193 |     String  string;
      |     ^~~~~~
In file included from ../../omega_lib/include/omega/omega_core/oc.h:12,
                 from ../../omega_lib/include/omega/pres_gen.h:35,
                 from ../../omega_lib/include/omega/pres_form.h:10,
                 from ../../omega_lib/include/omega/RelBody.h:10,
                 from ../../omega_lib/include/omega/Relation.h:10,
                 from ../../omega_lib/include/omega/Relations.h:11,
                 from ../src/hpp.c:4:
../../basic/include/basic/String.h:24:7: note: candidates are: ‘class omega::String’
   24 | class String {
      |       ^~~~~~
In file included from ../include/petit/motif.h:11,
                 from ../src/hpp.c:360:
/usr/include/X11/Intrinsic.h:74:15: note:                 ‘typedef char* String’
   74 | typedef char *String;
      |               ^~~~~~
In file included from ../include/petit/motif.h:11,
                 from ../src/hpp.c:360:
/usr/include/X11/Intrinsic.h:266:5: error: reference to ‘String’ is ambiguous
  266 |     String  /* action_name */,
      |     ^~~~~~
In file included from ../../omega_lib/include/omega/omega_core/oc.h:12,
                 from ../../omega_lib/include/omega/pres_gen.h:35,
                 from ../../omega_lib/include/omega/pres_form.h:10,
                 from ../../omega_lib/include/omega/RelBody.h:10,
                 from ../../omega_lib/include/omega/Relation.h:10,
                 from ../../omega_lib/include/omega/Relations.h:11,
                 from ../src/hpp.c:4:
../../basic/include/basic/String.h:24:7: note: candidates are: ‘class omega::String’
   24 | class String {
      |       ^~~~~~
In file included from ../include/petit/motif.h:11,
                 from ../src/hpp.c:360:
/usr/include/X11/Intrinsic.h:74:15: note:                 ‘typedef char* String’
   74 | typedef char *String;
      |               ^~~~~~
In file included from ../include/petit/motif.h:11,
                 from ../src/hpp.c:360:
/usr/include/X11/Intrinsic.h:266:5: error: ‘String’ has not been declared
  266 |     String  /* action_name */,
      |     ^~~~~~
/usr/include/X11/Intrinsic.h:268:5: error: reference to ‘String’ is ambiguous
  268 |     String*  /* params */,
      |     ^~~~~~
In file included from ../../omega_lib/include/omega/omega_core/oc.h:12,
                 from ../../omega_lib/include/omega/pres_gen.h:35,
                 from ../../omega_lib/include/omega/pres_form.h:10,
                 from ../../omega_lib/include/omega/RelBody.h:10,
                 from ../../omega_lib/include/omega/Relation.h:10,
                 from ../../omega_lib/include/omega/Relations.h:11,
                 from ../src/hpp.c:4:
../../basic/include/basic/String.h:24:7: note: candidates are: ‘class omega::String’
   24 | class String {
      |       ^~~~~~
In file included from ../include/petit/motif.h:11,
                 from ../src/hpp.c:360:
/usr/include/X11/Intrinsic.h:74:15: note:                 ‘typedef char* String’
   74 | typedef char *String;
      |               ^~~~~~
In file included from ../include/petit/motif.h:11,
                 from ../src/hpp.c:360:
/usr/include/X11/Intrinsic.h:268:5: error: ‘String’ has not been declared
  268 |     String*  /* params */,
      |     ^~~~~~
/usr/include/X11/Intrinsic.h:326:5: error: reference to ‘String’ is ambiguous
  326 |     String name;
      |     ^~~~~~
In file included from ../../omega_lib/include/omega/omega_core/oc.h:12,
                 from ../../omega_lib/include/omega/pres_gen.h:35,
                 from ../../omega_lib/include/omega/pres_form.h:10,
                 from ../../omega_lib/include/omega/RelBody.h:10,
                 from ../../omega_lib/include/omega/Relation.h:10,
                 from ../../omega_lib/include/omega/Relations.h:11,
                 from ../src/hpp.c:4:
../../basic/include/basic/String.h:24:7: note: candidates are: ‘class omega::String’
   24 | class String {
      |       ^~~~~~
In file included from ../include/petit/motif.h:11,
                 from ../src/hpp.c:360:
/usr/include/X11/Intrinsic.h:74:15: note:                 ‘typedef char* String’
   74 | typedef char *String;
      |               ^~~~~~
In file included from ../include/petit/motif.h:11,
                 from ../src/hpp.c:360:
/usr/include/X11/Intrinsic.h:364:5: error: reference to ‘String’ is ambiguous
  364 |     String resource_name; /* Resource name       */
      |     ^~~~~~
In file included from ../../omega_lib/include/omega/omega_core/oc.h:12,
                 from ../../omega_lib/include/omega/pres_gen.h:35,
                 from ../../omega_lib/include/omega/pres_form.h:10,
                 from ../../omega_lib/include/omega/RelBody.h:10,
                 from ../../omega_lib/include/omega/Relation.h:10,
                 from ../../omega_lib/include/omega/Relations.h:11,
                 from ../src/hpp.c:4:

Incorrect result from satisfiability test

The set {[x, y] : 0 <= x <= 4 && 0 <= y <= 4 && 4y < 5x && 9x <= 8y} is empty, but is_upper_bound_satisfiable() returns a nonzero value. Emptiness can be verified by enumerating and testing all points in the range. Furthermore, the library prints the set's characteristic function as FALSE.

The following complete program reproduces the problem.


#include <stdio.h>
#include "omega.h"

void omega_test(void)
{
  /* Create set S with inequalities:
   *    5x  -4y  -1 >= 0
   *   -9x  +8y     >= 0
   *    -x       +4 >= 0
   *     x          >= 0
   *    -y       +4 >= 0
   *     y          >= 0
   */

  Relation S(2);
  S.name_set_var(1, "x");
  S.name_set_var(2, "y");

  Variable_ID S_x = S.set_var(1);
  Variable_ID S_y = S.set_var(2);

  F_And *S_root = S.add_and();
  GEQ_Handle f1 = S_root->add_GEQ();
  f1.update_coef(S_x, 5);
  f1.update_coef(S_y, -4);
  f1.update_const(-1);

  GEQ_Handle f2 = S_root->add_GEQ();
  f2.update_coef(S_x, -9);
  f2.update_coef(S_y, 8);

  GEQ_Handle f3 = S_root->add_GEQ();
  f3.update_coef(S_x, -1);
  f3.update_const(4);

  GEQ_Handle f4 = S_root->add_GEQ();
  f4.update_coef(S_x, 1);

  GEQ_Handle f5 = S_root->add_GEQ();
  f5.update_coef(S_y, -1);
  f5.update_const(4);

  GEQ_Handle f6 = S_root->add_GEQ();
  f6.update_coef(S_y, 1);

  // Print the set that was built
  S.print();
  S.print_with_subs(); // FALSE after simplification

  // Is it satisfiable?
  if (S.is_upper_bound_satisfiable())
    printf("Omega test says satisfiable\n");
  else
    printf("Omega test says NOT satisfiable\n");
}

void enumerated_test(void)
{
  bool found = false;
  // Confirm satisfiability by enumerating points
  for (int y = 0; y <= 4; y++) {
    for (int x = 0; x <= 4; x++) {
      if ( 5 * x - 4 * y - 1 >= 0 &&
          -9 * x + 8 * y     >= 0)
        found = true;
    }
  }
  if (found)
    printf("Found a solution\n");
  else
    printf("No solution found\n");
}

int main(int argc, char **argv)
{
  enumerated_test();
  omega_test();
  return 0;
}

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.