Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removeVariable: method semantic is not really clear #290

Open
SergeStinckwich opened this issue Mar 11, 2021 · 2 comments
Open

removeVariable: method semantic is not really clear #290

SergeStinckwich opened this issue Mar 11, 2021 · 2 comments
Milestone

Comments

@SergeStinckwich
Copy link
Collaborator

SergeStinckwich commented Mar 11, 2021

What is the exact purpose on this method? This is similar to substitute a variable by 1:

On a binary expression S*cos(t):

	e := KEBinaryExpression new
		     op: #*;
		     leftHandSide: (KEVariable new symbol: #S);
		     rightHandSide: (KEMathFunctionExpression new
				      functionName: #cos;
				      functionExpr: (KEVariable new symbol: #t)).
	n := e removeVariable: (KEVariable new symbol: #S).

returns cos(t).

except on a single variable:

	e := KEVariable new symbol: #S.
	n := e removeVariable: (KEVariable new symbol: #S).

n is nil is this example.

Why do we need this?

@SergeStinckwich SergeStinckwich added this to the v1.0 milestone Mar 11, 2021
@btmanh
Copy link
Collaborator

btmanh commented Mar 12, 2021

I dont remember the objective of this method, if it doesnot have any usage in other classes, so we can remove it

@SergeStinckwich
Copy link
Collaborator Author

This is in fact used only in equationsToTransitions see #291 and in KEComponent>>mergeEventsWithSameActionsIn: eventList

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants