/** * Takes a configuration declaration and returns the sentences that it desugars into. * * Cells of multiplicity 1 desugar into an initializer production, an initializer rule, and a cell production. * Cells of multiplicity * desugar into an initializer production, an initializer rule, a cell production, and a bag * sort to represent a bag of those cells. * Cells of multiplicity ? desugar into an initializer production, an initializer rule, a cell production, and an * empty production indicating the absence of that cell. * Cells with children additionally generate a *CellFragment sort with the same arity as the cell production, * but the arguments made optional by generating additional sorts. * Cells which have parents and are not multiplicity * generate a CellOpt sort which is a supersort of the cell sort * and has an additional production name like {@code <cell>-absent}. (For a cell with multiplicitly ? this is * necessary to distinguish a fragment that did capture the state of the cell when it wasn't present, from * a cell fragment that didn't even try to capture the cell). * * Currently the implementation does not handle initializer rules; we will address this eventually. * @param body The body of the configuration declaration. * @param ensures The ensures clause of the configuration declaration. * @param att The attributes of the configuration declaration. * @param m The module the configuration declaration exists in. * @return A set of sentences representing the configuration declaration. */ public static Set<Sentence> gen(K body, K ensures, Att att, Module m, boolean kore) { return genInternal(body, ensures, att, m, kore)._1(); }
Tuple4<Set<Sentence>, List<Sort>, K, Boolean> childResult = genInternal( cellContents, null, cfgAtt, m, kore); return genInternal(generatedTop, ensures, cfgAtt, m, kore); for (K cell : cells) { Tuple4<Set<Sentence>, List<Sort>, K, Boolean> childResult = genInternal(cell, null, cfgAtt, m, kore); accumSentences = (Set<Sentence>)accumSentences.$bar(childResult._1()); sorts.addAll(childResult._2());