Advise-me-0.1: Assessment services for the Advise-Me project

Maintainerbastiaan.heeren@ou.nl
Stabilityprovisional
Portabilityportable (depends on ghc)
Safe HaskellNone
LanguageHaskell98

Recognize.Model.Assess

Contents

Description

This module defines some common functions used in the exercise specific assessment functions.

Synopsis

Generate evidence

generateEvidence Source #

Arguments

:: (Approach -> EvBuilder ())

Function for building the evidence

-> Approach

Category of solution

-> [[Attribute]]

Collected attributes to use as input

-> Evidence 

Generic function for gathering evidence

Failure constraints

failOnInvalidEquationAny :: Constraint EvBuilder [Attribute] Source #

Generates a failure if some InvalidEquation attribute is present

failOnInvalidEquation :: Expr -> Expr -> Constraint EvBuilder [Attribute] Source #

Generates a failure if an InvalidEquation attribute with the two specified expression is present

failOnIncorrectDistribution :: Constraint EvBuilder [Attribute] Source #

Generates a failure if the IncorrectDistribution attribute or the NonMatchingParenthese attribute is present

failOnCommonMistake :: Constraint EvBuilder [Attribute] Source #

Generates a failure if the CommonMistake attribute is present

failOnUnequalRelationAny :: Constraint EvBuilder [Attribute] Source #

Generates a failure if the UnequalRelations attribute is present

failOnUnequalRelation :: Relation Expr -> Relation Expr -> Constraint EvBuilder [Attribute] Source #

Generates a failure if the UnequalRelations attribute with the two specified relations is present

failOnAtomMixedUpAny :: Constraint EvBuilder [Attribute] Source #

Generates a failure if the AtomMixedUp attribute is present

failOnAnyMistake :: Constraint EvBuilder [Attribute] Source #

Combines all the above mentioned failure functions

withoutFailure :: Constraint EvBuilder [Attribute] -> Constraint EvBuilder [Attribute] Source #

Combines the given constraint with the constraint that there should be no failures

Evidence collecting

giveNodeAndCollect :: Verifiable b => Node b -> Constraint EvBuilder [Attribute] -> EvBuilder () Source #

Takes the given constraint, couples it to the node and stores the evidence.

giveNodeAndCollectAll :: Verifiable b => Node b -> [Constraint EvBuilder [Attribute]] -> EvBuilder () Source #

Useful when multiple constraints spread over multiple steps have to be verified. Takes the given constraints and couples them to the node. The evidence is true if ALL given results are successful. (= no unknwon results) The evidence is false if ANY known result is false. The evidence is unknown if all known results are succesful, but there are unknown results.

giveNodeAndCollectAllKnown :: Verifiable b => Node b -> [Constraint EvBuilder [Attribute]] -> EvBuilder () Source #

Useful when multiple constraints spread over multiple steps have to be verified. Takes the given constraints and couples them to the node. The evidence is true if ALL known results are successful. The evidence is false if ANY known result is false. The evidence is unknown if there are no known results.

giveNodeAndCollectDefault :: Verifiable b => Node b -> Constraint EvBuilder [Attribute] -> Expr -> Expr -> EvBuilder () Source #

Takes the given constraint, couples it to the node and stores the evidence. If the evidence is unknown then we assign a value to the given assessment variable