|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.mit.csail.sdg.alloy4compiler.ast.Browsable
edu.mit.csail.sdg.alloy4compiler.parser.CompModule
public final class CompModule
Mutable; this class represents an Alloy module; equals() uses object identity.
| Nested Class Summary | |
|---|---|
static class |
CompModule.Open
Mutable; this class represents an untypechecked Alloy module import statement; equals() uses object identity. |
| Field Summary | |
|---|---|
java.lang.String |
path
The simplest path pointing to this Module ("" if this is the main module) |
| Method Summary | |
|---|---|
void |
addGlobal(java.lang.String name,
Expr value)
Add a global expression; if the name already exists, it is removed first. |
ConstList<Pair<java.lang.String,Expr>> |
getAllAssertions()
Return an unmodifiable list of all assertions in this module. |
ConstList<Command> |
getAllCommands()
Return an unmodifiable list of all commands in this module. |
SafeList<Pair<java.lang.String,Expr>> |
getAllFacts()
Return an unmodifiable list of all facts in this module. |
SafeList<Func> |
getAllFunc()
Return an unmodifiable list of all functions in this module. |
Expr |
getAllReachableFacts()
Return the conjunction of all facts in this module and all reachable submodules (not including field constraints, nor including sig appended constraints) |
SafeList<CompModule> |
getAllReachableModules()
Return the list containing THIS MODULE and all modules reachable from this module. |
java.util.List<java.lang.String> |
getAllReachableModulesFilenames()
Return the list of all relative filenames included from this MODULE. |
ConstList<Sig> |
getAllReachableSigs()
Return the list containing UNIV, SIGINT, SEQIDX, STRING, NONE, and all sigs defined in this module or a reachable submodule. |
SafeList<Sig> |
getAllSigs()
Returns an unmodifiable list of all signatures defined inside this module. |
java.lang.String |
getHTML()
Returns the description (as HTML) to show for this node. |
java.lang.String |
getModelName()
Returns the text of the "MODULE" line at the top of the file; "unknown" if the line has not be parsed from the file yet. |
ConstList<CompModule.Open> |
getOpens()
Returns an unmodifiable copy of the current list of OPEN statements. |
CompModule |
getRootModule()
Returns a pointer to the root module in this world. |
java.util.List<? extends Browsable> |
getSubnodes()
Returns a list of subnodes for this node. |
Sig.PrimSig |
metaField()
Returns the meta signature "field$" (or null if such a sig does not exist) |
Sig.PrimSig |
metaSig()
Returns the meta signature "sig$" (or null if such a sig does not exist) |
Expr |
parseOneExpressionFromString(java.lang.String input)
Parse one expression by starting fromt this module as the root module. |
java.lang.String |
path()
Return the simplest path pointing to this Module ("" if this is the main module) |
Pos |
pos()
Returns a Pos object representing the position of this Expr. |
Pos |
span()
Returns a Pos object representing the entire span of this Expr and all its subexpressions. |
java.lang.String |
toString()
Returns a short description for this module. |
| Methods inherited from class edu.mit.csail.sdg.alloy4compiler.ast.Browsable |
|---|
make, make, make, make, showAsTree |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface edu.mit.csail.sdg.alloy4compiler.ast.Module |
|---|
showAsTree |
| Field Detail |
|---|
public final java.lang.String path
| Method Detail |
|---|
public java.lang.String path()
path in interface Modulepublic final Pos pos()
pos in class Browsablepublic final Pos span()
span in class Browsablepublic java.lang.String getHTML()
getHTML in class Browsablepublic java.util.List<? extends Browsable> getSubnodes()
getSubnodes in class Browsablepublic Sig.PrimSig metaSig()
public Sig.PrimSig metaField()
public Expr parseOneExpressionFromString(java.lang.String input)
throws Err,
java.io.FileNotFoundException,
java.io.IOException
parseOneExpressionFromString in interface ModuleErr
java.io.FileNotFoundException
java.io.IOExceptionpublic SafeList<CompModule> getAllReachableModules()
getAllReachableModules in interface Modulepublic java.util.List<java.lang.String> getAllReachableModulesFilenames()
getAllReachableModulesFilenames in interface Modulepublic ConstList<Sig> getAllReachableSigs()
getAllReachableSigs in interface Modulepublic java.lang.String toString()
toString in class java.lang.Objectpublic CompModule getRootModule()
public java.lang.String getModelName()
getModelName in interface Modulepublic ConstList<CompModule.Open> getOpens()
public SafeList<Sig> getAllSigs()
getAllSigs in interface Modulepublic SafeList<Func> getAllFunc()
getAllFunc in interface Modulepublic ConstList<Pair<java.lang.String,Expr>> getAllAssertions()
getAllAssertions in interface Modulepublic SafeList<Pair<java.lang.String,Expr>> getAllFacts()
getAllFacts in interface Modulepublic Expr getAllReachableFacts()
getAllReachableFacts in interface Modulepublic ConstList<Command> getAllCommands()
getAllCommands in interface Module
public void addGlobal(java.lang.String name,
Expr value)
addGlobal in interface Module
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||