module Modelling.CdOd.NameCdError.Instance where
import qualified Data.Map as M (fromList)
import Modelling.Auxiliary.Shuffle.All (ShuffleInstance (..))
import Modelling.CdOd.NameCdError (
NameCdErrorInstance (..),
NameCdErrorTaskTextElement (..),
Reason (..),
Relevance (..),
)
import Modelling.CdOd.Types (
Annotation (..),
AnnotatedClassDiagram (..),
CdDrawSettings (..),
LimitedLinking (..),
OmittedDefaultMultiplicities (..),
Relationship (..),
)
import Control.OutputCapable.Blocks (
ArticleToUse (DefiniteArticle),
Language (English, German),
)
import Control.OutputCapable.Blocks.Generic.Type (
GenericOutput (Code, Paragraph, Special, Translated),
)
import Data.Map (Map)
listToFM :: Ord a => [(a, b)] -> Map a b
listToFM :: forall a b. Ord a => [(a, b)] -> Map a b
listToFM = [(a, b)] -> Map a b
forall a b. Ord a => [(a, b)] -> Map a b
M.fromList
task2024_14 :: ShuffleInstance NameCdErrorInstance
task2024_14 :: ShuffleInstance NameCdErrorInstance
task2024_14 = ShuffleInstance {
taskInstance :: NameCdErrorInstance
taskInstance = NameCdErrorInstance {
byName :: Bool
byName = Bool
True,
classDiagram :: AnnotatedCd Relevance
classDiagram = AnnotatedClassDiagram {
annotatedClasses :: [String]
annotatedClasses = [String
"Professor", String
"FacilityManager", String
"Person", String
"Room", String
"Building", String
"UniversityCampus"],
annotatedRelationships :: [Annotation Relevance (AnyRelationship String String)]
annotatedRelationships = [
Annotation {
annotated :: AnyRelationship String String
annotated = Relationship String String -> AnyRelationship String String
forall a b. b -> Either a b
Right Composition {
compositionName :: String
compositionName = String
"isPartOf",
compositionPart :: LimitedLinking String
compositionPart = LimitedLinking {
linking :: String
linking = String
"Room",
limits :: (Int, Maybe Int)
limits = (Int
2, Maybe Int
forall a. Maybe a
Nothing)
},
compositionWhole :: LimitedLinking String
compositionWhole = LimitedLinking {
linking :: String
linking = String
"Building",
limits :: (Int, Maybe Int)
limits = (Int
1, Int -> Maybe Int
forall a. a -> Maybe a
Just Int
1)
}
},
annotation :: Relevance
annotation = Relevant {
contributingToProblem :: Bool
contributingToProblem = Bool
False,
listingPriority :: Int
listingPriority = Int
4,
referenceUsing :: ArticleToUse
referenceUsing = ArticleToUse
DefiniteArticle
}
},
Annotation {
annotated :: AnyRelationship String String
annotated = Relationship String String -> AnyRelationship String String
forall a b. b -> Either a b
Right Association {
associationName :: String
associationName = String
"isResponsibleFor",
associationFrom :: LimitedLinking String
associationFrom = LimitedLinking {
linking :: String
linking = String
"FacilityManager",
limits :: (Int, Maybe Int)
limits = (Int
1, Int -> Maybe Int
forall a. a -> Maybe a
Just Int
1)
},
associationTo :: LimitedLinking String
associationTo = LimitedLinking {
linking :: String
linking = String
"Building",
limits :: (Int, Maybe Int)
limits = (Int
1, Maybe Int
forall a. Maybe a
Nothing)
}
},
annotation :: Relevance
annotation = Relevant {
contributingToProblem :: Bool
contributingToProblem = Bool
False,
listingPriority :: Int
listingPriority = Int
1,
referenceUsing :: ArticleToUse
referenceUsing = ArticleToUse
DefiniteArticle
}
},
Annotation {
annotated :: AnyRelationship String String
annotated = Relationship String String -> AnyRelationship String String
forall a b. b -> Either a b
Right Association {
associationName :: String
associationName = String
"hasOfficeIn",
associationFrom :: LimitedLinking String
associationFrom = LimitedLinking {
linking :: String
linking = String
"Professor",
limits :: (Int, Maybe Int)
limits = (Int
1, Int -> Maybe Int
forall a. a -> Maybe a
Just Int
1)
},
associationTo :: LimitedLinking String
associationTo = LimitedLinking {
linking :: String
linking = String
"Room",
limits :: (Int, Maybe Int)
limits = (Int
1, Int -> Maybe Int
forall a. a -> Maybe a
Just Int
1)
}
},
annotation :: Relevance
annotation = Relevant {
contributingToProblem :: Bool
contributingToProblem = Bool
True,
listingPriority :: Int
listingPriority = Int
2,
referenceUsing :: ArticleToUse
referenceUsing = ArticleToUse
DefiniteArticle
}
},
Annotation {
annotated :: AnyRelationship String String
annotated = Relationship String String -> AnyRelationship String String
forall a b. b -> Either a b
Right Inheritance {
subClass :: String
subClass = String
"Professor",
superClass :: String
superClass = String
"Person"
},
annotation :: Relevance
annotation = Relevant {
contributingToProblem :: Bool
contributingToProblem = Bool
False,
listingPriority :: Int
listingPriority = Int
5,
referenceUsing :: ArticleToUse
referenceUsing = ArticleToUse
DefiniteArticle
}
},
Annotation {
annotated :: AnyRelationship String String
annotated = Relationship String String -> AnyRelationship String String
forall a b. b -> Either a b
Right Inheritance {
subClass :: String
subClass = String
"FacilityManager",
superClass :: String
superClass = String
"Person"
},
annotation :: Relevance
annotation = Relevant {
contributingToProblem :: Bool
contributingToProblem = Bool
False,
listingPriority :: Int
listingPriority = Int
6,
referenceUsing :: ArticleToUse
referenceUsing = ArticleToUse
DefiniteArticle
}
},
Annotation {
annotated :: AnyRelationship String String
annotated = Relationship String String -> AnyRelationship String String
forall a b. b -> Either a b
Right Composition {
compositionName :: String
compositionName = String
"isOn",
compositionPart :: LimitedLinking String
compositionPart = LimitedLinking {
linking :: String
linking = String
"Building",
limits :: (Int, Maybe Int)
limits = (Int
2, Maybe Int
forall a. Maybe a
Nothing)
},
compositionWhole :: LimitedLinking String
compositionWhole = LimitedLinking {
linking :: String
linking = String
"UniversityCampus",
limits :: (Int, Maybe Int)
limits = (Int
0, Int -> Maybe Int
forall a. a -> Maybe a
Just Int
1)
}
},
annotation :: Relevance
annotation = Relevant {
contributingToProblem :: Bool
contributingToProblem = Bool
False,
listingPriority :: Int
listingPriority = Int
3,
referenceUsing :: ArticleToUse
referenceUsing = ArticleToUse
DefiniteArticle
}
}
]
},
cdDrawSettings :: CdDrawSettings
cdDrawSettings = CdDrawSettings {
omittedDefaults :: OmittedDefaultMultiplicities
omittedDefaults = OmittedDefaultMultiplicities {
aggregationWholeOmittedDefaultMultiplicity :: Maybe (Int, Maybe Int)
aggregationWholeOmittedDefaultMultiplicity = (Int, Maybe Int) -> Maybe (Int, Maybe Int)
forall a. a -> Maybe a
Just (Int
0, Maybe Int
forall a. Maybe a
Nothing),
associationOmittedDefaultMultiplicity :: Maybe (Int, Maybe Int)
associationOmittedDefaultMultiplicity = (Int, Maybe Int) -> Maybe (Int, Maybe Int)
forall a. a -> Maybe a
Just (Int
0, Maybe Int
forall a. Maybe a
Nothing),
compositionWholeOmittedDefaultMultiplicity :: Maybe (Int, Maybe Int)
compositionWholeOmittedDefaultMultiplicity = Maybe (Int, Maybe Int)
forall a. Maybe a
Nothing
},
printNames :: Bool
printNames = Bool
True,
printNavigations :: Bool
printNavigations = Bool
True
},
errorReasons :: Map Char (Bool, Reason)
errorReasons = [(Char, (Bool, Reason))] -> Map Char (Bool, Reason)
forall a b. Ord a => [(a, b)] -> Map a b
listToFM [
(Char
'a', (Bool
False, Map Language String -> Reason
Custom ([(Language, String)] -> Map Language String
forall a b. Ord a => [(a, b)] -> Map a b
listToFM [
(Language
English, String
"contains a syntax error"),
(Language
German, String
"enthält einen Syntaxfehler")
]))),
(Char
'b', (Bool
False, Map Language String -> Reason
Custom ([(Language, String)] -> Map Language String
forall a b. Ord a => [(a, b)] -> Map a b
listToFM [
(Language
English, String
"does not have any corresponding object diagram"),
(Language
German, String
"hat gar kein passendes Objektdiagramm")
]))),
(Char
'c', (Bool
False, Map Language String -> Reason
Custom ([(Language, String)] -> Map Language String
forall a b. Ord a => [(a, b)] -> Map a b
listToFM [
(Language
English, String
"is fully correctly modelled"),
(Language
German, String
"ist vollständig richtig modelliert")
]))),
(Char
'd', (Bool
True, Map Language String -> Reason
Custom ([(Language, String)] -> Map Language String
forall a b. Ord a => [(a, b)] -> Map a b
listToFM [
(Language
English, String
"violates a requirement of the scenario"),
(Language
German, String
"hält eine Vorgabe des Szenarios nicht ein")
])))
],
showSolution :: Bool
showSolution = Bool
True,
taskText :: NameCdErrorTaskText
taskText = [
NameCdErrorTaskText
-> GenericOutput Language NameCdErrorTaskTextElement
forall language element.
[GenericOutput language element] -> GenericOutput language element
Paragraph [
Map Language String
-> GenericOutput Language NameCdErrorTaskTextElement
forall language element.
Map language String -> GenericOutput language element
Translated ([(Language, String)] -> Map Language String
forall a b. Ord a => [(a, b)] -> Map a b
listToFM [
(Language
English, String
"A student received the following scenario:"),
(Language
German, String
"Ein Student hat folgendes Szenario erhalten:")
])
],
NameCdErrorTaskText
-> GenericOutput Language NameCdErrorTaskTextElement
forall language element.
[GenericOutput language element] -> GenericOutput language element
Paragraph [
Map Language String
-> GenericOutput Language NameCdErrorTaskTextElement
forall language element.
Map language String -> GenericOutput language element
Translated ([(Language, String)] -> Map Language String
forall a b. Ord a => [(a, b)] -> Map a b
listToFM [
(Language
English, String
"A university campus consists of different buildings. Each building is cared for by a facility manager who is responsible for it. A facility manager is a person. Another kind of persons are the professors, who each have a specific room as own office. A building consists of different rooms, not each of which is a professor's office."),
(Language
German, String
"Ein Universitätscampus besteht aus verschiedenen Gebäuden. Jedes Gebäude wird von einem Hausmeister betreut, der für es zuständig ist. Ein Hausmeister ist eine Person. Eine andere Art von Personen sind die Professoren, die jeweils einen bestimmten Raum als eigenes Büro haben. Ein Gebäude besteht aus verschiedenen Räumen, von denen nicht jeder ein Professorenbüro ist.")
])
],
NameCdErrorTaskText
-> GenericOutput Language NameCdErrorTaskTextElement
forall language element.
[GenericOutput language element] -> GenericOutput language element
Paragraph [
Map Language String
-> GenericOutput Language NameCdErrorTaskTextElement
forall language element.
Map language String -> GenericOutput language element
Translated ([(Language, String)] -> Map Language String
forall a b. Ord a => [(a, b)] -> Map a b
listToFM [
(Language
English, String
"He solved the task of creating a class diagram for this scenario in the following way:"),
(Language
German, String
"Die Aufgabe, ein Klassendiagramm für dieses Szenario zu entwerfen, hat er folgendermaßen gelöst:")
])
],
NameCdErrorTaskText
-> GenericOutput Language NameCdErrorTaskTextElement
forall language element.
[GenericOutput language element] -> GenericOutput language element
Paragraph [NameCdErrorTaskTextElement
-> GenericOutput Language NameCdErrorTaskTextElement
forall language element. element -> GenericOutput language element
Special NameCdErrorTaskTextElement
IncorrectCd],
NameCdErrorTaskText
-> GenericOutput Language NameCdErrorTaskTextElement
forall language element.
[GenericOutput language element] -> GenericOutput language element
Paragraph [
Map Language String
-> GenericOutput Language NameCdErrorTaskTextElement
forall language element.
Map language String -> GenericOutput language element
Translated ([(Language, String)] -> Map Language String
forall a b. Ord a => [(a, b)] -> Map a b
listToFM [
(Language
English, String
"Analyse and take a stance on the created class diagram regarding the scenario task of the student!"),
(Language
German, String
"Analysieren Sie und beziehen Sie Stellung zum entworfenen Klassendiagramm hinsichtlich der Szenario-Aufgabe des Studenten!")
])
],
NameCdErrorTaskText
-> GenericOutput Language NameCdErrorTaskTextElement
forall language element.
[GenericOutput language element] -> GenericOutput language element
Paragraph [
Map Language String
-> GenericOutput Language NameCdErrorTaskTextElement
forall language element.
Map language String -> GenericOutput language element
Translated ([(Language, String)] -> Map Language String
forall a b. Ord a => [(a, b)] -> Map a b
listToFM [
(Language
English, String
"The class diagram ..."),
(Language
German, String
"Das Klassendiagramm ...")
])
],
NameCdErrorTaskText
-> GenericOutput Language NameCdErrorTaskTextElement
forall language element.
[GenericOutput language element] -> GenericOutput language element
Paragraph [NameCdErrorTaskTextElement
-> GenericOutput Language NameCdErrorTaskTextElement
forall language element. element -> GenericOutput language element
Special NameCdErrorTaskTextElement
ReasonsList],
NameCdErrorTaskText
-> GenericOutput Language NameCdErrorTaskTextElement
forall language element.
[GenericOutput language element] -> GenericOutput language element
Paragraph [
Map Language String
-> GenericOutput Language NameCdErrorTaskTextElement
forall language element.
Map language String -> GenericOutput language element
Translated ([(Language, String)] -> Map Language String
forall a b. Ord a => [(a, b)] -> Map a b
listToFM [
(Language
English, String
"Name the specific relationships that would need to be changed on occasion:"),
(Language
German, String
"Nennen Sie die konkreten Beziehungen, die gegebenenfalls geändert werden müssten:")
])
],
NameCdErrorTaskText
-> GenericOutput Language NameCdErrorTaskTextElement
forall language element.
[GenericOutput language element] -> GenericOutput language element
Paragraph [NameCdErrorTaskTextElement
-> GenericOutput Language NameCdErrorTaskTextElement
forall language element. element -> GenericOutput language element
Special NameCdErrorTaskTextElement
RelationshipsList],
NameCdErrorTaskText
-> GenericOutput Language NameCdErrorTaskTextElement
forall language element.
[GenericOutput language element] -> GenericOutput language element
Paragraph [
NameCdErrorTaskText
-> GenericOutput Language NameCdErrorTaskTextElement
forall language element.
[GenericOutput language element] -> GenericOutput language element
Paragraph [
Map Language String
-> GenericOutput Language NameCdErrorTaskTextElement
forall language element.
Map language String -> GenericOutput language element
Translated ([(Language, String)] -> Map Language String
forall a b. Ord a => [(a, b)] -> Map a b
listToFM [
(Language
English, String
"Please state your answer by providing a letter for your conclusion about the class diagram as well as a listing of numbers for those relationships that would need to be adapted in your opinion. For example,"),
(Language
German, String
"Bitte geben Sie Ihre Antwort an, indem Sie Folgendes angeben: einen Buchstaben für Ihre Schlussfolgerung zum Klassendiagramm, und eine Auflistung von Zahlen für diejenigen Beziehungen, die Ihrer Meinung nach angepasst werden müssten. Zum Beispiel würde")
])
],
NameCdErrorTaskText
-> GenericOutput Language NameCdErrorTaskTextElement
forall language element.
[GenericOutput language element] -> GenericOutput language element
Paragraph [
Map Language String
-> GenericOutput Language NameCdErrorTaskTextElement
forall language element.
Map language String -> GenericOutput language element
Code ([(Language, String)] -> Map Language String
forall a b. Ord a => [(a, b)] -> Map a b
listToFM [
(Language
English, String
"due-to:\n- 3\n- 4\nreason: b\n"),
(Language
German, String
"due-to:\n- 3\n- 4\nreason: b\n")
])
],
NameCdErrorTaskText
-> GenericOutput Language NameCdErrorTaskTextElement
forall language element.
[GenericOutput language element] -> GenericOutput language element
Paragraph [
Map Language String
-> GenericOutput Language NameCdErrorTaskTextElement
forall language element.
Map language String -> GenericOutput language element
Translated ([(Language, String)] -> Map Language String
forall a b. Ord a => [(a, b)] -> Map a b
listToFM [
(Language
English, String
"would indicate that b is your conclusion about the class diagram and that the 3. and 4. relationship would need to be adapted."),
(Language
German, String
"bedeuten, dass b Ihre Schlussfolgerung zum Klassendiagramm ist und dass die 3. und 4. Beziehung angepasst werden müssten.")
])
]
]
],
addText :: Maybe (Map Language String)
addText = Maybe (Map Language String)
forall a. Maybe a
Nothing
},
allowLayoutMangling :: Bool
allowLayoutMangling = Bool
False,
shuffleNames :: Bool
shuffleNames = Bool
False,
shuffleOptions :: Bool
shuffleOptions = Bool
True
}