ProofUtils.hs revision 9029484754c7b2037321e7cbd077580866845265
3a4186ae40d0c3b7be46a4c973166f6048fcfe38Lukas SlebodnikModule : $Header$
3a4186ae40d0c3b7be46a4c973166f6048fcfe38Lukas SlebodnikDescription: functions useful for all prover connections in Hets
3a4186ae40d0c3b7be46a4c973166f6048fcfe38Lukas SlebodnikCopyright : (c) Klaus Luettich, C. Maeder, Uni Bremen 2005
3a4186ae40d0c3b7be46a4c973166f6048fcfe38Lukas SlebodnikLicense : similar to LGPL, see HetCATS/LICENSE.txt or LIZENZ.txt
3a4186ae40d0c3b7be46a4c973166f6048fcfe38Lukas SlebodnikMaintainer : luecke@informatik.uni-bremen.de
3a4186ae40d0c3b7be46a4c973166f6048fcfe38Lukas SlebodnikStability : provisional
3a4186ae40d0c3b7be46a4c973166f6048fcfe38Lukas SlebodnikPortability : portable
3a4186ae40d0c3b7be46a4c973166f6048fcfe38Lukas SlebodnikFunctions useful for all prover connections in Hets
3a4186ae40d0c3b7be46a4c973166f6048fcfe38Lukas SlebodnikSome were moved from Isabelle.Translate and some others from
3a4186ae40d0c3b7be46a4c973166f6048fcfe38Lukas Slebodnikimport qualified Data.Map as Map
3a4186ae40d0c3b7be46a4c973166f6048fcfe38Lukas Slebodnikimport qualified Data.Set as Set
3a4186ae40d0c3b7be46a4c973166f6048fcfe38Lukas Slebodnik * generic names are added
3a4186ae40d0c3b7be46a4c973166f6048fcfe38Lukas Slebodnik * disambiguation of duplicate assigned names
3a4186ae40d0c3b7be46a4c973166f6048fcfe38Lukas Slebodnikis done by toThSens
3a4186ae40d0c3b7be46a4c973166f6048fcfe38Lukas Slebodnik * translation of special characters with the aid of the provided function
3a4186ae40d0c3b7be46a4c973166f6048fcfe38Lukas Slebodnikis done by prepareSenNames
disambiguateSens :: Set.Set String -> [Named a] -> [Named a]
-> Set.Set String -> [a] -> [a]
let name = sel ax in case Set.splitMember name nameSet of
ax : genericDisambigSens c sel upd (Set.insert name nameSet) rest
n = until (not . flip Set.member greater . (name ++) . ('_' :) . show)
genericDisambigSens n sel upd (Set.insert name' nameSet) rest
nameAndDisambiguate = disambiguateSens Set.empty . nameSens
collectNameMapping :: [Named a] -> [Named a] -> Map.Map String String
then error "Common.ProofUtils.collectNameMapping"
else Map.fromList $ zipWith (\ n o -> (senAttr n, senAttr o)) ns os
charMap :: Map.Map Char String
charMap = Map.fromList