JacquesCarette / Drasil

Generate all the things (focusing on research software)
https://jacquescarette.github.io/Drasil
BSD 2-Clause "Simplified" License
142 stars 26 forks source link

Drasil Research Group Meeting, Monday, June 10, 3:00 pm, ITB/225 #3776

Closed smiths closed 5 months ago

smiths commented 5 months ago

The agenda is as follows

  1. Design discussion
    • 3773 Design of chunks and attributes progress @balacij and @NoahCardoso

    • 3781, #3781 (@B-rando1)

    • @balacij please propose any other agenda items that are pressing

Regrets: ?

smiths commented 5 months ago

Past the first item in the agenda I have not filled in the details. I want to make sure that we are working on the most pressing topics and take advantage of our last in-person meeting with @JacquesCarette. @balacij, @B-rando1 and @BilalM04 please let me know what design discussions are most pressing. The goal isn't an update on everyone's work, the goal is to dive into design discussions on issues that are blocking progress. The agenda items should point to specific issues or PRs. The more detail that is provided in the agenda, the better.

B-rando1 commented 5 months ago

3781 is currently the issue that I'll want to talk about.

smiths commented 5 months ago

@B-rando1 I already added it to the agenda once I saw that there were some design issues that will need to be discussed. :smile:

BilalM04 commented 5 months ago

@smiths At the moment, there are no pressing issues that are hindering progress from my part. If any questions do pop up, I anticipate they can be easily discussed in the issue tracker or the discussion board.

smiths commented 5 months ago

Sounds good @BilalM04. My guess is that we won't have time to discuss 3 agenda items anyway. :smile:

balacij commented 5 months ago

10 Chunks

  1. QuantityDict & DefinedQuantityDict

Unitals.hs:

message :: QuantityDict
message = vc "message" (nounPhraseSent (S "output message as a string")) lS String

glassbr/../(Concepts.hs + Unitals.hs):

loadDurFactor :: CI
loadDurFactor = commonIdeaWithDict "loadDurFactor" (nounPhraseSP "load duration factor")    "LDF" [idglass]

lDurFac :: DefinedQuantityDict
lDurFac = vc'' loadDurFactor (variable "LDF") Real
  1. ConstrConcept & ConstrainedChunk

Unitals.hs:

flightDur, landPos, launAngle, launSpeed, offset, targPos :: ConstrConcept
flightDur = constrainedNRV' (uc C.flightDur (subStr lT "flight") Real second) [gtZeroConstr]

glassbr/../Unitals.hs:

probBr, probFail, pbTolfail, stressDistFac :: ConstrainedChunk
probBr = cvc "probBr" (nounPhraseSP "probability of breakage")
  (sub cP lBreak) Real
  [probConstr] (Just $ dbl 0.4)
  1. UncertQ & UncertainChunk

Unitals.hs:

flightDurUnc :: UncertQ
flightDurUnc = uq flightDur defaultUncrt

glassbr/../Unitals.hs:

pbTol :: UncertainChunk
pbTol = uvc "pbTol" (nounPhraseSP "tolerable probability of breakage") 
  (sub cP (Concat [lBreak, lTol])) Real
  [probConstr] (dbl 0.008) (uncty 0.001 Nothing)
  1. QDefinition & DataDefinition

DataDefs.hs:

speedIX, speedIY :: DataDefinition
speedIX = ddENoRefs speedIXQD Nothing "speedIX" [speedRef, figRef]
speedIY = ddENoRefs speedIYQD Nothing "speedIY" [speedRef, figRef]

speedIXQD, speedIYQD :: SimpleQDef
speedIXQD = mkQuantDef ixVel $ sy iSpeed `mulRe` cos (sy launAngle)
speedIYQD = mkQuantDef iyVel $ sy iSpeed `mulRe` sin (sy launAngle)

(Nothing = No Derivation)

  1. EquationalModel

IMods.hs:

timeIM :: InstanceModel
timeIM = imNoRefs (equationalModelN (nounPhraseSP "calculation of landing time") timeQD)
  [qwC launSpeed $ UpFrom (Exc, exactDbl 0)
  ,qwC launAngle $ Bounded (Exc, exactDbl 0) (Exc, half $ sy pi_)]
  (qw flightDur) [UpFrom (Exc, exactDbl 0)]
  (Just timeDeriv) "calOfLandingTime" [angleConstraintNote, gravitationalAccelConstNote, timeConsNote]

timeQD :: SimpleQDef 
timeQD = mkQuantDef flightDur E.flightDur'

timeDeriv :: Derivation
timeDeriv = mkDerivName (phrase flightDur) (weave [timeDerivSents, map eS timeDerivEqns])

timeDerivSents :: [Sentence]
timeDerivSents = [timeDerivSent1, timeDerivSent2, timeDerivSent3, timeDerivSent4, timeDerivSent5]

timeDerivSent1, timeDerivSent2, timeDerivSent3, timeDerivSent4, timeDerivSent5 :: Sentence
timeDerivSent1 = foldlSentCol [S "We know that" +:+.
  foldlList Comma List
    [eqnWSource (sy iyPos $= E.iyPos) launchOrigin,
     eqnWSource (sy yConstAccel $= E.yConstAccel) accelYGravity],
     ...
  1. “Things”

Concepts.hs:

launcher, projectile, target, projSpeed, projPos :: ConceptChunk
launcher   = dcc "launcher"   (nounPhraseSP "launcher")  ("where the projectile is launched from " ++
                                                          "and the device that does the launching")
projectile = dcc "projectile" (nounPhraseSP "projectile") "the object to be launched at the target"
target     = dcc "target"     (nounPhraseSP "target")     "where the projectile should be launched to"
  1. SystemInformation

Body.hs:

si :: SystemInformation
si = SI {
  _sys         = projectileTitle,
  _kind        = Doc.srs,
  _authors     = [samCrawford, brooks, spencerSmith],
  _purpose     = [purp],
  _background  = [],
  _quants      = symbols,
  _concepts    = [] :: [DefinedQuantityDict],
  _instModels  = iMods,
  _datadefs    = dataDefs,
  _configFiles = [],
  _inputs      = inputs,
  _outputs     = outputs,
  _defSequence = [] :: [Block SimpleQDef],
  _constraints = map cnstrw constrained,
  _constants   = constants,
  _sysinfodb   = symbMap,
  _usedinfodb  = usedDB,
   refdb       = refDB
}
  1. Assumptions & Goals

Assumptions.hs:

assumptions :: [ConceptInstance]
assumptions = [twoDMotion, cartSyst, yAxisGravity, launchOrigin, targetXAxis, 
  posXDirection, constAccel, accelXZero, accelYGravity, neglectDrag, pointMass, 
  freeFlight, neglectCurv, timeStartZero, gravAccelValue]

twoDMotion, ... :: ConceptInstance
twoDMotion = cic "twoDMotion" twoDMotionDesc "twoDMotion" assumpDom

twoDMotionDesc :: Sentence
twoDMotionDesc = atStartNP (NP.the (projMotion `is` twoD)) +:+. sParen (getAcc twoD)

Goals.hs:

targetHit :: ConceptInstance
targetHit = cic "targetHit" 
  (S "Determine if the" +:+ phrase projectile +:+ S "hits the" +:+. phrase target)
  "targetHit" goalStmtDom
  1. UnitDefn

drasil-data/.../SI_Units.hs:

metre, ... :: UnitDefn
metre = fund "metre" "length" "m"
  1. Requirements

Requirements.hs:

verifyInVals :: ConceptInstance
verifyInVals = cic "verifyInVals" verifyParamsDesc "Verify-Input-Values" funcReqDom

verifyParamsDesc :: Sentence
verifyParamsDesc = foldlSent [S "Check the entered", plural inValue,
  S "to ensure that they do not exceed the" +:+. namedRef (datCon [] []) (plural datumConstraint),
  S "If any of the", plural inValue, S "are out of bounds" `sC`
  S "an", phrase errMsg, S "is displayed" `S.andThe` plural calculation, S "stop"]
smiths commented 5 months ago

All agenda items were covered.

smiths commented 5 months ago

Great example chunks @balacij. We should use this list again as we consider the design of the chunk graph.