diff --git a/eo-maven-plugin/src/main/java/org/eolang/maven/EoSource.java b/eo-maven-plugin/src/main/java/org/eolang/maven/EoSource.java index 07a51beb983..e5516ed9e6d 100644 --- a/eo-maven-plugin/src/main/java/org/eolang/maven/EoSource.java +++ b/eo-maven-plugin/src/main/java/org/eolang/maven/EoSource.java @@ -12,8 +12,10 @@ import java.nio.file.Path; import java.util.ArrayList; import java.util.List; +import java.util.function.UnaryOperator; import org.cactoos.Input; import org.cactoos.io.InputOf; +import org.eolang.parser.Canonical; import org.eolang.parser.EoSyntax; import org.eolang.parser.OnDefault; import org.eolang.parser.OnDetailed; @@ -37,6 +39,11 @@ final class EoSource { */ private final Input input; + /** + * Transform that parses EO into XMIR. + */ + private final UnaryOperator transform; + /** * Ctor. * @param identifier Object identifier @@ -52,8 +59,29 @@ final class EoSource { * @param input Object source code */ EoSource(final String identifier, final Input input) { + this(identifier, input, new Canonical()); + } + + /** + * Ctor. + * @param identifier Object identifier + * @param source Path to the source file + * @param transform Transform that parses EO into XMIR + */ + EoSource(final String identifier, final Path source, final UnaryOperator transform) { + this(identifier, new InputOf(source), transform); + } + + /** + * Ctor. + * @param identifier Object identifier + * @param input Object source code + * @param transform Transform that parses EO into XMIR + */ + EoSource(final String identifier, final Input input, final UnaryOperator transform) { this.identifier = identifier; this.input = input; + this.transform = transform; } /** @@ -62,7 +90,7 @@ final class EoSource { * @throws IOException If fails */ Xmir parsed() throws IOException { - final XML xmir = new EoSyntax(this.input).parsed(); + final XML xmir = new EoSyntax(this.input, this.transform).parsed(); final List errors = new ArrayList<>(0); final Node document = xmir.inner(); final String name = new OnDetailed( diff --git a/eo-maven-plugin/src/main/java/org/eolang/maven/Parsing.java b/eo-maven-plugin/src/main/java/org/eolang/maven/Parsing.java index a72faba6d29..c91c7df8d0d 100644 --- a/eo-maven-plugin/src/main/java/org/eolang/maven/Parsing.java +++ b/eo-maven-plugin/src/main/java/org/eolang/maven/Parsing.java @@ -7,6 +7,7 @@ import com.github.lombrozo.xnav.Filter; import com.github.lombrozo.xnav.Xnav; import com.jcabi.log.Logger; +import com.jcabi.xml.XML; import com.jcabi.xml.XMLDocument; import java.io.FileNotFoundException; import java.io.IOException; @@ -14,9 +15,15 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; +import java.util.function.UnaryOperator; import java.util.stream.Collectors; +import org.cactoos.bytes.Sha256DigestOf; +import org.cactoos.io.InputOf; import org.cactoos.iterable.Filtered; +import org.cactoos.text.HexOf; import org.cactoos.text.TextOf; +import org.cactoos.text.UncheckedText; +import org.eolang.parser.Canonical; import org.w3c.dom.Node; /** @@ -115,10 +122,19 @@ final class Parsing implements Step { @Override public void exec() { final Collection sources = this.tojos.withSources(); - final int total = new Threaded<>( - new Filtered<>(TjForeign::notParsed, sources), - this::parsed - ).total(); + final String objects = sources.stream() + .map(TjForeign::identifier) + .filter(id -> id.contains(".")) + .distinct() + .sorted() + .collect(Collectors.joining(" ")); + final int total = this.parsed( + sources, + new Canonical(objects), + new UncheckedText( + new HexOf(new Sha256DigestOf(new InputOf(objects))) + ).asString() + ); if (0 == total) { if (sources.isEmpty()) { Logger.info( @@ -140,13 +156,35 @@ public void exec() { } } + /** + * Parse all the given sources to XMIRs, concurrently. + * @param sources The sources to parse + * @param pipeline The canonical parsing transform to apply + * @param digest Digest of the set of known objects (part of the cache key) + * @return Amount of parsed tojos + */ + private int parsed( + final Collection sources, + final UnaryOperator pipeline, + final String digest + ) { + return new Threaded<>( + new Filtered<>(TjForeign::notParsed, sources), + tojo -> this.parsed(tojo, pipeline, digest) + ).total(); + } + /** * Parse EO file to XML. * @param tojo The tojo + * @param pipeline The canonical parsing transform to apply + * @param digest Digest of the set of known objects (part of the cache key) * @return Amount of parsed tojos * @throws Exception If fails */ - private int parsed(final TjForeign tojo) throws Exception { + private int parsed( + final TjForeign tojo, final UnaryOperator pipeline, final String digest + ) throws Exception { final Path source = tojo.source(); final String name = tojo.identifier(); final Path base = this.targetDir.resolve(Parsing.DIR); @@ -157,18 +195,18 @@ private int parsed(final TjForeign tojo) throws Exception { new Cache( new CachePath( this.cacheDir.resolve(Parsing.CACHE), - this.version, + String.format("%s-%s", this.version, digest), new TojoHash(tojo).get() ), src -> { - final Node node = this.parsed(src, name); + final Node node = this.parsed(src, name, pipeline); refs.add(node); return new XMLDocument(node).toString(); } ) ).apply(source, target, base.relativize(target)); } else { - final Node node = this.parsed(source, name); + final Node node = this.parsed(source, name, pipeline); new Saved(new XMLDocument(node).toString(), target).value(); refs.add(node); } @@ -198,11 +236,14 @@ private int parsed(final TjForeign tojo) throws Exception { * Source parsed to {@link Node}. * @param source Relative source path * @param identifier Name of the EO object as tojo identifier + * @param pipeline The canonical parsing transform to apply * @return Parsed EO object as {@link Node} * @throws IOException If fails to parse */ - private Node parsed(final Path source, final String identifier) throws IOException { - final EoSource.Xmir xmir = new EoSource(identifier, source).parsed(); + private Node parsed( + final Path source, final String identifier, final UnaryOperator pipeline + ) throws IOException { + final EoSource.Xmir xmir = new EoSource(identifier, source, pipeline).parsed(); Logger.debug( Parsing.class, "Parsed program '%s' from %[file]s:%n %s", diff --git a/eo-maven-plugin/src/test/java/org/eolang/maven/MjParseTest.java b/eo-maven-plugin/src/test/java/org/eolang/maven/MjParseTest.java index 0050a6ec4cb..48dfc682026 100644 --- a/eo-maven-plugin/src/test/java/org/eolang/maven/MjParseTest.java +++ b/eo-maven-plugin/src/test/java/org/eolang/maven/MjParseTest.java @@ -17,7 +17,10 @@ import java.util.Map; import org.apache.maven.plugins.annotations.LifecyclePhase; import org.apache.maven.plugins.annotations.Mojo; +import org.cactoos.bytes.Sha256DigestOf; +import org.cactoos.io.InputOf; import org.cactoos.io.ResourceOf; +import org.cactoos.text.HexOf; import org.cactoos.text.TextOf; import org.cactoos.text.UncheckedText; import org.hamcrest.MatcherAssert; @@ -91,7 +94,7 @@ void parsesWithCache(@Mktmp final Path temp) throws Exception { final Path target = new Place("foo.x.main").make(base, MjAssemble.XMIR); new Cache( cache.resolve(Parsing.CACHE) - .resolve(FakeMaven.pluginVersion()) + .resolve(MjParseTest.cacheVersion(maven.programTojo().identifier())) .resolve(hash.value()), src -> expected ).apply(maven.programTojo().source(), target, base.relativize(target)); @@ -131,6 +134,66 @@ void doesNotCrashesOnError(@Mktmp final Path temp) throws Exception { ); } + @Test + void homesBareReferenceToSamePackageObject(@Mktmp final Path temp) throws IOException { + final FakeMaven maven = new FakeMaven(temp); + maven.withProgram( + String.join( + System.lineSeparator(), + "+package foo", + "", + "[] > bar", + " 42 > @" + ), + "foo.bar", + "foo/bar.eo" + ).withProgram( + String.join( + System.lineSeparator(), + "+package foo", + "", + "[] > app", + " bar > @" + ), + "foo.app", + "foo/app.eo" + ); + MatcherAssert.assertThat( + "bare reference 'bar' must be resolved into the same package as 'Φ.foo.bar'", + new XMLDocument( + maven.execute(new FakeMaven.Parse()).result().get( + String.format("target/%s/foo/app.%s", Parsing.DIR, MjAssemble.XMIR) + ) + ), + XhtmlMatchers.hasXPath("//o[@base='Φ.foo.bar']") + ); + } + + @Test + void keepsBareGlobalReferenceAtRoot(@Mktmp final Path temp) throws IOException { + final FakeMaven maven = new FakeMaven(temp); + maven.withProgram( + String.join( + System.lineSeparator(), + "+package foo", + "", + "[] > app", + " bar > @" + ), + "foo.app", + "foo/app.eo" + ); + MatcherAssert.assertThat( + "bare reference 'bar' must stay at the root when no 'Φ.foo.bar' object exists", + new XMLDocument( + maven.execute(new FakeMaven.Parse()).result().get( + String.format("target/%s/foo/app.%s", Parsing.DIR, MjAssemble.XMIR) + ) + ), + XhtmlMatchers.hasXPath("//o[@base='Φ.bar']") + ); + } + @Test void crashesIfWrongPackage(@Mktmp final Path temp) throws IOException { new FakeMaven(temp).withProgram( @@ -278,6 +341,24 @@ void parsesWithTargetCache(@Mktmp final Path temp) throws IOException { ); } + /** + * The parse cache version segment for a program with a single object. + * It mirrors what {@link Parsing} computes: the plugin version plus a + * SHA-256 digest of the qualified names of the local package objects + * (here, the identifier of the only object). + * @param identifier The tojo identifier of the only registered object + * @return The version segment used as part of the parse cache path + */ + private static String cacheVersion(final String identifier) { + return String.format( + "%s-%s", + FakeMaven.pluginVersion(), + new UncheckedText( + new HexOf(new Sha256DigestOf(new InputOf(identifier))) + ).asString() + ); + } + /** * The mojo that does nothing, but executes infinitely. * @since 0.29 diff --git a/eo-parser/src/main/java/org/eolang/parser/Canonical.java b/eo-parser/src/main/java/org/eolang/parser/Canonical.java new file mode 100644 index 00000000000..20ef150970e --- /dev/null +++ b/eo-parser/src/main/java/org/eolang/parser/Canonical.java @@ -0,0 +1,124 @@ +/* + * SPDX-FileCopyrightText: Copyright (c) 2016-2026 Objectionary.com + * SPDX-License-Identifier: MIT + */ +package org.eolang.parser; + +import com.jcabi.xml.XML; +import com.yegor256.xsline.Shift; +import com.yegor256.xsline.StClasspath; +import com.yegor256.xsline.TrClasspath; +import com.yegor256.xsline.TrDefault; +import com.yegor256.xsline.TrJoined; +import com.yegor256.xsline.Xsline; +import java.util.function.UnaryOperator; +import org.cactoos.Scalar; +import org.cactoos.scalar.Sticky; +import org.cactoos.scalar.Synced; +import org.cactoos.scalar.Unchecked; + +/** + * The canonical XSL pipeline applied to the raw parser output. + * + *

The pipeline may be aware of the local package objects. When it + * is, a bare reference in a program with a {@code +package} meta is + * homed into the current package (as if there was a {@code +alias} + * meta), but only when the name is one of those local package objects. + * Otherwise the reference stays at the root {@code Φ} (it is treated + * as a global). The awareness is passed to + * {@code add-default-package.xsl} through the {@code objects} + * parameter. When nothing is known, bare references are always homed + * into the root {@code Φ} (see {@code add-default-package.xsl}).

+ * + * @since 0.60 + */ +public final class Canonical implements UnaryOperator { + + /** + * The pipeline, built lazily and only once. + */ + private final Unchecked> pipeline; + + /** + * Ctor, not aware of any objects. + */ + public Canonical() { + this(""); + } + + /** + * Ctor. + * @param objects Space separated qualified names ("package.name") + * of the local package objects the compiler is aware of; a bare + * reference is homed into the current package only if + * "package.name" is one of them, otherwise it goes to the root + * {@code Φ} + */ + public Canonical(final String objects) { + this.pipeline = new Unchecked<>( + new Synced<>(new Sticky<>(new Canonical.Pipeline(objects))) + ); + } + + @Override + public XML apply(final XML xml) { + return this.pipeline.value().apply(xml); + } + + /** + * The scalar that builds the canonical pipeline. + * @since 0.60 + */ + private static final class Pipeline implements Scalar> { + + /** + * Space separated qualified names of the local package objects. + */ + private final String objects; + + /** + * Ctor. + * @param objs Space separated qualified names of local package objects + */ + Pipeline(final String objs) { + this.objects = objs; + } + + @Override + public UnaryOperator value() { + return new Xsline( + new TrFull( + new TrJoined<>( + new TrClasspath<>( + "/org/eolang/parser/parse/validate-before-stars.xsl", + "/org/eolang/parser/parse/resolve-before-stars.xsl", + "/org/eolang/parser/parse/fragile-dispatch.xsl", + "/org/eolang/parser/parse/wrap-method-calls.xsl", + "/org/eolang/parser/parse/const-to-dataized.xsl", + "/org/eolang/parser/parse/stars-to-tuples.xsl", + "/org/eolang/parser/parse/vars-float-up.xsl", + "/org/eolang/parser/parse/move-voids-up.xsl", + "/org/eolang/parser/parse/validate-objects-count.xsl", + "/org/eolang/parser/parse/build-fqns.xsl", + "/org/eolang/parser/parse/expand-aliases.xsl", + "/org/eolang/parser/parse/resolve-aliases.xsl" + ).back(), + new TrDefault( + new StClasspath( + "/org/eolang/parser/parse/add-default-package.xsl", + String.format("objects %s", this.objects) + ) + ), + new TrClasspath<>( + "/org/eolang/parser/parse/roll-bases.xsl", + "/org/eolang/parser/parse/cti-adds-errors.xsl", + "/org/eolang/parser/parse/decorate.xsl", + "/org/eolang/parser/parse/mandatory-as.xsl" + ).back(), + new TrDefault<>(new StHex()) + ) + ) + )::pass; + } + } +} diff --git a/eo-parser/src/main/java/org/eolang/parser/EoSyntax.java b/eo-parser/src/main/java/org/eolang/parser/EoSyntax.java index f5ab60f33ff..d44a7a4be9c 100644 --- a/eo-parser/src/main/java/org/eolang/parser/EoSyntax.java +++ b/eo-parser/src/main/java/org/eolang/parser/EoSyntax.java @@ -7,13 +7,10 @@ import com.jcabi.xml.XML; import com.jcabi.xml.XMLDocument; import com.yegor256.xsline.Shift; -import com.yegor256.xsline.TrClasspath; -import com.yegor256.xsline.TrDefault; -import com.yegor256.xsline.TrJoined; import com.yegor256.xsline.Train; import com.yegor256.xsline.Xsline; import java.io.IOException; -import java.util.function.Function; +import java.util.function.UnaryOperator; import org.cactoos.Input; import org.cactoos.io.InputOf; import org.cactoos.text.TextOf; @@ -34,33 +31,14 @@ public final class EoSyntax implements Syntax { /** * Canonical XSL pipeline applied to the raw parser output. + * + *

This one is not aware of any objects, so bare references are + * always homed into the root {@code Φ} package. Use a + * {@link Canonical} built with a list of objects to make the + * pipeline resolve same-package references automatically (see + * {@code add-default-package.xsl}).

*/ - static final Function CANONICAL = new Xsline( - new TrFull( - new TrJoined<>( - new TrClasspath<>( - "/org/eolang/parser/parse/validate-before-stars.xsl", - "/org/eolang/parser/parse/resolve-before-stars.xsl", - "/org/eolang/parser/parse/fragile-dispatch.xsl", - "/org/eolang/parser/parse/wrap-method-calls.xsl", - "/org/eolang/parser/parse/const-to-dataized.xsl", - "/org/eolang/parser/parse/stars-to-tuples.xsl", - "/org/eolang/parser/parse/vars-float-up.xsl", - "/org/eolang/parser/parse/move-voids-up.xsl", - "/org/eolang/parser/parse/validate-objects-count.xsl", - "/org/eolang/parser/parse/build-fqns.xsl", - "/org/eolang/parser/parse/expand-aliases.xsl", - "/org/eolang/parser/parse/resolve-aliases.xsl", - "/org/eolang/parser/parse/add-default-package.xsl", - "/org/eolang/parser/parse/roll-bases.xsl", - "/org/eolang/parser/parse/cti-adds-errors.xsl", - "/org/eolang/parser/parse/decorate.xsl", - "/org/eolang/parser/parse/mandatory-as.xsl" - ).back(), - new TrDefault<>(new StHex()) - ) - ) - )::pass; + static final UnaryOperator CANONICAL = new Canonical(); /** * Text to parse. @@ -70,7 +48,7 @@ public final class EoSyntax implements Syntax { /** * Transform XMIR after parsing. */ - private final Function transform; + private final UnaryOperator transform; /** * Ctor. @@ -111,7 +89,7 @@ public EoSyntax(final Input ipt) { * @param ipt The EO program to parse * @param transform Transform XMIR after parsing function */ - EoSyntax(final Input ipt, final Function transform) { + public EoSyntax(final Input ipt, final UnaryOperator transform) { this.input = ipt; this.transform = transform; } diff --git a/eo-parser/src/main/resources/org/eolang/parser/parse/add-default-package.xsl b/eo-parser/src/main/resources/org/eolang/parser/parse/add-default-package.xsl index 43e6bfade7f..03394410dad 100644 --- a/eo-parser/src/main/resources/org/eolang/parser/parse/add-default-package.xsl +++ b/eo-parser/src/main/resources/org/eolang/parser/parse/add-default-package.xsl @@ -3,7 +3,7 @@ * SPDX-FileCopyrightText: Copyright (c) 2016-2026 Objectionary.com * SPDX-License-Identifier: MIT --> - + + + + + + + + + + + + + @@ -59,10 +105,7 @@ - - Φ. - - + @@ -74,10 +117,7 @@ - - Φ. - - + diff --git a/eo-parser/src/test/java/org/eolang/parser/EoSyntaxTest.java b/eo-parser/src/test/java/org/eolang/parser/EoSyntaxTest.java index 75c108e442e..13c775ac078 100644 --- a/eo-parser/src/test/java/org/eolang/parser/EoSyntaxTest.java +++ b/eo-parser/src/test/java/org/eolang/parser/EoSyntaxTest.java @@ -15,7 +15,7 @@ import java.nio.file.Files; import java.nio.file.Paths; import java.util.Set; -import java.util.function.Function; +import java.util.function.UnaryOperator; import java.util.stream.Collectors; import java.util.stream.Stream; import org.apache.commons.text.StringEscapeUtils; @@ -228,6 +228,53 @@ void parsesCanonicalEoProgram() throws Exception { ); } + @Test + void homesBareReferenceIntoPackageWhenObjectExists() throws IOException { + MatcherAssert.assertThat( + "bare reference to a same-package object must be homed into the current package", + new EoSyntax( + new InputOf( + String.join( + System.lineSeparator(), + "+package foo", + "", + "[] > x", + " bar 42 > @", + " seq > y".concat(System.lineSeparator()) + ) + ), + new Canonical("foo.bar") + ).parsed(), + XhtmlMatchers.hasXPaths( + "/object[not(errors)]", + "//o[@base='Φ.foo.bar']", + "//o[@base='Φ.seq']" + ) + ); + } + + @Test + void keepsBareReferenceAtRootWhenObjectAbsent() throws IOException { + MatcherAssert.assertThat( + "bare reference must default to the root Φ when the object is unknown", + new EoSyntax( + new InputOf( + String.join( + System.lineSeparator(), + "+package foo", + "", + "[] > x", + " bar 42 > @".concat(System.lineSeparator()) + ) + ) + ).parsed(), + XhtmlMatchers.hasXPaths( + "/object[not(errors)]", + "//o[@base='Φ.bar']" + ) + ); + } + @Test void parsesMethodCalls() throws IOException { MatcherAssert.assertThat( @@ -629,7 +676,7 @@ private static Stream naughty() throws IOException { private static XML raw(final String line) throws Exception { return new EoSyntax( new InputOf(line.concat(String.valueOf((char) 10))), - Function.identity() + UnaryOperator.identity() ).parsed(); } diff --git a/eo-runtime/src/main/eo/ms/arc-cosine.eo b/eo-runtime/src/main/eo/ms/arc-cosine.eo index e7e13de38d8..c4b40b5fcb1 100644 --- a/eo-runtime/src/main/eo/ms/arc-cosine.eo +++ b/eo-runtime/src/main/eo/ms/arc-cosine.eo @@ -3,9 +3,6 @@ # equals pi/2 minus asin(x). Arguments outside [-1, 1] and non-finite ones # collapse to nan. -+alias ms.abs -+alias ms.arc-sine -+alias ms.pi +architect yegor256@gmail.com +home https://github.com/objectionary/eo +package ms diff --git a/eo-runtime/src/main/eo/ms/arc-sine.eo b/eo-runtime/src/main/eo/ms/arc-sine.eo index f964d6ca571..fd8a1587da8 100644 --- a/eo-runtime/src/main/eo/ms/arc-sine.eo +++ b/eo-runtime/src/main/eo/ms/arc-sine.eo @@ -4,9 +4,6 @@ # series always runs in its fast region, while arguments outside [-1, 1] and # non-finite ones collapse to nan. -+alias ms.abs -+alias ms.pi -+alias ms.sqrt +architect yegor256@gmail.com +home https://github.com/objectionary/eo +package ms diff --git a/eo-runtime/src/main/eo/ms/cosine.eo b/eo-runtime/src/main/eo/ms/cosine.eo index 49b3006a156..1758f044ca8 100644 --- a/eo-runtime/src/main/eo/ms/cosine.eo +++ b/eo-runtime/src/main/eo/ms/cosine.eo @@ -1,9 +1,6 @@ # Cosine of `num` radians as `org.eolang.number`, taken from the sine of the # argument advanced by a quarter turn, since cos(x) equals sin(x + pi/2). -+alias ms.abs -+alias ms.pi -+alias ms.sine +architect yegor256@gmail.com +home https://github.com/objectionary/eo +package ms diff --git a/eo-runtime/src/main/eo/ms/degrees.eo b/eo-runtime/src/main/eo/ms/degrees.eo index ef550589716..3f4e776f75f 100644 --- a/eo-runtime/src/main/eo/ms/degrees.eo +++ b/eo-runtime/src/main/eo/ms/degrees.eo @@ -1,8 +1,6 @@ # Degrees of `num` radians as `org.eolang.number`, the same angle expressed in # degrees rather than radians, found by scaling the argument by 180 over pi. -+alias ms.abs -+alias ms.pi +architect yegor256@gmail.com +home https://github.com/objectionary/eo +package ms diff --git a/eo-runtime/src/main/eo/ms/exp.eo b/eo-runtime/src/main/eo/ms/exp.eo index 2b17ab18ecd..30b20208506 100644 --- a/eo-runtime/src/main/eo/ms/exp.eo +++ b/eo-runtime/src/main/eo/ms/exp.eo @@ -1,8 +1,5 @@ # Returns Euler's number raised to the power of a `num`. -+alias ms.abs -+alias ms.e -+alias ms.power +architect yegor256@gmail.com +home https://github.com/objectionary/eo +package ms diff --git a/eo-runtime/src/main/eo/ms/ln.eo b/eo-runtime/src/main/eo/ms/ln.eo index ccb4e33d774..515af2ecdc0 100644 --- a/eo-runtime/src/main/eo/ms/ln.eo +++ b/eo-runtime/src/main/eo/ms/ln.eo @@ -4,8 +4,6 @@ # limiting cases follow the usual conventions: zero is negative infinity, a # negative number and negative infinity are nan, and positive infinity stays. -+alias ms.abs -+alias ms.e +architect yegor256@gmail.com +home https://github.com/objectionary/eo +package ms diff --git a/eo-runtime/src/main/eo/ms/mod.eo b/eo-runtime/src/main/eo/ms/mod.eo index 20f3c422fc1..f7f3ebfa3a2 100644 --- a/eo-runtime/src/main/eo/ms/mod.eo +++ b/eo-runtime/src/main/eo/ms/mod.eo @@ -3,7 +3,6 @@ # is zero, the result is the caller-supplied `cant-mod` fallback, or the # bottom object when none was provided, which terminates on use. -+alias ms.abs +architect yegor256@gmail.com +home https://github.com/objectionary/eo +package ms diff --git a/eo-runtime/src/main/eo/ms/power.eo b/eo-runtime/src/main/eo/ms/power.eo index 3b1c1510ff0..f4a7eb05065 100644 --- a/eo-runtime/src/main/eo/ms/power.eo +++ b/eo-runtime/src/main/eo/ms/power.eo @@ -4,9 +4,6 @@ # e raised to `x` times the natural logarithm of the base. Zeros, infinities and # nan follow the same IEEE rules that Math.pow obeys. -+alias ms.abs -+alias ms.e -+alias ms.ln +architect yegor256@gmail.com +home https://github.com/objectionary/eo +package ms diff --git a/eo-runtime/src/main/eo/ms/radians.eo b/eo-runtime/src/main/eo/ms/radians.eo index a3eb615b57a..696d7277521 100644 --- a/eo-runtime/src/main/eo/ms/radians.eo +++ b/eo-runtime/src/main/eo/ms/radians.eo @@ -1,8 +1,6 @@ # Radians of `num` degrees as `org.eolang.number`, the same angle expressed in # radians rather than degrees, found by scaling the argument by pi over 180. -+alias ms.abs -+alias ms.pi +architect yegor256@gmail.com +home https://github.com/objectionary/eo +package ms diff --git a/eo-runtime/src/main/eo/ms/sine.eo b/eo-runtime/src/main/eo/ms/sine.eo index 8e91bb824d5..23d3762c535 100644 --- a/eo-runtime/src/main/eo/ms/sine.eo +++ b/eo-runtime/src/main/eo/ms/sine.eo @@ -3,8 +3,6 @@ # is summed through Horner's scheme, so the result stays accurate for # angles of any magnitude, while non-finite arguments collapse to nan. -+alias ms.abs -+alias ms.pi +architect yegor256@gmail.com +home https://github.com/objectionary/eo +package ms diff --git a/eo-runtime/src/main/eo/ms/sqrt.eo b/eo-runtime/src/main/eo/ms/sqrt.eo index ddb47a08d55..71386032acd 100644 --- a/eo-runtime/src/main/eo/ms/sqrt.eo +++ b/eo-runtime/src/main/eo/ms/sqrt.eo @@ -1,8 +1,6 @@ # Positive square root of `num` as `org.eolang.number`, taken as `num` raised to # the one-half power. A negative argument, negative infinity included, is nan. -+alias ms.abs -+alias ms.power +architect yegor256@gmail.com +home https://github.com/objectionary/eo +package ms