Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
8262caa
translate relational sig to unary sig
oquechy Dec 5, 2022
dd2eed7
remove unused argument
oquechy Dec 5, 2022
aa9949d
add generated unary spec
oquechy Dec 5, 2022
c1dec4e
print plan Haskell signature
oquechy Dec 9, 2022
89b4623
generate synchronous proof
oquechy Dec 10, 2022
2590925
include generated proofs in the examples
oquechy Dec 12, 2022
9152d6d
default the translation result to lambda unit
oquechy Dec 13, 2022
3970010
use bifunctor
oquechy Dec 13, 2022
da1f9b8
mv IncrHO.hs to todo
oquechy Dec 13, 2022
0fd480e
Write relational to unary hints into a file.
Alf0nso Dec 15, 2022
d362488
higher-order syntax for relational predicates
oquechy Dec 15, 2022
92d8ac1
Merge branch 'relational' of github.com:oquechy/liquidhaskell into re…
oquechy Dec 15, 2022
bf55ca4
fix hlint
oquechy Dec 15, 2022
7470337
restore containsVars visitor
oquechy Dec 19, 2022
5f8ce53
remove Axiom from tests
oquechy Jan 3, 2023
5130bc9
typecheck map
oquechy Jan 9, 2023
6cf9ed6
Divide lambdas in two separate functions.
Alf0nso Jan 9, 2023
1745471
Merge remote-tracking branch 'origin/relational' into HEAD
Alf0nso Jan 9, 2023
dc5aa23
Import original file on the output of relational hints.
Alf0nso Jan 9, 2023
e4b49cd
Solve the lambda expression problem, (increment typechecks)
Alf0nso Jan 10, 2023
5f20001
Handle variables "the proper way".
Alf0nso Jan 10, 2023
cf7b68b
Signature for compiled relational hint in one line.
Alf0nso Jan 12, 2023
d28a1f7
Map is working.
Alf0nso Jan 12, 2023
17157c3
Less brackets.
Alf0nso Jan 13, 2023
2a14bcb
No generation with no relational signatures.
Alf0nso Jan 13, 2023
3f4eee2
Correct hlint error.
Alf0nso Jan 13, 2023
a611110
Merge pull request #3 from oquechy/translation
Alf0nso Jan 13, 2023
0576b8e
Insert modules in compilation. Remove Type and EmbeddedDictVar.
Alf0nso Jan 17, 2023
e625920
remove dictionaries and tyoe variables
oquechy Jan 17, 2023
a8ba170
Merge branch 'relational' of github.com:oquechy/liquidhaskell into re…
oquechy Jan 17, 2023
f28025a
Delete unused functions.
Alf0nso Jan 17, 2023
e5fd90b
Merge remote-tracking branch 'origin/relational' into HEAD
Alf0nso Jan 17, 2023
ce2cb54
Clean code and remove unnecessary code.
Alf0nso Jan 17, 2023
8073f54
Remove brackets.
Alf0nso Jan 17, 2023
6a6851e
wf error messages
oquechy Jan 17, 2023
bf00622
ty compatibility check
oquechy Jan 17, 2023
5f233f2
newline in rel error
oquechy Jan 17, 2023
71b7e0e
Carry imports from input file
Alf0nso Jan 18, 2023
2e32a0c
Merge pull request #4 from oquechy/translation
oquechy Jan 18, 2023
1583c1c
Merge branch 'relational' of github.com:oquechy/liquidhaskell into re…
oquechy Jan 18, 2023
b932fc1
Add import for GHC.Exts ( Int (I#) )
Alf0nso Jan 31, 2023
a428038
Do not output any thing that comes from "GHC.Types".
Alf0nso Jan 31, 2023
c2334fc
Small comment on import problem
Alf0nso Jan 31, 2023
87148fb
Apply hlint suggestions, remove unused variable.
Alf0nso Jan 31, 2023
87c92a5
Add GHC.Types back.
Alf0nso Feb 1, 2023
77235f8
Comment unused getModule function, correct small bug.
Alf0nso Feb 1, 2023
c093e87
Try patterns match against I# to remove them.
Alf0nso Feb 1, 2023
f5a0929
Remove excessive indentation.
Alf0nso Feb 1, 2023
31687a4
Change the place where we remove undesirable variables.
Alf0nso Feb 1, 2023
876052e
Clean unused function.
Alf0nso Feb 1, 2023
0646272
New line on case are correct now.
Alf0nso Feb 1, 2023
b42ca2a
Properly handle new lines from cases.
Alf0nso Feb 1, 2023
5cd5d18
Merge pull request #6 from oquechy/translation
oquechy Feb 1, 2023
aaafe25
Correct the infinite loop.
Alf0nso Feb 2, 2023
7d5d7e7
Change fromANF to deal with let expressions.
Alf0nso Feb 3, 2023
ca94f28
Remove the print of raw translation ast.
Alf0nso Feb 3, 2023
b475df4
Remove the added "let" handling from relTermToUnTerm.
Alf0nso Feb 3, 2023
910ef1c
Comment let on relational, solve indentation.
Alf0nso Feb 4, 2023
9e21f3a
Change hlint complains.
Alf0nso Feb 4, 2023
772d2b1
Merge pull request #7 from oquechy/translation
Alf0nso Feb 4, 2023
b625cde
Clean (Case {})
Alf0nso Feb 7, 2023
52a4198
Merge branch 'relational' of github.com:oquechy/liquidhaskell into re…
oquechy Feb 9, 2023
1138146
Remove unused function.
Alf0nso Feb 9, 2023
a25107c
Add spaces and indentation to relTermToUnTerm code.
Alf0nso Feb 9, 2023
1cb6ea9
Add function to create variable
Alf0nso Feb 9, 2023
b2dc8e5
Comment changes.
Alf0nso Feb 9, 2023
1c19920
use unary synth from LH
oquechy Feb 13, 2023
1b48bd0
Carry expressions to insert where proof generation stops.
Alf0nso Feb 13, 2023
4a47449
Simplify imports for translation output.
Alf0nso Feb 13, 2023
d432da1
Output module for external variables.
Alf0nso Feb 13, 2023
fd79b39
Hlint complains.
Alf0nso Feb 13, 2023
9532e13
rm failing tests from cabal
oquechy Feb 13, 2023
b080d72
Don't output module if base package.
Alf0nso Feb 13, 2023
9430b31
Remove (I#) from the const App.
Alf0nso Feb 13, 2023
4c11e24
fix module name
oquechy Feb 13, 2023
2b92e9d
support higher-order translation
oquechy Feb 13, 2023
b130d9b
Add extra information to the generated unit.
Alf0nso Feb 14, 2023
c9e4774
Change hlint hint.
Alf0nso Feb 14, 2023
02f1ddd
Remove unused function arguments.
Alf0nso Feb 14, 2023
ab73de9
Clean both branches after stopping proof generation.
Alf0nso Feb 17, 2023
72e3fa1
Addition of possibly necessary libraries.
Alf0nso Feb 17, 2023
d48d6d7
Change indentation.
Alf0nso Feb 17, 2023
29589fe
Better indentation.
Alf0nso Feb 20, 2023
83e88ea
Remove "$##" from variables created by "fromAnf"
Alf0nso Feb 22, 2023
5b323c8
Change clean function to remove addresses and return tuple.
Alf0nso Feb 24, 2023
6338f6d
stop printing Literal Strings.
Alf0nso Feb 24, 2023
8003032
Removing all literal strings on fromAnf.
Alf0nso Feb 24, 2023
2882830
If goal is unit don't print new line.
Alf0nso Feb 24, 2023
7f9207f
Apply hlint suggestions
Alf0nso Feb 24, 2023
ee55d7b
pass lemmas for first-order args too
oquechy Feb 27, 2023
6fdd3b5
Merge pull request #9 from oquechy/ho-translation
oquechy Feb 28, 2023
3588464
print bare core translation
oquechy Feb 28, 2023
eaf4a42
merge with relational
oquechy Feb 28, 2023
306e73e
Merge pull request #10 from oquechy/ho-translation
oquechy Feb 28, 2023
aee428e
merge with translation
oquechy Feb 28, 2023
e145435
merge
oquechy Feb 28, 2023
7301bc5
add wf tests
oquechy Feb 28, 2023
b9d39df
Merge branch 'relational' into translation
oquechy Feb 28, 2023
80e496c
fix spaces
oquechy Feb 28, 2023
0807125
add argument name mappings
oquechy Feb 28, 2023
b6d4b01
Remove bitString on cleanUnTerms.
Alf0nso Feb 28, 2023
41c6c61
ignore unique in name printing
oquechy Feb 28, 2023
210242f
Merge branch 'translation' into relational
Alf0nso Mar 1, 2023
a6230ae
Revert "Merge branch 'translation' into relational"
Alf0nso Mar 1, 2023
bde96bb
add testing script for translations
oquechy Mar 20, 2023
5ede9e0
Merge branch 'relational' of github.com:oquechy/liquidhaskell into re…
oquechy Mar 20, 2023
5c2710e
restore printing lq_anf
oquechy Mar 20, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,5 @@ tests/**/*.o-boot

.idea
*.iml

.DS_Store
2 changes: 1 addition & 1 deletion liquid-fixpoint
Submodule liquid-fixpoint updated 40 files
+10 −4 .github/workflows/cabal.yml
+1 −1 .github/workflows/hlint.yml
+3 −3 .github/workflows/stack.yml
+49 −0 .github/workflows/stan.yml
+3 −0 .gitignore
+125 −0 .stan.toml
+7 −12 README.md
+43 −0 flake.lock
+109 −0 flake.nix
+6 −2 liquid-fixpoint.cabal
+0 −2 nixpkgs.nix
+0 −16 shell-stack.nix
+0 −25 shell.nix
+4 −1 src/Language/Fixpoint/Defunctionalize.hs
+4 −6 src/Language/Fixpoint/Graph/Partition.hs
+3 −3 src/Language/Fixpoint/Horn/Transformations.hs
+2 −26 src/Language/Fixpoint/Misc.hs
+1 −1 src/Language/Fixpoint/Parse.hs
+2 −1 src/Language/Fixpoint/Smt/Bitvector.hs
+19 −25 src/Language/Fixpoint/Smt/Interface.hs
+102 −3 src/Language/Fixpoint/Smt/Theories.hs
+4 −3 src/Language/Fixpoint/Smt/Types.hs
+5 −4 src/Language/Fixpoint/Solver/Extensionality.hs
+3 −5 src/Language/Fixpoint/Solver/Instantiate.hs
+18 −31 src/Language/Fixpoint/Solver/PLE.hs
+1 −0 src/Language/Fixpoint/Solver/Sanitize.hs
+1 −0 src/Language/Fixpoint/Types/Constraints.hs
+1 −1 src/Language/Fixpoint/Types/Errors.hs
+5 −3 src/Language/Fixpoint/Types/Refinements.hs
+1 −1 src/Language/Fixpoint/Types/Solutions.hs
+2 −2 src/Language/Fixpoint/Types/Sorts.hs
+4 −19 src/Language/Fixpoint/Types/Visitor.hs
+1 −0 src/Language/Fixpoint/Utils/Builder.hs
+1 −2 stack.yaml
+9 −0 tests/neg/maps02.fq
+16 −0 tests/pos/maps02.fq
+10 −0 tests/pos/maps03.fq
+39 −0 tests/pos/maps04.fq
+9 −0 tests/pos/maps05.fq
+1 −1 tests/test.hs
14 changes: 14 additions & 0 deletions src-ghc/Liquid/GHC/Misc.hs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,20 @@ stringVar s t = mkLocalVar VanillaId name Many t vanillaIdInfo
name = mkInternalName (mkUnique 'x' 25) occ noSrcSpan
occ = mkVarOcc s

mkLocVar :: Int -> String -> Type -> Var
mkLocVar i s t = mkLocalVar VanillaId name Many t vanillaIdInfo
where
name = mkInternalName unique occ noSrcSpan
unique = mkLocalUnique i
occ = mkVarOcc s

{-
Taken from GHC.Types.Unique
url: https://hackage.haskell.org/package/ghc-9.4.4/docs/src/GHC.Types.Unique.html#Unique
-}
mkLocalUnique :: Int -> Unique
mkLocalUnique i = mkUnique 'X' i

-- FIXME: plugging in dummy type like this is really dangerous
maybeAuxVar :: Symbol -> Maybe Var
maybeAuxVar s
Expand Down
3 changes: 2 additions & 1 deletion src/Language/Haskell/Liquid/Constraint/Generate.hs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ consAct γ cfg info = do
when (gradual cfg) (mapM_ (addW . WfC γ . val . snd) (gsTySigs sSpc ++ gsAsmSigs sSpc))
γ' <- foldM (consCBTop cfg info) γ (giCbs gSrc)
(ψ, γ'') <- foldM (consAssmRel cfg info) ([], γ') (gsAsmRel sSpc ++ gsRelation sSpc)
mapM_ (consRelTop cfg info γ'' ψ) (gsRelation sSpc)
relErrs <- gets relWf
mapM_ (consRelTop cfg info cconsE consE γ'' ψ) (if null relErrs then gsRelation sSpc else [])
mapM_ (consClass γ) (gsMethods $ gsSig $ giSpec info)
hcs <- gets hsCs
hws <- gets hsWfs
Expand Down
4 changes: 4 additions & 0 deletions src/Language/Haskell/Liquid/Constraint/Init.hs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ import Language.Haskell.Liquid.Constraint.Types

import Language.Haskell.Liquid.Types hiding (binds, Loc, loc, freeTyVars, Def)

import qualified Text.PrettyPrint.HughesPJ as Doc

--------------------------------------------------------------------------------
initEnv :: TargetInfo -> CG CGEnv
--------------------------------------------------------------------------------
Expand Down Expand Up @@ -260,6 +262,8 @@ initCGI cfg info = CGInfo {
, ebinds = []
, annotMap = AI M.empty
, holesMap = M.empty
, relHints = Doc.empty
, relWf = []
, newTyEnv = M.fromList (mapSnd val <$> gsNewTypes (gsSig spc))
, tyConInfo = tyi
, tyConEmbed = tce
Expand Down
Loading