Giter VIP home page Giter VIP logo

Comments (5)

pjljvandelaar avatar pjljvandelaar commented on June 3, 2024

A quick analysis shows that the problem is that transforming the string M("Up command") to torxakis is ambiguous.
The ambiguity is caused by:

TYPEDEF ITypes0 ::=
	M { v :: String }
ENDDEF

TYPEDEF OTypes0 ::=
	M { v :: String }
ENDDEF

I.e. two data types have the same constructor (name and argument).

imho TorXakis should be able to distinguish these two data types, since only OType is expected.

from torxakis.

brampetersen avatar brampetersen commented on June 3, 2024

Thanks for the quick answer. Changing the typedef works:

TYPEDEF OTypes0 ::=
	E { v :: String }
ENDDEF
TXS >> test 1000
TXS >>  .....1: IN: Act { { ( InSut0, [ M("Up pressed") ] ) } }
TXS >>  .....2: OUT: Act { { ( OutSut0, [ E("Up command") ] ) } }
TXS >>  .....3: IN: Act { { ( InSut0, [ M("Up pressed") ] ) } }
TXS >>  .....4: OUT: Act { { ( OutSut0, [ E("Up command") ] ) } }
TXS >>  .....5: IN: Act { { ( InSut0, [ M("Up pressed") ] ) } }

What should I do with the issue, close it?

from torxakis.

pjljvandelaar avatar pjljvandelaar commented on June 3, 2024

The function compileValExpr lacks a parameter to specify the expected type (when known).
This would disambiguate the value of the string and prevent the reported error.

@brampetersen lets keep the error open as a reminder to improve this!

from torxakis.

pjljvandelaar avatar pjljvandelaar commented on June 3, 2024

Changed title to better reflect isssue:
Parsing of SUT messages uses too little information: it doesn't use the expected type.
This lack of information can result in a MultipleDefinitions error as is shown in this issue!

from torxakis.

pjljvandelaar avatar pjljvandelaar commented on June 3, 2024

Note: In refactorAll branch is this problem absent, since

-- | 'TorXakis.Value.Value' from 'Data.Text.Text' conversion.
-- Expected 'TorXakis.Sort' of 'TorXakis.Value.Value' must be provided.
valueFromText :: SortContext c => c -> Sort -> Text -> Either Error Value

from torxakis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.