From 9e80fcbe2e5ffb38505da14ed9a4ef8c3b562d2b Mon Sep 17 00:00:00 2001 From: Franco Leonardo Bulgarelli Date: Wed, 30 Nov 2016 17:50:35 -0300 Subject: [PATCH] Mentioning expectation types --- README.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b2c58f63e..90f8a745e 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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/).