Fix tabbing
[satune.git] / src / Interpreter / alloysig.cc
index 1b98cd8146b458ecc1fde523e94a75dd9206c1cb..b7eeb860f899407029c4cca8b8e884e2d9dd9927 100644 (file)
@@ -5,18 +5,18 @@ bool AlloyBoolSig::encodeAbs = true;
 bool AlloySetSig::encodeAbs = true;
 bool AlloyElementSig::encodeAbs = true;
 
-AlloyBoolSig::AlloyBoolSig(uint id):
+AlloyBoolSig::AlloyBoolSig(uint id) :
        ValuedSignature(id)
 {
 }
 
-string AlloyBoolSig::toString() const{
+string AlloyBoolSig::toString() const {
        return "Boolean" + to_string(id) + ".value";
 }
 
-string AlloyBoolSig::getSignature() const{
+string AlloyBoolSig::getSignature() const {
        string str;
-       if(encodeAbs){
+       if (encodeAbs) {
                encodeAbs = false;
                str += getAbsSignature();
        }
@@ -24,15 +24,15 @@ string AlloyBoolSig::getSignature() const{
        return str;
 }
 
-string AlloyBoolSig::getAbsSignature() const{
+string AlloyBoolSig::getAbsSignature() const {
        string str;
-       if(AlloySetSig::encodeAbs){
+       if (AlloySetSig::encodeAbs) {
                AlloySetSig::encodeAbs = false;
                str += "abstract sig AbsSet {\
                domain: set Int\
                }\n";
        }
-       str +="one sig BooleanSet extends AbsSet {}{\n\
+       str += "one sig BooleanSet extends AbsSet {}{\n\
        domain = 0 + 1 \n\
        }\n\
        abstract sig AbsBool {\
@@ -43,19 +43,19 @@ string AlloyBoolSig::getAbsSignature() const{
        return str;
 }
 
-AlloyElementSig::AlloyElementSig(uint id, Signature *_ssig)
+AlloyElementSig::AlloyElementSig(uint id, Signature *_ssig) :
        ValuedSignature(id),
        ssig(_ssig)
 {
 }
 
-string AlloyElementSig::toString() const{
+string AlloyElementSig::toString() const {
        return "Element" + to_string(id) + ".value";
 }
 
-string AlloyElementSig::getSignature() const{
+string AlloyElementSig::getSignature() const {
        string str;
-       if(encodeAbs){
+       if (encodeAbs) {
                encodeAbs = false;
                str += getAbsSignature();
        }
@@ -65,28 +65,28 @@ string AlloyElementSig::getSignature() const{
        return str;
 }
 
-string AlloyElementSig::getAbsSignature() const{
+string AlloyElementSig::getAbsSignature() const {
        return "abstract sig AbsElement {\n\
                value: Int\n\
                }\n";
-       
+
 }
 
-AlloySetSig::AlloySetSig(uint id, Set *set): Signature(id){
+AlloySetSig::AlloySetSig(uint id, Set *set) : Signature(id) {
        ASSERT(set->getSize() > 0);
        domain = to_string(set->getElement(0));
-       for(uint i=1; i< set->getSize(); i++){
+       for (uint i = 1; i < set->getSize(); i++) {
                domain += " + " + to_string(set->getElement(i));
        }
 }
 
-string AlloySetSig::toString() const{
+string AlloySetSig::toString() const {
        return "Set" + to_string(id) + ".domain";
 }
 
-string AlloySetSig::getSignature() const{
+string AlloySetSig::getSignature() const {
        string str;
-       if(encodeAbs){
+       if (encodeAbs) {
                encodeAbs = false;
                str += getAbsSignature();
        }
@@ -96,9 +96,9 @@ string AlloySetSig::getSignature() const{
        return str;
 }
 
-string AlloySetSig::getAbsSignature() const{
+string AlloySetSig::getAbsSignature() const {
        return "abstract sig AbsSet {\n\
                domain: set Int\n\
                }\n";
-       
+
 }