Skip to content

Commit

Permalink
running make now gets to logs after GlassBR is completely commented o…
Browse files Browse the repository at this point in the history
…ut in makefile
  • Loading branch information
niazim3 committed Jul 17, 2018
1 parent 09272cf commit d788d4b
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 18 deletions.
4 changes: 2 additions & 2 deletions code/drasil-example/Drasil/GlassBR/Body.hs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ import Drasil.GlassBR.DataDefs (dataDefns, gbQDefns, hFromt, strDisFac, nonFL,
import Drasil.GlassBR.ModuleDefs (allMods)
import Drasil.GlassBR.References (rbrtsn2012)
import Drasil.GlassBR.Symbols (this_symbols)
import Drasil.GlassBR.TMods (gbrTMods, t1IsSafe, t2IsSafe)
import Drasil.GlassBR.TMods (gbrTMods, t1IsSafe, t2IsSafe, tmodels)
import Drasil.GlassBR.IMods (probOfBreak,
calofCapacity, calofDemand, gbrIMods)

Expand Down Expand Up @@ -169,7 +169,7 @@ glassSystInfo = SI {
_quants = this_symbols,
_concepts = [] :: [DefinedQuantityDict],
_definitions = (map (relToQD gbSymbMap) gbrIMods) ++
--FIXME: #891 (map (relToQD gbSymbMap) gbrTMods) ++
--(map (relToQD gbSymbMap) tmodels{-gbrTMods-}) ++ --FIXME: #891
[wtntWithEqn, sdWithEqn], -- wtntWithEqn is defined in Unitals but only appears
-- in the description of the Calculation of Demand instance model;
-- should this be included as a Data Definition?
Expand Down
6 changes: 5 additions & 1 deletion code/drasil-example/Drasil/GlassBR/TMods.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Drasil.GlassBR.TMods (gbrTMods, t1IsSafe,t2IsSafe) where
module Drasil.GlassBR.TMods (gbrTMods, t1IsSafe,t2IsSafe, tmodels) where

import Drasil.GlassBR.Unitals (demand, demandq, is_safe1, is_safe2, lRe,
pb_tol, prob_br)
Expand All @@ -12,6 +12,10 @@ import Data.Drasil.SentenceStructures (foldlSent, isThe, sAnd)

{--}

--FIXME: should be removed with closure of #891
tmodels :: [RelationConcept]
tmodels = [t1SafetyReq, t2SafetyReq]

gbrTMods :: [TheoryModel]
gbrTMods = [t1IsSafe, t2IsSafe]

Expand Down
27 changes: 13 additions & 14 deletions code/drasil-lang/Language/Drasil/Printing/Import.hs
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,7 @@ makeDocument sm (Document title author sections) =
-- | Translates from LayoutObj to the Printing representation of LayoutObj
layout :: HasSymbolTable ctx => ctx -> Int -> SecCons -> T.LayoutObj
layout sm currDepth (Sub s) = sec sm (currDepth+1) s
--layout sm _ (Con c) = lay sm c
layout sm _ (Con c) = error "Contents is still used"
layout sm _ (Con c) = lay sm c
layout sm _ (LCon lc) = lay' sm lc (accessContents lc)

-- | Helper function for creating sections as layout objects
Expand All @@ -276,29 +275,29 @@ sec sm depth x@(Section title contents _) = --FIXME: should ShortName be used so
(T.Header depth (spec sm title) ref :
map (layout sm depth) contents) ref

{-- | Translates from Contents to the Printing Representation of LayoutObj.
-- | Translates from Contents to the Printing Representation of LayoutObj.
-- Called internally by layout.
lay :: HasSymbolTable ctx => ctx -> Contents -> T.LayoutObj
lay sm x@(Table hdr lls t b _) = T.Table ["table"]
((map (spec sm) hdr) : (map (map (spec sm)) lls)) (P.S (refAdd x)) b (spec sm t)
lay sm (Paragraph c) = T.Paragraph (spec sm c)
lay sm (EqnBlock c _) = T.HDiv ["equation"] [T.EqnBlock (P.E (expr c sm))] P.EmptyS
((map (spec sm) hdr) : (map (map (spec sm)) lls)) (P.S "fixmelabel0") b (spec sm t)
lay sm (Paragraph c) = T.Paragraph (spec sm c) (P.S "fixmelabel1")
lay sm (EqnBlock c _) = T.HDiv ["equation"] [T.EqnBlock (P.E (expr c sm)) (P.S "fixmelabel2")] (P.S "fixmelabel3")
-- FIXME: Make equations referable
lay sm x@(Definition c) = T.Definition c (makePairs sm c) (P.S (refAdd x))
lay sm (Enumeration cs) = T.List $ makeL sm cs
lay sm x@(Figure c f wp _) = T.Figure (P.S (refAdd x)) (spec sm c) f wp
lay sm x@(Definition c) = T.Definition c (makePairs sm c) (P.S "fixmelabel4")
lay sm (Enumeration cs) = T.List (makeL sm cs) (P.S "fixmelabel5")
lay sm x@(Figure c f wp _) = T.Figure (P.S "fixmelabel6") (spec sm c) f wp
lay sm x@(Requirement r) = T.ALUR T.Requirement
(spec sm $ requires r) (P.S $ refAdd x) (spec sm $ getShortName r)
(spec sm $ requires r) (P.S "fixmelabel7") (spec sm $ getShortName r)
lay sm x@(Assumption a) = T.ALUR T.Assumption
(spec sm (assuming a)) (P.S (refAdd x)) (spec sm $ getShortName a)
(spec sm (assuming a)) (P.S "fixmelabel8") (spec sm $ getShortName a)
lay sm x@(Change lc) = T.ALUR
(if (chngType lc) == Likely then T.LikelyChange else T.UnlikelyChange)
(spec sm (chng lc)) (P.S (refAdd x)) (spec sm $ getShortName lc)
(spec sm (chng lc)) (P.S "fixmelabel9") (spec sm $ getShortName lc)
lay sm x@(Graph ps w h t _) = T.Graph (map (\(y,z) -> (spec sm y, spec sm z)) ps)
w h (spec sm t) (P.S (refAdd x))
w h (spec sm t) (P.S "fixmelabel10")
lay sm (Defnt dtyp pairs rn) = T.Definition dtyp (layPairs pairs) (P.S rn)
where layPairs = map (\(x,y) -> (x, map (lay sm) y))
lay sm (Bib bib) = T.Bib map (layCite sm) bib-}
lay sm (Bib bib) = T.Bib (map (layCite sm) bib) (P.S "fixmelabel11")

This comment has been minimized.

Copy link
@niazim3

niazim3 Jul 17, 2018

Author Collaborator

Please note: all these fixmelabel*s are going to be removed. They were put into place temporarily to get past build errors.


lay' :: HasSymbolTable ctx => ctx -> LabelledContent -> Contents -> T.LayoutObj
lay' sm lc (Table hdr lls t b _) = T.Table ["table"]
Expand Down
3 changes: 2 additions & 1 deletion code/drasil-lang/Language/Drasil/RefTypes.hs
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@ instance Show RefType where
show Goal = "Goal Statement"
show PSD = "Physical System Description"
show EqnB = "Equation"
show Lbl = "Label"
show Lbl = "Label"
show Cntnts = "Content"

0 comments on commit d788d4b

Please sign in to comment.