Skip to content

Commit

Permalink
Mentioning expectation types
Browse files Browse the repository at this point in the history
  • Loading branch information
flbulgarelli authored Nov 30, 2016
1 parent f41f3f0 commit 9e80fcb
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ So in order to use it with a particular language, you have to:
* either add explicit support in this repo, or
* translate your language into one of the natively supported ones, or
* translate your language to the Mulang JSON AST

## Installing it

Mulang is just a Haskell library. You can install it though cabal.
Expand All @@ -212,6 +212,21 @@ $ mulang '{"expectations":[{"tag":"Basic","binding":"x","inspection":"HasBinding
{"results":[{"result":true,"expectation":{"tag":"Basic","inspection":"HasBinding","binding":"x"}}],"smells":[]}
```


## Expectations and Smells

Mulang CLI can do two different kinds of analysis:

* **Expectation analysis**: you can provide an expression - called `inspection` - that will be tested against the provied program. Expectations answer questions like: _does the function X call the function Y?_ or _does the program use if's?_. It comes in two flavors:
* **basic expectations**: are composed by a binding and an inspection
* **advanced expectations**: are composed by
* subject
* verb
* object
* flags
* **Smell analysis**: instead of asking explcit questions to the program, the smells analysis implicitly runs specific inspections - that denote bad code - in orden to know if any of them is matched.


## Building mulang from source

To generate `mulang` executable, you have to build the project using [cabal](https://www.haskell.org/cabal/).
Expand Down

0 comments on commit 9e80fcb

Please sign in to comment.