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

I would be very happy to get some advice to make a specification imported smoothly... #2

Open
Kazukiysd1023 opened this issue Jan 11, 2019 · 5 comments

Comments

@Kazukiysd1023
Copy link

Hello,

Now I have a syntactic problem (maybe) in importing some specification into CafeOBJ.
I would be very happy to get some advice to fix the problem and make it imported smoothly...

I'm trying to specify some business model innovation in the framework named "Business Model Canvas" invented by Alexander Osterwalder, etc.
In that trial, I specified the framework itself as follows; and imported the mod file into CafeOBJ, but I've got the Error messages like
"No possible parse for LHS"
"No possible parse for RHS"
I guess they're coming from some syntactical problem, so I just show a part of the specification here.
(please don't mention about its semantics now)

module! BUSINESS-MODEL-CANVAS
{
imports {
pr ( LIST )
pr ( STRING )
pr ( INT )
pr ( 2TUPLE )
pr ( 3TUPLE )
pr ( 4TUPLE )
pr ( BOOL )
pr ( STAKEHOLDER )
}
signature {
[BusinessModelCanvas]
op [ CS _ CR _ CH _ KA _ KR _ KP _ C$ _ R$ _ ] : List List List List List List List List -> BusinessModelCanvas { constr }
op profit : BusinessModelCanvas String -> Int
op calc : List StakeHolder -> Int

** other operators are omited now.
}
axiom {
var lcs : List
var lcr : List
var lch : List
var lka : List
var lkr : List
var lkp : List
var lc$ : List
var lr$ : List
var lis1 : List
var str1 : String
var str2 : String
var str3 : String
var str4 : String
var str5 : String
var str6 : String
var int1 : Int
var 2tpl : 2Tuple
var 4tpl : 4Tuple
var stkh1 : StakeHolder

eq profit ( [ CS lcs CR lcr CH lch KA lka KR lkr KP lkp C$ lc$ R$ lr$ ] str1 ) = calc ( lr$ str1 ) - calc ( lc$ str1 ) .

cq calc( 4tpl | lis1 stkh1 ) = 2 * 4 * 4tpl + calc( lis1 stkh1 ) if 2 * 4 * 4tpl = stkh1 .
cq calc ( 4tpl | lis1 stkh1 ) = calc ( lis1 stkh1 ) if not ( 1* 4* 4tpl = stkh1 ) ) .
eq calc ( nil stkh1 ) = 0 .

** other equations and conditional equations are omitted now.

}
}

Do I make a mistake causing the above Error messages?
I would be very happy to get some advices...

Thank you so much in advance.

@norbusan
Copy link
Member

Thanks for your question!
Can you please provide the other necessary modules (list, stakeholder at least) so that I can try it out? The definitions therein are essential for the parsing construct.

If you mind posting them here, please send them to [email protected] so that I can look at them!

Thanks

@Kazukiysd1023
Copy link
Author

Hello norbusan,
Thanks so much for your quick respose and kind offer !
I'll send them to you via [email protected].
kazuki

@Kazukiysd1023
Copy link
Author

Hello norbusan,

I had sent .mod files to [email protected] on the last Friday. Did you get them?

Is there anything wrong in the specifications? I would be very happy to get your advice!

Thanks so much in advance.

kazuki

@norbusan
Copy link
Member

I answered the same day (in Japanese) with a few improvements and suggestions - did you get this email?

@Kazukiysd1023
Copy link
Author

Hello norbusan,
I'm very sorry for my missing your message in the mailbox.
I've just found it, so I'll try to improve the specifications reading your suggestions from now.
Thanks so much for your quick and kind manner.
I'd like to ask you later if I would have some troubles again.

p.s.
I'm very surprised to know that you can write good Japanese!

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

2 participants