Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit c05169f
Author: Cliff Click <[email protected]>
Date:   Sun Mar 17 14:43:05 2024 -0700

    Progress towards a mutual let rec

commit bac2f51
Author: Cliff Click <[email protected]>
Date:   Sat Mar 16 10:42:46 2024 -0700

    Progress to MutLetRec

    fix bug peeps not putting into GVN
    add _fresh & _known fields to Load, correct hash
    Hash for all uses getClass instead of label().
    Intern Load label
    Whitespace trim

commit 6b2ffab
Author: Cliff Click <[email protected]>
Date:   Tue Mar 12 13:11:40 2024 -0700

    Minor progress towards mut let rec

commit 3dfa518
Author: Cliff Click <[email protected]>
Date:   Tue Mar 12 11:25:43 2024 -0700

    Progress towards mutual-let-rec

    Sharpen ForwardRef display.
    TVLambda supports polymorphic unknown args.
    Remove extra deps.
    Loads once again will lift pass unrelated mem ops.
    Remove some leaking iterators
    Remove Parse/scope dead-store hack, will have to think about it.
    Promote cannot sharpen directly, until inputs sharpen.
    If bugs Parse if/ex handling; was buggy since cleanup last XMas
    Fix some TVar printing bugs.  Use generics to remove some casts.
    TVStruct goes back to a single unify call; simpler than the 4-loops version.
    Silence TypeMem printing by default

commit 169ed37
Author: Cliff Click <[email protected]>
Date:   Sun Mar 10 14:29:06 2024 -0700

    Fix minor bug searching class heirarchy

commit f34e50a
Author: Cliff Click <[email protected]>
Date:   Sun Mar 10 14:28:49 2024 -0700

    Denser printing with memory

    Can turn it on or off.
    Made the printer be more extensible.

commit 91f1d96
Author: Cliff Click <[email protected]>
Date:   Sun Mar 10 14:27:54 2024 -0700

    Better emacs error tracking

commit bfae715
Author: Cliff Click <[email protected]>
Date:   Fri Mar 1 13:59:14 2024 -0800

    Progress moving EXE to AA style

    Fix bug TVStruct unify, plus a lot more asserts
    Drop DefDynTable.  Pass an original one from Root
    Pass C-like ptr-to-Env (stack ptr) in prep_tree as part of type analysis

commit 19774db
Author: Cliff Click <[email protected]>
Date:   Wed Feb 28 10:23:44 2024 -0800

    Change the CEK engine again

    Old: Apply extends an environment and then evals the Lambda in the extended env.
    New: Apply passes all arguments to Lambda.apply which builds the extended env and evals.
    Same as building a stack-frame in a function call.

commit 087f767
Author: Cliff Click <[email protected]>
Date:   Tue Feb 27 13:25:00 2024 -0800

    Progress on the AA/EXE split

    Shuffle args on fresh_unify to make it trivial to swap with fresh.unify.  Rename NewNodes more suggestively.
    Remove a FP2DSP questionable peephole.
    Add a the current Env to the nongen set.  This is broken either way, as we really need a *partial* add; the current Env belongs in the nongen, but completely defined vars belong *out* of it.

    Pretty sure I can now remove do_delay_fresh

commit 9d120d4
Author: Cliff Click <[email protected]>
Date:   Sun Feb 25 11:01:01 2024 -0800

    Let shares stack frames

    Let does not introduce a new scope, just extends prior scope.

commit 071d5c8
Author: Cliff Click <[email protected]>
Date:   Sun Feb 25 10:40:08 2024 -0800

    Rename _fidx to fid

    Rename alias to fid.
    Fix Pair to use FCNT.
    Raise FCNT to 2, to avoid printing as NALL.

commit 1653c1a
Author: Cliff Click <[email protected]>
Date:   Sun Feb 25 10:11:40 2024 -0800

    Replaced Env with StructVal

    Bring closer to AA.  Envs are normal Structs.
    Renumber aliasing from 1 for all.
    Use same alias#s for functions and structs.
    Print Kontinuations for easier diff printing.

commit bad5186
Author: Cliff Click <[email protected]>
Date:   Mon Feb 19 13:42:42 2024 -0800

    Move EXE and AA closer together.

    Move 1st arg away from DSP/env.
    Rename 'Env e' to 'Env env'
    Uses strings for deBrujin indices.
    Structs get an alias, which is reset per-test.

commit bd467dc
Author: Cliff Click <[email protected]>
Date:   Mon Feb 19 13:39:08 2024 -0800

    Fix bug cyclic dyntable to flow

    Type String reports len not 1st char

commit 104fe1b
Author: Cliff Click <[email protected]>
Date:   Sun Feb 18 09:50:54 2024 -0800

    Nicer type prints

commit f72e42a
Author: Cliff Click <[email protected]>
Date:   Fri Feb 9 08:56:42 2024 -0800

    Minor tweaks, cleanups

commit 287bcf9
Author: Cliff Click <[email protected]>
Date:   Thu Feb 8 16:17:24 2024 -0800

    Closing in on diffs between AA and EXE

    AA closures are basically a struct with a bulk-let-mutal-rec.  EXE is using a single Let or a single normal Struct, and not the bulk LetMutRec.
    TODO: Fold together EXE Struct and Let; need to fix e.g. deBruin numbers, Ident lookups in Structs vs Fields.

commit b704ba7
Author: Cliff Click <[email protected]>
Date:   Wed Feb 7 13:09:50 2024 -0800

    Minor bug fixes around next test case

    AA clazz-chain ends in CLZCLZ and not null.
    Most TVar test cases.
    "criss-cross" handling for TVars in both the Fresh and That side of a fresh-unify.

commit e797dfa
Author: Cliff Click <[email protected]>
Date:   Wed Feb 7 13:05:48 2024 -0800

    Allow self-cycles on structs in EXE

    FIx some printing bugs, overhaul printing.
    Print recursive structs.
    Old self-cycle test cases reorganized, all working

commit 0abac3b
Author: Cliff Click <[email protected]>
Date:   Sun Feb 4 16:45:22 2024 -0800

    More explicit tracking of when a Bind is a NO-OP.

    Minor progress & printing bugs.

commit 2a071b8
Author: Cliff Click <[email protected]>
Date:   Sat Feb 3 16:02:16 2024 -0800

    Missing cleanup

commit 3e60413
Author: Cliff Click <[email protected]>
Date:   Sat Feb 3 16:01:33 2024 -0800

    Better test order

commit 14ae5b3
Author: Cliff Click <[email protected]>
Date:   Sat Feb 3 16:01:14 2024 -0800

    More default testing

    Make runs TestEXE & TestTVar by default.
    New invariant for TVStruct: open TVStructs never have a CLZ, closed ones always do (except CLZCLZ).
    Rewrite TVStruct unify, breaking out all the parts into tiny functions.
    EXE wraps all Structs in Ptrs, using i.e. TVPtrs or PtrVal.  Change all tests to match.
    Add a alpha-num sort, to better sort TestEXE tests.
    Add some , remove someTestTVar tests

commit 5431bfe
Author: Cliff Click <[email protected]>
Date:   Fri Feb 2 13:16:49 2024 -0800

    better lambda print

commit 51bc702
Author: Cliff Click <[email protected]>
Date:   Fri Feb 2 13:16:35 2024 -0800

    debug hook

    also very strong fresh-unify test

commit f806e28
Author: Cliff Click <[email protected]>
Date:   Fri Feb 2 13:16:13 2024 -0800

    Progress towards never overload test

commit 5306d42
Author: Cliff Click <[email protected]>
Date:   Fri Feb 2 13:15:15 2024 -0800

    strengthen test case

commit 6218eea
Author: Cliff Click <[email protected]>
Date:   Fri Feb 2 13:15:01 2024 -0800

    Fix test

commit af71f1e
Author: Cliff Click <[email protected]>
Date:   Fri Feb 2 13:14:48 2024 -0800

    remove dead code

commit a6ee8fd
Author: Cliff Click <[email protected]>
Date:   Fri Feb 2 13:14:32 2024 -0800

    Update Makefile

commit 59d0dae
Author: Cliff Click <[email protected]>
Date:   Thu Jan 25 08:54:58 2024 -0800

    A few more stable tests

commit 76357be
Author: Cliff Click <[email protected]>
Date:   Wed Jan 24 20:56:59 2024 -0800

    A set of stable tests

    Here's to hoping no major restructurings breaking all tests.  A small set of stable tests of the moment.

    No need for int/flt clz for printing ints/flts, they default to shallow tmps.  DO not sharpen int/flt prims.
    Better utility for detecting "can lift to fun"
    Lots of minor progress tweaks.
    Bug fixes in a few peeps.

commit ef111e2
Author: Cliff Click <[email protected]>
Date:   Wed Jan 24 16:34:32 2024 -0800

    Progress on more complex TVDynTable

    Fix several bugs in unify of TVStruct around pinned fields, and TVDyn on fresh_unify
    Parse func passes $dyn arg.
    Combo once again falls on ambiguous overloads.
    Explicitly Root removes kills; remove broken CACHE_DEF_MEM_FLAT.
    FunPtr follows EXE Lambda example and pre-set_tvars.
    Fix a few missing deps.
    Fix a Iter leak.

commit 0db961d
Author: Cliff Click <[email protected]>
Date:   Mon Jan 22 16:59:53 2024 -0800

    Generify TVDynTable

    Keeps the EXE tests working along with Node tests.

commit f67d909
Author: Cliff Click <[email protected]>
Date:   Mon Jan 22 15:13:37 2024 -0800

    Define Bind rules a lot clearer

    Define Bind rules a lot clearer, move to comments
    CallEpi can wire and further optimize in one peephole.  Most CallEpi unify work happens in set_tvar.
    DefDynTable starts working.
    Extra $dyn arg slides over most primitives 2nd arg.

commit 85619a2
Author: Cliff Click <[email protected]>
Date:   Sat Jan 20 10:33:50 2024 -0800

    First cut DefDynTable

    Bunch of printing improvements.
    Don't build test by default, and tests depend on mains.

commit a37c225
Author: Cliff Click <[email protected]>
Date:   Sun Jan 14 13:58:02 2024 -0800

    Tweak makefile

    Makes tags & jar less often, faster builds

commit e6ad5cc
Author: Cliff Click <[email protected]>
Date:   Tue Jan 9 11:57:51 2024 -0800

    Progress on cleanup.

    TypeMem uses objs[1] instead of _any flag.  Less state.
    Add a popKeep; pop/del both kill and return void
    DynLoad sharper live info.
    TMP is_con() depends both on _is_con and _obj.is_con()

commit 2e0eac7
Author: Cliff Click <[email protected]>
Date:   Tue Jan 9 09:48:03 2024 -0800

    Optimizes "1" and "!1"

    Much cleanup on Root/MEM_0 liveness.
    Add a void Node walker.
    Rename def_mem to defMem
    live prettyprinter
    Bugfix TypeMem.kill

commit 19aeed9
Author: Cliff Click <[email protected]>
Date:   Mon Jan 8 12:03:50 2024 -0800

    Progress on basic tests

    Parser uses peep() not iter() after nodes.  No attempt to run the generic full-power iterator during parser.  Instead, its done in the pass before Combo.
    ROOT,CTL_0,MEM_0 are reset, not rebuilt, same as prims.  Unlike prims, their types go with the iter/combo algos.
    NodePrinter now prints liveness; fixes bug printing for CTL_0,MEM_0, Call, CallEpi
    Fix bug in expanding uses.
    hashCode pre-cooks inputs, asks for Node-specific bits.
    shouldCon revamped; uses virtual calls, mostly allows constants.
    More leak detection on iterators; kills many good iters.  :-(
    Missed field-sort in TVStruct.
    INT/FLT prim wrappers declaring constant when not.

commit af0f4c6
Author: Cliff Click <[email protected]>
Date:   Wed Dec 27 15:56:32 2023 -0800

    Progress on first test "1"

    implement fancier new printing
    Root is 1/2way a primitive; it needs value math run on it during Combo.
    Fix a bunch of leaking iter places.  Pondering leaking anyways for easier coding.
    Hash memoizes.

commit 5b5cc7f
Author: Cliff Click <[email protected]>
Date:   Tue Dec 26 22:04:30 2023 -0800

    cleanup progress

    Move Node printing to NodePrinter.
    Move Node.more_work, more_ideal to NodeUtil.

commit 337edbb
Author: Cliff Click <[email protected]>
Date:   Tue Dec 26 15:41:58 2023 -0800

    Moar cleanup

    this time compiles, nothing tested

commit fa82121
Author: Cliff Click <[email protected]>
Date:   Tue Dec 26 13:54:20 2023 -0800

    mid-giant-cleanup
  • Loading branch information
cliffclick committed Mar 17, 2024
1 parent 05ee63e commit e50e4a5
Show file tree
Hide file tree
Showing 141 changed files with 8,250 additions and 3,870 deletions.
6 changes: 6 additions & 0 deletions .dir-locals.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
;; List of lists
(
;; Each list is a emacs mode, dot, list of vars.
;; Each list of vars is a var name, dot, value
(java-mode . ((java-stack-trace-dir . "src/main/java/")))
)
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ hs_err_pid*
*~
.#*
TAGS
TAGS_AGE

# IdeaJ
.idea
Expand Down
34 changes: 22 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ endif

# Fun Args to javac. Mostly limit to java8 source definitions, and fairly
# aggressive lint warnings.
JAVAC_ARGS = -g -XDignore.symbol.file -Xlint:-deprecation
JAVAC_ARGS = -XDignore.symbol.file -Xlint:-deprecation -Xlint:-unchecked

# Source code
# Note that BuildVersion is not forced to be rebuilt here - so incremental
Expand All @@ -53,20 +53,19 @@ libs = $(wildcard lib/*jar)
jars = $(subst $(space),$(SEP),$(libs))


default_targets := build/aa.jar
# Default to building java classes and not the jar
#default_targets := build/aa.jar
default_targets := $(main_classes)
# Optionally add ctags to the default target if a reasonable one was found.
ifneq ($(CTAGS),)
default_targets += tags
default_targets += TAGS_AGE
endif

default: $(default_targets)

# Just the classes, no jarring step
classes: $(classes)

# Build the test classes
test: $(test_classes)

# Compile just the out-of-date files
$(main_classes): build/classes/main/%class: $(SRC)/%java
@echo "compiling " $@ " because " $?
Expand All @@ -76,7 +75,7 @@ $(main_classes): build/classes/main/%class: $(SRC)/%java
$(test_classes): $(CLZDIR)/test/%class: $(TST)/%java $(main_classes)
@echo "compiling " $@ " because " $?
@[ -d $(CLZDIR)/test ] || mkdir -p $(CLZDIR)/test
javac $(JAVAC_ARGS) -cp "$(CLZDIR)/test$(SEP)$(CLZDIR)/main$(SEP)$(jars)" -sourcepath $(TST) -d $(CLZDIR)/test $(test_javas)
@javac $(JAVAC_ARGS) -cp "$(CLZDIR)/test$(SEP)$(CLZDIR)/main$(SEP)$(jars)" -sourcepath $(TST) -d $(CLZDIR)/test $(test_javas)

# Note the tabs - not spaces - in the grep and cut commands
PROJECT_VERSION=0.0.1
Expand All @@ -89,7 +88,9 @@ BUILD_BY= (whoami | cut -d\\ -f2-)
# Build the version file anytime anything would trigger the build/aa.jar.
# i.e., identical dependencies to aa.jar, except aa.jar also includes the test
# files and the BuildVersion file.
$(CLZDIR)/main/$(AA)/BuildVersion.java: $(main_classes) src/main/manifest.txt lib
# Turn OFF build-all-the-time, to lower edit/debug/build cycle times.
#$(CLZDIR)/main/$(AA)/BuildVersion.java: $(main_classes) src/main/manifest.txt lib
$(CLZDIR)/main/$(AA)/BuildVersion.java: src/main/manifest.txt lib
@echo "vrsioning " $@ " because " $?
@rm -f $@
@mkdir -p $(dir $@)
Expand Down Expand Up @@ -130,7 +131,7 @@ sandbox/tests.txt: $(test_classes)
@(cd ${TST}; /usr/bin/find . -name '*.java' | cut -c3- | sed "s/.....$$//" | sed -e 's/\//./g') | grep -v TestUtil | /usr/bin/sort > sandbox/tests.txt

# Base launch line for JVM tests
JVM=nice java -Xms1g -Xms1g -ea -cp "build/aa.jar${SEP}${jars}${SEP}$(CLZDIR)/test"
JVM=java -ea -cp "build/aa.jar${SEP}${jars}${SEP}$(CLZDIR)/test"

# Build the AA-test jar and run the junit tests.
# Actually makes jvm_cmd.txt and status.0 along with out.0
Expand All @@ -153,6 +154,12 @@ hm_tests: $(test_classes) build/aa.jar
$(JVM) org.junit.runner.JUnitCore com.cliffc.aa.HM.TestHM


# Run standard tests
test: build/aa.jar
@echo " testing"
@$(JVM) org.junit.runner.JUnitCore com.cliffc.aa.type.TestType com.cliffc.aa.TestTVar com.cliffc.aa.exe.TestEXE


# EXE, a standalone lambda calc interpreter
exec_javas := $(wildcard $(SRC)/$(AA)/exe/*java)
etst_javas := $(wildcard $(TST)/$(AA)/exe/*java)
Expand All @@ -166,8 +173,8 @@ etst_classes := $(patsubst $(TST)/%java,$(CLZDIR)/test/%class,$(etst_javas))
test_aas := $(wildcard $(TST)/$(AA)/exe/*aa)

exe: $(main_classes) $(exec_classes) $(etst_classes) build/aa.jar
echo testing EXE
$(JVM) org.junit.runner.JUnitCore com.cliffc.aa.exe.TestEXE
@echo testing EXE
@$(JVM) org.junit.runner.JUnitCore com.cliffc.aa.exe.TestEXE



Expand Down Expand Up @@ -201,6 +208,9 @@ lib/annotations-16.0.2.jar:
@(cd lib; wget https://repo1.maven.org/maven2/org/jetbrains/annotations/16.0.2/annotations-16.0.2.jar)

# Build emacs tags (part of a tasty emacs ide experience)
tags: $(main_javas) $(test_javas) $(exec_javas)
tags: TAGS
TAGS: $(main_javas) $(test_javas) $(exec_javas)
echo building tags and tags_age
@rm -f TAGS
@$(CTAGS) -e --recurse=yes --extra=+q --fields=+fksaiS $(SRC) $(TST)
@touch "--date=next hour" TAGS_AGE
Loading

0 comments on commit e50e4a5

Please sign in to comment.