Skip to content

Commit

Permalink
s/irifrance/go-air
Browse files Browse the repository at this point in the history
  • Loading branch information
scott-cotton committed Jul 29, 2021
1 parent 4473bcc commit 871d828
Show file tree
Hide file tree
Showing 72 changed files with 146 additions and 120 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The Gini sat solver is a fast, clean SAT solver written in Go. It is to our knowledge
the first ever performant pure-Go SAT solver made available.

| [![Build Status](https://travis-ci.org/irifrance/gini.svg?branch=master)](https://travis-ci.org/irifrance/gini) | [![GoDoc](https://godoc.org/github.com/irifrance/gini?status.svg)](https://godoc.org/github.com/irifrance/gini) | [Google Group](https://groups.google.com/d/forum/ginisat) |
| [![Build Status](https://travis-ci.org/go-air/gini.svg?branch=master)](https://travis-ci.org/go-air/gini) | [![GoDoc](https://godoc.org/github.com/go-air/gini?status.svg)](https://godoc.org/github.com/go-air/gini) | [Google Group](https://groups.google.com/d/forum/ginisat) |
------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------|

This solver is fully open source, originally developped at IRI France.
Expand All @@ -13,9 +13,9 @@ This solver is fully open source, originally developped at IRI France.

For the impatient:

go get github.com/irifrance/gini...
go get github.com/go-air/gini...

I recommend however building the package github.com/irifrance/gini/internal/xo with bounds checking
I recommend however building the package github.com/go-air/gini/internal/xo with bounds checking
turned off. This package is all about anything-goes performance and is the workhorse behind most of
the gini sat solver. It is also extensively tested and well benchmarked, so it should not pose any
safety threat to client code. This makes a signficant speed difference (maybe 10%) on long running
Expand Down Expand Up @@ -164,16 +164,16 @@ comparison to using a logic library.

With Cardinality constraints, optimisation is easy

import "github.com/irifrance/gini"
import "github.com/irifrance/gini/logic"
import "github.com/go-air/gini"
import "github.com/go-air/gini/logic"

c := logic.NewC()


// suppose we encode package constraints for a module in the circuit c
// and we have a slice S of dependent packages P each of which has an attribute
// P.needsRepl which indicates whether or not it needs to be replaced (of type
// github.com/irifrance/gini/z.Lit)
// github.com/go-air/gini/z.Lit)

repls := make([]z.Lit, 0, 1<<23)
for _, p := range pkgs {
Expand Down Expand Up @@ -202,7 +202,7 @@ With Cardinality constraints, optimisation is easy
## Activation Literals

Gini supports recycling activation literals with the
[Activatable interface](http://godoc.org/github.com/irifrance/gini/inter#Activatable)
[Activatable interface](http://godoc.org/github.com/go-air/gini/inter#Activatable)

Even without recycling, activation literals provide an easy way to solve MAXSAT problems:
just activate each clause, use a cardinality constraint on the activation literals,
Expand Down Expand Up @@ -292,7 +292,7 @@ superlinear speedup according to the literature.
## Distributed and CRISP

Gini provides a definition and reference implementation for
[CRISP-1.0](https://github.com/irifrance/gini/blob/master/doc/crisp/crisp.pdf),
[CRISP-1.0](https://github.com/go-air/gini/blob/master/doc/crisp/crisp.pdf),
the compressed incremental SAT protocol. The protocol is a client-server wire
protocol which can dispatch an incremental sat solver with very little overhead
as compared to direct API calls. The advantage of using a protocol is that it
Expand Down Expand Up @@ -329,7 +329,7 @@ BibText:
```
@misc{scott_cotton_2019_2553490,
author = {Scott Cotton},
title = {irifrance/gini: Sapeur},
title = {go-air/gini: Sapeur},
month = jan,
year = 2019,
doi = {10.5281/zenodo.2553490},
Expand Down
5 changes: 3 additions & 2 deletions ax/ax.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
package ax

import (
"github.com/irifrance/gini/inter"
"github.com/irifrance/gini/z"
"time"

"github.com/go-air/gini/inter"
"github.com/go-air/gini/z"
)

// Interface T describes an assumptions exchanger (ax).
Expand Down
7 changes: 4 additions & 3 deletions ax/ax_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ package ax

import (
"fmt"
"github.com/irifrance/gini"
"github.com/irifrance/gini/gen"
"github.com/irifrance/gini/z"
"log"
"math/rand"
"testing"
"time"

"github.com/go-air/gini"
"github.com/go-air/gini/gen"
"github.com/go-air/gini/z"
)

func ExampleNewT() {
Expand Down
3 changes: 2 additions & 1 deletion ax/req.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ package ax

import (
"fmt"
"github.com/irifrance/gini/z"
"sync"
"time"

"github.com/go-air/gini/z"
)

// Type ReqFlag describes options for submitting requests
Expand Down
3 changes: 2 additions & 1 deletion ax/resp.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
package ax

import (
"github.com/irifrance/gini/z"
"time"

"github.com/go-air/gini/z"
)

// Type Response describes the result of an ax Request.
Expand Down
2 changes: 1 addition & 1 deletion cmd/bench/bench.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"strings"
"time"

"github.com/irifrance/gini/bench"
"github.com/go-air/gini/bench"
)

var selFlags = flag.NewFlagSet("sel", flag.ExitOnError)
Expand Down
3 changes: 2 additions & 1 deletion cmd/crispd/crispd.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ package main
import (
"flag"
"fmt"
"github.com/irifrance/gini/crisp"
"log"
"os"
"path/filepath"

"github.com/go-air/gini/crisp"
)

var CrispD *crisp.Server
Expand Down
9 changes: 5 additions & 4 deletions cmd/gini/icnf.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ package main
import (
"flag"
"fmt"
"github.com/irifrance/gini"
"github.com/irifrance/gini/ax"
"github.com/irifrance/gini/dimacs"
"github.com/irifrance/gini/z"
"io"
"log"
"runtime"
"time"

"github.com/go-air/gini"
"github.com/go-air/gini/ax"
"github.com/go-air/gini/dimacs"
"github.com/go-air/gini/z"
)

var useAx = flag.Bool("ax", false, "run the assumption exchanger for icnf inputs")
Expand Down
6 changes: 3 additions & 3 deletions cmd/gini/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import (
"strings"
"time"

proto "github.com/irifrance/gini/crisp"
"github.com/irifrance/gini/internal/xo"
"github.com/irifrance/gini/z"
proto "github.com/go-air/gini/crisp"
"github.com/go-air/gini/internal/xo"
"github.com/go-air/gini/z"
)

var pprofAddr = flag.String("pprof", "", "address to serve http profile (eg :6060)")
Expand Down
9 changes: 5 additions & 4 deletions crisp/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ package crisp

import (
"fmt"
"github.com/irifrance/gini/dimacs"
gnet "github.com/irifrance/gini/inter/net"
"github.com/irifrance/gini/internal/xo"
"github.com/irifrance/gini/z"
"io"
"log"
"net"

"github.com/go-air/gini/dimacs"
gnet "github.com/go-air/gini/inter/net"
"github.com/go-air/gini/internal/xo"
"github.com/go-air/gini/z"
)

// Type Client is a concrete Solver which communicates using the gini sat protocol.
Expand Down
3 changes: 2 additions & 1 deletion crisp/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
package crisp

import (
"github.com/irifrance/gini/inter/net"
"testing"

"github.com/go-air/gini/inter/net"
)

func TestClient(t *testing.T) {
Expand Down
7 changes: 4 additions & 3 deletions crisp/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ package crisp

import (
"fmt"
"github.com/irifrance/gini"
"github.com/irifrance/gini/inter"
"github.com/irifrance/gini/z"
"log"
"net"
"os"

"github.com/go-air/gini"
"github.com/go-air/gini/inter"
"github.com/go-air/gini/z"
)

var trace = false
Expand Down
7 changes: 4 additions & 3 deletions crisp/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@ package crisp

import (
"fmt"
"github.com/irifrance/gini/gen"
"github.com/irifrance/gini/internal/xo"
"github.com/irifrance/gini/z"
"log"
"math/rand"
"os"
"sync"
"testing"
"time"

"github.com/go-air/gini/gen"
"github.com/go-air/gini/internal/xo"
"github.com/go-air/gini/z"
)

func init() {
Expand Down
3 changes: 2 additions & 1 deletion crisp/vu32io.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ package crisp

import (
"fmt"
"github.com/irifrance/gini/z"
"io"

"github.com/go-air/gini/z"
)

// This file implements varint encoding/decoding + buffered io
Expand Down
3 changes: 2 additions & 1 deletion dimacs/cnf.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ package dimacs
import (
"bufio"
"fmt"
"github.com/irifrance/gini/z"
"io"

"github.com/go-air/gini/z"
)

// Type Reader holds info for reading dimacs formatted intput.
Expand Down
3 changes: 2 additions & 1 deletion dimacs/cnf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ package dimacs

import (
"bytes"
"github.com/irifrance/gini/z"
"testing"

"github.com/go-air/gini/z"
)

type dimacsTestData struct {
Expand Down
3 changes: 2 additions & 1 deletion dimacs/icnf.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ package dimacs
import (
"bufio"
"fmt"
"github.com/irifrance/gini/z"
"io"

"github.com/go-air/gini/z"
)

type iCnfReader struct {
Expand Down
3 changes: 2 additions & 1 deletion dimacs/icnf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ package dimacs
import (
"bytes"
"fmt"
"github.com/irifrance/gini/z"
"testing"

"github.com/go-air/gini/z"
)

var iCnf = `p inccnf
Expand Down
3 changes: 2 additions & 1 deletion dimacs/lit.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ package dimacs

import (
"bufio"
"github.com/irifrance/gini/z"

"github.com/go-air/gini/z"
)

func readLit(r *bufio.Reader) (m z.Lit, e error) {
Expand Down
2 changes: 1 addition & 1 deletion dimacs/vis.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

package dimacs

import "github.com/irifrance/gini/z"
import "github.com/go-air/gini/z"

// Type Vis provides a visitor interface to reading dimacs files.
//
Expand Down
4 changes: 2 additions & 2 deletions gen/color.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ package gen
import (
"math/rand"

"github.com/irifrance/gini/inter"
"github.com/irifrance/gini/z"
"github.com/go-air/gini/inter"
"github.com/go-air/gini/z"
)

// RandColor creates a formula asking if a random
Expand Down
3 changes: 2 additions & 1 deletion gen/color_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
package gen_test

import (
"github.com/irifrance/gini/gen"
"testing"

"github.com/go-air/gini/gen"
)

func TestRandGraph(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion gen/cubes.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package gen
import (
"math/rand"

"github.com/irifrance/gini/z"
"github.com/go-air/gini/z"
)

type RandCuber interface {
Expand Down
4 changes: 2 additions & 2 deletions gen/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"math/rand"
"sync"

"github.com/irifrance/gini/inter"
"github.com/irifrance/gini/z"
"github.com/go-air/gini/inter"
"github.com/go-air/gini/z"
)

/// make the rng seedable
Expand Down
4 changes: 2 additions & 2 deletions gen/pt.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ package gen
import (
"sort"

"github.com/irifrance/gini/inter"
"github.com/irifrance/gini/z"
"github.com/go-air/gini/inter"
"github.com/go-air/gini/z"
)

// PartVar returns a variable if element i is in partition k
Expand Down
2 changes: 1 addition & 1 deletion gen/pt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"log"
"testing"

"github.com/irifrance/gini"
"github.com/go-air/gini"
)

func TestPart(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions gen/rands.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"sync"
"time"

"github.com/irifrance/gini/inter"
"github.com/irifrance/gini/z"
"github.com/go-air/gini/inter"
"github.com/go-air/gini/z"
)

// RandS creates an inter.S which just returns result to Solve() within a
Expand Down
2 changes: 1 addition & 1 deletion gen/rands_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"testing"
"time"

"github.com/irifrance/gini/z"
"github.com/go-air/gini/z"
)

func TestRands(t *testing.T) {
Expand Down
Loading

0 comments on commit 871d828

Please sign in to comment.