We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.

LYaPAS

From Esolang
Jump to navigation Jump to search

Logical Language for the Representation of Synthesis Algorithms, or LYaPAS (ЛЯПАС), is a programming language that sprung out of 1964 Soviet Union. It is based on set-theoretical considerations oriented toward the programming of synthesis algorithms for finite-state and discrete devices. The language is self-extending and self-compiling with only a minimal translator written for the native machine environment.

Speciality keyboard mappings are highly recommended for entering in the many non-typical keyboard symbols found in the language.

Its use of octal numbers within the language specification is considered one of its interesting qualities.

LYaPAS-M is a further refinement of LYaPAS.

Operators

l-operators

First-level operators in the language.

Basic Computational Operators

Symbol Name Example
Disjunction Operator 01001101 ∨ 10011000 = 11011101
Conjunction Operator 01001101 ∧ 10011000 = 00001000
Exclusive Disjunction Operator 01000110 ⊕ 10001100 = 11001010
+ Addition Operator—Modulo 2p 01000110 + 10001100 = 11010010
- Subtraction Operator—Modulo 2p 01000110 - 10001100 = 1011101
× Multiplication Operator—Modulo 2p 01000110 × 10001100 = 01001000
×̅ Multiplication Operator with Round-Off 01000110 ×̄ 10001100 = 00100110
: Division Operator 00001101:00000101 = 00000011 (remainder), я = 00000010 (integer part of quotient)
Component-wise Inversion Operator 01001101 ┐ = 10110010
ɪ Order Inversion Operator 01001101 ɪ = 10110010
Leftmost 1 Position-Locating Operator 00010110 ⊢ = 00000011
By convention, 00000000 ⊢ = 10000000 ⊢ = 00000000
Normalization Operator 00010110 ⇤ = 10110000, 00000000 ⇤ 00000000
< Left-Shift Operator 01101010 < 00000100 = 10100000
> Right-Shift Operator 01101010 > 00000101 = 00000011
Cyclic-Shift Operator 01101010 ← 00100100 = 10100110
Weighting Operator 01101010 ▽ = 00000100 (number of ones)
Reflection Operator (Requires a more in-depth explanation.)

Assignment Operators

Symbol Name
Assignment Operator
Interchange Operator
Natural Assignment Operator
Positive Element-Incrementation Operator
▵̅ Negative Element-Incrementation Operator
Null-Value-Assignment Operator
○̅ Maximum-Value-Assignment Operator

Implicit Variable τ

Implicit variable τ is a symbol that never appears in the program. The current value of τ is the result of the the realization of the current operator.

Control-Transfer Operators

Symbol Name
Unconditional Transfer Operator
○→ Conditional Transfer-on-Zero Operator
Conditional Transfer-on-One Operator
Exit Operator
! Return Operator
Transfer-to-Machine-Language Operator
Enumeration-of-Ones Operator
Random-Enumeration-of-Ones Operator

Exchanging Information with External Medium Operators

Symbol Name
* Print-One-Element Operator
Punch-One-Element Operator
Input Operator
Data-Transfer-to-External-Complex Operator
Data-Transfer-from-External-Complex Operator

Other Operators

Symbol Name
. End-of-Algorithm Operator
Unlimited-Shift Operator

L-operators

Second-level operators in the language.

Example

genadj. Perform generalized adjunction (joining) of intervals of a set.

genadj ακ?, ßκ? /b, d/ (αß)
170 233 4ab)
abbαdc0 ┐⇒ b

Test for generalized adjunction of intervals Ia and Ib, formation of the interval Id—the result of the generalized adjunction—and setting of tags:

§1 △ ad ○ → 4αa ⊕ αbbaßa
⊕ ßbaa ⇤ ⊕ c0 ↦ 1αa
∨ αba ⇒ αdα ∧ ßba
c0 ⇒ ßd?c0 ∨ αa ⇒ αac0 ∨ αb
⇒ αbca

Test for presence of interval Id in Int:

§2 αc ⊕ αdb |→ 3ßc ⊕ ßdb
↦ 3c0 ∨ ßc ⇒ ßc ○̄ a
§3 △ cd ↦ 2a ↦ 1 △ d → 1
§4 ○̄ abd ↦ 1dbαbß

External resources