This module contains some operations to define and manipulate the names of contracts (i.e., specification and pre/postconditions) in a Curry program.
Author: Michael Hanus
Version: April 2019
isSpecName
:: String -> Bool
Is this the name of a specification? |
toSpecName
:: String -> String
Transform a name into a name of the corresponding specification by adding the suffix "'spec". |
toSpecQName
:: (String,String) -> (String,String)
Transform a qualified name into a name of the corresponding specification by adding the suffix "'spec". |
fromSpecName
:: String -> String
Drop the specification suffix "'spec" from the name: |
isPreCondName
:: String -> Bool
Is this the name of a precondition? |
toPreCondName
:: String -> String
Transform a name into a name of the corresponding precondition by adding the suffix "'pre". |
toPreCondQName
:: (String,String) -> (String,String)
Transform a qualified name into a name of the corresponding precondition by adding the suffix "'pre". |
fromPreCondName
:: String -> String
Drop the precondition suffix "'pre" from the name: |
isPostCondName
:: String -> Bool
Is this the name of a precondition? |
toPostCondName
:: String -> String
Transform a name into a name of the corresponding prostcondition by adding the suffix "'post". |
toPostCondQName
:: (String,String) -> (String,String)
Transform a qualified name into a name of the corresponding postcondition by adding the suffix "'post". |
fromPostCondName
:: String -> String
Drop the postcondition suffix "'post" from the name: |
isNonFailName
:: String -> Bool
Is this the name of a precondition? |
toNonFailName
:: String -> String
Transform a name into a name of the corresponding prostcondition by adding the suffix "'post". |
toNonFailQName
:: (String,String) -> (String,String)
Transform a qualified name into a name of the corresponding postcondition by adding the suffix "'post". |
fromNonFailName
:: String -> String
Drop the postcondition suffix "'nonfail" from the name: |
decodeContractQName
:: (String,String) -> (String,String)
Transforms a qualified operation name starting with op_xh1...hn' , where
each hi
is a two digit hexadecimal number, into the name
of corresponding to the ord values of h1...hn .
|
decodeContractName
:: String -> String
Transforms an operation name starting with op_xh1...hn' , where
each hi
is a two digit hexadecimal number, into the name
of corresponding to the ord values of h1...hn .
|
encodeContractQName
:: (String,String) -> (String,String)
Transforms a qualified operation name of the form fn'tail
into a valid
identifier.
|
encodeContractName
:: String -> String
Transforms an operation name of the form fn'tail
into a valid
identifier.
|
Is this the name of a specification? |
Transform a name into a name of the corresponding specification by adding the suffix "'spec". |
Transform a qualified name into a name of the corresponding specification by adding the suffix "'spec". |
Drop the specification suffix "'spec" from the name: |
Is this the name of a precondition? |
Transform a name into a name of the corresponding precondition by adding the suffix "'pre". |
Transform a qualified name into a name of the corresponding precondition by adding the suffix "'pre". |
Drop the precondition suffix "'pre" from the name: |
Is this the name of a precondition? |
Transform a name into a name of the corresponding prostcondition by adding the suffix "'post". |
Transform a qualified name into a name of the corresponding postcondition by adding the suffix "'post". |
Drop the postcondition suffix "'post" from the name: |
Is this the name of a precondition? |
Transform a name into a name of the corresponding prostcondition by adding the suffix "'post". |
Transform a qualified name into a name of the corresponding postcondition by adding the suffix "'post". |
Drop the postcondition suffix "'nonfail" from the name: |
Transforms a qualified operation name starting with |
Transforms an operation name starting with |
Transforms a qualified operation name of the form |
Transforms an operation name of the form |