ascesis 0.0.6

A language for analysis and synthesis of cause-effect synchronised interacting systems
Documentation
<CesFile> ::= <CesFileBlock>
            | <CesFileBlock> <CesFile> ;

<CesFileBlock> ::= <ImmediateDef>
                 | <PropBlock>
                 | <CapsBlock>
                 | <UnboundedBlock>
                 | <WeightsBlock>
                 | <InhibitBlock>
                 | <HoldBlock> ;

;; Structure definition, immediate form

<ImmediateDef> ::= <ImmediateSig> "{" "}"
                 | <ImmediateSig> "{" <Rex> "}" ;

<ImmediateSig> ::= "ces" <Identifier> ;

;; Structure instantiation

<CesImmediate> ::= <Identifier> "(" ")" ;

<CesInstance> ::= <Identifier> "!" "(" ")"
                | <Identifier> "!" "(" <InstanceArgs> ")" ;

<InstanceArgs> ::= <PlainInstanceArgs>
                 | <PlainInstanceArgs> "," ;

<PlainInstanceArgs> ::= <ArgValue>
                      | <ArgValue> "," <PlainInstanceArgs> ;

<ArgValue> ::= <Identifier> ;

;; Presentation context

<PropSelector> ::= "vis" | "sat" ;

<PropBlock> ::= <PropSelector> "{" "}"
              | <PropSelector> "{" <PropList> "}" ;

<PropList> ::= <PlainPropList>
             | <PlainPropList> "," ;

<PlainPropList> ::= <PropField>
                  | <PropField> "," <PlainPropList> ;

<PropField> ::= <Identifier> ":" <PropValue> ;

<PropValueArray> ::= <PlainPropValueArray>
                   | <PlainPropValueArray> "," ;

<PlainPropValueArray> ::= <PropValue>
                        | <PropValue> "," <PlainPropValueArray> ;

<PropValue> ::= <Name>
              | <SizeList>
              | <NodeList>
              | "[" <PropValueArray> "]"
              | "{" <PropList> "}" ;

;; Capacities

<CapsBlock> ::= "caps" "{" "}"
              | "caps" "{" <CapList> "}" ;

<CapList> ::= <PlainCapList>
            | <PlainCapList> "," ;

<PlainCapList> ::= <CapField>
                 | <CapField> "," <PlainCapList> ;

<CapField> ::= <Size> <NodeList>

<UnboundedBlock> ::= "unbounded" "{" "}"
                   | "unbounded" "{" <NodeList> "}" ;

;; Weights

<WeightsBlock> ::= "weights" "{" "}"
                 | "weights" "{" <WeightList> "}" ;

<WeightList> ::= <PlainWeightList>
               | <PlainWeightList> "," ;

<PlainWeightList> ::= <WeightField>
                    | <WeightField> "," <PlainWeightList> ;

<WeightField> ::= <Size> <NodeList> "->" <NodeList>
                | <Size> <NodeList> "<-" <NodeList>;

;; Inhibitors

<InhibitBlock> ::= "inhibit" "{" "}"
                 | "inhibit" "{" <InhibitList> "}" ;

<InhibitList> ::= <PlainInhibitList>
                | <PlainInhibitList> "," ;

<PlainInhibitList> ::= <InhibitField>
                     | <InhibitField> "," <PlainInhibitList> ;

<InhibitField> ::= <NodeList> "->" <NodeList>
                 | <NodeList> "<-" <NodeList>;

;; Holders

<HoldBlock> ::= "hold" "{" "}"
              | "hold" "{" <HoldList> "}" ;

<HoldList> ::= <PlainHoldList>
             | <PlainHoldList> "," ;

<PlainHoldList> ::= <HoldField>
                  | <HoldField> "," <PlainHoldList> ;

<HoldField> ::= <NodeList> "->" <NodeList>
              | <NodeList> "<-" <NodeList>;

;; Rule expression

<Rex> ::= <ThinArrowRule>
        | <FatArrowRule>
        | <RexTermSeq> ;

<RexTermSeq> ::= <RexTerm>
               | <RexTerm> <RexTermSeq>
               | <RexTerm> "+" <RexTermSeq> ;

<RexTerm> ::= <CesImmediate>
            | <CesInstance>
            | "{" <Rex> "}" ;

;; Arrow rules

<ThinArrowRule> ::= <E-Rule> | <C-Rule> | <EC-Rule> | <CE-Rule> | <FW-Rule> | <BW-Rule> ;

; effect polynomial with explicit node list on the left
<E-Rule> ::= <NodeList> "->" <Polynomial> ;

; cause polynomial with explicit node list on the left
<C-Rule> ::= <NodeList> "<-" <Polynomial> ;

; effect-then-cause polynomial with explicit node list on the left
<EC-Rule> ::= <NodeList> "->" <Polynomial> "<-" <Polynomial> ;

; cause-then-effect polynomial with explicit node list on the left
<CE-Rule> ::= <NodeList> "<-" <Polynomial> "->" <Polynomial> ;

; cause-then-effect pair of polynomials with explicit node list in the
; middle
<FW-Rule> ::= <Polynomial> "->" <NodeList> "->" <Polynomial> ;

; effect-then-cause pair of polynomials with explicit node list in the
; middle
<BW-Rule> ::= <Polynomial> "<-" <NodeList> "<-" <Polynomial> ;

; multi-polynomial rule with implicit node lists
<FatArrowRule> ::= <Polynomial> <FatArrow> <FatArrowRuleTail> ;

<FatArrowRuleTail> ::= <Polynomial>
                     | <Polynomial> <FatArrow> <FatArrowRuleTail> ;

<FatArrow> ::= "=>" | "<=" | "<=>" ;

;; Polynomial

<Polynomial> ::= <PolyTermSeq>
               | "+" <PolyTermSeq>
               | <Polynomial> "+" <PolyTermSeq> ;

<PolyTermSeq> ::= <PolyTerm>
                | <PolyTerm> <PolyTermSeq> ;

<PolyTerm> ::= <Identifier>
             | "(" <Polynomial> ")" ;

<NodeList> ::= <Polynomial> ;

;; Identifiers

; FIXME
<Identifier> ::= "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m"
               | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" ;

;; Literals

<SizeList> ::= <Size>
             | <Size> <SizeList> ;

; FIXME
<Size> ::= "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" ;

; FIXME
<Name> ::= "\"A\"" | "\"B\"" | "\"C\"" | "\"D\"" | "\"E\"" | "\"F\"" | "\"G\"" | "\"H\"" | "\"I\""
         | "\"J\"" | "\"K\"" | "\"L\"" | "\"M\"" | "\"N\"" | "\"O\"" | "\"P\"" | "\"Q\"" | "\"R\""
         | "\"S\"" | "\"T\"" | "\"U\"" | "\"V\"" | "\"W\"" | "\"X\"" | "\"Y\"" | "\"Z\"" ;