/*******************************************************************************
 * Copyright (c) 2018 Microsoft Research. All rights reserved. 
 *
 * The MIT License (MIT)
 * 
 * Permission is hereby granted, free of charge, to any person obtaining a copy 
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
 * of the Software, and to permit persons to whom the Software is furnished to do
 * so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software. 
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 *
 * Contributors:
 *   Markus Alexander Kuppe - initial API and implementation
 ******************************************************************************/
package tlc2.tool.coverage;

import tla2sany.semantic.SemanticNode;

public interface CostModel {

	CostModel DO_NOT_RECORD = new CostModel() {

		@Override
		public CostModel report() {
			// no-op
			return this;
		}

		@Override
		public CostModel get(final SemanticNode sn) {
			return this;
		}
		
		@Override
		public CostModel getRoot() {
			return this;
		}

		@Override
		public CostModel incInvocations() {
			// no-op
			return this;
		}

		@Override
		public CostModel incInvocations(final long value) {
			// no-op
			return this;
		}

		@Override
		public CostModel incSecondary() {
			// no-op
			return this;
		}

		@Override
		public CostModel incSecondary(long value) {
			// no-op
			return null;
		}

		@Override
		public CostModel getAndIncrement(SemanticNode eon) {
			// no-op
			return this;
		}
	};

	CostModel incInvocations();

	CostModel incInvocations(final long value);

	CostModel incSecondary();
	
	CostModel incSecondary(final long value);

	CostModel report();

	CostModel get(final SemanticNode sn);
	
	CostModel getAndIncrement(final SemanticNode eon);
	
	CostModel getRoot();
}

@@ -1562,32 +1562,38 @@
 erride%0A%09%09public 
+final 
 CostModel report
@@ -1643,32 +1643,38 @@
 erride%0A%09%09public 
+final 
 CostModel get(fi
@@ -1732,32 +1732,38 @@
 erride%0A%09%09public 
+final 
 CostModel getRoo
@@ -1802,32 +1802,38 @@
 erride%0A%09%09public 
+final 
 CostModel incInv
@@ -1891,32 +1891,38 @@
 erride%0A%09%09public 
+final 
 CostModel incInv
@@ -1996,32 +1996,38 @@
 erride%0A%09%09public 
+final 
 CostModel incSec
@@ -2083,32 +2083,38 @@
 erride%0A%09%09public 
+final 
 CostModel incSec
@@ -2188,16 +2188,22 @@
 %09public 
+final 
 CostMode
@@ -2272,16 +2272,97 @@
 is;%0A%09%09%7D%0A
+%09%09%0A%09%09@Override%0A%09%09public final String toString() %7B%0A%09%09%09return %22DO_NOT_RECORD%22;%0A%09%09%7D%0A
 %09%7D;%0A%0A%09Co

Make it easier to identify a no-op CostModel in the debugger.