eduardohi / axolotl Goto Github PK
View Code? Open in Web Editor NEWLicense: BSD 3-Clause "New" or "Revised" License
License: BSD 3-Clause "New" or "Revised" License
@kawer let's update diagrams and grammar rules
-- Infix exp are for now limited to 2 expressions
-- therefore we can not write something like this:
-- (define (append Nil ys) :: {List a -> List a -> List a} ys)
-- (define (append {x : xs} ys)
-- {x : (append ys xs)})
(define (append Nil ys) :: {(List a) -> {(List a) -> (List a)}}
ys)
define (append {x : xs} ys)
{x : (append ys xs)}
(infixr ++)
(define ++ append)
example of a failing program
QuickCheck currently fails with the following failures:
let's debug them.
The bugs can in one of these places:
src/Axo/Parser.hs
src/Axo/PrettyPrinter.hs
test/Gen.hs
steps to debug:
parseTest <the parser being tested> <the string to test>
ParseTree
being generated, looking for a possible error in it (a possible error is an invalid ParseTree`) in that case, we should change the Gen to only generate valid programs.parsing Expressions
parsing expression is the inverse of pretty printing it FAILED [1]
parsing a sequence of expressions is the inverse of pretty printing it FAILED [2]
parsing s-expression is the inverse of pretty printing it FAILED [3]
Failures:
test/CheckSpec.hs:51:5:
1) parsing Expressions parsing expression is the inverse of pretty printing it
Falsifiable (after 3 tests):
ESexp (Sexp (ExpSeq [Left (EAtom (Id (TypeId "W8654"))),Left (ESexp (Sexp (ExpSeq [Left (EAtom (Id (TypeId "O59T66o4A"))),Left (EAtom (Id (VarId "npFdZ"))),Left (EAtom (Literal (StringLit "8"))),Left (EAtom (Literal (CharLit '='))),Left (EAtom (Id (TypeId "S")))]))),Left (EAtom (Id (VarId "hUI6Mf545"))),Right (Comment "9"),Left (EAtom (Literal (CharLit 'F')))]))
Left (ParseErrorBundle {bundleErrors = TrivialError 50 (Just (Tokens ('\'' :| ""))) (fromList [Tokens (')' :| "")]) :| [], bundlePosState = PosState {pstateInput = "(W8654 (O59T66o4A npFdZ \"8\" '=' S) hUI6Mf545 --9\n 'F')", pstateOffset = 0, pstateSourcePos = SourcePos {sourceName = "", sourceLine = Pos 1, sourceColumn = Pos 1}, pstateTabWidth = Pos 8, pstateLinePrefix = ""}}) /= Right (ESexp (Sexp (ExpSeq [Left (EAtom (Id (TypeId "W8654"))),Left (ESexp (Sexp (ExpSeq [Left (EAtom (Id (TypeId "O59T66o4A"))),Left (EAtom (Id (VarId "npFdZ"))),Left (EAtom (Literal (StringLit "8"))),Left (EAtom (Literal (CharLit '='))),Left (EAtom (Id (TypeId "S")))]))),Left (EAtom (Id (VarId "hUI6Mf545"))),Right (Comment "9"),Left (EAtom (Literal (CharLit 'F')))])))
To rerun use: --match "/parsing Expressions/parsing expression is the inverse of pretty printing it/"
test/CheckSpec.hs:51:5:
2) parsing Expressions parsing a sequence of expressions is the inverse of pretty printing it
Falsifiable (after 2 tests):
ExpSeq [Left (EAtom (Id (VarId "_"))),Left (ESexp (Sexp (ExpSeq [Left (EAtom (Id (VarId "zb872H"))),Left (EAtom (Literal (CharLit '6'))),Right (Comment "%"),Left (EAtom (Literal (FloatLit "0.6115096")))]))),Right (Comment "O"),Left (ESexp (Sexp (ExpSeq [Left (EAtom (Id (TypeId "L802"))),Left (EAtom (Literal (StringLit ""))),Left (EAtom (Literal (StringLit ""))),Right (Comment "="),Left (EAtom (Literal (IntLit "1")))]))),Left (EAtom (Id (VarId "~&~="))),Right (Comment "0")]
Left (ParseErrorBundle {bundleErrors = TrivialError 19 (Just (Tokens ('0' :| ""))) (fromList [Tokens (')' :| "")]) :| [], bundlePosState = PosState {pstateInput = "_ (zb872H '6' --%\n 0.6115096) --O\n (L802 \"\" \"\" --=\n 1) ~&~= --0\n", pstateOffset = 0, pstateSourcePos = SourcePos {sourceName = "", sourceLine = Pos 1, sourceColumn = Pos 1}, pstateTabWidth = Pos 8, pstateLinePrefix = ""}}) /= Right (ExpSeq [Left (EAtom (Id (VarId "_"))),Left (ESexp (Sexp (ExpSeq [Left (EAtom (Id (VarId "zb872H"))),Left (EAtom (Literal (CharLit '6'))),Right (Comment "%"),Left (EAtom (Literal (FloatLit "0.6115096")))]))),Right (Comment "O"),Left (ESexp (Sexp (ExpSeq [Left (EAtom (Id (TypeId "L802"))),Left (EAtom (Literal (StringLit ""))),Left (EAtom (Literal (StringLit ""))),Right (Comment "="),Left (EAtom (Literal (IntLit "1")))]))),Left (EAtom (Id (VarId "~&~="))),Right (Comment "0")])
To rerun use: --match "/parsing Expressions/parsing a sequence of expressions is the inverse of pretty printing it/"
test/CheckSpec.hs:51:5:
3) parsing Expressions parsing s-expression is the inverse of pretty printing it
Falsifiable (after 2 tests):
Sexp (ExpSeq [Left (EAtom (Id (VarId "_"))),Left (ESexp (Sexp (ExpSeq [Left (EAtom (Id (VarId "zb872H"))),Left (EAtom (Literal (CharLit '6'))),Right (Comment "%"),Left (EAtom (Literal (FloatLit "0.6115096")))]))),Right (Comment "O"),Left (ESexp (Sexp (ExpSeq [Left (EAtom (Id (TypeId "L802"))),Left (EAtom (Literal (StringLit ""))),Left (EAtom (Literal (StringLit ""))),Right (Comment "="),Left (EAtom (Literal (IntLit "1")))]))),Left (EAtom (Id (VarId "~&~="))),Right (Comment "0")])
Left (ParseErrorBundle {bundleErrors = TrivialError 20 (Just (Tokens ('0' :| ""))) (fromList [Tokens (')' :| "")]) :| [], bundlePosState = PosState {pstateInput = "(_ (zb872H '6' --%\n 0.6115096) --O\n (L802 \"\" \"\" --=\n 1) ~&~= --0\n)", pstateOffset = 0, pstateSourcePos = SourcePos {sourceName = "", sourceLine = Pos 1, sourceColumn = Pos 1}, pstateTabWidth = Pos 8, pstateLinePrefix = ""}}) /= Right (Sexp (ExpSeq [Left (EAtom (Id (VarId "_"))),Left (ESexp (Sexp (ExpSeq [Left (EAtom (Id (VarId "zb872H"))),Left (EAtom (Literal (CharLit '6'))),Right (Comment "%"),Left (EAtom (Literal (FloatLit "0.6115096")))]))),Right (Comment "O"),Left (ESexp (Sexp (ExpSeq [Left (EAtom (Id (TypeId "L802"))),Left (EAtom (Literal (StringLit ""))),Left (EAtom (Literal (StringLit ""))),Right (Comment "="),Left (EAtom (Literal (IntLit "1")))]))),Left (EAtom (Id (VarId "~&~="))),Right (Comment "0")]))
To rerun use: --match "/parsing Expressions/parsing s-expression is the inverse of pretty printing it/"
Randomized with seed 156114697
Finished in 0.0362 sec
axolotl-0.1.0.0: Test suite axolotl-test failed
Completed 2 action(s).
Test suite failure for package axolotl-0.1.0.0
axolotl-test: exited with: ExitFailure 1
Logs printed to console
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.