Giter Club home page Giter Club logo

tapl's Introduction

tapl

TaPLのお勉強

第三章

$ sbt

sbt:tapl-test> console
scala> import term._
scala> val term: Term = If(IsZero(Pred(Succ(Zero))), True, False)
term: term.Term = If(IsZero(Pred(Succ(Zero))),True,False)
scala> term.evalStackTrace.foreach(println)
If(IsZero(Pred(Succ(Zero))),True,False)
If(IsZero(Zero),True,False)
If(True,True,False)
True
sbt:tapl-test> test
[info] PredSpec:
[info] pred 0
[info] - should be 0
[info] pred t1
[info] - should be pred t1' when t1 -> t1'
[info] TermSpec:
[info] The evaluation static trace
[info] - should be correct(1)
[info] The evaluation static trace
[info] - should be correct(2)
[info] FalseSpec:
[info] The False object
[info] - should be normal form
[info] The False object
[info] - should not be evaluated
[info] IsZeroSpec:
[info] The IsZero class
[info] - should not be normal form
[info] iszero 0
[info] - should be true
[info] iszero (succ nv)
[info] - should be false
[info] TrueSpec:
[info] The True object
[info] - should be normal form
[info] The True object
[info] - should not be evaluated
[info] IfSpec:
[info] if true then t2 else t3
[info] - should be t2
[info] if t1 then t2 else t3
[info] - should be if t1' then t2 else t3 when t1 -> t1'
[info] SuccSpec:
[info] succ t1
[info] - should be succ t1'a when t1 -> t1'
[info] succ zero
[info] - should be normal form
[info] succ (iszero (zero))
[info] - should be not normal form
[info] Run completed in 435 milliseconds.
[info] Total number of tests run: 16
[info] Suites: completed 7, aborted 0
[info] Tests: succeeded 16, failed 0, canceled 0, ignored 0, pending 0
[info] All tests passed.
[success] Total time: 1 s, completed Jul 9, 2019 7:58:25 AM

🤗

tapl's People

Contributors

kazuyamiyashita avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.