Compare commits

...

9 Commits

Author SHA1 Message Date
Suzanne Soy
36c1047c48 compatibility with racket < 7.0 broken (by some dependency I think) 2021-04-05 17:10:06 +01:00
Suzanne Soy
56120371b4 got out of memory on Travis, reduce number of jobs 2021-04-05 01:48:54 +01:00
Suzanne Soy
7a01fad928 Hashes now use integers instead of fixnums, it seems? 2021-04-04 19:51:27 +01:00
Suzanne Soy
864d8b110e Renamed main branch 2021-04-04 07:22:35 +01:00
Suzanne Soy
28547d4d79 WIP on a fix 2021-04-04 07:07:17 +01:00
Suzanne Soy
7364ed6b29 Turn off coverage in older versions 2021-03-05 14:34:00 +00:00
Suzanne Soy
7f222c8c50 Fixed syntax 2021-03-04 21:30:05 +00:00
Suzanne Soy
963de56ea8 Changed my name :) 2021-03-04 20:39:57 +00:00
Georges Dupéron
d254963487 Updated Racket versions in .travis.yml 2019-04-22 00:05:29 +02:00
9 changed files with 38 additions and 30 deletions

View File

@ -8,24 +8,32 @@ env:
- PATH="$RACKET_DIR/bin:$PATH" - PATH="$RACKET_DIR/bin:$PATH"
matrix: matrix:
# RACKET_VERSION is an argument to install-racket.sh # RACKET_VERSION is an argument to install-racket.sh
- RACKET_VERSION=6.6 - RACKET_VERSION=7.0 COVER=true
- RACKET_VERSION=6.7 - RACKET_VERSION=7.1 COVER=true
- RACKET_VERSION=6.8 - RACKET_VERSION=7.2 COVER=true
- RACKET_VERSION=RELEASE - RACKET_VERSION=7.3 COVER=true
- RACKET_VERSION=HEAD - RACKET_VERSION=7.4 COVER=true
- RACKET_VERSION=7.5 COVER=true
- RACKET_VERSION=7.6 COVER=true
- RACKET_VERSION=7.7 COVER=true
- RACKET_VERSION=7.8 COVER=true
- RACKET_VERSION=7.9 COVER=true
- RACKET_VERSION=8.0 COVER=true
- RACKET_VERSION=8.0 COVER=true RACKET_CS=1
- RACKET_VERSION=HEAD COVER=true
before_install: before_install:
- curl -L https://raw.githubusercontent.com/greghendershott/travis-racket/master/install-racket.sh | bash - curl -L https://raw.githubusercontent.com/greghendershott/travis-racket/master/install-racket.sh | bash
- raco pkg install --deps search-auto doc-coverage cover cover-codecov # or cover-coveralls - if $COVER; then raco pkg install --deps search-auto doc-coverage cover cover-codecov; fi # or cover-coveralls
install: install:
- raco pkg install --deps search-auto -j 2 phc-adt/ phc-adt-doc/ phc-adt-lib/ phc-adt-test/ - raco pkg install --deps search-auto -j 1 phc-adt/ phc-adt-doc/ phc-adt-lib/ phc-adt-test/
script: script:
- raco test -r -p phc-adt phc-adt-doc phc-adt-lib phc-adt-test - raco test -r -p phc-adt phc-adt-doc phc-adt-lib phc-adt-test
- raco setup --check-pkg-deps --no-zo --no-launcher --no-install --no-post-install --no-docs --pkgs phc-adt phc-adt-doc phc-adt-lib phc-adt-test - raco setup --check-pkg-deps --no-zo --no-launcher --no-install --no-post-install --no-docs --pkgs phc-adt phc-adt-doc phc-adt-lib phc-adt-test
- raco doc-coverage phc-adt - if $COVER; then raco doc-coverage phc-adt; fi
- raco cover -s main -s test -s doc -f codecov -f html -d ~/coverage . || true - if $COVER; then raco cover -s main -s test -s doc -f codecov -f html -d ~/coverage . || true; fi
# TODO: add an option to cover to run the "outer" module too, not just the submodules. # TODO: add an option to cover to run the "outer" module too, not just the submodules.
# TODO: deploy the coverage info. # TODO: deploy the coverage info.
# #

View File

@ -1,5 +1,5 @@
[![Build Status,](https://img.shields.io/travis/jsmaniac/phc-adt/master.svg)](https://travis-ci.org/jsmaniac/phc-adt) [![Build Status,](https://img.shields.io/travis/jsmaniac/phc-adt/main.svg)](https://travis-ci.org/jsmaniac/phc-adt)
[![Coverage Status,](https://img.shields.io/codecov/c/github/jsmaniac/phc-adt/master.svg)](https://codecov.io/gh/jsmaniac/phc-adt) [![Coverage Status,](https://img.shields.io/codecov/c/github/jsmaniac/phc-adt/main.svg)](https://codecov.io/gh/jsmaniac/phc-adt)
[![Build Stats,](https://img.shields.io/badge/build-stats-blue.svg)](http://jsmaniac.github.io/travis-stats/#jsmaniac/phc-adt) [![Build Stats,](https://img.shields.io/badge/build-stats-blue.svg)](http://jsmaniac.github.io/travis-stats/#jsmaniac/phc-adt)
[![Online Documentation,](https://img.shields.io/badge/docs-online-blue.svg)](http://docs.racket-lang.org/phc-adt/) [![Online Documentation,](https://img.shields.io/badge/docs-online-blue.svg)](http://docs.racket-lang.org/phc-adt/)
[![Maintained as of 2017,](https://img.shields.io/maintenance/yes/2017.svg)](https://github.com/jsmaniac/phc-adt/issues) [![Maintained as of 2017,](https://img.shields.io/maintenance/yes/2017.svg)](https://github.com/jsmaniac/phc-adt/issues)

View File

@ -22,4 +22,4 @@
"datatype")) "datatype"))
(define pkg-desc "Algebraic Datatypes tailored for writing compilers (documentation only)") (define pkg-desc "Algebraic Datatypes tailored for writing compilers (documentation only)")
(define version "1.1") (define version "1.1")
(define pkg-authors '("Georges Dupéron")) (define pkg-authors '(|Suzanne Soy|))

View File

@ -1,7 +1,7 @@
#lang scribble/manual #lang scribble/manual
@title{Algebraic Data Types for compilers: Implementation} @title{Algebraic Data Types for compilers: Implementation}
@author[@author+email["Georges Dupéron" "georges.duperon@gmail.com"]] @author[@author+email["Suzanne Soy" "racket@suzanne.soy"]]
This library is implemented using literate programming. The implementation This library is implemented using literate programming. The implementation
details are presented in the following sections. The user documentation is in details are presented in the following sections. The user documentation is in

View File

@ -22,4 +22,4 @@
"scribble-math")) "scribble-math"))
(define pkg-desc "Algebraic Datatypes tailored for writing compilers (tests are in phc-adt-test)") (define pkg-desc "Algebraic Datatypes tailored for writing compilers (tests are in phc-adt-test)")
(define version "1.1") (define version "1.1")
(define pkg-authors '("Georges Dupéron")) (define pkg-authors '(|Suzanne Soy|))

View File

@ -104,10 +104,10 @@ same if the @tc[database] and @tc[index] is the same for both nodes.
(eq? (raw-node-database a) (raw-node-database b)) (eq? (raw-node-database a) (raw-node-database b))
(equal? (raw-node-index a) (raw-node-index b)))) (equal? (raw-node-index a) (raw-node-index b))))
(λ (a r) (λ (a r)
(fxxor (eq-hash-code (raw-node-database a)) (bitwise-xor (eq-hash-code (raw-node-database a))
(r (raw-node-index a)))) (r (raw-node-index a))))
(λ (a r) (λ (a r)
(fxxor (eq-hash-code (raw-node-database a)) (bitwise-xor (eq-hash-code (raw-node-database a))
(r (raw-node-index a)))))] (r (raw-node-index a)))))]
The following function can then be used to test if two nodes are the same, based The following function can then be used to test if two nodes are the same, based
@ -221,7 +221,7 @@ them with a special marker.
@chunk[<node-hash> @chunk[<node-hash>
(: node-hash ( (fieldᵢ/τ ) (: node-hash ( (fieldᵢ/τ )
( (node-id fieldᵢ/τ Any Any) ( Any Fixnum) Fixnum))) ( (node-id fieldᵢ/τ Any Any) ( Any Integer) Integer)))
(define (node-hash nd racket-recur-hash) (define (node-hash nd racket-recur-hash)
(if (eq? (raw-node-database ((struct-accessor node-id raw) nd)) (if (eq? (raw-node-database ((struct-accessor node-id raw) nd))
'unique-copy) 'unique-copy)
@ -275,9 +275,9 @@ To combine hash codes, we simply compute their @elem[#:style 'tt]{xor}. Later
versions of this library may use more sophisticated mechanisms. versions of this library may use more sophisticated mechanisms.
@chunk[<combine-hash-codes> @chunk[<combine-hash-codes>
(: combine-hash-codes ( Fixnum * Fixnum)) (: combine-hash-codes ( Integer * Integer))
(define (combine-hash-codes . fixnums) (define (combine-hash-codes . hashes)
(apply fxxor fixnums))] (apply bitwise-xor hashes))]
@subsection{Caching node equality} @subsection{Caching node equality}

View File

@ -235,11 +235,11 @@ nodes have the same shape, but cannot by themselves create logical cycles.
#t)) #t))
(λ (a rec-hash) (λ (a rec-hash)
(fxxor (rec-hash 'id) (bitwise-xor (rec-hash 'id)
(rec-hash (force ((struct-accessor pid fieldᵢ) a))) (rec-hash (force ((struct-accessor pid fieldᵢ) a)))
)) ))
(λ (a rec-hash) (λ (a rec-hash)
(fxxor (rec-hash 'id) (bitwise-xor (rec-hash 'id)
(rec-hash (force ((struct-accessor pid fieldᵢ) a))) (rec-hash (force ((struct-accessor pid fieldᵢ) a)))
))))] ))))]

View File

@ -11,4 +11,4 @@
(define build-deps '()) (define build-deps '())
(define pkg-desc "Tests for the phc-adt library") (define pkg-desc "Tests for the phc-adt library")
(define version "1.1") (define version "1.1")
(define pkg-authors '("Georges Dupéron")) (define pkg-authors '(|Suzanne Soy|))

View File

@ -9,4 +9,4 @@
(define build-deps '()) (define build-deps '())
(define pkg-desc "Algebraic Datatypes tailored for writing compilers") (define pkg-desc "Algebraic Datatypes tailored for writing compilers")
(define version "1.1") (define version "1.1")
(define pkg-authors '("Georges Dupéron")) (define pkg-authors '(|Suzanne Soy|))